mage-ai 0.9.68__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 (231) hide show
  1. mage_ai/api/resources/SeedResource.py +2 -1
  2. mage_ai/api/resources/SessionResource.py +13 -1
  3. mage_ai/authentication/permissions/constants.py +2 -0
  4. mage_ai/authentication/permissions/seed.py +32 -21
  5. mage_ai/authentication/providers/active_directory.py +4 -3
  6. mage_ai/authentication/providers/okta.py +22 -83
  7. mage_ai/data_preparation/executors/streaming_pipeline_executor.py +77 -7
  8. mage_ai/data_preparation/models/block/__init__.py +7 -3
  9. mage_ai/data_preparation/models/block/data_integration/mixins.py +16 -5
  10. mage_ai/data_preparation/models/block/dynamic/child.py +3 -0
  11. mage_ai/data_preparation/models/block/dynamic/variables.py +2 -2
  12. mage_ai/data_preparation/models/block/extension/utils.py +1 -0
  13. mage_ai/data_preparation/models/block/integration/__init__.py +1 -1
  14. mage_ai/data_preparation/models/block/sql/__init__.py +1 -1
  15. mage_ai/data_preparation/models/pipeline.py +22 -6
  16. mage_ai/data_preparation/models/utils.py +6 -0
  17. mage_ai/data_preparation/models/variable.py +18 -4
  18. mage_ai/data_preparation/repo_manager.py +3 -2
  19. mage_ai/data_preparation/shared/utils.py +1 -1
  20. mage_ai/data_preparation/templates/data_exporters/mysql.py +2 -2
  21. mage_ai/data_preparation/templates/data_exporters/oracledb.py +27 -0
  22. mage_ai/data_preparation/templates/repo/metadata.yaml +1 -0
  23. mage_ai/io/bigquery.py +131 -58
  24. mage_ai/io/mysql.py +38 -6
  25. mage_ai/io/snowflake.py +152 -29
  26. mage_ai/orchestration/db/models/oauth.py +4 -4
  27. mage_ai/orchestration/db/models/schedules.py +9 -2
  28. mage_ai/orchestration/job_manager.py +6 -0
  29. mage_ai/orchestration/pipeline_scheduler_original.py +16 -6
  30. mage_ai/orchestration/queue/celery_queue.py +8 -1
  31. mage_ai/orchestration/queue/process_queue.py +67 -4
  32. mage_ai/orchestration/queue/queue.py +8 -0
  33. mage_ai/server/constants.py +1 -1
  34. mage_ai/server/frontend_dist/404.html +2 -2
  35. mage_ai/server/frontend_dist/_next/static/{i8pymuJDTVHdWjUP1QSh1 → _krrrgup_C-dPOpX36S8I}/_buildManifest.js +1 -1
  36. mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +1 -0
  37. mage_ai/server/frontend_dist/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
  38. mage_ai/server/frontend_dist/_next/static/chunks/3548-fa0792ddb88f4646.js +1 -0
  39. mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
  40. mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
  41. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +1 -0
  42. mage_ai/server/frontend_dist/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
  43. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-a66b4c7641ae03eb.js → pipeline-runs-3edc6270c5b0e962.js} +1 -1
  44. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +1 -0
  45. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
  46. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-cb88fd075a357fcf.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-1bdfda8edc9cf4a8.js} +1 -1
  47. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
  48. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +1 -0
  49. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
  50. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +1 -0
  51. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-79a4cf66a623e667.js → sync-data-8b793b3b696a2cd3.js} +1 -1
  52. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
  53. mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js +1 -0
  54. mage_ai/server/frontend_dist/block-layout.html +2 -2
  55. mage_ai/server/frontend_dist/compute.html +2 -2
  56. mage_ai/server/frontend_dist/files.html +2 -2
  57. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  58. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  59. mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
  60. mage_ai/server/frontend_dist/global-hooks.html +2 -2
  61. mage_ai/server/frontend_dist/index.html +2 -2
  62. mage_ai/server/frontend_dist/manage/files.html +2 -2
  63. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  64. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  65. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  66. mage_ai/server/frontend_dist/manage/users.html +2 -2
  67. mage_ai/server/frontend_dist/manage.html +2 -2
  68. mage_ai/server/frontend_dist/oauth.html +2 -2
  69. mage_ai/server/frontend_dist/overview.html +2 -2
  70. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  71. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  72. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  73. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
  74. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  75. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  76. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  77. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  78. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  79. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  80. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  81. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  82. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  83. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  84. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  85. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  86. mage_ai/server/frontend_dist/pipelines.html +2 -2
  87. mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +2 -2
  88. mage_ai/server/frontend_dist/platform/global-hooks.html +2 -2
  89. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  90. mage_ai/server/frontend_dist/settings/platform/preferences.html +2 -2
  91. mage_ai/server/frontend_dist/settings/platform/settings.html +2 -2
  92. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
  93. mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
  94. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  95. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
  96. mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
  97. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  98. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
  99. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  100. mage_ai/server/frontend_dist/settings.html +2 -2
  101. mage_ai/server/frontend_dist/sign-in.html +2 -2
  102. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  103. mage_ai/server/frontend_dist/templates.html +2 -2
  104. mage_ai/server/frontend_dist/terminal.html +2 -2
  105. mage_ai/server/frontend_dist/test.html +2 -2
  106. mage_ai/server/frontend_dist/triggers.html +2 -2
  107. mage_ai/server/frontend_dist/version-control.html +2 -2
  108. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  109. mage_ai/server/frontend_dist_base_path_template/_next/static/{CKCvjsYCf2imD2X8zAOBf → KLL5mirre9d7_ZeEpaw3s}/_buildManifest.js +1 -1
  110. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +1 -0
  111. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
  112. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-fa0792ddb88f4646.js +1 -0
  113. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
  114. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
  115. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +1 -0
  116. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
  117. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-a66b4c7641ae03eb.js → pipeline-runs-3edc6270c5b0e962.js} +1 -1
  118. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +1 -0
  119. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
  120. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-cb88fd075a357fcf.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-1bdfda8edc9cf4a8.js} +1 -1
  121. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
  122. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +1 -0
  123. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
  124. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +1 -0
  125. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-79a4cf66a623e667.js → sync-data-8b793b3b696a2cd3.js} +1 -1
  126. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
  127. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js +1 -0
  128. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  129. mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
  130. mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
  131. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
  132. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
  133. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
  134. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
  135. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  136. mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
  137. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
  138. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
  139. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
  140. mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
  141. mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
  142. mage_ai/server/frontend_dist_base_path_template/oauth.html +2 -2
  143. mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
  144. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
  145. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  146. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
  147. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
  148. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  149. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
  150. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  151. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  152. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
  153. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
  154. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
  155. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
  156. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
  157. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  158. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
  159. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  160. mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
  161. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +2 -2
  162. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +2 -2
  163. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
  164. mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +2 -2
  165. mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +2 -2
  166. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
  167. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
  168. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
  169. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
  170. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
  171. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
  172. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
  173. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
  174. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  175. mage_ai/server/frontend_dist_base_path_template/sign-in.html +2 -2
  176. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
  177. mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
  178. mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
  179. mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
  180. mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
  181. mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
  182. mage_ai/server/scheduler_manager.py +7 -0
  183. mage_ai/server/server.py +12 -5
  184. mage_ai/server/websocket_server.py +1 -0
  185. mage_ai/settings/keys/auth.py +2 -0
  186. mage_ai/settings/server.py +1 -1
  187. mage_ai/streaming/sources/influxdb.py +2 -0
  188. mage_ai/streaming/sources/kafka.py +1 -1
  189. mage_ai/tests/api/endpoints/mixins.py +10 -9
  190. mage_ai/tests/api/endpoints/test_seeds.py +24 -0
  191. mage_ai/tests/api/operations/test_sessions.py +53 -2
  192. mage_ai/tests/authentication/providers/test_okta.py +43 -0
  193. mage_ai/tests/orchestration/db/models/test_oauth.py +3 -3
  194. mage_ai/tests/orchestration/queue/test_process_queue.py +1 -0
  195. mage_ai/tests/server/test_server.py +8 -4
  196. {mage_ai-0.9.68.dist-info → mage_ai-0.9.69.dist-info}/METADATA +4 -4
  197. {mage_ai-0.9.68.dist-info → mage_ai-0.9.69.dist-info}/RECORD +203 -200
  198. mage_ai/server/frontend_dist/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
  199. mage_ai/server/frontend_dist/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
  200. mage_ai/server/frontend_dist/_next/static/chunks/3548-961ff79ca70038c7.js +0 -1
  201. mage_ai/server/frontend_dist/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
  202. mage_ai/server/frontend_dist/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
  203. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-08790743315de36a.js +0 -1
  204. mage_ai/server/frontend_dist/_next/static/chunks/pages/index-13760bb72d823b69.js +0 -1
  205. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-bd0aff5a5ed8888c.js +0 -1
  206. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-d1ee961387c58b7f.js +0 -1
  207. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-ceb06e1616ee9610.js +0 -1
  208. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-8ff16ef9566e911a.js +0 -1
  209. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
  210. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-d7a8bc51bb7a1082.js +0 -1
  211. mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-f59d34429fe022ee.js +0 -1
  212. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
  213. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
  214. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-961ff79ca70038c7.js +0 -1
  215. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
  216. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
  217. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-08790743315de36a.js +0 -1
  218. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-13760bb72d823b69.js +0 -1
  219. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-bd0aff5a5ed8888c.js +0 -1
  220. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-d1ee961387c58b7f.js +0 -1
  221. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-ceb06e1616ee9610.js +0 -1
  222. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-8ff16ef9566e911a.js +0 -1
  223. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
  224. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-d7a8bc51bb7a1082.js +0 -1
  225. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-f59d34429fe022ee.js +0 -1
  226. /mage_ai/server/frontend_dist/_next/static/{i8pymuJDTVHdWjUP1QSh1 → _krrrgup_C-dPOpX36S8I}/_ssgManifest.js +0 -0
  227. /mage_ai/server/frontend_dist_base_path_template/_next/static/{CKCvjsYCf2imD2X8zAOBf → KLL5mirre9d7_ZeEpaw3s}/_ssgManifest.js +0 -0
  228. {mage_ai-0.9.68.dist-info → mage_ai-0.9.69.dist-info}/LICENSE +0 -0
  229. {mage_ai-0.9.68.dist-info → mage_ai-0.9.69.dist-info}/WHEEL +0 -0
  230. {mage_ai-0.9.68.dist-info → mage_ai-0.9.69.dist-info}/entry_points.txt +0 -0
  231. {mage_ai-0.9.68.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([[8170],{81334:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var i=t(82394),r=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 i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}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,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var w=function(e){var n,t=e.removeTag,i=e.selectTag,d=e.selectedTags,f=void 0===d?[]:d,p=e.tags,v=void 0===p?[]:p,g=e.uuid,O=(0,r.useRef)(null),w=(0,r.useState)(!1),P=w[0],k=w[1],C=(0,r.useState)(null),S=C[0],E=C[1],N=(0,r.useMemo)((function(){return(0,_.YC)(v||[],"uuid")}),[v]),T=(0,r.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,r.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,r.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===i||void 0===i||i(n),E(null)},searchQuery:S,uuid:g})})]})]})}},68781:function(e,n,t){"use strict";var i;t.d(n,{R:function(){return r}}),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"}(i||(i={}));var r=[i.AZURE_CONTAINER_INSTANCE,i.ECS,i.GCP_CLOUD_RUN,i.K8S,i.LOCAL_PYTHON,i.PYSPARK]},37003:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return K}});var i=t(77837),r=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 i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}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,i,r,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),ie=(0,c.useState)(!1),re=ie[0],oe=ie[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,{textInput:{onChange:function(e){return J((function(n){return M(M({},n),{},{description:e.target.value})}))},placeholder:"Enter description...",value:(null===Q||void 0===Q?void 0:Q.description)||""},title:"Pipeline description"}),(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===(i=t.triggers)||void 0===i||!i.save_in_code_automatically),onCheck:function(e){return J((function(n){var t,i,r;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===(i=n.settings)||void 0===i||null===(r=i.triggers)||void 0===r?void 0:r.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===(r=Q.retry_config)||void 0===r?void 0:r.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({description:null===Q||void 0===Q?void 0:Q.description,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:re,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 i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}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)(),i=(0,c.useState)(null),o=i[0],u=i[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,r.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,i.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 i(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 i}})},15544:function(e,n,t){"use strict";function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}t.d(n,{Z:function(){return i}})},13692:function(e,n,t){"use strict";t.d(n,{Z:function(){return r}});var i=t(61049);function r(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,i.Z)(e,n)}},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var i=t(12539),r=t(80022);function o(e,n){if(n&&("object"===i(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.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([[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 Re}});var t=i(77837),o=i(75582),u=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),g=i(90299),b=i(31882),j=i(76111),Z=i(94629),x=i(97618),_=i(55485),C=i(85854),w=i(68562),y=i(65956),P=i(38276),k=i(30160),I=i(35576),T=i(17488),S=i(28598);var O=function(e){var n=e.description,i=e.isLoading,t=e.maxWidth,o=e.minWidth,u=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],g=c?I.Z:T.Z;return(0,a.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,S.jsxs)(y.Z,{maxWidth:t,minWidth:o,children:[(0,S.jsx)(k.ZP,{bold:!0,children:s}),(0,S.jsx)(P.Z,{mt:1,children:(0,S.jsx)(g,{monospace:!0,onChange:function(e){return h(e.target.value)},ref:p,rows:c?7:null,value:v})}),n&&(0,S.jsx)(P.Z,{mt:2,children:(0,S.jsx)(k.ZP,{muted:!0,small:!0,children:n})}),(0,S.jsx)(P.Z,{mt:3,children:(0,S.jsxs)(_.ZP,{children:[(0,S.jsx)(w.ZP,{bold:!0,inline:!0,loading:i,onClick:function(){v===d||u&&!v?r():l(v)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,S.jsx)(P.Z,{ml:1}),(0,S.jsx)(m.ZP,{onClick:r,children:"Cancel"})]})})]})},E=i(48670),A=i(55072),D=i(57653),M=i(55729),R=i(93808),G=i(82359),$=i(44085),N=i(4190),U=i(75499),L=i(48381),B=i(69650),H=i(85544),F=i(70026),Y=i(35686),z=i(44897),Q=i(77417),V=i(42631),W=i(44425),q=i(72473),K=i(23780),X=i(8666),J=i(46684),ee=i(53808),ne="pipeline_list_filters",ie="pipeline_list_group_bys",te="pipeline_list_sort_column_index",oe="pipeline_list_sort_direction",ue="pipeline_list_selected_tab_uuid";function re(e){return(0,ee.t8)(ne,e),e}function le(e){return(0,ee.t8)(ie,e),e}var ce=i(11498),se=i(32929),de=i(44898),ae=i(70515),pe=i(30229),fe=i(81655),ve=i(31608),he=i(81728),me=i(3917),ge=i(72619),be=i(69419),je=i(65458),Ze=i(15610),xe=i(42122),_e=i(95924),Ce=i(86735),we=i(70320),ye=i(89538),Pe=i(44952);function ke(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 Ie(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ke(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ke(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var Te={Icon:q.Schedule,label:function(){return"Recently viewed"},uuid:"recent"},Se={Icon:q.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"},Oe=[Se,Te],Ee="tab",Ae=[D.$1.SEARCH],De={borderRadius:"".concat(V.BG,"px"),iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function Me(){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,Q.Z)(),w=s.fetchProjects,I=s.project,T=(0,a.useState)(null),R=T[0],V=T[1],ke=(0,a.useState)(null),Me=ke[0],Re=ke[1],Ge=(0,a.useState)(null),$e=Ge[0],Ne=Ge[1],Ue=(0,a.useCallback)((function(e){Ne(e),clearTimeout(c.current),c.current=setTimeout((function(){var n;return(0,Ze.u)((n={},(0,r.Z)(n,ce.$D.OFFSET,0),(0,r.Z)(n,D.$1.SEARCH,e),n))}),500)}),[Ne]),Le=(0,a.useState)({}),Be=Le[0],He=Le[1],Fe=(0,a.useState)(null),Ye=Fe[0],ze=Fe[1],Qe=(0,be.iV)(),Ve=Ie({},(0,be.DQ)(Qe,[D.$1.SEARCH,D.$1.STATUS,D.$1.TAG,D.$1.TYPE].concat((0,u.Z)(ce.RG)))),We=(0,a.useMemo)((function(){return null===Qe||void 0===Qe?void 0:Qe.tab}),[Qe]);(0,a.useEffect)((function(){var e;V(null===i||void 0===i||null===(e=i.current)||void 0===e?void 0:e.getBoundingClientRect().height)}),[Qe,i]);var qe=(0,a.useMemo)((function(){var e;return(0,we.hY)(null===I||void 0===I||null===(e=I.features)||void 0===e?void 0:e[G.d.LOCAL_TIMEZONE])}),[null===I||void 0===I?void 0:I.features]),Ke=(0,a.useMemo)((function(){var e;return null===I||void 0===I||null===(e=I.features)||void 0===e?void 0:e[G.d.OPERATION_HISTORY]}),[I]),Xe=(0,a.useMemo)((function(){return qe?fe.O$:{}}),[qe]),Je=Y.ZP.pipelines.list(Ie(Ie({},Ve),{},{include_schedules:1}),{revalidateOnFocus:!1}),en=Je.data,nn=Je.mutate,tn=(0,a.useMemo)((function(){return(null===Qe||void 0===Qe?void 0:Qe[D.$1.HISTORY_DAYS])||7}),[Qe]),on=Y.ZP.pipelines.list(Ie(Ie({},Ve),{},(e={},(0,r.Z)(e,D.$1.HISTORY_DAYS,(0,he.HW)(tn)?Number(tn):tn),(0,r.Z)(e,"include_schedules",1),e)),{},{pauseFetch:!Ke||!We||Te.uuid!==We}),un=on.data,rn=on.mutate,ln=(0,a.useCallback)((function(e){return e}),[]),cn=(0,a.useMemo)((function(){var e=ln((null===en||void 0===en?void 0:en.pipelines)||[]);if(null!==Qe&&void 0!==Qe&&Qe[D.$1.TAG]){var n=Qe[D.$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(D.$1.NO_TAGS)}))}return e}),[en,ln,Qe]),sn=(0,a.useMemo)((function(){return ln((null===un||void 0===un?void 0:un.pipelines)||[])}),[un,ln]),dn=(0,a.useMemo)((function(){return[1,2,3,4,5,6,8,9]}),[]),an=null===Qe||void 0===Qe?void 0:Qe[fe.lG.SORT_COL_IDX],pn=null===Qe||void 0===Qe?void 0:Qe[fe.lG.SORT_DIRECTION],fn=(0,a.useMemo)((function(){return an?{columnIndex:+an,sortDirection:pn||fe.sh.ASC}:void 0}),[an,pn]),vn=null===Qe||void 0===Qe?void 0:Qe[D.$1.GROUP],hn=(0,p.Db)((function(e){var n=e.pipelineUUID,i=e.filesOnly,t=void 0!==i&&i;return Y.ZP.downloads.pipelines.useCreate(n)({download:{ignore_folder_structure:t}})}),{onSuccess:function(e){return(0,ge.wD)(e,{callback:function(){var n=e.data.download.token;(0,Pe.K)(n)},onErrorCallback:function(e,n){return ze({errors:n,response:e})}})}}),mn=(0,o.Z)(hn,1)[0];(0,a.useEffect)((function(){null!==Ve&&void 0!==Ve&&Ve[D.$1.SEARCH]&&null===$e&&Ne(null===Ve||void 0===Ve?void 0:Ve[D.$1.SEARCH])}),[Ve,$e,Ne]),(0,a.useEffect)((function(){var e,n={};if(!an){var i=(0,ee.U2)(te,null),t=(0,ee.U2)(oe,fe.sh.ASC);null!==i&&(n[fe.lG.SORT_COL_IDX]=i,n[fe.lG.SORT_DIRECTION]=t)}Ke&&(We?(0,ee.t8)(ue,We):n.tab=(0,ee.U2)(ue,null===Oe||void 0===Oe||null===(e=Oe[0])||void 0===e?void 0:e.uuid));if(vn)le((0,r.Z)({},vn,!0));else{var u,l=(0,ee.U2)(ie,{});l&&Object.entries(l).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];!u&&t&&(u=i)})),u&&(n[D.$1.GROUP]=u)}if((0,xe.Qr)(Ve)){var c=(0,r.Z)({},ce.$D.LIMIT,A.Q),s=(0,ee.U2)(ne,{});s&&Object.entries(s).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];"undefined"!==typeof t&&null!==t&&(ce.RG.includes(i)||Ae.includes(i)?c[i]=t:(c[i]=[],Object.entries(t).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0];n[1]&&c[i].push(t)}))))})),(0,xe.Qr)(c)||(n={},Object.entries(Ie(Ie({},n),c)||{}).forEach((function(e){var i=(0,o.Z)(e,2),t=i[0],u=i[1];"undefined"!==typeof u&&null!==u&&(n[t]=u)})))}else{var d={};Object.entries(Ve).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];d[i]={};var u,r=t;"undefined"!==typeof t&&null!==t&&(ce.RG.includes(i)||Ae.includes(i)?d[i]=r:(Array.isArray(r)||(r=[r]),r&&Array.isArray(r)&&(null===(u=r)||void 0===u||u.forEach((function(e){d[i][e]=!0})))))})),re((0,xe.hB)(d))}(0,xe.Qr)(n)||(0,Ze.u)((0,xe.hB)(n),{pushHistory:!1})}),[vn,Ke,Ve,We,dn,an,pn]),(0,a.useEffect)((function(){(0,ge.bB)(en,ze)}),[en]);var gn=function(e){return(0,p.Db)(Y.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,ge.wD)(n,{callback:function(n){var i=n.pipeline.uuid;null===e||void 0===e||e(i)},onErrorCallback:function(e,n){return ze({errors:n,response:e})}})}})},bn=gn((function(e){return n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))})),jn=(0,o.Z)(bn,2),Zn=jn[0],xn=jn[1].isLoading,_n=gn((function(){null===nn||void 0===nn||nn(),null===rn||void 0===rn||rn()})),Cn=(0,o.Z)(_n,2),wn=Cn[0],yn=Cn[1].isLoading,Pn=(0,p.Db)((function(e){return Y.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,ge.wD)(e,{callback:function(e){var n=e.pipeline.uuid;He((function(e){return Ie(Ie({},e),{},(0,r.Z)({},n,!1))})),nn(),null===rn||void 0===rn||rn(),null===Ln||void 0===Ln||Ln(),Re(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;He((function(e){return Ie(Ie({},e),{},(0,r.Z)({},t,!1))})),ze({errors:n,response:e})}})}}),kn=(0,o.Z)(Pn,2),In=kn[0],Tn=kn[1].isLoading,Sn=(0,p.Db)((function(e){return Y.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,ge.wD)(e,{callback:function(){null===nn||void 0===nn||nn(),null===rn||void 0===rn||rn()},onErrorCallback:function(e,n){return ze({errors:n,response:e})}})}}),On=(0,o.Z)(Sn,2),En=On[0],An=On[1].isLoading,Dn=(0,ye.dd)((function(e){var n=e.pipelineType;return(0,S.jsx)(j.Z,{onClose:Gn,onSave:function(e){var i=e.name,t=e.description,o=e.tags;Zn({pipeline:{description:t,name:i,tags:o,type:n}})},pipelineType:n})}),{},[Zn],{background:!0,disableEscape:!0,uuid:"overview/create_pipeline"}),Mn=(0,o.Z)(Dn,2),Rn=Mn[0],Gn=Mn[1],$n=(0,ye.dd)((function(e){var n=e.pipeline,i=e.pipelineDescription,t=e.pipelineName;return(0,S.jsx)(O,{isLoading:Tn,minWidth:55*ae.iI,noEmptyValue:!!t,onClose:Ln,onSave:function(e){var i=n||Me;if(i){var o=i.uuid,u={uuid:o};t?u.name=e:u.description=e,He((function(e){return Ie(Ie({},e),{},(0,r.Z)({},o,!0))})),In(u)}},textArea:!t,title:t?"Rename pipeline":"Edit description for ".concat(null===n||void 0===n?void 0:n.uuid),value:t||i})}),{},[Tn,Me],{background:!0,uuid:"rename_pipeline_and_save"}),Nn=(0,o.Z)($n,2),Un=Nn[0],Ln=Nn[1],Bn=(0,ye.dd)((function(){return(0,S.jsx)(F.Z,{fetchPipelines:nn,onCancel:Yn})}),{},[nn],{background:!0,uuid:"upload_pipeline"}),Hn=(0,o.Z)(Bn,2),Fn=Hn[0],Yn=Hn[1],zn=(0,ye.dd)((function(){return(0,S.jsx)(K.BC,{children:(0,S.jsx)(h.Z,{contained:!0,onClickCustomTemplate:function(e){Zn({pipeline:{custom_template_uuid:null===e||void 0===e?void 0:e.template_uuid,name:(0,he.Y6)()}}).then((function(){Wn()}))},showBreadcrumbs:!0,tabs:[se.A2]})})}),{},[Zn],{background:!0,uuid:"browse_templates"}),Qn=(0,o.Z)(zn,2),Vn=Qn[0],Wn=Qn[1],qn=(0,ye.dd)((function(e){var n=e.cancelButtonText,i=(e.header,e.onCancel),t=e.onSaveSuccess;return(0,S.jsx)(K.BC,{children:(0,S.jsx)(M.Z,{cancelButtonText:n,contained:!0,header:(0,S.jsx)(P.Z,{mb:ae.HN,children:(0,S.jsxs)(y.Z,{children:[(0,S.jsx)(k.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,S.jsx)(P.Z,{mt:1,children:(0,S.jsxs)(k.ZP,{warning:!0,children:["Read ",(0,S.jsx)(E.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(),Jn()},onSaveSuccess:function(e){w(),Jn(),null===t||void 0===t||t(e)}})})}),{},[w],{background:!0,uuid:"configure_project"}),Kn=(0,o.Z)(qn,2),Xn=Kn[0],Jn=Kn[1],ei=(0,ye.dd)((function(){return(0,S.jsx)(K.BC,{children:(0,S.jsx)(v.Z,{createPipeline:Zn,isLoading:xn,onClose:ti})})}),{},[Zn,xn],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),ni=(0,o.Z)(ei,2),ii=ni[0],ti=ni[1],oi=(0,a.useMemo)((function(){return(0,je.d)(Zn,{showAIModal:function(){null!==I&&void 0!==I&&I.openai_api_key?ii():Xn({onSaveSuccess:function(){ii()}})},showBrowseTemplates:Vn,showCreatePipelineModal:Rn,showImportPipelineModal:Fn})}),[Zn,I,ii,Vn,Xn,Rn,Fn]),ui=Y.ZP.tags.list().data,ri=(0,a.useMemo)((function(){return(0,Ce.YC)((null===ui||void 0===ui?void 0:ui.tags)||[],(function(e){return e.uuid}))}),[ui]),li=(0,a.useMemo)((function(){return(0,S.jsx)(H.Z,{addButtonProps:{isLoading:xn,label:"New",menuItems:oi},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:An,item:"pipeline",onDelete:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===Me||void 0===Me?void 0:Me.uuid,"?"))&&En(null===Me||void 0===Me?void 0:Me.uuid)}},extraActionButtonProps:{Icon:q.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===Me||void 0===Me?void 0:Me.uuid,"?"),isLoading:yn,onClick:function(){return wn({pipeline:{clone_pipeline_uuid:null===Me||void 0===Me?void 0:Me.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},filterOptions:{status:D.kA,tag:[D.$1.NO_TAGS].concat((0,u.Z)(ri.map((function(e){return e.uuid})))),type:Object.values(D.qL)},filterValueLabelMapping:{status:D.kA.reduce((function(e,n){return Ie(Ie({},e),{},(0,r.Z)({},n,(0,he.J3)((0,he.kC)(n))))}),{}),tag:Ie((0,r.Z)({},D.$1.NO_TAGS,"No tags"),ri.reduce((function(e,n){var i=n.uuid;return Ie(Ie({},e),{},(0,r.Z)({},i,i))}),{})),type:D.G7},groupButtonProps:{groupByLabel:vn,menuItems:[{beforeIcon:vn===D.r0.STATUS?(0,S.jsx)(q.Check,{fill:z.Z.content.default,size:1.5*ae.iI}):(0,S.jsx)(q.Circle,{muted:!0,size:1.5*ae.iI}),label:function(){return(0,he.kC)(D.r0.STATUS)},onClick:function(){var e=vn===D.r0.STATUS?null:D.r0.STATUS;e||le({}),(0,Ze.u)((0,r.Z)({},D.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:vn===D.r0.TAG?(0,S.jsx)(q.Check,{fill:z.Z.content.default,size:1.5*ae.iI}):(0,S.jsx)(q.Circle,{muted:!0,size:1.5*ae.iI}),label:function(){return(0,he.kC)(D.r0.TAG)},onClick:function(){var e=vn===D.r0.TAG?null:D.r0.TAG;e||le({}),(0,Ze.u)((0,r.Z)({},D.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Tag"},{beforeIcon:vn===D.r0.TYPE?(0,S.jsx)(q.Check,{fill:z.Z.content.default,size:1.5*ae.iI}):(0,S.jsx)(q.Circle,{muted:!0,size:1.5*ae.iI}),label:function(){return(0,he.kC)(D.r0.TYPE)},onClick:function(){var e=vn===D.r0.TYPE?null:D.r0.TYPE;e||le({}),(0,Ze.u)((0,r.Z)({},D.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return Un({pipelineName:null===Me||void 0===Me?void 0:Me.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return Un({pipeline:Me,pipelineDescription:null===Me||void 0===Me?void 0:Me.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],onClickFilterDefaults:function(){re({}),Ne(""),null===nn||void 0===nn||nn().then((function(){var e;(0,Ze.u)((e={},(0,r.Z)(e,ce.$D.LIMIT,(null===Ve||void 0===Ve?void 0:Ve[ce.$D.LIMIT])||A.Q),(0,r.Z)(e,D.$1.SEARCH,""),e),{replaceParams:!0})}))},onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!==e&&void 0!==e&&e.length)}))&&re({})},query:Ve,resetLimitOnFilterApply:!0,searchProps:{onChange:Ue,value:$e},selectedRowId:null===Me||void 0===Me?void 0:Me.uuid,setSelectedRow:Re})}),[wn,En,nn,vn,yn,xn,An,oi,Ve,$e,Me,Ue,Un,ri]),ci=(0,K.VI)(null,{},[],{uuid:"pipelines/list"}),si=(0,o.Z)(ci,1)[0],di=(0,p.Db)(Y.ZP.projects.useUpdate(null===I||void 0===I?void 0:I.name),{onSuccess:function(e){return(0,ge.wD)(e,{callback:function(){w()},onErrorCallback:function(e,n){return si({errors:n,response:e})}})}}),ai=(0,o.Z)(di,2),pi=ai[0],fi=ai[1].isLoading,vi=(0,a.useCallback)((function(e){return pi({project:e})}),[pi]),hi=(0,ye.dd)((function(){return(0,S.jsxs)(y.Z,{maxWidth:60*ae.iI,children:[(0,S.jsx)(P.Z,{mb:1,children:(0,S.jsx)(C.Z,{children:"Help improve Mage"})}),(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsx)(k.ZP,{default:!0,children:"Please contribute usage statistics to help improve the developer experience for you and everyone in the community \ud83e\udd1d."})}),(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsx)(y.Z,{success:!0,children:(0,S.jsxs)(_.ZP,{alignItems:"center",children:[(0,S.jsx)(q.Secrets,{size:5*ae.iI,success:!0}),(0,S.jsx)(P.Z,{mr:1}),(0,S.jsx)(x.Z,{children:(0,S.jsx)(k.ZP,{children:"All usage statistics are completely anonymous. It\u2019s impossible for Mage to know which statistics belongs to whom."})})]})})}),(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsxs)(k.ZP,{default:!0,children:["By opting into sending usage statistics to ",(0,S.jsx)(E.Z,{href:"https://www.mage.ai",openNewWindow:!0,children:"Mage"}),", it\u2019ll help the team and community of contributors (",(0,S.jsx)(E.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,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsx)(k.ZP,{default:!0,children:"In addition to helping reduce potential errors, you\u2019ll help inform which features are useful and which need work."})}),(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsxs)(_.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,S.jsx)(k.ZP,{bold:!0,children:"I want to help make Mage more powerful for everyone"}),(0,S.jsx)(P.Z,{mr:ae.cd}),(0,S.jsx)(B.Z,{checked:!0,onCheck:function(){window.confirm("Are you sure you don\u2019t want to help everyone in the community?")&&vi({deny_improve_mage:!0,help_improve_mage:!1}).then((function(){return bi()}))}})]})}),fi&&(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsx)(N.Z,{inverted:!0})}),(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsxs)(k.ZP,{muted:!0,small:!0,children:["To learn more about how this works, please check out the ",(0,S.jsx)(E.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,small:!0,children:"documentation"}),"."]})}),(0,S.jsx)(m.ZP,{"data-testid":"help_mage_close_button",onClick:function(){return vi({help_improve_mage:!0}).then((function(){return bi()}))},secondary:!0,children:"Close"})]})}),{},[I],{background:!0,hideCallback:function(){vi({help_improve_mage:!0})},uuid:"help_mage"}),mi=(0,o.Z)(hi,2),gi=mi[0],bi=mi[1];(0,a.useEffect)((function(){I&&null===(null===I||void 0===I?void 0:I.help_improve_mage)&&gi()}),[I,gi]);var ji=(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[vn];if(D.r0.STATUS===vn){var o=(e||{}).schedules,u=void 0===o?[]:o,r=u.length;t=u.find((function(e){var n=e.status;return pe.fq.ACTIVE===n}))?D.QK.ACTIVE:r>=1?D.QK.INACTIVE:D.QK.NO_SCHEDULES}else if(D.r0.TAG===vn){t=(null===e||void 0===e?void 0:e.tags)?(0,Ce.YC)(e.tags,(function(e){return e})).join(", "):""}n[t]||(n[t]=[]),n[t].push(i)}));var i=[],t=[];D.r0.STATUS===vn?Object.values(D.QK).forEach((function(e){i.push(n[e]),t.push((0,he.vg)(e))})):D.r0.TAG===vn?(0,Ce.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,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{style:{marginLeft:n>=1?4:0}},"".concat(e,"-").concat(n,"-spacing")),(0,S.jsx)(b.Z,{small:!0,children:(0,S.jsx)(k.ZP,{children:e})},"".concat(e,"-").concat(n))]})}))):t.push("No tags")})):D.r0.TYPE===vn&&Object.values(D.qL).forEach((function(e){i.push(n[e]),t.push(D.G7[e])}));var o=[],u=[];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&&(u.push(e),o.push(null===t||void 0===t?void 0:t[n]))})),{rowGroupHeaders:o,rowsGroupedByIndex:u}}),[vn]),Zi=(0,a.useMemo)((function(){return ji(cn)}),[ji,cn]),xi=Zi.rowGroupHeaders,_i=Zi.rowsGroupedByIndex,Ci=(0,a.useMemo)((function(){return ji(sn)}),[ji,sn]),wi=Ci.rowGroupHeaders,yi=Ci.rowsGroupedByIndex,Pi=(0,a.useCallback)((function(e,i,o){return(0,S.jsx)(U.Z,{columnFlex:[null,null,null,2,null,null,null,1,null,null,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,he.kC)(D.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,he.kC)(D.r0.TYPE)},Ie(Ie({},Xe),{},{uuid:"Updated at"}),Ie(Ie({},Xe),{},{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===Me||void 0===Me?void 0:Me.uuid)},localStorageKeySortColIdx:te,localStorageKeySortDirection:oe,onClickRow:function(n){return Re((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 Un({pipeline:t,pipelineDescription:null===t||void 0===t?void 0:t.description})},uuid:"edit_description"},{label:function(){return"Rename"},onClick:function(){return Un({pipeline:t,pipelineName:null===t||void 0===t?void 0:t.name})},uuid:"rename"},{label:function(){return"Clone"},onClick:function(){return wn({pipeline:{clone_pipeline_uuid:null===t||void 0===t?void 0:t.uuid}})},uuid:"clone"},{label:function(){return"Download (keep folder structure)"},onClick:function(){mn({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(){mn({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(de.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(X.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,"?"))&&En(null===t||void 0===t?void 0:t.uuid)},uuid:"delete"}]},rightClickMenuHeight:252,rightClickMenuWidth:30*ae.iI,rowGroupHeaders:i,rows:null===e||void 0===e?void 0:e.map((function(e,i){var t=e.blocks,o=e.created_at,u=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 W.tf.SCRATCHPAD!==n})).length,v=l.length,h=l.find((function(e){var n=e.status;return pe.fq.ACTIVE===n})),g=s===D.ad,b=(0,S.jsx)("div",{children:(0,S.jsx)(L.Z,{tags:null===c||void 0===c?void 0:c.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(i));return[v>=1||Be[p]?(0,S.jsx)(m.ZP,{iconOnly:!0,loading:!!Be[p],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,_e.j)(n),He((function(e){return Ie(Ie({},e),{},(0,r.Z)({},p,!0))})),In(Ie(Ie({},e),{},{status:h?pe.fq.INACTIVE:pe.fq.ACTIVE}))},children:h?(0,S.jsx)(q.Pause,{muted:!0,size:2*ae.iI}):(0,S.jsx)(q.PlayButtonFilled,{default:!0,size:2*ae.iI})}):null,(0,S.jsx)(k.ZP,{default:!h,monospace:!0,success:!!h,children:h?pe.fq.ACTIVE:v>=1?pe.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(i)),(0,S.jsx)(d(),{as:"/pipelines/".concat(p),href:"/pipelines/[pipeline]",passHref:!0,children:(0,S.jsx)(E.Z,{sameColorAsText:!0,children:p})},"pipeline_name_".concat(i)),(0,S.jsx)(k.ZP,{default:!0,preWrap:!0,title:u,children:u},"pipeline_description_".concat(i)),(0,S.jsx)(k.ZP,{bold:g,danger:g,children:g?(0,he.kC)(D.ad):D.G7[s]},"pipeline_type_".concat(i)),(0,S.jsx)(k.ZP,{monospace:!0,small:!0,title:a?(0,me._6)(a):null,children:a?(0,me.XG)((0,me.d$)(a,{includeSeconds:!0,utcFormat:!0}),qe):(0,S.jsx)(S.Fragment,{children:"\u2014"})},"pipeline_updated_at_".concat(i)),(0,S.jsx)(k.ZP,{monospace:!0,small:!0,title:o?(0,me._6)(o):null,children:o?(0,me.XG)(o.slice(0,19),qe):(0,S.jsx)(S.Fragment,{children:"\u2014"})},"pipeline_created_at_".concat(i)),b,(0,S.jsx)(k.ZP,{default:0===f,monospace:!0,children:f},"pipeline_block_count_".concat(i)),(0,S.jsx)(k.ZP,{default:0===v,monospace:!0,children:v},"pipeline_trigger_count_".concat(i)),(0,S.jsxs)(x.Z,{flex:1,justifyContent:"flex-end",children:[(0,S.jsx)(m.ZP,Ie(Ie({},De),{},{onClick:function(){mn({pipelineUUID:p})},title:"Download (keep folder structure)",children:(0,S.jsx)(q.Save,{default:!0,size:2*ae.iI})})),(0,S.jsx)(P.Z,{mr:1}),(0,S.jsx)(m.ZP,Ie(Ie({},De),{},{onClick:function(){n.push("/pipelines/[pipeline]","/pipelines/".concat(p))},title:"Detail",children:(0,S.jsx)(q.Open,{default:!0,size:2*ae.iI})})),(0,S.jsx)(P.Z,{mr:1}),(0,S.jsx)(m.ZP,Ie(Ie({},De),{},{onClick:function(){n.push("/pipelines/[pipeline]/logs","/pipelines/".concat(p,"/logs"))},title:"Logs",children:(0,S.jsx)(q.File,{default:!0,size:2*ae.iI})}))]},"chevron_icon_".concat(i))]})),rowsGroupedByIndex:o,sortableColumnIndexes:dn,sortedColumn:fn,stickyHeader:!0,uuid:"pipelines_table"})}),[wn,En,mn,qe,Be,n,Me,He,Re,Un,dn,fn,Xe,In]),ki=(0,a.useMemo)((function(){return Pi(cn,xi,_i)}),[cn,Pi,xi,_i]),Ii=(0,a.useMemo)((function(){return Pi(sn,wi,yi)}),[sn,Pi,wi,yi]),Ti=(0,a.useMemo)((function(){return(null===cn||void 0===cn?void 0:cn.length)||0}),[cn]),Si=(0,a.useMemo)((function(){return(null===sn||void 0===sn?void 0:sn.length)||0}),[sn]),Oi=(0,a.useMemo)((function(){return(!Ke||Se.uuid===We)&&!Ti||Ke&&Te.uuid===We&&!Si}),[Ke,Ti,Si,We]),Ei=(0,a.useMemo)((function(){var e=null===Ve||void 0===Ve?void 0:Ve[ce.$D.LIMIT];return(0,S.jsxs)(_.ZP,{alignItems:"center",children:[(0,S.jsx)(k.ZP,{muted:!0,small:!0,children:"Per page"}),(0,S.jsx)(P.Z,{mr:1}),(0,S.jsxs)($.Z,{compact:!0,onChange:function(e){var n;return(0,Ze.u)((n={},(0,r.Z)(n,ce.$D.LIMIT,e.target.value),(0,r.Z)(n,ce.$D.OFFSET,0),n),{pushHistory:!0})},small:!0,value:e,children:[e&&(e>5*A.Q||e%A.Q)&&(0,S.jsx)("option",{value:e,children:e}),(0,Ce.w6)(5).map((function(e,n){var i=(n+1)*A.Q;return(0,S.jsx)("option",{value:i,children:i},i)}))]})]})}),[Ve]),Ai=(0,a.useMemo)((function(){var e,n,i=en;Ke&&Te.uuid===We&&(i=un);var t=(null===(e=i)||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.count)||0,o=(null===Ve||void 0===Ve?void 0:Ve[ce.$D.LIMIT])||A.Q,u=(null===Ve||void 0===Ve?void 0:Ve[ce.$D.OFFSET])||0,l=Math.ceil(t/o);return(0,S.jsx)(P.Z,{p:ae.cd,children:(0,S.jsx)(A.ZP,{maxPages:A.Et,onUpdate:function(e){var n=Number(e);(0,Ze.u)((0,r.Z)({},ce.$D.OFFSET,n*o))},page:Math.floor(u/o),totalPages:l})})}),[en,un,Ke,Ve,We]);return(0,S.jsxs)(Z.Z,{errors:Ye,setErrors:ze,subheaderChildren:(0,S.jsxs)(_.ZP,{alignItems:"center",justifyContent:"space-between",children:[li,Ei]}),title:"Pipelines",uuid:"pipelines/index",children:[Ke&&(0,S.jsx)(P.Z,{px:ae.cd,ref:i,children:(0,S.jsx)(g.Z,{noPadding:!0,onClickTab:function(e){var n,i=e.uuid;return(0,Ze.u)((n={},(0,r.Z)(n,Ee,i),(0,r.Z)(n,ce.$D.OFFSET,0),n),{pushHistory:!0})},regularSizeText:!0,selectedTabUUID:We,tabs:Oe.map((function(e){var n=e.Icon,i=e.label;return{Icon:n,label:function(){var e;return i({count:null===en||void 0===en||null===(e=en.metadata)||void 0===e?void 0:e.count})},uuid:e.uuid}})),underlineStyle:!0})}),Oi?(0,S.jsx)(P.Z,{p:ae.Mq,children:en?(0,S.jsx)(k.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,S.jsx)(N.Z,{inverted:!0,large:!0})}):null,(0,S.jsxs)(ve.cl,{hide:Oi,includePadding:!!vn,maxHeight:"calc(100vh - ".concat(J.Mz+74+(R||44)+68,"px)"),children:[(!Ke||Se.uuid===We)&&ki,Ke&&Te.uuid===We&&Ii]}),(0,S.jsx)("div",{ref:l,children:Ai})]})}Me.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 Re=(0,R.Z)(Me)},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 o}});var t=i(61049);function o(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 u}});var t=i(12539),o=i(80022);function u(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,o.Z)(e)}}},function(e){e.O(0,[1557,4241,5544,523,3548,5627,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 ")})),C=n(72473),E=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)(),K=J.fetchProjects,Y=J.project,Q=J.projectPlatformActivated,$=J.rootProject,ee=(0,o.useMemo)((function(){return F?$:Y}),[Y,$,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;K(),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,[f.d.CODE_BLOCK_V2])||{}).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)(C.Edit,{size:E.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),L=n(23780),H=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,B=e.rootProject,F=(0,L.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),U=(0,i.Z)(F,1)[0],V=(0,o.useState)(null),W=V[0],X=V[1],Y=(0,o.useState)(!1),q=Y[0],z=Y[1],G=(0,y.Z)(),K=G.fetchProjects,J=G.project,Q=G.projectPlatformActivated,$=G.rootProject,ee=(0,o.useMemo)((function(){return B?$:J}),[J,$,B]),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;K(),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 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:M(M({},e),{},{root_project:B})})}),[B,se]),ae=(0,H.jsxs)(H.Fragment,{children:[A,(0,H.jsxs)(j.Z,{noPadding:!0,children:[(0,H.jsxs)(v.Z,{p:w.cd,children:[(0,H.jsx)(v.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Project name"})}),(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:ne})]}),(0,H.jsx)(s.Z,{light:!0}),(0,H.jsxs)(v.Z,{p:w.cd,children:[(0,H.jsx)(v.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,H.jsx)(g.ZP,{default:!!ie,monospace:!0,muted:!ie,children:ie||"Not required"})]}),(0,H.jsx)(s.Z,{light:!0}),(0,H.jsx)(v.Z,{p:w.cd,children:(0,H.jsxs)(d.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsxs)(u.Z,{flexDirection:"column",children:[(0,H.jsx)(v.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,H.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,H.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,H.jsx)(v.Z,{mr:w.cd}),(0,H.jsx)(Z.Z,{compact:!0,checked:null===W||void 0===W?void 0:W.help_improve_mage,onCheck:function(){return X((function(e){return M(M({},e),{},{help_improve_mage:!(null!==W&&void 0!==W&&W.help_improve_mage)})}))}})]})})]}),(0,H.jsx)(v.Z,{mt:w.HN}),(0,H.jsx)(h.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,H.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 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,H.jsx)(v.Z,{mt:w.HN}),(0,H.jsx)(j.Z,{noPadding:!0,overflowVisible:!0,children:(0,H.jsxs)(v.Z,{p:w.cd,children:[(0,H.jsx)(v.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((0,I.gR)(null===W||void 0===W?void 0:W.features,[f.d.CODE_BLOCK_V2])||{}).map((function(e,t){var n=(0,i.Z)(e,2),o=n[0],c=n[1],l=Q&&!B&&(null===ee||void 0===ee?void 0:ee.features_override)&&o in(null===ee||void 0===ee?void 0:ee.features_override);return(0,H.jsx)(v.Z,{mt:0===t?0:1,children:(0,H.jsxs)(d.ZP,{alignItems:"center",children:[(0,H.jsxs)(u.Z,{flex:1,children:[(0,H.jsx)(Z.Z,{disabled:l,checked:!!c,compact:!0,onCheck:function(){return X((function(e){return M(M({},e),{},{features:M(M({},null===W||void 0===W?void 0:W.features),{},(0,r.Z)({},o,!c))})}))}}),(0,H.jsx)(v.Z,{mr:w.cd}),(0,H.jsxs)(u.Z,{children:[(0,H.jsx)(g.ZP,{default:!c,monospace:!0,children:(0,D.vg)(o)}),o===f.d.LOCAL_TIMEZONE&&(0,H.jsx)(v.Z,{ml:1,children:(0,H.jsx)(x.Z,M({},S.EB))})]})]}),l&&(0,H.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,H.jsx)(v.Z,{mt:w.HN}),(0,H.jsx)(j.Z,{noPadding:!0,children:(0,H.jsxs)(v.Z,{p:w.cd,children:[(0,H.jsx)(v.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"OpenAI"})}),re&&!q?(0,H.jsxs)(d.ZP,M(M({},d.A0),{},{children:[(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,H.jsx)(l.ZP,{iconOnly:!0,onClick:function(){return z(!0)},secondary:!0,title:"Edit",children:(0,H.jsx)(C.Edit,{size:E.bL})})]})):(0,H.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===W||void 0===W?void 0:W.openai_api_key)||""})]})}),(0,H.jsx)(v.Z,{mt:w.HN}),(0,H.jsxs)(d.ZP,{alignItems:"center",children:[(0,H.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"}),T&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(v.Z,{mr:w.cd}),(0,H.jsx)(l.ZP,{onClick:T,secondary:!0,children:P||"Cancel"})]})]})]});return _?(0,H.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([[1312],{66316:function(e,t,r){"use strict";r.d(t,{Z:function(){return j}});var n=r(82394),i=r(70613),o=r(31557),c=r(33591),u=r(38276),s=r(70515),a=r(28598);var l=function(e){var t=e.children,r=e.width,n=void 0===r?12:r;return(0,a.jsx)(u.Z,{px:s.zC,children:(0,a.jsx)(c.Row,{children:(0,a.jsx)(c.Col,{lg:n,md:Math.min(12,Math.round(1.5*(12-n))),sm:Math.min(12,Math.round(1.75*(12-n))),xs:12,children:t})})})},d=r(25976),f=r(46684),p=d.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-jcgu5l-0"})(["padding-top:","px;",""],f.Mz,(function(e){return e.fullHeight&&"\n height: calc(100vh);\n "}));function h(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var j=function(e){var t=e.children,r=e.headerProps,n=e.title;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{title:n}),(0,a.jsx)(o.Z,g({},r)),(0,a.jsx)(l,{children:(0,a.jsx)(p,{fullHeight:!0,children:t})})]})}},46568:function(e,t,r){"use strict";var n=r(82394),i=r(26304),o=(r(82684),r(33591)),c=r(28598),u=["children","fullHeight","gutter","style"];function s(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?s(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.Z=function(e){var t=e.children,r=e.fullHeight,n=e.gutter,s=e.style,l=void 0===s?{}:s,d=(0,i.Z)(e,u),f=a({},l);return n&&(f.paddingLeft=n,f.paddingRight=f.paddingLeft),r&&(f.height="100%"),(0,c.jsx)(o.Col,a(a({},d),{},{style:f,children:t}))}},82682:function(e,t,r){"use strict";var n=r(82394),i=r(26304),o=r(82684),c=r(33591),u=r(28598),s=["children","fullHeight","gutter","justifyContent","style"];function a(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.Z=function(e){var t=e.children,r=e.fullHeight,n=e.gutter,a=e.justifyContent,d=e.style,f=void 0===d?{}:d,p=(0,i.Z)(e,s),h=l({},f);return n&&(h.marginLeft=-1*n,h.marginRight=h.marginLeft),r&&(h.height="100%"),(0,u.jsx)(c.Row,l(l({},p),{},{justifyContent:a,style:h,children:o.Children.map(t,(function(e,t){return e&&o.cloneElement(e,{gutter:n,key:t})}))}))}},94542:function(e,t,r){"use strict";r.d(t,{J:function(){return o},X:function(){return c}});var n=r(46568),i=r(82682),o=n.Z,c=i.Z},91769:function(e,t,r){"use strict";r.d(t,{f:function(){return v},h:function(){return j}});var n=r(82394),i=r(82684),o=r(34376),c=r(68562),u=r(72473),s=r(70515),a=r(69419),l=r(53808),d=r(28598);var f=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),f=n.url,p=n.redirect_query_params,h=void 0===p?{}:p;return(0,d.jsx)(d.Fragment,{children:f&&(0,d.jsx)(c.ZP,{beforeElement:(0,d.jsx)(u.GoogleIcon,{size:2*s.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(f).state;(0,l.t8)(e,h),r.push(f)},uuid:"SignForm/google",children:"Sign in with Google"})})};var p=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),f=n.url,p=n.redirect_query_params,h=void 0===p?{}:p;return(0,d.jsx)(d.Fragment,{children:f&&(0,d.jsx)(c.ZP,{beforeElement:(0,d.jsx)(u.MicrosoftIcon,{size:2*s.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(f).state;h&&(0,l.t8)(e,h),r.push(f)},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})};var h=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),u=n.url,s=n.redirect_query_params,f=void 0===s?{}:s;return(0,d.jsx)(d.Fragment,{children:u&&(0,d.jsx)(c.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(u).state;(0,l.t8)(e,f),r.push(u)},uuid:"SignForm/oidc_generic",children:"Sign in with OIDC"})})};var g,j,b=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),u=n.url,s=n.redirect_query_params,f=void 0===s?{}:s;return(0,d.jsx)(d.Fragment,{children:u&&(0,d.jsx)(c.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(u).state;(0,l.t8)(e,f),r.push(u)},uuid:"SignForm/okta",children:"Sign in with Okta"})})};!function(e){e.ACTIVE_DIRECTORY="active_directory",e.AZURE_DEVOPS="azure_devops",e.BITBUCKET="bitbucket",e.GITHUB="github",e.GITLAB="gitlab",e.GOOGLE="google",e.OIDC_GENERIC="oidc_generic",e.OKTA="okta"}(j||(j={}));var v=(g={},(0,n.Z)(g,j.ACTIVE_DIRECTORY,p),(0,n.Z)(g,j.GOOGLE,f),(0,n.Z)(g,j.OIDC_GENERIC,h),(0,n.Z)(g,j.OKTA,b),g)},13180:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return L}});var n=r(77837),i=r(38860),o=r.n(i),c=r(66316),u=r(82394),s=r(75582),a=r(82684),l=r(69864),d=r(34376),f=r(40761),p=r(55485),h=r(85854),g=r(68562),j=r(38276),b=r(30160),v=r(17488),O=r(35686),y=r(25976),m=r(44897),x=r(42631),w=r(70515),P=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-641xul-0"})(["border-radius:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],x.TR,21*w.iI,w.Vj,w.Vj,w.Vj,(function(e){return"\n background-color: ".concat((e.theme.background||m.Z.background).panel,";\n ")})),Z=y.default.div.withConfig({displayName:"indexstyle__BackgroundImageStyle",componentId:"sc-641xul-1"})(["border-radius:","px;font-size:0;overflow:hidden;",""],x.D7,(function(e){return e.src&&"\n background-image: url(".concat(e.src,");\n background-size: cover;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n ")})),C=r(94542),_=r(39643),k=r(91769),E=r(42122),S=r(72619),D=r(42041),R=r(69419),I=r(50178),M=r(28598);function T(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 z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var V="email",F="password";var G=function(e){var t=e.title,r=(0,d.useRouter)(),n=(0,a.useState)(null),i=n[0],o=n[1],c=(0,a.useState)({}),y=c[0],m=c[1],x=(0,l.Db)(O.ZP.sessions.useCreate(),{onSuccess:function(e){return(0,S.wD)(e,{callback:function(e){var t=e.session,n=t.token,i=t.user;(0,I.av)(i),f.Z.storeToken(n,(function(){var e="".concat(r.basePath,"/"),t=(0,R.iV)(window.location.href),n=(0,R.uM)((0,E.gR)(t,["redirect_url","access_token","provider"]));t.redirect_url&&(e="".concat(t.redirect_url,"?").concat(n)),window.location.href=e}))},onErrorCallback:function(e){var t=e.error;o(t)}})}}),T=(0,s.Z)(x,2),G=T[0],H=T[1].isLoading,L=(0,a.useCallback)((function(e){return f.Z.logout((function(){return G(e)}))}),[G]),N=O.ZP.oauths.list({redirect_uri:encodeURIComponent(window.location.href)}).data,A=(0,a.useMemo)((function(){var e;return null===N||void 0===N||null===(e=N.oauths)||void 0===e?void 0:e.reduce((function(e,t){return e[t.provider]=t,e}),{})}),[N]),U=(0,R.iV)()||{},q=U.access_token,B=U.provider;return(0,a.useEffect)((function(){var e;q&&B&&G({session:(e={},(0,u.Z)(e,"provider",B),(0,u.Z)(e,"token",q),e)})}),[q,G,B]),(0,M.jsxs)(C.X,{fullHeight:!0,children:[(0,M.jsx)(C.J,{lg:6,md:12,children:(0,M.jsx)(p.ZP,{flexDirection:"column",fullHeight:!0,fullWidth:!0,justifyContent:"center",children:(0,M.jsx)(j.Z,{px:{xl:5*w.zC,xs:w.zC},py:w.zC,children:(0,M.jsxs)(P,{children:[(0,M.jsx)(h.Z,{yellow:!0,children:t}),(0,M.jsxs)("form",{children:[(0,M.jsxs)(j.Z,{mt:3,children:[(0,M.jsx)(v.Z,{autoComplete:"username",label:"Email",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return m((function(t){return z(z({},t),{},(0,u.Z)({},V,e.target.value))}))},primary:!i,value:y.email}),(0,M.jsx)(j.Z,{mt:2,children:(0,M.jsx)(v.Z,{autoComplete:"current-password",label:"Password",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return m((function(t){return z(z({},t),{},(0,u.Z)({},F,e.target.value))}))},primary:!i,type:"password",value:y.password})})]}),i&&(0,M.jsx)(j.Z,{mt:2,children:(0,M.jsx)(b.ZP,{danger:!0,children:i.message})}),(0,M.jsx)(j.Z,{mt:3,children:(0,M.jsx)(g.ZP,{bold:!0,inline:!0,keyTextGroups:[[_.Lz]],keyboardShortcutValidation:function(e){var t=e.keyMapping;return(0,D.y)([_.Uq],t)},large:!0,loading:H,noHoverUnderline:!0,onClick:function(){return L({session:y})},selected:!0,uuid:"SignForm/action",wind:!0,children:"Sign into Mage"})}),Object.entries(k.f).map((function(e){var t=(0,s.Z)(e,2),r=t[0],n=t[1];return(0,M.jsx)(M.Fragment,{children:(null===A||void 0===A?void 0:A[r])&&(0,M.jsx)(j.Z,{mt:4,children:(0,M.jsx)(n,{oauthResponse:null===A||void 0===A?void 0:A[r]})})})}))]})]})})})}),(0,M.jsx)(C.J,{hiddenLgDown:!0,lg:6,style:{flex:1},children:(0,M.jsx)(j.Z,{fullHeight:!0,fullWidth:!0,px:w.zC,py:w.zC+8,children:(0,M.jsx)(Z,{src:"".concat(r.basePath,"/images/sessions/abstract.png"),children:"Sign in abstract image"})})})]})};function H(){return(0,M.jsx)(c.Z,{title:"Sign in",children:(0,M.jsx)(G,{title:"\ud83d\udc4b Sign in"})})}H.getInitialProps=(0,n.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)})));var L=H},6821:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sign-in",function(){return r(13180)}])}},function(e){e.O(0,[1557,9774,2888,179],(function(){return t=6821,e(e.s=t);var t}));var t=e.O();_N_E=t}]);