mage-ai 0.9.67__py3-none-any.whl → 0.9.69__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 (307) hide show
  1. mage_ai/api/monitors/BaseMonitor.py +1 -2
  2. mage_ai/api/policies/PipelinePolicy.py +2 -0
  3. mage_ai/api/resources/BlockLayoutItemResource.py +2 -2
  4. mage_ai/api/resources/BlockResource.py +4 -3
  5. mage_ai/api/resources/CacheItemResource.py +1 -1
  6. mage_ai/api/resources/GitBranchResource.py +3 -5
  7. mage_ai/api/resources/PageBlockLayoutResource.py +2 -2
  8. mage_ai/api/resources/PipelineResource.py +13 -0
  9. mage_ai/api/resources/PipelineRunResource.py +10 -1
  10. mage_ai/api/resources/SeedResource.py +2 -1
  11. mage_ai/api/resources/SessionResource.py +13 -1
  12. mage_ai/authentication/permissions/constants.py +2 -0
  13. mage_ai/authentication/permissions/seed.py +32 -21
  14. mage_ai/authentication/providers/active_directory.py +4 -3
  15. mage_ai/authentication/providers/okta.py +22 -83
  16. mage_ai/cache/tag.py +3 -0
  17. mage_ai/cluster_manager/manage.py +4 -1
  18. mage_ai/data_preparation/executors/k8s_block_executor.py +8 -1
  19. mage_ai/data_preparation/executors/k8s_pipeline_executor.py +12 -1
  20. mage_ai/data_preparation/executors/streaming_pipeline_executor.py +77 -7
  21. mage_ai/data_preparation/logging/gcs_logger_manager.py +7 -4
  22. mage_ai/data_preparation/models/block/__init__.py +28 -71
  23. mage_ai/data_preparation/models/block/block_factory.py +77 -0
  24. mage_ai/data_preparation/models/block/data_integration/mixins.py +16 -5
  25. mage_ai/data_preparation/models/block/dbt/block.py +5 -7
  26. mage_ai/data_preparation/models/block/dynamic/child.py +3 -0
  27. mage_ai/data_preparation/models/block/dynamic/variables.py +2 -2
  28. mage_ai/data_preparation/models/block/extension/utils.py +1 -0
  29. mage_ai/data_preparation/models/block/global_data_product/__init__.py +9 -3
  30. mage_ai/data_preparation/models/block/integration/__init__.py +13 -9
  31. mage_ai/data_preparation/models/block/platform/mixins.py +1 -1
  32. mage_ai/data_preparation/models/block/sql/__init__.py +1 -1
  33. mage_ai/data_preparation/models/pipeline.py +102 -19
  34. mage_ai/data_preparation/models/utils.py +6 -0
  35. mage_ai/data_preparation/models/variable.py +18 -4
  36. mage_ai/data_preparation/repo_manager.py +3 -2
  37. mage_ai/data_preparation/shared/utils.py +1 -1
  38. mage_ai/data_preparation/storage/gcs_storage.py +1 -1
  39. mage_ai/data_preparation/templates/constants.py +7 -0
  40. mage_ai/data_preparation/templates/data_exporters/mysql.py +2 -2
  41. mage_ai/data_preparation/templates/data_exporters/oracledb.py +27 -0
  42. mage_ai/data_preparation/templates/repo/metadata.yaml +1 -0
  43. mage_ai/io/bigquery.py +131 -58
  44. mage_ai/io/export_utils.py +3 -0
  45. mage_ai/io/mysql.py +38 -6
  46. mage_ai/io/oracledb.py +138 -3
  47. mage_ai/io/snowflake.py +152 -29
  48. mage_ai/io/sql.py +4 -0
  49. mage_ai/orchestration/db/__init__.py +2 -2
  50. mage_ai/orchestration/db/models/oauth.py +4 -4
  51. mage_ai/orchestration/db/models/schedules.py +10 -3
  52. mage_ai/orchestration/job_manager.py +6 -0
  53. mage_ai/orchestration/notification/sender.py +8 -0
  54. mage_ai/orchestration/pipeline_scheduler_original.py +26 -7
  55. mage_ai/orchestration/queue/celery_queue.py +8 -1
  56. mage_ai/orchestration/queue/process_queue.py +67 -4
  57. mage_ai/orchestration/queue/queue.py +8 -0
  58. mage_ai/server/constants.py +1 -1
  59. mage_ai/server/frontend_dist/404.html +2 -2
  60. mage_ai/server/{frontend_dist_base_path_template/_next/static/khKiaJtwrslgMmp4YSa1f → frontend_dist/_next/static/_krrrgup_C-dPOpX36S8I}/_buildManifest.js +1 -1
  61. mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +1 -0
  62. mage_ai/server/frontend_dist/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/3548-fa0792ddb88f4646.js +1 -0
  64. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4241-ccd0126f5750cc35.js → frontend_dist/_next/static/chunks/4241-4499461184ba0d23.js} +1 -1
  65. mage_ai/server/frontend_dist/_next/static/chunks/5627-237a3de578538022.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
  68. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7966-5c1786fb7e7a48f5.js → frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js} +1 -1
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +1 -0
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-8bbfa0c19b5e4cb3.js +1 -0
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +1 -0
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-597b74828bf105db.js +1 -0
  74. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-a66b4c7641ae03eb.js → pipeline-runs-3edc6270c5b0e962.js} +1 -1
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +1 -0
  76. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-90abafc7ed61c582.js +1 -0
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-1bdfda8edc9cf4a8.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +1 -0
  85. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-79a4cf66a623e667.js → frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js} +1 -1
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
  87. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-7d38b2f7c3e918a1.js → frontend_dist/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js} +1 -1
  88. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-9cba3211434a8966.js +1 -0
  89. mage_ai/server/frontend_dist/block-layout.html +2 -2
  90. mage_ai/server/frontend_dist/compute.html +2 -2
  91. mage_ai/server/frontend_dist/files.html +2 -2
  92. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  93. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  94. mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
  95. mage_ai/server/frontend_dist/global-hooks.html +2 -2
  96. mage_ai/server/frontend_dist/index.html +2 -2
  97. mage_ai/server/frontend_dist/manage/files.html +2 -2
  98. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  99. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  100. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  101. mage_ai/server/frontend_dist/manage/users.html +2 -2
  102. mage_ai/server/frontend_dist/manage.html +2 -2
  103. mage_ai/server/frontend_dist/oauth.html +3 -3
  104. mage_ai/server/frontend_dist/overview.html +2 -2
  105. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  106. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  107. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  108. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
  109. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  110. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  111. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  112. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  113. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  114. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  115. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  116. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  117. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  118. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  119. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  120. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  121. mage_ai/server/frontend_dist/pipelines.html +2 -2
  122. mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +2 -2
  123. mage_ai/server/frontend_dist/platform/global-hooks.html +2 -2
  124. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  125. mage_ai/server/frontend_dist/settings/platform/preferences.html +2 -2
  126. mage_ai/server/frontend_dist/settings/platform/settings.html +2 -2
  127. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
  128. mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
  129. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  130. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
  131. mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
  132. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  133. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
  134. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  135. mage_ai/server/frontend_dist/settings.html +2 -2
  136. mage_ai/server/frontend_dist/sign-in.html +5 -5
  137. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  138. mage_ai/server/frontend_dist/templates.html +2 -2
  139. mage_ai/server/frontend_dist/terminal.html +2 -2
  140. mage_ai/server/frontend_dist/test.html +2 -2
  141. mage_ai/server/frontend_dist/triggers.html +2 -2
  142. mage_ai/server/frontend_dist/version-control.html +2 -2
  143. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  144. mage_ai/server/{frontend_dist/_next/static/vPsMu6Fi2zrHaf2fRXKRO → frontend_dist_base_path_template/_next/static/KLL5mirre9d7_ZeEpaw3s}/_buildManifest.js +1 -1
  145. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +1 -0
  146. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
  147. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-fa0792ddb88f4646.js +1 -0
  148. mage_ai/server/{frontend_dist/_next/static/chunks/4241-ccd0126f5750cc35.js → frontend_dist_base_path_template/_next/static/chunks/4241-4499461184ba0d23.js} +1 -1
  149. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5627-237a3de578538022.js +1 -0
  150. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
  151. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
  152. mage_ai/server/{frontend_dist/_next/static/chunks/7966-5c1786fb7e7a48f5.js → frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js} +1 -1
  153. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +1 -0
  154. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
  155. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-8bbfa0c19b5e4cb3.js +1 -0
  156. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +1 -0
  157. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-597b74828bf105db.js +1 -0
  158. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-a66b4c7641ae03eb.js → pipeline-runs-3edc6270c5b0e962.js} +1 -1
  159. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +1 -0
  160. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +1 -0
  161. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +1 -0
  162. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
  163. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-90abafc7ed61c582.js +1 -0
  164. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-1bdfda8edc9cf4a8.js +1 -0
  165. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
  166. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +1 -0
  167. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
  168. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +1 -0
  169. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-79a4cf66a623e667.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js} +1 -1
  170. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
  171. mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-7d38b2f7c3e918a1.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js} +1 -1
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9cba3211434a8966.js +1 -0
  173. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  174. mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
  175. mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
  176. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
  177. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
  178. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
  179. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
  180. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  181. mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
  182. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
  183. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
  184. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
  185. mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
  186. mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
  187. mage_ai/server/frontend_dist_base_path_template/oauth.html +3 -3
  188. mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
  189. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
  190. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  191. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
  192. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
  193. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  194. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
  195. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  196. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  197. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
  198. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
  199. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
  200. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
  201. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
  202. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  203. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
  204. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  205. mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
  206. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +2 -2
  207. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +2 -2
  208. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
  209. mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +2 -2
  210. mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +2 -2
  211. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
  212. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
  213. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
  214. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
  215. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
  216. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
  217. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
  218. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
  219. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  220. mage_ai/server/frontend_dist_base_path_template/sign-in.html +5 -5
  221. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
  222. mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
  223. mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
  224. mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
  225. mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
  226. mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
  227. mage_ai/server/scheduler_manager.py +7 -0
  228. mage_ai/server/server.py +12 -5
  229. mage_ai/server/websocket_server.py +1 -0
  230. mage_ai/services/k8s/job_manager.py +8 -0
  231. mage_ai/services/slack/slack.py +10 -1
  232. mage_ai/services/spark/spark.py +9 -2
  233. mage_ai/settings/backends.py +8 -8
  234. mage_ai/settings/keys/auth.py +2 -0
  235. mage_ai/settings/models/configuration_option.py +10 -9
  236. mage_ai/settings/server.py +1 -1
  237. mage_ai/shared/files.py +19 -1
  238. mage_ai/shared/path_fixer.py +3 -0
  239. mage_ai/streaming/sources/base.py +5 -0
  240. mage_ai/streaming/sources/influxdb.py +2 -0
  241. mage_ai/streaming/sources/kafka.py +2 -1
  242. mage_ai/streaming/sources/mongodb.py +4 -0
  243. mage_ai/tests/api/endpoints/mixins.py +10 -9
  244. mage_ai/tests/api/endpoints/test_seeds.py +24 -0
  245. mage_ai/tests/api/operations/test_sessions.py +53 -2
  246. mage_ai/tests/authentication/providers/test_okta.py +43 -0
  247. mage_ai/tests/data_preparation/models/block/dbt/test_block.py +2 -2
  248. mage_ai/tests/data_preparation/models/block/dbt/test_block_sql.py +1 -1
  249. mage_ai/tests/data_preparation/models/block/dbt/test_block_yaml.py +1 -1
  250. mage_ai/tests/data_preparation/models/test_block.py +2 -1
  251. mage_ai/tests/orchestration/db/models/test_oauth.py +3 -3
  252. mage_ai/tests/orchestration/queue/test_process_queue.py +1 -0
  253. mage_ai/tests/orchestration/test_pipeline_scheduler.py +2 -0
  254. mage_ai/tests/server/test_server.py +8 -4
  255. mage_ai/tests/settings/models/test_configuration_option.py +2 -2
  256. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/METADATA +6 -6
  257. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/RECORD +263 -259
  258. mage_ai/server/frontend_dist/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
  259. mage_ai/server/frontend_dist/_next/static/chunks/181-e61915415a976861.js +0 -1
  260. mage_ai/server/frontend_dist/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
  261. mage_ai/server/frontend_dist/_next/static/chunks/3548-13563a1ff815f922.js +0 -1
  262. mage_ai/server/frontend_dist/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
  263. mage_ai/server/frontend_dist/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
  264. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-1c1ffd928f5a00f7.js +0 -1
  265. mage_ai/server/frontend_dist/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +0 -1
  266. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-d3a5fd3119fdb1e4.js +0 -1
  267. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-42789d698d28a92f.js +0 -1
  268. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-d05040edba41b2ac.js +0 -1
  269. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +0 -1
  270. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-36377e679da2cd91.js +0 -1
  271. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1b688d61f8efe07a.js +0 -1
  272. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-ed3331d22d5cff7d.js +0 -1
  273. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-d94e48bad89ba1e0.js +0 -1
  274. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-f508c2f261297724.js +0 -1
  275. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js +0 -1
  276. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-6826000cdffc36b8.js +0 -1
  277. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
  278. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-dde29a463495cebb.js +0 -1
  279. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-ab98a7b3a678669e.js +0 -1
  280. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
  281. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/181-e61915415a976861.js +0 -1
  282. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
  283. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-13563a1ff815f922.js +0 -1
  284. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
  285. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
  286. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-1c1ffd928f5a00f7.js +0 -1
  287. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +0 -1
  288. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-d3a5fd3119fdb1e4.js +0 -1
  289. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-42789d698d28a92f.js +0 -1
  290. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-d05040edba41b2ac.js +0 -1
  291. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +0 -1
  292. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-36377e679da2cd91.js +0 -1
  293. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1b688d61f8efe07a.js +0 -1
  294. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-ed3331d22d5cff7d.js +0 -1
  295. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-d94e48bad89ba1e0.js +0 -1
  296. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-f508c2f261297724.js +0 -1
  297. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js +0 -1
  298. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-6826000cdffc36b8.js +0 -1
  299. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
  300. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-dde29a463495cebb.js +0 -1
  301. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-ab98a7b3a678669e.js +0 -1
  302. /mage_ai/server/frontend_dist/_next/static/{vPsMu6Fi2zrHaf2fRXKRO → _krrrgup_C-dPOpX36S8I}/_ssgManifest.js +0 -0
  303. /mage_ai/server/frontend_dist_base_path_template/_next/static/{khKiaJtwrslgMmp4YSa1f → KLL5mirre9d7_ZeEpaw3s}/_ssgManifest.js +0 -0
  304. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/LICENSE +0 -0
  305. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/WHEEL +0 -0
  306. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/entry_points.txt +0 -0
  307. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8662],{8955:function(e,n,t){"use strict";t.d(n,{G7:function(){return x},ZP:function(){return P},u$:function(){return m}});var r=t(75582),i=t(82394),u=t(26304),o=t(90299),l=t(9134),c=t(24138),s=t(38276),a=t(30160),d=t(75499),p=t(70515),f=t(16488),v=t(42122),h=t(28598),b=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var m=44,O={uuid:"Run details"},y={uuid:"Dependency tree"},x=[y,O];function P(e){var n=e.height,t=e.heightOffset,i=e.pipeline,g=e.selectedRun,P=e.selectedTab,Z=e.setSelectedTab,k=j({},(0,u.Z)(e,b));g?k.blockStatus=(0,f.IJ)(null===g||void 0===g?void 0:g.block_runs):k.noStatus=!0;var _=(0,v.Kn)(null===g||void 0===g?void 0:g.variables)?j({},null===g||void 0===g?void 0:g.variables):(null===g||void 0===g?void 0:g.variables)||{},w=null===g||void 0===g?void 0:g.event_variables;if(w&&(0,v.Kn)(w)&&!(0,v.Qr)(w))if((0,v.Kn)(_)&&_.hasOwnProperty("event")){var T=(0,v.Kn)(_.event)?_.event:{};_.event=j(j({},T),w)}else _.event=j({},w);var E=[];_&&JSON.stringify(_,null,2).split("\n").forEach((function(e){E.push(" ".concat(e))}));var S=g&&[["Run ID",null===g||void 0===g?void 0:g.id],["Variables",(0,h.jsx)(l.Z,{language:"json",small:!0,source:E.join("\n")},"variable_value")]],D=g&&(0,h.jsx)(s.Z,{pb:p.cd,px:p.cd,children:(0,h.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:S.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],u=t[1];return[(0,h.jsx)(a.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,h.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:u},"val_".concat(n))]})),uuid:"LogDetail"})}),R=P&&Z;return(0,h.jsxs)(h.Fragment,{children:[R&&(0,h.jsx)(o.Z,{onClickTab:Z,selectedTabUUID:null===P||void 0===P?void 0:P.uuid,tabs:x,underlineStyle:!0}),(!R||y.uuid===(null===P||void 0===P?void 0:P.uuid))&&(0,h.jsx)(c.ZP,j(j({},k),{},{height:n,heightOffset:(t||0)+(R?m:0),pipeline:i})),O.uuid===(null===P||void 0===P?void 0:P.uuid)&&D]})}},16488:function(e,n,t){"use strict";t.d(n,{IJ:function(){return h},M8:function(){return k},Uc:function(){return O},XM:function(){return Z},_U:function(){return v},eI:function(){return m},gU:function(){return x},lO:function(){return S},ri:function(){return g},tL:function(){return y},vJ:function(){return P},xH:function(){return j}});var r,i=t(82394),u=t(92083),o=t.n(u),l=t(3917),c=t(4383),s=t(30229),a=t(42122),d=t(86735);function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var v=function(e){return!!e&&!Object.values(s.U5).includes(e)};function h(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,u=n.started_at,l=n.status,c=null;u&&r&&(c=o()(r).valueOf()-o()(u).valueOf());return f(f({},e),{},(0,i.Z)({},t,{runtime:c,status:l}))}),{})}var b,g=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:s.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:s.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:s.Xm.API}];return e?n.slice(0,1):n};function j(e){var n=(0,a.gR)(e,[s.gm.INTERVAL,s.gm.TYPE]),t=e[s.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var r=e[s.gm.TYPE];return r&&(n["schedule_type[]"]=r),n}function m(e){return e?new Date(o()(e).valueOf()):null}function O(e,n){return n?(0,l.XG)(e,n):function(e){if("string"!==typeof e)return e;var n=e.split("+")[0];return o()(m(n)).format(l.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(b||(b={}));var y=(r={},(0,i.Z)(r,b.DAY,86400),(0,i.Z)(r,b.HOUR,3600),(0,i.Z)(r,b.MINUTE,60),(0,i.Z)(r,b.SECOND,1),r);function x(e){var n=b.SECOND,t=e;return e%86400===0?(t/=86400,n=b.DAY):e%3600===0?(t/=3600,n=b.HOUR):e%60===0&&(t/=60,n=b.MINUTE),{time:t,unit:n}}function P(e,n){return e*y[n]}function Z(e,n,t){var r,i=o()(e);return i.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),i.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),i.set("second",0),r=i.format(l.TD),null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(r=i.format(l.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,l.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),r}function k(e){var n,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",i=!0;return i&&(t?r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(r="".concat(r,"/").concat(e.token)))),i&&(n=window.location.port)&&(r=r.replace(n,c.QT)),r}function _(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var r=t.indexOf(e),i=0;if(n<0)for(var u=0;u>n;u--)0===r?(r=t.length-1,i-=1):r-=1;else if(n>0)for(var o=0;o<n;o++)r===t.length-1?(r=0,i+=1):r+=1;var l="number"===typeof t[r]?t[r]:e;return{additionalOffset:i,cronValue:String(l)}}(+e,n,t)}var w=(0,d.m5)(60),T=(0,d.m5)(24),E=(0,l.Cs)();function S(e,n){if(!e)return e;var t=o()().local().format("Z"),r=t.split(":"),i="-"===t[0],u=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),l=Number(r[1]);(i&&!n||!i&&n)&&(u=-u,l=-l);var c=e.split(" "),s=c[0],a=c[1],d=c[2],p=_(s,l,w),f=_(a,u+p.additionalOffset,T);if(c[0]=p.cronValue,c[1]=f.cronValue,0!==(null===f||void 0===f?void 0:f.additionalOffset)){var v=_(d,f.additionalOffset,E);c[2]=v.cronValue}return c.join(" ")}},55072:function(e,n,t){"use strict";t.d(n,{Et:function(){return p},Q:function(){return d}});t(82684);var r=t(71180),i=t(55485),u=t(38276),o=t(31748),l=t(72473),c=t(79633),s=t(70515),a=t(28598),d=30,p=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,p=e.totalPages,f=[],v=t;if(v>p)f=Array.from({length:p},(function(e,n){return n}));else{var h=Math.floor(v/2),b=n-h;n+h>=p?(b=p-v+2,v-=2):n-h<=0?(b=0,v-=2):(v-=4,b=n-Math.floor(v/2)),f=Array.from({length:v},(function(e,n){return n+b}))}return(0,a.jsx)(a.Fragment,{children:p>0&&(0,a.jsxs)(i.ZP,{alignItems:"center",children:[(0,a.jsx)(r.ZP,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,a.jsx)(l.PaginateArrowLeft,{size:1.5*s.iI,stroke:o.Av})}),!f.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Z,{ml:1,children:(0,a.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!f.includes(1)&&(0,a.jsx)(u.Z,{ml:1,children:(0,a.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),f.map((function(e){return(0,a.jsx)(u.Z,{ml:1,children:(0,a.jsx)(r.ZP,{backgroundColor:e===n&&c.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!f.includes(p-1)&&(0,a.jsxs)(a.Fragment,{children:[!f.includes(p-2)&&(0,a.jsx)(u.Z,{ml:1,children:(0,a.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,a.jsx)(u.Z,{ml:1,children:(0,a.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,a.jsx)(u.Z,{ml:1}),(0,a.jsx)(r.ZP,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,a.jsx)(l.PaginateArrowRight,{size:1.5*s.iI,stroke:o.Av})})]})})}},14532:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return re}});var r=t(77837),i=t(75582),u=t(82394),o=t(38860),l=t.n(o),c=t(82684),s=t(69864),a=t(34376),d=t(23192),p=t(71180),f=t(15338),v=t(97618),h=t(55485),b=t(85854),g=t(55072),j=t(75457),m=t(44265),O=t(57653),y=t(93808),x=t(38276),P=t(4190),Z=t(30160),k=t(35686),_=t(21831),w=t(26304),T=t(90299),E=t(93859),S=t(24138),D=t(48339),R=t(46684),I=t(70515),N=t(66909),C=t(8955),M=t(16488),U=t(81728),A=t(86735),B=t(28598),L=["blockRuns","blocksOverride","columns","dataType","height","heightOffset","loadingData","outputs","pipeline","renderColumnHeader","rows","selectedRun","selectedTab","setSelectedTab","textData"];function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function G(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var V={uuid:"Dependency tree"},H={uuid:"Block output"},X=[H,V];var J=t(28795),Y=t(81655),z=t(3917),q=t(72619),$=t(95924),K=t(69419),Q=t(70320);function W(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ee(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?W(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ne=100;function te(e){var n=e.pipeline,t=e.pipelineRun,r=(0,Q.qB)(),u=(0,a.useRouter)(),o=(0,K.iV)(),l=null!==o&&void 0!==o&&o.page?o.page:0,y=(0,c.useState)(null),F=y[0],W=y[1],te=(0,c.useState)(X[0]),re=te[0],ie=te[1],ue=(0,c.useState)(null),oe=ue[0],le=ue[1],ce=(0,c.useState)(null),se=ce[0],ae=ce[1],de=(0,c.useMemo)((function(){return!!se&&se!==m.VO.RUNNING}),[se]),pe=n.uuid,fe=k.ZP.pipelines.detail(pe,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,ve=(0,c.useMemo)((function(){return ee(ee({},null===fe||void 0===fe?void 0:fe.pipeline),{},{uuid:pe})}),[fe,pe]),he=k.ZP.pipeline_runs.detail(t.id,{_format:"with_basic_details"},{refreshInterval:de?null:3e3,revalidateOnFocus:!0}),be=he.data,ge=he.mutate,je=(0,c.useMemo)((function(){return(null===be||void 0===be?void 0:be.pipeline_run)||{}}),[be]),me=je.execution_date,Oe=je.id,ye=je.status,xe={_limit:ne,_offset:l*ne,pipeline_run_id:Oe},Pe=null===o||void 0===o?void 0:o[Y.lG.SORT_COL_IDX],Ze=null===o||void 0===o?void 0:o[Y.lG.SORT_DIRECTION];if(Pe){var ke=d.fi[Pe],_e=Ze||Y.sh.ASC;xe.order_by="".concat(ke,"%20").concat(_e)}(0,c.useEffect)((function(){se!==ye&&ae(ye)}),[se,ye]);var we=k.ZP.block_runs.list(xe,{refreshInterval:de?null:5e3},{pauseFetch:"undefined"===typeof Oe||null===Oe}),Te=we.data,Ee=we.mutate,Se=(0,c.useMemo)((function(){return(null===Te||void 0===Te?void 0:Te.block_runs)||[]}),[Te]),De=Se.map((function(e){return e.block_uuid})),Re=(0,c.useMemo)((function(){return De}),[De]),Ie=k.ZP.blocks.pipeline_runs.list(null===t||void 0===t?void 0:t.id,{_limit:ne,block_uuid:Re},{refreshInterval:de?null:5e3}).data,Ne=(0,s.Db)(k.ZP.pipeline_runs.useUpdate(Oe),{onSuccess:function(e){return(0,q.wD)(e,{callback:function(e){e.pipeline_run;W(null),null===Ee||void 0===Ee||Ee(),ge()},onErrorCallback:function(e,n){return le({errors:n,response:e})}})}}),Ce=(0,i.Z)(Ne,2),Me=Ce[0],Ue=Ce[1].isLoading,Ae=k.ZP.outputs.block_runs.list(null===F||void 0===F?void 0:F.id),Be=Ae.data,Le=Ae.loading;(0,c.useEffect)((function(){F||(null===re||void 0===re?void 0:re.uuid)!==H.uuid||ie(V)}),[F,null===re||void 0===re?void 0:re.uuid]);var Fe=(0,c.useMemo)((function(){return(0,B.jsx)(d.ZP,{blockRuns:Se,onClickRow:function(e){W((function(n){var t=Se[e],r=(null===n||void 0===n?void 0:n.id)!==t.id?t:null;return r&&ie((function(e){return e!==H?H:e})),r}))},pipeline:ve,selectedRun:F,setErrors:le,sortableColumnIndexes:d.lG})}),[Se,ve,F]),Ge=(null===ve||void 0===ve?void 0:ve.type)!==O.qL.STREAMING&&se&&se!==m.VO.COMPLETED,Ve=((null===ve||void 0===ve?void 0:ve.type)===O.qL.PYTHON||(null===ve||void 0===ve?void 0:ve.type)===O.qL.INTEGRATION)&&F&&m.Az.includes(se),He=(0,c.useMemo)((function(){var e;return(null===Te||void 0===Te||null===(e=Te.metadata)||void 0===e?void 0:e.count)||[]}),[Te]),Xe=(0,c.useMemo)((function(){return(0,B.jsx)(x.Z,{p:2,children:(0,B.jsx)(g.ZP,{maxPages:g.Et,onUpdate:function(e){var n=Number(e),t=ee(ee({},o),{},{page:n>=0?n:0});W(null),u.push("/pipelines/[pipeline]/runs/[run]","/pipelines/".concat(pe,"/runs/").concat(Oe,"?").concat((0,K.uM)(t)))},page:Number(l),totalPages:Math.ceil(He/ne)})})}),[l,Oe,pe,o,u,He]),Je=(0,c.useCallback)((function(e){return function(e){var n=e.blockRuns,t=e.blocksOverride,r=(e.columns,e.dataType,e.height),u=e.heightOffset,o=e.loadingData,l=e.outputs,c=e.pipeline,s=e.renderColumnHeader,a=(e.rows,e.selectedRun),d=e.selectedTab,p=e.setSelectedTab,v=(e.textData,G({},(0,w.Z)(e,L)));v.blockStatus=(0,M.IJ)(n);var b=[],g=[],j=(0,U.bH)();if(!o){var m,O={};null===l||void 0===l||l.forEach((function(e){var n=e.type;O[n]||(O[n]={outputs:[],priority:Object.keys(O).length}),O[n].outputs.push(e)})),null===(m=(0,A.YC)(Object.entries(O),(function(e){var n=(0,i.Z)(e,2);return n[0],n[1].priority})))||void 0===m||m.forEach((function(e,n){var t=(0,i.Z)(e,2),o=t[0],l=t[1].outputs,c=[];null===l||void 0===l||l.forEach((function(e,t){var i,l=e.sample_data,a=e.text_data,d=e.type,p=(0,B.jsx)(x.Z,{ml:2,children:(0,B.jsx)(Z.ZP,{children:"This block run has no output."})},"output-empty-".concat(n,"-").concat(t));if(d===D.Gi.TABLE){var f=((null===l||void 0===l?void 0:l.columns)||[]).slice(0,40),v=(null===l||void 0===l?void 0:l.rows)||[];i=v&&(null===v||void 0===v?void 0:v.length)>=1?(0,B.jsx)(E.Z,{columnHeaderHeight:s?N.Eh:0,columns:f,height:r-u-90,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,renderColumnHeader:s,rows:v},"output-table-".concat(n,"-").concat(t)):p}else{var h=(0,U.Pb)(a)?JSON.stringify(JSON.parse(a),null,2):a;i="undefined"!==typeof a&&null!==a?(0,B.jsx)(x.Z,{ml:2,children:(0,B.jsx)(Z.ZP,{monospace:!0,children:(0,B.jsx)("pre",{children:h})})},"output-text-".concat(n,"-").concat(t)):p}var m=j[n];D.Gi.TEXT===o?(c.push(i),0===t&&g.push({uuid:"Block output ".concat(t+1).concat(m)})):(b.push(i),g.push({uuid:"Block output ".concat(t+1).concat(m)}))})),D.Gi.TEXT===o&&b.push(c)}))}var y=b,k=g,F=X;(null===k||void 0===k?void 0:k.length)>=2&&(F=[H].concat((0,_.Z)(k.slice(1)),[V]));var J=d&&p,Y=y[F.findIndex((function(e){return e.uuid===(null===d||void 0===d?void 0:d.uuid)}))];return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{style:{position:"fixed",top:R.Mz},children:J&&(0,B.jsx)(B.Fragment,{children:(0,B.jsx)(x.Z,{py:0,children:(0,B.jsx)(T.Z,{onClickTab:p,regularSizeText:!0,selectedTabUUID:null===d||void 0===d?void 0:d.uuid,tabs:a?F:[V],underlineStyle:!0})})})}),(0,B.jsxs)("div",{style:{position:"relative",top:C.u$},children:[J&&(0,B.jsx)(f.Z,{light:!0}),(!a||V.uuid===(null===d||void 0===d?void 0:d.uuid))&&(0,B.jsx)(S.ZP,G(G({},v),{},{blocksOverride:t,enablePorts:!1,height:r,heightOffset:(u||0)+(J?C.u$+1:0),pipeline:c})),a&&d&&V.uuid!==(null===d||void 0===d?void 0:d.uuid)&&(0,B.jsxs)(B.Fragment,{children:[o&&(0,B.jsx)(x.Z,{mt:2,children:(0,B.jsx)(h.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,B.jsx)(P.Z,{color:"white",large:!0})})}),!o&&(0,B.jsx)(x.Z,{py:I.cd,children:Y})]})]})]})}(ee(ee({},e),{},{blockRuns:Se,blocksOverride:He<=ne&&(null===Ie||void 0===Ie?void 0:Ie.blocks),loadingData:Le,outputs:null===Be||void 0===Be?void 0:Be.outputs,selectedRun:F,selectedTab:re,setSelectedTab:ie,showDynamicBlocks:!0}))}),[Se,Ie,Be,Le,F,re,ie,He]);return(0,B.jsxs)(j.Z,{breadcrumbs:[{label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(pe,"/runs"),href:"/pipelines/[pipeline]/runs"}},{label:function(){return r?(0,z.XG)(me,r):me}}],buildSidekick:Je,errors:oe,pageName:J.M.RUNS,pipeline:ve,setErrors:le,subheader:(Ge||Ve)&&(0,B.jsxs)(h.ZP,{alignItems:"center",children:[m.BF.includes(se)&&(0,B.jsxs)(v.Z,{children:[(0,B.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline is running"}),(0,B.jsx)(x.Z,{mr:1}),(0,B.jsx)(P.Z,{inverted:!0}),(0,B.jsx)(x.Z,{mr:2})]}),Ge&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(p.ZP,{danger:!0,loading:Ue,onClick:function(e){(0,$.j)(e),Me({pipeline_run:{pipeline_run_action:"retry_blocks"}})},outline:!0,children:"Retry incomplete blocks"}),(0,B.jsx)(x.Z,{mr:2})]}),Ve&&(0,B.jsxs)(p.ZP,{loading:Ue,onClick:function(e){(0,$.j)(e),Me({pipeline_run:{from_block_uuid:F.block_uuid,pipeline_run_action:"retry_blocks"}})},outline:!0,primary:!0,children:["Retry from selected block (",F.block_uuid,")"]})]}),title:function(e){var n=e.name;return"".concat(n," runs")},uuid:"pipelines/detail/".concat(J.M.RUNS),children:[(0,B.jsx)(x.Z,{mt:I.cd,px:I.cd,children:(0,B.jsx)(b.Z,{level:5,children:"Block runs"})}),(0,B.jsx)(f.Z,{light:!0,mt:I.cd,short:!0}),Fe,Xe]})}te.getInitialProps=function(){var e=(0,r.Z)(l().mark((function e(n){var t,r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query,r=t.pipeline,i=t.run,e.abrupt("return",{pipeline:{uuid:r},pipelineRun:{id:i}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var re=(0,y.Z)(te)},39525:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs/[run]",function(){return t(14532)}])}},function(e){e.O(0,[125,9161,2631,1557,3782,8095,9265,9774,2888,179],(function(){return n=39525,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8170],{81334:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var r=t(82394),i=t(82684),o=t(27277),u=t(31882),l=t(38276),c=t(48381),s=t(30160),a=t(17488),d=t(25976),f=t(44897),p=t(42631),v=t(47041),g=t(70515),h=d.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-suwkha-0"})([""," border-radius:","px;max-height:","px;overflow:auto;position:absolute;width:100%;z-index:1;"," ",""],v.w5,p.BG,40*g.iI,(function(e){return"\n background-color: ".concat((e.theme.background||f.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||f.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset-.5*g.iI,"px;\n ")})),m=d.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-suwkha-1"})(["padding:","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],.5*g.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||f.Z.interactive).hoverBackground,";\n ")})),y=t(39643),b=t(95924),_=t(86735),j=t(44688),x=t(28598);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(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,r.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 w=function(e){var n,t=e.removeTag,r=e.selectTag,d=e.selectedTags,f=void 0===d?[]:d,p=e.tags,v=void 0===p?[]:p,g=e.uuid,O=(0,i.useRef)(null),w=(0,i.useState)(!1),P=w[0],k=w[1],C=(0,i.useState)(null),S=C[0],E=C[1],N=(0,i.useMemo)((function(){return(0,_.YC)(v||[],"uuid")}),[v]),T=(0,i.useMemo)((function(){return null===N||void 0===N?void 0:N.map((function(e){return{itemObject:e,searchQueries:[e.uuid],value:e.uuid}}))}),[N]),D=(0,i.useMemo)((function(){return(null===S||void 0===S?void 0:S.length)>=1?T.concat({itemObject:{uuid:S},searchQueries:[S],value:"Add tag: ".concat(S)}):T}),[T,S]),R=(0,j.y)(),M=R.registerOnKeyDown,I=R.unregisterOnKeyDown;return(0,i.useEffect)((function(){return function(){return I(g)}}),[I,g]),null===M||void 0===M||M(g,(function(e,n){var t;P&&n[y.vP]&&(k(!1),null===O||void 0===O||null===(t=O.current)||void 0===t||t.blur())}),[P,O]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(c.Z,{onClickTag:t,tags:f}),(0,x.jsxs)(l.Z,{mt:1,style:{position:"relative"},children:[(0,x.jsx)(a.Z,{onBlur:function(){return setTimeout((function(){return k(!1)}),150)},onChange:function(e){return E(e.target.value)},onFocus:function(){return k(!0)},ref:O,value:S||""}),(0,x.jsx)(h,{topOffset:null===O||void 0===O||null===(n=O.current)||void 0===n?void 0:n.getBoundingClientRect().height,children:(0,x.jsx)(o.Z,{itemGroups:[{items:P?D:[],renderItem:function(e,n){var t=e.value;return(0,x.jsx)(m,Z(Z({},n),{},{onClick:function(e){var t;(0,b.j)(e),null===n||void 0===n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:(0,x.jsx)(u.Z,{small:!0,children:(0,x.jsx)(s.ZP,{children:t})})}))}}],onSelectItem:function(e){var n=e.itemObject;null===r||void 0===r||r(n),E(null)},searchQuery:S,uuid:g})})]})]})}},68781:function(e,n,t){"use strict";var r;t.d(n,{R:function(){return i}}),function(e){e.AZURE_CONTAINER_INSTANCE="azure_container_instance",e.ECS="ecs",e.GCP_CLOUD_RUN="gcp_cloud_run",e.K8S="k8s",e.LOCAL_PYTHON="local_python",e.PYSPARK="pyspark"}(r||(r={}));var i=[r.AZURE_CONTAINER_INSTANCE,r.ECS,r.GCP_CLOUD_RUN,r.K8S,r.LOCAL_PYTHON,r.PYSPARK]},37003:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return K}});var r=t(77837),i=t(75582),o=t(82394),u=t(38860),l=t.n(u),c=t(82684),s=t(34376),a=t(75457),d=t(93808),f=t(71180),p=t(70652),v=t(55485),g=t(85854),h=t(48670),m=t(44085),y=t(88543),b=t(38276),_=t(81334),j=t(30160),x=t(17488),O=t(35686),Z=t(98464),w=t(77417),P=t(68781),k=t(78419),C=t(70515),S=t(53808),E=t(42122),N=t(81728),T=t(86735),D=t(28598);function R(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I=function(e){var n,t,r,i,u,l,s,a=e.isPipelineUpdating,d=e.pipeline,R=e.updatePipeline,I=(0,w.Z)().project,A=(0,c.useRef)(null),U=(0,c.useRef)(null),H=null===d||void 0===d?void 0:d.uuid,F=(0,c.useMemo)((function(){return(null===d||void 0===d?void 0:d.blocks)||[]}),[d]),L=(0,c.useState)(!1),G=L[0],K=L[1],Y=(0,c.useState)(!1),z=Y[0],B=Y[1],W=(0,c.useState)(null),Q=W[0],X=W[1],q=(0,Z.Z)(d);(0,c.useEffect)((function(){(0,E.Xy)(d,q)||X(d)}),[d,q]);var J=(0,c.useCallback)((function(e){K(!0),X(e)}),[]),$="".concat(k.g6,"_").concat(H),V=(0,c.useState)({}),ee=V[0],ne=V[1],te="".concat(k.vF,"_").concat(H),re=(0,c.useState)(!1),ie=re[0],oe=re[1],ue=(0,c.useCallback)((function(e){ne((function(n){var t=e(n);return(0,S.t8)($,JSON.stringify(t)),t}))}),[$,ne]),le=(0,c.useCallback)((function(e){oe((function(n){var t=e(n);return(0,S.t8)(te,t),t}))}),[te,oe]);(0,c.useEffect)((function(){var e=(0,S.U2)($);e&&(0,N.Pb)(e)&&ne(JSON.parse(e))}),[$,ne]),(0,c.useEffect)((function(){var e=(0,S.U2)(te);e&&oe(e)}),[te,oe]);var ce=(0,c.useMemo)((function(){return null===Q||void 0===Q?void 0:Q.executor_type}),[Q]);(0,c.useEffect)((function(){z||!ce||P.R.find((function(e){return e===ce}))||B(!0)}),[z,ce]);var se=(0,c.useMemo)((function(){return(null===F||void 0===F?void 0:F.filter((function(e){var n=e.uuid;return!(null===ee||void 0===ee||!ee[n])}))).length===F.length}),[F,ee]),ae=(0,c.useMemo)((function(){return!(null!==F&&void 0!==F&&F.length)}),[F]),de=(0,c.useMemo)((function(){return(null===Q||void 0===Q?void 0:Q.tags)||[]}),[Q]),fe=O.ZP.tags.list().data,pe=(0,c.useMemo)((function(){return((null===fe||void 0===fe?void 0:fe.tags)||[]).filter((function(e){var n=e.uuid;return!de.includes(n)}))}),[fe,de]),ve=(0,c.useMemo)((function(){var e;return null===I||void 0===I||null===(e=I.pipelines)||void 0===e?void 0:e.settings}),[I]),ge=(0,c.useMemo)((function(){var e,n,t;return(null===ve||void 0===ve||null===(e=ve.triggers)||void 0===e?void 0:e.save_in_code_automatically)&&"undefined"===typeof(null===Q||void 0===Q||null===(n=Q.settings)||void 0===n||null===(t=n.triggers)||void 0===t?void 0:t.save_in_code_automatically)}),[Q,ve]);return(0,D.jsxs)(b.Z,{p:C.cd,children:[(0,D.jsxs)(y.Z,{title:"Details",children:[(0,D.jsx)(y.S,{invalid:G&&!(null!==Q&&void 0!==Q&&Q.name),textInput:{onChange:function(e){return J((function(n){return M(M({},n),{},{name:e.target.value})}))},value:null===Q||void 0===Q?void 0:Q.name},title:"Pipeline name"}),(0,D.jsx)(y.S,{description:"When enabled, this setting allows sharing of objects and memory space across blocks within a single pipeline.",title:"Run pipeline in a single process",toggleSwitch:{checked:!(null===Q||void 0===Q||!Q.run_pipeline_in_one_process),onCheck:function(e){return J((function(n){return M(M({},n),{},{run_pipeline_in_one_process:e(null===n||void 0===n?void 0:n.run_pipeline_in_one_process)})}))}}}),(0,D.jsx)(y.S,{description:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(j.ZP,{muted:!0,small:!0,children:"Every time a trigger is created or updated in this pipeline, it\u2019ll be automatically be persisted it in code."}),(null===ve||void 0===ve||null===(n=ve.triggers)||void 0===n?void 0:n.save_in_code_automatically)&&(0,D.jsx)(j.ZP,{small:!0,warning:!0,children:"This settings is enabled at the project level. Changing the value here will only affect this pipeline."})]}),title:"Save triggers in code automatically",toggleSwitch:{checked:ge||!(null===Q||void 0===Q||null===(t=Q.settings)||void 0===t||null===(r=t.triggers)||void 0===r||!r.save_in_code_automatically),onCheck:function(e){return J((function(n){var t,r,i;return M(M({},n),{},{settings:M(M({},null===n||void 0===n?void 0:n.settings),{},{triggers:M(M({},null===n||void 0===n||null===(t=n.settings)||void 0===t?void 0:t.triggers),{},{save_in_code_automatically:e(ge||(null===n||void 0===n||null===(r=n.settings)||void 0===r||null===(i=r.triggers)||void 0===i?void 0:i.save_in_code_automatically))})})})}))}}})]}),(0,D.jsxs)(b.Z,{mt:C.HN,children:[(0,D.jsx)(g.Z,{children:"Executor type"}),(0,D.jsxs)(j.ZP,{muted:!0,children:["For more information on this setting, please read the ",(0,D.jsx)(h.Z,{href:"https://docs.mage.ai/production/configuring-production-settings/compute-resource#2-set-executor-type-and-customize-the-compute-resource-of-the-mage-executor",openNewWindow:!0,children:"documentation"}),"."]}),(0,D.jsxs)(b.Z,{mt:1,children:[!z&&(0,D.jsx)(m.Z,{label:"Executor type",onChange:function(e){return J((function(n){return M(M({},n),{},{executor_type:e.target.value})}))},primary:!0,ref:A,value:(null===Q||void 0===Q?void 0:Q.executor_type)||"",children:P.R.map((function(e){return(0,D.jsx)("option",{value:e,children:e},e)}))}),z&&(0,D.jsx)(x.Z,{label:"Executor type",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{executor_type:e.target.value})}))},ref:U,setContentOnMount:!0,value:(null===Q||void 0===Q?void 0:Q.executor_type)||""}),(0,D.jsx)(b.Z,{mt:1,children:(0,D.jsx)(h.Z,{muted:!0,onClick:function(){z?(J((function(e){return M(M({},e),{},{executor_type:null===d||void 0===d?void 0:d.executor_type})})),setTimeout((function(){var e;return null===A||void 0===A||null===(e=A.current)||void 0===e?void 0:e.focus()}),1)):setTimeout((function(){var e;return null===U||void 0===U||null===(e=U.current)||void 0===e?void 0:e.focus()}),1),B(!z)},preventDefault:!0,small:!0,children:z?"Select a preset executor type":"Enter a custom executor type"})})]})]}),(0,D.jsxs)(b.Z,{mt:C.HN,children:[(0,D.jsx)(g.Z,{children:"Retry configuration"}),(0,D.jsxs)(j.ZP,{muted:!0,children:["For more information on this setting, please read the ",(0,D.jsx)(h.Z,{href:"https://docs.mage.ai/orchestration/pipeline-runs/retrying-block-runs",openNewWindow:!0,children:"documentation"}),"."]}),(0,D.jsx)(b.Z,{mt:1,children:(0,D.jsxs)(v.ZP,{children:[(0,D.jsx)(x.Z,{label:"Retries",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{retry_config:M(M({},null===n||void 0===n?void 0:n.retry_config),{},{retries:"undefined"!==typeof e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null===Q||void 0===Q||null===(i=Q.retry_config)||void 0===i?void 0:i.retries)||""}),(0,D.jsx)(b.Z,{mr:1}),(0,D.jsx)(x.Z,{label:"Delay",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{retry_config:M(M({},null===n||void 0===n?void 0:n.retry_config),{},{delay:"undefined"!==typeof e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null===Q||void 0===Q||null===(u=Q.retry_config)||void 0===u?void 0:u.delay)||""}),(0,D.jsx)(b.Z,{mr:1}),(0,D.jsx)(x.Z,{label:"Max delay",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{retry_config:M(M({},null===n||void 0===n?void 0:n.retry_config),{},{max_delay:"undefined"!==typeof e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null===Q||void 0===Q||null===(l=Q.retry_config)||void 0===l?void 0:l.max_delay)||""}),(0,D.jsx)(b.Z,{mr:1}),(0,D.jsx)(p.Z,{checked:!(null===Q||void 0===Q||null===(s=Q.retry_config)||void 0===s||!s.exponential_backoff),label:"Exponential backoff",onClick:function(){return J((function(e){var n;return M(M({},e),{},{retry_config:M(M({},null===e||void 0===e?void 0:e.retry_config),{},{exponential_backoff:!(null!==e&&void 0!==e&&null!==(n=e.retry_config)&&void 0!==n&&n.exponential_backoff)})})}))}})]})})]}),(0,D.jsxs)(b.Z,{mt:C.HN,children:[(0,D.jsx)(g.Z,{children:"Tags"}),(0,D.jsx)(b.Z,{mt:1,children:(0,D.jsx)(_.Z,{removeTag:function(e){J((function(n){return M(M({},n),{},{tags:de.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){J((function(n){return M(M({},n),{},{tags:(0,T.$C)(e.uuid,de,(function(n){return n===e.uuid}))})}))},selectedTags:null===de||void 0===de?void 0:de.map((function(e){return{uuid:e}})),tags:pe,uuid:"TagsAutocompleteInputField-".concat(null===d||void 0===d?void 0:d.uuid)})})]}),(0,D.jsx)(b.Z,{mt:C.HN,children:(0,D.jsx)(v.ZP,{children:(0,D.jsx)(f.ZP,{disabled:!G,loading:a,onClick:function(){return R({executor_type:null===Q||void 0===Q?void 0:Q.executor_type,name:null===Q||void 0===Q?void 0:Q.name,retry_config:null===Q||void 0===Q?void 0:Q.retry_config,run_pipeline_in_one_process:null===Q||void 0===Q?void 0:Q.run_pipeline_in_one_process,settings:null===Q||void 0===Q?void 0:Q.settings,tags:null===Q||void 0===Q?void 0:Q.tags}).then((function(){return K(!1)}))},primary:!0,children:"Save pipeline settings"})})}),(0,D.jsx)(b.Z,{mt:C.HN,children:(0,D.jsx)(p.Z,{checked:se&&!ae,disabled:ae,label:"Hide all blocks in notebook",onClick:function(){return ue((function(){return se?{}:null===F||void 0===F?void 0:F.reduce((function(e,n){var t=n.uuid;return M(M({},e),{},(0,o.Z)({},t,!0))}),{})}))}})}),(0,D.jsx)(b.Z,{mt:C.Mq,children:(0,D.jsx)(p.Z,{checked:ie,label:"When running a block while editing a pipeline, output the block messages to the logs",onClick:function(){return le((function(e){return!e}))}})})]})},A=t(28795),U=t(69864),H=t(72619);function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function L(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function G(e){var n=e.pipeline,t=(0,s.useRouter)(),r=(0,c.useState)(null),o=r[0],u=r[1],l=null===n||void 0===n?void 0:n.uuid,d=O.ZP.pipelines.detail(l).data,f=L(L({},null===d||void 0===d?void 0:d.pipeline),n),p=(0,U.Db)(O.ZP.pipelines.useUpdate(l,{update_content:!0}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){if(null!==e&&void 0!==e&&e.pipeline){var n=e.pipeline.uuid;l!==n&&(window.location.href="".concat(t.basePath,"/pipelines/").concat(n,"/settings"))}},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),v=(0,i.Z)(p,2),g=v[0],h=v[1].isLoading;return(0,D.jsx)(a.Z,{breadcrumbs:[{label:function(){return"Settings"}}],errors:o,pageName:A.M.SETTINGS,pipeline:f,setErrors:u,title:function(e){var n=e.name;return"".concat(n," settings")},uuid:"".concat(A.M.SETTINGS,"_").concat(l),children:f&&(0,D.jsx)(I,{isPipelineUpdating:h,pipeline:f,updatePipeline:function(e){return g({pipeline:e})}})})}G.getInitialProps=function(){var e=(0,r.Z)(l().mark((function e(n){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var K=(0,d.Z)(G)},59606:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/settings",function(){return t(37003)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},13692:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(61049);function i(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,r.Z)(e,n)}},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[1557,3782,9774,2888,179],(function(){return n=59606,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{16488:function(n,e,t){"use strict";t.d(e,{IJ:function(){return p},M8:function(){return P},Uc:function(){return Z},XM:function(){return _},_U:function(){return m},eI:function(){return x},gU:function(){return O},lO:function(){return E},ri:function(){return b},tL:function(){return g},vJ:function(){return y},xH:function(){return j}});var r,o=t(82394),i=t(92083),l=t.n(i),u=t(3917),c=t(4383),s=t(30229),d=t(42122),a=t(86735);function f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function v(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var m=function(n){return!!n&&!Object.values(s.U5).includes(n)};function p(n){return null===n||void 0===n?void 0:n.reduce((function(n,e){var t=e.block_uuid,r=e.completed_at,i=e.started_at,u=e.status,c=null;i&&r&&(c=l()(r).valueOf()-l()(i).valueOf());return v(v({},n),{},(0,o.Z)({},t,{runtime:c,status:u}))}),{})}var h,b=function(n){var e=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:s.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:s.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:s.Xm.API}];return n?e.slice(0,1):e};function j(n){var e=(0,d.gR)(n,[s.gm.INTERVAL,s.gm.TYPE]),t=n[s.gm.INTERVAL];t&&(e["schedule_interval[]"]=encodeURIComponent(t));var r=n[s.gm.TYPE];return r&&(e["schedule_type[]"]=r),e}function x(n){return n?new Date(l()(n).valueOf()):null}function Z(n,e){return e?(0,u.XG)(n,e):function(n){if("string"!==typeof n)return n;var e=n.split("+")[0];return l()(x(e)).format(u.Nx)}(n)}!function(n){n.DAY="day",n.HOUR="hour",n.MINUTE="minute",n.SECOND="second"}(h||(h={}));var g=(r={},(0,o.Z)(r,h.DAY,86400),(0,o.Z)(r,h.HOUR,3600),(0,o.Z)(r,h.MINUTE,60),(0,o.Z)(r,h.SECOND,1),r);function O(n){var e=h.SECOND,t=n;return n%86400===0?(t/=86400,e=h.DAY):n%3600===0?(t/=3600,e=h.HOUR):n%60===0&&(t/=60,e=h.MINUTE),{time:t,unit:e}}function y(n,e){return n*g[e]}function _(n,e,t){var r,o=l()(n);return o.set("hour",+(null===e||void 0===e?void 0:e.hour)||0),o.set("minute",+(null===e||void 0===e?void 0:e.minute)||0),o.set("second",0),r=o.format(u.TD),null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(r=o.format(u.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,u.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),r}function P(n){var e,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",o=!0;return o&&(t?r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===n||void 0===n?void 0:n.id,"/api_trigger"):(r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===n||void 0===n?void 0:n.id,"/pipeline_runs"),null!==n&&void 0!==n&&n.token&&(r="".concat(r,"/").concat(n.token)))),o&&(e=window.location.port)&&(r=r.replace(e,c.QT)),r}function k(n,e,t){return n.match(/[*,-/]/)?{additionalOffset:0,cronValue:n}:function(n,e,t){var r=t.indexOf(n),o=0;if(e<0)for(var i=0;i>e;i--)0===r?(r=t.length-1,o-=1):r-=1;else if(e>0)for(var l=0;l<e;l++)r===t.length-1?(r=0,o+=1):r+=1;var u="number"===typeof t[r]?t[r]:n;return{additionalOffset:o,cronValue:String(u)}}(+n,e,t)}var I=(0,a.m5)(60),N=(0,a.m5)(24),w=(0,u.Cs)();function E(n,e){if(!n)return n;var t=l()().local().format("Z"),r=t.split(":"),o="-"===t[0],i=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),u=Number(r[1]);(o&&!e||!o&&e)&&(i=-i,u=-u);var c=n.split(" "),s=c[0],d=c[1],a=c[2],f=k(s,u,I),v=k(d,i+f.additionalOffset,N);if(c[0]=f.cronValue,c[1]=v.cronValue,0!==(null===v||void 0===v?void 0:v.additionalOffset)){var m=k(a,v.additionalOffset,w);c[2]=m.cronValue}return c.join(" ")}},25050:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return sn}});var r=t(77837),o=t(38860),i=t.n(o),l=t(82684),u=t(75457),c=t(93808),s=t(75582),d=t(82394),a=t(97618),f=t(55485),v=t(85854),m=t(44265),p=t(38276),h=t(4190),b=t(30160),j=t(44897),x=t(25976),Z=t(42631),g=t(95363),O=t(70515),y=t(61896),_=x.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,O.cd*O.iI,(function(n){return"\n background-color: ".concat((n.theme.background||j.Z.background).panel,";\n border: 1px solid ").concat((n.theme.borders||j.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(n){return n.selected&&n.danger&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).negative,";\n ")}),(function(n){return n.selected&&n.primary&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.selected&&n.default&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).focusBackground,";\n ")}),(function(n){return n.selected&&n.success&&"\n border-color: ".concat((n.theme.background||j.Z.background).success,";\n ")}),(function(n){return n.selected&&n.warning&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).warning,";\n ")}),(function(n){return n.danger&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).focusBackground,";\n ")}),(function(n){return n.success&&"\n border-color: ".concat((n.theme.background||j.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).warning,";\n ")})),P=(0,x.css)([""," "," "," "," ",""],(function(n){return n.danger&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n background-color: ".concat((n.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||j.Z.interactive).defaultBackground,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||j.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).warning,";\n ")})),k=x.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],P,y.iD,Z.D7,g.ry,(function(n){return n.danger&&"\n color: ".concat((n.theme.content||j.Z.content).active,";\n ")}),(function(n){return n.primary&&"\n color: ".concat((n.theme.content||j.Z.content).active,";\n ")}),(function(n){return(n.default||n.success)&&"\n "}),(function(n){return n.default&&"\n color: ".concat((n.theme.content||j.Z.content).default,";\n ")}),(function(n){return n.success&&"\n color: ".concat((n.theme.content||j.Z.content).inverted,";\n ")}),(function(n){return n.warning&&"\n color: ".concat((n.theme.content||j.Z.content).inverted,";\n ")})),I=x.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],P,(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||j.Z.interactive).focusBackground,";\n ")})),N=t(72473),w=t(16488),E=t(92083),S=t.n(E),M=t(41143),V=t(81728),C=t(86735);function T(n){var e;return Object.keys((null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{}).sort()}function D(n){var e,t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null,i=null,l=null,u=null,c={},d=(null===n||void 0===n?void 0:n.block_runs)||[],a=(null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{},f=(null===n||void 0===n||null===(t=n.metrics)||void 0===t?void 0:t.pipeline)||{},v=A(n);return Object.entries(a).forEach((function(n){var e,t=(0,s.Z)(n,2),d=t[0],a=t[1];if(!r||r===d){var m,p=a||{},h=p.destinations,b=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,j=p.sources,x=void 0===j?{records:null}:j,Z=v[d]||[];if(r&&r===d&&Z.every((function(n){var e=n.status;return M.V.COMPLETED===e}))&&null===o&&(o=0),null!==f&&void 0!==f&&null!==(e=f[d])&&void 0!==e&&e.record_counts)null===o&&(o=0),o+=Number(null===f||void 0===f||null===(m=f[d])||void 0===m?void 0:m.record_counts);else null!==x&&void 0!==x&&x.records&&(null===o&&(o=0),o+=Number(x.records));null!==b&&void 0!==b&&b.records_updated?(null===l&&(l=0),l+=Number(b.records_updated),null===u&&(u=0),u+=Number(b.records_updated)):null!==b&&void 0!==b&&b.records_inserted?(null===l&&(l=0),l+=Number(b.records_inserted),null===i&&(i=0),i+=Number(b.records_inserted)):null!==b&&void 0!==b&&b.records_affected&&(null===l&&(l=0),l+=Number(b.records_affected)),["destinations","sources"].forEach((function(n){var e=a[n]||{};null!==e&&void 0!==e&&e.error&&(c[d]||(c[d]={}),c[d][n]={error:null===e||void 0===e?void 0:e.error,errors:null===e||void 0===e?void 0:e.errors,message:null===e||void 0===e?void 0:e.message})}))}})),null===d||void 0===d||d.forEach((function(n){var e=n.block_uuid,t=n.metrics,r=n.status;if(M.V.FAILED===r&&null!==t&&void 0!==t&&t.error&&e){var o=e.split(":"),i=(0,s.Z)(o,3),l=(i[0],i[1]);i[2];c[l]||(c[l]={}),c[l][""]=t.error}})),{errors:c,records:o,recordsInserted:i,recordsProcessed:l,recordsUpdated:u}}function A(n){var e=n.block_runs,t={};return null===e||void 0===e||e.forEach((function(n){var e=n.block_uuid.split(":"),r=(0,s.Z)(e,3),o=(r[0],r[1]);r[2];t[o]||(t[o]=[]),t[o].push(n)})),t}function L(n){var e=A(n),t={};return Object.entries(e).forEach((function(n){var e=(0,s.Z)(n,2),r=e[0],o=e[1],i=o.filter((function(n){var e=n.status;return M.V.COMPLETED===e})),l=i.map((function(n){var e=n.completed_at,t=n.started_at,r=S().utc(e),o=S().utc(t);return r.diff(o,"second")})),u=i.length,c=o.length;t[r]={completed:u,runtime:l.length>=1?(0,C.Sm)(l)/l.length:null,total:c}})),t}function R(n){var e=n.block_runs,t=(null===e||void 0===e?void 0:e.length)||1,r=function(n){var e=(null===n||void 0===n?void 0:n.block_runs)||[];return null===e||void 0===e?void 0:e.filter((function(n){var e=n.status;return M.V.COMPLETED===e}))}(n).length||0;return r/t}function U(n){var e=n.completed_at,t=n.block_runs,r=void 0===t?[]:t,o=n.status;if(null===r||void 0===r||!r.length)return 0;var i=S().utc();if(e)i=S().utc(e);else if([m.VO.CANCELLED,m.VO.FAILED].includes(o)){var l=(0,C.YC)(r,(function(n){return n.started_at}),{ascending:!1})[0];i=S().utc(l.updated_at)}var u=S().utc(n.created_at);return i.diff(u,"second")}function F(n,e){var t,r,o,i,l,u=A(n),c=L(n),s=(null===n||void 0===n?void 0:n.metrics)||{blocks:null,pipeline:null},d=s.blocks||{},a=s.pipeline||{},f=(d[e],a[e],c[e]||{completed:null,total:null}),v=f.completed,m=f.total,p=v&&m?v/m:0,h=u[e]||[],b=h.every((function(n){var e=n.status;return M.V.COMPLETED===e})),j=(0,C.YC)(h,(function(n){return n.updated_at}),{ascending:!1})[0],x=null===(t=(0,C.YC)(h,(function(n){return n.started_at}),{ascending:!0})[0])||void 0===t?void 0:t.started_at;b?r=null===(l=(0,C.YC)(h,(function(n){return n.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:j&&(i=null===j||void 0===j?void 0:j.updated_at);var Z=b?S().utc(r||i):S().utc(),g=S().utc(x);return{completed:v,completedAt:r,done:b,progress:p,runtime:o=Z.diff(g,"second"),startedAt:x,status:null===j||void 0===j?void 0:j.status,timeText:(0,V.zf)(o),total:m,updatedAt:i}}var z=t(70320),Y=t(28598);function B(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function G(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?B(Object(t),!0).forEach((function(e){(0,d.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):B(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var X=function(n){var e=n.onSelect,t=n.pipelineRun,r=n.selected,o=t.created_at,i=t.status,u=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[t]),c=(0,l.useMemo)((function(){return u.pipeline||{}}),[u]),d=(0,z.qB)(),x=u.destination,Z=u.source,g=(0,l.useMemo)((function(){return Object.keys(c).length}),[c]),y=(0,l.useMemo)((function(){return D(t)}),[t]),P=y.errors,E=y.records,S=y.recordsProcessed,M=(0,l.useMemo)((function(){return R(t)}),[t]),C=(0,l.useMemo)((function(){return[m.VO.COMPLETED].includes(i)}),[i]),T=(0,l.useMemo)((function(){return{danger:m.VO.FAILED===i,default:m.VO.INITIAL===i,primary:m.VO.RUNNING===i,success:C,warning:m.VO.CANCELLED===i}}),[C,i]),A=(0,l.useMemo)((function(){if(t){var n=U(t);return(0,V.zf)(n)}}),[t]);return(0,Y.jsx)(_,G(G({},T),{},{onClick:function(){return e(r?null:t.id)},selected:r,children:(0,Y.jsxs)(f.ZP,{fullHeight:!0,justifyContent:"space-between",children:[(0,Y.jsx)(I,G({},T)),(0,Y.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,Y.jsxs)(p.Z,{ml:3,py:3,children:[(0,Y.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:(0,w.Uc)(o,d)}),(0,Y.jsx)(p.Z,{fullWidth:!1,mt:2,children:(0,Y.jsx)(k,G(G({},T),{},{children:(0,Y.jsxs)(f.ZP,{alignItems:"center",children:[C&&(0,Y.jsx)(N.Check,{inverted:!0,size:2*O.iI}),[m.VO.INITIAL,m.VO.RUNNING].includes(i)&&(0,Y.jsx)(h.Z,{color:m.VO.INITIAL!==i?j.Z.monotone.white:null,inverted:m.VO.INITIAL===i,small:!0}),"\xa0",m.VO.RUNNING===i&&(0,Y.jsxs)(Y.Fragment,{children:["\xa0",Math.round(100*M),"%"]}),![m.VO.INITIAL,m.VO.RUNNING].includes(i)&&m.Do[i],m.VO.INITIAL===i&&"Starting"]})}))}),Object.values(P).length>=1&&(0,Y.jsx)(p.Z,{mt:1,children:Object.entries(P).map((function(n){var e=(0,s.Z)(n,2),t=e[0];e[1];return(0,Y.jsxs)(b.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,Y.jsxs)(a.Z,{flex:1,children:[(0,Y.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,Y.jsxs)(p.Z,{ml:3,py:3,children:[(0,Y.jsxs)(p.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:S>=1?(0,V.x6)(S):"-"})]}),(0,Y.jsxs)(p.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:E>=1&&E>=S?(0,V.x6)(E-S):"-"})]}),m.VO.RUNNING!==i&&(0,Y.jsxs)(p.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:A})]})]})}),(0,Y.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,Y.jsxs)(p.Z,{ml:3,py:3,children:[(0,Y.jsxs)(p.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:Z||"-"})]}),(0,Y.jsxs)(p.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:x||"-"})]}),(0,Y.jsxs)(p.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:g>=1?(0,V.x6)(g):"-"})]})]})})]})]})}))},H=t(89565),W=t.n(H),q=t(34376),J=t(71180),Q=t(48670),$=t(75499),K=x.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(n){return n.even&&n.fill&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).cyan,";\n ")}),(function(n){return n.even&&!n.fill&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).cyanTransparent,";\n ")}),(function(n){return"\n height: ".concat((n.small?1:2)*O.iI,"px;\n ")})),nn=t(95924),en=t(3917);var tn=function(n){var e=n.onClickRow,t=n.pipelineRun,r=n.selectedStream,o=(0,q.useRouter)(),i=(0,z.qB)(),u=(0,l.useState)(null),c=u[0],d=u[1],a=(0,l.useState)(null),h=a[0],j=a[1],x=(0,l.useMemo)((function(){return t?A(t):{}}),[t]),Z=(0,l.useMemo)((function(){return t?L(t):{}}),[t]),g=(0,l.useMemo)((function(){var n=0,e=[],t=[];if(Object.entries(Z).forEach((function(r){var o=(0,s.Z)(r,2),i=(o[0],o[1]),l=i.completed,u=i.runtime,c=i.total;null===u?t.push(i):(e.push(u),n+=u*(c-l))})),0===e.length)return null;var r=(0,C.Sm)(e)/e.length;return t.forEach((function(e){var t=e.completed,o=e.total;n+=r*(o-t)})),n}),[Z]),y=(0,l.useMemo)((function(){return r?Z[r]:null}),[Z,r]),_=(0,l.useMemo)((function(){if(r&&Z){var n=Z[r]||{},e=n.completed,o=n.total;if(o>=1)return e/o}else if(t)return R(t);return 0}),[Z,t,r]),P=(0,l.useMemo)((function(){return(0,Y.jsx)(f.ZP,{children:(0,C.w6)(101).map((function(n,e){return(0,Y.jsx)(K,{even:e%2===0,fill:_>0&&Math.round(100*_)>=e},e)}))})}),[_]),k=(0,l.useMemo)((function(){if(r){var n=x[r]||[],e=n.every((function(n){var e=n.status;return M.V.COMPLETED===e})),o=(0,C.YC)(n,(function(n){return n.updated_at}),{ascending:!1})[0],i=null===o||void 0===o?void 0:o.status,l=y||{},u=l.completed,c=l.runtime,s=l.total;if(e)return"Sync complete for ".concat(r);if([M.V.CANCELLED,M.V.FAILED].includes(i))return m.Do[i];if(c&&s>=1){var d=Math.ceil(c*(s-u)/60);return"".concat((0,V._6)("minute",d,!0)," to completion")}return"Estimating time remaining for stream..."}if(m.VO.COMPLETED===(null===t||void 0===t?void 0:t.status))return"Sync complete";if(t){if([m.VO.CANCELLED,m.VO.FAILED].includes(null===t||void 0===t?void 0:t.status))return m.Do[null===t||void 0===t?void 0:t.status];if(m.VO.INITIAL===(null===t||void 0===t?void 0:t.status))return"Initializing sync (this can take several minutes)";if(null===g)return"Estimating time remaining...";var a=Math.ceil(g/60);return"".concat((0,V._6)("minute",a,!0)," to completion")}return"Select a sync"}),[x,g,y,t,r]),I=(0,l.useMemo)((function(){return t&&r?F(t,r):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[t,r]);(0,l.useEffect)((function(){var n;if(t){var e=U(t);d(e),n=setInterval((function(){return d((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[t]),(0,l.useEffect)((function(){var n;if(t&&r&&I){var e=(null===I||void 0===I?void 0:I.runtime)||0;j(e),n=setInterval((function(){return j((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[t,r,I]);var E=(0,l.useMemo)((function(){if(t){if(r)return null===I||void 0===I?void 0:I.timeText;var n=U(t);return(0,V.zf)(n)}}),[t,r,I]),S=(0,l.useMemo)((function(){var n=Math.floor(c%86400/3600),e=Math.floor(c%3600/60),t=Math.floor(c%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),t>=10?String(t):"0".concat(t)].join(":")}),[c]),B=(0,l.useMemo)((function(){var n=Math.floor(h%86400/3600),e=Math.floor(h%3600/60),t=Math.floor(h%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),t>=10?String(t):"0".concat(t)].join(":")}),[h]),G=(0,l.useMemo)((function(){return t?D(t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t]),X=G.errors,H=G.records,tn=G.recordsInserted,rn=G.recordsProcessed,on=G.recordsUpdated,ln=(0,l.useMemo)((function(){return t&&r?D(t,r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t,r]),un=(0,l.useMemo)((function(){var n=r?null===ln||void 0===ln?void 0:ln.records:H,e=r?null===ln||void 0===ln?void 0:ln.recordsInserted:tn,t=r?null===ln||void 0===ln?void 0:ln.recordsProcessed:rn,o=r?null===ln||void 0===ln?void 0:ln.recordsUpdated:on,i=[{label:"Rows fetched",value:null===n?"-":(0,V.x6)(n)}];return null===e&&null===o?i.push({label:"Rows processed",value:null===t?"-":(0,V.x6)(t)}):null!==e?i.push({label:"Rows inserted",value:(0,V.x6)(e)}):null!==o&&i.push({label:"Rows updated",value:(0,V.x6)(o)}),i.map((function(n){var e=n.label,t=n.value;return(0,Y.jsxs)("div",{children:[(0,Y.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:e}),(0,Y.jsx)(b.ZP,{headline:!0,children:t})]},e)}))}),[H,ln,tn,rn,on,r]),cn=(0,l.useMemo)((function(){if(!t)return(0,Y.jsx)("div",{});var n=T(t);return(0,Y.jsx)($.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(e){return r&&r===n[e]},onClickRow:e,rows:n.map((function(n){var e=F(t,n),r=(e.completed,e.completedAt),l=e.done,u=e.progress,c=e.startedAt,s=e.status,d=e.timeText,a=(e.total,!!X[n]);return[(0,Y.jsx)(b.ZP,{danger:a,default:!a,monospace:!0,children:n},"stream"),(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,title:c?(0,en._6)(c):null,children:c?(0,w.Uc)(c,i):(0,Y.jsx)(Y.Fragment,{children:"\u2014"})},"started_at"),(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,title:r?(0,en._6)(r):null,children:r?(0,w.Uc)(r,i):(0,Y.jsx)(Y.Fragment,{children:"\u2014"})},"completed_at"),(0,Y.jsx)(b.ZP,{default:!0,children:[M.V.INITIAL,M.V.RUNNING].includes(s)?"-":d},"runtime"),(0,Y.jsxs)("div",{children:[l&&(0,Y.jsx)(N.Check,{default:!0,size:2*O.iI}),!l&&(0,Y.jsx)(f.ZP,{children:(0,C.w6)(51).map((function(n,e){return(0,Y.jsx)(K,{even:e%2===0,fill:u>0&&Math.round(50*u)>=e,small:!0},e)}))})]},"progress"),(0,Y.jsx)(J.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(n){o.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id)),(0,nn.j)(n)},children:(0,Y.jsx)(N.Logs,{default:!0,size:2*O.iI})},"logs")]})),uuid:"".concat(null===t||void 0===t?void 0:t.id,"-streams-table")})}),[i,X,e,t,o,r]),sn=(0,l.useMemo)((function(){var n,e,o,i,l,u,c,d;if(t&&r){var a=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===a||void 0===a||null===(n=a.pipeline)||void 0===n||null===(e=n[r])||void 0===e||null===(o=e.bookmarks)||void 0===o?void 0:o[r],v=null===a||void 0===a||null===(i=a.blocks)||void 0===i||null===(l=i[r])||void 0===l||null===(u=l.destinations)||void 0===u||null===(c=u.state)||void 0===c||null===(d=c.bookmarks)||void 0===d?void 0:d[r];if(f||v){var m=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),p=[];m.forEach((function(n){var e=[(0,Y.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[f,v].forEach((function(t,r){t&&e.push((0,Y.jsx)(b.ZP,{monospace:!0,small:!0,children:t[n]},"".concat(n,"-").concat(r)))})),p.push(e)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===a||void 0===a?void 0:a.source,"source",f],[null===a||void 0===a?void 0:a.destination,"destination",v]].forEach((function(n){var e=(0,s.Z)(n,3),t=e[0],r=e[1];e[2]&&h.push({uuid:"".concat(t," (").concat(r,")")})})),(0,Y.jsx)($.Z,{columnFlex:[null,1,1],columns:h,rows:p,uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),dn=(0,l.useMemo)((function(){var n,e,o,i,l,u;if(t&&r){var c=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},d=null===c||void 0===c||null===(n=c.blocks)||void 0===n||null===(e=n[r])||void 0===e||null===(o=e.sources)||void 0===o?void 0:o.record,a=null===c||void 0===c||null===(i=c.blocks)||void 0===i||null===(l=i[r])||void 0===l||null===(u=l.destinations)||void 0===u?void 0:u.record;if(d||a){var f=Object.keys(a||d||{}).sort(),v=[];f.forEach((function(n){var e=[(0,Y.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[d,a].forEach((function(t,r){if(t){var o=t[n],i="object"===typeof o;e.push((0,Y.jsxs)(b.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[i&&(0,Y.jsx)("pre",{children:JSON.stringify(o,null,2)}),!i&&o]},"".concat(n,"-").concat(r)))}})),v.push(e)}));var m=[{label:function(){return""},uuid:"column"}];return[[null===c||void 0===c?void 0:c.source,"source",d],[null===c||void 0===c?void 0:c.destination,"destination",a]].forEach((function(n){var e=(0,s.Z)(n,3),t=e[0],r=e[1];e[2]&&m.push({uuid:"".concat(t," (").concat(r,")")})})),(0,Y.jsx)($.Z,{columnFlex:[null,1,1],columns:m,rows:v.map((function(n){return n.map((function(n){return(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,children:n},n)}))})),uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),an=(0,l.useMemo)((function(){var n,e,o,i,l,u,c=null===t||void 0===t||null===(n=t.metrics)||void 0===n||null===(e=n.blocks)||void 0===e?void 0:e[r];return(null===c||void 0===c||null===(o=c.sources)||void 0===o||null===(i=o.block_tags)||void 0===i?void 0:i.destination_table)||(null===c||void 0===c||null===(l=c.destinations)||void 0===l||null===(u=l.block_tags)||void 0===u?void 0:u.destination_table)}),[t,r]);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(p.Z,{p:3,children:[r&&(0,Y.jsx)(p.Z,{mb:3,children:(0,Y.jsxs)(f.ZP,{alignItems:"center",children:[(0,Y.jsx)(Q.Z,{block:!0,onClick:function(){return o.push("/pipelines/".concat(t.pipeline_uuid,"/syncs?pipeline_run_id=").concat(t.id))},preventDefault:!0,children:(0,Y.jsxs)(f.ZP,{alignItems:"center",children:[(0,Y.jsx)(N.ArrowLeft,{default:!0,size:1.5*O.iI}),(0,Y.jsx)(p.Z,{mr:1}),(0,Y.jsx)(b.ZP,{default:!0,children:"Syncs"})]})}),(0,Y.jsx)(p.Z,{mx:1,children:(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,children:"/"})}),(0,Y.jsx)(b.ZP,{bold:!0,monospace:!0,children:r})]})}),(0,Y.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,Y.jsx)(p.Z,{mr:2,my:1,children:(0,Y.jsx)(v.Z,{level:5,muted:!t,children:k})}),t&&(0,Y.jsx)(J.ZP,{onClick:function(){return o.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id))},small:!0,children:"Logs"})]}),(0,Y.jsx)(p.Z,{mt:2,children:P}),t&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(p.Z,{mt:3,children:(0,Y.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,Y.jsxs)("div",{children:[(0,Y.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,Y.jsxs)(b.ZP,{headline:!0,children:[r&&[M.V.INITIAL,M.V.RUNNING].includes(null===I||void 0===I?void 0:I.status)&&B,r&&![M.V.INITIAL,M.V.RUNNING].includes(null===I||void 0===I?void 0:I.status)&&(null===I||void 0===I?void 0:I.timeText),!r&&[m.VO.INITIAL,m.VO.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&S,!r&&![m.VO.INITIAL,m.VO.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&E]})]}),un]})}),Object.values(X).length>=1&&(0,Y.jsxs)(p.Z,{mt:3,children:[(0,Y.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(X).map((function(n,e){var t=(0,s.Z)(n,2),o=t[0],i=t[1];return(!r||r===o)&&(0,Y.jsx)(p.Z,{mt:e>=1?1:0,children:Object.entries(i).map((function(n){var e=(0,s.Z)(n,2),t=e[0],r=e[1],i=r.error,l=r.errors,u=r.message,c=Array.isArray(i)?i.join(" "):i;return(0,Y.jsxs)("div",{children:[(0,Y.jsx)(p.Z,{mb:u||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,Y.jsxs)(b.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[o,!!t&&(0,Y.jsxs)(b.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",t,")"]}),": ",(0,Y.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:c&&(0,Y.jsx)(W(),{children:c})})]})}),(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:u}),l.map((function(n){return(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:n},n)}))]},"".concat(o,"-").concat(t))}))},o)}))]})]})]}),t&&!r&&(0,Y.jsx)(p.Z,{my:3,children:cn}),t&&r&&(0,Y.jsxs)(Y.Fragment,{children:[an&&(0,Y.jsx)(p.Z,{my:3,children:(0,Y.jsxs)(p.Z,{px:3,children:[(0,Y.jsx)(v.Z,{level:5,children:"Table name"}),(0,Y.jsx)(p.Z,{mt:1,children:(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,children:an})})]})}),sn&&(0,Y.jsxs)(p.Z,{my:3,children:[(0,Y.jsx)(p.Z,{px:3,children:(0,Y.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,Y.jsx)(p.Z,{px:1,children:sn})]}),dn&&(0,Y.jsxs)(p.Z,{my:3,children:[(0,Y.jsx)(p.Z,{px:3,children:(0,Y.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,Y.jsx)(p.Z,{px:1,children:dn})]})]})]})},rn=t(35686),on=t(28795),ln=t(15610),un=t(69419);function cn(n){var e=n.pipeline,t=e.uuid,r=rn.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:t},{refreshInterval:5e3}).data,o=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.pipeline_runs)||[]}),[r]),i=(0,un.iV)(),c=(0,l.useState)(null),s=c[0],d=c[1],a=(0,l.useState)(null),f=a[0],v=a[1],m=(0,l.useState)(null),p=m[0],h=m[1];(0,l.useEffect)((function(){null!==i&&void 0!==i&&i.pipeline_run_id?h(null===o||void 0===o?void 0:o.find((function(n){return n.id===Number(i.pipeline_run_id)}))):p&&h(null),null!==i&&void 0!==i&&i.stream?v(i.stream):f&&v(null)}),[o,i,p,f]);var b=(0,l.useCallback)((function(){var n=p?T(p):[];return(0,Y.jsx)(tn,{onClickRow:function(e){var t=n[e];(0,ln.u)({stream:f===t?null:t})},pipelineRun:p,selectedStream:f})}),[p,f]),j=(0,l.useMemo)((function(){var n="/pipelines/".concat(t,"/syncs");p&&(n="".concat(n,"?pipeline_run_id=").concat(p.id));var e=[{label:function(){return"Syncs"},linkProps:f?{as:n,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&e.push({label:function(){return f}}),e}),[t,p,f]);return(0,Y.jsx)(u.Z,{breadcrumbs:j,buildSidekick:b,errors:s,pageName:on.M.SYNCS,pipeline:e,setErrors:d,title:function(n){var e=n.name;return"".concat(e," syncs")},uuid:"".concat(on.M.SYNCS,"_").concat(t),children:o.map((function(n){var e=(null===p||void 0===p?void 0:p.id)===n.id;return(0,Y.jsx)(X,{onSelect:function(n){return(0,ln.u)({pipeline_run_id:n,stream:null})},pipelineRun:n,selected:e},n.id)}))})}cn.getInitialProps=function(){var n=(0,r.Z)(i().mark((function n(e){var t;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var sn=(0,c.Z)(cn)},59416:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return t(25050)}])},80022:function(n,e,t){"use strict";function r(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}t.d(e,{Z:function(){return r}})},15544:function(n,e,t){"use strict";function r(n){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},r(n)}t.d(e,{Z:function(){return r}})},13692:function(n,e,t){"use strict";t.d(e,{Z:function(){return o}});var r=t(61049);function o(n,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&(0,r.Z)(n,e)}},93189:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(12539),o=t(80022);function i(n,e){if(e&&("object"===r(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(n)}}},function(n){n.O(0,[1557,3782,9774,2888,179],(function(){return e=59416,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{16488:function(e,n,r){"use strict";r.d(n,{IJ:function(){return h},M8:function(){return P},Uc:function(){return j},XM:function(){return Z},_U:function(){return v},eI:function(){return b},gU:function(){return y},lO:function(){return S},ri:function(){return m},tL:function(){return w},vJ:function(){return O},xH:function(){return x}});var t,i=r(82394),o=r(92083),l=r.n(o),u=r(3917),c=r(4383),a=r(30229),d=r(42122),s=r(86735);function p(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function f(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var v=function(e){return!!e&&!Object.values(a.U5).includes(e)};function h(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var r=n.block_uuid,t=n.completed_at,o=n.started_at,u=n.status,c=null;o&&t&&(c=l()(t).valueOf()-l()(o).valueOf());return f(f({},e),{},(0,i.Z)({},r,{runtime:c,status:u}))}),{})}var g,m=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return e?n.slice(0,1):n};function x(e){var n=(0,d.gR)(e,[a.gm.INTERVAL,a.gm.TYPE]),r=e[a.gm.INTERVAL];r&&(n["schedule_interval[]"]=encodeURIComponent(r));var t=e[a.gm.TYPE];return t&&(n["schedule_type[]"]=t),n}function b(e){return e?new Date(l()(e).valueOf()):null}function j(e,n){return n?(0,u.XG)(e,n):function(e){if("string"!==typeof e)return e;var n=e.split("+")[0];return l()(b(n)).format(u.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(g||(g={}));var w=(t={},(0,i.Z)(t,g.DAY,86400),(0,i.Z)(t,g.HOUR,3600),(0,i.Z)(t,g.MINUTE,60),(0,i.Z)(t,g.SECOND,1),t);function y(e){var n=g.SECOND,r=e;return e%86400===0?(r/=86400,n=g.DAY):e%3600===0?(r/=3600,n=g.HOUR):e%60===0&&(r/=60,n=g.MINUTE),{time:r,unit:n}}function O(e,n){return e*w[n]}function Z(e,n,r){var t,i=l()(e);return i.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),i.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),i.set("second",0),t=i.format(u.TD),null!==r&&void 0!==r&&r.includeSeconds&&(t=t.concat(":00")),null!==r&&void 0!==r&&r.localTimezone&&(t=i.format(u.lE),null!==r&&void 0!==r&&r.convertToUtc&&(t=(0,u.d$)(t,{includeSeconds:null===r||void 0===r?void 0:r.includeSeconds,utcFormat:!0}))),t}function P(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t="",i=!0;return i&&(r?t="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(t="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(t="".concat(t,"/").concat(e.token)))),i&&(n=window.location.port)&&(t=t.replace(n,c.QT)),t}function _(e,n,r){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,r){var t=r.indexOf(e),i=0;if(n<0)for(var o=0;o>n;o--)0===t?(t=r.length-1,i-=1):t-=1;else if(n>0)for(var l=0;l<n;l++)t===r.length-1?(t=0,i+=1):t+=1;var u="number"===typeof r[t]?r[t]:e;return{additionalOffset:i,cronValue:String(u)}}(+e,n,r)}var I=(0,s.m5)(60),k=(0,s.m5)(24),C=(0,u.Cs)();function S(e,n){if(!e)return e;var r=l()().local().format("Z"),t=r.split(":"),i="-"===r[0],o=3===t[0].length?Number(t[0].slice(1)):Number(t[0]),u=Number(t[1]);(i&&!n||!i&&n)&&(o=-o,u=-u);var c=e.split(" "),a=c[0],d=c[1],s=c[2],p=_(a,u,I),f=_(d,o+p.additionalOffset,k);if(c[0]=p.cronValue,c[1]=f.cronValue,0!==(null===f||void 0===f?void 0:f.additionalOffset)){var v=_(s,f.additionalOffset,C);c[2]=v.cronValue}return c.join(" ")}},38415:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return Ce}});var t=r(77837),i=r(75582),o=r(82394),l=r(38860),u=r.n(l),c=r(12691),a=r.n(c),d=r(82684),s=r(69864),p=r(34376),f=r(24138),v=r(15338),h=r(68562),g=r(48670),m=r(55072),x=r(75457),b=r(30229),j=r(93808),w=r(82359),y=r(71610),O=r(71180),Z=r(90299),P=r(55485),_=r(85854),I=r(37899),k=r(65956),C=r(38276),S=r(30160),E=r(44897),T=r(70515),M={uuid:"RUNTIME VARIABLES"},R={uuid:"BOOKMARK VALUES"},N=r(32080),B=r(8916),D=r(81728),A=r(28598);function V(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function U(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?V(Object(r),!0).forEach((function(n){(0,o.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var F="".concat(T.iI,"px ").concat(3*T.iI,"px");var H=function(e){var n=e.initialPipelineSchedulePayload,r=e.onCancel,t=e.onSuccess,i=e.pipeline,l=e.variables,u=(0,d.useState)(null),c=u[0],a=u[1],s=(0,d.useState)(!0),p=s[0],f=s[1],h=(0,d.useState)(l||{}),g=h[0],m=h[1],x=(0,d.useState)(null),j=x[0],w=x[1],V=(0,d.useMemo)((function(){return U(U({},n),{},{name:(0,D.Y6)(),variables:p?(0,B.e7)(U(U({},g),c?(0,o.Z)({},b.PN,c):{})):null})}),[c,n,p,g]),H=(0,d.useMemo)((function(){return null!==i&&void 0!==i&&i.blocks?(0,N.n)(i):null}),[i]),G=(0,d.useMemo)((function(){var e;return H&&(null===(e=Object.keys(H||{}))||void 0===e?void 0:e.length)>=1?[M,R]:null}),[H]);(0,d.useEffect)((function(){(null===G||void 0===G?void 0:G.length)>=1&&!j&&w(null===G||void 0===G?void 0:G[0])}),[j,w,G]);var L=(0,d.useMemo)((function(){return null!==G&&void 0!==G&&G.length?(0,A.jsx)(Z.Z,{onClickTab:function(e){w(e)},selectedTabUUID:null===j||void 0===j?void 0:j.uuid,tabs:G,underlineStyle:!0}):null}),[j,w,G]);return(0,A.jsxs)(k.Z,{noPadding:!0,footer:(0,A.jsxs)(P.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,A.jsx)(O.ZP,{onClick:function(){t({pipeline_schedule:V}),r()},padding:F,primaryAlternate:!0,children:"Run now"}),(0,A.jsx)(C.Z,{mr:1}),(0,A.jsx)(O.ZP,{borderColor:E.Z.background.page,onClick:r,padding:F,secondary:!0,children:"Cancel"})]}),header:(0,A.jsx)(_.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*T.iI,subtitle:(0,A.jsxs)(A.Fragment,{children:[!(null!==G&&void 0!==G&&G.length)&&(0,A.jsx)(C.Z,{p:T.cd,children:(0,A.jsx)(S.ZP,{default:!0,children:"Creates a new trigger and immediately runs the current pipeline once."})}),(null===G||void 0===G?void 0:G.length)>=1&&L,(0,A.jsx)(v.Z,{light:!0})]}),children:[(!(null!==G&&void 0!==G&&G.length)||M.uuid===(null===j||void 0===j?void 0:j.uuid))&&(0,A.jsxs)(A.Fragment,{children:[(null===G||void 0===G?void 0:G.length)>=1&&(0,A.jsx)(C.Z,{p:T.cd,children:(0,A.jsx)(S.ZP,{default:!0,children:"Creates a new trigger and immediately runs the current pipeline once."})}),(0,A.jsx)(I.Z,{enableVariablesOverwrite:p,originalVariables:l,runtimeVariables:g,setEnableVariablesOverwrite:f,setRuntimeVariables:m})]}),R.uuid===(null===j||void 0===j?void 0:j.uuid)&&(0,A.jsx)(y.Z,{bookmarkValues:c,pipeline:i,setBookmarkValues:a})]})},G=r(97618),L=r(72473),Y=r(25976),X=r(42631),z=r(47041),q=r(91437),Q=Y.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-pu8csx-0"})([""," overflow-y:auto;position:relative;width:100%;z-index:3;border-radius:","px;"," "," "," ",""],z.w5,X.n_,(function(e){return"\n background-color: ".concat((e.theme.background||E.Z.background).page,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.flex&&"\n flex: 1;\n "}),(function(e){return(e.noBorder||e.noBorderRadius)&&"\n border-radius: 0;\n "})),W=Y.default.div.withConfig({displayName:"indexstyle__ColumnHeaderRowStyle",componentId:"sc-pu8csx-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;position:sticky;top:0;width:100%;z-index:2;"," "," ",""],X.n_,X.n_,(function(e){return"\n background-color: ".concat((e.theme.background||E.Z.background).panel,";\n ")}),(function(e){return!e.noBorder&&"\n border: 1px solid ".concat((e.theme.interactive||E.Z.interactive).defaultBorder,";\n ")}),(function(e){return(e.noBorder||e.noBorderRadius)&&"\n border-radius: 0;\n "})),J=Y.default.div.withConfig({displayName:"indexstyle__ColumnHeaderCellStyle",componentId:"sc-pu8csx-2"})([""," ",""],(function(e){return!e.small&&"\n padding: ".concat(1.5*T.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*T.iI,"px;\n ")})),K=Y.default.div.withConfig({displayName:"indexstyle__RowTitleStyle",componentId:"sc-pu8csx-3"})([""," "," ",""],(function(e){return"\n background-color: ".concat((e.theme.background||E.Z.background).header,";\n border: 1px solid ").concat((e.theme.interative||E.Z.interactive).defaultBorder,";\n ")}),(function(e){return!e.small&&"\n padding: ".concat(1.5*T.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*T.iI,"px;\n ")})),$=Y.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-pu8csx-4"})([""," "," "," ",""],(0,q.eR)(),(function(e){return"\n background-color: ".concat((e.theme.background||E.Z.background).page,";\n border-top: none;\n border-bottom: none;\n ")}),(function(e){return!e.noBorder&&"\n border-bottom: 1px solid ".concat((e.theme.interactive||E.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||E.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||E.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.finalRow&&!e.noBorderRadius&&"\n border-bottom-left-radius: ".concat(X.n_,"px;\n border-bottom-right-radius: ").concat(X.n_,"px;\n ")})),ee=Y.default.div.withConfig({displayName:"indexstyle__TextStyle",componentId:"sc-pu8csx-5"})(["p{cursor:pointer;}"]),ne=Y.default.div.withConfig({displayName:"indexstyle__RowCellStyle",componentId:"sc-pu8csx-6"})(["width:100%;z-index:0;"," "," "," "," ",""],(function(e){return!e.first&&"\n border-left: 1px solid ".concat((e.theme.background||E.Z.background).page,";\n ")}),(function(e){return!e.small&&"\n padding: ".concat(1.5*T.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*T.iI,"px;\n ")}),(function(e){return e.textColor&&"\n & p {\n color: ".concat(e.textColor,";\n }\n ")}),(function(e){return e.vanish&&"\n border: none;\n padding: 0 !important;\n width: 0% !important;\n height: 100% !important;\n background-color: ".concat((e.theme.background||E.Z.background).page," !important;\n ")})),re=r(35185);var te=function(e){var n,r=e.cellIndex,t=e.danger,i=e.flex,o=e.render,l=e.rowGroupIndex,u=e.rowIndex,c=e.selected,a=e.small,s=e.showBackground,p=e.showProgress,f=e.textColor,v=e.value,h=e.vanish,m=(0,d.useState)(!1),x=m[0],b=m[1],j=Array.isArray(v);return n=o?o(v):"function"===typeof v?v({selected:c}):j?(0,A.jsxs)(G.Z,{alignItems:"start",flexDirection:"row",justifyContent:"space-between",children:[(0,A.jsxs)(S.ZP,{small:a,textOverflow:!0,title:v[0],children:[x&&(0,A.jsx)(A.Fragment,{children:"".concat(v[0]," & ").concat(v.length-1," more")}),!x&&(0,A.jsx)(A.Fragment,{children:v.map((function(e){return(0,A.jsx)("div",{children:e},e)}))})]}),(0,A.jsxs)(g.Z,{onClick:function(){return b(!x)},children:[x&&(0,A.jsx)(L.ArrowDown,{muted:!0,size:2*T.iI}),!x&&(0,A.jsx)(L.ArrowRight,{muted:!0,size:2*T.iI})]})]}):p?(0,A.jsx)(P.ZP,{alignItems:"center",fullHeight:!0,fullWidth:!0,children:(0,A.jsx)(re.Z,{danger:v<80,progress:v})}):(0,A.jsx)(S.ZP,{bold:t,danger:t,small:a,textOverflow:!0,title:v,children:v}),(0,A.jsx)(G.Z,{flex:i,textOverflow:!0,children:(0,A.jsx)(ne,{first:0===r,showBackground:s,small:a,textColor:f,vanish:h,children:!h&&(0,A.jsxs)(A.Fragment,{children:[n," "]})})},"cell-".concat(l,"-").concat(u,"-").concat(r,"-").concat(v))};var ie=function(e){var n=e.columnFlexNumbers,r=e.columnHeaders,t=e.height,i=e.isTextSelectionRequired,o=e.noBorder,l=e.noBorderRadius,u=e.onClickRow,c=e.onHoverRow,a=e.renderRowCellByIndex,s=e.rowGroupData,p=void 0===s?[]:s,f=e.selectedRowIndexes,v=e.small,h=e.flex,m=e.warnings,x=void 0===m?[]:m,b=(0,d.useMemo)((function(){return p.length}),[p]);return(0,A.jsxs)(Q,{flex:h,height:t,noBorder:o,noBorderRadius:l,noScrollbarTrackBackground:!0,children:[(0,A.jsx)(W,{noBorder:o,noBorderRadius:l,children:(0,A.jsx)(P.ZP,{alignItems:"center",children:r.map((function(e,r){var t=e.Icon,i=e.label;return(0,A.jsx)(G.Z,{flex:n[r],children:(0,A.jsx)(J,{first:0===r,small:v,children:(0,A.jsxs)(P.ZP,{alignItems:"center",children:[t&&(0,A.jsx)(L.Check,{}),t&&(0,A.jsx)(C.Z,{mr:1}),(0,A.jsx)(S.ZP,{bold:!0,children:i})]})})},i)}))})}),p&&p.map((function(e,r){var t,d=e.title,s=e.rowData,p=d||r,h=[];d&&(t=(0,A.jsx)(K,{small:v,children:(0,A.jsx)(S.ZP,{bold:!0,children:d})}));var m=null===s||void 0===s?void 0:s.length;return null===s||void 0===s||s.forEach((function(e,t){var d=e.columnTextColors,s=e.columnValues,j=e.danger,w=e.uuid,y=(null===f||void 0===f?void 0:f[0])===r&&(null===f||void 0===f?void 0:f[1])===t,O=[],Z=x.find((function(e){return e.name===s[0]})),_=Z&&(0,D.HD)(s[1])?(0,D.Tz)(s[1]):s[1],I=Z&&Z.compare(_,Z.val);null===s||void 0===s||s.forEach((function(e,i,o){var l=null===a||void 0===a?void 0:a[i],u=d?d[i]:void 0;Array.isArray(e)?O.push((0,A.jsx)(te,{cellIndex:i,flex:n[i],render:l,rowGroupIndex:r,rowIndex:t,selected:y,showBackground:t%2===1,showProgress:e[0],small:v,textColor:u,value:e[1]},i)):"undefined"===typeof e?(O.pop(),i=o.length+1,O.push((0,A.jsx)(te,{cellIndex:i,danger:j,flex:n[i],render:l,rowGroupIndex:r,rowIndex:t,selected:y,showBackground:t%2===1,small:v,textColor:u,value:e,vanish:!0},i))):O.push((0,A.jsx)(te,{cellIndex:i,danger:I||j,flex:n[i],render:l,rowGroupIndex:r,rowIndex:t,selected:y,showBackground:t%2===1,small:v,textColor:u,value:e},i))}));var k=(0,A.jsx)(P.ZP,{textOverflow:!0,children:O});h.push((0,A.jsxs)($,{finalRow:b-1===r&&m-1===t,hasHover:!!c,noBorder:o,noBorderRadius:l,onMouseEnter:function(){return null===c||void 0===c?void 0:c({rowGroupIndex:r,rowIndex:t,uuid:w})},selected:y,children:[u&&(i?(0,A.jsx)(ee,{onClick:function(){return u({rowGroupIndex:r,rowIndex:t,uuid:w})},role:"cell",children:k}):(0,A.jsx)(g.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:function(){return u({rowGroupIndex:r,rowIndex:t,uuid:w})},preventDefault:!0,children:k})),!u&&k]},"row-group-".concat(p,"-row-").concat(t)))})),(0,A.jsxs)("div",{children:[t,h]},p)}))]})},oe=Y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["display:flex;flex-direction:column;height:","px;border-bottom:1px solid ",";"," "," ",""],(function(e){return e.height}),E.Z.borders.medium,(function(e){return e.includePadding&&"\n padding: ".concat(T.tr,"px;\n ")}),(function(e){return e.overflow&&"\n overflow: auto;\n "}),z.w5),le=r(79633);var ue=function(e){var n=e.height,r=e.scheduleType,t=e.variables,o=e.variablesOverride,l=[];Object.entries(t).forEach((function(e){var n=(0,i.Z)(e,2),r=n[0],t=n[1],u=null===o||void 0===o?void 0:o[r];l.push({uuid:r,value:(0,B.FS)(u||t)})})),(0,B.JZ)(l,r);var u=Object.keys(t).length;return(0,A.jsx)(oe,{height:n,children:t&&(0,A.jsx)(ie,{columnFlexNumbers:[1,1],columnHeaders:[{label:"Runtime variable (".concat(u,")")},{label:"Value"}],noBorderRadius:!0,rowGroupData:[{rowData:l.map((function(e){var n=e.uuid,r=e.value;return{columnTextColors:[le.Or,void 0],columnValues:[n,r],uuid:n}}))}],small:!0})})},ce=r(4190),ae=r(12717),de=r(85544),se=r(29624),pe=r(35686),fe=r(72191),ve=r(28795),he=r(81066),ge=r(24944),me=r(3917),xe=r(69419),be=r(16488),je=r(86735),we=r(42122),ye=r(50178),Oe=r(72619),Ze=r(70320),Pe=r(89538);function _e(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Ie(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?_e(Object(r),!0).forEach((function(n){(0,o.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function ke(e){var n=e.pipeline,r=(0,p.useRouter)(),t=(0,ye.Ct)(),l=n.uuid,u=pe.ZP.pipelines.detail(l,{includes_outputs:!1},{revalidateOnFocus:!1}).data,c=(0,d.useMemo)((function(){return(null===u||void 0===u?void 0:u.pipeline)||n}),[null===u||void 0===u?void 0:u.pipeline,n]),j=(0,d.useState)(null),y=j[0],O=j[1],Z=(0,d.useState)(null),P=Z[0],_=Z[1],I=(0,d.useState)(!1),k=I[0],E=I[1],T=pe.ZP.projects.list().data,M=(0,d.useMemo)((function(){var e;return null===T||void 0===T||null===(e=T.projects)||void 0===e?void 0:e[0]}),[T]),R=((0,d.useMemo)((function(){var e;return(0,Ze.hY)(null===M||void 0===M||null===(e=M.features)||void 0===e?void 0:e[w.d.LOCAL_TIMEZONE])}),[null===M||void 0===M?void 0:M.features]),pe.ZP.client_pages.detail("pipeline_schedule:create",{"pipelines[]":[l]},{},{key:"Triggers/Edit/".concat(l)}).data),N=(0,d.useMemo)((function(){return null===R||void 0===R?void 0:R.client_page}),[R]),V=(0,d.useMemo)((function(){var e,n;return null===N||void 0===N||null===(e=N.components)||void 0===e||null===(n=e.find((function(e){return"create_with_interactions_component"===e.uuid})))||void 0===n?void 0:n.enabled}),[N]),U=(0,d.useMemo)((function(){return null===N||void 0===N?void 0:N.disabled}),[N]),F=pe.ZP.variables.pipelines.list(l,{global_only:!0},{revalidateOnFocus:!1}).data,G=null===F||void 0===F?void 0:F.variables,Y=(0,xe.iV)(),X=(0,xe.DQ)(Y,[b.gm.INTERVAL,b.gm.STATUS,b.gm.TAG,b.gm.TYPE]),z=(0,be.xH)(X),q=null!==Y&&void 0!==Y&&Y.page?Y.page:0,Q=pe.ZP.pipeline_schedules.pipelines.list(l,Ie(Ie({},z),{},{_limit:m.Q,_offset:(null!==Y&&void 0!==Y&&Y.page?Y.page:0)*m.Q}),{refreshInterval:7500}),W=Q.data,J=Q.mutate,K=(0,d.useMemo)((function(){return(null===W||void 0===W?void 0:W.pipeline_schedules)||[]}),[W]),$=function(e){return(0,s.Db)(pe.ZP.pipeline_schedules.pipelines.useCreate(l),{onSuccess:function(n){return(0,Oe.wD)(n,{callback:function(n){var r=n.pipeline_schedule.id;null===e||void 0===e||e(r)},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}})},ee=$((function(e){return r.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===c||void 0===c?void 0:c.uuid,"/triggers/").concat(e,"/edit"))})),ne=(0,i.Z)(ee,2),re=ne[0],te=ne[1].isLoading,ie=$(J),le=(0,i.Z)(ie,2),_e=le[0],ke=le[1].isLoading,Ce=(0,d.useMemo)((function(){return(0,B.Tt)(G)}),[G]),Se=(0,D.Y6)(),Ee=(0,d.useMemo)((function(){return{name:Se,schedule_interval:b.U5.ONCE,schedule_type:b.Xm.TIME,start_time:(0,me.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:b.fq.ACTIVE}}),[Se]),Te=(0,Pe.dd)((function(){return(0,A.jsx)(H,{initialPipelineSchedulePayload:Ee,onCancel:Ne,onSuccess:_e,pipeline:c,variables:Ce})}),{},[G,c,Ce],{background:!0,uuid:"run_pipeline_now_popup"}),Me=(0,i.Z)(Te,2),Re=Me[0],Ne=Me[1],Be=(0,d.useState)(),De=Be[0],Ae=Be[1],Ve=(0,d.useMemo)((function(){var e=null===De||void 0===De?void 0:De.variables,n=!(0,we.Qr)(Ce);return function(r){var i=80;if(n){var o=Object.keys(Ce).length;i=46+43*Math.min(5,o)+1}var u=r.height-i;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(f.ZP,Ie(Ie({},r),{},{enablePorts:!1,height:u,noStatus:!0})),n&&(0,A.jsx)(ue,{height:i+1,scheduleType:null===De||void 0===De?void 0:De.schedule_type,variables:Ce,variablesOverride:e}),!n&&(0,A.jsxs)(oe,{height:i+1,includePadding:!0,overflow:!0,children:[(0,A.jsx)(S.ZP,{children:"This pipeline has no runtime variables."}),!t&&(0,A.jsxs)(C.Z,{mt:1,children:[(0,A.jsx)(a(),{as:"/pipelines/".concat(l,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,A.jsx)(g.Z,{primary:!0,children:"Click here"})})," ",(0,A.jsx)(S.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]})]})}}),[t,l,null===De||void 0===De?void 0:De.schedule_type,null===De||void 0===De?void 0:De.variables,Ce]),Ue=(0,d.useMemo)((function(){var e;return(null===W||void 0===W||null===(e=W.metadata)||void 0===e?void 0:e.count)||[]}),[W]),Fe=pe.ZP.pipeline_triggers.pipelines.list(l).data,He=(0,d.useMemo)((function(){return(0,je.HK)((null===Fe||void 0===Fe?void 0:Fe.pipeline_triggers)||[],(function(e){return e.name}))}),[Fe]);(0,d.useEffect)((function(){var e=((null===Fe||void 0===Fe?void 0:Fe.pipeline_triggers)||[]).find((function(e){var n=e.settings;return null===n||void 0===n?void 0:n.invalid_schedule_interval}));_(e?{displayMessage:'Schedule interval for Trigger (in code) "'.concat(null===e||void 0===e?void 0:e.name,'"')+" is invalid. Please check your cron expression\u2019s syntax in the pipeline\u2019s triggers.yaml file."}:null)}),[null===Fe||void 0===Fe?void 0:Fe.pipeline_triggers]);var Ge=pe.ZP.tags.list().data,Le=(0,d.useMemo)((function(){return(0,je.YC)((null===Ge||void 0===Ge?void 0:Ge.tags)||[],(function(e){return e.uuid}))}),[Ge]),Ye=pe.ZP.pipeline_interactions.detail(V&&l,{filter_for_permissions:1}).data,Xe=pe.ZP.interactions.pipeline_interactions.list(V&&l).data,ze=pe.ZP.pipelines.detail(V&&l).data,qe=(0,d.useMemo)((function(){return(null===Ye||void 0===Ye?void 0:Ye.pipeline_interaction)||{}}),[Ye]),Qe=((0,d.useMemo)((function(){return(null===Xe||void 0===Xe?void 0:Xe.interactions)||[]}),[Xe]),(0,d.useMemo)((function(){var e;return V&&(null===(e=Object.keys((null===qe||void 0===qe?void 0:qe.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[V,qe])),We=(0,d.useMemo)((function(){return Qe&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(C.Z,{ml:"12px"}),(0,A.jsx)(ge.lZ,{}),(0,A.jsx)(C.Z,{ml:"12px"}),(0,A.jsx)(h.ZP,Ie(Ie({},he.B),{},{Icon:L.Interactions,inline:!0,onClick:function(){return E(!0)},uuid:"Create trigger with no-code",children:"Create trigger with no-code"}))]})}),[Qe,E]),Je=(0,d.useMemo)((function(){return(0,A.jsx)(de.Z,{addButtonProps:!U&&{isLoading:te,label:"New trigger",onClick:function(){return re({pipeline_schedule:{name:(0,D.Y6)()}})}},filterOptions:{frequency:Object.values(b.U5),status:Object.values(b.fq),tag:Le.map((function(e){return e.uuid})),type:Object.values(b.Xm)},filterValueLabelMapping:{status:Object.values(b.fq).reduce((function(e,n){return Ie(Ie({},e),{},(0,o.Z)({},n,(0,D.kC)(n)))}),{}),tag:Le.reduce((function(e,n){var r=n.uuid;return Ie(Ie({},e),{},(0,o.Z)({},r,r))}),{}),type:b.Z4},onClickFilterDefaults:function(){r.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(l,"/triggers"))},query:X,resetPageOnFilterApply:!0,secondaryButtonProps:!U&&{beforeIcon:(0,A.jsx)(L.Once,{size:fe.bL}),disabled:t,isLoading:ke,label:"Run@once",onClick:Re,tooltip:"Creates an @once trigger and runs pipeline immediately"},showDivider:!U,children:We})}),[re,U,te,ke,t,We,l,X,r,Re,Le]),Ke=(0,d.useMemo)((function(){var e=[];return k?e.push.apply(e,[{label:function(){return"Triggers"},onClick:function(){return E(!1)}},{bold:!0,label:function(){return"New trigger"}}]):e.push({label:function(){return"Triggers"}}),e}),[k,E]);return k?(0,A.jsx)(ae.Z,{creatingWithLimitation:!0,errors:y,onCancel:function(){return E(!1)},pipeline:null===ze||void 0===ze?void 0:ze.pipeline,setErrors:O,useCreateScheduleMutation:$}):(0,A.jsx)(x.Z,{breadcrumbs:Ke,buildSidekick:!k&&Ve,errors:y||P,pageName:ve.M.TRIGGERS,pipeline:c,setErrors:O,subheader:!k&&Je,title:function(e){var n=e.name;return"".concat(n," triggers")},uuid:"".concat(ve.M.TRIGGERS,"_").concat(l),children:!k&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(v.Z,{light:!0}),W?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(se.Z,{fetchPipelineSchedules:J,pipeline:c,pipelineSchedules:K,pipelineTriggersByName:He,selectedSchedule:De,setErrors:O,setSelectedSchedule:Ae}),(0,A.jsx)(C.Z,{p:2,children:(0,A.jsx)(m.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),t=Ie(Ie({},Y),{},{page:n>=0?n:0});r.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(l,"/triggers?").concat((0,xe.uM)(t)))},page:Number(q),totalPages:Math.ceil(Ue/m.Q)})})]}):(0,A.jsx)(C.Z,{m:2,children:(0,A.jsx)(ce.Z,{inverted:!0,large:!0})})]})})}ke.getInitialProps=function(){var e=(0,t.Z)(u().mark((function e(n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var Ce=(0,j.Z)(ke)},40183:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return r(38415)}])}},function(e){e.O(0,[9161,7674,26,1557,3782,5544,9624,2717,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{8666:function(e,n,i){"use strict";var t;i.d(n,{b:function(){return t}}),function(e){e.BLOCK="block",e.PIPELINE="pipeline"}(t||(t={}))},55620:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return Me}});var t=i(77837),u=i(75582),o=i(21831),r=i(82394),l=i(38860),c=i.n(l),s=i(12691),d=i.n(s),a=i(82684),p=i(69864),f=i(34376),v=i(52749),h=i(60523),m=i(71180),b=i(90299),g=i(31882),j=i(94629),Z=i(97618),x=i(55485),_=i(85854),C=i(68562),w=i(65956),y=i(38276),P=i(30160),k=i(35576),I=i(17488),T=i(28598);var S=function(e){var n=e.description,i=e.isLoading,t=e.maxWidth,u=e.minWidth,o=e.noEmptyValue,r=e.onClose,l=e.onSave,c=e.textArea,s=e.title,d=e.value,p=(0,a.useRef)(null),f=(0,a.useState)(d),v=f[0],h=f[1],b=c?k.Z:I.Z;return(0,a.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,T.jsxs)(w.Z,{maxWidth:t,minWidth:u,children:[(0,T.jsx)(P.ZP,{bold:!0,children:s}),(0,T.jsx)(y.Z,{mt:1,children:(0,T.jsx)(b,{monospace:!0,onChange:function(e){return h(e.target.value)},ref:p,rows:c?7:null,value:v})}),n&&(0,T.jsx)(y.Z,{mt:2,children:(0,T.jsx)(P.ZP,{muted:!0,small:!0,children:n})}),(0,T.jsx)(y.Z,{mt:3,children:(0,T.jsxs)(x.ZP,{children:[(0,T.jsx)(C.ZP,{bold:!0,inline:!0,loading:i,onClick:function(){v===d||o&&!v?r():l(v)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,T.jsx)(y.Z,{ml:1}),(0,T.jsx)(m.ZP,{onClick:r,children:"Cancel"})]})})]})},O=i(48670),E=i(55072),A=i(57653),D=i(55729),M=i(93808),R=i(82359),G=i(44085),$=i(4190),N=i(75499),U=i(48381),L=i(69650),B=i(85544),H=i(70026),F=i(35686),Y=i(44897),z=i(77417),Q=i(42631),V=i(44425),W=i(72473),q=i(23780),K=i(8666),X=i(46684),J=i(53808),ee="pipeline_list_filters",ne="pipeline_list_group_bys",ie="pipeline_list_sort_column_index",te="pipeline_list_sort_direction",ue="pipeline_list_selected_tab_uuid";function oe(e){return(0,J.t8)(ee,e),e}function re(e){return(0,J.t8)(ne,e),e}var le=i(11498),ce=i(32929),se=i(44898),de=i(70515),ae=i(30229),pe=i(81655),fe=i(31608),ve=i(81728),he=i(3917),me=i(72619),be=i(69419),ge=i(65458),je=i(15610),Ze=i(42122),xe=i(95924),_e=i(86735),Ce=i(70320),we=i(89538),ye=i(44952);function Pe(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function ke(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var Ie={Icon:W.Schedule,label:function(){return"Recently viewed"},uuid:"recent"},Te={Icon:W.PipelineV3,label:function(e){return null!==e&&void 0!==e&&e.count?"All pipelines \u203a ".concat((null===e||void 0===e?void 0:e.count)||0):"All pipelines"},uuid:"all"},Se=[Te,Ie],Oe="tab",Ee=[A.$1.SEARCH],Ae={borderRadius:"".concat(Q.BG,"px"),iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function De(){var e,n=(0,f.useRouter)(),i=(0,a.useRef)(null),t=(0,a.useRef)(null),l=(0,a.useRef)(null),c=(0,a.useRef)(null),s=(0,z.Z)(),C=s.fetchProjects,k=s.project,I=(0,a.useState)(null),M=I[0],Q=I[1],Pe=(0,a.useState)(null),De=Pe[0],Me=Pe[1],Re=(0,a.useState)(null),Ge=Re[0],$e=Re[1],Ne=(0,a.useCallback)((function(e){$e(e),clearTimeout(c.current),c.current=setTimeout((function(){var n;return(0,je.u)((n={},(0,r.Z)(n,le.$D.OFFSET,0),(0,r.Z)(n,A.$1.SEARCH,e),n))}),500)}),[$e]),Ue=(0,a.useState)({}),Le=Ue[0],Be=Ue[1],He=(0,a.useState)(null),Fe=He[0],Ye=He[1],ze=(0,be.iV)(),Qe=ke({},(0,be.DQ)(ze,[A.$1.SEARCH,A.$1.STATUS,A.$1.TAG,A.$1.TYPE].concat((0,o.Z)(le.RG)))),Ve=(0,a.useMemo)((function(){return null===ze||void 0===ze?void 0:ze.tab}),[ze]);(0,a.useEffect)((function(){var e;Q(null===i||void 0===i||null===(e=i.current)||void 0===e?void 0:e.getBoundingClientRect().height)}),[ze,i]);var We=(0,a.useMemo)((function(){var e;return(0,Ce.hY)(null===k||void 0===k||null===(e=k.features)||void 0===e?void 0:e[R.d.LOCAL_TIMEZONE])}),[null===k||void 0===k?void 0:k.features]),qe=(0,a.useMemo)((function(){var e;return null===k||void 0===k||null===(e=k.features)||void 0===e?void 0:e[R.d.OPERATION_HISTORY]}),[k]),Ke=(0,a.useMemo)((function(){return We?pe.O$:{}}),[We]),Xe=F.ZP.pipelines.list(ke(ke({},Qe),{},{include_schedules:1}),{revalidateOnFocus:!1}),Je=Xe.data,en=Xe.mutate,nn=(0,a.useMemo)((function(){return(null===ze||void 0===ze?void 0:ze[A.$1.HISTORY_DAYS])||7}),[ze]),tn=F.ZP.pipelines.list(ke(ke({},Qe),{},(e={},(0,r.Z)(e,A.$1.HISTORY_DAYS,(0,ve.HW)(nn)?Number(nn):nn),(0,r.Z)(e,"include_schedules",1),e)),{},{pauseFetch:!qe||!Ve||Ie.uuid!==Ve}),un=tn.data,on=tn.mutate,rn=(0,a.useCallback)((function(e){return e}),[]),ln=(0,a.useMemo)((function(){var e=rn((null===Je||void 0===Je?void 0:Je.pipelines)||[]);if(null!==ze&&void 0!==ze&&ze[A.$1.TAG]){var n=ze[A.$1.TAG];e=e.filter((function(e){var i=e.tags;return i.some((function(e){return n.includes(e)}))||0===i.length&&n.includes(A.$1.NO_TAGS)}))}return e}),[Je,rn,ze]),cn=(0,a.useMemo)((function(){return rn((null===un||void 0===un?void 0:un.pipelines)||[])}),[un,rn]),sn=(0,a.useMemo)((function(){return[1,2,3,4,5,6,8,9]}),[]),dn=null===ze||void 0===ze?void 0:ze[pe.lG.SORT_COL_IDX],an=null===ze||void 0===ze?void 0:ze[pe.lG.SORT_DIRECTION],pn=(0,a.useMemo)((function(){return dn?{columnIndex:+dn,sortDirection:an||pe.sh.ASC}:void 0}),[dn,an]),fn=null===ze||void 0===ze?void 0:ze[A.$1.GROUP],vn=(0,p.Db)((function(e){var n=e.pipelineUUID,i=e.filesOnly,t=void 0!==i&&i;return F.ZP.downloads.pipelines.useCreate(n)({download:{ignore_folder_structure:t}})}),{onSuccess:function(e){return(0,me.wD)(e,{callback:function(){var n=e.data.download.token;(0,ye.K)(n)},onErrorCallback:function(e,n){return Ye({errors:n,response:e})}})}}),hn=(0,u.Z)(vn,1)[0];(0,a.useEffect)((function(){null!==Qe&&void 0!==Qe&&Qe[A.$1.SEARCH]&&null===Ge&&$e(null===Qe||void 0===Qe?void 0:Qe[A.$1.SEARCH])}),[Qe,Ge,$e]),(0,a.useEffect)((function(){var e,n={};if(!dn){var i=(0,J.U2)(ie,null),t=(0,J.U2)(te,pe.sh.ASC);null!==i&&(n[pe.lG.SORT_COL_IDX]=i,n[pe.lG.SORT_DIRECTION]=t)}qe&&(Ve?(0,J.t8)(ue,Ve):n.tab=(0,J.U2)(ue,null===Se||void 0===Se||null===(e=Se[0])||void 0===e?void 0:e.uuid));if(fn)re((0,r.Z)({},fn,!0));else{var o,l=(0,J.U2)(ne,{});l&&Object.entries(l).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];!o&&t&&(o=i)})),o&&(n[A.$1.GROUP]=o)}if((0,Ze.Qr)(Qe)){var c=(0,r.Z)({},le.$D.LIMIT,E.Q),s=(0,J.U2)(ee,{});s&&Object.entries(s).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];"undefined"!==typeof t&&null!==t&&(le.RG.includes(i)||Ee.includes(i)?c[i]=t:(c[i]=[],Object.entries(t).forEach((function(e){var n=(0,u.Z)(e,2),t=n[0];n[1]&&c[i].push(t)}))))})),(0,Ze.Qr)(c)||(n={},Object.entries(ke(ke({},n),c)||{}).forEach((function(e){var i=(0,u.Z)(e,2),t=i[0],o=i[1];"undefined"!==typeof o&&null!==o&&(n[t]=o)})))}else{var d={};Object.entries(Qe).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];d[i]={};var o,r=t;"undefined"!==typeof t&&null!==t&&(le.RG.includes(i)||Ee.includes(i)?d[i]=r:(Array.isArray(r)||(r=[r]),r&&Array.isArray(r)&&(null===(o=r)||void 0===o||o.forEach((function(e){d[i][e]=!0})))))})),oe((0,Ze.hB)(d))}(0,Ze.Qr)(n)||(0,je.u)((0,Ze.hB)(n),{pushHistory:!1})}),[fn,qe,Qe,Ve,sn,dn,an]),(0,a.useEffect)((function(){(0,me.bB)(Je,Ye)}),[Je]);var mn=function(e){return(0,p.Db)(F.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,me.wD)(n,{callback:function(n){var i=n.pipeline.uuid;null===e||void 0===e||e(i)},onErrorCallback:function(e,n){return Ye({errors:n,response:e})}})}})},bn=mn((function(e){return n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))})),gn=(0,u.Z)(bn,2),jn=gn[0],Zn=gn[1].isLoading,xn=mn((function(){null===en||void 0===en||en(),null===on||void 0===on||on()})),_n=(0,u.Z)(xn,2),Cn=_n[0],wn=_n[1].isLoading,yn=(0,p.Db)((function(e){return F.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,me.wD)(e,{callback:function(e){var n=e.pipeline.uuid;Be((function(e){return ke(ke({},e),{},(0,r.Z)({},n,!1))})),en(),null===on||void 0===on||on(),null===Rn||void 0===Rn||Rn(),Me(null)},onErrorCallback:function(e,n){var i,t=null===e||void 0===e||null===(i=e.url_parameters)||void 0===i?void 0:i.pk;Be((function(e){return ke(ke({},e),{},(0,r.Z)({},t,!1))})),Ye({errors:n,response:e})}})}}),Pn=(0,u.Z)(yn,2),kn=Pn[0],In=Pn[1].isLoading,Tn=(0,p.Db)((function(e){return F.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,me.wD)(e,{callback:function(){null===en||void 0===en||en(),null===on||void 0===on||on()},onErrorCallback:function(e,n){return Ye({errors:n,response:e})}})}}),Sn=(0,u.Z)(Tn,2),On=Sn[0],En=Sn[1].isLoading,An=(0,we.dd)((function(e){var n=e.pipeline,i=e.pipelineDescription,t=e.pipelineName;return(0,T.jsx)(S,{isLoading:In,minWidth:55*de.iI,noEmptyValue:!!t,onClose:Rn,onSave:function(e){var i=n||De;if(i){var u=i.uuid,o={uuid:u};t?o.name=e:o.description=e,Be((function(e){return ke(ke({},e),{},(0,r.Z)({},u,!0))})),kn(o)}},textArea:!t,title:t?"Rename pipeline":"Edit description for ".concat(null===n||void 0===n?void 0:n.uuid),value:t||i})}),{},[In,De],{background:!0,uuid:"rename_pipeline_and_save"}),Dn=(0,u.Z)(An,2),Mn=Dn[0],Rn=Dn[1],Gn=(0,we.dd)((function(){return(0,T.jsx)(H.Z,{fetchPipelines:en,onCancel:Un})}),{},[en],{background:!0,uuid:"upload_pipeline"}),$n=(0,u.Z)(Gn,2),Nn=$n[0],Un=$n[1],Ln=(0,we.dd)((function(){return(0,T.jsx)(q.BC,{children:(0,T.jsx)(h.Z,{contained:!0,onClickCustomTemplate:function(e){jn({pipeline:{custom_template_uuid:null===e||void 0===e?void 0:e.template_uuid,name:(0,ve.Y6)()}}).then((function(){Fn()}))},showBreadcrumbs:!0,tabs:[ce.A2]})})}),{},[jn],{background:!0,uuid:"browse_templates"}),Bn=(0,u.Z)(Ln,2),Hn=Bn[0],Fn=Bn[1],Yn=(0,we.dd)((function(e){var n=e.cancelButtonText,i=(e.header,e.onCancel),t=e.onSaveSuccess;return(0,T.jsx)(q.BC,{children:(0,T.jsx)(D.Z,{cancelButtonText:n,contained:!0,header:(0,T.jsx)(y.Z,{mb:de.HN,children:(0,T.jsxs)(w.Z,{children:[(0,T.jsx)(P.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,T.jsx)(y.Z,{mt:1,children:(0,T.jsxs)(P.ZP,{warning:!0,children:["Read ",(0,T.jsx)(O.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onCancel:function(){null===i||void 0===i||i(),Vn()},onSaveSuccess:function(e){C(),Vn(),null===t||void 0===t||t(e)}})})}),{},[C],{background:!0,uuid:"configure_project"}),zn=(0,u.Z)(Yn,2),Qn=zn[0],Vn=zn[1],Wn=(0,we.dd)((function(){return(0,T.jsx)(q.BC,{children:(0,T.jsx)(v.Z,{createPipeline:jn,isLoading:Zn,onClose:Xn})})}),{},[jn,Zn],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),qn=(0,u.Z)(Wn,2),Kn=qn[0],Xn=qn[1],Jn=(0,a.useMemo)((function(){return(0,ge.d)(jn,{showImportPipelineModal:Nn,showAIModal:function(){null!==k&&void 0!==k&&k.openai_api_key?Kn():Qn({onSaveSuccess:function(){Kn()}})},showBrowseTemplates:Hn})}),[jn,k,Kn,Hn,Qn,Nn]),ei=F.ZP.tags.list().data,ni=(0,a.useMemo)((function(){return(0,_e.YC)((null===ei||void 0===ei?void 0:ei.tags)||[],(function(e){return e.uuid}))}),[ei]),ii=(0,a.useMemo)((function(){return(0,T.jsx)(B.Z,{addButtonProps:{isLoading:Zn,label:"New",menuItems:Jn},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:En,item:"pipeline",onDelete:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===De||void 0===De?void 0:De.uuid,"?"))&&On(null===De||void 0===De?void 0:De.uuid)}},extraActionButtonProps:{Icon:W.Clone,confirmationDescription:"Cloning the selected pipeline will create a new pipeline with the same configuration and code blocks. The blocks use the same block files as the original pipeline. Pipeline triggers, runs, backfills, and logs are not copied over to the new pipeline.",confirmationMessage:"Do you want to clone the pipeline ".concat(null===De||void 0===De?void 0:De.uuid,"?"),isLoading:wn,onClick:function(){return Cn({pipeline:{clone_pipeline_uuid:null===De||void 0===De?void 0:De.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},filterOptions:{status:A.kA,tag:[A.$1.NO_TAGS].concat((0,o.Z)(ni.map((function(e){return e.uuid})))),type:Object.values(A.qL)},filterValueLabelMapping:{status:A.kA.reduce((function(e,n){return ke(ke({},e),{},(0,r.Z)({},n,(0,ve.J3)((0,ve.kC)(n))))}),{}),tag:ke((0,r.Z)({},A.$1.NO_TAGS,"No tags"),ni.reduce((function(e,n){var i=n.uuid;return ke(ke({},e),{},(0,r.Z)({},i,i))}),{})),type:A.G7},groupButtonProps:{groupByLabel:fn,menuItems:[{beforeIcon:fn===A.r0.STATUS?(0,T.jsx)(W.Check,{fill:Y.Z.content.default,size:1.5*de.iI}):(0,T.jsx)(W.Circle,{muted:!0,size:1.5*de.iI}),label:function(){return(0,ve.kC)(A.r0.STATUS)},onClick:function(){var e=fn===A.r0.STATUS?null:A.r0.STATUS;e||re({}),(0,je.u)((0,r.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:fn===A.r0.TAG?(0,T.jsx)(W.Check,{fill:Y.Z.content.default,size:1.5*de.iI}):(0,T.jsx)(W.Circle,{muted:!0,size:1.5*de.iI}),label:function(){return(0,ve.kC)(A.r0.TAG)},onClick:function(){var e=fn===A.r0.TAG?null:A.r0.TAG;e||re({}),(0,je.u)((0,r.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Tag"},{beforeIcon:fn===A.r0.TYPE?(0,T.jsx)(W.Check,{fill:Y.Z.content.default,size:1.5*de.iI}):(0,T.jsx)(W.Circle,{muted:!0,size:1.5*de.iI}),label:function(){return(0,ve.kC)(A.r0.TYPE)},onClick:function(){var e=fn===A.r0.TYPE?null:A.r0.TYPE;e||re({}),(0,je.u)((0,r.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return Mn({pipelineName:null===De||void 0===De?void 0:De.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return Mn({pipeline:De,pipelineDescription:null===De||void 0===De?void 0:De.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],onClickFilterDefaults:function(){var e;oe({}),$e(""),(0,je.u)((e={},(0,r.Z)(e,le.$D.LIMIT,(null===Qe||void 0===Qe?void 0:Qe[le.$D.LIMIT])||E.Q),(0,r.Z)(e,A.$1.SEARCH,""),e),{replaceParams:!0})},onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!==e&&void 0!==e&&e.length)}))&&oe({})},query:Qe,resetLimitOnFilterApply:!0,searchProps:{onChange:Ne,value:Ge},selectedRowId:null===De||void 0===De?void 0:De.uuid,setSelectedRow:Me})}),[Cn,On,fn,wn,Zn,En,Jn,Qe,Ge,De,Ne,Mn,ni]),ti=(0,q.VI)(null,{},[],{uuid:"pipelines/list"}),ui=(0,u.Z)(ti,1)[0],oi=(0,p.Db)(F.ZP.projects.useUpdate(null===k||void 0===k?void 0:k.name),{onSuccess:function(e){return(0,me.wD)(e,{callback:function(){C()},onErrorCallback:function(e,n){return ui({errors:n,response:e})}})}}),ri=(0,u.Z)(oi,2),li=ri[0],ci=ri[1].isLoading,si=(0,a.useCallback)((function(e){return li({project:e})}),[li]),di=(0,we.dd)((function(){return(0,T.jsxs)(w.Z,{maxWidth:60*de.iI,children:[(0,T.jsx)(y.Z,{mb:1,children:(0,T.jsx)(_.Z,{children:"Help improve Mage"})}),(0,T.jsx)(y.Z,{mb:de.cd,children:(0,T.jsx)(P.ZP,{default:!0,children:"Please contribute usage statistics to help improve the developer experience for you and everyone in the community \ud83e\udd1d."})}),(0,T.jsx)(y.Z,{mb:de.cd,children:(0,T.jsx)(w.Z,{success:!0,children:(0,T.jsxs)(x.ZP,{alignItems:"center",children:[(0,T.jsx)(W.Secrets,{size:5*de.iI,success:!0}),(0,T.jsx)(y.Z,{mr:1}),(0,T.jsx)(Z.Z,{children:(0,T.jsx)(P.ZP,{children:"All usage statistics are completely anonymous. It\u2019s impossible for Mage to know which statistics belongs to whom."})})]})})}),(0,T.jsx)(y.Z,{mb:de.cd,children:(0,T.jsxs)(P.ZP,{default:!0,children:["By opting into sending usage statistics to ",(0,T.jsx)(O.Z,{href:"https://www.mage.ai",openNewWindow:!0,children:"Mage"}),", it\u2019ll help the team and community of contributors (",(0,T.jsx)(O.Z,{href:"https://www.mage.ai/chat",openNewWindow:!0,children:"Magers"}),") learn what\u2019s going wrong with the tool and what improvements can be made."]})}),(0,T.jsx)(y.Z,{mb:de.cd,children:(0,T.jsx)(P.ZP,{default:!0,children:"In addition to helping reduce potential errors, you\u2019ll help inform which features are useful and which need work."})}),(0,T.jsx)(y.Z,{mb:de.cd,children:(0,T.jsxs)(x.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,T.jsx)(P.ZP,{bold:!0,children:"I want to help make Mage more powerful for everyone"}),(0,T.jsx)(y.Z,{mr:de.cd}),(0,T.jsx)(L.Z,{checked:!0,onCheck:function(){window.confirm("Are you sure you don\u2019t want to help everyone in the community?")&&si({deny_improve_mage:!0,help_improve_mage:!1}).then((function(){return fi()}))}})]})}),ci&&(0,T.jsx)(y.Z,{mb:de.cd,children:(0,T.jsx)($.Z,{inverted:!0})}),(0,T.jsx)(y.Z,{mb:de.cd,children:(0,T.jsxs)(P.ZP,{muted:!0,small:!0,children:["To learn more about how this works, please check out the ",(0,T.jsx)(O.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,small:!0,children:"documentation"}),"."]})}),(0,T.jsx)(m.ZP,{"data-testid":"help_mage_close_button",onClick:function(){return si({help_improve_mage:!0}).then((function(){return fi()}))},secondary:!0,children:"Close"})]})}),{},[k],{background:!0,hideCallback:function(){si({help_improve_mage:!0})},uuid:"help_mage"}),ai=(0,u.Z)(di,2),pi=ai[0],fi=ai[1];(0,a.useEffect)((function(){k&&null===(null===k||void 0===k?void 0:k.help_improve_mage)&&pi()}),[k,pi]);var vi=(0,a.useCallback)((function(e){var n={};null===e||void 0===e||e.forEach((function(e,i){var t=null===e||void 0===e?void 0:e[fn];if(A.r0.STATUS===fn){var u=(e||{}).schedules,o=void 0===u?[]:u,r=o.length;t=o.find((function(e){var n=e.status;return ae.fq.ACTIVE===n}))?A.QK.ACTIVE:r>=1?A.QK.INACTIVE:A.QK.NO_SCHEDULES}else if(A.r0.TAG===fn){t=(null===e||void 0===e?void 0:e.tags)?(0,_e.YC)(e.tags,(function(e){return e})).join(", "):""}n[t]||(n[t]=[]),n[t].push(i)}));var i=[],t=[];A.r0.STATUS===fn?Object.values(A.QK).forEach((function(e){i.push(n[e]),t.push((0,ve.vg)(e))})):A.r0.TAG===fn?(0,_e.YC)(Object.keys(n),(function(e){return e})).forEach((function(e){i.push(n[e]),e?t.push(e.split(", ").map((function(e,n){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{style:{marginLeft:n>=1?4:0}},"".concat(e,"-").concat(n,"-spacing")),(0,T.jsx)(g.Z,{small:!0,children:(0,T.jsx)(P.ZP,{children:e})},"".concat(e,"-").concat(n))]})}))):t.push("No tags")})):A.r0.TYPE===fn&&Object.values(A.qL).forEach((function(e){i.push(n[e]),t.push(A.G7[e])}));var u=[],o=[];return null===i||void 0===i||i.forEach((function(e,n){"undefined"!==typeof e&&null!==e&&(null===e||void 0===e?void 0:e.length)>=1&&(o.push(e),u.push(null===t||void 0===t?void 0:t[n]))})),{rowGroupHeaders:u,rowsGroupedByIndex:o}}),[fn]),hi=(0,a.useMemo)((function(){return vi(ln)}),[vi,ln]),mi=hi.rowGroupHeaders,bi=hi.rowsGroupedByIndex,gi=(0,a.useMemo)((function(){return vi(cn)}),[vi,cn]),ji=gi.rowGroupHeaders,Zi=gi.rowsGroupedByIndex,xi=(0,a.useCallback)((function(e,i,u){return(0,T.jsx)(N.Z,{columnFlex:[null,null,null,2,null,null,null,1,null,null,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,ve.kC)(A.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,ve.kC)(A.r0.TYPE)},ke(ke({},Ke),{},{uuid:"Updated at"}),ke(ke({},Ke),{},{uuid:"Created at"}),{uuid:"Tags"},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,label:function(){return""},uuid:"Actions"}],isSelectedRow:function(n){var i;return(null===(i=e[n])||void 0===i?void 0:i.uuid)===(null===De||void 0===De?void 0:De.uuid)},localStorageKeySortColIdx:ie,localStorageKeySortDirection:te,onClickRow:function(n){return Me((function(i){var t=e[n];return(null===i||void 0===i?void 0:i.uuid)!==(null===t||void 0===t?void 0:t.uuid)?t:null}))},onDoubleClickRow:function(i){n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e[i].uuid,"/edit"))},ref:t,renderRightClickMenuItems:function(i){var t=e[i];return[{label:function(){return"Edit description"},onClick:function(){return Mn({pipeline:t,pipelineDescription:null===t||void 0===t?void 0:t.description})},uuid:"edit_description"},{label:function(){return"Rename"},onClick:function(){return Mn({pipeline:t,pipelineName:null===t||void 0===t?void 0:t.name})},uuid:"rename"},{label:function(){return"Clone"},onClick:function(){return Cn({pipeline:{clone_pipeline_uuid:null===t||void 0===t?void 0:t.uuid}})},uuid:"clone"},{label:function(){return"Download (keep folder structure)"},onClick:function(){hn({filesOnly:!1,pipelineUUID:null===t||void 0===t?void 0:t.uuid})},uuid:"download_keep_folder_structure"},{label:function(){return"Download (without folder structure)"},onClick:function(){hn({filesOnly:!0,pipelineUUID:null===t||void 0===t?void 0:t.uuid})},uuid:"download_without_folder_structure"},{label:function(){return"Add/Remove tags"},onClick:function(){n.push("/pipelines/[pipeline]/settings","/pipelines/".concat(null===t||void 0===t?void 0:t.uuid,"/settings"))},uuid:"add_tags"},{label:function(){return"Create template"},onClick:function(){n.push("/templates?object_type=".concat(se.R,"&new=1&pipeline_uuid=").concat(null===t||void 0===t?void 0:t.uuid))},uuid:"create_custom_template"},{label:function(){return"Create global data product"},onClick:function(){n.push("/global-data-products?object_type=".concat(K.b.PIPELINE,"&new=1&object_uuid=").concat(null===t||void 0===t?void 0:t.uuid))},uuid:"create_global_data_product"},{label:function(){return"Delete"},onClick:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===t||void 0===t?void 0:t.uuid,"?"))&&On(null===t||void 0===t?void 0:t.uuid)},uuid:"delete"}]},rightClickMenuHeight:252,rightClickMenuWidth:30*de.iI,rowGroupHeaders:i,rows:null===e||void 0===e?void 0:e.map((function(e,i){var t=e.blocks,u=e.created_at,o=e.description,l=e.schedules,c=e.tags,s=e.type,a=e.updated_at,p=e.uuid,f=t.filter((function(e){var n=e.type;return V.tf.SCRATCHPAD!==n})).length,v=l.length,h=l.find((function(e){var n=e.status;return ae.fq.ACTIVE===n})),b=s===A.ad,g=(0,T.jsx)("div",{children:(0,T.jsx)(U.Z,{tags:null===c||void 0===c?void 0:c.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(i));return[v>=1||Le[p]?(0,T.jsx)(m.ZP,{iconOnly:!0,loading:!!Le[p],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,xe.j)(n),Be((function(e){return ke(ke({},e),{},(0,r.Z)({},p,!0))})),kn(ke(ke({},e),{},{status:h?ae.fq.INACTIVE:ae.fq.ACTIVE}))},children:h?(0,T.jsx)(W.Pause,{muted:!0,size:2*de.iI}):(0,T.jsx)(W.PlayButtonFilled,{default:!0,size:2*de.iI})}):null,(0,T.jsx)(P.ZP,{default:!h,monospace:!0,success:!!h,children:h?ae.fq.ACTIVE:v>=1?ae.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(i)),(0,T.jsx)(d(),{as:"/pipelines/".concat(p),href:"/pipelines/[pipeline]",passHref:!0,children:(0,T.jsx)(O.Z,{sameColorAsText:!0,children:p})},"pipeline_name_".concat(i)),(0,T.jsx)(P.ZP,{default:!0,preWrap:!0,title:o,children:o},"pipeline_description_".concat(i)),(0,T.jsx)(P.ZP,{bold:b,danger:b,children:b?(0,ve.kC)(A.ad):A.G7[s]},"pipeline_type_".concat(i)),(0,T.jsx)(P.ZP,{monospace:!0,small:!0,title:a?(0,he._6)(a):null,children:a?(0,he.XG)((0,he.d$)(a,{includeSeconds:!0,utcFormat:!0}),We):(0,T.jsx)(T.Fragment,{children:"\u2014"})},"pipeline_updated_at_".concat(i)),(0,T.jsx)(P.ZP,{monospace:!0,small:!0,title:u?(0,he._6)(u):null,children:u?(0,he.XG)(u.slice(0,19),We):(0,T.jsx)(T.Fragment,{children:"\u2014"})},"pipeline_created_at_".concat(i)),g,(0,T.jsx)(P.ZP,{default:0===f,monospace:!0,children:f},"pipeline_block_count_".concat(i)),(0,T.jsx)(P.ZP,{default:0===v,monospace:!0,children:v},"pipeline_trigger_count_".concat(i)),(0,T.jsxs)(Z.Z,{flex:1,justifyContent:"flex-end",children:[(0,T.jsx)(m.ZP,ke(ke({},Ae),{},{onClick:function(){hn({pipelineUUID:p})},title:"Download (keep folder structure)",children:(0,T.jsx)(W.Save,{default:!0,size:2*de.iI})})),(0,T.jsx)(y.Z,{mr:1}),(0,T.jsx)(m.ZP,ke(ke({},Ae),{},{onClick:function(){n.push("/pipelines/[pipeline]","/pipelines/".concat(p))},title:"Detail",children:(0,T.jsx)(W.Open,{default:!0,size:2*de.iI})})),(0,T.jsx)(y.Z,{mr:1}),(0,T.jsx)(m.ZP,ke(ke({},Ae),{},{onClick:function(){n.push("/pipelines/[pipeline]/logs","/pipelines/".concat(p,"/logs"))},title:"Logs",children:(0,T.jsx)(W.File,{default:!0,size:2*de.iI})}))]},"chevron_icon_".concat(i))]})),rowsGroupedByIndex:u,sortableColumnIndexes:sn,sortedColumn:pn,stickyHeader:!0,uuid:"pipelines_table"})}),[Cn,On,hn,We,Le,n,De,Be,Me,Mn,sn,pn,Ke,kn]),_i=(0,a.useMemo)((function(){return xi(ln,mi,bi)}),[ln,xi,mi,bi]),Ci=(0,a.useMemo)((function(){return xi(cn,ji,Zi)}),[cn,xi,ji,Zi]),wi=(0,a.useMemo)((function(){return(null===ln||void 0===ln?void 0:ln.length)||0}),[ln]),yi=(0,a.useMemo)((function(){return(null===cn||void 0===cn?void 0:cn.length)||0}),[cn]),Pi=(0,a.useMemo)((function(){return(!qe||Te.uuid===Ve)&&!wi||qe&&Ie.uuid===Ve&&!yi}),[qe,wi,yi,Ve]),ki=(0,a.useMemo)((function(){var e=null===Qe||void 0===Qe?void 0:Qe[le.$D.LIMIT];return(0,T.jsxs)(x.ZP,{alignItems:"center",children:[(0,T.jsx)(P.ZP,{muted:!0,small:!0,children:"Per page"}),(0,T.jsx)(y.Z,{mr:1}),(0,T.jsxs)(G.Z,{compact:!0,onChange:function(e){var n;return(0,je.u)((n={},(0,r.Z)(n,le.$D.LIMIT,e.target.value),(0,r.Z)(n,le.$D.OFFSET,0),n),{pushHistory:!0})},small:!0,value:e,children:[e&&(e>5*E.Q||e%E.Q)&&(0,T.jsx)("option",{value:e,children:e}),(0,_e.w6)(5).map((function(e,n){var i=(n+1)*E.Q;return(0,T.jsx)("option",{value:i,children:i},i)}))]})]})}),[Qe]),Ii=(0,a.useMemo)((function(){var e,n,i=Je;qe&&Ie.uuid===Ve&&(i=un);var t=(null===(e=i)||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.count)||0,u=(null===Qe||void 0===Qe?void 0:Qe[le.$D.LIMIT])||E.Q,o=(null===Qe||void 0===Qe?void 0:Qe[le.$D.OFFSET])||0,l=Math.ceil(t/u);return(0,T.jsx)(y.Z,{p:de.cd,children:(0,T.jsx)(E.ZP,{maxPages:E.Et,onUpdate:function(e){var n=Number(e);(0,je.u)((0,r.Z)({},le.$D.OFFSET,n*u))},page:Math.floor(o/u),totalPages:l})})}),[Je,un,qe,Qe,Ve]);return(0,T.jsxs)(j.Z,{errors:Fe,setErrors:Ye,subheaderChildren:(0,T.jsxs)(x.ZP,{alignItems:"center",justifyContent:"space-between",children:[ii,ki]}),title:"Pipelines",uuid:"pipelines/index",children:[qe&&(0,T.jsx)(y.Z,{px:de.cd,ref:i,children:(0,T.jsx)(b.Z,{noPadding:!0,onClickTab:function(e){var n,i=e.uuid;return(0,je.u)((n={},(0,r.Z)(n,Oe,i),(0,r.Z)(n,le.$D.OFFSET,0),n),{pushHistory:!0})},regularSizeText:!0,selectedTabUUID:Ve,tabs:Se.map((function(e){var n=e.Icon,i=e.label;return{Icon:n,label:function(){var e;return i({count:null===Je||void 0===Je||null===(e=Je.metadata)||void 0===e?void 0:e.count})},uuid:e.uuid}})),underlineStyle:!0})}),Pi?(0,T.jsx)(y.Z,{p:de.Mq,children:Je?(0,T.jsx)(P.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,T.jsx)($.Z,{inverted:!0,large:!0})}):null,(0,T.jsxs)(fe.cl,{hide:Pi,includePadding:!!fn,maxHeight:"calc(100vh - ".concat(X.Mz+74+(M||44)+68,"px)"),children:[(!qe||Te.uuid===Ve)&&_i,qe&&Ie.uuid===Ve&&Ci]}),(0,T.jsx)("div",{ref:l,children:Ii})]})}De.getInitialProps=(0,t.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var Me=(0,M.Z)(De)},79274:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return i(55620)}])},80022:function(e,n,i){"use strict";function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}i.d(n,{Z:function(){return t}})},15544:function(e,n,i){"use strict";function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}i.d(n,{Z:function(){return t}})},13692:function(e,n,i){"use strict";i.d(n,{Z:function(){return u}});var t=i(61049);function u(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,t.Z)(e,n)}},93189:function(e,n,i){"use strict";i.d(n,{Z:function(){return o}});var t=i(12539),u=i(80022);function o(e,n){if(n&&("object"===t(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,u.Z)(e)}}},function(e){e.O(0,[1557,4241,5544,523,3548,181,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3605],{55729:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(82394),i=n(75582),o=n(82684),c=n(69864),l=n(71180),s=n(15338),u=n(97618),d=n(55485),a=n(85854),p=n(48670),j=n(65956),f=n(82359),h=n(88543),v=n(38276),g=n(30160),m=n(17488),Z=n(69650),x=n(12468),b=n(35686),y=n(77417),O=n(25976),P=n(44897),_=n(42631),w=n(70515),k=O.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],_.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||P.Z.background).codeArea,";\n ")})),E=n(72473),C=n(72191),S=n(70320),D=n(81728),I=n(42122),N=n(72619),L=n(23780),A=n(28598);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=function(e){var t,n,O,P=e.cancelButtonText,_=e.contained,H=e.header,M=e.onCancel,T=e.onSaveSuccess,F=e.rootProject,B=(0,L.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),U=(0,i.Z)(B,1)[0],V=(0,o.useState)(null),W=V[0],X=V[1],q=(0,o.useState)(!1),z=q[0],G=q[1],J=(0,y.Z)(),Y=J.fetchProjects,K=J.project,Q=J.projectPlatformActivated,$=J.rootProject,ee=(0,o.useMemo)((function(){return F?$:K}),[K,$,F]),te=ee||{},ne=te.name,re=te.openai_api_key,ie=te.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){W||X(ee)}),[ee,W]);var ce=(0,c.Db)(b.ZP.projects.useUpdate(ne),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){var t,n=e.project;Y(),X(n),G(!1),(0,S.hY)(null===n||void 0===n||null===(t=n.features)||void 0===t?void 0:t[f.d.LOCAL_TIMEZONE]),T&&(null===T||void 0===T||T(n))},onErrorCallback:function(e,t){return U({errors:t,response:e})}})}}),le=(0,i.Z)(ce,2),se=le[0],ue=le[1].isLoading,de=(0,o.useCallback)((function(e){return se({project:R(R({},e),{},{root_project:F})})}),[F,se]),ae=(0,A.jsxs)(A.Fragment,{children:[H,(0,A.jsxs)(j.Z,{noPadding:!0,children:[(0,A.jsxs)(v.Z,{p:w.cd,children:[(0,A.jsx)(v.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Project name"})}),(0,A.jsx)(g.ZP,{default:!0,monospace:!0,children:ne})]}),(0,A.jsx)(s.Z,{light:!0}),(0,A.jsxs)(v.Z,{p:w.cd,children:[(0,A.jsx)(v.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,A.jsx)(g.ZP,{default:!!ie,monospace:!0,muted:!ie,children:ie||"Not required"})]}),(0,A.jsx)(s.Z,{light:!0}),(0,A.jsx)(v.Z,{p:w.cd,children:(0,A.jsxs)(d.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,A.jsxs)(u.Z,{flexDirection:"column",children:[(0,A.jsx)(v.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,A.jsxs)(g.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,A.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,A.jsx)(v.Z,{mr:w.cd}),(0,A.jsx)(Z.Z,{compact:!0,checked:null===W||void 0===W?void 0:W.help_improve_mage,onCheck:function(){return X((function(e){return R(R({},e),{},{help_improve_mage:!(null!==W&&void 0!==W&&W.help_improve_mage)})}))}})]})})]}),(0,A.jsx)(v.Z,{mt:w.HN}),(0,A.jsx)(h.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,A.jsx)(h.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===W||void 0===W||null===(t=W.pipelines)||void 0===t||null===(n=t.settings)||void 0===n||null===(O=n.triggers)||void 0===O||!O.save_in_code_automatically),onCheck:function(e){return X((function(t){var n,r,i,o,c,l;return R(R({},t),{},{pipelines:R(R({},null===t||void 0===t?void 0:t.pipelines),{},{settings:R(R({},null===t||void 0===t||null===(n=t.pipelines)||void 0===n?void 0:n.settings),{},{triggers:R(R({},null===t||void 0===t||null===(r=t.pipelines)||void 0===r||null===(i=r.settings)||void 0===i?void 0:i.triggers),{},{save_in_code_automatically:e(null===t||void 0===t||null===(o=t.pipelines)||void 0===o||null===(c=o.settings)||void 0===c||null===(l=c.triggers)||void 0===l?void 0:l.save_in_code_automatically)})})})})}))}}})}),(0,A.jsx)(v.Z,{mt:w.HN}),(0,A.jsx)(j.Z,{noPadding:!0,overflowVisible:!0,children:(0,A.jsxs)(v.Z,{p:w.cd,children:[(0,A.jsx)(v.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((0,I.gR)(null===W||void 0===W?void 0:W.features,[{}])||{}).map((function(e,t){var n=(0,i.Z)(e,2),o=n[0],c=n[1],l=Q&&!F&&(null===ee||void 0===ee?void 0:ee.features_override)&&o in(null===ee||void 0===ee?void 0:ee.features_override);return(0,A.jsx)(v.Z,{mt:0===t?0:1,children:(0,A.jsxs)(d.ZP,{alignItems:"center",children:[(0,A.jsxs)(u.Z,{flex:1,children:[(0,A.jsx)(Z.Z,{disabled:l,checked:!!c,compact:!0,onCheck:function(){return X((function(e){return R(R({},e),{},{features:R(R({},null===W||void 0===W?void 0:W.features),{},(0,r.Z)({},o,!c))})}))}}),(0,A.jsx)(v.Z,{mr:w.cd}),(0,A.jsxs)(u.Z,{children:[(0,A.jsx)(g.ZP,{default:!c,monospace:!0,children:(0,D.vg)(o)}),o===f.d.LOCAL_TIMEZONE&&(0,A.jsx)(v.Z,{ml:1,children:(0,A.jsx)(x.Z,R({},S.EB))})]})]}),l&&(0,A.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,A.jsx)(v.Z,{mt:w.HN}),(0,A.jsx)(j.Z,{noPadding:!0,children:(0,A.jsxs)(v.Z,{p:w.cd,children:[(0,A.jsx)(v.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"OpenAI"})}),re&&!z?(0,A.jsxs)(d.ZP,R(R({},d.A0),{},{children:[(0,A.jsx)(g.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,A.jsx)(l.ZP,{iconOnly:!0,onClick:function(){return G(!0)},secondary:!0,title:"Edit",children:(0,A.jsx)(E.Edit,{size:C.bL})})]})):(0,A.jsx)(m.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return X((function(t){return R(R({},t),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===W||void 0===W?void 0:W.openai_api_key)||""})]})}),(0,A.jsx)(v.Z,{mt:w.HN}),(0,A.jsxs)(d.ZP,{alignItems:"center",children:[(0,A.jsx)(l.ZP,{id:"save-project-settings",loading:ue,onClick:function(){de({features:null===W||void 0===W?void 0:W.features,help_improve_mage:null===W||void 0===W?void 0:W.help_improve_mage,openai_api_key:null===W||void 0===W?void 0:W.openai_api_key,pipelines:null===W||void 0===W?void 0:W.pipelines})},primary:!0,children:"Save project settings"}),M&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(v.Z,{mr:w.cd}),(0,A.jsx)(l.ZP,{onClick:M,secondary:!0,children:P||"Cancel"})]})]})]});return _?(0,A.jsx)(k,{children:ae}):ae}},46568:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=(n(82684),n(33591)),c=n(28598),l=["children","fullHeight","gutter","style"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,s=e.style,d=void 0===s?{}:s,a=(0,i.Z)(e,l),p=u({},d);return r&&(p.paddingLeft=r,p.paddingRight=p.paddingLeft),n&&(p.height="100%"),(0,c.jsx)(o.Col,u(u({},a),{},{style:p,children:t}))}},82682:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=n(82684),c=n(33591),l=n(28598),s=["children","fullHeight","gutter","justifyContent","style"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,u=e.justifyContent,a=e.style,p=void 0===a?{}:a,j=(0,i.Z)(e,s),f=d({},p);return r&&(f.marginLeft=-1*r,f.marginRight=f.marginLeft),n&&(f.height="100%"),(0,l.jsx)(c.Row,d(d({},j),{},{justifyContent:u,style:f,children:o.Children.map(t,(function(e,t){return e&&o.cloneElement(e,{gutter:r,key:t})}))}))}},70791:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(38860),o=n.n(i),c=n(46568),l=n(55729),s=n(93808),u=n(82682),d=n(28274),a=n(38276),p=n(70515),j=n(24755),f=n(28598);function h(){return(0,f.jsx)(d.Z,{uuidItemSelected:j.B2.PREFERENCES,uuidWorkspaceSelected:j.Pl.PROJECT_PLATFORM,children:(0,f.jsx)(a.Z,{p:p.cd,children:(0,f.jsx)(u.Z,{justifyContent:"center",children:(0,f.jsx)(c.Z,{xl:8,xxl:6,children:(0,f.jsx)(l.Z,{rootProject:!0})})})})})}h.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,s.Z)(h)},8071:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/platform/preferences",function(){return n(70791)}])}},function(e){e.O(0,[1557,5699,9774,2888,179],(function(){return t=8071,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3112],{80754:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return D}});var n=r(77837),o=r(38860),i=r.n(o),c=r(93808),s=r(82394),l=r(75582),u=r(82684),a=r(69864),d=r(21764),p=r(32013),f=r(98777),j=r(71180),v=r(15338),h=r(55485),g=r(88543),m=r(38276),x=r(30160),P=r(35686),b=r(77417),Z=r(72473),O=r(70515),S=r(81728),w=r(42122),y=r(72619),k=r(23780),I=r(28598);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){(0,s.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var T=function(){var e,t=(0,k.VI)(null,{},[],{uuid:"Platform/Settings"}),r=((0,l.Z)(t,1)[0],(0,b.Z)()),n=r.project,o=r.rootProject,i=(0,u.useState)(null),c=i[0],_=i[1],T=(0,u.useState)(!1),E=(T[0],T[1]),N=(0,u.useState)(null),R=N[0],D=N[1],B=(0,u.useCallback)((function(e){_(e),E(!0)}),[_,E]);(0,u.useEffect)((function(){o&&!c&&_(null===o||void 0===o?void 0:o.platform_settings),n&&!R&&D(null===n||void 0===n?void 0:n.name)}),[o]);var A=(0,u.useMemo)((function(){var e=(0,S.RA)((0,S.Y6)());return(0,I.jsx)(j.ZP,{beforeIcon:(0,I.jsx)(Z.Add,{}),compact:!0,small:!0,onClick:function(){return B((function(t){return C(C({},t),{},{projects:C(C({},null===c||void 0===c?void 0:c.projects),{},(0,s.Z)({},e,{}))})}))},secondary:!0,children:"Register project"})}),[c]),F=(0,a.Db)(P.ZP.projects.useUpdate(null===o||void 0===o?void 0:o.name),{onSuccess:function(e){return(0,y.wD)(e,{callback:function(e){var t=e.project;B((function(e){return C(C({},e),t)})),d.Am.success("Platform settings successfully saved.",{position:d.Am.POSITION.BOTTOM_RIGHT,toastId:"platform-settings-success-".concat(null===t||void 0===t?void 0:t.name)})}})}}),M=(0,l.Z)(F,2),H=M[0],W=M[1].isLoading;return(0,I.jsxs)(m.Z,{p:O.cd,children:[(0,I.jsx)(g.Z,{title:"Projects",headerChildren:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(m.Z,{ml:O.cd}),A]}),children:(0,I.jsx)(p.Z,{noBorder:!0,noBoxShadow:!0,visibleMappingForced:Object.keys((null===c||void 0===c?void 0:c.projects)||{}).reduce((function(e,t,r){return C(C({},e),{},(0,s.Z)({},String(r),!0))}),{}),children:Object.entries((null===c||void 0===c?void 0:c.projects)||{}).map((function(e){var t=(0,l.Z)(e,2),r=t[0],n=t[1],o=n.path,i=n.uuid;return(0,I.jsxs)(f.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,I.jsx)(h.ZP,{alignItems:"center",children:(0,I.jsx)(x.ZP,{large:!0,monospace:!0,children:r})}),titleXPadding:O.cd*O.iI,titleYPadding:O.cd*O.iI,children:[(0,I.jsx)(g.S,{title:"Name",description:"Unique name of project.",textInput:{fullWidth:!1,monospace:!0,placeholder:r,onChange:function(e){return B((function(t){return C(C({},t),{},{projects:C(C({},null===c||void 0===c?void 0:c.projects),{},(0,s.Z)({},r,C(C({},n),{},{uuid:e.target.value})))})}))},value:i}}),(0,I.jsx)(g.S,{title:"Path",description:(0,I.jsxs)(x.ZP,{muted:!0,small:!0,children:["Relative path to the project directory starting from the root project directory.",(0,I.jsx)("br",{}),"If blank, the default path will be the project name."]}),textInput:{fullWidth:!1,monospace:!0,placeholder:r,onChange:function(e){return B((function(t){return C(C({},t),{},{projects:C(C({},null===c||void 0===c?void 0:c.projects),{},(0,s.Z)({},r,C(C({},n),{},{path:e.target.value})))})}))},value:o||""}}),(0,I.jsx)(g.S,{title:"Currently selected project",description:"The currently selected project.",toggleSwitch:{checked:r===R,onCheck:function(){return D(r===R?null:r)}}}),(0,I.jsx)(v.Z,{light:!0}),(0,I.jsx)(g.S,{children:(0,I.jsx)(j.ZP,{compact:!0,noBorder:!0,onClick:function(){B((function(e){return C(C({},e),{},{projects:(0,w.gR)(null===c||void 0===c?void 0:c.projects,[r])})}))},small:!0,children:"Deregister project"})})]},r)}))})}),(0,I.jsx)(m.Z,{mt:O.HN}),(0,I.jsx)(g.Z,{title:"Features",children:(0,I.jsx)(g.S,{title:"Override all project features",description:(0,I.jsxs)(x.ZP,{muted:!0,small:!0,children:["If this setting is toggled, the feature flags that are set from the root project",(0,I.jsx)("br",{}),"will override the feature flags of all sub-projects."]}),toggleSwitch:{checked:null===c||void 0===c||null===(e=c.features)||void 0===e?void 0:e.override,onCheck:function(){return B((function(e){var t;return C(C({},e),{},{features:C(C({},null===e||void 0===e?void 0:e.features),{},{override:!(null!==c&&void 0!==c&&null!==(t=c.features)&&void 0!==t&&t.override)})})}))}}})}),(0,I.jsx)(m.Z,{my:O.HN,children:(0,I.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,I.jsx)("div",{}),(0,I.jsx)(j.ZP,{beforeIcon:(0,I.jsx)(Z.Save,{}),loading:W,onClick:function(){return H({project:{activate_project:R,platform_settings:c,root_project:!0}})},primary:!0,children:"Save settings"})]})})]})},E=r(28274),N=r(24755);function R(){return(0,I.jsx)(E.Z,{uuidItemSelected:N.B2.SETTINGS,uuidWorkspaceSelected:N.Pl.PROJECT_PLATFORM,children:(0,I.jsx)(T,{})})}R.getInitialProps=(0,n.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var D=(0,c.Z)(R)},39863:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/platform/settings",function(){return r(80754)}])}},function(e){e.O(0,[1557,5699,9774,2888,179],(function(){return t=39863,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{55729:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var r=n(82394),i=n(75582),o=n(82684),c=n(69864),l=n(71180),s=n(15338),u=n(97618),d=n(55485),a=n(85854),p=n(48670),j=n(65956),f=n(82359),h=n(88543),v=n(38276),g=n(30160),m=n(17488),Z=n(69650),x=n(12468),b=n(35686),y=n(77417),O=n(25976),P=n(44897),_=n(42631),w=n(70515),k=O.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],_.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||P.Z.background).codeArea,";\n ")})),C=n(72473),E=n(72191),S=n(70320),D=n(81728),I=n(42122),N=n(72619),H=n(23780),L=n(28598);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=function(e){var t,n,O,P=e.cancelButtonText,_=e.contained,A=e.header,T=e.onCancel,R=e.onSaveSuccess,F=e.rootProject,U=(0,H.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),W=(0,i.Z)(U,1)[0],B=(0,o.useState)(null),V=B[0],X=B[1],Y=(0,o.useState)(!1),q=Y[0],z=Y[1],G=(0,y.Z)(),J=G.fetchProjects,K=G.project,Q=G.projectPlatformActivated,$=G.rootProject,ee=(0,o.useMemo)((function(){return F?$:K}),[K,$,F]),te=ee||{},ne=te.name,re=te.openai_api_key,ie=te.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){V||X(ee)}),[ee,V]);var ce=(0,c.Db)(b.ZP.projects.useUpdate(ne),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){var t,n=e.project;J(),X(n),z(!1),(0,S.hY)(null===n||void 0===n||null===(t=n.features)||void 0===t?void 0:t[f.d.LOCAL_TIMEZONE]),R&&(null===R||void 0===R||R(n))},onErrorCallback:function(e,t){return W({errors:t,response:e})}})}}),le=(0,i.Z)(ce,2),se=le[0],ue=le[1].isLoading,de=(0,o.useCallback)((function(e){return se({project:M(M({},e),{},{root_project:F})})}),[F,se]),ae=(0,L.jsxs)(L.Fragment,{children:[A,(0,L.jsxs)(j.Z,{noPadding:!0,children:[(0,L.jsxs)(v.Z,{p:w.cd,children:[(0,L.jsx)(v.Z,{mb:1,children:(0,L.jsx)(a.Z,{level:5,children:"Project name"})}),(0,L.jsx)(g.ZP,{default:!0,monospace:!0,children:ne})]}),(0,L.jsx)(s.Z,{light:!0}),(0,L.jsxs)(v.Z,{p:w.cd,children:[(0,L.jsx)(v.Z,{mb:1,children:(0,L.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,L.jsx)(g.ZP,{default:!!ie,monospace:!0,muted:!ie,children:ie||"Not required"})]}),(0,L.jsx)(s.Z,{light:!0}),(0,L.jsx)(v.Z,{p:w.cd,children:(0,L.jsxs)(d.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,L.jsxs)(u.Z,{flexDirection:"column",children:[(0,L.jsx)(v.Z,{mb:1,children:(0,L.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,L.jsxs)(g.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,L.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,L.jsx)(v.Z,{mr:w.cd}),(0,L.jsx)(Z.Z,{compact:!0,checked:null===V||void 0===V?void 0:V.help_improve_mage,onCheck:function(){return X((function(e){return M(M({},e),{},{help_improve_mage:!(null!==V&&void 0!==V&&V.help_improve_mage)})}))}})]})})]}),(0,L.jsx)(v.Z,{mt:w.HN}),(0,L.jsx)(h.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,L.jsx)(h.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===V||void 0===V||null===(t=V.pipelines)||void 0===t||null===(n=t.settings)||void 0===n||null===(O=n.triggers)||void 0===O||!O.save_in_code_automatically),onCheck:function(e){return X((function(t){var n,r,i,o,c,l;return M(M({},t),{},{pipelines:M(M({},null===t||void 0===t?void 0:t.pipelines),{},{settings:M(M({},null===t||void 0===t||null===(n=t.pipelines)||void 0===n?void 0:n.settings),{},{triggers:M(M({},null===t||void 0===t||null===(r=t.pipelines)||void 0===r||null===(i=r.settings)||void 0===i?void 0:i.triggers),{},{save_in_code_automatically:e(null===t||void 0===t||null===(o=t.pipelines)||void 0===o||null===(c=o.settings)||void 0===c||null===(l=c.triggers)||void 0===l?void 0:l.save_in_code_automatically)})})})})}))}}})}),(0,L.jsx)(v.Z,{mt:w.HN}),(0,L.jsx)(j.Z,{noPadding:!0,overflowVisible:!0,children:(0,L.jsxs)(v.Z,{p:w.cd,children:[(0,L.jsx)(v.Z,{mb:1,children:(0,L.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((0,I.gR)(null===V||void 0===V?void 0:V.features,[{}])||{}).map((function(e,t){var n=(0,i.Z)(e,2),o=n[0],c=n[1],l=Q&&!F&&(null===ee||void 0===ee?void 0:ee.features_override)&&o in(null===ee||void 0===ee?void 0:ee.features_override);return(0,L.jsx)(v.Z,{mt:0===t?0:1,children:(0,L.jsxs)(d.ZP,{alignItems:"center",children:[(0,L.jsxs)(u.Z,{flex:1,children:[(0,L.jsx)(Z.Z,{disabled:l,checked:!!c,compact:!0,onCheck:function(){return X((function(e){return M(M({},e),{},{features:M(M({},null===V||void 0===V?void 0:V.features),{},(0,r.Z)({},o,!c))})}))}}),(0,L.jsx)(v.Z,{mr:w.cd}),(0,L.jsxs)(u.Z,{children:[(0,L.jsx)(g.ZP,{default:!c,monospace:!0,children:(0,D.vg)(o)}),o===f.d.LOCAL_TIMEZONE&&(0,L.jsx)(v.Z,{ml:1,children:(0,L.jsx)(x.Z,M({},S.EB))})]})]}),l&&(0,L.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,L.jsx)(v.Z,{mt:w.HN}),(0,L.jsx)(j.Z,{noPadding:!0,children:(0,L.jsxs)(v.Z,{p:w.cd,children:[(0,L.jsx)(v.Z,{mb:1,children:(0,L.jsx)(a.Z,{level:5,children:"OpenAI"})}),re&&!q?(0,L.jsxs)(d.ZP,M(M({},d.A0),{},{children:[(0,L.jsx)(g.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,L.jsx)(l.ZP,{iconOnly:!0,onClick:function(){return z(!0)},secondary:!0,title:"Edit",children:(0,L.jsx)(C.Edit,{size:E.bL})})]})):(0,L.jsx)(m.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return X((function(t){return M(M({},t),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===V||void 0===V?void 0:V.openai_api_key)||""})]})}),(0,L.jsx)(v.Z,{mt:w.HN}),(0,L.jsxs)(d.ZP,{alignItems:"center",children:[(0,L.jsx)(l.ZP,{id:"save-project-settings",loading:ue,onClick:function(){de({features:null===V||void 0===V?void 0:V.features,help_improve_mage:null===V||void 0===V?void 0:V.help_improve_mage,openai_api_key:null===V||void 0===V?void 0:V.openai_api_key,pipelines:null===V||void 0===V?void 0:V.pipelines})},primary:!0,children:"Save project settings"}),T&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(v.Z,{mr:w.cd}),(0,L.jsx)(l.ZP,{onClick:T,secondary:!0,children:P||"Cancel"})]})]})]});return _?(0,L.jsx)(k,{children:ae}):ae}},46568:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=(n(82684),n(33591)),c=n(28598),l=["children","fullHeight","gutter","style"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,s=e.style,d=void 0===s?{}:s,a=(0,i.Z)(e,l),p=u({},d);return r&&(p.paddingLeft=r,p.paddingRight=p.paddingLeft),n&&(p.height="100%"),(0,c.jsx)(o.Col,u(u({},a),{},{style:p,children:t}))}},82682:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=n(82684),c=n(33591),l=n(28598),s=["children","fullHeight","gutter","justifyContent","style"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,u=e.justifyContent,a=e.style,p=void 0===a?{}:a,j=(0,i.Z)(e,s),f=d({},p);return r&&(f.marginLeft=-1*r,f.marginRight=f.marginLeft),n&&(f.height="100%"),(0,l.jsx)(c.Row,d(d({},j),{},{justifyContent:u,style:f,children:o.Children.map(t,(function(e,t){return e&&o.cloneElement(e,{gutter:r,key:t})}))}))}},61316:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(38860),o=n.n(i),c=n(46568),l=n(55729),s=n(93808),u=n(82682),d=n(28274),a=n(38276),p=n(70515),j=n(24755),f=n(28598);function h(){return(0,f.jsx)(d.Z,{uuidItemSelected:j.HY,uuidWorkspaceSelected:j.WH,children:(0,f.jsx)(a.Z,{p:p.cd,children:(0,f.jsx)(u.Z,{justifyContent:"center",children:(0,f.jsx)(c.Z,{xl:8,xxl:6,children:(0,f.jsx)(l.Z,{})})})})})}h.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,s.Z)(h)},33323:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return n(61316)}])}},function(e){e.O(0,[1557,5699,9774,2888,179],(function(){return t=33323,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return w}});var n=r(82394),o=r(21831),i=r(82684),u=r(50724),c=r(1402),s=r(97618),a=r(70613),l=r(31557),f=r(68899),d=r(28598);function p(e,t){var r=e.children,n=e.noPadding;return(0,d.jsx)(f.HS,{noPadding:n,ref:t,children:r})}var h=i.forwardRef(p),v=r(62547),b=r(82571),O=r(77417),g=r(46684),m=r(75375);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,i=e.afterHidden,p=e.afterWidth,j=e.afterWidthOverride,P=e.appendBreadcrumbs,w=e.before,Z=e.beforeHeader,x=e.beforeWidth,k=e.breadcrumbs,A=e.children,E=e.contained,C=e.errors,_=e.headerMenuItems,D=e.headerOffset,I=e.hideAfterCompletely,M=e.mainContainerHeader,T=e.navigationItems,R=e.setAfterHidden,S=e.setAfterWidth,N=e.setBeforeWidth,B=e.setErrors,H=e.subheaderChildren,U=e.subheaderNoPadding,W=e.title,L=e.uuid,V=(0,m.Z)(L,{beforeResizeOffset:m.H,setWidthAfter:S,setWidthBefore:N,widthAfter:p,widthBefore:x,widthOverrideAfter:j}),X=V.mainContainerRef,Y=V.mousedownActiveAfter,z=V.mousedownActiveBefore,F=V.setMousedownActiveAfter,Q=V.setMousedownActiveBefore,J=V.setWidthAfter,G=V.setWidthBefore,q=V.widthAfter,$=V.widthBefore,K=(0,O.Z)().project,ee=[];return k&&ee.push.apply(ee,(0,o.Z)(k)),null!==k&&void 0!==k&&k.length&&!P||!K||null!==k&&void 0!==k&&k.length||ee.unshift({bold:!P,label:function(){return W}}),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a.Z,{title:W}),(0,d.jsx)(l.Z,{breadcrumbs:ee,menuItems:_}),(0,d.jsxs)(f.Nk,{ref:t,children:[0!==(null===T||void 0===T?void 0:T.length)&&(0,d.jsx)(f.lm,{showMore:!0,children:(0,d.jsx)(b.Z,{navigationItems:T,showMore:!0})}),(0,d.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,d.jsxs)(v.Z,{after:r,afterHeader:n,afterHeightOffset:g.Mz,afterHidden:i,afterMousedownActive:Y,afterWidth:q,before:w,beforeHeader:Z,beforeHeightOffset:g.Mz,beforeMousedownActive:z,beforeWidth:w?$:f.k1,contained:E,headerOffset:D,hideAfterCompletely:!r||I,leftOffset:w?f.k1:null,mainContainerHeader:M,mainContainerRef:X,setAfterHidden:R,setAfterMousedownActive:F,setAfterWidth:J,setBeforeMousedownActive:Q,setBeforeWidth:G,children:[H&&(0,d.jsx)(h,{noPadding:U,children:H}),A]})})]}),C&&(0,d.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===B||void 0===B?void 0:B(null)},children:(0,d.jsx)(c.Z,y(y({},C),{},{onClose:function(){return null===B||void 0===B?void 0:B(null)}}))})]})}var w=i.forwardRef(P)},16488:function(e,t,r){"use strict";r.d(t,{IJ:function(){return v},M8:function(){return x},Uc:function(){return j},XM:function(){return Z},_U:function(){return h},eI:function(){return m},gU:function(){return P},lO:function(){return _},ri:function(){return O},tL:function(){return y},vJ:function(){return w},xH:function(){return g}});var n,o=r(82394),i=r(92083),u=r.n(i),c=r(3917),s=r(4383),a=r(30229),l=r(42122),f=r(86735);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h=function(e){return!!e&&!Object.values(a.U5).includes(e)};function v(e){return null===e||void 0===e?void 0:e.reduce((function(e,t){var r=t.block_uuid,n=t.completed_at,i=t.started_at,c=t.status,s=null;i&&n&&(s=u()(n).valueOf()-u()(i).valueOf());return p(p({},e),{},(0,o.Z)({},r,{runtime:s,status:c}))}),{})}var b,O=function(e){var t=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return e?t.slice(0,1):t};function g(e){var t=(0,l.gR)(e,[a.gm.INTERVAL,a.gm.TYPE]),r=e[a.gm.INTERVAL];r&&(t["schedule_interval[]"]=encodeURIComponent(r));var n=e[a.gm.TYPE];return n&&(t["schedule_type[]"]=n),t}function m(e){return e?new Date(u()(e).valueOf()):null}function j(e,t){return t?(0,c.XG)(e,t):function(e){if("string"!==typeof e)return e;var t=e.split("+")[0];return u()(m(t)).format(c.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(b||(b={}));var y=(n={},(0,o.Z)(n,b.DAY,86400),(0,o.Z)(n,b.HOUR,3600),(0,o.Z)(n,b.MINUTE,60),(0,o.Z)(n,b.SECOND,1),n);function P(e){var t=b.SECOND,r=e;return e%86400===0?(r/=86400,t=b.DAY):e%3600===0?(r/=3600,t=b.HOUR):e%60===0&&(r/=60,t=b.MINUTE),{time:r,unit:t}}function w(e,t){return e*y[t]}function Z(e,t,r){var n,o=u()(e);return o.set("hour",+(null===t||void 0===t?void 0:t.hour)||0),o.set("minute",+(null===t||void 0===t?void 0:t.minute)||0),o.set("second",0),n=o.format(c.TD),null!==r&&void 0!==r&&r.includeSeconds&&(n=n.concat(":00")),null!==r&&void 0!==r&&r.localTimezone&&(n=o.format(c.lE),null!==r&&void 0!==r&&r.convertToUtc&&(n=(0,c.d$)(n,{includeSeconds:null===r||void 0===r?void 0:r.includeSeconds,utcFormat:!0}))),n}function x(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="",o=!0;return o&&(r?n="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(n="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(n="".concat(n,"/").concat(e.token)))),o&&(t=window.location.port)&&(n=n.replace(t,s.QT)),n}function k(e,t,r){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,t,r){var n=r.indexOf(e),o=0;if(t<0)for(var i=0;i>t;i--)0===n?(n=r.length-1,o-=1):n-=1;else if(t>0)for(var u=0;u<t;u++)n===r.length-1?(n=0,o+=1):n+=1;var c="number"===typeof r[n]?r[n]:e;return{additionalOffset:o,cronValue:String(c)}}(+e,t,r)}var A=(0,f.m5)(60),E=(0,f.m5)(24),C=(0,c.Cs)();function _(e,t){if(!e)return e;var r=u()().local().format("Z"),n=r.split(":"),o="-"===r[0],i=3===n[0].length?Number(n[0].slice(1)):Number(n[0]),c=Number(n[1]);(o&&!t||!o&&t)&&(i=-i,c=-c);var s=e.split(" "),a=s[0],l=s[1],f=s[2],d=k(a,c,A),p=k(l,i+d.additionalOffset,E);if(s[0]=d.cronValue,s[1]=p.cronValue,0!==(null===p||void 0===p?void 0:p.additionalOffset)){var h=k(f,p.additionalOffset,C);s[2]=h.cronValue}return s.join(" ")}},55072:function(e,t,r){"use strict";r.d(t,{Et:function(){return d},Q:function(){return f}});r(82684);var n=r(71180),o=r(55485),i=r(38276),u=r(31748),c=r(72473),s=r(79633),a=r(70515),l=r(28598),f=30,d=9;t.ZP=function(e){var t=e.page,r=e.maxPages,f=e.onUpdate,d=e.totalPages,p=[],h=r;if(h>d)p=Array.from({length:d},(function(e,t){return t}));else{var v=Math.floor(h/2),b=t-v;t+v>=d?(b=d-h+2,h-=2):t-v<=0?(b=0,h-=2):(h-=4,b=t-Math.floor(h/2)),p=Array.from({length:h},(function(e,t){return t+b}))}return(0,l.jsx)(l.Fragment,{children:d>0&&(0,l.jsxs)(o.ZP,{alignItems:"center",children:[(0,l.jsx)(n.ZP,{disabled:0===t,onClick:function(){return f(t-1)},children:(0,l.jsx)(c.PaginateArrowLeft,{size:1.5*a.iI,stroke:u.Av})}),!p.includes(0)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.Z,{ml:1,children:(0,l.jsx)(n.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return f(0)},children:1})},0),!p.includes(1)&&(0,l.jsx)(i.Z,{ml:1,children:(0,l.jsx)(n.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),p.map((function(e){return(0,l.jsx)(i.Z,{ml:1,children:(0,l.jsx)(n.ZP,{backgroundColor:e===t&&s.a$,borderLess:!0,noBackground:!0,notClickable:e===t,onClick:function(){e!==t&&f(e)},children:e+1})},e)})),!p.includes(d-1)&&(0,l.jsxs)(l.Fragment,{children:[!p.includes(d-2)&&(0,l.jsx)(i.Z,{ml:1,children:(0,l.jsx)(n.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,l.jsx)(i.Z,{ml:1,children:(0,l.jsx)(n.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return f(d-1)},children:d})},d-1)]}),(0,l.jsx)(i.Z,{ml:1}),(0,l.jsx)(n.ZP,{disabled:t===d-1,onClick:function(){return f(t+1)},children:(0,l.jsx)(c.PaginateArrowRight,{size:1.5*a.iI,stroke:u.Av})})]})})}},93808:function(e,t,r){"use strict";r.d(t,{Z:function(){return A}});var n=r(77837),o=r(26304),i=r(62243),u=r(29385),c=r(80022),s=r(13692),a=r(93189),l=r(15544),f=r(82394),d=r(38860),p=r.n(d),h=r(82684),v=r(56663),b=r.n(v),O=r(40761),g=r(34661),m=r(36105),j=r(50178),y=r(69419),P=r(28598),w=["auth"];function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function k(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,l.Z)(e);if(t){var o=(0,l.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.Z)(this,r)}}function A(e){return function(t){(0,s.Z)(a,t);var r=k(a);function a(){var e;(0,i.Z)(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=r.call.apply(r,[this].concat(n)),(0,f.Z)((0,c.Z)(e),"state",{auth:new O.Z(e.props.token)}),e}return(0,u.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new O.Z(this.props.token)})}},{key:"render",value:function(){var t=this.props,r=(t.auth,(0,o.Z)(t,w));return(0,P.jsx)(e,x({auth:this.state.auth},r))}}],[{key:"getInitialProps",value:function(){var t=(0,n.Z)(p().mark((function t(r){var n,o,i,u,c,s,a,l,f;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=b()(r),o=(0,j.ex)(r),i=o.id,u=n[g.Mv],c=n[m.qt],s=new O.Z(u),a=x(x({},r),{},{auth:s,currentGroupId:i,theme:c}),(0,j.YB)(r)&&s.isExpired&&(console.log("OAuth token has expired."),l=x(x({},r.query),{},{redirect_url:r.asPath}),(0,y.nL)("/sign-in?".concat((0,y.uM)(l)),r.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(a);case 10:return f=t.sent,t.abrupt("return",x(x({},f),{},{auth:s,currentGroupId:i,theme:c}));case 12:return t.abrupt("return",a);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),a}(h.Component)}},77174:function(e,t,r){"use strict";r.r(t);var n=r(77837),o=r(82394),i=r(75582),u=r(38860),c=r.n(u),s=r(82684),a=r(34376),l=r(94629),f=r(55485),d=r(55072),p=r(93808),h=r(82359),v=r(44085),b=r(38276),O=r(30160),g=r(29624),m=r(35686),j=r(30229),y=r(70515),P=r(15610),w=r(69419),Z=r(70320),x=r(28598);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function E(){var e=(0,a.useRouter)(),t=(0,s.useState)(null),r=t[0],n=t[1],o=(0,w.iV)(),u=null!==o&&void 0!==o&&o.page?o.page:0,c=(null===o||void 0===o?void 0:o.order_by)||j.kJ.CREATED_AT,p=m.ZP.projects.list().data,k=(0,s.useMemo)((function(){var e;return null===p||void 0===p||null===(e=p.projects)||void 0===e?void 0:e[0]}),[p]),E=((0,s.useMemo)((function(){var e;return(0,Z.hY)(null===k||void 0===k||null===(e=k.features)||void 0===e?void 0:e[h.d.LOCAL_TIMEZONE])}),[null===k||void 0===k?void 0:k.features]),{_limit:d.Q,_offset:u*d.Q,order_by:c}),C=m.ZP.pipeline_schedules.list(E,{refreshInterval:7500,revalidateOnFocus:!0}),_=C.data,D=C.mutate,I=(0,s.useMemo)((function(){return(null===_||void 0===_?void 0:_.pipeline_schedules)||[]}),[_]),M=(0,s.useMemo)((function(){var e;return(null===_||void 0===_||null===(e=_.metadata)||void 0===e?void 0:e.count)||[]}),[_]);return(0,x.jsxs)(l.Z,{errors:r,setErrors:n,title:"Triggers",uuid:"triggers/index",children:[(0,x.jsx)(b.Z,{mx:2,my:1,children:(0,x.jsxs)(f.ZP,{alignItems:"center",children:[(0,x.jsx)(O.ZP,{bold:!0,default:!0,large:!0,children:"Sort runs by:"}),(0,x.jsx)(b.Z,{mr:1}),(0,x.jsx)(v.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(e){e.preventDefault(),(0,P.u)({order_by:e.target.value,page:0})},paddingRight:4*y.iI,placeholder:"Select column",value:c||j.kJ.CREATED_AT,children:Object.entries(j.TR).map((function(e){var t=(0,i.Z)(e,2),r=t[0],n=t[1];return(0,x.jsx)("option",{value:r,children:n},r)}))})]})}),(0,x.jsx)(g.Z,{fetchPipelineSchedules:D,highlightRowOnHover:!0,includeCreatedAtColumn:!0,includePipelineColumn:!0,pipelineSchedules:I,setErrors:n,stickyHeader:!0}),(0,x.jsx)(b.Z,{p:2,children:(0,x.jsx)(d.ZP,{maxPages:9,onUpdate:function(t){var r=Number(t),n=A(A({},o),{},{page:r>=0?r:0});e.push("/triggers","/triggers?".concat((0,w.uM)(n)))},page:Number(u),totalPages:Math.ceil(M/d.Q)})})]})}E.getInitialProps=(0,n.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,p.Z)(E)},59733:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/triggers",function(){return r(77174)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[1557,9624,9774,2888,179],(function(){return t=59733,e(e.s=t);var t}));var t=e.O();_N_E=t}]);