mage-ai 0.9.47__py3-none-any.whl → 0.9.48__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 (309) hide show
  1. mage_ai/api/presenters/PipelinePresenter.py +1 -0
  2. mage_ai/data_preparation/executors/block_executor.py +21 -1
  3. mage_ai/data_preparation/executors/pipeline_executor.py +19 -4
  4. mage_ai/data_preparation/models/block/__init__.py +50 -20
  5. mage_ai/data_preparation/models/block/data_integration/mixins.py +6 -6
  6. mage_ai/data_preparation/models/block/data_integration/utils.py +2 -2
  7. mage_ai/data_preparation/models/block/sql/bigquery.py +2 -2
  8. mage_ai/data_preparation/models/block/sql/snowflake.py +2 -2
  9. mage_ai/data_preparation/models/block/sql/trino.py +2 -2
  10. mage_ai/data_preparation/models/block/sql/utils/shared.py +2 -2
  11. mage_ai/data_preparation/models/block/utils.py +25 -16
  12. mage_ai/data_preparation/models/pipeline.py +5 -0
  13. mage_ai/data_preparation/models/project/__init__.py +0 -2
  14. mage_ai/io/chroma.py +13 -4
  15. mage_ai/orchestration/db/models/schedules.py +71 -0
  16. mage_ai/orchestration/pipeline_scheduler.py +1 -70
  17. mage_ai/server/constants.py +1 -1
  18. mage_ai/server/frontend_dist/404.html +2 -2
  19. mage_ai/server/frontend_dist/_next/static/chunks/1952-0f9a12782f0aaae6.js +1 -0
  20. mage_ai/server/frontend_dist/_next/static/chunks/2717-14191a781cf2f286.js +1 -0
  21. mage_ai/server/frontend_dist/_next/static/chunks/3419-a7a52bcaaa687b07.js +1 -0
  22. mage_ai/server/frontend_dist/_next/static/chunks/3437-e81a62f33337ca06.js +1 -0
  23. mage_ai/server/frontend_dist/_next/static/chunks/3943-3cb1f765210dd7a4.js +1 -0
  24. mage_ai/server/frontend_dist/_next/static/chunks/4138-2c16e6d2f22246cd.js +1 -0
  25. mage_ai/server/frontend_dist/_next/static/chunks/{5499-76cf8f023c6b0985.js → 5499-c2853ef57d39fde8.js} +1 -1
  26. mage_ai/server/frontend_dist/_next/static/chunks/6990-303bb87fc50f1755.js +1 -0
  27. mage_ai/server/frontend_dist/_next/static/chunks/{7858-d9df72e95e438284.js → 7858-26a5a5d04fa3c703.js} +1 -1
  28. mage_ai/server/frontend_dist/_next/static/chunks/8264-9d6a7cea289e29ff.js +1 -0
  29. mage_ai/server/frontend_dist/_next/static/chunks/8487-608d62c0eef1f29a.js +1 -0
  30. mage_ai/server/frontend_dist/_next/static/chunks/{1845-5ce774d5ab81ed57.js → 8731-2f78ec7b7760be8f.js} +1 -1
  31. mage_ai/server/frontend_dist/_next/static/chunks/90-93d18aaecef0685b.js +1 -0
  32. mage_ai/server/frontend_dist/_next/static/chunks/{9264-cc44b07f248707b0.js → 9264-727704fc34e74ae0.js} +1 -1
  33. mage_ai/server/frontend_dist/_next/static/chunks/9624-48fba6b4e6966fb7.js +1 -0
  34. mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-78c4a077a2f279c2.js → _app-8254de4f793643d0.js} +1 -1
  35. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js → frontend_dist/_next/static/chunks/pages/block-layout-b926f6eb1ee9a53b.js} +1 -1
  36. mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-a9402b51e9fe748e.js +1 -0
  37. mage_ai/server/frontend_dist/_next/static/chunks/pages/{files-b37d221eb5ddc248.js → files-85cecae037fd7a70.js} +1 -1
  38. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-cfd68e760ae00958.js → [...slug]-c3c9523ea8072c11.js} +1 -1
  39. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-c3b79ef31007f95b.js → global-data-products-4d046f15202a1c8d.js} +1 -1
  40. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/{[...slug]-7adc543fc490367a.js → [...slug]-286133386c97a2b6.js} +1 -1
  41. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-3da370825153056c.js +1 -0
  42. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{files-fe6e73463a20d67c.js → files-39b73da5a15590f6.js} +1 -1
  43. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-60845f0b59142f32.js → frontend_dist/_next/static/chunks/pages/manage/settings-666748ff5d101411.js} +1 -1
  44. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js → frontend_dist/_next/static/chunks/pages/manage/users/[user]-be27631e67dbe070.js} +1 -1
  45. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/{new-abd8571907664fdf.js → new-1932ce64823b372b.js} +1 -1
  46. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-28a930b148d99766.js → frontend_dist/_next/static/chunks/pages/manage/users-ed509c75cf23f0f5.js} +1 -1
  47. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage-d8a38b5d1f50e798.js → frontend_dist/_next/static/chunks/pages/manage-1feebec1124123fc.js} +1 -1
  48. mage_ai/server/frontend_dist/_next/static/chunks/pages/{oauth-8bb62c4f6a511c43.js → oauth-e9b8f19c30381c28.js} +1 -1
  49. mage_ai/server/frontend_dist/_next/static/chunks/pages/{overview-f0c40645f385f23f.js → overview-7b2ba2d5405c05fe.js} +1 -1
  50. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-70fc3351bd11025f.js +1 -0
  51. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-6ee3b88a5bb4ce94.js +1 -0
  52. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c9cf383bc13ce7b8.js +1 -0
  53. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-571c0962333b92f0.js → dashboard-7bca6f718b939934.js} +1 -1
  54. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-c119f630038b0685.js +1 -0
  55. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-146051325c92d742.js +1 -0
  56. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-ddddcddd2f74b4f6.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-15d307e6ba934a56.js} +1 -1
  57. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f6196e563b960e5c.js} +1 -1
  58. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-6d1afeb4a84f50f7.js → monitors-25dbd73201d99e80.js} +1 -1
  59. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-06e55db757959ef8.js +1 -0
  60. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-ec3c45cfa027db58.js} +1 -1
  61. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-495e877aa7ed709e.js} +1 -1
  62. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-49adfeed5157d92b.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-6143e028225390f5.js +1 -0
  64. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-0886f6320fef7131.js +1 -0
  65. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-e82a763d742cc034.js +1 -0
  66. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js → frontend_dist/_next/static/chunks/pages/settings/account/profile-50d20fa715d454af.js} +1 -1
  67. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-b78b1be5b9ed84b9.js → [...slug]-2bbd63b7e93a8600.js} +1 -1
  68. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-37b78a436eeab258.js → permissions-4ea156c39608caab.js} +1 -1
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-f3c29ec53ee35795.js +1 -0
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-db05a80d18c168e5.js → [...slug]-64ec8928d2542f3c.js} +1 -1
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-f55c77e4f46c8d33.js → roles-835e6ec2a48ec583.js} +1 -1
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-2a1f8737561fdd94.js → sync-data-0769149af025de30.js} +1 -1
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-e3bf6e5d8bb250c4.js → [...slug]-612a65c42bcadef0.js} +1 -1
  74. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-20f0a050a42a015d.js → users-e3365b4029a8db33.js} +1 -1
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/{sign-in-99e2748e3c1d57a3.js → sign-in-f3a33e8f83abdb58.js} +1 -1
  76. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js → frontend_dist/_next/static/chunks/pages/templates/[...slug]-f264097bf8120f31.js} +1 -1
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-1bfaa1c50e844813.js → templates-406e13cc5c4caab4.js} +1 -1
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/{terminal-ed121e305169cf1c.js → terminal-ef8ad878e5e7bb2f.js} +1 -1
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-a90728798f964700.js +1 -0
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/{version-control-dd4fb405695f74bf.js → version-control-0e0c2713a2922be7.js} +1 -1
  81. mage_ai/server/frontend_dist/_next/static/xxcdnITr3IkTdETH5ghqw/_buildManifest.js +1 -0
  82. mage_ai/server/frontend_dist/block-layout.html +2 -2
  83. mage_ai/server/frontend_dist/compute.html +5 -5
  84. mage_ai/server/frontend_dist/files.html +5 -5
  85. mage_ai/server/frontend_dist/global-data-products/[...slug].html +5 -5
  86. mage_ai/server/frontend_dist/global-data-products.html +5 -5
  87. mage_ai/server/frontend_dist/global-hooks/[...slug].html +5 -5
  88. mage_ai/server/frontend_dist/global-hooks.html +5 -5
  89. mage_ai/server/frontend_dist/index.html +2 -2
  90. mage_ai/server/frontend_dist/manage/files.html +5 -5
  91. mage_ai/server/frontend_dist/manage/settings.html +5 -5
  92. mage_ai/server/frontend_dist/manage/users/[user].html +5 -5
  93. mage_ai/server/frontend_dist/manage/users/new.html +5 -5
  94. mage_ai/server/frontend_dist/manage/users.html +5 -5
  95. mage_ai/server/frontend_dist/manage.html +5 -5
  96. mage_ai/server/frontend_dist/oauth.html +3 -3
  97. mage_ai/server/frontend_dist/overview.html +5 -5
  98. mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
  99. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  100. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
  101. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +5 -5
  102. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  103. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
  104. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  105. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  106. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
  107. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
  108. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
  109. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +5 -5
  110. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
  111. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  112. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
  113. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  114. mage_ai/server/frontend_dist/pipelines.html +5 -5
  115. mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
  116. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +5 -5
  117. mage_ai/server/frontend_dist/settings/workspace/permissions.html +5 -5
  118. mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
  119. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +5 -5
  120. mage_ai/server/frontend_dist/settings/workspace/roles.html +5 -5
  121. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +5 -5
  122. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +5 -5
  123. mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
  124. mage_ai/server/frontend_dist/settings.html +2 -2
  125. mage_ai/server/frontend_dist/sign-in.html +11 -11
  126. mage_ai/server/frontend_dist/templates/[...slug].html +5 -5
  127. mage_ai/server/frontend_dist/templates.html +5 -5
  128. mage_ai/server/frontend_dist/terminal.html +5 -5
  129. mage_ai/server/frontend_dist/test.html +4 -4
  130. mage_ai/server/frontend_dist/triggers.html +5 -5
  131. mage_ai/server/frontend_dist/version-control.html +5 -5
  132. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  133. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-0f9a12782f0aaae6.js +1 -0
  134. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-14191a781cf2f286.js +1 -0
  135. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-a7a52bcaaa687b07.js +1 -0
  136. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-e81a62f33337ca06.js +1 -0
  137. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-3cb1f765210dd7a4.js +1 -0
  138. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4138-2c16e6d2f22246cd.js +1 -0
  139. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5499-76cf8f023c6b0985.js → 5499-c2853ef57d39fde8.js} +1 -1
  140. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6990-303bb87fc50f1755.js +1 -0
  141. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7858-d9df72e95e438284.js → 7858-26a5a5d04fa3c703.js} +1 -1
  142. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-9d6a7cea289e29ff.js +1 -0
  143. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-608d62c0eef1f29a.js +1 -0
  144. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1845-5ce774d5ab81ed57.js → 8731-2f78ec7b7760be8f.js} +1 -1
  145. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/90-93d18aaecef0685b.js +1 -0
  146. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{9264-cc44b07f248707b0.js → 9264-727704fc34e74ae0.js} +1 -1
  147. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-48fba6b4e6966fb7.js +1 -0
  148. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-78c4a077a2f279c2.js → _app-8254de4f793643d0.js} +1 -1
  149. mage_ai/server/{frontend_dist/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js → frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-b926f6eb1ee9a53b.js} +1 -1
  150. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-a9402b51e9fe748e.js +1 -0
  151. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{files-b37d221eb5ddc248.js → files-85cecae037fd7a70.js} +1 -1
  152. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-cfd68e760ae00958.js → [...slug]-c3c9523ea8072c11.js} +1 -1
  153. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-c3b79ef31007f95b.js → global-data-products-4d046f15202a1c8d.js} +1 -1
  154. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/{[...slug]-7adc543fc490367a.js → [...slug]-286133386c97a2b6.js} +1 -1
  155. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-3da370825153056c.js +1 -0
  156. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{files-fe6e73463a20d67c.js → files-39b73da5a15590f6.js} +1 -1
  157. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/settings-60845f0b59142f32.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-666748ff5d101411.js} +1 -1
  158. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-be27631e67dbe070.js} +1 -1
  159. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/{new-abd8571907664fdf.js → new-1932ce64823b372b.js} +1 -1
  160. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users-28a930b148d99766.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-ed509c75cf23f0f5.js} +1 -1
  161. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage-d8a38b5d1f50e798.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage-1feebec1124123fc.js} +1 -1
  162. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{oauth-8bb62c4f6a511c43.js → oauth-e9b8f19c30381c28.js} +1 -1
  163. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{overview-f0c40645f385f23f.js → overview-7b2ba2d5405c05fe.js} +1 -1
  164. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-70fc3351bd11025f.js +1 -0
  165. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-6ee3b88a5bb4ce94.js +1 -0
  166. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c9cf383bc13ce7b8.js +1 -0
  167. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-571c0962333b92f0.js → dashboard-7bca6f718b939934.js} +1 -1
  168. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-c119f630038b0685.js +1 -0
  169. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-146051325c92d742.js +1 -0
  170. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-ddddcddd2f74b4f6.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-15d307e6ba934a56.js} +1 -1
  171. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f6196e563b960e5c.js} +1 -1
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-6d1afeb4a84f50f7.js → monitors-25dbd73201d99e80.js} +1 -1
  173. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-06e55db757959ef8.js +1 -0
  174. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-ec3c45cfa027db58.js} +1 -1
  175. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-495e877aa7ed709e.js} +1 -1
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-49adfeed5157d92b.js +1 -0
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-6143e028225390f5.js +1 -0
  178. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-0886f6320fef7131.js +1 -0
  179. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-e82a763d742cc034.js +1 -0
  180. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-50d20fa715d454af.js} +1 -1
  181. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-b78b1be5b9ed84b9.js → [...slug]-2bbd63b7e93a8600.js} +1 -1
  182. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-37b78a436eeab258.js → permissions-4ea156c39608caab.js} +1 -1
  183. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-f3c29ec53ee35795.js +1 -0
  184. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-db05a80d18c168e5.js → [...slug]-64ec8928d2542f3c.js} +1 -1
  185. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-f55c77e4f46c8d33.js → roles-835e6ec2a48ec583.js} +1 -1
  186. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-2a1f8737561fdd94.js → sync-data-0769149af025de30.js} +1 -1
  187. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-e3bf6e5d8bb250c4.js → [...slug]-612a65c42bcadef0.js} +1 -1
  188. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-20f0a050a42a015d.js → users-e3365b4029a8db33.js} +1 -1
  189. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{sign-in-99e2748e3c1d57a3.js → sign-in-f3a33e8f83abdb58.js} +1 -1
  190. mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-f264097bf8120f31.js} +1 -1
  191. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-1bfaa1c50e844813.js → templates-406e13cc5c4caab4.js} +1 -1
  192. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{terminal-ed121e305169cf1c.js → terminal-ef8ad878e5e7bb2f.js} +1 -1
  193. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-a90728798f964700.js +1 -0
  194. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{version-control-dd4fb405695f74bf.js → version-control-0e0c2713a2922be7.js} +1 -1
  195. mage_ai/server/frontend_dist_base_path_template/_next/static/gDn6inKdLyj35NvURBSCV/_buildManifest.js +1 -0
  196. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  197. mage_ai/server/frontend_dist_base_path_template/compute.html +5 -5
  198. mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
  199. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
  200. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
  201. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +5 -5
  202. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +5 -5
  203. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  204. mage_ai/server/frontend_dist_base_path_template/manage/files.html +5 -5
  205. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
  206. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
  207. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
  208. mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
  209. mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
  210. mage_ai/server/frontend_dist_base_path_template/oauth.html +3 -3
  211. mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
  212. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
  213. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  214. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
  215. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
  216. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  217. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
  218. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  219. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  220. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
  221. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
  222. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
  223. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
  224. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
  225. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  226. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
  227. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  228. mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
  229. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
  230. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +5 -5
  231. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +5 -5
  232. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
  233. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +5 -5
  234. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +5 -5
  235. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
  236. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +5 -5
  237. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
  238. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  239. mage_ai/server/frontend_dist_base_path_template/sign-in.html +10 -10
  240. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
  241. mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
  242. mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
  243. mage_ai/server/frontend_dist_base_path_template/test.html +4 -4
  244. mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
  245. mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
  246. mage_ai/server/server.py +2 -0
  247. mage_ai/streaming/sources/nats_js.py +12 -1
  248. mage_ai/tests/data_preparation/executors/test_block_executor.py +2 -0
  249. mage_ai/tests/data_preparation/models/test_pipeline.py +5 -0
  250. {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/METADATA +3 -3
  251. {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/RECORD +257 -257
  252. mage_ai/server/frontend_dist/_next/static/N3FS4bHv0jpYeeg672uYK/_buildManifest.js +0 -1
  253. mage_ai/server/frontend_dist/_next/static/chunks/1952-57858e7445d24413.js +0 -1
  254. mage_ai/server/frontend_dist/_next/static/chunks/2717-92cdffd87b6f6e05.js +0 -1
  255. mage_ai/server/frontend_dist/_next/static/chunks/3419-715ca383fa15a5ef.js +0 -1
  256. mage_ai/server/frontend_dist/_next/static/chunks/3437-b4d6a037cf5781f8.js +0 -1
  257. mage_ai/server/frontend_dist/_next/static/chunks/3943-c9fb980f03df6450.js +0 -1
  258. mage_ai/server/frontend_dist/_next/static/chunks/600-705fe234320ec5de.js +0 -1
  259. mage_ai/server/frontend_dist/_next/static/chunks/722-900f786d24f91b2e.js +0 -1
  260. mage_ai/server/frontend_dist/_next/static/chunks/8264-0d582a6ca33c3dfa.js +0 -1
  261. mage_ai/server/frontend_dist/_next/static/chunks/8487-8e1c09546dff4dbf.js +0 -1
  262. mage_ai/server/frontend_dist/_next/static/chunks/90-a7308bae028d7001.js +0 -1
  263. mage_ai/server/frontend_dist/_next/static/chunks/9624-334e7db5c84cb4ea.js +0 -1
  264. mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-419775ca1293b354.js +0 -1
  265. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +0 -1
  266. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-b35d37bfba8fbccc.js +0 -1
  267. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +0 -1
  268. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +0 -1
  269. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +0 -1
  270. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-ef680455ae54ccbe.js +0 -1
  271. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +0 -1
  272. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +0 -1
  273. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +0 -1
  274. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +0 -1
  275. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +0 -1
  276. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +0 -1
  277. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +0 -1
  278. mage_ai/server/frontend_dist_base_path_template/_next/static/aoO6jYZLVlUGCCdY-wmy8/_buildManifest.js +0 -1
  279. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-57858e7445d24413.js +0 -1
  280. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-92cdffd87b6f6e05.js +0 -1
  281. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-715ca383fa15a5ef.js +0 -1
  282. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-b4d6a037cf5781f8.js +0 -1
  283. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-c9fb980f03df6450.js +0 -1
  284. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/600-705fe234320ec5de.js +0 -1
  285. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-900f786d24f91b2e.js +0 -1
  286. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-0d582a6ca33c3dfa.js +0 -1
  287. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-8e1c09546dff4dbf.js +0 -1
  288. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/90-a7308bae028d7001.js +0 -1
  289. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-334e7db5c84cb4ea.js +0 -1
  290. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-419775ca1293b354.js +0 -1
  291. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +0 -1
  292. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-b35d37bfba8fbccc.js +0 -1
  293. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +0 -1
  294. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +0 -1
  295. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +0 -1
  296. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-ef680455ae54ccbe.js +0 -1
  297. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +0 -1
  298. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +0 -1
  299. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +0 -1
  300. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +0 -1
  301. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +0 -1
  302. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +0 -1
  303. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +0 -1
  304. /mage_ai/server/frontend_dist/_next/static/{N3FS4bHv0jpYeeg672uYK → xxcdnITr3IkTdETH5ghqw}/_ssgManifest.js +0 -0
  305. /mage_ai/server/frontend_dist_base_path_template/_next/static/{aoO6jYZLVlUGCCdY-wmy8 → gDn6inKdLyj35NvURBSCV}/_ssgManifest.js +0 -0
  306. {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/LICENSE +0 -0
  307. {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/WHEEL +0 -0
  308. {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/entry_points.txt +0 -0
  309. {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{16488:function(n,e,t){"use strict";t.d(e,{IJ:function(){return p},M8:function(){return E},Uc:function(){return Z},XM:function(){return O},_U:function(){return m},eI:function(){return x},gU:function(){return _},lO:function(){return w},ri:function(){return b},tL:function(){return g},vJ:function(){return I},xH:function(){return j}});var r,o=t(82394),i=t(92083),u=t.n(i),c=t(3917),l=t(4383),s=t(30229),a=t(42122),d=t(86735);function f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function v(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var m=function(n){return!!n&&!Object.values(s.U5).includes(n)};function p(n){return null===n||void 0===n?void 0:n.reduce((function(n,e){var t=e.block_uuid,r=e.completed_at,i=e.started_at,c=e.status,l=null;i&&r&&(l=u()(r).valueOf()-u()(i).valueOf());return v(v({},n),{},(0,o.Z)({},t,{runtime:l,status:c}))}),{})}var h,b=function(n){var e=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:s.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:s.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:s.Xm.API}];return n?e.slice(0,1):e};function j(n){var e=(0,a.gR)(n,[s.gm.INTERVAL,s.gm.TYPE]),t=n[s.gm.INTERVAL];t&&(e["schedule_interval[]"]=encodeURIComponent(t));var r=n[s.gm.TYPE];return r&&(e["schedule_type[]"]=r),e}function x(n){return n?new Date(u()(n).valueOf()):null}function Z(n,e){return e?(0,c.XG)(n,e):function(n){if("string"!==typeof n)return n;var e=n.split("+")[0];return u()(x(e)).format(c.Nx)}(n)}!function(n){n.DAY="day",n.HOUR="hour",n.MINUTE="minute",n.SECOND="second"}(h||(h={}));var g=(r={},(0,o.Z)(r,h.DAY,86400),(0,o.Z)(r,h.HOUR,3600),(0,o.Z)(r,h.MINUTE,60),(0,o.Z)(r,h.SECOND,1),r);function _(n){var e=h.SECOND,t=n;return n%86400===0?(t/=86400,e=h.DAY):n%3600===0?(t/=3600,e=h.HOUR):n%60===0&&(t/=60,e=h.MINUTE),{time:t,unit:e}}function I(n,e){return n*g[e]}function O(n,e,t){var r,o=u()(n);return o.set("hour",+(null===e||void 0===e?void 0:e.hour)||0),o.set("minute",+(null===e||void 0===e?void 0:e.minute)||0),o.set("second",0),r=o.format(c.TD),null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(r=o.format(c.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,c.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),r}function E(n){var e,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",o=!0;return o&&(t?r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===n||void 0===n?void 0:n.id,"/api_trigger"):(r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===n||void 0===n?void 0:n.id,"/pipeline_runs"),null!==n&&void 0!==n&&n.token&&(r="".concat(r,"/").concat(n.token)))),o&&(e=window.location.port)&&(r=r.replace(e,l.QT)),r}function y(n,e,t){return n.match(/[*,-/]/)?{additionalOffset:0,cronValue:n}:function(n,e,t){var r=t.indexOf(n),o=0;if(e<0)for(var i=0;i>e;i--)0===r?(r=t.length-1,o-=1):r-=1;else if(e>0)for(var u=0;u<e;u++)r===t.length-1?(r=0,o+=1):r+=1;return{additionalOffset:o,cronValue:String(t[r]||n)}}(+n,e,t)}var N=(0,d.m5)(60),P=(0,d.m5)(24),k=(0,c.Cs)();function w(n,e){if(!n)return n;var t=u()().local().format("Z"),r=t.split(":"),o="-"===t[0],i=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),c=Number(r[1]);(o&&!e||!o&&e)&&(i=-i,c=-c);var l=n.split(" "),s=l[0],a=l[1],d=l[2],f=y(s,c,N),v=y(a,i+f.additionalOffset,P);if(l[0]=f.cronValue,l[1]=v.cronValue,0!==(null===v||void 0===v?void 0:v.additionalOffset)){var m=y(d,v.additionalOffset,k);l[2]=m.cronValue}return l.join(" ")}},44265:function(n,e,t){"use strict";t.d(e,{Az:function(){return s},BF:function(){return l},Do:function(){return d},IK:function(){return c},P0:function(){return o},VO:function(){return u},sZ:function(){return a}});var r,o,i=t(82394),u=t(41143).V,c=[u.FAILED,u.COMPLETED,u.RUNNING,u.CANCELLED,u.INITIAL],l=[u.INITIAL,u.RUNNING],s=[u.CANCELLED,u.COMPLETED,u.FAILED],a="__mage_variables",d=(r={},(0,i.Z)(r,u.CANCELLED,"Cancelled"),(0,i.Z)(r,u.COMPLETED,"Done"),(0,i.Z)(r,u.FAILED,"Failed"),(0,i.Z)(r,u.INITIAL,"Ready"),(0,i.Z)(r,u.RUNNING,"Running"),r);!function(n){n.PIPELINE_UUID="pipeline_uuid[]",n.STATUS="status[]",n.TAG="pipeline_tag[]"}(o||(o={}))},30229:function(n,e,t){"use strict";t.d(e,{PN:function(){return c},TR:function(){return m},U5:function(){return s},Wb:function(){return v},Xm:function(){return i},Z4:function(){return a},fq:function(){return l},gm:function(){return d},kJ:function(){return f}});var r,o,i,u=t(82394),c="__bookmark_values__";!function(n){n.API="api",n.EVENT="event",n.TIME="time"}(i||(i={}));var l,s,a=(r={},(0,u.Z)(r,i.API,(function(){return"API"})),(0,u.Z)(r,i.EVENT,(function(){return"event"})),(0,u.Z)(r,i.TIME,(function(){return"schedule"})),r);!function(n){n.ACTIVE="active",n.INACTIVE="inactive"}(l||(l={})),function(n){n.ONCE="@once",n.HOURLY="@hourly",n.DAILY="@daily",n.WEEKLY="@weekly",n.MONTHLY="@monthly",n.ALWAYS_ON="@always_on"}(s||(s={}));var d,f,v=[s.ONCE,s.HOURLY,s.DAILY,s.WEEKLY,s.MONTHLY];!function(n){n.INTERVAL="frequency[]",n.STATUS="status[]",n.TAG="tag[]",n.TYPE="type[]"}(d||(d={})),function(n){n.CREATED_AT="created_at",n.NAME="name",n.PIPELINE="pipeline_uuid",n.STATUS="status",n.TYPE="schedule_type"}(f||(f={}));var m=(o={},(0,u.Z)(o,f.CREATED_AT,"Created at"),(0,u.Z)(o,f.NAME,"Name"),(0,u.Z)(o,f.PIPELINE,"Pipeline"),(0,u.Z)(o,f.STATUS,"Active"),(0,u.Z)(o,f.TYPE,"Type"),o)},25050:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return sn}});var r=t(77837),o=t(38860),i=t.n(o),u=t(82684),c=t(75457),l=t(93808),s=t(75582),a=t(82394),d=t(97618),f=t(55485),v=t(85854),m=t(44265),p=t(38276),h=t(4190),b=t(30160),j=t(44897),x=t(38626),Z=t(42631),g=t(95363),_=t(70515),I=t(61896),O=x.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,_.cd*_.iI,(function(n){return"\n background-color: ".concat((n.theme.background||j.Z.background).panel,";\n border: 1px solid ").concat((n.theme.borders||j.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(n){return n.selected&&n.danger&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).negative,";\n ")}),(function(n){return n.selected&&n.primary&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.selected&&n.default&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).focusBackground,";\n ")}),(function(n){return n.selected&&n.success&&"\n border-color: ".concat((n.theme.background||j.Z.background).success,";\n ")}),(function(n){return n.selected&&n.warning&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).warning,";\n ")}),(function(n){return n.danger&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).focusBackground,";\n ")}),(function(n){return n.success&&"\n border-color: ".concat((n.theme.background||j.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).warning,";\n ")})),E=(0,x.css)([""," "," "," "," ",""],(function(n){return n.danger&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n background-color: ".concat((n.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||j.Z.interactive).defaultBackground,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||j.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).warning,";\n ")})),y=x.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],E,I.iD,Z.D7,g.ry,(function(n){return n.danger&&"\n color: ".concat((n.theme.content||j.Z.content).active,";\n ")}),(function(n){return n.primary&&"\n color: ".concat((n.theme.content||j.Z.content).active,";\n ")}),(function(n){return(n.default||n.success)&&"\n "}),(function(n){return n.default&&"\n color: ".concat((n.theme.content||j.Z.content).default,";\n ")}),(function(n){return n.success&&"\n color: ".concat((n.theme.content||j.Z.content).inverted,";\n ")}),(function(n){return n.warning&&"\n color: ".concat((n.theme.content||j.Z.content).inverted,";\n ")})),N=x.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],E,(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||j.Z.interactive).focusBackground,";\n ")})),P=t(72473),k=t(16488),w=t(92083),T=t.n(w),A=t(41143),L=t(81728),S=t(86735);function M(n){var e;return Object.keys((null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{}).sort()}function C(n){var e,t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null,i=null,u=null,c=null,l={},a=(null===n||void 0===n?void 0:n.block_runs)||[],d=(null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{},f=(null===n||void 0===n||null===(t=n.metrics)||void 0===t?void 0:t.pipeline)||{},v=D(n);return Object.entries(d).forEach((function(n){var e,t=(0,s.Z)(n,2),a=t[0],d=t[1];if(!r||r===a){var m,p=d||{},h=p.destinations,b=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,j=p.sources,x=void 0===j?{records:null}:j,Z=v[a]||[];if(r&&r===a&&Z.every((function(n){var e=n.status;return A.V.COMPLETED===e}))&&null===o&&(o=0),null!==f&&void 0!==f&&null!==(e=f[a])&&void 0!==e&&e.record_counts)null===o&&(o=0),o+=Number(null===f||void 0===f||null===(m=f[a])||void 0===m?void 0:m.record_counts);else null!==x&&void 0!==x&&x.records&&(null===o&&(o=0),o+=Number(x.records));null!==b&&void 0!==b&&b.records_updated?(null===u&&(u=0),u+=Number(b.records_updated),null===c&&(c=0),c+=Number(b.records_updated)):null!==b&&void 0!==b&&b.records_inserted?(null===u&&(u=0),u+=Number(b.records_inserted),null===i&&(i=0),i+=Number(b.records_inserted)):null!==b&&void 0!==b&&b.records_affected&&(null===u&&(u=0),u+=Number(b.records_affected)),["destinations","sources"].forEach((function(n){var e=d[n]||{};null!==e&&void 0!==e&&e.error&&(l[a]||(l[a]={}),l[a][n]={error:null===e||void 0===e?void 0:e.error,errors:null===e||void 0===e?void 0:e.errors,message:null===e||void 0===e?void 0:e.message})}))}})),null===a||void 0===a||a.forEach((function(n){var e=n.block_uuid,t=n.metrics,r=n.status;if(A.V.FAILED===r&&null!==t&&void 0!==t&&t.error&&e){var o=e.split(":"),i=(0,s.Z)(o,3),u=(i[0],i[1]);i[2];l[u]||(l[u]={}),l[u][""]=t.error}})),{errors:l,records:o,recordsInserted:i,recordsProcessed:u,recordsUpdated:c}}function D(n){var e=n.block_runs,t={};return null===e||void 0===e||e.forEach((function(n){var e=n.block_uuid.split(":"),r=(0,s.Z)(e,3),o=(r[0],r[1]);r[2];t[o]||(t[o]=[]),t[o].push(n)})),t}function V(n){var e=D(n),t={};return Object.entries(e).forEach((function(n){var e=(0,s.Z)(n,2),r=e[0],o=e[1],i=o.filter((function(n){var e=n.status;return A.V.COMPLETED===e})),u=i.map((function(n){var e=n.completed_at,t=n.started_at,r=T().utc(e),o=T().utc(t);return r.diff(o,"second")})),c=i.length,l=o.length;t[r]={completed:c,runtime:u.length>=1?(0,S.Sm)(u)/u.length:null,total:l}})),t}function R(n){var e=n.block_runs,t=(null===e||void 0===e?void 0:e.length)||1,r=function(n){var e=(null===n||void 0===n?void 0:n.block_runs)||[];return null===e||void 0===e?void 0:e.filter((function(n){var e=n.status;return A.V.COMPLETED===e}))}(n).length||0;return r/t}function U(n){var e=n.completed_at,t=n.block_runs,r=void 0===t?[]:t,o=n.status;if(null===r||void 0===r||!r.length)return 0;var i=T().utc();if(e)i=T().utc(e);else if([m.VO.CANCELLED,m.VO.FAILED].includes(o)){var u=(0,S.YC)(r,(function(n){return n.started_at}),{ascending:!1})[0];i=T().utc(u.updated_at)}var c=T().utc(n.created_at);return i.diff(c,"second")}function Y(n,e){var t,r,o,i,u,c=D(n),l=V(n),s=(null===n||void 0===n?void 0:n.metrics)||{blocks:null,pipeline:null},a=s.blocks||{},d=s.pipeline||{},f=(a[e],d[e],l[e]||{completed:null,total:null}),v=f.completed,m=f.total,p=v&&m?v/m:0,h=c[e]||[],b=h.every((function(n){var e=n.status;return A.V.COMPLETED===e})),j=(0,S.YC)(h,(function(n){return n.updated_at}),{ascending:!1})[0],x=null===(t=(0,S.YC)(h,(function(n){return n.started_at}),{ascending:!0})[0])||void 0===t?void 0:t.started_at;b?r=null===(u=(0,S.YC)(h,(function(n){return n.completed_at}),{ascending:!1})[0])||void 0===u?void 0:u.completed_at:j&&(i=null===j||void 0===j?void 0:j.updated_at);var Z=b?T().utc(r||i):T().utc(),g=T().utc(x);return{completed:v,completedAt:r,done:b,progress:p,runtime:o=Z.diff(g,"second"),startedAt:x,status:null===j||void 0===j?void 0:j.status,timeText:(0,L.zf)(o),total:m,updatedAt:i}}var F=t(70320),G=t(28598);function z(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function B(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?z(Object(t),!0).forEach((function(e){(0,a.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):z(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var H=function(n){var e=n.onSelect,t=n.pipelineRun,r=n.selected,o=t.created_at,i=t.status,c=(0,u.useMemo)((function(){return(null===t||void 0===t?void 0:t.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[t]),l=(0,u.useMemo)((function(){return c.pipeline||{}}),[c]),a=(0,F.qB)(),x=c.destination,Z=c.source,g=(0,u.useMemo)((function(){return Object.keys(l).length}),[l]),I=(0,u.useMemo)((function(){return C(t)}),[t]),E=I.errors,w=I.records,T=I.recordsProcessed,A=(0,u.useMemo)((function(){return R(t)}),[t]),S=(0,u.useMemo)((function(){return[m.VO.COMPLETED].includes(i)}),[i]),M=(0,u.useMemo)((function(){return{danger:m.VO.FAILED===i,default:m.VO.INITIAL===i,primary:m.VO.RUNNING===i,success:S,warning:m.VO.CANCELLED===i}}),[S,i]),D=(0,u.useMemo)((function(){if(t){var n=U(t);return(0,L.zf)(n)}}),[t]);return(0,G.jsx)(O,B(B({},M),{},{onClick:function(){return e(r?null:t.id)},selected:r,children:(0,G.jsxs)(f.ZP,{fullHeight:!0,justifyContent:"space-between",children:[(0,G.jsx)(N,B({},M)),(0,G.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,G.jsxs)(p.Z,{ml:3,py:3,children:[(0,G.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:(0,k.Uc)(o,a)}),(0,G.jsx)(p.Z,{fullWidth:!1,mt:2,children:(0,G.jsx)(y,B(B({},M),{},{children:(0,G.jsxs)(f.ZP,{alignItems:"center",children:[S&&(0,G.jsx)(P.Jr,{inverted:!0,size:2*_.iI}),[m.VO.INITIAL,m.VO.RUNNING].includes(i)&&(0,G.jsx)(h.Z,{color:m.VO.INITIAL!==i?j.Z.monotone.white:null,inverted:m.VO.INITIAL===i,small:!0}),"\xa0",m.VO.RUNNING===i&&(0,G.jsxs)(G.Fragment,{children:["\xa0",Math.round(100*A),"%"]}),![m.VO.INITIAL,m.VO.RUNNING].includes(i)&&m.Do[i],m.VO.INITIAL===i&&"Starting"]})}))}),Object.values(E).length>=1&&(0,G.jsx)(p.Z,{mt:1,children:Object.entries(E).map((function(n){var e=(0,s.Z)(n,2),t=e[0];e[1];return(0,G.jsxs)(b.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,G.jsxs)(d.Z,{flex:1,children:[(0,G.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,G.jsxs)(p.Z,{ml:3,py:3,children:[(0,G.jsxs)(p.Z,{mb:1,children:[(0,G.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,G.jsx)(b.ZP,{monospace:!0,children:T>=1?(0,L.x6)(T):"-"})]}),(0,G.jsxs)(p.Z,{mb:1,children:[(0,G.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,G.jsx)(b.ZP,{monospace:!0,children:w>=1&&w>=T?(0,L.x6)(w-T):"-"})]}),m.VO.RUNNING!==i&&(0,G.jsxs)(p.Z,{mb:1,children:[(0,G.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,G.jsx)(b.ZP,{monospace:!0,children:D})]})]})}),(0,G.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,G.jsxs)(p.Z,{ml:3,py:3,children:[(0,G.jsxs)(p.Z,{mb:1,children:[(0,G.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,G.jsx)(b.ZP,{monospace:!0,children:Z||"-"})]}),(0,G.jsxs)(p.Z,{mb:1,children:[(0,G.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,G.jsx)(b.ZP,{monospace:!0,children:x||"-"})]}),(0,G.jsxs)(p.Z,{mb:1,children:[(0,G.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,G.jsx)(b.ZP,{monospace:!0,children:g>=1?(0,L.x6)(g):"-"})]})]})})]})]})}))},X=t(89565),W=t.n(X),J=t(34376),q=t(71180),K=t(48670),Q=t(75499),$=x.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(n){return n.even&&n.fill&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).cyan,";\n ")}),(function(n){return n.even&&!n.fill&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).cyanTransparent,";\n ")}),(function(n){return"\n height: ".concat((n.small?1:2)*_.iI,"px;\n ")})),nn=t(3314),en=t(3917);var tn=function(n){var e=n.onClickRow,t=n.pipelineRun,r=n.selectedStream,o=(0,J.useRouter)(),i=(0,F.qB)(),c=(0,u.useState)(null),l=c[0],a=c[1],d=(0,u.useState)(null),h=d[0],j=d[1],x=(0,u.useMemo)((function(){return t?D(t):{}}),[t]),Z=(0,u.useMemo)((function(){return t?V(t):{}}),[t]),g=(0,u.useMemo)((function(){var n=0,e=[],t=[];if(Object.entries(Z).forEach((function(r){var o=(0,s.Z)(r,2),i=(o[0],o[1]),u=i.completed,c=i.runtime,l=i.total;null===c?t.push(i):(e.push(c),n+=c*(l-u))})),0===e.length)return null;var r=(0,S.Sm)(e)/e.length;return t.forEach((function(e){var t=e.completed,o=e.total;n+=r*(o-t)})),n}),[Z]),I=(0,u.useMemo)((function(){return r?Z[r]:null}),[Z,r]),O=(0,u.useMemo)((function(){if(r&&Z){var n=Z[r]||{},e=n.completed,o=n.total;if(o>=1)return e/o}else if(t)return R(t);return 0}),[Z,t,r]),E=(0,u.useMemo)((function(){return(0,G.jsx)(f.ZP,{children:(0,S.w6)(101).map((function(n,e){return(0,G.jsx)($,{even:e%2===0,fill:O>0&&Math.round(100*O)>=e},e)}))})}),[O]),y=(0,u.useMemo)((function(){if(r){var n=x[r]||[],e=n.every((function(n){var e=n.status;return A.V.COMPLETED===e})),o=(0,S.YC)(n,(function(n){return n.updated_at}),{ascending:!1})[0],i=null===o||void 0===o?void 0:o.status,u=I||{},c=u.completed,l=u.runtime,s=u.total;if(e)return"Sync complete for ".concat(r);if([A.V.CANCELLED,A.V.FAILED].includes(i))return m.Do[i];if(l&&s>=1){var a=Math.ceil(l*(s-c)/60);return"".concat((0,L._6)("minute",a,!0)," to completion")}return"Estimating time remaining for stream..."}if(m.VO.COMPLETED===(null===t||void 0===t?void 0:t.status))return"Sync complete";if(t){if([m.VO.CANCELLED,m.VO.FAILED].includes(null===t||void 0===t?void 0:t.status))return m.Do[null===t||void 0===t?void 0:t.status];if(m.VO.INITIAL===(null===t||void 0===t?void 0:t.status))return"Initializing sync (this can take several minutes)";if(null===g)return"Estimating time remaining...";var d=Math.ceil(g/60);return"".concat((0,L._6)("minute",d,!0)," to completion")}return"Select a sync"}),[x,g,I,t,r]),N=(0,u.useMemo)((function(){return t&&r?Y(t,r):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[t,r]);(0,u.useEffect)((function(){var n;if(t){var e=U(t);a(e),n=setInterval((function(){return a((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[t]),(0,u.useEffect)((function(){var n;if(t&&r&&N){var e=(null===N||void 0===N?void 0:N.runtime)||0;j(e),n=setInterval((function(){return j((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[t,r,N]);var w=(0,u.useMemo)((function(){if(t){if(r)return null===N||void 0===N?void 0:N.timeText;var n=U(t);return(0,L.zf)(n)}}),[t,r,N]),T=(0,u.useMemo)((function(){var n=Math.floor(l%86400/3600),e=Math.floor(l%3600/60),t=Math.floor(l%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),t>=10?String(t):"0".concat(t)].join(":")}),[l]),z=(0,u.useMemo)((function(){var n=Math.floor(h%86400/3600),e=Math.floor(h%3600/60),t=Math.floor(h%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),t>=10?String(t):"0".concat(t)].join(":")}),[h]),B=(0,u.useMemo)((function(){return t?C(t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t]),H=B.errors,X=B.records,tn=B.recordsInserted,rn=B.recordsProcessed,on=B.recordsUpdated,un=(0,u.useMemo)((function(){return t&&r?C(t,r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t,r]),cn=(0,u.useMemo)((function(){var n=r?null===un||void 0===un?void 0:un.records:X,e=r?null===un||void 0===un?void 0:un.recordsInserted:tn,t=r?null===un||void 0===un?void 0:un.recordsProcessed:rn,o=r?null===un||void 0===un?void 0:un.recordsUpdated:on,i=[{label:"Rows fetched",value:null===n?"-":(0,L.x6)(n)}];return null===e&&null===o?i.push({label:"Rows processed",value:null===t?"-":(0,L.x6)(t)}):null!==e?i.push({label:"Rows inserted",value:(0,L.x6)(e)}):null!==o&&i.push({label:"Rows updated",value:(0,L.x6)(o)}),i.map((function(n){var e=n.label,t=n.value;return(0,G.jsxs)("div",{children:[(0,G.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:e}),(0,G.jsx)(b.ZP,{headline:!0,children:t})]},e)}))}),[X,un,tn,rn,on,r]),ln=(0,u.useMemo)((function(){if(!t)return(0,G.jsx)("div",{});var n=M(t);return(0,G.jsx)(Q.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(e){return r&&r===n[e]},onClickRow:e,rows:n.map((function(n){var e=Y(t,n),r=(e.completed,e.completedAt),u=e.done,c=e.progress,l=e.startedAt,s=e.status,a=e.timeText,d=(e.total,!!H[n]);return[(0,G.jsx)(b.ZP,{danger:d,default:!d,monospace:!0,children:n},"stream"),(0,G.jsx)(b.ZP,{default:!0,monospace:!0,title:l?(0,en._6)(l):null,children:l?(0,k.Uc)(l,i):(0,G.jsx)(G.Fragment,{children:"\u2014"})},"started_at"),(0,G.jsx)(b.ZP,{default:!0,monospace:!0,title:r?(0,en._6)(r):null,children:r?(0,k.Uc)(r,i):(0,G.jsx)(G.Fragment,{children:"\u2014"})},"completed_at"),(0,G.jsx)(b.ZP,{default:!0,children:[A.V.INITIAL,A.V.RUNNING].includes(s)?"-":a},"runtime"),(0,G.jsxs)("div",{children:[u&&(0,G.jsx)(P.Jr,{default:!0,size:2*_.iI}),!u&&(0,G.jsx)(f.ZP,{children:(0,S.w6)(51).map((function(n,e){return(0,G.jsx)($,{even:e%2===0,fill:c>0&&Math.round(50*c)>=e,small:!0},e)}))})]},"progress"),(0,G.jsx)(q.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(n){o.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id)),(0,nn.j)(n)},children:(0,G.jsx)(P.UL,{default:!0,size:2*_.iI})},"logs")]})),uuid:"".concat(null===t||void 0===t?void 0:t.id,"-streams-table")})}),[i,H,e,t,o,r]),sn=(0,u.useMemo)((function(){var n,e,o,i,u,c,l,a;if(t&&r){var d=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===d||void 0===d||null===(n=d.pipeline)||void 0===n||null===(e=n[r])||void 0===e||null===(o=e.bookmarks)||void 0===o?void 0:o[r],v=null===d||void 0===d||null===(i=d.blocks)||void 0===i||null===(u=i[r])||void 0===u||null===(c=u.destinations)||void 0===c||null===(l=c.state)||void 0===l||null===(a=l.bookmarks)||void 0===a?void 0:a[r];if(f||v){var m=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),p=[];m.forEach((function(n){var e=[(0,G.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[f,v].forEach((function(t,r){t&&e.push((0,G.jsx)(b.ZP,{monospace:!0,small:!0,children:t[n]},"".concat(n,"-").concat(r)))})),p.push(e)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===d||void 0===d?void 0:d.source,"source",f],[null===d||void 0===d?void 0:d.destination,"destination",v]].forEach((function(n){var e=(0,s.Z)(n,3),t=e[0],r=e[1];e[2]&&h.push({uuid:"".concat(t," (").concat(r,")")})})),(0,G.jsx)(Q.Z,{columnFlex:[null,1,1],columns:h,rows:p,uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),an=(0,u.useMemo)((function(){var n,e,o,i,u,c;if(t&&r){var l=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},a=null===l||void 0===l||null===(n=l.blocks)||void 0===n||null===(e=n[r])||void 0===e||null===(o=e.sources)||void 0===o?void 0:o.record,d=null===l||void 0===l||null===(i=l.blocks)||void 0===i||null===(u=i[r])||void 0===u||null===(c=u.destinations)||void 0===c?void 0:c.record;if(a||d){var f=Object.keys(d||a||{}).sort(),v=[];f.forEach((function(n){var e=[(0,G.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[a,d].forEach((function(t,r){if(t){var o=t[n],i="object"===typeof o;e.push((0,G.jsxs)(b.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[i&&(0,G.jsx)("pre",{children:JSON.stringify(o,null,2)}),!i&&o]},"".concat(n,"-").concat(r)))}})),v.push(e)}));var m=[{label:function(){return""},uuid:"column"}];return[[null===l||void 0===l?void 0:l.source,"source",a],[null===l||void 0===l?void 0:l.destination,"destination",d]].forEach((function(n){var e=(0,s.Z)(n,3),t=e[0],r=e[1];e[2]&&m.push({uuid:"".concat(t," (").concat(r,")")})})),(0,G.jsx)(Q.Z,{columnFlex:[null,1,1],columns:m,rows:v.map((function(n){return n.map((function(n){return(0,G.jsx)(b.ZP,{default:!0,monospace:!0,children:n},n)}))})),uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),dn=(0,u.useMemo)((function(){var n,e,o,i,u,c,l=null===t||void 0===t||null===(n=t.metrics)||void 0===n||null===(e=n.blocks)||void 0===e?void 0:e[r];return(null===l||void 0===l||null===(o=l.sources)||void 0===o||null===(i=o.block_tags)||void 0===i?void 0:i.destination_table)||(null===l||void 0===l||null===(u=l.destinations)||void 0===u||null===(c=u.block_tags)||void 0===c?void 0:c.destination_table)}),[t,r]);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(p.Z,{p:3,children:[r&&(0,G.jsx)(p.Z,{mb:3,children:(0,G.jsxs)(f.ZP,{alignItems:"center",children:[(0,G.jsx)(K.Z,{block:!0,onClick:function(){return o.push("/pipelines/".concat(t.pipeline_uuid,"/syncs?pipeline_run_id=").concat(t.id))},preventDefault:!0,children:(0,G.jsxs)(f.ZP,{alignItems:"center",children:[(0,G.jsx)(P.Xd,{default:!0,size:1.5*_.iI}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(b.ZP,{default:!0,children:"Syncs"})]})}),(0,G.jsx)(p.Z,{mx:1,children:(0,G.jsx)(b.ZP,{default:!0,monospace:!0,children:"/"})}),(0,G.jsx)(b.ZP,{bold:!0,monospace:!0,children:r})]})}),(0,G.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,G.jsx)(p.Z,{mr:2,my:1,children:(0,G.jsx)(v.Z,{level:5,muted:!t,children:y})}),t&&(0,G.jsx)(q.ZP,{onClick:function(){return o.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id))},small:!0,children:"Logs"})]}),(0,G.jsx)(p.Z,{mt:2,children:E}),t&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(p.Z,{mt:3,children:(0,G.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,G.jsxs)("div",{children:[(0,G.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,G.jsxs)(b.ZP,{headline:!0,children:[r&&[A.V.INITIAL,A.V.RUNNING].includes(null===N||void 0===N?void 0:N.status)&&z,r&&![A.V.INITIAL,A.V.RUNNING].includes(null===N||void 0===N?void 0:N.status)&&(null===N||void 0===N?void 0:N.timeText),!r&&[m.VO.INITIAL,m.VO.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&T,!r&&![m.VO.INITIAL,m.VO.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&w]})]}),cn]})}),Object.values(H).length>=1&&(0,G.jsxs)(p.Z,{mt:3,children:[(0,G.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(H).map((function(n,e){var t=(0,s.Z)(n,2),o=t[0],i=t[1];return(!r||r===o)&&(0,G.jsx)(p.Z,{mt:e>=1?1:0,children:Object.entries(i).map((function(n){var e=(0,s.Z)(n,2),t=e[0],r=e[1],i=r.error,u=r.errors,c=r.message,l=Array.isArray(i)?i.join(" "):i;return(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:c||(null===u||void 0===u?void 0:u.length)>=1?2:0,children:(0,G.jsxs)(b.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[o,!!t&&(0,G.jsxs)(b.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",t,")"]}),": ",(0,G.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:l&&(0,G.jsx)(W(),{children:l})})]})}),(0,G.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),u.map((function(n){return(0,G.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:n},n)}))]},"".concat(o,"-").concat(t))}))},o)}))]})]})]}),t&&!r&&(0,G.jsx)(p.Z,{my:3,children:ln}),t&&r&&(0,G.jsxs)(G.Fragment,{children:[dn&&(0,G.jsx)(p.Z,{my:3,children:(0,G.jsxs)(p.Z,{px:3,children:[(0,G.jsx)(v.Z,{level:5,children:"Table name"}),(0,G.jsx)(p.Z,{mt:1,children:(0,G.jsx)(b.ZP,{default:!0,monospace:!0,children:dn})})]})}),sn&&(0,G.jsxs)(p.Z,{my:3,children:[(0,G.jsx)(p.Z,{px:3,children:(0,G.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,G.jsx)(p.Z,{px:1,children:sn})]}),an&&(0,G.jsxs)(p.Z,{my:3,children:[(0,G.jsx)(p.Z,{px:3,children:(0,G.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,G.jsx)(p.Z,{px:1,children:an})]})]})]})},rn=t(35686),on=t(28795),un=t(15610),cn=t(69419);function ln(n){var e=n.pipeline,t=e.uuid,r=rn.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:t},{refreshInterval:5e3}).data,o=(0,u.useMemo)((function(){return(null===r||void 0===r?void 0:r.pipeline_runs)||[]}),[r]),i=(0,cn.iV)(),l=(0,u.useState)(null),s=l[0],a=l[1],d=(0,u.useState)(null),f=d[0],v=d[1],m=(0,u.useState)(null),p=m[0],h=m[1];(0,u.useEffect)((function(){null!==i&&void 0!==i&&i.pipeline_run_id?h(null===o||void 0===o?void 0:o.find((function(n){return n.id===Number(i.pipeline_run_id)}))):p&&h(null),null!==i&&void 0!==i&&i.stream?v(i.stream):f&&v(null)}),[o,i,p,f]);var b=(0,u.useCallback)((function(){var n=p?M(p):[];return(0,G.jsx)(tn,{onClickRow:function(e){var t=n[e];(0,un.u7)({stream:f===t?null:t})},pipelineRun:p,selectedStream:f})}),[p,f]),j=(0,u.useMemo)((function(){var n="/pipelines/".concat(t,"/syncs");p&&(n="".concat(n,"?pipeline_run_id=").concat(p.id));var e=[{label:function(){return"Syncs"},linkProps:f?{as:n,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&e.push({label:function(){return f}}),e}),[t,p,f]);return(0,G.jsx)(c.Z,{breadcrumbs:j,buildSidekick:b,errors:s,pageName:on.M.SYNCS,pipeline:e,setErrors:a,title:function(n){var e=n.name;return"".concat(e," syncs")},uuid:"".concat(on.M.SYNCS,"_").concat(t),children:o.map((function(n){var e=(null===p||void 0===p?void 0:p.id)===n.id;return(0,G.jsx)(H,{onSelect:function(n){return(0,un.u7)({pipeline_run_id:n,stream:null})},pipelineRun:n,selected:e},n.id)}))})}ln.getInitialProps=function(){var n=(0,r.Z)(i().mark((function n(e){var t;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var sn=(0,l.Z)(ln)},59416:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return t(25050)}])},80022:function(n,e,t){"use strict";function r(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}t.d(e,{Z:function(){return r}})},15544:function(n,e,t){"use strict";function r(n){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},r(n)}t.d(e,{Z:function(){return r}})},13692:function(n,e,t){"use strict";t.d(e,{Z:function(){return o}});var r=t(61049);function o(n,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&(0,r.Z)(n,e)}},93189:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(12539),o=t(80022);function i(n,e){if(e&&("object"===r(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(n)}},61049:function(n,e,t){"use strict";function r(n,e){return r=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n},r(n,e)}t.d(e,{Z:function(){return r}})}},function(n){n.O(0,[2678,1154,844,4267,6990,8487,8264,7858,5499,5457,9774,2888,179],(function(){return e=59416,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{92709:function(e,n,i){"use strict";i.d(n,{$e:function(){return c},Em:function(){return p},IY:function(){return s},Jf:function(){return l},LR:function(){return r},NR:function(){return o},Qj:function(){return d},Wf:function(){return g},b7:function(){return t},m$:function(){return a},tK:function(){return u}});var t="edit",r="[ERR_BLOCK_EXISTS]",l={uuid:"All files"},s={uuid:"Current blocks"},o=[l,s],u="CUSTOM_EVENT_BLOCK_OUTPUT_CHANGED",c="CUSTOM_EVENT_CODE_BLOCK_CHANGED",a="CUSTOM_EVENT_COLUMN_SCROLLER_CURSOR_MOVED",d="CUSTOM_EVENT_COLUMN_SCROLLER_RESET",p="CUSTOM_EVENT_COLUMN_SCROLLER_SCROLL_TO_BLOCK",g="CUSTOM_EVENT_SYNC_COLUMN_POSITIONS"},74395:function(e,n,i){"use strict";i.d(n,{M:function(){return s},W:function(){return l}});var t=i(38626),r=i(46684),l=34*i(70515).iI,s=t.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],r.Mz)},8955:function(e,n,i){"use strict";i.d(n,{G7:function(){return b},ZP:function(){return P},u$:function(){return m}});var t=i(75582),r=i(82394),l=i(26304),s=i(90299),o=i(9134),u=i(24138),c=i(38276),a=i(30160),d=i(75499),p=i(70515),g=i(16488),f=i(42122),h=i(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function j(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 x(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?j(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):j(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var m=44,_={uuid:"Run details"},Z={uuid:"Dependency tree"},b=[Z,_];function P(e){var n=e.height,i=e.heightOffset,r=e.pipeline,j=e.selectedRun,P=e.selectedTab,O=e.setSelectedTab,y=x({},(0,l.Z)(e,v));j?y.blockStatus=(0,g.IJ)(null===j||void 0===j?void 0:j.block_runs):y.noStatus=!0;var S=(0,f.Kn)(null===j||void 0===j?void 0:j.variables)?x({},null===j||void 0===j?void 0:j.variables):(null===j||void 0===j?void 0:j.variables)||{},w=null===j||void 0===j?void 0:j.event_variables;if(w&&(0,f.Kn)(w)&&!(0,f.Qr)(w))if((0,f.Kn)(S)&&S.hasOwnProperty("event")){var E=(0,f.Kn)(S.event)?S.event:{};S.event=x(x({},E),w)}else S.event=x({},w);var I=[];S&&JSON.stringify(S,null,2).split("\n").forEach((function(e){I.push(" ".concat(e))}));var k=j&&[["Run ID",null===j||void 0===j?void 0:j.id],["Variables",(0,h.jsx)(o.Z,{language:"json",small:!0,source:I.join("\n")},"variable_value")]],C=j&&(0,h.jsx)(c.Z,{pb:p.cd,px:p.cd,children:(0,h.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:k.map((function(e,n){var i=(0,t.Z)(e,2),r=i[0],l=i[1];return[(0,h.jsx)(a.ZP,{monospace:!0,muted:!0,children:r},"key_".concat(n)),(0,h.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),T=P&&O;return(0,h.jsxs)(h.Fragment,{children:[T&&(0,h.jsx)(c.Z,{py:p.cd,children:(0,h.jsx)(s.Z,{onClickTab:O,selectedTabUUID:null===P||void 0===P?void 0:P.uuid,tabs:b,underlineStyle:!0})}),(!T||Z.uuid===(null===P||void 0===P?void 0:P.uuid))&&(0,h.jsx)(u.ZP,x(x({},y),{},{height:n,heightOffset:(i||0)+(T?m:0),pipeline:r})),_.uuid===(null===P||void 0===P?void 0:P.uuid)&&C]})}},36604:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return de}});var t=i(75582),r=i(77837),l=i(82394),s=i(38860),o=i.n(s),u=i(82684),c=i(12691),a=i.n(c),d=i(38626),p=i(69864),g=i(34376),f=i(71180),h=i(39457),v=i(15338),j=i(55485),x=i(85854),m=i(48670),_=i(55072),Z=i(75457),b=i(53943),P=i(44265),O=i(30229),y=i(83784),S=i(44085),w=i(38276),E=i(4190),I=i(75499),k=i(48381),C=i(30160),T=i(12468),N=i(35686),M=i(8955),D=i(77417),R=i(74395),U=i(44425),L=i(72473),F=i(70515),A=i(28795),H=i(97196),V=i(8916),K=i(16488),z=i(3917),W=i(55283),q=i(44375),B=i(15610),G=i(86735),X=i(42122),J=i(50178),$=i(72619),Q=i(3314),Y=i(69419),ee=i(70320),ne=i(28598);function ie(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 te(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ie(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var re=function(e){var n=e.errors,i=e.fetchPipelineSchedule,r=e.pipeline,l=e.pipelineSchedule,s=e.setErrors,o=e.variables,c=(0,u.useContext)(d.ThemeContext),ie=(0,D.Z)().project,re=(0,g.useRouter)(),le=(0,J.Ct)(),se=(0,ee.qB)(),oe=(0,u.useMemo)((function(){return(0,G.HK)((null===r||void 0===r?void 0:r.blocks)||[],(function(e){return e.uuid}))}),[r]),ue=(r||{}).uuid,ce=l||{},ae=ce.description,de=ce.id,pe=ce.event_matchers,ge=ce.name,fe=ce.next_pipeline_run_date,he=ce.schedule_interval,ve=ce.schedule_type,je=ce.settings,xe=ce.sla,me=ce.start_time,_e=ce.status,Ze=ce.tags,be=ce.variables,Pe=void 0===be?{}:be,Oe=(0,u.useMemo)((function(){return(0,K._U)(he)}),[he]),ye=(0,Y.iV)(),Se={_limit:30,_offset:30*(null!==ye&&void 0!==ye&&ye.page?ye.page:0)};null!==ye&&void 0!==ye&&ye.status&&(Se.status=ye.status),null!==l&&void 0!==l&&l.global_data_product_uuid&&(Se.global_data_product_uuid=null===l||void 0===l?void 0:l.global_data_product_uuid);var we=N.ZP.pipeline_runs.pipeline_schedules.list(de,Se,{refreshInterval:3e3,revalidateOnFocus:!0}),Ee=we.data,Ie=we.mutate,ke=(0,u.useMemo)((function(){return(null===Ee||void 0===Ee?void 0:Ee.pipeline_runs)||[]}),[Ee]),Ce=(0,u.useMemo)((function(){var e;return(null===Ee||void 0===Ee||null===(e=Ee.metadata)||void 0===e?void 0:e.count)||[]}),[Ee]),Te=(0,u.useState)(null),Ne=Te[0],Me=Te[1],De=(0,u.useMemo)((function(){var e=null!==ye&&void 0!==ye&&ye.page?ye.page:0;return(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(b.Z,{fetchPipelineRuns:Ie,onClickRow:function(e){return Me((function(n){var i=ke[e];return(null===n||void 0===n?void 0:n.id)!==i.id?i:null}))},pipelineRuns:ke,selectedRun:Ne,setErrors:s,setSelectedRun:Me}),(0,ne.jsx)(w.Z,{p:2,children:(0,ne.jsx)(_.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),i=te(te({},ye),{},{page:n>=0?n:0});re.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(ue,"/triggers/").concat(de,"?").concat((0,Y.uM)(i)))},page:Number(e),totalPages:Math.ceil(Ce/30)})})]})}),[Ie,ke,de,ue,ye,re,Ne,s,Ce]),Re=(0,u.useState)(M.G7[0]),Ue=Re[0],Le=Re[1],Fe=(0,p.Db)((function(e){return N.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,X.gR)(e,["id"])})}),{onSuccess:function(e){return(0,$.wD)(e,{callback:function(){i()},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),Ae=(0,t.Z)(Fe,2),He=Ae[0],Ve=Ae[1].isLoading,Ke=N.ZP.pipeline_triggers.pipelines.list(ue),ze=Ke.data,We=Ke.mutate,qe=(0,u.useMemo)((function(){return(0,G.HK)((null===ze||void 0===ze?void 0:ze.pipeline_triggers)||[],(function(e){return e.name}))}),[ze]),Be=(0,u.useMemo)((function(){return!(null===qe||void 0===qe||!qe[null===l||void 0===l?void 0:l.name])}),[l,qe]),Ge=(0,p.Db)(N.ZP.pipeline_triggers.pipelines.useCreate(ue),{onSuccess:function(e){return(0,$.wD)(e,{callback:function(){We()},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),Xe=(0,t.Z)(Ge,2),Je=Xe[0],$e=Xe[1].isLoading,Qe=(0,u.useMemo)((function(){return O.fq.ACTIVE===_e}),[_e]),Ye=(0,u.useMemo)((function(){var e,n,i={default:!0,size:1.5*F.iI},t=[[(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(L.VW,te({},i)),(0,ne.jsx)(w.Z,{mr:1}),(0,ne.jsx)(C.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,ne.jsx)(C.ZP,{monospace:!0,children:null===(e=O.Z4[ve])||void 0===e?void 0:e.call(O.Z4)},"trigger_type")],[(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(L.rs,te({},i)),(0,ne.jsx)(w.Z,{mr:1}),(0,ne.jsx)(C.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,ne.jsx)(C.ZP,{danger:!Qe,monospace:!0,success:Qe,children:_e},"trigger_status")]];if(ae&&t.push([(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(L.KJ,te({},i)),(0,ne.jsx)(w.Z,{mr:1}),(0,ne.jsx)(C.ZP,{default:!0,children:"Description"})]},"trigger_description_label"),(0,ne.jsx)(C.ZP,{children:ae},"trigger_description")]),xe){var r=(0,K.gU)(xe),s=r.time,o=r.unit,u=1===s?o:"".concat(o,"s");t.push([(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(L.kI,te({},i)),(0,ne.jsx)(w.Z,{mr:1}),(0,ne.jsx)(C.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,ne.jsx)(C.ZP,{monospace:!0,children:"".concat(s," ").concat(u)},"trigger_sla")])}if(he&&t.push([(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(L.Pf,te({},i)),(0,ne.jsx)(w.Z,{mr:1}),(0,ne.jsx)(C.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,ne.jsx)(C.ZP,{monospace:!0,children:se&&Oe?(0,K.lO)(he):he.replace("@","")},"trigger_frequency")],[(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(L.aw,te({},i)),(0,ne.jsx)(w.Z,{mr:1}),(0,ne.jsx)(C.ZP,{default:!0,children:"Next run date"})]},"trigger_next_run_date_label"),(0,ne.jsx)(C.ZP,{monospace:!0,children:fe?se?(0,z.XG)(fe,se):(0,z.d$)(fe,{includeSeconds:!0,utcFormat:!0}):"N/A"},"trigger_next_run_date")]),me&&t.push([(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(L.aw,te({},i)),(0,ne.jsx)(w.Z,{mr:1}),(0,ne.jsx)(C.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,ne.jsx)(C.ZP,{monospace:!0,children:se?(0,z.XG)(me,se):me},"trigger_start_date")]),O.Xm.API===ve){var c=(0,K.M8)(l);t.push([(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(L.Ae,te({},i)),(0,ne.jsx)(w.Z,{mr:1}),(0,ne.jsx)(C.ZP,{default:!0,children:"API endpoint"})]},"trigger_api_endpoint_label"),(0,ne.jsx)(h.Z,{copiedText:c,children:(0,ne.jsx)(C.ZP,{monospace:!0,small:!0,children:c})},"trigger_api_endpoint")])}if(null!==je&&void 0!==je&&je.timeout){var a=(0,K.gU)(null===je||void 0===je?void 0:je.timeout),d=a.time,p=a.unit,g=1===d?p:"".concat(p,"s");t.push([(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(T.Z,{default:!0,label:"Timeout set for runs of this trigger",size:1.5*F.iI,widthFitContent:!0}),(0,ne.jsx)(w.Z,{mr:1}),(0,ne.jsx)(C.ZP,{default:!0,children:"Timeout"})]},"trigger_timeout"),(0,ne.jsx)(C.ZP,{monospace:!0,children:"".concat(d," ").concat(g)},"trigger_timeout_label")])}null!==je&&void 0!==je&&je.skip_if_previous_running&&t.push([(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(T.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:1.5*F.iI,widthFitContent:!0}),(0,ne.jsx)(w.Z,{mr:1}),(0,ne.jsx)(C.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,ne.jsx)(C.ZP,{monospace:!0,children:null===(n=je.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);return null!==je&&void 0!==je&&je.allow_blocks_to_fail&&t.push([(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(T.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:1.5*F.iI,widthFitContent:!0}),(0,ne.jsx)(w.Z,{mr:1}),(0,ne.jsx)(C.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,ne.jsx)(C.ZP,{monospace:!0,children:je.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),(0,ne.jsx)(I.Z,{columnFlex:[null,1],rows:t})}),[ae,se,Qe,Oe,fe,l,he,ve,je,xe,me,_e]),en=(0,u.useMemo)((function(){return Pe||{}}),[Pe]),nn=(0,u.useMemo)((function(){var e,n=[];return(0,X.Qr)(en)?n=(0,V.wx)(o,(function(e){return e.uuid===y.C})):Object.entries(en).forEach((function(e){var i=(0,t.Z)(e,2),r=i[0],l=i[1];[P.sZ,O.PN].includes(r)||n.push({uuid:r,value:(0,V.FS)(l)})})),"undefined"!==typeof(n=(0,V.JZ)(n||[],ve))&&null!==(e=n)&&void 0!==e&&e.length?(0,ne.jsx)(I.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,i=e.value;return[(0,ne.jsx)(C.ZP,{default:!0,monospace:!0,children:n},"settings_variable_label_".concat(n)),(0,ne.jsx)(C.ZP,{monospace:!0,children:i},"settings_variable_".concat(n))]}))}):null}),[ve,en,o]),tn=(0,u.useMemo)((function(){var e=null===en||void 0===en?void 0:en[O.PN];return e?(0,ne.jsx)(ne.Fragment,{children:Object.entries(e||{}).map((function(e){var n,i=(0,t.Z)(e,2),r=i[0],l=i[1],s=null===oe||void 0===oe?void 0:oe[r];return(0,ne.jsxs)(w.Z,{mt:1,children:[(0,ne.jsx)(w.Z,{px:F.cd,pb:1,children:(0,ne.jsx)(C.ZP,{color:(0,W.qn)(null===s||void 0===s?void 0:s.type,{blockColor:null===s||void 0===s?void 0:s.color,theme:c}).accent,monospace:!0,children:r})}),(0,ne.jsx)(v.Z,{light:!0}),null===(n=Object.entries(l||{}))||void 0===n?void 0:n.map((function(e){var n=(0,t.Z)(e,2),i=n[0],r=n[1];return(0,ne.jsx)("div",{children:(0,ne.jsx)(I.Z,{columnFlex:[null,1],rows:[[(0,ne.jsx)(C.ZP,{default:!0,monospace:!0,children:"Stream"}),(0,ne.jsx)(C.ZP,{monospace:!0,rightAligned:!0,children:i})]].concat(Object.entries(r||{}).map((function(e){var n=(0,t.Z)(e,2),i=n[0],r=n[1];return[(0,ne.jsx)(C.ZP,{default:!0,monospace:!0,children:i},"settings_variable_label_".concat(i)),(0,ne.jsx)(C.ZP,{monospace:!0,rightAligned:!0,children:r},"settings_variable_".concat(i))]})))})},i)}))]},r)}))}):null}),[oe,ve,en,c,o]),rn=(0,u.useMemo)((function(){var e,n,i=[],t=null===en||void 0===en||null===(e=en[P.sZ])||void 0===e?void 0:e.blocks;return null===r||void 0===r||null===(n=r.blocks)||void 0===n||n.forEach((function(e){var n=e.type,r=e.uuid;if(U.tf.DBT===n){var l,s=(null===t||void 0===t||null===(l=t[r])||void 0===l?void 0:l.configuration)||{},o=s.flags,u=s.prefix,c=s.suffix,a=(0,q.IU)(e).name;(o||u||c)&&i.push({flags:o,prefix:u,suffix:c,uuid:a})}})),"undefined"!==typeof i&&null!==i&&void 0!==i&&i.length?(0,ne.jsx)(I.Z,{columnFlex:[1,null],rows:i.map((function(e){var n=e.flags,i=e.prefix,t=e.suffix,r=e.uuid;return[(0,ne.jsxs)(C.ZP,{monospace:!0,small:!0,children:[i&&(0,ne.jsx)(C.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:i}),r,t&&(0,ne.jsx)(C.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:t})]},"settings_variable_label_".concat(r)),(0,ne.jsx)(C.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(r))]}))}):null}),[r,en]),ln=(0,u.useMemo)((function(){return(0,ne.jsx)(I.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===pe||void 0===pe?void 0:pe.map((function(e,n){var i=e.event_type,t=e.name;return[(0,ne.jsx)(C.ZP,{default:!0,monospace:!0,children:H._P[i].label()},"".concat(i,"_").concat(n,"_label")),(0,ne.jsx)(C.ZP,{monospace:!0,children:t},"".concat(i,"_").concat(n,"_name"))]}))})}),[pe]),sn=(0,u.useMemo)((function(){var e,n,i,t,l,s,o;return"undefined"===typeof(null===r||void 0===r||null===(e=r.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null===ie||void 0===ie||null===(i=ie.pipelines)||void 0===i||null===(t=i.settings)||void 0===t||null===(l=t.triggers)||void 0===l?void 0:l.save_in_code_automatically:null===r||void 0===r||null===(s=r.settings)||void 0===s||null===(o=s.triggers)||void 0===o?void 0:o.save_in_code_automatically}),[r,ie]);return(0,ne.jsxs)(Z.Z,{afterHidden:!Ne,before:(0,ne.jsxs)(R.M,{children:[(0,ne.jsxs)(w.Z,{mb:F.HN,pt:F.cd,px:F.cd,children:[(0,ne.jsxs)(w.Z,{mb:F.cd,children:[O.Xm.TIME===ve&&(0,ne.jsx)(L.kO,{size:5*F.iI}),O.Xm.EVENT===ve&&(0,ne.jsx)(L.Jp,{size:5*F.iI}),O.Xm.API===ve&&(0,ne.jsx)(L.Bf,{size:5*F.iI}),!ve&&(0,ne.jsx)(L.VW,{size:5*F.iI})]}),(0,ne.jsx)(x.Z,{children:ge})]}),(0,ne.jsx)(w.Z,{px:F.cd,children:(0,ne.jsx)(x.Z,{level:5,children:"Settings"})}),(0,ne.jsx)(v.Z,{light:!0,mt:1,short:!0}),Ye,(null===pe||void 0===pe?void 0:pe.length)>=1&&(0,ne.jsxs)(w.Z,{my:F.HN,children:[(0,ne.jsx)(w.Z,{px:F.cd,children:(0,ne.jsx)(x.Z,{level:5,children:"Events"})}),(0,ne.jsx)(v.Z,{light:!0,mt:1,short:!0}),ln]}),nn&&(0,ne.jsxs)(w.Z,{my:F.HN,children:[(0,ne.jsx)(w.Z,{px:F.cd,children:(0,ne.jsx)(x.Z,{level:5,children:"Runtime variables"})}),(0,ne.jsx)(v.Z,{light:!0,mt:1,short:!0}),nn]}),tn&&(0,ne.jsxs)(w.Z,{my:F.HN,children:[(0,ne.jsx)(w.Z,{px:F.cd,children:(0,ne.jsx)(x.Z,{level:5,children:"Bookmark values"})}),(0,ne.jsx)(v.Z,{light:!0,mt:1,short:!0}),tn]}),rn&&(0,ne.jsxs)(w.Z,{my:F.HN,children:[(0,ne.jsx)(w.Z,{px:F.cd,children:(0,ne.jsx)(x.Z,{level:5,children:"dbt runtime settings"})}),(0,ne.jsx)(v.Z,{light:!0,mt:1,short:!0}),rn]}),(null===Ze||void 0===Ze?void 0:Ze.length)>=1&&(0,ne.jsxs)(w.Z,{my:F.HN,children:[(0,ne.jsx)(w.Z,{px:F.cd,children:(0,ne.jsx)(x.Z,{level:5,children:"Tags"})}),(0,ne.jsx)(v.Z,{light:!0,mt:1,short:!0}),(0,ne.jsx)(w.Z,{mt:F.cd,px:F.cd,children:(0,ne.jsx)(k.Z,{tags:null===Ze||void 0===Ze?void 0:Ze.map((function(e){return{uuid:e}}))})})]}),"\\",(0,ne.jsx)(w.Z,{my:F.HN,children:(0,ne.jsxs)(w.Z,{px:F.cd,children:[(0,ne.jsxs)(x.Z,{level:5,children:[Be&&"Trigger exists in code",!Be&&"Store trigger in code"]}),(0,ne.jsxs)(w.Z,{mt:1,children:[sn&&(0,ne.jsxs)(C.ZP,{default:!0,children:["This trigger will automatically be persisted in code. To change this behavior, update the ",(0,ne.jsx)(a(),{as:"/pipelines/".concat(ue,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,ne.jsx)(m.Z,{openNewWindow:!0,children:"pipeline\u2019s settings"})})," or ",(0,ne.jsx)(a(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,ne.jsx)(m.Z,{openNewWindow:!0,children:"project settings"})}),"."]}),!sn&&(0,ne.jsxs)(C.ZP,{default:!0,children:["Save or update the trigger and its settings in the pipeline\u2019s metadata and version control the trigger using Git. For more information, please read the ",(0,ne.jsx)(m.Z,{href:"https://docs.mage.ai/guides/triggers/configure-triggers-in-code",openNewWindow:!0,children:"documentation"}),"."]})]}),!sn&&(0,ne.jsxs)(w.Z,{mt:F.cd,children:[!ze&&(0,ne.jsx)(E.Z,{inverted:!0}),ze&&(0,ne.jsxs)(f.ZP,{disabled:!(null!==l&&void 0!==l&&l.id),loading:$e,onClick:function(){Je({pipeline_trigger:{pipeline_schedule_id:null===l||void 0===l?void 0:l.id}})},secondary:!0,children:[Be&&"Update trigger in code",!Be&&"Save trigger in code"]})]})]})})]}),beforeWidth:R.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(ue,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return ge},linkProps:{as:"/pipelines/".concat(ue,"/triggers/").concat(de),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,M.ZP)(te(te({},e),{},{selectedRun:Ne,selectedTab:Ue,setSelectedTab:Le}))},errors:n,pageName:A.M.TRIGGERS,pipeline:r,setErrors:s,subheader:(0,ne.jsxs)(j.ZP,{alignItems:"center",children:[(0,ne.jsx)(f.ZP,{beforeIcon:Qe?(0,ne.jsx)(L.dz,{size:2*F.iI}):(0,ne.jsx)(L.Py,{inverted:!le,size:2*F.iI}),danger:Qe&&!le,loading:Ve,onClick:function(e){(0,Q.j)(e),He({id:de,status:Qe?O.fq.INACTIVE:O.fq.ACTIVE})},outline:!0,success:!Qe&&!le,children:Qe?"Pause trigger":"Start trigger"}),(0,ne.jsx)(w.Z,{mr:F.cd}),!le&&(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(f.ZP,{linkProps:{as:"/pipelines/".concat(ue,"/triggers/").concat(de,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,ne.jsx)(w.Z,{mr:F.cd})]}),(0,ne.jsxs)(S.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?re.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(ue,"/triggers/").concat(de)):(0,B.u7)({page:0,status:e.target.value})},paddingRight:4*F.iI,placeholder:"Select run status",value:(null===ye||void 0===ye?void 0:ye.status)||"all",children:[(0,ne.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),P.IK.map((function(e){return(0,ne.jsx)("option",{value:e,children:P.Do[e]},e)}))]})]}),title:function(){return ge},uuid:"triggers/detail",children:[(0,ne.jsx)(w.Z,{mt:F.cd,px:F.cd,children:(0,ne.jsx)(x.Z,{level:5,children:"Runs for this trigger"})}),(0,ne.jsx)(v.Z,{light:!0,mt:F.cd,short:!0}),De]})},le=i(12717),se=i(93808),oe=i(92709);function ue(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 ce(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ue(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ue(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function ae(e){var n=e.pipelineScheduleId,i=e.pipelineUUID,t=e.subpath,r=oe.b7===t,l=(0,u.useState)(null),s=l[0],o=l[1],c=N.ZP.variables.pipelines.list(i,{},{revalidateOnFocus:!1}).data,a=null===c||void 0===c?void 0:c.variables,d={};r&&(d._format="with_runtime_average");var p=N.ZP.pipeline_schedules.detail("undefined"!==typeof n&&n,d),g=p.data,f=p.mutate,h=null===g||void 0===g?void 0:g.pipeline_schedule,v=N.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,j=ce(ce({},null===v||void 0===v?void 0:v.pipeline),{},{uuid:i});return r?(0,ne.jsx)(le.Z,{errors:s,fetchPipelineSchedule:f,pipeline:j,pipelineSchedule:h,setErrors:o,variables:a}):(0,ne.jsx)(re,{errors:s,fetchPipelineSchedule:f,pipeline:j,pipelineSchedule:h,setErrors:o,variables:a})}ae.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var i,r,l,s,u,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.query,r=i.pipeline,l=i.slug,!Array.isArray(l)){e.next=4;break}return s=(0,t.Z)(l,2),u=s[0],c=s[1],e.abrupt("return",{pipelineScheduleId:u,pipelineUUID:r,subpath:c});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var de=(0,se.Z)(ae)},95488:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return i(36604)}])}},function(e){e.O(0,[2678,1154,844,5820,1124,341,9161,4495,9302,4267,6990,8487,8264,7858,5499,5457,4366,4138,1769,3943,6798,845,2717,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{48381:function(e,n,r){"use strict";var t=r(82684),i=r(31882),o=r(55485),u=r(30160),l=r(86735),c=r(28598);n.Z=function(e){var n=e.onClickTag,r=e.tags,a=void 0===r?[]:r,s=(0,t.useMemo)((function(){return(null===a||void 0===a?void 0:a.length)||0}),[a]),d=(0,t.useMemo)((function(){return(0,l.YC)(a||[],"uuid")}),[a]);return(0,c.jsx)(o.ZP,{alignItems:"center",flexWrap:"wrap",children:null===d||void 0===d?void 0:d.reduce((function(e,r){return e.push((0,c.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,c.jsx)(i.Z,{onClick:n?function(){return n(r)}:null,small:!0,children:(0,c.jsx)(u.ZP,{children:r.uuid})})},"tag-".concat(r.uuid))),e}),[])})}},16488:function(e,n,r){"use strict";r.d(n,{IJ:function(){return g},M8:function(){return P},Uc:function(){return j},XM:function(){return Z},_U:function(){return v},eI:function(){return b},gU:function(){return O},lO:function(){return E},ri:function(){return m},tL:function(){return y},vJ:function(){return w},xH:function(){return x}});var t,i=r(82394),o=r(92083),u=r.n(o),l=r(3917),c=r(4383),a=r(30229),s=r(42122),d=r(86735);function p(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function f(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var v=function(e){return!!e&&!Object.values(a.U5).includes(e)};function g(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var r=n.block_uuid,t=n.completed_at,o=n.started_at,l=n.status,c=null;o&&t&&(c=u()(t).valueOf()-u()(o).valueOf());return f(f({},e),{},(0,i.Z)({},r,{runtime:c,status:l}))}),{})}var h,m=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return e?n.slice(0,1):n};function x(e){var n=(0,s.gR)(e,[a.gm.INTERVAL,a.gm.TYPE]),r=e[a.gm.INTERVAL];r&&(n["schedule_interval[]"]=encodeURIComponent(r));var t=e[a.gm.TYPE];return t&&(n["schedule_type[]"]=t),n}function b(e){return e?new Date(u()(e).valueOf()):null}function j(e,n){return n?(0,l.XG)(e,n):function(e){if("string"!==typeof e)return e;var n=e.split("+")[0];return u()(b(n)).format(l.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(h||(h={}));var y=(t={},(0,i.Z)(t,h.DAY,86400),(0,i.Z)(t,h.HOUR,3600),(0,i.Z)(t,h.MINUTE,60),(0,i.Z)(t,h.SECOND,1),t);function O(e){var n=h.SECOND,r=e;return e%86400===0?(r/=86400,n=h.DAY):e%3600===0?(r/=3600,n=h.HOUR):e%60===0&&(r/=60,n=h.MINUTE),{time:r,unit:n}}function w(e,n){return e*y[n]}function Z(e,n,r){var t,i=u()(e);return i.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),i.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),i.set("second",0),t=i.format(l.TD),null!==r&&void 0!==r&&r.includeSeconds&&(t=t.concat(":00")),null!==r&&void 0!==r&&r.localTimezone&&(t=i.format(l.lE),null!==r&&void 0!==r&&r.convertToUtc&&(t=(0,l.d$)(t,{includeSeconds:null===r||void 0===r?void 0:r.includeSeconds,utcFormat:!0}))),t}function P(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t="",i=!0;return i&&(r?t="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(t="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(t="".concat(t,"/").concat(e.token)))),i&&(n=window.location.port)&&(t=t.replace(n,c.QT)),t}function I(e,n,r){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,r){var t=r.indexOf(e),i=0;if(n<0)for(var o=0;o>n;o--)0===t?(t=r.length-1,i-=1):t-=1;else if(n>0)for(var u=0;u<n;u++)t===r.length-1?(t=0,i+=1):t+=1;return{additionalOffset:i,cronValue:String(r[t]||e)}}(+e,n,r)}var k=(0,d.m5)(60),_=(0,d.m5)(24),C=(0,l.Cs)();function E(e,n){if(!e)return e;var r=u()().local().format("Z"),t=r.split(":"),i="-"===r[0],o=3===t[0].length?Number(t[0].slice(1)):Number(t[0]),l=Number(t[1]);(i&&!n||!i&&n)&&(o=-o,l=-l);var c=e.split(" "),a=c[0],s=c[1],d=c[2],p=I(a,l,k),f=I(s,o+p.additionalOffset,_);if(c[0]=p.cronValue,c[1]=f.cronValue,0!==(null===f||void 0===f?void 0:f.additionalOffset)){var v=I(d,f.additionalOffset,C);c[2]=v.cronValue}return c.join(" ")}},30229:function(e,n,r){"use strict";r.d(n,{PN:function(){return l},TR:function(){return v},U5:function(){return a},Wb:function(){return f},Xm:function(){return o},Z4:function(){return s},fq:function(){return c},gm:function(){return d},kJ:function(){return p}});var t,i,o,u=r(82394),l="__bookmark_values__";!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var c,a,s=(t={},(0,u.Z)(t,o.API,(function(){return"API"})),(0,u.Z)(t,o.EVENT,(function(){return"event"})),(0,u.Z)(t,o.TIME,(function(){return"schedule"})),t);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(c||(c={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly",e.ALWAYS_ON="@always_on"}(a||(a={}));var d,p,f=[a.ONCE,a.HOURLY,a.DAILY,a.WEEKLY,a.MONTHLY];!function(e){e.INTERVAL="frequency[]",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(d||(d={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(p||(p={}));var v=(i={},(0,u.Z)(i,p.CREATED_AT,"Created at"),(0,u.Z)(i,p.NAME,"Name"),(0,u.Z)(i,p.PIPELINE,"Pipeline"),(0,u.Z)(i,p.STATUS,"Active"),(0,u.Z)(i,p.TYPE,"Type"),i)},31882:function(e,n,r){"use strict";var t=r(38626),i=r(71180),o=r(55485),u=r(30160),l=r(44897),c=r(72473),a=r(70515),s=r(61896),d=r(28598),p=t.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((a.iI+s.Al)/2,"px;\n height: ").concat(1.5*a.iI+s.Al,"px;\n padding: ").concat(a.iI/1.5,"px ").concat(1.25*a.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((a.iI/2+s.Al)/2,"px;\n height: ").concat(s.Al+a.iI/2+2,"px;\n padding: ").concat(a.iI/4,"px ").concat(a.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((a.iI/1+s.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,r=e.children,t=e.disabled,l=e.label,s=e.monospace,f=e.onClick,v=e.primary,g=e.small,h=e.xsmall;return(0,d.jsx)(p,{border:n,primary:v,small:g,xsmall:h,children:(0,d.jsx)(i.ZP,{basic:!0,disabled:t,noBackground:!0,noPadding:!0,onClick:f,transparent:!0,children:(0,d.jsxs)(o.ZP,{alignItems:"center",children:[r,l&&(0,d.jsx)(u.ZP,{monospace:s,small:g,xsmall:h,children:l}),!t&&f&&(0,d.jsx)("div",{style:{marginLeft:2}}),!t&&f&&(0,d.jsx)(c.x8,{default:v,muted:!v,size:g?a.iI:1.25*a.iI})]})})})}},46732:function(e,n,r){"use strict";var t=r(82394),i=r(26304),o=(r(82684),r(50724)),u=r(70374),l=r(28598),c=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid","zIndex"];function a(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function s(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?a(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}n.Z=function(e){var n=e.children,r=e.items,t=e.open,a=e.onClickCallback,d=e.onClickOutside,p=e.parentRef,f=e.uuid,v=e.zIndex,g=(0,i.Z)(e,c),h=(0,l.jsxs)("div",{style:{position:"relative",zIndex:(d?3:2)+(v||0)},children:[(0,l.jsx)("div",{ref:p,children:n}),(0,l.jsx)(u.Z,s(s({},g),{},{items:r,onClickCallback:a,open:t,parentRef:p,uuid:f}))]});return d?(0,l.jsx)(o.Z,{onClickOutside:d,open:!0,children:h}):h}},35185:function(e,n,r){"use strict";var t=r(82394),i=r(91835),o=(r(82684),r(38626)),u=r(44897),l=r(42631),c=r(70515),a=r(28598);function s(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function d(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?s(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var p=o.default.div.withConfig({displayName:"ProgressBar__ProgressBarContainerStyle",componentId:"sc-10x9ojc-0"})(["border-radius:","px;height:","px;overflow:hidden;position:relative;width:100%;",""],l.BG,.75*c.iI,(function(e){return"\n background-color: ".concat((e.theme.monotone||u.Z.monotone).grey200,";\n ")})),f=o.default.div.withConfig({displayName:"ProgressBar__ProgressBarStyle",componentId:"sc-10x9ojc-1"})(["height:inherit;position:absolute;"," "," "," ",""],(function(e){return!e.danger&&"\n background-color: ".concat((e.theme.progress||u.Z.progress).positive,";\n ")}),(function(e){return e.progress&&"\n width: ".concat(e.progress,"%;\n ")}),(function(e){return e.danger&&"\n background-color: ".concat((e.theme.progress||u.Z.progress).negative,";\n ")}),(function(e){return e.animateProgress&&"\n animation: animate-progress ".concat(e.animateProgress.duration,"ms linear forwards;\n\n @keyframes animate-progress {\n 0% {\n width: ").concat(e.animateProgress.start,"%;\n }\n\n 100% {\n width: ").concat(e.animateProgress.end,"%;\n }\n }\n ")}));n.Z=function(e){var n=(0,i.Z)({},e);return(0,a.jsx)(p,d(d({},n),{},{children:(0,a.jsx)(f,d({},n))}))}},38415:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return _e}});var t=r(77837),i=r(75582),o=r(82394),u=r(38860),l=r.n(u),c=r(12691),a=r.n(c),s=r(82684),d=r(69864),p=r(34376),f=r(24138),v=r(15338),g=r(93369),h=r(48670),m=r(55072),x=r(75457),b=r(30229),j=r(93808),y=r(82359),O=r(71610),w=r(71180),Z=r(90299),P=r(55485),I=r(85854),k=r(37899),_=r(65956),C=r(38276),E=r(30160),T=r(44897),S=r(70515),N={uuid:"RUNTIME VARIABLES"},R={uuid:"BOOKMARK VALUES"},M=r(32080),A=r(8916),D=r(81728),B=r(28598);function V(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function L(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?V(Object(r),!0).forEach((function(n){(0,o.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var U="".concat(S.iI,"px ").concat(3*S.iI,"px");var Y=function(e){var n=e.initialPipelineSchedulePayload,r=e.onCancel,t=e.onSuccess,i=e.pipeline,u=e.variables,l=(0,s.useState)(null),c=l[0],a=l[1],d=(0,s.useState)(!0),p=d[0],f=d[1],g=(0,s.useState)(u||{}),h=g[0],m=g[1],x=(0,s.useState)(null),j=x[0],y=x[1],V=(0,s.useMemo)((function(){return L(L({},n),{},{name:(0,D.Y6)(),variables:p?(0,A.e7)(L(L({},h),c?(0,o.Z)({},b.PN,c):{})):null})}),[c,n,p,h]),Y=(0,s.useMemo)((function(){return null!==i&&void 0!==i&&i.blocks?(0,M.n)(i):null}),[i]),H=(0,s.useMemo)((function(){var e;return Y&&(null===(e=Object.keys(Y||{}))||void 0===e?void 0:e.length)>=1?[N,R]:null}),[Y]);(0,s.useEffect)((function(){(null===H||void 0===H?void 0:H.length)>=1&&!j&&y(null===H||void 0===H?void 0:H[0])}),[j,y,H]);var F=(0,s.useMemo)((function(){return null!==H&&void 0!==H&&H.length?(0,B.jsx)(Z.Z,{onClickTab:function(e){y(e)},selectedTabUUID:null===j||void 0===j?void 0:j.uuid,tabs:H,underlineStyle:!0}):null}),[j,y,H]);return console.log(H),(0,B.jsxs)(_.Z,{noPadding:!0,footer:(0,B.jsxs)(P.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,B.jsx)(w.ZP,{onClick:function(){t({pipeline_schedule:V}),r()},padding:U,primaryAlternate:!0,children:"Run now"}),(0,B.jsx)(C.Z,{mr:1}),(0,B.jsx)(w.ZP,{borderColor:T.Z.background.page,onClick:r,padding:U,secondary:!0,children:"Cancel"})]}),header:(0,B.jsx)(I.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*S.iI,subtitle:(0,B.jsxs)(B.Fragment,{children:[!(null!==H&&void 0!==H&&H.length)&&(0,B.jsx)(C.Z,{p:S.cd,children:(0,B.jsx)(E.ZP,{default:!0,children:"Creates a new trigger and immediately runs the current pipeline once."})}),(null===H||void 0===H?void 0:H.length)>=1&&F,(0,B.jsx)(v.Z,{light:!0})]}),children:[(!(null!==H&&void 0!==H&&H.length)||N.uuid===(null===j||void 0===j?void 0:j.uuid))&&(0,B.jsxs)(B.Fragment,{children:[(null===H||void 0===H?void 0:H.length)>=1&&(0,B.jsx)(C.Z,{p:S.cd,children:(0,B.jsx)(E.ZP,{default:!0,children:"Creates a new trigger and immediately runs the current pipeline once."})}),(0,B.jsx)(k.Z,{enableVariablesOverwrite:p,originalVariables:u,runtimeVariables:h,setEnableVariablesOverwrite:f,setRuntimeVariables:m})]}),R.uuid===(null===j||void 0===j?void 0:j.uuid)&&(0,B.jsx)(O.Z,{bookmarkValues:c,pipeline:i,setBookmarkValues:a})]})},H=r(97618),F=r(72473),G=r(38626),z=r(42631),X=r(47041),q=r(91437),W=G.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-pu8csx-0"})([""," overflow-y:auto;position:relative;width:100%;z-index:3;border-radius:","px;"," "," "," ",""],X.w5,z.n_,(function(e){return"\n background-color: ".concat((e.theme.background||T.Z.background).page,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.flex&&"\n flex: 1;\n "}),(function(e){return(e.noBorder||e.noBorderRadius)&&"\n border-radius: 0;\n "})),K=G.default.div.withConfig({displayName:"indexstyle__ColumnHeaderRowStyle",componentId:"sc-pu8csx-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;position:sticky;top:0;width:100%;z-index:2;"," "," ",""],z.n_,z.n_,(function(e){return"\n background-color: ".concat((e.theme.background||T.Z.background).panel,";\n ")}),(function(e){return!e.noBorder&&"\n border: 1px solid ".concat((e.theme.interactive||T.Z.interactive).defaultBorder,";\n ")}),(function(e){return(e.noBorder||e.noBorderRadius)&&"\n border-radius: 0;\n "})),Q=G.default.div.withConfig({displayName:"indexstyle__ColumnHeaderCellStyle",componentId:"sc-pu8csx-2"})([""," ",""],(function(e){return!e.small&&"\n padding: ".concat(1.5*S.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*S.iI,"px;\n ")})),J=G.default.div.withConfig({displayName:"indexstyle__RowTitleStyle",componentId:"sc-pu8csx-3"})([""," "," ",""],(function(e){return"\n background-color: ".concat((e.theme.background||T.Z.background).header,";\n border: 1px solid ").concat((e.theme.interative||T.Z.interactive).defaultBorder,";\n ")}),(function(e){return!e.small&&"\n padding: ".concat(1.5*S.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*S.iI,"px;\n ")})),$=G.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-pu8csx-4"})([""," "," "," ",""],(0,q.eR)(),(function(e){return"\n background-color: ".concat((e.theme.background||T.Z.background).page,";\n border-top: none;\n border-bottom: none;\n ")}),(function(e){return!e.noBorder&&"\n border-bottom: 1px solid ".concat((e.theme.interactive||T.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||T.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||T.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.finalRow&&!e.noBorderRadius&&"\n border-bottom-left-radius: ".concat(z.n_,"px;\n border-bottom-right-radius: ").concat(z.n_,"px;\n ")})),ee=G.default.div.withConfig({displayName:"indexstyle__TextStyle",componentId:"sc-pu8csx-5"})(["p{cursor:pointer;}"]),ne=G.default.div.withConfig({displayName:"indexstyle__RowCellStyle",componentId:"sc-pu8csx-6"})(["width:100%;z-index:0;"," "," "," "," ",""],(function(e){return!e.first&&"\n border-left: 1px solid ".concat((e.theme.background||T.Z.background).page,";\n ")}),(function(e){return!e.small&&"\n padding: ".concat(1.5*S.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*S.iI,"px;\n ")}),(function(e){return e.textColor&&"\n & p {\n color: ".concat(e.textColor,";\n }\n ")}),(function(e){return e.vanish&&"\n border: none;\n padding: 0 !important;\n width: 0% !important;\n height: 100% !important;\n background-color: ".concat((e.theme.background||T.Z.background).page," !important;\n ")})),re=r(35185);var te=function(e){var n,r=e.cellIndex,t=e.danger,i=e.flex,o=e.render,u=e.rowGroupIndex,l=e.rowIndex,c=e.selected,a=e.small,d=e.showBackground,p=e.showProgress,f=e.textColor,v=e.value,g=e.vanish,m=(0,s.useState)(!1),x=m[0],b=m[1],j=Array.isArray(v);return n=o?o(v):"function"===typeof v?v({selected:c}):j?(0,B.jsxs)(H.Z,{alignItems:"start",flexDirection:"row",justifyContent:"space-between",children:[(0,B.jsxs)(E.ZP,{small:a,textOverflow:!0,title:v[0],children:[x&&(0,B.jsx)(B.Fragment,{children:"".concat(v[0]," & ").concat(v.length-1," more")}),!x&&(0,B.jsx)(B.Fragment,{children:v.map((function(e){return(0,B.jsx)("div",{children:e},e)}))})]}),(0,B.jsxs)(h.Z,{onClick:function(){return b(!x)},children:[x&&(0,B.jsx)(F.K5,{muted:!0,size:2*S.iI}),!x&&(0,B.jsx)(F.ol,{muted:!0,size:2*S.iI})]})]}):p?(0,B.jsx)(P.ZP,{alignItems:"center",fullHeight:!0,fullWidth:!0,children:(0,B.jsx)(re.Z,{danger:v<80,progress:v})}):(0,B.jsx)(E.ZP,{bold:t,danger:t,small:a,textOverflow:!0,title:v,children:v}),(0,B.jsx)(H.Z,{flex:i,textOverflow:!0,children:(0,B.jsx)(ne,{first:0===r,showBackground:d,small:a,textColor:f,vanish:g,children:!g&&(0,B.jsxs)(B.Fragment,{children:[n," "]})})},"cell-".concat(u,"-").concat(l,"-").concat(r,"-").concat(v))};var ie=function(e){var n=e.columnFlexNumbers,r=e.columnHeaders,t=e.height,i=e.isTextSelectionRequired,o=e.noBorder,u=e.noBorderRadius,l=e.onClickRow,c=e.onHoverRow,a=e.renderRowCellByIndex,d=e.rowGroupData,p=void 0===d?[]:d,f=e.selectedRowIndexes,v=e.small,g=e.flex,m=e.warnings,x=void 0===m?[]:m,b=(0,s.useMemo)((function(){return p.length}),[p]);return(0,B.jsxs)(W,{flex:g,height:t,noBorder:o,noBorderRadius:u,noScrollbarTrackBackground:!0,children:[(0,B.jsx)(K,{noBorder:o,noBorderRadius:u,children:(0,B.jsx)(P.ZP,{alignItems:"center",children:r.map((function(e,r){var t=e.Icon,i=e.label;return(0,B.jsx)(H.Z,{flex:n[r],children:(0,B.jsx)(Q,{first:0===r,small:v,children:(0,B.jsxs)(P.ZP,{alignItems:"center",children:[t&&(0,B.jsx)(F.Jr,{}),t&&(0,B.jsx)(C.Z,{mr:1}),(0,B.jsx)(E.ZP,{bold:!0,children:i})]})})},i)}))})}),p&&p.map((function(e,r){var t,s=e.title,d=e.rowData,p=s||r,g=[];s&&(t=(0,B.jsx)(J,{small:v,children:(0,B.jsx)(E.ZP,{bold:!0,children:s})}));var m=null===d||void 0===d?void 0:d.length;return null===d||void 0===d||d.forEach((function(e,t){var s=e.columnTextColors,d=e.columnValues,j=e.danger,y=e.uuid,O=(null===f||void 0===f?void 0:f[0])===r&&(null===f||void 0===f?void 0:f[1])===t,w=[],Z=x.find((function(e){return e.name===d[0]})),I=Z&&(0,D.HD)(d[1])?(0,D.Tz)(d[1]):d[1],k=Z&&Z.compare(I,Z.val);null===d||void 0===d||d.forEach((function(e,i,o){var u=null===a||void 0===a?void 0:a[i],l=s?s[i]:void 0;Array.isArray(e)?w.push((0,B.jsx)(te,{cellIndex:i,flex:n[i],render:u,rowGroupIndex:r,rowIndex:t,selected:O,showBackground:t%2===1,showProgress:e[0],small:v,textColor:l,value:e[1]},i)):"undefined"===typeof e?(w.pop(),i=o.length+1,w.push((0,B.jsx)(te,{cellIndex:i,danger:j,flex:n[i],render:u,rowGroupIndex:r,rowIndex:t,selected:O,showBackground:t%2===1,small:v,textColor:l,value:e,vanish:!0},i))):w.push((0,B.jsx)(te,{cellIndex:i,danger:k||j,flex:n[i],render:u,rowGroupIndex:r,rowIndex:t,selected:O,showBackground:t%2===1,small:v,textColor:l,value:e},i))}));var _=(0,B.jsx)(P.ZP,{textOverflow:!0,children:w});g.push((0,B.jsxs)($,{finalRow:b-1===r&&m-1===t,hasHover:!!c,noBorder:o,noBorderRadius:u,onMouseEnter:function(){return null===c||void 0===c?void 0:c({rowGroupIndex:r,rowIndex:t,uuid:y})},selected:O,children:[l&&(i?(0,B.jsx)(ee,{onClick:function(){return l({rowGroupIndex:r,rowIndex:t,uuid:y})},role:"cell",children:_}):(0,B.jsx)(h.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:function(){return l({rowGroupIndex:r,rowIndex:t,uuid:y})},preventDefault:!0,children:_})),!l&&_]},"row-group-".concat(p,"-row-").concat(t)))})),(0,B.jsxs)("div",{children:[t,g]},p)}))]})},oe=G.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["display:flex;flex-direction:column;height:","px;border-bottom:1px solid ",";"],(function(e){return e.height}),T.Z.borders.medium),ue=r(79633);var le=function(e){var n=e.height,r=e.scheduleType,t=e.variables,o=e.variablesOverride,u=[];Object.entries(t).forEach((function(e){var n=(0,i.Z)(e,2),r=n[0],t=n[1],l=null===o||void 0===o?void 0:o[r];u.push({uuid:r,value:(0,A.FS)(l||t)})})),(0,A.JZ)(u,r);var l=Object.keys(t).length;return(0,B.jsx)(oe,{height:n,children:t&&(0,B.jsx)(ie,{columnFlexNumbers:[1,1],columnHeaders:[{label:"Runtime variable (".concat(l,")")},{label:"Value"}],noBorderRadius:!0,rowGroupData:[{rowData:u.map((function(e){var n=e.uuid,r=e.value;return{columnTextColors:[ue.Or,void 0],columnValues:[n,r],uuid:n}}))}],small:!0})})},ce=r(4190),ae=r(12717),se=r(85544),de=r(29624),pe=r(35686),fe=r(28795),ve=r(81066),ge=r(24944),he=r(3917),me=r(69419),xe=r(16488),be=r(86735),je=r(42122),ye=r(50178),Oe=r(72619),we=r(70320),Ze=r(89538);function Pe(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Ie(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(r),!0).forEach((function(n){(0,o.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function ke(e){var n=e.pipeline,r=(0,p.useRouter)(),t=(0,ye.Ct)(),u=n.uuid,l=pe.ZP.pipelines.detail(u,{includes_outputs:!1},{revalidateOnFocus:!1}).data,c=(0,s.useMemo)((function(){return(null===l||void 0===l?void 0:l.pipeline)||n}),[l]),j=(0,s.useState)(null),O=j[0],w=j[1],Z=(0,s.useState)(null),P=Z[0],I=Z[1],k=(0,s.useState)(!1),_=k[0],T=k[1],N=pe.ZP.projects.list().data,R=(0,s.useMemo)((function(){var e;return null===N||void 0===N||null===(e=N.projects)||void 0===e?void 0:e[0]}),[N]),M=((0,s.useMemo)((function(){var e;return(0,we.hY)(null===R||void 0===R||null===(e=R.features)||void 0===e?void 0:e[y.d.LOCAL_TIMEZONE])}),[null===R||void 0===R?void 0:R.features]),pe.ZP.client_pages.detail("pipeline_schedule:create",{"pipelines[]":[u]},{},{key:"Triggers/Edit/".concat(u)}).data),V=(0,s.useMemo)((function(){return null===M||void 0===M?void 0:M.client_page}),[M]),L=(0,s.useMemo)((function(){var e,n;return null===V||void 0===V||null===(e=V.components)||void 0===e||null===(n=e.find((function(e){return"create_with_interactions_component"===e.uuid})))||void 0===n?void 0:n.enabled}),[V]),U=(0,s.useMemo)((function(){return null===V||void 0===V?void 0:V.disabled}),[V]),H=pe.ZP.variables.pipelines.list(u,{global_only:!0},{revalidateOnFocus:!1}).data,G=null===H||void 0===H?void 0:H.variables,z=(0,me.iV)(),X=(0,me.DQ)(z,[b.gm.INTERVAL,b.gm.STATUS,b.gm.TAG,b.gm.TYPE]),q=(0,xe.xH)(X),W=null!==z&&void 0!==z&&z.page?z.page:0,K=pe.ZP.pipeline_schedules.pipelines.list(u,Ie(Ie({},q),{},{_limit:m.Q,_offset:(null!==z&&void 0!==z&&z.page?z.page:0)*m.Q}),{refreshInterval:7500}),Q=K.data,J=K.mutate,$=(0,s.useMemo)((function(){return(null===Q||void 0===Q?void 0:Q.pipeline_schedules)||[]}),[Q]),ee=function(e){return(0,d.Db)(pe.ZP.pipeline_schedules.pipelines.useCreate(u),{onSuccess:function(n){return(0,Oe.wD)(n,{callback:function(n){var r=n.pipeline_schedule.id;null===e||void 0===e||e(r)},onErrorCallback:function(e,n){return w({errors:n,response:e})}})}})},ne=ee((function(e){return r.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===c||void 0===c?void 0:c.uuid,"/triggers/").concat(e,"/edit"))})),re=(0,i.Z)(ne,2),te=re[0],ie=re[1].isLoading,oe=ee(J),ue=(0,i.Z)(oe,2),Pe=ue[0],ke=ue[1].isLoading,_e=(0,s.useMemo)((function(){return(0,A.Tt)(G)}),[G]),Ce=(0,D.Y6)(),Ee=(0,s.useMemo)((function(){return{name:Ce,schedule_interval:b.U5.ONCE,schedule_type:b.Xm.TIME,start_time:(0,he.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:b.fq.ACTIVE}}),[Ce]),Te=(0,Ze.dd)((function(){return(0,B.jsx)(Y,{initialPipelineSchedulePayload:Ee,onCancel:Re,onSuccess:Pe,pipeline:c,variables:_e})}),{},[G,c,_e],{background:!0,uuid:"run_pipeline_now_popup"}),Se=(0,i.Z)(Te,2),Ne=Se[0],Re=Se[1],Me=(0,s.useState)(),Ae=Me[0],De=Me[1],Be=(0,s.useMemo)((function(){var e=null===Ae||void 0===Ae?void 0:Ae.variables,n=!(0,je.Qr)(_e);return function(r){var i=80;if(n){var o=Object.keys(_e).length;i=46+43*Math.min(5,o)+1}var l=r.height-i;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(f.ZP,Ie(Ie({},r),{},{enablePorts:!1,height:l,noStatus:!0})),n&&(0,B.jsx)(le,{height:i,scheduleType:null===Ae||void 0===Ae?void 0:Ae.schedule_type,variables:_e,variablesOverride:e}),!n&&(0,B.jsxs)(C.Z,{p:S.cd,children:[(0,B.jsx)(E.ZP,{children:"This pipeline has no runtime variables."}),!t&&(0,B.jsxs)(C.Z,{mt:1,children:[(0,B.jsx)(a(),{as:"/pipelines/".concat(u,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,B.jsx)(h.Z,{primary:!0,children:"Click here"})})," ",(0,B.jsx)(E.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]})]})}}),[t,u,null===Ae||void 0===Ae?void 0:Ae.schedule_type,null===Ae||void 0===Ae?void 0:Ae.variables,_e]),Ve=(0,s.useMemo)((function(){var e;return(null===Q||void 0===Q||null===(e=Q.metadata)||void 0===e?void 0:e.count)||[]}),[Q]),Le=pe.ZP.pipeline_triggers.pipelines.list(u).data,Ue=(0,s.useMemo)((function(){return(0,be.HK)((null===Le||void 0===Le?void 0:Le.pipeline_triggers)||[],(function(e){return e.name}))}),[Le]);(0,s.useEffect)((function(){var e=((null===Le||void 0===Le?void 0:Le.pipeline_triggers)||[]).find((function(e){var n=e.settings;return null===n||void 0===n?void 0:n.invalid_schedule_interval}));I(e?{displayMessage:'Schedule interval for Trigger (in code) "'.concat(null===e||void 0===e?void 0:e.name,'"')+" is invalid. Please check your cron expression\u2019s syntax in the pipeline\u2019s triggers.yaml file."}:null)}),[null===Le||void 0===Le?void 0:Le.pipeline_triggers]);var Ye=pe.ZP.tags.list().data,He=(0,s.useMemo)((function(){return(0,be.YC)((null===Ye||void 0===Ye?void 0:Ye.tags)||[],(function(e){return e.uuid}))}),[Ye]),Fe=pe.ZP.pipeline_interactions.detail(L&&u,{filter_for_permissions:1}),Ge=Fe.data,ze=(Fe.mutate,pe.ZP.interactions.pipeline_interactions.list(L&&u)),Xe=ze.data,qe=(ze.mutate,pe.ZP.pipelines.detail(L&&u).data),We=(0,s.useMemo)((function(){return(null===Ge||void 0===Ge?void 0:Ge.pipeline_interaction)||{}}),[Ge]),Ke=((0,s.useMemo)((function(){return(null===Xe||void 0===Xe?void 0:Xe.interactions)||[]}),[Xe]),(0,s.useMemo)((function(){var e;return L&&(null===(e=Object.keys((null===We||void 0===We?void 0:We.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[L,We])),Qe=(0,s.useMemo)((function(){return Ke&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(C.Z,{ml:"12px"}),(0,B.jsx)(ge.lZ,{}),(0,B.jsx)(C.Z,{ml:"12px"}),(0,B.jsx)(g.ZP,Ie(Ie({},ve.B),{},{Icon:F.yd,inline:!0,onClick:function(){return T(!0)},uuid:"Create trigger with no-code",children:"Create trigger with no-code"}))]})}),[Ke,T]),Je=(0,s.useMemo)((function(){return(0,B.jsx)(se.Z,{addButtonProps:!U&&{isLoading:ie,label:"New trigger",onClick:function(){return te({pipeline_schedule:{name:(0,D.Y6)()}})}},filterOptions:{frequency:Object.values(b.U5),status:Object.values(b.fq),tag:He.map((function(e){return e.uuid})),type:Object.values(b.Xm)},filterValueLabelMapping:{status:Object.values(b.fq).reduce((function(e,n){return Ie(Ie({},e),{},(0,o.Z)({},n,(0,D.kC)(n)))}),{}),tag:He.reduce((function(e,n){var r=n.uuid;return Ie(Ie({},e),{},(0,o.Z)({},r,r))}),{}),type:b.Z4},onClickFilterDefaults:function(){r.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(u,"/triggers"))},query:X,resetPageOnFilterApply:!0,secondaryButtonProps:!U&&{disabled:t,isLoading:ke,label:"Run @once",onClick:Ne,tooltip:"Creates an @once trigger and runs pipeline immediately"},showDivider:!U,children:Qe})}),[te,Pe,U,ie,ke,t,Qe,Ee,u,X,r,Ne,He,_e]),$e=(0,s.useMemo)((function(){var e=[];return _?e.push.apply(e,[{label:function(){return"Triggers"},onClick:function(){return T(!1)}},{bold:!0,label:function(){return"New trigger"}}]):e.push({label:function(){return"Triggers"}}),e}),[_,T]);return _?(0,B.jsx)(ae.Z,{creatingWithLimitation:!0,errors:O,onCancel:function(){return T(!1)},pipeline:null===qe||void 0===qe?void 0:qe.pipeline,setErrors:w,useCreateScheduleMutation:ee}):(0,B.jsx)(x.Z,{breadcrumbs:$e,buildSidekick:!_&&Be,errors:O||P,pageName:fe.M.TRIGGERS,pipeline:c,setErrors:w,subheader:!_&&Je,title:function(e){var n=e.name;return"".concat(n," triggers")},uuid:"".concat(fe.M.TRIGGERS,"_").concat(u),children:!_&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(v.Z,{light:!0}),Q?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(de.Z,{fetchPipelineSchedules:J,pipeline:c,pipelineSchedules:$,pipelineTriggersByName:Ue,selectedSchedule:Ae,setErrors:w,setSelectedSchedule:De}),(0,B.jsx)(C.Z,{p:2,children:(0,B.jsx)(m.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),t=Ie(Ie({},z),{},{page:n>=0?n:0});r.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(u,"/triggers?").concat((0,me.uM)(t)))},page:Number(W),totalPages:Math.ceil(Ve/m.Q)})})]}):(0,B.jsx)(C.Z,{m:2,children:(0,B.jsx)(ce.Z,{inverted:!0,large:!0})})]})})}ke.getInitialProps=function(){var e=(0,t.Z)(l().mark((function e(n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var _e=(0,j.Z)(ke)},40183:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return r(38415)}])}},function(e){e.O(0,[2678,1154,844,5820,1124,341,9161,4495,9302,4267,6990,8487,8264,7858,5499,5457,4366,4138,1769,9624,5544,6798,845,2717,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
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={}))},30229:function(e,n,i){"use strict";i.d(n,{PN:function(){return l},TR:function(){return v},U5:function(){return s},Wb:function(){return f},Xm:function(){return u},Z4:function(){return d},fq:function(){return c},gm:function(){return a},kJ:function(){return p}});var t,o,u,r=i(82394),l="__bookmark_values__";!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(u||(u={}));var c,s,d=(t={},(0,r.Z)(t,u.API,(function(){return"API"})),(0,r.Z)(t,u.EVENT,(function(){return"event"})),(0,r.Z)(t,u.TIME,(function(){return"schedule"})),t);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(c||(c={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly",e.ALWAYS_ON="@always_on"}(s||(s={}));var a,p,f=[s.ONCE,s.HOURLY,s.DAILY,s.WEEKLY,s.MONTHLY];!function(e){e.INTERVAL="frequency[]",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(a||(a={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(p||(p={}));var v=(o={},(0,r.Z)(o,p.CREATED_AT,"Created at"),(0,r.Z)(o,p.NAME,"Name"),(0,r.Z)(o,p.PIPELINE,"Pipeline"),(0,r.Z)(o,p.STATUS,"Active"),(0,r.Z)(o,p.TYPE,"Type"),o)},31882:function(e,n,i){"use strict";var t=i(38626),o=i(71180),u=i(55485),r=i(30160),l=i(44897),c=i(72473),s=i(70515),d=i(61896),a=i(28598),p=t.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+d.Al)/2,"px;\n height: ").concat(1.5*s.iI+d.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((s.iI/1+d.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,i=e.children,t=e.disabled,l=e.label,d=e.monospace,f=e.onClick,v=e.primary,h=e.small,m=e.xsmall;return(0,a.jsx)(p,{border:n,primary:v,small:h,xsmall:m,children:(0,a.jsx)(o.ZP,{basic:!0,disabled:t,noBackground:!0,noPadding:!0,onClick:f,transparent:!0,children:(0,a.jsxs)(u.ZP,{alignItems:"center",children:[i,l&&(0,a.jsx)(r.ZP,{monospace:d,small:h,xsmall:m,children:l}),!t&&f&&(0,a.jsx)("div",{style:{marginLeft:2}}),!t&&f&&(0,a.jsx)(c.x8,{default:v,muted:!v,size:h?s.iI:1.25*s.iI})]})})})}},55620:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return Te}});var t=i(77837),o=i(21831),u=i(75582),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),x=i(94629),Z=i(97618),j=i(55485),_=i(85854),C=i(93369),w=i(65956),I=i(38276),k=i(30160),y=i(35576),P=i(17488),T=i(28598);var A=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?y.Z:P.Z;return(0,a.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,T.jsxs)(w.Z,{maxWidth:t,minWidth:o,children:[(0,T.jsx)(k.ZP,{bold:!0,children:s}),(0,T.jsx)(I.Z,{mt:1,children:(0,T.jsx)(g,{monospace:!0,onChange:function(e){return h(e.target.value)},ref:p,rows:c?7:null,value:v})}),n&&(0,T.jsx)(I.Z,{mt:2,children:(0,T.jsx)(k.ZP,{muted:!0,small:!0,children:n})}),(0,T.jsx)(I.Z,{mt:3,children:(0,T.jsxs)(j.ZP,{children:[(0,T.jsx)(C.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,T.jsx)(I.Z,{ml:1}),(0,T.jsx)(m.ZP,{onClick:r,children:"Cancel"})]})})]})},E=i(48670),S=i(57653),O=i(55729),M=i(93808),D=i(82359),N=i(4190),R=i(75499),L=i(48381),U=i(69650),G=i(85544),Y=i(35686),B=i(44897),H=i(42631),V=i(44425),W=i(72473),$=i(23780),z=i(8666),q=i(46684),K=i(53808),Q="pipeline_list_filters",X="pipeline_list_group_bys",F="pipeline_list_sort_column_index",J="pipeline_list_sort_direction",ee="pipeline_list_selected_tab_uuid";function ne(e){return(0,K.t8)(Q,e),e}function ie(e){return(0,K.t8)(X,e),e}var te=i(32929),oe=i(44898),ue=i(70515),re=i(30229),le=i(81655),ce=i(31608),se=i(81728),de=i(3917),ae=i(72619),pe=i(69419),fe=i(65458),ve=i(15610),he=i(86735),me=i(42122),ge=i(3314),be=i(70320),xe=i(89538),Ze=i(44952);function je(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 _e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?je(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var Ce={Icon:W.Pf,label:function(){return"Recently viewed"},uuid:"recent"},we={Icon:W.vd,label:function(){return"All pipelines"},uuid:"all"},Ie=[we,Ce],ke="tab",ye={borderRadius:"".concat(H.BG,"px"),iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function Pe(){var e,n=(0,f.useRouter)(),i=(0,a.useRef)(null),t=(0,a.useRef)(null),l=(0,a.useState)(null),c=l[0],s=l[1],C=(0,a.useState)(null),y=C[0],P=C[1],M=(0,a.useState)(null),H=M[0],je=M[1],Pe=(0,a.useState)(null),Te=Pe[0],Ae=Pe[1],Ee=(0,a.useState)(null),Se=Ee[0],Oe=Ee[1],Me=(0,a.useState)({}),De=Me[0],Ne=Me[1],Re=(0,a.useState)(null),Le=Re[0],Ue=Re[1],Ge=(0,pe.iV)(),Ye=(0,pe.DQ)(Ge,[S.$1.STATUS,S.$1.TAG,S.$1.TYPE]);(0,a.useEffect)((function(){var e;s(null===i||void 0===i||null===(e=i.current)||void 0===e?void 0:e.getBoundingClientRect().height)}),[Ge,i]);var Be=Y.ZP.projects.list(),He=Be.data,Ve=Be.mutate,We=(0,a.useMemo)((function(){var e;return null===He||void 0===He||null===(e=He.projects)||void 0===e?void 0:e[0]}),[He]),$e=(0,a.useMemo)((function(){var e;return(0,be.hY)(null===We||void 0===We||null===(e=We.features)||void 0===e?void 0:e[D.d.LOCAL_TIMEZONE])}),[null===We||void 0===We?void 0:We.features]),ze=(0,a.useMemo)((function(){var e;return null===We||void 0===We||null===(e=We.features)||void 0===e?void 0:e[D.d.OPERATION_HISTORY]}),[We]),qe=(0,a.useMemo)((function(){return $e?le.O$:{}}),[$e]),Ke=Y.ZP.pipelines.list(_e(_e({},Ye),{},{include_schedules:1})),Qe=Ke.data,Xe=Ke.mutate,Fe=(0,a.useMemo)((function(){return(null===Ge||void 0===Ge?void 0:Ge[S.$1.HISTORY_DAYS])||7}),[Ge]),Je=Y.ZP.pipelines.list(_e(_e({},Ye),{},(e={},(0,r.Z)(e,S.$1.HISTORY_DAYS,(0,se.HW)(Fe)?Number(Fe):Fe),(0,r.Z)(e,"include_schedules",1),e)),{},{pauseFetch:!ze}),en=Je.data,nn=Je.mutate,tn=(0,a.useCallback)((function(e){var n=e||[];if(Se){var i=Se.toLowerCase();n=n.filter((function(e){var n=e.name,t=e.description,o=e.uuid;return(null===n||void 0===n?void 0:n.toLowerCase().includes(i))||(null===o||void 0===o?void 0:o.toLowerCase().includes(i))||(null===t||void 0===t?void 0:t.toLowerCase().includes(i))}))}return n}),[Se]),on=(0,a.useMemo)((function(){var e=tn((null===Qe||void 0===Qe?void 0:Qe.pipelines)||[]);if(null!==Ge&&void 0!==Ge&&Ge[S.$1.TAG]){var n=Ge[S.$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(S.$1.NO_TAGS)}))}return e}),[Qe,tn,Ge]),un=(0,a.useMemo)((function(){return tn((null===en||void 0===en?void 0:en.pipelines)||[])}),[en,tn]),rn=(0,a.useMemo)((function(){return(0,he.HK)(on,(function(e){return e.uuid}))}),[on]),ln=(0,a.useMemo)((function(){return(0,he.HK)(un,(function(e){return e.uuid}))}),[un]),cn=(0,a.useCallback)((function(e){var n,i,t,o;return null===e||void 0===e||null===(n=e[2])||void 0===n||null===(i=n.props)||void 0===i||null===(t=i.children)||void 0===t||null===(o=t.props)||void 0===o?void 0:o.children}),[]),sn=(0,a.useMemo)((function(){return(null===H||void 0===H?void 0:H.length)>0?null===H||void 0===H?void 0:H.map((function(e){var n=cn(e);return null===rn||void 0===rn?void 0:rn[n]})):on}),[cn,H,on,rn]),dn=(0,a.useMemo)((function(){return(null===Te||void 0===Te?void 0:Te.length)>0?null===Te||void 0===Te?void 0:Te.map((function(e){var n=cn(e);return null===ln||void 0===ln?void 0:ln[n]})):un}),[cn,Te,un,ln]),an=(0,a.useMemo)((function(){return[1,2,3,4,5,6,8,9]}),[]),pn=null===Ge||void 0===Ge?void 0:Ge[le.lG.SORT_COL_IDX],fn=null===Ge||void 0===Ge?void 0:Ge[le.lG.SORT_DIRECTION],vn=(0,a.useMemo)((function(){return pn?{columnIndex:+pn,sortDirection:fn||le.sh.ASC}:void 0}),[pn,fn]),hn=null===Ge||void 0===Ge?void 0:Ge[S.$1.GROUP],mn=(0,a.useMemo)((function(){return null===Ge||void 0===Ge?void 0:Ge.tab}),[Ge]),gn=(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,ae.wD)(e,{callback:function(){var n=e.data.download.token;(0,Ze.K)(n)},onErrorCallback:function(e,n){return Ue({errors:n,response:e})}})}}),bn=(0,u.Z)(gn,1)[0];(0,a.useEffect)((function(){var e,n={};if(pn&&an.includes(+pn))(0,K.t8)(F,pn),fn&&(0,K.t8)(J,fn);else{var i=(0,K.U2)(F,null),t=(0,K.U2)(J,le.sh.ASC);null!==i&&(n[le.lG.SORT_COL_IDX]=i,n[le.lG.SORT_DIRECTION]=t)}ze&&(mn?(0,K.t8)(ee,mn):n.tab=(0,K.U2)(ee,null===Ie||void 0===Ie||null===(e=Ie[0])||void 0===e?void 0:e.uuid));if(hn)ie((0,r.Z)({},hn,!0));else{var o,l=(0,K.U2)(X,{});l&&Object.entries(l).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];!o&&t&&(o=i)})),o&&(n[S.$1.GROUP]=o)}if((0,me.Qr)(Ye)){var c={},s=(0,K.U2)(Q,{});s&&Object.entries(s).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];c[i]=[],Object.entries(t).forEach((function(e){var n=(0,u.Z)(e,2),t=n[0];n[1]&&c[i].push(t)}))})),(0,me.Qr)(c)||(n=_e(_e({},n),c))}else{var d={};Object.entries(Ye).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];d[i]={};var o,r=t;(Array.isArray(r)||(r=[r]),r&&Array.isArray(r))&&(null===(o=r)||void 0===o||o.forEach((function(e){d[i][e]=!0})))})),ne(d)}(0,me.Qr)(n)||(0,ve.u7)(n,{pushHistory:!1})}),[hn,ze,Ye,mn,an,pn,fn]),(0,a.useEffect)((function(){(0,ae.bB)(Qe,Ue)}),[Qe]);var xn=function(e){return(0,p.Db)(Y.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,ae.wD)(n,{callback:function(n){var i=n.pipeline.uuid;null===e||void 0===e||e(i)},onErrorCallback:function(e,n){return Ue({errors:n,response:e})}})}})},Zn=xn((function(e){return n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))})),jn=(0,u.Z)(Zn,2),_n=jn[0],Cn=jn[1].isLoading,wn=xn((function(){null===Xe||void 0===Xe||Xe(),null===nn||void 0===nn||nn()})),In=(0,u.Z)(wn,2),kn=In[0],yn=In[1].isLoading,Pn=(0,p.Db)((function(e){return Y.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,ae.wD)(e,{callback:function(e){var n=e.pipeline.uuid;Ne((function(e){return _e(_e({},e),{},(0,r.Z)({},n,!1))})),Xe(),null===nn||void 0===nn||nn(),null===Un||void 0===Un||Un(),P(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;Ne((function(e){return _e(_e({},e),{},(0,r.Z)({},t,!1))})),Ue({errors:n,response:e})}})}}),Tn=(0,u.Z)(Pn,2),An=Tn[0],En=Tn[1].isLoading,Sn=(0,p.Db)((function(e){return Y.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,ae.wD)(e,{callback:function(){null===Xe||void 0===Xe||Xe(),null===nn||void 0===nn||nn()},onErrorCallback:function(e,n){return Ue({errors:n,response:e})}})}}),On=(0,u.Z)(Sn,2),Mn=On[0],Dn=On[1].isLoading,Nn=(0,xe.dd)((function(e){var n=e.pipeline,i=e.pipelineDescription,t=e.pipelineName;return(0,T.jsx)(A,{isLoading:En,minWidth:55*ue.iI,noEmptyValue:!!t,onClose:Un,onSave:function(e){var i=n||y;if(i){var o=i.uuid,u={uuid:o};t?u.name=e:u.description=e,Ne((function(e){return _e(_e({},e),{},(0,r.Z)({},o,!0))})),An(u)}},textArea:!t,title:t?"Rename pipeline":"Edit description for ".concat(null===n||void 0===n?void 0:n.uuid),value:t||i})}),{},[En,y],{background:!0,uuid:"rename_pipeline_and_save"}),Rn=(0,u.Z)(Nn,2),Ln=Rn[0],Un=Rn[1],Gn=(0,xe.dd)((function(){return(0,T.jsx)($.BC,{children:(0,T.jsx)(h.Z,{contained:!0,onClickCustomTemplate:function(e){_n({pipeline:{custom_template_uuid:null===e||void 0===e?void 0:e.template_uuid,name:(0,se.Y6)()}}).then((function(){Hn()}))},showBreadcrumbs:!0,tabs:[te.A2]})})}),{},[_n],{background:!0,uuid:"browse_templates"}),Yn=(0,u.Z)(Gn,2),Bn=Yn[0],Hn=Yn[1],Vn=(0,xe.dd)((function(e){var n=e.cancelButtonText,i=(e.header,e.onCancel),t=e.onSaveSuccess;return(0,T.jsx)($.BC,{children:(0,T.jsx)(O.Z,{cancelButtonText:n,contained:!0,header:(0,T.jsx)(I.Z,{mb:ue.HN,children:(0,T.jsxs)(w.Z,{children:[(0,T.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,T.jsx)(I.Z,{mt:1,children:(0,T.jsxs)(k.ZP,{warning:!0,children:["Read ",(0,T.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(),zn()},onSaveSuccess:function(e){Ve(),zn(),null===t||void 0===t||t(e)}})})}),{},[Ve],{background:!0,uuid:"configure_project"}),Wn=(0,u.Z)(Vn,2),$n=Wn[0],zn=Wn[1],qn=(0,xe.dd)((function(){return(0,T.jsx)($.BC,{children:(0,T.jsx)(v.Z,{createPipeline:_n,isLoading:Cn,onClose:Xn})})}),{},[_n,Cn],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),Kn=(0,u.Z)(qn,2),Qn=Kn[0],Xn=Kn[1],Fn=(0,a.useMemo)((function(){return(0,fe.d)(_n,{showAIModal:function(){null!==We&&void 0!==We&&We.openai_api_key?Qn():$n({onSaveSuccess:function(){Qn()}})},showBrowseTemplates:Bn})}),[_n,We,Qn,Bn,$n]),Jn=Y.ZP.tags.list().data,ei=(0,a.useMemo)((function(){return(0,he.YC)((null===Jn||void 0===Jn?void 0:Jn.tags)||[],(function(e){return e.uuid}))}),[Jn]),ni=(0,a.useMemo)((function(){return(0,T.jsx)(G.Z,{addButtonProps:{isLoading:Cn,label:"New",menuItems:Fn},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:Dn,item:"pipeline",onDelete:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===y||void 0===y?void 0:y.uuid,"?"))&&Mn(null===y||void 0===y?void 0:y.uuid)}},extraActionButtonProps:{Icon:W.oX,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===y||void 0===y?void 0:y.uuid,"?"),isLoading:yn,onClick:function(){return kn({pipeline:{clone_pipeline_uuid:null===y||void 0===y?void 0:y.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},filterOptions:{status:S.kA,tag:[S.$1.NO_TAGS].concat((0,o.Z)(ei.map((function(e){return e.uuid})))),type:Object.values(S.qL)},filterValueLabelMapping:{status:S.kA.reduce((function(e,n){return _e(_e({},e),{},(0,r.Z)({},n,(0,se.J3)((0,se.kC)(n))))}),{}),tag:_e((0,r.Z)({},S.$1.NO_TAGS,"No tags"),ei.reduce((function(e,n){var i=n.uuid;return _e(_e({},e),{},(0,r.Z)({},i,i))}),{})),type:S.G7},groupButtonProps:{groupByLabel:hn,menuItems:[{beforeIcon:hn===S.r0.STATUS?(0,T.jsx)(W.Jr,{fill:B.Z.content.default,size:1.5*ue.iI}):(0,T.jsx)(W.Cd,{muted:!0,size:1.5*ue.iI}),label:function(){return(0,se.kC)(S.r0.STATUS)},onClick:function(){var e=hn===S.r0.STATUS?null:S.r0.STATUS;e||ie({}),(0,ve.u7)((0,r.Z)({},S.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:hn===S.r0.TAG?(0,T.jsx)(W.Jr,{fill:B.Z.content.default,size:1.5*ue.iI}):(0,T.jsx)(W.Cd,{muted:!0,size:1.5*ue.iI}),label:function(){return(0,se.kC)(S.r0.TAG)},onClick:function(){var e=hn===S.r0.TAG?null:S.r0.TAG;e||ie({}),(0,ve.u7)((0,r.Z)({},S.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Tag"},{beforeIcon:hn===S.r0.TYPE?(0,T.jsx)(W.Jr,{fill:B.Z.content.default,size:1.5*ue.iI}):(0,T.jsx)(W.Cd,{muted:!0,size:1.5*ue.iI}),label:function(){return(0,se.kC)(S.r0.TYPE)},onClick:function(){var e=hn===S.r0.TYPE?null:S.r0.TYPE;e||ie({}),(0,ve.u7)((0,r.Z)({},S.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return Ln({pipelineName:null===y||void 0===y?void 0:y.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return Ln({pipeline:y,pipelineDescription:null===y||void 0===y?void 0:y.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],onClickFilterDefaults:function(){ne({}),n.push("/pipelines")},onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!==e&&void 0!==e&&e.length)}))&&ne({})},query:Ye,searchProps:{onChange:Oe,value:Se},selectedRowId:null===y||void 0===y?void 0:y.uuid,setSelectedRow:P})}),[kn,Mn,hn,yn,Cn,Dn,Fn,Ye,n,Se,y,Ln,ei]),ii=(0,$.VI)(null,{},[],{uuid:"pipelines/list"}),ti=(0,u.Z)(ii,1)[0],oi=(0,p.Db)(Y.ZP.projects.useUpdate(null===We||void 0===We?void 0:We.name),{onSuccess:function(e){return(0,ae.wD)(e,{callback:function(){Ve()},onErrorCallback:function(e,n){return ti({errors:n,response:e})}})}}),ui=(0,u.Z)(oi,2),ri=ui[0],li=ui[1].isLoading,ci=(0,a.useCallback)((function(e){return ri({project:e})}),[ri]),si=(0,xe.dd)((function(){return(0,T.jsxs)(w.Z,{maxWidth:60*ue.iI,children:[(0,T.jsx)(I.Z,{mb:1,children:(0,T.jsx)(_.Z,{children:"Help improve Mage"})}),(0,T.jsx)(I.Z,{mb:ue.cd,children:(0,T.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,T.jsx)(I.Z,{mb:ue.cd,children:(0,T.jsx)(w.Z,{success:!0,children:(0,T.jsxs)(j.ZP,{alignItems:"center",children:[(0,T.jsx)(W.Yo,{size:5*ue.iI,success:!0}),(0,T.jsx)(I.Z,{mr:1}),(0,T.jsx)(Z.Z,{children:(0,T.jsx)(k.ZP,{children:"All usage statistics are completely anonymous. It\u2019s impossible for Mage to know which statistics belongs to whom."})})]})})}),(0,T.jsx)(I.Z,{mb:ue.cd,children:(0,T.jsxs)(k.ZP,{default:!0,children:["By opting into sending usage statistics to ",(0,T.jsx)(E.Z,{href:"https://www.mage.ai",openNewWindow:!0,children:"Mage"}),", it\u2019ll help the team and community of contributors (",(0,T.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,T.jsx)(I.Z,{mb:ue.cd,children:(0,T.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,T.jsx)(I.Z,{mb:ue.cd,children:(0,T.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,T.jsx)(k.ZP,{bold:!0,children:"I want to help make Mage more powerful for everyone"}),(0,T.jsx)(I.Z,{mr:ue.cd}),(0,T.jsx)(U.Z,{checked:!0,onCheck:function(){window.confirm("Are you sure you don\u2019t want to help everyone in the community?")&&ci({help_improve_mage:!1}).then((function(){return pi()}))}})]})}),li&&(0,T.jsx)(I.Z,{mb:ue.cd,children:(0,T.jsx)(N.Z,{inverted:!0})}),(0,T.jsx)(I.Z,{mb:ue.cd,children:(0,T.jsxs)(k.ZP,{muted:!0,small:!0,children:["To learn more about how this works, please check out the ",(0,T.jsx)(E.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,small:!0,children:"documentation"}),"."]})}),(0,T.jsx)(m.ZP,{onClick:function(){return ci({help_improve_mage:!0}).then((function(){return pi()}))},secondary:!0,children:"Close"})]})}),{},[We],{background:!0,hideCallback:function(){ci({help_improve_mage:!0})},uuid:"help_mage"}),di=(0,u.Z)(si,2),ai=di[0],pi=di[1];(0,a.useEffect)((function(){We&&null===(null===We||void 0===We?void 0:We.help_improve_mage)&&ai()}),[We,ai]);var fi=(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[hn];if(S.r0.STATUS===hn){var o=(e||{}).schedules,u=void 0===o?[]:o,r=u.length;t=u.find((function(e){var n=e.status;return re.fq.ACTIVE===n}))?S.QK.ACTIVE:r>=1?S.QK.INACTIVE:S.QK.NO_SCHEDULES}else if(S.r0.TAG===hn){t=(null===e||void 0===e?void 0:e.tags)?(0,he.YC)(e.tags,(function(e){return e})).join(", "):""}n[t]||(n[t]=[]),n[t].push(i)}));var i=[],t=[];S.r0.STATUS===hn?Object.values(S.QK).forEach((function(e){i.push(n[e]),t.push((0,se.vg)(e))})):S.r0.TAG===hn?(0,he.YC)(Object.keys(n),(function(e){return e})).forEach((function(e){i.push(n[e]),e?t.push(e.split(", ").map((function(e,n){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{style:{marginLeft:n>=1?4:0}},"".concat(e,"-").concat(n,"-spacing")),(0,T.jsx)(b.Z,{small:!0,children:(0,T.jsx)(k.ZP,{children:e})},"".concat(e,"-").concat(n))]})}))):t.push("No tags")})):S.r0.TYPE===hn&&Object.values(S.qL).forEach((function(e){i.push(n[e]),t.push(S.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}}),[hn]),vi=(0,a.useMemo)((function(){return fi(sn)}),[fi,sn]),hi=vi.rowGroupHeaders,mi=vi.rowsGroupedByIndex,gi=(0,a.useMemo)((function(){return fi(dn)}),[fi,dn]),bi=gi.rowGroupHeaders,xi=gi.rowsGroupedByIndex,Zi=(0,a.useCallback)((function(e,i,o,u,l){return(0,T.jsx)(R.Z,{columnFlex:[null,null,null,2,null,null,null,1,null,null,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,se.kC)(S.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,se.kC)(S.r0.TYPE)},_e(_e({},qe),{},{uuid:"Updated at"}),_e(_e({},qe),{},{uuid:"Created at"}),{uuid:"Tags"},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,label:function(){return""},uuid:"Actions"}],defaultSortColumnIndex:2,getUniqueRowIdentifier:cn,isSelectedRow:function(e){var n;return(null===(n=i[e])||void 0===n?void 0:n.uuid)===(null===y||void 0===y?void 0:y.uuid)},localStorageKeySortColIdx:F,localStorageKeySortDirection:J,onClickRow:function(e){return P((function(n){var t=i[e];return(null===n||void 0===n?void 0:n.uuid)!==(null===t||void 0===t?void 0:t.uuid)?t:null}))},onDoubleClickRow:function(e){n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(i[e].uuid,"/edit"))},ref:t,renderRightClickMenuItems:function(e){var t=i[e];return[{label:function(){return"Edit description"},onClick:function(){return Ln({pipeline:t,pipelineDescription:null===t||void 0===t?void 0:t.description})},uuid:"edit_description"},{label:function(){return"Rename"},onClick:function(){return Ln({pipeline:t,pipelineName:null===t||void 0===t?void 0:t.name})},uuid:"rename"},{label:function(){return"Clone"},onClick:function(){return kn({pipeline:{clone_pipeline_uuid:null===t||void 0===t?void 0:t.uuid}})},uuid:"clone"},{label:function(){return"Download (keep folder structure)"},onClick:function(){bn({pipelineUUID:null===t||void 0===t?void 0:t.uuid,filesOnly:!1})},uuid:"download_keep_folder_structure"},{label:function(){return"Download (without folder structure)"},onClick:function(){bn({pipelineUUID:null===t||void 0===t?void 0:t.uuid,filesOnly:!0})},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(oe.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(z.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,"?"))&&Mn(null===t||void 0===t?void 0:t.uuid)},uuid:"delete"}]},rightClickMenuHeight:252,rightClickMenuWidth:30*ue.iI,rowGroupHeaders:o,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 V.tf.SCRATCHPAD!==n})).length,v=l.length,h=l.find((function(e){var n=e.status;return re.fq.ACTIVE===n})),g=(0,T.jsx)("div",{children:(0,T.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||De[p]?(0,T.jsx)(m.ZP,{iconOnly:!0,loading:!!De[p],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,ge.j)(n),Ne((function(e){return _e(_e({},e),{},(0,r.Z)({},p,!0))})),An(_e(_e({},e),{},{status:h?re.fq.INACTIVE:re.fq.ACTIVE}))},children:h?(0,T.jsx)(W.dz,{muted:!0,size:2*ue.iI}):(0,T.jsx)(W.Py,{default:!0,size:2*ue.iI})}):null,(0,T.jsx)(k.ZP,{default:!h,monospace:!0,success:!!h,children:h?re.fq.ACTIVE:v>=1?re.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(i)),(0,T.jsx)(d(),{as:"/pipelines/".concat(p),href:"/pipelines/[pipeline]",passHref:!0,children:(0,T.jsx)(E.Z,{sameColorAsText:!0,children:p})},"pipeline_name_".concat(i)),(0,T.jsx)(k.ZP,{default:!0,preWrap:!0,title:u,children:u},"pipeline_description_".concat(i)),(0,T.jsx)(k.ZP,{children:S.G7[s]},"pipeline_type_".concat(i)),(0,T.jsx)(k.ZP,{monospace:!0,small:!0,title:a?(0,de._6)(a):null,children:a?(0,de.XG)(a,$e):(0,T.jsx)(T.Fragment,{children:"\u2014"})},"pipeline_updated_at_".concat(i)),(0,T.jsx)(k.ZP,{monospace:!0,small:!0,title:o?(0,de._6)(o):null,children:o?(0,de.XG)(o.slice(0,19),$e):(0,T.jsx)(T.Fragment,{children:"\u2014"})},"pipeline_created_at_".concat(i)),g,(0,T.jsx)(k.ZP,{default:0===f,monospace:!0,children:f},"pipeline_block_count_".concat(i)),(0,T.jsx)(k.ZP,{default:0===v,monospace:!0,children:v},"pipeline_trigger_count_".concat(i)),(0,T.jsxs)(Z.Z,{flex:1,justifyContent:"flex-end",children:[(0,T.jsx)(m.ZP,_e(_e({},ye),{},{onClick:function(){bn({pipelineUUID:p})},title:"Download (keep folder structure)",children:(0,T.jsx)(W.vc,{default:!0,size:2*ue.iI})})),(0,T.jsx)(I.Z,{mr:1}),(0,T.jsx)(m.ZP,_e(_e({},ye),{},{onClick:function(){n.push("/pipelines/[pipeline]","/pipelines/".concat(p))},title:"Detail",children:(0,T.jsx)(W.UY,{default:!0,size:2*ue.iI})})),(0,T.jsx)(I.Z,{mr:1}),(0,T.jsx)(m.ZP,_e(_e({},ye),{},{onClick:function(){n.push("/pipelines/[pipeline]/logs","/pipelines/".concat(p,"/logs"))},title:"Logs",children:(0,T.jsx)(W.$B,{default:!0,size:2*ue.iI})}))]},"chevron_icon_".concat(i))]})),rowsGroupedByIndex:u,setRowsSorted:l,sortableColumnIndexes:an,sortedColumn:vn,stickyHeader:!0})}),[kn,Mn,bn,$e,cn,De,n,y,Ne,P,Ln,an,vn,qe,An]),ji=(0,a.useMemo)((function(){return Zi(on,sn,hi,mi,je)}),[on,sn,Zi,hi,mi,je]),_i=(0,a.useMemo)((function(){return Zi(un,dn,bi,xi,Ae)}),[un,dn,Zi,bi,xi,Ae]),Ci=(0,a.useMemo)((function(){return(null===on||void 0===on?void 0:on.length)||0}),[on]),wi=(0,a.useMemo)((function(){return(null===un||void 0===un?void 0:un.length)||0}),[un]),Ii=(0,a.useMemo)((function(){return(!ze||we.uuid===mn)&&!Ci||ze&&Ce.uuid===mn&&!wi}),[ze,Ci,wi,mn]);return(0,T.jsxs)(x.Z,{errors:Le,setErrors:Ue,subheaderChildren:ni,title:"Pipelines",uuid:"pipelines/index",children:[ze&&(0,T.jsx)(I.Z,{pb:hn?0:ue.cd,pt:ue.cd,px:ue.cd,ref:i,children:(0,T.jsx)(g.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return(0,ve.u7)((0,r.Z)({},ke,n),{pushHistory:!0})},regularSizeText:!0,selectedTabUUID:mn,tabs:Ie})}),Ii?(0,T.jsx)(I.Z,{p:ue.Mq,children:Qe?(0,T.jsx)(k.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,T.jsx)(N.Z,{inverted:!0,large:!0})}):null,(0,T.jsxs)(ce.cl,{hide:Ii,includePadding:!!hn,maxHeight:"calc(100vh - ".concat(q.Mz+74+(c||0),"px)"),children:[(!ze||we.uuid===mn)&&ji,ze&&Ce.uuid===mn&&_i]})]})}Pe.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 Te=(0,M.Z)(Pe)},44952:function(e,n,i){"use strict";i.d(n,{K:function(){return o}});var t=i(4383);function o(e){var n=(0,t.ZP)("downloads",e),i=document.createElement("a");i.href=n,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(n),document.body.removeChild(i)}},79274:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return i(55620)}])}},function(e){e.O(0,[2678,1154,844,5820,6639,1124,341,1751,1821,4267,6990,8487,8264,7858,5499,4366,4138,5810,1769,1550,90,9264,5544,1952,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6308],{65956:function(n,e,t){"use strict";var i=t(38626),o=t(55485),r=t(38276),c=t(30160),a=t(44897),l=t(42631),d=t(47041),u=t(70515),s=t(28598),h=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*u.iI,1.5*u.iI,1.5*u.iI),f=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(n){return n.fullWidth&&"\n width: 100%;\n "}),(function(n){return!n.borderless&&"\n border: 1px solid ".concat((n.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||a.Z.background).successLight,";\n ")}),(function(n){return n.success&&!n.borderless&&"\n border: 1px solid ".concat((n.theme.background||a.Z.background).success,";\n ")}),(function(n){return!n.dark&&!n.success&&"\n background-color: ".concat((n.theme.background||a.Z.background).panel,";\n ")}),(function(n){return n.dark&&"\n background-color: ".concat((n.theme.background||a.Z.background).content,";\n ")}),(function(n){return!n.fullHeight&&"\n height: fit-content;\n "}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,";\n ")}),(function(n){return n.maxWidth&&"\n max-width: ".concat(n.maxWidth,"px;\n ")}),(function(n){return n.minWidth&&"\n min-width: ".concat(n.minWidth,"px;\n\n @media (max-width: ").concat(n.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(n){return n.borderless&&"\n border: none;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),p=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(n){return"\n background-color: ".concat((n.theme.background||a.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((n.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),h,(function(n){return n.headerPaddingVertical&&"\n padding-bottom: ".concat(n.headerPaddingVertical,"px;\n padding-top: ").concat(n.headerPaddingVertical,"px;\n ")})),m=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*u.iI,d.w5,(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return n.maxHeight&&"\n max-height: calc(".concat(n.maxHeight," - ").concat(15*u.iI,"px);\n ")}),(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),g=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*u.iI);e.Z=function(n){var e=n.borderless,t=n.children,i=n.containerRef,a=n.contentContainerRef,l=n.dark,d=n.footer,u=n.fullHeight,h=void 0===u||u,x=n.fullWidth,b=void 0===x||x,y=n.header,w=n.headerHeight,v=n.headerIcon,_=n.headerPaddingVertical,j=n.headerTitle,I=n.maxHeight,Z=n.maxWidth,N=n.minWidth,H=n.noPadding,P=n.overflowVisible,k=n.subtitle,S=n.success;return(0,s.jsxs)(f,{borderless:e,dark:l,fullHeight:h,fullWidth:b,maxHeight:I,maxWidth:Z,minWidth:N,overflowVisible:P,ref:i,success:S,children:[(y||j)&&(0,s.jsxs)(p,{headerPaddingVertical:_,height:w,children:[y&&y,j&&(0,s.jsx)(o.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(o.ZP,{alignItems:"center",children:[v&&v,(0,s.jsx)(r.Z,{ml:v?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:j})})]})})]}),(0,s.jsxs)(m,{maxHeight:I,noPadding:H,overflowVisible:P,ref:a,children:[k&&"string"===typeof k&&(0,s.jsx)(r.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:k})}),k&&"string"!==typeof k&&k,t]}),d&&(0,s.jsx)(g,{children:d})]})}},85854:function(n,e,t){"use strict";var i,o,r,c,a,l,d,u,s=t(82394),h=t(26304),f=t(26653),p=t(38626),m=t(33591),g=t(44897),x=t(95363),b=t(61896),y=t(30160),w=t(70515),v=t(38276),_=t(28598),j=["children","condensed","inline","level","marketing","spacingBelow"];function I(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function Z(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?I(Object(t),!0).forEach((function(e){(0,s.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var N=(0,p.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," "," ",""],y.IH,(function(n){return n.color&&"\n color: ".concat(n.color,"\n ")}),(function(n){return n.yellow&&"\n color: ".concat((n.theme.accent||g.Z.accent).yellow,";\n ")}),(function(n){return n.center&&"\n text-align: center;\n "}),(function(n){return!n.monospace&&0===Number(n.weightStyle)&&"\n font-family: ".concat(x.iI,";\n ")}),(function(n){return!n.monospace&&1===Number(n.weightStyle)&&"\n font-family: ".concat(x.LX,";\n ")}),(function(n){return!n.monospace&&2===Number(n.weightStyle)&&"\n font-family: ".concat(x.LX,";\n ")}),(function(n){return!n.monospace&&3===Number(n.weightStyle)&&"\n font-family: ".concat(x.ry,";\n ")}),(function(n){return!n.monospace&&4===Number(n.weightStyle)&&"\n font-family: ".concat(x.YC,";\n ")}),(function(n){return!n.monospace&&5===Number(n.weightStyle)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return!n.monospace&&(6===Number(n.weightStyle)||n.bold)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return!n.monospace&&7===Number(n.weightStyle)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return!n.monospace&&8===Number(n.weightStyle)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return n.lineHeightAuto&&"\n line-height: normal !important;\n "}),(function(n){return n.strikethrough&&"\n text-decoration: line-through;\n "})),H=p.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(n){return"\n color: ".concat((n.theme.content||g.Z.content).active,";\n ")})),P=p.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],N,m.media.md(i||(i=(0,f.Z)(["\n ","\n "])),b.aQ),m.media.lg(o||(o=(0,f.Z)(["\n ","\n "])),b.aQ),m.media.xl(r||(r=(0,f.Z)(["\n ","\n "])),b.aQ)),k=p.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],N,b.MJ),S=p.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],N,m.media.xs(c||(c=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.sm(a||(a=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.md(l||(l=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.lg(d||(d=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.xl(u||(u=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI)),C=p.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],N,b.BL),z=p.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],N),O=p.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],N),W=p.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],N),V=p.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],N,(function(n){return 1===n.level&&"\n ".concat(b.MJ,"\n ")}),(function(n){return 2===n.level&&"\n ".concat(b.BL,"\n ")}),(function(n){return 3===n.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(n){return 4===n.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),B=function(n){var e,t=n.children,i=n.condensed,o=n.inline,r=n.level,c=n.marketing,a=n.spacingBelow,l=(0,h.Z)(n,j);o?e=V:0===Number(r)?e=P:1===Number(r)?e=c?S:k:2===Number(r)?e=C:3===Number(r)?e=z:4===Number(r)?e=O:5===Number(r)&&(e=W);var d=(0,_.jsxs)(e,Z(Z({},l),{},{level:r,children:[a&&(0,_.jsx)(v.Z,{mb:i?2:3,children:t}),!a&&t]}));return o?d:(0,_.jsx)(H,{children:d})};B.defaultProps={level:3,weightStyle:6},e.Z=B},86627:function(n,e,t){"use strict";t.r(e);var i=t(77837),o=t(38860),r=t.n(o),c=t(65956),a=t(93808),l=t(28274),d=t(38276),u=t(36043),s=t(35686),h=t(70515),f=t(24755),p=t(50178),m=t(28598);function g(){var n=((0,p.PR)()||{}).id,e=s.ZP.users.detail(n),t=e.data,i=e.mutate,o=null===t||void 0===t?void 0:t.user;return(0,m.jsx)(l.Z,{uuidItemSelected:f.DQ,uuidWorkspaceSelected:f.tC,children:(0,m.jsx)(d.Z,{p:h.cd,children:(0,m.jsx)(c.Z,{children:(0,m.jsx)(u.Z,{disabledFields:["roles"],onSaveSuccess:i,user:o})})})})}g.getInitialProps=(0,i.Z)(r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{});case 1:case"end":return n.stop()}}),n)}))),e.default=(0,a.Z)(g)},10736:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/account/profile",function(){return t(86627)}])}},function(n){n.O(0,[2678,1154,844,4267,600,8487,8264,8432,6043,9774,2888,179],(function(){return e=10736,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6308],{65956:function(n,e,t){"use strict";var i=t(38626),o=t(55485),r=t(38276),c=t(30160),a=t(44897),l=t(42631),d=t(47041),u=t(70515),s=t(28598),h=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*u.iI,1.5*u.iI,1.5*u.iI),f=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(n){return n.fullWidth&&"\n width: 100%;\n "}),(function(n){return!n.borderless&&"\n border: 1px solid ".concat((n.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||a.Z.background).successLight,";\n ")}),(function(n){return n.success&&!n.borderless&&"\n border: 1px solid ".concat((n.theme.background||a.Z.background).success,";\n ")}),(function(n){return!n.dark&&!n.success&&"\n background-color: ".concat((n.theme.background||a.Z.background).panel,";\n ")}),(function(n){return n.dark&&"\n background-color: ".concat((n.theme.background||a.Z.background).content,";\n ")}),(function(n){return!n.fullHeight&&"\n height: fit-content;\n "}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,";\n ")}),(function(n){return n.maxWidth&&"\n max-width: ".concat(n.maxWidth,"px;\n ")}),(function(n){return n.minWidth&&"\n min-width: ".concat(n.minWidth,"px;\n\n @media (max-width: ").concat(n.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(n){return n.borderless&&"\n border: none;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),p=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(n){return"\n background-color: ".concat((n.theme.background||a.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((n.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),h,(function(n){return n.headerPaddingVertical&&"\n padding-bottom: ".concat(n.headerPaddingVertical,"px;\n padding-top: ").concat(n.headerPaddingVertical,"px;\n ")})),m=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*u.iI,d.w5,(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return n.maxHeight&&"\n max-height: calc(".concat(n.maxHeight," - ").concat(15*u.iI,"px);\n ")}),(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),g=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*u.iI);e.Z=function(n){var e=n.borderless,t=n.children,i=n.containerRef,a=n.contentContainerRef,l=n.dark,d=n.footer,u=n.fullHeight,h=void 0===u||u,x=n.fullWidth,b=void 0===x||x,y=n.header,w=n.headerHeight,v=n.headerIcon,_=n.headerPaddingVertical,j=n.headerTitle,I=n.maxHeight,Z=n.maxWidth,N=n.minWidth,H=n.noPadding,P=n.overflowVisible,k=n.subtitle,S=n.success;return(0,s.jsxs)(f,{borderless:e,dark:l,fullHeight:h,fullWidth:b,maxHeight:I,maxWidth:Z,minWidth:N,overflowVisible:P,ref:i,success:S,children:[(y||j)&&(0,s.jsxs)(p,{headerPaddingVertical:_,height:w,children:[y&&y,j&&(0,s.jsx)(o.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(o.ZP,{alignItems:"center",children:[v&&v,(0,s.jsx)(r.Z,{ml:v?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:j})})]})})]}),(0,s.jsxs)(m,{maxHeight:I,noPadding:H,overflowVisible:P,ref:a,children:[k&&"string"===typeof k&&(0,s.jsx)(r.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:k})}),k&&"string"!==typeof k&&k,t]}),d&&(0,s.jsx)(g,{children:d})]})}},85854:function(n,e,t){"use strict";var i,o,r,c,a,l,d,u,s=t(82394),h=t(26304),f=t(26653),p=t(38626),m=t(33591),g=t(44897),x=t(95363),b=t(61896),y=t(30160),w=t(70515),v=t(38276),_=t(28598),j=["children","condensed","inline","level","marketing","spacingBelow"];function I(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function Z(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?I(Object(t),!0).forEach((function(e){(0,s.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var N=(0,p.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," "," ",""],y.IH,(function(n){return n.color&&"\n color: ".concat(n.color,"\n ")}),(function(n){return n.yellow&&"\n color: ".concat((n.theme.accent||g.Z.accent).yellow,";\n ")}),(function(n){return n.center&&"\n text-align: center;\n "}),(function(n){return!n.monospace&&0===Number(n.weightStyle)&&"\n font-family: ".concat(x.iI,";\n ")}),(function(n){return!n.monospace&&1===Number(n.weightStyle)&&"\n font-family: ".concat(x.LX,";\n ")}),(function(n){return!n.monospace&&2===Number(n.weightStyle)&&"\n font-family: ".concat(x.LX,";\n ")}),(function(n){return!n.monospace&&3===Number(n.weightStyle)&&"\n font-family: ".concat(x.ry,";\n ")}),(function(n){return!n.monospace&&4===Number(n.weightStyle)&&"\n font-family: ".concat(x.YC,";\n ")}),(function(n){return!n.monospace&&5===Number(n.weightStyle)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return!n.monospace&&(6===Number(n.weightStyle)||n.bold)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return!n.monospace&&7===Number(n.weightStyle)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return!n.monospace&&8===Number(n.weightStyle)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return n.lineHeightAuto&&"\n line-height: normal !important;\n "}),(function(n){return n.strikethrough&&"\n text-decoration: line-through;\n "})),H=p.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(n){return"\n color: ".concat((n.theme.content||g.Z.content).active,";\n ")})),P=p.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],N,m.media.md(i||(i=(0,f.Z)(["\n ","\n "])),b.aQ),m.media.lg(o||(o=(0,f.Z)(["\n ","\n "])),b.aQ),m.media.xl(r||(r=(0,f.Z)(["\n ","\n "])),b.aQ)),k=p.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],N,b.MJ),S=p.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],N,m.media.xs(c||(c=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.sm(a||(a=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.md(l||(l=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.lg(d||(d=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.xl(u||(u=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI)),C=p.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],N,b.BL),z=p.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],N),O=p.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],N),W=p.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],N),V=p.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],N,(function(n){return 1===n.level&&"\n ".concat(b.MJ,"\n ")}),(function(n){return 2===n.level&&"\n ".concat(b.BL,"\n ")}),(function(n){return 3===n.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(n){return 4===n.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),B=function(n){var e,t=n.children,i=n.condensed,o=n.inline,r=n.level,c=n.marketing,a=n.spacingBelow,l=(0,h.Z)(n,j);o?e=V:0===Number(r)?e=P:1===Number(r)?e=c?S:k:2===Number(r)?e=C:3===Number(r)?e=z:4===Number(r)?e=O:5===Number(r)&&(e=W);var d=(0,_.jsxs)(e,Z(Z({},l),{},{level:r,children:[a&&(0,_.jsx)(v.Z,{mb:i?2:3,children:t}),!a&&t]}));return o?d:(0,_.jsx)(H,{children:d})};B.defaultProps={level:3,weightStyle:6},e.Z=B},86627:function(n,e,t){"use strict";t.r(e);var i=t(77837),o=t(38860),r=t.n(o),c=t(65956),a=t(93808),l=t(28274),d=t(38276),u=t(36043),s=t(35686),h=t(70515),f=t(24755),p=t(50178),m=t(28598);function g(){var n=((0,p.PR)()||{}).id,e=s.ZP.users.detail(n),t=e.data,i=e.mutate,o=null===t||void 0===t?void 0:t.user;return(0,m.jsx)(l.Z,{uuidItemSelected:f.DQ,uuidWorkspaceSelected:f.tC,children:(0,m.jsx)(d.Z,{p:h.cd,children:(0,m.jsx)(c.Z,{children:(0,m.jsx)(u.Z,{disabledFields:["roles"],onSaveSuccess:i,user:o})})})})}g.getInitialProps=(0,i.Z)(r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{});case 1:case"end":return n.stop()}}),n)}))),e.default=(0,a.Z)(g)},10736:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/account/profile",function(){return t(86627)}])}},function(n){n.O(0,[2678,1154,844,4267,6990,8487,8264,8432,6043,9774,2888,179],(function(){return e=10736,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[609],{5149:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(58146),o=u(93808),a=u(28598);function c(n){var r=n.slug;return(0,a.jsx)(i.Z,{slug:r})}c.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null===u||void 0===u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,o.Z)(c)},79877:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/permissions/[...slug]",function(){return u(5149)}])}},function(n){n.O(0,[2678,1154,844,4267,600,8487,8264,7858,5499,8432,8146,9774,2888,179],(function(){return r=79877,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[609],{5149:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(58146),o=u(93808),a=u(28598);function c(n){var r=n.slug;return(0,a.jsx)(i.Z,{slug:r})}c.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null===u||void 0===u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,o.Z)(c)},79877:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/permissions/[...slug]",function(){return u(5149)}])}},function(n){n.O(0,[2678,1154,844,4267,6990,8487,8264,7858,5499,8432,8146,9774,2888,179],(function(){return r=79877,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4085],{34331:function(e,n,i){"use strict";i.r(n);var t=i(77837),r=i(38860),s=i.n(r),u=i(82684),c=i(34376),o=i(71180),d=i(15338),l=i(55485),a=i(58146),p=i(93808),m=i(28274),f=i(38276),h=i(75499),v=i(30160),x=i(35686),j=i(72473),_=i(70515),P=i(24755),Z=i(3917),w=i(36717),b=i(28598);function k(){var e=(0,c.useRouter)(),n=(0,u.useState)(!1),i=n[0],t=n[1],r=x.ZP.permissions.list({_limit:1e3}).data,s=(0,u.useMemo)((function(){return(null===r||void 0===r?void 0:r.permissions)||[]}),[r]),p=[{bold:!i,label:function(){return"Permissions"}}];return i?(p[0].onClick=function(){return t(!1)},p.push({bold:!0,label:function(){return"New permission"}})):p[0].linkProps={href:"/settings/workspace/permissions"},(0,b.jsxs)(m.Z,{appendBreadcrumbs:!0,breadcrumbs:p,title:"Permissions",uuidItemSelected:P.B2.PERMISSIONS,uuidWorkspaceSelected:P.Pl.USER_MANAGEMENT,children:[i&&(0,b.jsx)(a.Z,{contained:!0,onCancel:function(){return t(!1)}}),!i&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Z,{p:_.cd,children:(0,b.jsx)(o.ZP,{beforeIcon:(0,b.jsx)(j.QM,{}),onClick:function(){return t(!0)},primary:!0,children:"Add new permission"})}),(0,b.jsx)(d.Z,{light:!0}),(0,b.jsx)(h.Z,{columnFlex:[3,1,null,6,null,null],columns:[{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{uuid:"Access"},{uuid:"Last updated"},{rightAligned:!0,uuid:"Created at"}],onClickRow:function(n){var i,t=null===(i=s[n])||void 0===i?void 0:i.id;e.push("/settings/workspace/permissions/".concat(t))},rows:null===s||void 0===s?void 0:s.map((function(e){var n=e.access,i=e.created_at,t=e.entity,r=e.entity_id,s=e.entity_name,u=e.entity_type,c=(e.id,e.updated_at),o=(e.user,n?(0,w.q)(n):[]),d=(null===o||void 0===o?void 0:o.length)||0;return[(0,b.jsx)(v.ZP,{monospace:!0,children:s||t},"entityName"),(0,b.jsx)(v.ZP,{default:!0,monospace:!!u,children:u||"-"},"entityType"),(0,b.jsx)(v.ZP,{default:!0,monospace:!!r,children:r||"-"},"entityID"),(0,b.jsx)("div",{children:d>=1&&(0,b.jsx)(l.ZP,{alignItems:"center",flexWrap:"wrap",children:null===o||void 0===o?void 0:o.map((function(e,n){return(0,b.jsx)("div",{children:(0,b.jsxs)(v.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,b.jsx)(v.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access"),(0,b.jsx)(v.ZP,{monospace:!0,default:!0,children:c&&(0,Z.d$)(c)},"updatedAt"),(0,b.jsx)(v.ZP,{monospace:!0,default:!0,rightAligned:!0,children:i&&(0,Z.d$)(i)},"createdAt")]})),uuid:"permissions"})]})]})}k.getInitialProps=(0,t.Z)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,p.Z)(k)},36717:function(e,n,i){"use strict";i.d(n,{q:function(){return s}});var t=i(75582),r=i(36288);function s(e){return Object.entries(r.K4).reduce((function(n,i){var r=(0,t.Z)(i,2),s=r[0],u=r[1];return e&Number(s)?n.concat(u):n}),[])}},65960:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/permissions",function(){return i(34331)}])}},function(e){e.O(0,[2678,1154,844,4267,600,8487,8264,7858,5499,8432,8146,9774,2888,179],(function(){return n=65960,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4085],{34331:function(e,n,i){"use strict";i.r(n);var t=i(77837),r=i(38860),s=i.n(r),u=i(82684),c=i(34376),o=i(71180),d=i(15338),l=i(55485),a=i(58146),p=i(93808),m=i(28274),f=i(38276),h=i(75499),v=i(30160),x=i(35686),j=i(72473),_=i(70515),P=i(24755),Z=i(3917),w=i(36717),b=i(28598);function k(){var e=(0,c.useRouter)(),n=(0,u.useState)(!1),i=n[0],t=n[1],r=x.ZP.permissions.list({_limit:1e3}).data,s=(0,u.useMemo)((function(){return(null===r||void 0===r?void 0:r.permissions)||[]}),[r]),p=[{bold:!i,label:function(){return"Permissions"}}];return i?(p[0].onClick=function(){return t(!1)},p.push({bold:!0,label:function(){return"New permission"}})):p[0].linkProps={href:"/settings/workspace/permissions"},(0,b.jsxs)(m.Z,{appendBreadcrumbs:!0,breadcrumbs:p,title:"Permissions",uuidItemSelected:P.B2.PERMISSIONS,uuidWorkspaceSelected:P.Pl.USER_MANAGEMENT,children:[i&&(0,b.jsx)(a.Z,{contained:!0,onCancel:function(){return t(!1)}}),!i&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Z,{p:_.cd,children:(0,b.jsx)(o.ZP,{beforeIcon:(0,b.jsx)(j.QM,{}),onClick:function(){return t(!0)},primary:!0,children:"Add new permission"})}),(0,b.jsx)(d.Z,{light:!0}),(0,b.jsx)(h.Z,{columnFlex:[3,1,null,6,null,null],columns:[{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{uuid:"Access"},{uuid:"Last updated"},{rightAligned:!0,uuid:"Created at"}],onClickRow:function(n){var i,t=null===(i=s[n])||void 0===i?void 0:i.id;e.push("/settings/workspace/permissions/".concat(t))},rows:null===s||void 0===s?void 0:s.map((function(e){var n=e.access,i=e.created_at,t=e.entity,r=e.entity_id,s=e.entity_name,u=e.entity_type,c=(e.id,e.updated_at),o=(e.user,n?(0,w.q)(n):[]),d=(null===o||void 0===o?void 0:o.length)||0;return[(0,b.jsx)(v.ZP,{monospace:!0,children:s||t},"entityName"),(0,b.jsx)(v.ZP,{default:!0,monospace:!!u,children:u||"-"},"entityType"),(0,b.jsx)(v.ZP,{default:!0,monospace:!!r,children:r||"-"},"entityID"),(0,b.jsx)("div",{children:d>=1&&(0,b.jsx)(l.ZP,{alignItems:"center",flexWrap:"wrap",children:null===o||void 0===o?void 0:o.map((function(e,n){return(0,b.jsx)("div",{children:(0,b.jsxs)(v.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,b.jsx)(v.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access"),(0,b.jsx)(v.ZP,{monospace:!0,default:!0,children:c&&(0,Z.d$)(c)},"updatedAt"),(0,b.jsx)(v.ZP,{monospace:!0,default:!0,rightAligned:!0,children:i&&(0,Z.d$)(i)},"createdAt")]})),uuid:"permissions"})]})]})}k.getInitialProps=(0,t.Z)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,p.Z)(k)},36717:function(e,n,i){"use strict";i.d(n,{q:function(){return s}});var t=i(75582),r=i(36288);function s(e){return Object.entries(r.K4).reduce((function(n,i){var r=(0,t.Z)(i,2),s=r[0],u=r[1];return e&Number(s)?n.concat(u):n}),[])}},65960:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/permissions",function(){return i(34331)}])}},function(e){e.O(0,[2678,1154,844,4267,6990,8487,8264,7858,5499,8432,8146,9774,2888,179],(function(){return n=65960,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{55729:function(e,n,t){"use strict";t.d(n,{Z:function(){return W}});var i=t(82394),r=t(75582),o=t(82684),c=t(69864),l=t(71180),a=t(15338),d=t(97618),s=t(55485),u=t(85854),p=t(48670),f=t(65956),h=t(82359),g=t(88543),m=t(38276),j=t(30160),x=t(17488),v=t(69650),b=t(12468),y=t(35686),Z=t(38626),w=t(44897),O=t(42631),P=t(70515),_=Z.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],O.n_,P.cd*P.iI,(function(e){return"\n background-color: ".concat((e.theme.background||w.Z.background).codeArea,";\n ")})),k=t(72473),I=t(72191),C=t(70320),S=t(81728),H=t(42122),N=t(72619),z=t(23780),D=t(28598);function E(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?E(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var W=function(e){var n,t,Z,w=e.cancelButtonText,O=e.contained,E=e.header,W=e.onCancel,B=e.onSaveSuccess,V=(0,z.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),M=(0,r.Z)(V,1)[0],A=(0,o.useState)(null),F=A[0],R=A[1],T=(0,o.useState)(!1),X=T[0],Y=T[1],Q=y.ZP.projects.list(),U=Q.data,q=Q.mutate,G=(0,o.useMemo)((function(){var e;return null===U||void 0===U||null===(e=U.projects)||void 0===e?void 0:e[0]}),[U]),J=G||{},K=J.name,$=J.openai_api_key,ee=J.project_uuid,ne=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){F||R(G)}),[G,F]);var te=(0,c.Db)(y.ZP.projects.useUpdate(K),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){var n,t=e.project;q(),R(t),Y(!1),(0,C.hY)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[h.d.LOCAL_TIMEZONE]),B&&(null===B||void 0===B||B(t))},onErrorCallback:function(e,n){return M({errors:n,response:e})}})}}),ie=(0,r.Z)(te,2),re=ie[0],oe=ie[1].isLoading,ce=(0,o.useCallback)((function(e){return re({project:e})}),[re]),le=(0,D.jsxs)(D.Fragment,{children:[E,(0,D.jsxs)(f.Z,{noPadding:!0,children:[(0,D.jsxs)(m.Z,{p:P.cd,children:[(0,D.jsx)(m.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Project name"})}),(0,D.jsx)(j.ZP,{default:!0,monospace:!0,children:K})]}),(0,D.jsx)(a.Z,{light:!0}),(0,D.jsxs)(m.Z,{p:P.cd,children:[(0,D.jsx)(m.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Project UUID"})}),(0,D.jsx)(j.ZP,{default:!!ee,monospace:!0,muted:!ee,children:ee||"Not required"})]}),(0,D.jsx)(a.Z,{light:!0}),(0,D.jsx)(m.Z,{p:P.cd,children:(0,D.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,D.jsxs)(d.Z,{flexDirection:"column",children:[(0,D.jsx)(m.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Help improve Mage"})}),(0,D.jsxs)(j.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,D.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,D.jsx)(m.Z,{mr:P.cd}),(0,D.jsx)(v.Z,{compact:!0,checked:null===F||void 0===F?void 0:F.help_improve_mage,onCheck:function(){return R((function(e){return L(L({},e),{},{help_improve_mage:!(null!==F&&void 0!==F&&F.help_improve_mage)})}))}})]})})]}),(0,D.jsx)(m.Z,{mt:P.HN}),(0,D.jsx)(g.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,D.jsx)(g.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===F||void 0===F||null===(n=F.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(Z=t.triggers)||void 0===Z||!Z.save_in_code_automatically),onCheck:function(e){return R((function(n){var t,i,r,o,c,l;return L(L({},n),{},{pipelines:L(L({},null===n||void 0===n?void 0:n.pipelines),{},{settings:L(L({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:L(L({},null===n||void 0===n||null===(i=n.pipelines)||void 0===i||null===(r=i.settings)||void 0===r?void 0:r.triggers),{},{save_in_code_automatically:e(null===n||void 0===n||null===(o=n.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,D.jsx)(m.Z,{mt:P.HN}),(0,D.jsx)(f.Z,{noPadding:!0,overflowVisible:!0,children:(0,D.jsxs)(m.Z,{p:P.cd,children:[(0,D.jsx)(m.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Features"})}),Object.entries((0,H.gR)(null===F||void 0===F?void 0:F.features,[h.d.GLOBAL_HOOKS])||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],c=t[1];return(0,D.jsx)(m.Z,{mt:0===n?0:1,children:(0,D.jsxs)(s.ZP,{alignItems:"center",children:[(0,D.jsx)(v.Z,{checked:!!c,compact:!0,onCheck:function(){return R((function(e){return L(L({},e),{},{features:L(L({},null===F||void 0===F?void 0:F.features),{},(0,i.Z)({},o,!c))})}))}}),(0,D.jsx)(m.Z,{mr:P.cd}),(0,D.jsxs)(d.Z,{children:[(0,D.jsx)(j.ZP,{default:!c,monospace:!0,children:(0,S.vg)(o)}),o===h.d.LOCAL_TIMEZONE&&(0,D.jsx)(m.Z,{ml:1,children:(0,D.jsx)(b.Z,L({},C.EB))})]})]})},o)}))]})}),(0,D.jsx)(m.Z,{mt:P.HN}),(0,D.jsx)(f.Z,{noPadding:!0,children:(0,D.jsxs)(m.Z,{p:P.cd,children:[(0,D.jsx)(m.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"OpenAI"})}),$&&!X?(0,D.jsxs)(s.ZP,L(L({},s.A0),{},{children:[(0,D.jsx)(j.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,D.jsx)(l.ZP,{iconOnly:!0,onClick:function(){return Y(!0)},secondary:!0,title:"Edit",children:(0,D.jsx)(k.I8,{size:I.bL})})]})):(0,D.jsx)(x.Z,{disabled:ne,label:ne?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return R((function(n){return L(L({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===F||void 0===F?void 0:F.openai_api_key)||""})]})}),(0,D.jsx)(m.Z,{mt:P.HN}),(0,D.jsxs)(s.ZP,{alignItems:"center",children:[(0,D.jsx)(l.ZP,{loading:oe,onClick:function(){ce({features:null===F||void 0===F?void 0:F.features,help_improve_mage:null===F||void 0===F?void 0:F.help_improve_mage,openai_api_key:null===F||void 0===F?void 0:F.openai_api_key,pipelines:null===F||void 0===F?void 0:F.pipelines})},primary:!0,children:"Save project settings"}),W&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(m.Z,{mr:P.cd}),(0,D.jsx)(l.ZP,{onClick:W,secondary:!0,children:w||"Cancel"})]})]})]});return O?(0,D.jsx)(_,{children:le}):le}},46568:function(e,n,t){"use strict";var i=t(82394),r=t(26304),o=(t(82684),t(33591)),c=t(28598),l=["children","fullHeight","gutter","style"];function a(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 d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,i=e.gutter,a=e.style,s=void 0===a?{}:a,u=(0,r.Z)(e,l),p=d({},s);return i&&(p.paddingLeft=i,p.paddingRight=p.paddingLeft),t&&(p.height="100%"),(0,c.jsx)(o.Col,d(d({},u),{},{style:p,children:n}))}},82682:function(e,n,t){"use strict";var i=t(82394),r=t(26304),o=t(82684),c=t(33591),l=t(28598),a=["children","fullHeight","gutter","justifyContent","style"];function d(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 s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,i=e.gutter,d=e.justifyContent,u=e.style,p=void 0===u?{}:u,f=(0,r.Z)(e,a),h=s({},p);return i&&(h.marginLeft=-1*i,h.marginRight=h.marginLeft),t&&(h.height="100%"),(0,l.jsx)(c.Row,s(s({},f),{},{justifyContent:d,style:h,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:i,key:n})}))}))}},88543:function(e,n,t){"use strict";t.d(n,{S:function(){return y},Z:function(){return Z}});var i=t(82684),r=t(15338),o=t(97618),c=t(55485),l=t(85854),a=t(65956),d=t(82394),s=t(44085),u=t(38276),p=t(30160),f=t(17488),h=t(69650),g=t(72473),m=t(8193),j=t(70515),x=t(28598);function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var y=function(e){var n,t=e.children,i=e.description,r=e.invalid,l=e.large,a=void 0===l||l,d=e.selectInput,v=e.textInput,y=e.title,Z=e.toggleSwitch,w=e.warning;return(0,x.jsx)(u.Z,{p:j.cd,children:(0,x.jsxs)(c.ZP,{alignItems:"center",children:[(0,x.jsxs)(c.ZP,{flexDirection:"column",children:[(0,x.jsxs)(p.ZP,{danger:r,default:!0,large:a,warning:w,children:[y," ",r&&(0,x.jsx)(p.ZP,{danger:!0,inline:!0,large:a,children:"is required"})]}),i&&"string"===typeof i&&(0,x.jsx)(p.ZP,{muted:!0,small:!0,children:i}),i&&"string"!==typeof i&&i]}),(0,x.jsx)(u.Z,{mr:j.cd}),(0,x.jsxs)(o.Z,{flex:1,justifyContent:"flex-end",children:[t,v&&(0,x.jsx)(f.Z,b({afterIcon:(0,x.jsx)(g.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:m.Z,alignRight:!0,autoComplete:"off",large:a,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},v)),d&&(0,x.jsx)(s.Z,b(b({},d),{},{afterIcon:(0,x.jsx)(g._M,{}),afterIconSize:m.Z,alignRight:!0,autoComplete:"off",large:a,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===d||void 0===d||null===(n=d.options)||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.value;return(0,x.jsx)("option",{value:t,children:n||t},t)}))})),Z&&(0,x.jsx)(h.Z,{checked:!(null===Z||void 0===Z||!Z.checked),compact:!0,onCheck:null===Z||void 0===Z?void 0:Z.onCheck})]})]})})},Z=function(e){var n=e.children,t=e.description,d=e.headerChildren,s=e.title;return(0,x.jsxs)(a.Z,{noPadding:!0,children:[(0,x.jsx)(u.Z,{p:j.cd,children:(0,x.jsxs)(c.ZP,{alignItems:"center",children:[(0,x.jsxs)(o.Z,{flex:1,flexDirection:"column",children:[(0,x.jsx)(l.Z,{level:4,children:s}),t&&"string"===typeof t&&(0,x.jsx)(u.Z,{mt:1,children:(0,x.jsx)(p.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),d]})}),i.Children.map(n,(function(e,n){return(0,x.jsxs)("div",{children:[(0,x.jsx)(r.Z,{light:!0}),e]},"".concat(s,"-").concat(n))}))]})}},8193:function(e,n,t){"use strict";t.d(n,{N:function(){return a},Z:function(){return l}});var i=t(38626),r=t(44897),o=t(42631),c=t(70515),l=2*c.iI,a=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],o.n_,c.cd*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))},65956:function(e,n,t){"use strict";var i=t(38626),r=t(55485),o=t(38276),c=t(30160),l=t(44897),a=t(42631),d=t(47041),s=t(70515),u=t(28598),p=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),f=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],a.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||l.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||l.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],a.n_,a.n_,(function(e){return"\n background-color: ".concat((e.theme.background||l.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),g=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,d.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],a.M8,a.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,i=e.containerRef,l=e.contentContainerRef,a=e.dark,d=e.footer,s=e.fullHeight,p=void 0===s||s,j=e.fullWidth,x=void 0===j||j,v=e.header,b=e.headerHeight,y=e.headerIcon,Z=e.headerPaddingVertical,w=e.headerTitle,O=e.maxHeight,P=e.maxWidth,_=e.minWidth,k=e.noPadding,I=e.overflowVisible,C=e.subtitle,S=e.success;return(0,u.jsxs)(f,{borderless:n,dark:a,fullHeight:p,fullWidth:x,maxHeight:O,maxWidth:P,minWidth:_,overflowVisible:I,ref:i,success:S,children:[(v||w)&&(0,u.jsxs)(h,{headerPaddingVertical:Z,height:b,children:[v&&v,w&&(0,u.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,u.jsxs)(r.ZP,{alignItems:"center",children:[y&&y,(0,u.jsx)(o.Z,{ml:y?1:0,children:(0,u.jsx)(c.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,u.jsxs)(g,{maxHeight:O,noPadding:k,overflowVisible:I,ref:l,children:[C&&"string"===typeof C&&(0,u.jsx)(o.Z,{mb:2,children:(0,u.jsx)(c.ZP,{default:!0,children:C})}),C&&"string"!==typeof C&&C,t]}),d&&(0,u.jsx)(m,{children:d})]})}},85854:function(e,n,t){"use strict";var i,r,o,c,l,a,d,s,u=t(82394),p=t(26304),f=t(26653),h=t(38626),g=t(33591),m=t(44897),j=t(95363),x=t(61896),v=t(30160),b=t(70515),y=t(38276),Z=t(28598),w=["children","condensed","inline","level","marketing","spacingBelow"];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 P(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,u.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 _=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," "," ",""],v.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||m.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(j.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(j.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(j.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(j.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(j.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(j.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(j.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(j.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(j.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "}),(function(e){return e.strikethrough&&"\n text-decoration: line-through;\n "})),k=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||m.Z.content).active,";\n ")})),I=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,g.media.md(i||(i=(0,f.Z)(["\n ","\n "])),x.aQ),g.media.lg(r||(r=(0,f.Z)(["\n ","\n "])),x.aQ),g.media.xl(o||(o=(0,f.Z)(["\n ","\n "])),x.aQ)),C=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,x.MJ),S=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,g.media.xs(c||(c=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),g.media.sm(l||(l=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),g.media.md(a||(a=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),g.media.lg(d||(d=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),g.media.xl(s||(s=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI)),H=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,x.BL),N=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),z=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),D=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),E=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(x.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(x.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),L=function(e){var n,t=e.children,i=e.condensed,r=e.inline,o=e.level,c=e.marketing,l=e.spacingBelow,a=(0,p.Z)(e,w);r?n=E:0===Number(o)?n=I:1===Number(o)?n=c?S:C:2===Number(o)?n=H:3===Number(o)?n=N:4===Number(o)?n=z:5===Number(o)&&(n=D);var d=(0,Z.jsxs)(n,P(P({},a),{},{level:o,children:[l&&(0,Z.jsx)(y.Z,{mb:i?2:3,children:t}),!l&&t]}));return r?d:(0,Z.jsx)(k,{children:d})};L.defaultProps={level:3,weightStyle:6},n.Z=L},61316:function(e,n,t){"use strict";t.r(n);var i=t(77837),r=t(38860),o=t.n(r),c=t(46568),l=t(55729),a=t(93808),d=t(82682),s=t(28274),u=t(38276),p=t(70515),f=t(24755),h=t(28598);function g(){return(0,h.jsx)(s.Z,{uuidItemSelected:f.HY,uuidWorkspaceSelected:f.WH,children:(0,h.jsx)(u.Z,{p:p.cd,children:(0,h.jsx)(d.Z,{justifyContent:"center",children:(0,h.jsx)(c.Z,{xl:8,xxl:6,children:(0,h.jsx)(l.Z,{})})})})})}g.getInitialProps=(0,i.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)}))),n.default=(0,a.Z)(g)},33323:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return t(61316)}])}},function(e){e.O(0,[2678,1154,844,4267,6990,8487,8264,8432,9774,2888,179],(function(){return n=33323,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6875],{2591:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(93808),o=u(17022),a=u(28598);function c(n){var r=n.slug;return(0,a.jsx)(o.Z,{slug:r})}c.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null===u||void 0===u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,i.Z)(c)},44981:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/roles/[...slug]",function(){return u(2591)}])}},function(n){n.O(0,[2678,1154,844,4267,600,8487,8264,7858,5499,8432,7022,9774,2888,179],(function(){return r=44981,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6875],{2591:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(93808),o=u(17022),a=u(28598);function c(n){var r=n.slug;return(0,a.jsx)(o.Z,{slug:r})}c.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null===u||void 0===u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,i.Z)(c)},44981:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/roles/[...slug]",function(){return u(2591)}])}},function(n){n.O(0,[2678,1154,844,4267,6990,8487,8264,7858,5499,8432,7022,9774,2888,179],(function(){return r=44981,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2344],{53795:function(e,n,r){"use strict";r.r(n);var s=r(77837),t=r(75582),o=r(38860),i=r.n(o),u=r(21764),c=r(82684),l=r(69864),d=r(34376),a=r(71180),p=r(15338),f=r(55485),h=r(48670),m=r(63637),x=r(93808),j=r(17022),w=r(28274),Z=r(38276),v=r(75499),k=r(30160),b=r(12468),g=r(35686),_=r(70515),P=r(24755),C=r(3917),I=r(76417),T=r(72619),A=r(3314),O=r(28598);function E(){var e=(0,d.useRouter)(),n=(0,c.useState)(!1),r=n[0],s=n[1],o=g.ZP.roles.list().data,i=(0,c.useMemo)((function(){return(null===o||void 0===o?void 0:o.roles)||[]}),[o]),x=[{bold:!r,label:function(){return"Roles"}}];r?(x[0].onClick=function(){return s(!1)},x.push({bold:!0,label:function(){return"New role"}})):x[0].linkProps={href:"/settings/workspace/roles"};var E=(0,l.Db)(g.ZP.seeds.useCreate(),{onSuccess:function(e){return(0,T.wD)(e,{callback:function(){u.Am.success("Roles and permissions successfully created.",{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:"seed-create-success"})},onErrorCallback:function(e){var n=e.error,r=n.errors,s=n.exception,t=n.message,o=n.type;u.Am.error((null===r||void 0===r?void 0:r.error)||s||t,{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),N=(0,t.Z)(E,2),R=N[0],S=N[1].isLoading;return(0,O.jsxs)(w.Z,{appendBreadcrumbs:!0,breadcrumbs:x,title:"Roles",uuidItemSelected:P.B2.ROLES,uuidWorkspaceSelected:P.Pl.USER_MANAGEMENT,children:[r&&(0,O.jsx)(j.Z,{contained:!0,onCancel:function(){return s(!1)}}),!r&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Z.Z,{p:_.cd,children:(0,O.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(m.Z,{}),onClick:function(){return s(!0)},primary:!0,children:"Add new role"}),(0,O.jsx)(Z.Z,{mr:_.cd}),(0,O.jsx)(b.Z,{appearBefore:!0,fullSize:!0,description:(0,O.jsxs)(k.ZP,{default:!0,children:["This will create 6 roles and 100s of permissions",(0,O.jsx)("br",{}),"that Mage normally uses when user defined",(0,O.jsx)("br",{}),"permissions isn\u2019t turned on."]}),lightBackground:!0,widthFitContent:!0,children:(0,O.jsx)(a.ZP,{compact:!0,loading:S,onClick:function(){return R({seed:{permissions:!0,roles:!0}})},secondary:!0,small:!0,children:"Create default roles and permissions"})})]})}),(0,O.jsx)(p.Z,{light:!0}),(0,O.jsx)(v.Z,{columnFlex:[1,1,1,null],columns:[{uuid:"Role"},{uuid:"Created by"},{uuid:"Last updated"},{rightAligned:!0,uuid:"Created at"}],onClickRow:function(n){var r,s=null===(r=i[n])||void 0===r?void 0:r.id;e.push("/settings/workspace/roles/".concat(s))},rows:null===i||void 0===i?void 0:i.map((function(n){var r=n.created_at,s=(n.id,n.name),t=n.updated_at,o=n.user;return[(0,O.jsx)(k.ZP,{children:s},"name"),o?(0,O.jsx)(h.Z,{default:!0,onClick:function(n){(0,A.j)(n),e.push("/settings/workspace/users/".concat(null===o||void 0===o?void 0:o.id))},children:(0,I.s)(o)}):(0,O.jsx)("div",{},"user"),(0,O.jsx)(k.ZP,{monospace:!0,default:!0,children:t&&(0,C.d$)(t)},"updatedAt"),(0,O.jsx)(k.ZP,{monospace:!0,default:!0,rightAligned:!0,children:r&&(0,C.d$)(r)},"createdAt")]})),uuid:"roles"})]})]})}E.getInitialProps=(0,s.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)}))),n.default=(0,x.Z)(E)},8619:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/roles",function(){return r(53795)}])}},function(e){e.O(0,[2678,1154,844,4267,600,8487,8264,7858,5499,8432,7022,9774,2888,179],(function(){return n=8619,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2344],{53795:function(e,n,r){"use strict";r.r(n);var s=r(77837),t=r(75582),o=r(38860),i=r.n(o),u=r(21764),c=r(82684),l=r(69864),d=r(34376),a=r(71180),p=r(15338),f=r(55485),h=r(48670),m=r(63637),x=r(93808),j=r(17022),w=r(28274),Z=r(38276),v=r(75499),k=r(30160),b=r(12468),g=r(35686),_=r(70515),P=r(24755),C=r(3917),I=r(76417),T=r(72619),A=r(3314),O=r(28598);function E(){var e=(0,d.useRouter)(),n=(0,c.useState)(!1),r=n[0],s=n[1],o=g.ZP.roles.list().data,i=(0,c.useMemo)((function(){return(null===o||void 0===o?void 0:o.roles)||[]}),[o]),x=[{bold:!r,label:function(){return"Roles"}}];r?(x[0].onClick=function(){return s(!1)},x.push({bold:!0,label:function(){return"New role"}})):x[0].linkProps={href:"/settings/workspace/roles"};var E=(0,l.Db)(g.ZP.seeds.useCreate(),{onSuccess:function(e){return(0,T.wD)(e,{callback:function(){u.Am.success("Roles and permissions successfully created.",{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:"seed-create-success"})},onErrorCallback:function(e){var n=e.error,r=n.errors,s=n.exception,t=n.message,o=n.type;u.Am.error((null===r||void 0===r?void 0:r.error)||s||t,{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),N=(0,t.Z)(E,2),R=N[0],S=N[1].isLoading;return(0,O.jsxs)(w.Z,{appendBreadcrumbs:!0,breadcrumbs:x,title:"Roles",uuidItemSelected:P.B2.ROLES,uuidWorkspaceSelected:P.Pl.USER_MANAGEMENT,children:[r&&(0,O.jsx)(j.Z,{contained:!0,onCancel:function(){return s(!1)}}),!r&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Z.Z,{p:_.cd,children:(0,O.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(m.Z,{}),onClick:function(){return s(!0)},primary:!0,children:"Add new role"}),(0,O.jsx)(Z.Z,{mr:_.cd}),(0,O.jsx)(b.Z,{appearBefore:!0,fullSize:!0,description:(0,O.jsxs)(k.ZP,{default:!0,children:["This will create 6 roles and 100s of permissions",(0,O.jsx)("br",{}),"that Mage normally uses when user defined",(0,O.jsx)("br",{}),"permissions isn\u2019t turned on."]}),lightBackground:!0,widthFitContent:!0,children:(0,O.jsx)(a.ZP,{compact:!0,loading:S,onClick:function(){return R({seed:{permissions:!0,roles:!0}})},secondary:!0,small:!0,children:"Create default roles and permissions"})})]})}),(0,O.jsx)(p.Z,{light:!0}),(0,O.jsx)(v.Z,{columnFlex:[1,1,1,null],columns:[{uuid:"Role"},{uuid:"Created by"},{uuid:"Last updated"},{rightAligned:!0,uuid:"Created at"}],onClickRow:function(n){var r,s=null===(r=i[n])||void 0===r?void 0:r.id;e.push("/settings/workspace/roles/".concat(s))},rows:null===i||void 0===i?void 0:i.map((function(n){var r=n.created_at,s=(n.id,n.name),t=n.updated_at,o=n.user;return[(0,O.jsx)(k.ZP,{children:s},"name"),o?(0,O.jsx)(h.Z,{default:!0,onClick:function(n){(0,A.j)(n),e.push("/settings/workspace/users/".concat(null===o||void 0===o?void 0:o.id))},children:(0,I.s)(o)}):(0,O.jsx)("div",{},"user"),(0,O.jsx)(k.ZP,{monospace:!0,default:!0,children:t&&(0,C.d$)(t)},"updatedAt"),(0,O.jsx)(k.ZP,{monospace:!0,default:!0,rightAligned:!0,children:r&&(0,C.d$)(r)},"createdAt")]})),uuid:"roles"})]})]})}E.getInitialProps=(0,s.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)}))),n.default=(0,x.Z)(E)},8619:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/roles",function(){return r(53795)}])}},function(e){e.O(0,[2678,1154,844,4267,6990,8487,8264,7858,5499,8432,7022,9774,2888,179],(function(){return n=8619,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2403],{85854:function(e,n,t){"use strict";var i,r,o,l,s,c,a,u,d=t(82394),h=t(26304),p=t(26653),m=t(38626),f=t(33591),y=t(44897),b=t(95363),g=t(61896),j=t(30160),x=t(70515),v=t(38276),_=t(28598),Z=["children","condensed","inline","level","marketing","spacingBelow"];function w(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 O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var S=(0,m.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," "," ",""],j.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||y.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "}),(function(e){return e.strikethrough&&"\n text-decoration: line-through;\n "})),k=m.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||y.Z.content).active,";\n ")})),P=m.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],S,f.media.md(i||(i=(0,p.Z)(["\n ","\n "])),g.aQ),f.media.lg(r||(r=(0,p.Z)(["\n ","\n "])),g.aQ),f.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),g.aQ)),C=m.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],S,g.MJ),I=m.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],S,f.media.xs(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),f.media.sm(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),f.media.md(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),f.media.lg(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),f.media.xl(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI)),N=m.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],S,g.BL),H=m.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],S),T=m.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],S),M=m.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],S),z=m.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],S,(function(e){return 1===e.level&&"\n ".concat(g.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(g.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),q=function(e){var n,t=e.children,i=e.condensed,r=e.inline,o=e.level,l=e.marketing,s=e.spacingBelow,c=(0,h.Z)(e,Z);r?n=z:0===Number(o)?n=P:1===Number(o)?n=l?I:C:2===Number(o)?n=N:3===Number(o)?n=H:4===Number(o)?n=T:5===Number(o)&&(n=M);var a=(0,_.jsxs)(n,O(O({},c),{},{level:o,children:[s&&(0,_.jsx)(v.Z,{mb:i?2:3,children:t}),!s&&t]}));return r?a:(0,_.jsx)(k,{children:a})};q.defaultProps={level:3,weightStyle:6},n.Z=q},60480:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return E}});var i,r=t(77837),o=t(82394),l=t(75582),s=t(38860),c=t.n(s),a=t(82684),u=t(12691),d=t.n(u),h=t(21764),p=t(69864),m=t(71180),f=t(70652),y=t(50724),b=t(82555),g=t(55485),j=t(85854),x=t(48670),v=t(93808),_=t(44085),Z=t(28274),w=t(38276);!function(e){e.SSH="ssh",e.HTTPS="https"}(i||(i={}));var O=[{autoComplete:"remote_repo_link",label:"Remote repo url",required:!0,uuid:"remote_repo_link"},{autoComplete:"repo_path",label:"Local directory path",labelDescription:"Defaults to Python's os.getcwd() if omitted. Mage will create this local directory if it doesn't already exist.",uuid:"repo_path"}],S=[{autoComplete:"username",label:"Username",uuid:"username"},{autoComplete:"email",label:"Email",uuid:"email"},{autoComplete:"ssh_public_key",label:"SSH public key in base64",type:"password",uuid:"ssh_public_key"},{autoComplete:"ssh_private_key",label:"SSH private key in base64",type:"password",uuid:"ssh_private_key"}],k=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",label:"Email",required:!0,uuid:"email"},{autoComplete:"access_token",label:"Access token",labelDescription:"Add your Git access token to authenticate with your provided username. The access token will be stored as a Mage secret.",required:!0,type:"password",uuid:"access_token"}],P=[{autoComplete:"branch",label:"Branch name",required:!0,uuid:"branch"}],C=t(30160),I=t(17488),N=t(35686),H=t(70515),T=t(24755),M=t(72619),z=t(28598);function q(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 D(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function A(){var e=N.ZP.syncs.list().data,n=(0,a.useState)(null),t=n[0],r=n[1],s=(0,a.useState)(null),c=s[0],u=s[1],v=(0,a.useState)(null),q=v[0],A=v[1],E=(0,a.useState)(null),G=E[0],B=E[1];(0,a.useEffect)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];u(null===t||void 0===t?void 0:t.user_git_settings),r(t),B(!(null===t||void 0===t||!t.branch))}}),[e]);var R=(0,a.useMemo)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];return!(null===t||void 0===t||!t.branch)}return!1}),[e]),F=(0,p.Db)(N.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,M.wD)(e,{callback:function(e){var n=e.sync;n&&(r(n),window.location.reload(),h.Am.success("Sync saved",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"}))},onErrorCallback:function(e,n){return A({errors:n,response:e})}})}}),L=(0,l.Z)(F,2),U=L[0],W=L[1].isLoading,X=(0,p.Db)(N.ZP.syncs.useUpdate("git"),{onSuccess:function(e){return(0,M.wD)(e,{callback:function(e){e.sync&&h.Am.success("Success!",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"})},onErrorCallback:function(e,n){return A({errors:n,response:e})}})}}),Q=(0,l.Z)(X,2),J=Q[0],Y=Q[1].isLoading,K=(0,a.useMemo)((function(){return(null===t||void 0===t?void 0:t.auth_type)||i.SSH}),[null===t||void 0===t?void 0:t.auth_type]),V=(0,a.useMemo)((function(){return K===i.HTTPS?k:S}),[K]),$=N.ZP.statuses.list().data,ee=(0,a.useMemo)((function(){var e,n;return null===$||void 0===$||null===(e=$.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.require_user_authentication}),[$]),ne=(0,a.useMemo)((function(){var e=r,n=t;return!G&&ee&&(e=u,n=c),(0,z.jsx)("form",{children:V.map((function(t){var i,r,l=t.autoComplete,s=t.disabled,c=t.label,a=t.labelDescription,u=t.required,d=t.type,p=t.uuid;return r="ssh_public_key"===p?(0,z.jsx)(w.Z,{mb:1,children:(0,z.jsxs)(C.ZP,{small:!0,children:["Run ",(0,z.jsx)(x.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n | echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n | echo"})," in terminal to get base64 encoded public key and paste the result here. The key will be stored as a Mage secret."]})}):"ssh_private_key"===p?(0,z.jsx)(w.Z,{mb:1,children:(0,z.jsxs)(C.ZP,{small:!0,children:["Follow same steps as the public key, but run ",(0,z.jsx)(x.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"})," instead. The key will be stored as a Mage secret."]})}):a&&(0,z.jsx)(w.Z,{mb:1,children:(0,z.jsx)(C.ZP,{small:!0,children:a})}),(0,z.jsxs)(w.Z,{mt:2,children:[r,(0,z.jsx)(I.Z,{autoComplete:l,disabled:s,label:c,onChange:function(n){e((function(e){return D(D({},e),{},(0,o.Z)({},p,n.target.value))}))},primary:!0,required:u,setContentOnMount:!0,type:d,value:(null===(i=n)||void 0===i?void 0:i[p])||""})]},p)}))})}),[V,ee,u,r,G,t,c]);return(0,z.jsx)(Z.Z,{uuidItemSelected:T.fF,uuidWorkspaceSelected:T.WH,children:(0,z.jsxs)(w.Z,{p:H.cd,style:{width:"600px"},children:[(0,z.jsx)(j.Z,{children:"Git repository settings"}),(0,z.jsxs)(C.ZP,{children:["If you are using Github and want to use a more feature rich integration, you can check out the ",(0,z.jsx)(d(),{as:"/version-control",href:"/version-control",children:(0,z.jsx)(x.Z,{inline:!0,children:"version control app"})}),"."]}),(0,z.jsx)(x.Z,{}),(0,z.jsx)(w.Z,{mt:1,children:(0,z.jsx)(C.ZP,{bold:!0,children:"Authentication type"})}),(0,z.jsx)(w.Z,{mt:1,children:(0,z.jsx)(_.Z,{compact:!0,label:"Authentication type",onChange:function(e){var n=e.target.value;r((function(e){return D(D({},e),{},{auth_type:n})}))},value:K,children:Object.entries(i).map((function(e){var n=(0,l.Z)(e,2),t=n[0],i=n[1];return(0,z.jsx)("option",{value:i,children:t},i)}))})}),(0,z.jsx)(w.Z,{mt:H.Mq,children:K===i.SSH&&(0,z.jsxs)(C.ZP,{bold:!0,children:["You will need to ",(0,z.jsx)(x.Z,{href:"https://docs.mage.ai/development/git/configure#generate-ssh-token",openNewWindow:!0,children:"set up your SSH key"})," if you have not done so already."]})}),(0,z.jsx)("form",{children:O.map((function(e){var n=e.autoComplete,i=e.disabled,l=e.label,s=e.labelDescription,c=e.required,a=e.type,u=e.uuid;return(0,z.jsxs)(w.Z,{mt:2,children:[s&&(0,z.jsx)(w.Z,{mb:1,children:(0,z.jsx)(C.ZP,{small:!0,children:s})}),(0,z.jsx)(I.Z,{autoComplete:n,disabled:i,label:l,onChange:function(e){r((function(n){return D(D({},n),{},(0,o.Z)({},u,e.target.value))}))},primary:!0,required:c,setContentOnMount:!0,type:a,value:(null===t||void 0===t?void 0:t[u])||""})]},u)}))}),(0,z.jsx)(w.Z,{mt:H.Mq,children:(0,z.jsxs)(g.ZP,{alignItems:"center",children:[(0,z.jsx)(w.Z,{mr:1,children:(0,z.jsx)(f.Z,{checked:!!G,onClick:function(){return B((function(e){var n=!e;return n||r((function(e){return D(D({},e),{},{branch:null,sync_on_pipeline_run:!1,sync_on_start:!1})})),n}))}})}),(0,z.jsxs)(C.ZP,{bold:!0,children:["Use ",(0,z.jsx)(x.Z,{bold:!0,href:"https://docs.mage.ai/production/data-sync/git-sync",openNewWindow:!0,children:"One-way git sync"})," (Click link for more info)"]})]})}),G?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(w.Z,{mt:H.Mq,children:(0,z.jsx)(C.ZP,{bold:!0,children:"Sync with a specified branch. These settings will be saved at the project level."})}),(0,z.jsx)("form",{children:P.map((function(e){var n=e.autoComplete,i=e.disabled,l=e.label,s=e.required,c=e.type,a=e.uuid;return(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(I.Z,{autoComplete:n,disabled:i,label:l,onChange:function(e){r((function(n){return D(D({},n),{},(0,o.Z)({},a,e.target.value))}))},primary:!0,required:s,setContentOnMount:!0,type:c,value:(null===t||void 0===t?void 0:t[a])||""})},a)}))}),(0,z.jsx)(g.ZP,{alignItems:"center",children:(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(f.Z,{checked:null===t||void 0===t?void 0:t.sync_submodules,label:"Include submodules",onClick:function(){r((function(e){return D(D({},e),{},{sync_submodules:!(null!==t&&void 0!==t&&t.sync_submodules)})}))}})})}),(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(j.Z,{level:5,children:"Additional sync settings"})}),(0,z.jsx)(g.ZP,{alignItems:"center",children:(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(f.Z,{checked:null===t||void 0===t?void 0:t.sync_on_pipeline_run,label:"Sync before each trigger run",onClick:function(){r((function(e){return D(D({},e),{},{sync_on_pipeline_run:!(null!==t&&void 0!==t&&t.sync_on_pipeline_run)})}))}})})}),(0,z.jsx)(g.ZP,{alignItems:"center",children:(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(f.Z,{checked:null===t||void 0===t?void 0:t.sync_on_start,label:"Sync on server start up",onClick:function(){r((function(e){return D(D({},e),{},{sync_on_start:!(null!==t&&void 0!==t&&t.sync_on_start)})}))}})})}),(0,z.jsx)(w.Z,{mt:H.Mq,children:(0,z.jsx)(C.ZP,{bold:!0,children:"Configure the Git authentication credentials that will be used to sync with the specified Git repository."})}),ne]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(w.Z,{mt:H.Mq,children:(0,z.jsx)(C.ZP,{bold:!0,children:"These fields are required to help Mage configure your Git settings. These settings will be specific to your user."})}),ne]}),(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(m.ZP,{loading:W,onClick:function(){return U({sync:D(D({},t),{},{user_git_settings:c})})},primary:!0,children:"Save repository settings"})}),q&&(0,z.jsx)(y.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===A||void 0===A?void 0:A(null)},children:(0,z.jsx)(b.Z,D(D({},q),{},{onClose:function(){return null===A||void 0===A?void 0:A(null)}}))}),R&&(0,z.jsxs)(w.Z,{mt:H.HN,children:[(0,z.jsx)(j.Z,{children:"Synchronize code from remote repository"}),(0,z.jsxs)(w.Z,{mt:1,children:[(0,z.jsxs)(C.ZP,{children:["Running the sync from this page will run a one time sync with the remote repository.",(0,z.jsx)("br",{}),"This may ",(0,z.jsx)(C.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," your existing data, so make sure you\u2019ve committed or backed up your current changes."]}),(0,z.jsx)(w.Z,{mt:2}),(0,z.jsxs)(C.ZP,{children:["Reset will tell Mage to try to clone your repository from remote. This will also ",(0,z.jsx)(C.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," all your local changes and reset any settings you may have configured for your local Git repo. This may be helpful if you are having issues syncing your repository."]})]}),(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsxs)(g.ZP,{children:[(0,z.jsx)(m.ZP,{loading:Y,onClick:function(){return J({sync:{action_type:"sync_data"}})},warning:!0,children:"Synchronize code"}),(0,z.jsx)(w.Z,{ml:2}),(0,z.jsx)(m.ZP,{danger:!0,loading:Y,onClick:function(){return J({sync:{action_type:"reset"}})},children:"Reset repository"})]})})]})]})})}A.getInitialProps=(0,r.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 E=(0,v.Z)(A)},37056:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/sync-data",function(){return t(60480)}])}},function(e){e.O(0,[2678,1154,844,4267,600,8487,8264,8432,9774,2888,179],(function(){return n=37056,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2403],{85854:function(e,n,t){"use strict";var i,r,o,l,s,c,a,u,d=t(82394),h=t(26304),p=t(26653),m=t(38626),f=t(33591),y=t(44897),b=t(95363),g=t(61896),j=t(30160),x=t(70515),v=t(38276),_=t(28598),Z=["children","condensed","inline","level","marketing","spacingBelow"];function w(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 O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var S=(0,m.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," "," ",""],j.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||y.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "}),(function(e){return e.strikethrough&&"\n text-decoration: line-through;\n "})),k=m.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||y.Z.content).active,";\n ")})),P=m.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],S,f.media.md(i||(i=(0,p.Z)(["\n ","\n "])),g.aQ),f.media.lg(r||(r=(0,p.Z)(["\n ","\n "])),g.aQ),f.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),g.aQ)),C=m.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],S,g.MJ),I=m.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],S,f.media.xs(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),f.media.sm(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),f.media.md(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),f.media.lg(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),f.media.xl(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI)),N=m.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],S,g.BL),H=m.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],S),T=m.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],S),M=m.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],S),z=m.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],S,(function(e){return 1===e.level&&"\n ".concat(g.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(g.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),q=function(e){var n,t=e.children,i=e.condensed,r=e.inline,o=e.level,l=e.marketing,s=e.spacingBelow,c=(0,h.Z)(e,Z);r?n=z:0===Number(o)?n=P:1===Number(o)?n=l?I:C:2===Number(o)?n=N:3===Number(o)?n=H:4===Number(o)?n=T:5===Number(o)&&(n=M);var a=(0,_.jsxs)(n,O(O({},c),{},{level:o,children:[s&&(0,_.jsx)(v.Z,{mb:i?2:3,children:t}),!s&&t]}));return r?a:(0,_.jsx)(k,{children:a})};q.defaultProps={level:3,weightStyle:6},n.Z=q},60480:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return E}});var i,r=t(77837),o=t(82394),l=t(75582),s=t(38860),c=t.n(s),a=t(82684),u=t(12691),d=t.n(u),h=t(21764),p=t(69864),m=t(71180),f=t(70652),y=t(50724),b=t(82555),g=t(55485),j=t(85854),x=t(48670),v=t(93808),_=t(44085),Z=t(28274),w=t(38276);!function(e){e.SSH="ssh",e.HTTPS="https"}(i||(i={}));var O=[{autoComplete:"remote_repo_link",label:"Remote repo url",required:!0,uuid:"remote_repo_link"},{autoComplete:"repo_path",label:"Local directory path",labelDescription:"Defaults to Python's os.getcwd() if omitted. Mage will create this local directory if it doesn't already exist.",uuid:"repo_path"}],S=[{autoComplete:"username",label:"Username",uuid:"username"},{autoComplete:"email",label:"Email",uuid:"email"},{autoComplete:"ssh_public_key",label:"SSH public key in base64",type:"password",uuid:"ssh_public_key"},{autoComplete:"ssh_private_key",label:"SSH private key in base64",type:"password",uuid:"ssh_private_key"}],k=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",label:"Email",required:!0,uuid:"email"},{autoComplete:"access_token",label:"Access token",labelDescription:"Add your Git access token to authenticate with your provided username. The access token will be stored as a Mage secret.",required:!0,type:"password",uuid:"access_token"}],P=[{autoComplete:"branch",label:"Branch name",required:!0,uuid:"branch"}],C=t(30160),I=t(17488),N=t(35686),H=t(70515),T=t(24755),M=t(72619),z=t(28598);function q(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 D(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function A(){var e=N.ZP.syncs.list().data,n=(0,a.useState)(null),t=n[0],r=n[1],s=(0,a.useState)(null),c=s[0],u=s[1],v=(0,a.useState)(null),q=v[0],A=v[1],E=(0,a.useState)(null),G=E[0],B=E[1];(0,a.useEffect)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];u(null===t||void 0===t?void 0:t.user_git_settings),r(t),B(!(null===t||void 0===t||!t.branch))}}),[e]);var R=(0,a.useMemo)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];return!(null===t||void 0===t||!t.branch)}return!1}),[e]),F=(0,p.Db)(N.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,M.wD)(e,{callback:function(e){var n=e.sync;n&&(r(n),window.location.reload(),h.Am.success("Sync saved",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"}))},onErrorCallback:function(e,n){return A({errors:n,response:e})}})}}),L=(0,l.Z)(F,2),U=L[0],W=L[1].isLoading,X=(0,p.Db)(N.ZP.syncs.useUpdate("git"),{onSuccess:function(e){return(0,M.wD)(e,{callback:function(e){e.sync&&h.Am.success("Success!",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"})},onErrorCallback:function(e,n){return A({errors:n,response:e})}})}}),Q=(0,l.Z)(X,2),J=Q[0],Y=Q[1].isLoading,K=(0,a.useMemo)((function(){return(null===t||void 0===t?void 0:t.auth_type)||i.SSH}),[null===t||void 0===t?void 0:t.auth_type]),V=(0,a.useMemo)((function(){return K===i.HTTPS?k:S}),[K]),$=N.ZP.statuses.list().data,ee=(0,a.useMemo)((function(){var e,n;return null===$||void 0===$||null===(e=$.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.require_user_authentication}),[$]),ne=(0,a.useMemo)((function(){var e=r,n=t;return!G&&ee&&(e=u,n=c),(0,z.jsx)("form",{children:V.map((function(t){var i,r,l=t.autoComplete,s=t.disabled,c=t.label,a=t.labelDescription,u=t.required,d=t.type,p=t.uuid;return r="ssh_public_key"===p?(0,z.jsx)(w.Z,{mb:1,children:(0,z.jsxs)(C.ZP,{small:!0,children:["Run ",(0,z.jsx)(x.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n | echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n | echo"})," in terminal to get base64 encoded public key and paste the result here. The key will be stored as a Mage secret."]})}):"ssh_private_key"===p?(0,z.jsx)(w.Z,{mb:1,children:(0,z.jsxs)(C.ZP,{small:!0,children:["Follow same steps as the public key, but run ",(0,z.jsx)(x.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"})," instead. The key will be stored as a Mage secret."]})}):a&&(0,z.jsx)(w.Z,{mb:1,children:(0,z.jsx)(C.ZP,{small:!0,children:a})}),(0,z.jsxs)(w.Z,{mt:2,children:[r,(0,z.jsx)(I.Z,{autoComplete:l,disabled:s,label:c,onChange:function(n){e((function(e){return D(D({},e),{},(0,o.Z)({},p,n.target.value))}))},primary:!0,required:u,setContentOnMount:!0,type:d,value:(null===(i=n)||void 0===i?void 0:i[p])||""})]},p)}))})}),[V,ee,u,r,G,t,c]);return(0,z.jsx)(Z.Z,{uuidItemSelected:T.fF,uuidWorkspaceSelected:T.WH,children:(0,z.jsxs)(w.Z,{p:H.cd,style:{width:"600px"},children:[(0,z.jsx)(j.Z,{children:"Git repository settings"}),(0,z.jsxs)(C.ZP,{children:["If you are using Github and want to use a more feature rich integration, you can check out the ",(0,z.jsx)(d(),{as:"/version-control",href:"/version-control",children:(0,z.jsx)(x.Z,{inline:!0,children:"version control app"})}),"."]}),(0,z.jsx)(x.Z,{}),(0,z.jsx)(w.Z,{mt:1,children:(0,z.jsx)(C.ZP,{bold:!0,children:"Authentication type"})}),(0,z.jsx)(w.Z,{mt:1,children:(0,z.jsx)(_.Z,{compact:!0,label:"Authentication type",onChange:function(e){var n=e.target.value;r((function(e){return D(D({},e),{},{auth_type:n})}))},value:K,children:Object.entries(i).map((function(e){var n=(0,l.Z)(e,2),t=n[0],i=n[1];return(0,z.jsx)("option",{value:i,children:t},i)}))})}),(0,z.jsx)(w.Z,{mt:H.Mq,children:K===i.SSH&&(0,z.jsxs)(C.ZP,{bold:!0,children:["You will need to ",(0,z.jsx)(x.Z,{href:"https://docs.mage.ai/development/git/configure#generate-ssh-token",openNewWindow:!0,children:"set up your SSH key"})," if you have not done so already."]})}),(0,z.jsx)("form",{children:O.map((function(e){var n=e.autoComplete,i=e.disabled,l=e.label,s=e.labelDescription,c=e.required,a=e.type,u=e.uuid;return(0,z.jsxs)(w.Z,{mt:2,children:[s&&(0,z.jsx)(w.Z,{mb:1,children:(0,z.jsx)(C.ZP,{small:!0,children:s})}),(0,z.jsx)(I.Z,{autoComplete:n,disabled:i,label:l,onChange:function(e){r((function(n){return D(D({},n),{},(0,o.Z)({},u,e.target.value))}))},primary:!0,required:c,setContentOnMount:!0,type:a,value:(null===t||void 0===t?void 0:t[u])||""})]},u)}))}),(0,z.jsx)(w.Z,{mt:H.Mq,children:(0,z.jsxs)(g.ZP,{alignItems:"center",children:[(0,z.jsx)(w.Z,{mr:1,children:(0,z.jsx)(f.Z,{checked:!!G,onClick:function(){return B((function(e){var n=!e;return n||r((function(e){return D(D({},e),{},{branch:null,sync_on_pipeline_run:!1,sync_on_start:!1})})),n}))}})}),(0,z.jsxs)(C.ZP,{bold:!0,children:["Use ",(0,z.jsx)(x.Z,{bold:!0,href:"https://docs.mage.ai/production/data-sync/git-sync",openNewWindow:!0,children:"One-way git sync"})," (Click link for more info)"]})]})}),G?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(w.Z,{mt:H.Mq,children:(0,z.jsx)(C.ZP,{bold:!0,children:"Sync with a specified branch. These settings will be saved at the project level."})}),(0,z.jsx)("form",{children:P.map((function(e){var n=e.autoComplete,i=e.disabled,l=e.label,s=e.required,c=e.type,a=e.uuid;return(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(I.Z,{autoComplete:n,disabled:i,label:l,onChange:function(e){r((function(n){return D(D({},n),{},(0,o.Z)({},a,e.target.value))}))},primary:!0,required:s,setContentOnMount:!0,type:c,value:(null===t||void 0===t?void 0:t[a])||""})},a)}))}),(0,z.jsx)(g.ZP,{alignItems:"center",children:(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(f.Z,{checked:null===t||void 0===t?void 0:t.sync_submodules,label:"Include submodules",onClick:function(){r((function(e){return D(D({},e),{},{sync_submodules:!(null!==t&&void 0!==t&&t.sync_submodules)})}))}})})}),(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(j.Z,{level:5,children:"Additional sync settings"})}),(0,z.jsx)(g.ZP,{alignItems:"center",children:(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(f.Z,{checked:null===t||void 0===t?void 0:t.sync_on_pipeline_run,label:"Sync before each trigger run",onClick:function(){r((function(e){return D(D({},e),{},{sync_on_pipeline_run:!(null!==t&&void 0!==t&&t.sync_on_pipeline_run)})}))}})})}),(0,z.jsx)(g.ZP,{alignItems:"center",children:(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(f.Z,{checked:null===t||void 0===t?void 0:t.sync_on_start,label:"Sync on server start up",onClick:function(){r((function(e){return D(D({},e),{},{sync_on_start:!(null!==t&&void 0!==t&&t.sync_on_start)})}))}})})}),(0,z.jsx)(w.Z,{mt:H.Mq,children:(0,z.jsx)(C.ZP,{bold:!0,children:"Configure the Git authentication credentials that will be used to sync with the specified Git repository."})}),ne]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(w.Z,{mt:H.Mq,children:(0,z.jsx)(C.ZP,{bold:!0,children:"These fields are required to help Mage configure your Git settings. These settings will be specific to your user."})}),ne]}),(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsx)(m.ZP,{loading:W,onClick:function(){return U({sync:D(D({},t),{},{user_git_settings:c})})},primary:!0,children:"Save repository settings"})}),q&&(0,z.jsx)(y.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===A||void 0===A?void 0:A(null)},children:(0,z.jsx)(b.Z,D(D({},q),{},{onClose:function(){return null===A||void 0===A?void 0:A(null)}}))}),R&&(0,z.jsxs)(w.Z,{mt:H.HN,children:[(0,z.jsx)(j.Z,{children:"Synchronize code from remote repository"}),(0,z.jsxs)(w.Z,{mt:1,children:[(0,z.jsxs)(C.ZP,{children:["Running the sync from this page will run a one time sync with the remote repository.",(0,z.jsx)("br",{}),"This may ",(0,z.jsx)(C.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," your existing data, so make sure you\u2019ve committed or backed up your current changes."]}),(0,z.jsx)(w.Z,{mt:2}),(0,z.jsxs)(C.ZP,{children:["Reset will tell Mage to try to clone your repository from remote. This will also ",(0,z.jsx)(C.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," all your local changes and reset any settings you may have configured for your local Git repo. This may be helpful if you are having issues syncing your repository."]})]}),(0,z.jsx)(w.Z,{mt:2,children:(0,z.jsxs)(g.ZP,{children:[(0,z.jsx)(m.ZP,{loading:Y,onClick:function(){return J({sync:{action_type:"sync_data"}})},warning:!0,children:"Synchronize code"}),(0,z.jsx)(w.Z,{ml:2}),(0,z.jsx)(m.ZP,{danger:!0,loading:Y,onClick:function(){return J({sync:{action_type:"reset"}})},children:"Reset repository"})]})})]})]})})}A.getInitialProps=(0,r.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 E=(0,v.Z)(A)},37056:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/sync-data",function(){return t(60480)}])}},function(e){e.O(0,[2678,1154,844,4267,6990,8487,8264,8432,9774,2888,179],(function(){return n=37056,e(e.s=n);var n}));var n=e.O();_N_E=n}]);