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
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4794],{59739:function(e,n,t){"use strict";var r=t(56669);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,n,t,o,i,l){if(l!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:i,resetWarningCache:o};return t.PropTypes=t,t}},47329:function(e,n,t){e.exports=t(59739)()},56669:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},93859:function(e,n,t){"use strict";t.d(n,{r:function(){return C},Z:function(){return T}});var r=t(82394),o=t(21831),i=t(82684),l=t(48670),c=t(12691),u=t.n(c),a=t(38626),s=t(78141),d=t(44628),p=t(6508),f=t(55485),h=t(30160),m=t(44897),v=t(70987),g=function(){var e=document.createElement("div");e.setAttribute("style","width: 100px; height: 100px; overflow: scroll; position:absolute; top:-9999px;"),document.body.appendChild(e);var n=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),n},b=t(95363),x=t(61896),j=t(47041),y=t(48888),_=t(70515),O=t(40489),Z=t(86735),P=t(28598);function w(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function S(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,r.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 k=2*_.iI+x.dN,I=20*_.iI,C=8.7,E=a.default.div.withConfig({displayName:"DataTable__Styles",componentId:"sc-1arr863-0"})([""," "," "," .body > div{","}.table{border-spacing:0;display:inline-block;"," "," "," "," .tr{.td.td-index-column{","}}.th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;","}.th,.td{"," font-family:",";margin:0;","}.td{padding:","px;}&.sticky{overflow:auto;}.header{overflow:hidden;}}"],(function(e){return e.disableScrolling&&"\n overflow: hidden;\n "}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,"px;\n ")}),j.w5,(function(e){return!e.noBorderBottom&&"\n border-bottom: 1px solid ".concat((e.theme.borders||v.Z.borders).medium,";\n ")}),(function(e){return!e.noBorderLeft&&"\n border-left: 1px solid ".concat((e.theme.borders||v.Z.borders).medium,";\n ")}),(function(e){return!e.noBorderRight&&"\n border-right: 1px solid ".concat((e.theme.borders||v.Z.borders).medium,";\n ")}),(function(e){return!e.noBorderTop&&"\n border-top: 1px solid ".concat((e.theme.borders||v.Z.borders).medium,";\n ")}),(function(e){return"\n color: ".concat((e.theme.content||v.Z.content).default,";\n ")}),(function(e){return"\n height: ".concat(e.columnHeaderHeight||k,"px;\n ")}),x.iD,b.ry,(function(e){return"\n background-color: ".concat((e.theme.background||v.Z.background).table,";\n border-bottom: 1px solid ").concat((e.theme.borders||v.Z.borders).medium,";\n border-right: 1px solid ").concat((e.theme.borders||v.Z.borders).medium,";\n ")}),1*_.iI);function L(e){var n=e.original,t=8.5*Math.max.apply(Math,(0,o.Z)(n.map((function(e){return(null===e||void 0===e?void 0:e.length)||0})))),r=Math.ceil(t/(I-2*_.iI));return Math.max(r,1)*x.dN+2*_.iI}function D(e){var n=e.columnHeaderHeight,t=e.columns,r=e.data,c=e.disableScrolling,j=e.height,w=e.index,E=e.invalidValues,D=e.maxHeight,T=e.numberOfIndexes,A=e.previewIndexes,R=e.renderColumnHeader,B=e.width,N=(0,i.useContext)(a.ThemeContext),M=(0,i.useRef)(null),H=(0,i.useRef)(null);(0,i.useEffect)((function(){var e=function(e){var n;null===M||void 0===M||null===(n=M.current)||void 0===n||n.scroll(e.target.scrollLeft,0)};return H&&H.current.addEventListener("scroll",e),function(){var n;null===H||void 0===H||null===(n=H.current)||void 0===n||n.removeEventListener("scroll",e)}}),[M,H]);var U=(0,i.useMemo)((function(){return w&&r&&w.length===r.length}),[r,w]),W=(0,i.useMemo)((function(){var e=[];return(0,Z.w6)(T).forEach((function(n,t){var i=String(null===r||void 0===r?void 0:r.length).length*C;if(U){var l=w.map((function(e){return T>=2?String(e[t]).length:String(e).length}));i=Math.max.apply(Math,(0,o.Z)(l))*C}e.push(i+2*_.iI)})),e}),[r,w,T,U]),J=t.map((function(e){return null===e||void 0===e?void 0:e.Header})).slice(1),Y=(0,i.useMemo)((function(){return g()}),[]),q=(0,i.useMemo)((function(){var e=B-(Math.max.apply(Math,(0,o.Z)(W))+1.5*_.iI+Y),n=t.length-1,r=I;return r*n<e&&(r=e/n),{width:r}}),[t,W,Y,B]),G=(0,d.useTable)({columns:t,data:r,defaultColumn:q},d.useBlockLayout,p.useSticky),V=G.getTableBodyProps,z=G.getTableProps,F=G.headerGroups,K=G.prepareRow,X=G.rows,Q=(0,i.useCallback)((function(e){var n=e.index,t=e.style,r=new Set((null===A||void 0===A?void 0:A.removedRows)||[]),o=X[n];K(o);var c=o.original,a=r.has(n);return(0,P.jsx)("div",S(S({},o.getRowProps({style:S(S({},t),{},{width:"auto"})})),{},{className:"tr",children:o.cells.map((function(e,t){var r,o=t<=T-1,s=e.getCellProps(),d=e.column.id,p=null===E||void 0===E||null===(r=E[d])||void 0===r?void 0:r.includes(n),m=S({},s.style);o&&(m.fontFamily=b.Vp,m.left=0,m.position="sticky",m.textAlign=w?"right":"center",m.width=W[t]);var g,x=c[t-T],j=J.indexOf(d);if(p&&(m.color=v.Z.interactive.dangerBorder),a&&(m.backgroundColor=v.Z.background.danger),Array.isArray(x)||"object"===typeof x)try{x=JSON.stringify(x)}catch(_){x="Error: cannot display value"}return o&&(U?(g=w[n],Array.isArray(g)&&(g=g[t])):g=e.render("Cell")),(0,i.createElement)("div",S(S({},s),{},{className:"td ".concat(o?"td-index-column":""),key:"".concat(t,"-").concat(x),style:m}),g,!o&&(0,P.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,P.jsxs)(h.ZP,{danger:p,default:!0,wordBreak:!0,children:[!0===x&&"true",!1===x&&"false",(null===x||"null"===x)&&"null",!0!==x&&!1!==x&&null!==x&&"null"!==x&&x]}),p&&(0,P.jsx)(u(),{as:(0,O.o_)(y.mW,j),href:"/datasets/[...slug]",passHref:!0,children:(0,P.jsx)(l.Z,{danger:!0,children:"View all"})})]}))}))}))}),[J,w,E,W,T,K,X,U,A]),$=(0,i.useMemo)((function(){var e;return D?(e=(0,Z.Sm)(X.map(L)),e+=n||k-x.dN):(e=j,e-=n||k),e}),[n,j,D,X]),ee=(0,i.useMemo)((function(){return(0,P.jsx)(s.S_,{estimatedItemSize:k,height:$,itemCount:null===X||void 0===X?void 0:X.length,itemSize:function(e){return L(X[e])},outerRef:H,style:{maxHeight:D,pointerEvents:c?"none":null},children:Q})}),[c,$,D,Q,X]);return(0,P.jsx)("div",S(S({},z()),{},{className:"table sticky",style:{width:B},children:(0,P.jsxs)("div",S(S({},V()),{},{className:"body",children:[(0,P.jsx)("div",{className:"header",ref:M,children:F.map((function(e,n){return(0,i.createElement)("div",S(S({},e.getHeaderGroupProps()),{},{className:"tr",key:"".concat(e.id,"_").concat(n)}),e.headers.map((function(e,n){var t,r=n<=T-1,o=e.getHeaderProps(),l=S({},o.style);return r?(l.fontFamily=b.Vp,l.left=0,l.position="sticky",l.textAlign="center",l.width=W[n],l.minWidth=W[n]):R?t=R(e,n-T,{width:q.width}):(t=e.render("Header"),l.color=(N||m.Z).content.default,l.padding=1*_.iI,l.minWidth=q.width),(0,i.createElement)("div",S(S({},o),{},{className:"th",key:e.id,style:l,title:r?"Row number":void 0}),t)})))}))}),ee]}))}))}var T=function(e){var n=e.columnHeaderHeight,t=e.columns,r=e.disableScrolling,o=e.height,l=e.index,c=e.invalidValues,u=e.maxHeight,a=e.noBorderBottom,s=e.noBorderLeft,d=e.noBorderRight,p=e.noBorderTop,f=e.previewIndexes,h=e.renderColumnHeader,m=e.rows,v=e.width;if(null===t||void 0===t?void 0:t.some((function(e){return""===e})))return null;var g=(0,i.useMemo)((function(){return null!==l&&void 0!==l&&l.length&&Array.isArray(l[0])?l[0].length:1}),[l]),b=(0,i.useMemo)((function(){return(0,Z.w6)(g).map((function(e,n){return{Header:(0,Z.w6)(n+1).map((function(){return" "})).join(" "),accessor:function(e,n){return n},sticky:"left"}})).concat(null===t||void 0===t?void 0:t.map((function(e){return{Header:String(e),accessor:String(e)}})))}),[t,g]),x=(0,i.useMemo)((function(){return(0,P.jsx)(D,{columnHeaderHeight:n,columns:b,data:m,disableScrolling:r,height:o,index:l,invalidValues:c,maxHeight:u,numberOfIndexes:g,previewIndexes:f,renderColumnHeader:h,width:v})}),[n,b,m,r,o,l,c,u,g,f,h,v]);return(0,P.jsx)(E,{columnHeaderHeight:n,disableScrolling:r,height:o,maxHeight:u?u+37:u,noBorderBottom:a,noBorderLeft:s,noBorderRight:d,noBorderTop:p,children:x})}},74395:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return i}});var r=t(38626),o=t(46684),i=34*t(70515).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],o.Mz)},88785:function(e,n,t){"use strict";t.d(n,{J:function(){return u},U:function(){return c}});var r=t(38626),o=t(44897),i=t(42631),l=t(70515),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],i.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||o.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||o.Z.interactive).linkPrimary,";\n ")})),u=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],i.n_,l.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||o.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*l.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*l.iI,"px;\n ")}))},48888:function(e,n,t){"use strict";t.d(n,{AE:function(){return o},H3:function(){return i},mW:function(){return l},oE:function(){return c},yg:function(){return r}});var r="tabs[]",o="show_columns",i="column",l="Reports",c="Visualizations"},70320:function(e,n,t){"use strict";t.d(n,{h:function(){return l},q:function(){return i}});var r=t(78419),o=t(53808);function i(){return(0,o.U2)(r.am,null)||!1}function l(e){return"undefined"!==typeof e&&(0,o.t8)(r.am,e),e}},40489:function(e,n,t){"use strict";t.d(n,{o_:function(){return u}});var r=t(75582),o=t(34376),i=t(48888);t(82684),t(12691),t(71180),t(58036),t(97618),t(55485),t(48670),t(38276),t(30160),t(72473),t(28598);var l,c=t(69419);!function(e){e.DATASETS="datasets",e.DATASET_DETAIL="dataset_detail",e.COLUMNS="features",e.COLUMN_DETAIL="feature_detail",e.EXPORT="export"}(l||(l={}));var u=function(e,n){var t=(0,o.useRouter)().query.slug,u=void 0===t?[]:t,a=(0,r.Z)(u,1)[0],s=(0,c.iV)(),d=s.show_columns,p=s.column,f="/".concat(l.DATASETS,"/").concat(a),h="".concat(i.H3,"=").concat(p||n),m="".concat(i.yg,"=").concat(e,"&").concat(h,"&").concat(i.AE,"=").concat(d||0);return"".concat(f,"?").concat(m)}},14805:function(e,n,t){"use strict";var r=t(82394),o=t(44495),i=t(55485),l=t(44085),c=t(38276),u=t(30160),a=t(88785),s=t(70515),d=t(86735),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.localTime,t=e.selectedDate,r=e.selectedTime,f=e.setSelectedDate,m=e.setSelectedTime,v=e.topPosition;return(0,p.jsxs)(a.J,{absolute:!0,topPosition:v,children:[(0,p.jsx)(o.ZP,{onChange:f,value:t}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(i.ZP,{alignItems:"center",children:[(0,p.jsxs)(u.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),m((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*s.iI,placeholder:"HH",value:null===r||void 0===r?void 0:r.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(u.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),m((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*s.iI,placeholder:"MM",value:null===r||void 0===r?void 0:r.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},59860:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return sn}});var r,o=t(77837),i=t(82394),l=t(38860),c=t.n(l),u=t(38626),a=t(4804),s=t(82684),d=t(44425),p=t(15338),f=t(71180),h=t(70652),m=t(39867),v=t(55485),g=t(38276),b=t(30160),x=t(74395),j=t(70515),y=u.default.div.withConfig({displayName:"indexstyle__FilterRowStyle",componentId:"sc-kvapsi-0"})(["padding-bottom:","px;padding-top:","px;"],j.iI/2,j.iI/2);!function(e){e.CRITICAL="CRITICAL",e.DEBUG="DEBUG",e.ERROR="ERROR",e.EXCEPTION="EXCEPTION",e.INFO="INFO",e.LOG="LOG",e.WARNING="WARNING"}(r||(r={}));var _,O=[r.CRITICAL,r.DEBUG,r.ERROR,r.EXCEPTION,r.INFO,r.LOG,r.WARNING];!function(e){e.LAST_HOUR="Last hour",e.LAST_DAY="Last day",e.LAST_WEEK="Last week",e.LAST_30_DAYS="Last 30 days",e.CUSTOM_RANGE="Custom range"}(_||(_={}));var Z=t(42631),P=t(79633);var w,S=(0,u.css)(["",""],(function(e){return"\n background-color: ".concat(function(e){var n=e.critical,t=e.debug,r=e.error,o=e.exception,i=e.info,l=e.log,c=e.warning;return n?P.Zl:t?P.EG:r?P.hl:o?P.hM:i?P.gN:l?P.Wd:c?P.$R:"transparent"}(e),";\n ")})),k=u.default.div.withConfig({displayName:"indexstyle__LogLevelIndicatorStyle",componentId:"sc-1e2zh7m-0"})([""," border-radius:","px;height:12px;width:5px;"],S,Z.n_),I=t(81728),C=t(55283),E=t(15610),L=t(28598);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function T(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}!function(e){e.BLOCK_RUN_ID="block_run_id[]",e.BLOCK_TYPE="block_type[]",e.BLOCK_UUID="block_uuid[]",e.LEVEL="level[]",e.PIPELINE_RUN_ID="pipeline_run_id[]",e.PIPELINE_SCHEDULE_ID="pipeline_schedule_id[]"}(w||(w={}));var A=function(e){var n=e.blocks,t=e.query,r=(0,s.useContext)(u.ThemeContext),o=(0,s.useMemo)((function(){return t[w.LEVEL]}),[t]),l=(0,s.useMemo)((function(){return t[w.BLOCK_TYPE]}),[t]),c=(0,s.useMemo)((function(){return t[w.BLOCK_UUID]}),[t]),a=(0,s.useMemo)((function(){return t[w.PIPELINE_SCHEDULE_ID]}),[t]),p=(0,s.useMemo)((function(){return t[w.PIPELINE_RUN_ID]}),[t]),_=(0,s.useMemo)((function(){return t[w.BLOCK_RUN_ID]}),[t]);return(0,L.jsx)(x.M,{children:(0,L.jsxs)(g.Z,{p:j.cd,children:[(0,L.jsxs)(g.Z,{mb:3,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Log level"})}),O.map((function(e){return(0,L.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{level:e},{isList:!0})},children:(0,L.jsx)(y,{children:(0,L.jsxs)(v.ZP,{alignItems:"center",children:[(0,L.jsx)(h.Z,{checked:Array.isArray(o)&&(null===o||void 0===o?void 0:o.includes(String(e)))}),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(k,T({},(0,i.Z)({},e.toLowerCase(),!0))),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(b.ZP,{disableWordBreak:!0,children:(0,I.kC)(e.toLowerCase())})]})})},e)}))]}),(0,L.jsxs)(g.Z,{mb:3,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Block type"})}),[d.tf.DATA_LOADER,d.tf.TRANSFORMER,d.tf.DATA_EXPORTER].map((function(e){return(0,L.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{block_type:e},{isList:!0})},children:(0,L.jsx)(y,{children:(0,L.jsxs)(v.ZP,{alignItems:"center",children:[(0,L.jsx)(h.Z,{checked:Array.isArray(l)&&(null===l||void 0===l?void 0:l.includes(String(e)))}),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(m.Z,{color:(0,C.qn)(e,{theme:r}).accent,size:1.5*j.iI,square:!0}),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(b.ZP,{disableWordBreak:!0,muted:!0,monospace:!0,children:e})]})})},e)}))]}),(0,L.jsxs)(g.Z,{mb:3,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Block"})}),n.filter((function(e){var n=e.type;return d.tf.SCRATCHPAD!==n})).map((function(e){return(0,L.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{block_uuid:e.uuid},{isList:!0,resetLimitParams:!0})},children:(0,L.jsx)(y,{children:(0,L.jsxs)(v.ZP,{alignItems:"center",children:[(0,L.jsx)(h.Z,{checked:Array.isArray(c)&&(null===c||void 0===c?void 0:c.includes(String(e.uuid)))}),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(m.Z,{color:(0,C.qn)(e.type,{blockColor:e.color,theme:r}).accent,size:1.5*j.iI,square:!0}),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(b.ZP,{disableWordBreak:!0,monospace:!0,muted:!0,children:e.uuid})]})})},e.uuid)}))]}),(null===a||void 0===a?void 0:a.length)&&(0,L.jsxs)(g.Z,{mb:3,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Trigger"})}),a.map((function(e){return(0,L.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{pipeline_schedule_id:e},{isList:!0})},children:(0,L.jsx)(y,{children:(0,L.jsxs)(v.ZP,{alignItems:"center",children:[(0,L.jsx)(h.Z,{checked:Array.isArray(a)&&(null===a||void 0===a?void 0:a.includes(e))}),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(b.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-schedule-".concat(e))}))]}),(null===p||void 0===p?void 0:p.length)&&(0,L.jsxs)(g.Z,{mb:3,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline run"})}),p.map((function(e){return(0,L.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{pipeline_run_id:e},{isList:!0})},children:(0,L.jsx)(y,{children:(0,L.jsxs)(v.ZP,{alignItems:"center",children:[(0,L.jsx)(h.Z,{checked:Array.isArray(p)&&(null===p||void 0===p?void 0:p.includes(e))}),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(b.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-run-".concat(e))}))]}),(null===_||void 0===_?void 0:_.length)&&(0,L.jsxs)(g.Z,{mb:3,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Block run"})}),_.map((function(e){return(0,L.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{block_run_id:e},{isList:!0})},children:(0,L.jsx)(y,{children:(0,L.jsxs)(v.ZP,{alignItems:"center",children:[(0,L.jsx)(h.Z,{checked:Array.isArray(_)&&(null===_||void 0===_?void 0:_.includes(e))}),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(b.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"block-run-".concat(e))}))]})]})})},R=t(97618),B=t(93369),N=t(75582),M=t(90299),H=t(48670),U=t(75499),W=u.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1r43sbu-0"})([""," height:","px;width:100%;"],S,.5*j.iI),J=u.default.div.withConfig({displayName:"indexstyle__BadgeStyle",componentId:"sc-1r43sbu-1"})([""," border-radius:","px;display:inline-block;padding:","px ","px;"],S,Z.BG,.25*j.iI,.5*j.iI),Y=t(72473),q=t(92083),G=t.n(q);function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V(Object(t),!0).forEach((function(n){(0,i.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 F=/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/,K=/([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}) (.+)/;function X(e){var n=e.content.trim().split(K),t=[],r=[];return n.forEach((function(e){var n=e.trim();F.test(e)?(r.length>=1&&t.push(r.join(" ").trim()),r=[e]):r.filter((function(e){return e})).length<=1&&n&&r.push(n)})),t.push(r.join(" ").trim()),t.map((function(n){return function(e){var n=e.content.trim().match(K),t=null===n||void 0===n?void 0:n[1],r=null===n||void 0===n?void 0:n[2],o={};return r&&(0,I.Pb)(r)&&(o=JSON.parse(r)),z(z({},e),{},{createdAt:t,data:o})}(z(z({},e),{},{content:n}))}))}function Q(e,n){return e?null!==n&&void 0!==n&&n.localTimezone?G().unix(e).local().format():G().unix(e).utc().format("YYYY-MM-DD HH:mm:ss.SSS"):""}var $=t(86735);function ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var te=["error","error_stack","error_stacktrace"],re={uuid:"Details"},oe={uuid:"Errors"};var ie=function(e){var n=e.log,t=e.onClose,r=e.selectedTab,o=e.setSelectedTab,l=(0,s.useState)(!1),c=l[0],u=l[1],a=n.data,d=n.name,h=n.path,m=a||{},x=m.error,y=m.error_stack,_=m.error_stacktrace,O=m.level,Z=m.timestamp,P=(0,i.Z)({},O.toLowerCase(),!0),w=(0,s.useMemo)((function(){var e=[["file name",d],["file path",h]];return Object.entries(a).forEach((function(n){var t=(0,N.Z)(n,2),r=t[0],o=t[1];te.includes(r)||e.push([r,o])})),_&&e.push(["error",_]),(0,$.YC)(e,(function(e){var n=(0,N.Z)(e,2),t=n[0];n[1];return t}))}),[a,_,d,h]),S=(0,s.useMemo)((function(){var e=[re];return x&&e.push(oe),(0,L.jsx)(M.Z,{onClickTab:o,selectedTabUUID:null===r||void 0===r?void 0:r.uuid,tabs:e})}),[x,r,o]);return(0,L.jsxs)("div",{children:[(0,L.jsx)(W,ne({},P)),(0,L.jsx)(g.Z,{p:j.cd,children:(0,L.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,L.jsxs)(R.Z,{alignItems:"center",children:[(0,L.jsx)(J,ne(ne({},P),{},{children:(0,L.jsx)(b.ZP,{bold:!0,inverted:!0,monospace:!0,small:!0,children:O})})),(0,L.jsx)(g.Z,{mr:j.cd}),(0,L.jsx)(b.ZP,{monospace:!0,children:Q(Z)})]}),(0,L.jsx)(f.ZP,{iconOnly:!0,noBackground:!0,onClick:function(){return t()},children:(0,L.jsx)(Y.x8,{size:1.5*j.iI})})]})}),(0,L.jsx)(p.Z,{medium:!0}),(0,L.jsx)(g.Z,{py:j.cd,children:S}),re.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,L.jsx)(U.Z,{columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:null===w||void 0===w?void 0:w.map((function(e,n){var t=(0,N.Z)(e,2),r=t[0],o=t[1],i="message"===r,l="tags"===r,a=o,s=o;if(l?s=a=(0,I.Pb)(o)?JSON.parse(JSON.stringify(o,null,2)):JSON.stringify(o,null,2):i&&c&&(0,I.Pb)(o)&&(s=JSON.stringify(JSON.parse(o),null,2),a=(0,L.jsx)("pre",{children:s})),"object"===typeof a)try{a=JSON.stringify(a,null,2),a=(0,L.jsx)("pre",{children:a})}catch(d){}return"object"===typeof s&&(s=JSON.stringify(s)),[(0,L.jsx)(b.ZP,{monospace:!0,muted:!0,children:r},"".concat(r,"_").concat(n,"_key")),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(b.ZP,{monospace:!0,textOverflow:!0,title:s,whiteSpaceNormal:i&&c||l,wordBreak:i&&c||l,children:[!l&&a,l&&(0,L.jsx)("pre",{children:a})]},"".concat(r,"_").concat(n,"_val")),i&&(0,L.jsx)(H.Z,{muted:!0,onClick:function(){return u((function(e){return!e}))},children:c?"Click to hide log":"Click to show full log message"})]})]})),uuid:"LogDetail"}),oe.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,L.jsxs)(g.Z,{mb:5,px:j.cd,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(b.ZP,{bold:!0,children:"Error"})}),null===x||void 0===x?void 0:x.map((function(e){return e.split("\n").map((function(e){return e.split("\\n").map((function(e){return(0,L.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))})),y&&(0,L.jsxs)(g.Z,{mt:3,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(b.ZP,{bold:!0,children:"Stack trace"})}),null===y||void 0===y?void 0:y.map((function(e){return null===e||void 0===e?void 0:e.map((function(e){return(0,L.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))]})]})]})},le=t(21831),ce=t(89565),ue=t.n(ce),ae=t(12691),se=t.n(ae),de=t(78141),pe=t(57653),fe=t(98464),he=t(46684),me=t(44897),ve=t(47041),ge=u.default.div.withConfig({displayName:"indexstyle__TableContainer",componentId:"sc-16j4vp6-0"})([".table_row > div{margin:","px ","px;}div{","}"],.5*j.iI,j.iI,ve.w5),be=u.default.div.withConfig({displayName:"indexstyle__TableHeadStyle",componentId:"sc-16j4vp6-1"})(["display:flex;align-items:center;overflow:hidden;",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme||me.Z).borders.medium2,";\n ")})),xe=u.default.div.withConfig({displayName:"indexstyle__TableRowStyle",componentId:"sc-16j4vp6-2"})(["display:flex;align-items:center;"," "," ",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme||me.Z).borders.light,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return!e.selected&&"\n &:hover {\n background: ".concat((e.theme.interactive||me.Z.interactive).rowHoverBackground,";\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||me.Z.interactive).activeBorder,";\n ")})),je=t(93859),ye=t(53808),_e=t(69419),Oe=function(e){var n=(0,_e.iV)(),t=((null===n||void 0===n?void 0:n[w.PIPELINE_SCHEDULE_ID])||[]).join(",");return"".concat(e,"/logs/triggers/").concat(t)},Ze=t(70320),Pe=t(19183);function we(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?we(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):we(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke="log_uuid";var Ie,Ce,Ee,Le=function(e){var n=e.autoScrollLogs,t=e.blocksByUUID,r=e.tableInnerRef,o=e.logs,l=e.onRowClick,c=e.pipeline,u=e.query,a=e.saveScrollPosition,d=e.setSelectedLog,p=e.themeContext,f=(0,Ze.q)(),h=(0,Pe.i)().height,x=(0,s.useRef)(null),y=(0,s.useMemo)((function(){return pe.qL.INTEGRATION===(null===c||void 0===c?void 0:c.type)}),[c.type]),_=(0,fe.Z)(o);(0,s.useEffect)((function(){var e;n&&(_||[]).length!==(o||[]).length&&(null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView(!1))}),[n,o,_,r]);var O=(0,s.useMemo)((function(){return Oe(null===c||void 0===c?void 0:c.uuid)}),[null===c||void 0===c?void 0:c.uuid]);(0,s.useEffect)((function(){var e;a&&(null===x||void 0===x||null===(e=x.current)||void 0===e||e.scrollTo((0,ye.U2)(O,0)))}),[a,O]);var Z=Object.keys(t||{});if(y){var P,w,S=((null===c||void 0===c||null===(P=c.data_integration)||void 0===P||null===(w=P.catalog)||void 0===w?void 0:w.streams)||[]).map((function(e){return e.tap_stream_id})),I=new Set;Z.forEach((function(e){S.forEach((function(n){return I.add("".concat(e,":").concat(n,":0"))}))})),Z=Array.from(I)}var D=Math.max.apply(Math,(0,le.Z)(Z.map((function(e){return e.length})))),T=Math.min(D*je.r+12+8,50*j.iI),A=[{uuid:"_",width:28},{uuid:"Date",width:f?202:214},{uuid:"Block",width:T+16},{uuid:"Message"},{uuid:"_"}],B=(0,s.useCallback)((function(e){var n,t=e.data,r=e.index,o=e.style,c=t.blocksByUUID,a=t.logs,s=t.themeContext,p=a[r],h=p.content,x=p.data,_=p.name,O=x||{},Z=O.block_uuid,P=O.level,w=O.message,S=O.pipeline_uuid,I=O.timestamp,D=O.uuid,A=w||h;Array.isArray(A)?A=A.join(" "):"object"===typeof A&&(A=JSON.stringify(A));var B,N,M=Z||_.split(".log")[0],U=M.split(":");y&&(M=U[0],B=U[1],N=U[2]);var W=c[M];if(W||(W=c[U[0]]),W){var J=(0,C.qn)(W.type,{blockColor:W.color,theme:s}).accent;n=(0,L.jsx)(v.ZP,{alignItems:"center",children:(0,L.jsx)(se(),{as:"/pipelines/".concat(S,"/edit?block_uuid=").concat(M),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,L.jsxs)(H.Z,{block:!0,fullWidth:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,L.jsx)(m.Z,{color:J,size:1.5*j.iI,square:!0}),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsxs)(b.ZP,{disableWordBreak:!0,monospace:!0,noWrapping:!0,title:Z,width:T-16,children:[M,B&&":",B&&(0,L.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:B}),N>=0&&":",N>=0&&(0,L.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:N})]})]})})})}return(0,L.jsxs)(xe,{className:"table_row",onClick:function(){var e,n,t=a[r],o=null===(e=t.data)||void 0===e?void 0:e.uuid;u.log_uuid===o&&(o=null),null!==(n=t.data)&&void 0!==n&&n.error?null===l||void 0===l||l(oe):null===l||void 0===l||l(re),(0,E.u7)((0,i.Z)({},ke,o)),d(o?t:null)},selected:(null===u||void 0===u?void 0:u.log_uuid)&&(null===u||void 0===u?void 0:u.log_uuid)===D,style:Se({},o),children:[(0,L.jsx)(R.Z,{alignItems:"center",justifyContent:"center",children:(0,L.jsx)(k,Se({},(0,i.Z)({},null===P||void 0===P?void 0:P.toLowerCase(),!0)))},"log_type"),(0,L.jsx)(R.Z,{children:(0,L.jsx)(b.ZP,{default:!0,monospace:!0,noWrapping:!0,small:f,children:Q(I,{localTimezone:f})},"log_timestamp")}),(0,L.jsx)(R.Z,{style:{minWidth:T,width:T},children:n}),(0,L.jsx)(R.Z,{style:{overflow:"auto"},children:(0,L.jsx)(b.ZP,{monospace:!0,textOverflow:!0,title:A,children:(0,L.jsx)(ue(),{children:A})},"log_message")}),(0,L.jsx)(R.Z,{flex:"1",justifyContent:"flex-end",children:(0,L.jsx)(Y._Q,{default:!0,size:2*j.iI})},"chevron_right_icon")]})}),[T,f,y,l,u,d]);return(0,L.jsxs)(ge,{children:[(0,L.jsx)(be,{children:A.map((function(e,n){return(0,L.jsx)(R.Z,{alignItems:"center",style:{height:4*j.iI,minWidth:e.width||null,width:e.width||null},children:"_"!==e.uuid&&(0,L.jsx)(b.ZP,{bold:!0,leftAligned:!0,monospace:!0,muted:!0,children:e.uuid})},"".concat(e,"_").concat(n))}))}),(0,L.jsx)(de.t7,{height:h-he.Mz-86-34-58,innerRef:r,itemCount:o.length,itemData:{blocksByUUID:t,logs:o,pipeline:c,themeContext:p},itemSize:3.75*j.iI,onScroll:function(e){var n=e.scrollOffset,t=e.scrollDirection;!a||"forward"===t&&0===n||(0,ye.t8)(O,n)},ref:x,width:"100%",children:B})]})},De=t(34376),Te=t(14805),Ae=t(50724),Re=t(44085),Be=t(17488),Ne="_limit",Me="_offset",He=20,Ue=[_.LAST_HOUR,_.LAST_DAY,_.LAST_WEEK,_.LAST_30_DAYS],We=(Ie={},(0,i.Z)(Ie,_.LAST_HOUR,3600),(0,i.Z)(Ie,_.LAST_DAY,86400),(0,i.Z)(Ie,_.LAST_WEEK,604800),(0,i.Z)(Ie,_.LAST_30_DAYS,2592e3),Ie),Je=t(48277),Ye=t(3917),qe=t(42122);function Ge(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ve(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ge(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ge(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.START="start_timestamp",e.END="end_timestamp"}(Ee||(Ee={}));var ze=(Ce={},(0,i.Z)(Ce,Ne,He),(0,i.Z)(Ce,Me,0),Ce),Fe={blackBorder:!0,inline:!0,paddingBottom:.75*j.iI,paddingTop:.75*j.iI};var Ke=function(e){var n=e.allPastLogsLoaded,t=e.loadNewerLogInterval,r=e.loadPastLogInterval,o=e.saveScrollPosition,l=e.selectedRange,c=e.setSelectedRange,u=(0,s.useState)(null),a=u[0],d=u[1],p=(0,s.useState)(null),h=p[0],m=p[1],x=(0,s.useState)({hour:"00",minute:"00"}),y=x[0],O=x[1],Z=(0,s.useState)(new Date),P=Z[0],w=Z[1],S=(0,s.useState)({hour:(0,Ye.lJ)(String((new Date).getUTCHours())),minute:(0,Ye.lJ)(String((new Date).getUTCMinutes()))}),k=S[0],I=S[1],C=(0,De.useRouter)().query.pipeline,D=(0,_e.iV)(),T=(0,fe.Z)(D);(0,s.useEffect)((function(){if(!(0,qe.Xy)(D,T)){var e=D.start_timestamp,n=D.end_timestamp;if(e){var t=(0,Ye.Pc)(e),r=t.date,o=t.hour,i=t.minute;m(r),O({hour:(0,Ye.lJ)(o),minute:(0,Ye.lJ)(i)});var l=Math.ceil(Date.now()/1e3)-e;Math.abs(l-We[_.LAST_DAY])<=60&&c(_.LAST_DAY)}if(n){var u=(0,Ye.Pc)(n),a=u.date,s=u.hour,d=u.minute;w(a),I({hour:(0,Ye.lJ)(s),minute:(0,Ye.lJ)(d)})}}}),[D,T]);var A=(0,s.useCallback)((function(){if(o){var e=Oe(C);(0,ye.t8)(e,0)}}),[C,o]);return(0,L.jsx)(g.Z,{py:1,children:(0,L.jsxs)(v.ZP,{alignItems:"center",children:[(0,L.jsx)(B.ZP,Ve(Ve({},Fe),{},{disabled:n,onClick:function(){A(),r()},uuid:"logs/load_older_logs",children:n?"All past logs within range loaded":"Load older logs"})),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(B.ZP,Ve(Ve({},Fe),{},{disabled:(null===D||void 0===D?void 0:D._offset)<=0,onClick:function(){A(),t()},uuid:"logs/load_newer_logs",children:"Load newer logs"})),(0,L.jsx)(g.Z,{mr:2}),(0,L.jsx)(Re.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault();var n=e.target.value;if(A(),c(n),Ue.includes(n)){var t,r=(0,Je.JI)(We[n]);(0,E.u7)(Ve((t={},(0,i.Z)(t,Ee.START,r),(0,i.Z)(t,Ee.END,null),t),ze))}},paddingRight:4*j.iI,placeholder:"Select time range",value:l,children:Object.values(_).map((function(e){return(0,L.jsx)("option",{value:e,children:e},e)}))}),(0,L.jsx)(g.Z,{mr:1}),l===_.CUSTOM_RANGE&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Be.Z,{compact:!0,defaultColor:!0,onClick:function(){return d(0)},paddingRight:0,placeholder:"Start",value:h?(0,Ye.AY)(h,null===y||void 0===y?void 0:y.hour,null===y||void 0===y?void 0:y.minute):""}),(0,L.jsx)(Ae.Z,{onClickOutside:function(){return d(null)},open:0===a,style:{position:"relative"},children:(0,L.jsx)(Te.Z,{selectedDate:h,selectedTime:y,setSelectedDate:m,setSelectedTime:O})}),(0,L.jsx)(g.Z,{px:1,children:(0,L.jsx)(b.ZP,{children:"to"})}),(0,L.jsx)(Be.Z,{compact:!0,defaultColor:!0,onClick:function(){return d(1)},paddingRight:0,placeholder:"End",value:P?(0,Ye.AY)(P,null===k||void 0===k?void 0:k.hour,null===k||void 0===k?void 0:k.minute):""}),(0,L.jsx)(Ae.Z,{onClickOutside:function(){return d(null)},open:1===a,style:{position:"relative"},children:(0,L.jsx)(Te.Z,{selectedDate:P,selectedTime:k,setSelectedDate:w,setSelectedTime:I})}),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(f.ZP,{borderRadius:"".concat(j.iI/2,"px"),onClick:function(){var e;A();var n=(0,Ye.BP)(h,y.hour,y.minute),t=(0,Ye.BP)(P,k.hour,k.minute);(0,E.u7)(Ve((e={},(0,i.Z)(e,Ee.START,(0,Ye.A5)(n)),(0,i.Z)(e,Ee.END,(0,Ye.A5)(t)),e),ze))},padding:"".concat(j.iI/2,"px"),primary:!0,children:"Search"})]})]})})},Xe=t(75457),Qe=t(93808),$e=t(4190),en=t(69650),nn=t(35686),tn=t(78419),rn=t(28795);function on(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ln(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?on(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):on(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var cn="pipeline_run_id[]",un="block_run_id[]";function an(e){var n=e.pipeline,t=(0,s.useContext)(u.ThemeContext),r=(0,s.useRef)(null),o=n.uuid,l=(0,s.useState)(null),c=l[0],f=l[1],h=(0,s.useState)(null),m=h[0],x=h[1],y=(0,s.useState)(null),O=y[0],Z=y[1],P=(0,s.useState)(null),S=P[0],k=P[1],C=(0,s.useState)(re),D=C[0],T=C[1],N=(0,s.useState)((0,ye.U2)(tn.Tz,!0)),M=N[0],H=N[1],U=nn.ZP.pipelines.detail(o,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,W=(0,s.useMemo)((function(){return ln(ln({},null===U||void 0===U?void 0:U.pipeline),{},{uuid:o})}),[U,o]),J=(null===W||void 0===W?void 0:W.type)===pe.qL.INTEGRATION,Y=(0,s.useMemo)((function(){return W.blocks||[]}),[W]),q=(0,s.useMemo)((function(){var e=(0,$.HK)(Y,(function(e){return e.uuid}));if(J){var n,t=(0,$.sE)(Y,(function(e){var n=e.type;return d.tf.DATA_LOADER===n})),r=t?(0,a.Qc)(t.content):{},o=((null===r||void 0===r||null===(n=r.catalog)||void 0===n?void 0:n.streams)||[]).reduce((function(e,n){var t=n.tap_stream_id,r={};return Y.forEach((function(e){var n=e.uuid,o=e.type,i="".concat(n,":").concat(t);r[i]={type:o}})),ln(ln({},e),r)}),{});e=ln(ln({},o),e)}return e}),[Y,J]),G=(0,_e.iV)(),V=(0,s.useMemo)((function(){return(null===G||void 0===G?void 0:G.hasOwnProperty(w.PIPELINE_SCHEDULE_ID))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(w.LEVEL))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(w.BLOCK_TYPE))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(w.BLOCK_UUID))}),[G]),z=!(null!==G&&void 0!==G&&G.start_timestamp)&&!(null!==G&&void 0!==G&&G.hasOwnProperty(cn)||null!==G&&void 0!==G&&G.hasOwnProperty(un)),F=(0,Je.JI)(We[_.LAST_DAY]),K=nn.ZP.logs.pipelines.list(c?o:null,(0,qe.gR)(z?ln(ln({},c),{},{start_timestamp:F}):c,[ke]),{refreshInterval:5e3}),Q=K.data,ee=K.mutate,ne=!Q,te=(0,s.useMemo)((function(){var e;if(null!==Q&&void 0!==Q&&null!==(e=Q.logs)&&void 0!==e&&e[0]){var n,t=(null===(n=Q.logs)||void 0===n?void 0:n[0])||{};return{blockRunLogs:t.block_run_logs,pipelineRunLogs:t.pipeline_run_logs,totalBlockRunLogCount:t.total_block_run_log_count,totalPipelineRunLogCount:t.total_pipeline_run_log_count}}return{blockRunLogs:[],pipelineRunLogs:[],totalBlockRunLogCount:0,totalPipelineRunLogCount:0}}),[Q]),oe=te.blockRunLogs,le=te.pipelineRunLogs,ce=te.totalBlockRunLogCount,ue=te.totalPipelineRunLogCount,ae=+(null===G||void 0===G?void 0:G._limit)>=ce&&+(null===G||void 0===G?void 0:G._limit)>=ue,se=(0,s.useMemo)((function(){return(0,$.YC)(oe.concat(le).reduce((function(e,n){return e.concat(X(n))}),[]),(function(e){var n=e.data;return(null===n||void 0===n?void 0:n.timestamp)||0}))}),[oe,le]),de=(0,s.useMemo)((function(){return se.filter((function(e){var n=e.data,t=[];if(!c)return!0;if(t.push(!(0,qe.Qr)(n)),c["level[]"]&&t.push(c["level[]"].includes(null===n||void 0===n?void 0:n.level)),c["block_type[]"]){var r,o,i=null===n||void 0===n?void 0:n.block_uuid;if(J)i=null===n||void 0===n||null===(o=n.block_uuid)||void 0===o?void 0:o.split(":").slice(0,2).join(":");t.push(c["block_type[]"].includes(null===(r=q[i])||void 0===r?void 0:r.type))}if(c["pipeline_run_id[]"]){var l=null===n||void 0===n?void 0:n.pipeline_run_id;t.push(c["pipeline_run_id[]"].includes(String(l)))}if(c["block_run_id[]"]){var u=null===n||void 0===n?void 0:n.block_run_id;t.push(c["block_run_id[]"].includes(String(u)))}return t.every((function(e){return e}))}))}),[q,J,se,c]),he=de.length,ve=(0,fe.Z)(G);(0,s.useEffect)((function(){var e;z&&(0,E.u7)((e={},(0,i.Z)(e,Ne,He),(0,i.Z)(e,Me,0),(0,i.Z)(e,"start_timestamp",F),e))}),[z]),(0,s.useEffect)((function(){(0,qe.Xy)(G,ve)||f(G)}),[G,ve]);var ge=(0,fe.Z)(m);(0,s.useEffect)((function(){var e=G.log_uuid;!e||m||ge||x(se.find((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.uuid)===e})))}),[se,G,m,ge]);var be=G._limit,xe=G._offset,je=+(be||0),Oe=+(xe||0),Ze=Math.max(ce,ue),Pe=(0,s.useCallback)((function(){var e,n=je,t=Oe;(ce>je||ue>je)&&(n=Math.min(Ze,je+He),t=Math.min(Oe+He,Ze-Ze%He),(0,E.u7)(ln(ln({},G),{},(e={},(0,i.Z)(e,Ne,n),(0,i.Z)(e,Me,t),e))))}),[Ze,je,Oe,G,ce,ue]),we=(0,s.useCallback)((function(){var e,n=je,t=Oe;je>=He&&(n=Math.max(He,je-He),je>=Ze&&Ze%He!==0&&(n=Ze-Ze%He),t=Math.max(0,Oe-He),(0,E.u7)(ln(ln({},G),{},(e={},(0,i.Z)(e,Ne,n),(0,i.Z)(e,Me,t),e))))}),[Ze,je,Oe,G]),Se=(0,s.useCallback)((function(){var e=!M;H(e),(0,ye.t8)(tn.Tz,e)}),[M]),Ie=(0,s.useMemo)((function(){return(0,L.jsx)(Le,{autoScrollLogs:M,blocksByUUID:q,logs:de,onRowClick:T,pipeline:W,query:c,saveScrollPosition:V,setSelectedLog:x,tableInnerRef:r,themeContext:t})}),[M,q,de,W,c,V,t]);return(0,L.jsxs)(Xe.Z,{after:m&&(0,L.jsx)(ie,{log:m,onClose:function(){(0,E.u7)((0,i.Z)({},ke,null)),x(null)},selectedTab:D,setSelectedTab:T}),afterHidden:!m,afterWidth:80*j.iI,before:(0,L.jsx)(A,{blocks:Y,query:c}),beforeWidth:20*j.iI,breadcrumbs:[{label:function(){return"Logs"}}],errors:S,pageName:rn.M.PIPELINE_LOGS,pipeline:W,setErrors:k,subheader:null,title:function(e){var n=e.name;return"".concat(n," logs")},uuid:"pipeline/logs",children:[(0,L.jsx)(g.Z,{px:j.cd,py:1,children:(0,L.jsxs)(b.ZP,{children:[!ne&&(0,L.jsxs)(L.Fragment,{children:[(0,I.x6)(he)," logs found",(0,L.jsx)(Ke,{allPastLogsLoaded:ae,loadNewerLogInterval:we,loadPastLogInterval:Pe,saveScrollPosition:V,selectedRange:O,setSelectedRange:Z})]}),ne&&"Searching..."]})}),(0,L.jsx)(p.Z,{light:!0}),ne&&(0,L.jsx)(g.Z,{p:j.cd,children:(0,L.jsx)($e.Z,{})}),!ne&&de.length>=1&&Ie,(0,L.jsx)(g.Z,{p:"".concat(1.5*j.iI,"px"),children:(0,L.jsxs)(v.ZP,{alignItems:"center",children:[(0,L.jsx)(B.ZP,ln(ln({},Fe),{},{onClick:function(){"0"===(null===G||void 0===G?void 0:G._offset)&&(null===G||void 0===G?void 0:G._limit)===String(He)?ee(null):(0,E.u7)({_limit:He,_offset:0})},uuid:"logs/toolbar/load_newest",children:"Load latest logs"})),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(B.ZP,ln(ln({},Fe),{},{backgroundColor:me.Z.background.page,onClick:function(){var e;null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},uuid:"logs/toolbar/scroll_to_bottomt",children:"Scroll to bottom"})),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsxs)(R.Z,{children:[(0,L.jsx)(b.ZP,{noWrapping:!0,children:"Auto-scroll to new logs"}),(0,L.jsx)(g.Z,{mr:1}),(0,L.jsx)(en.Z,{checked:M,compact:!0,onCheck:Se})]})]})})]})}an.getInitialProps=function(){var e=(0,o.Z)(c().mark((function e(n){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var sn=(0,Qe.Z)(an)},48277:function(e,n,t){"use strict";t.d(n,{$P:function(){return a},JI:function(){return i},VJ:function(){return u},fD:function(){return l},uf:function(){return o},vN:function(){return c}});var r=t(75582),o=function(e){var n=String(e).split("."),t=(0,r.Z)(n,2),o=t[0],i=t[1];return"".concat(o.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(i?".".concat(i):"")};function i(e){var n=Math.floor(Date.now()/1e3);return e>0?n-e:n}function l(e){return(e>>>0).toString(2)}function c(e,n){return String(BigInt(e)+BigInt(n))}function u(e,n){return String(BigInt(e)-BigInt(n))}function a(e){return parseInt(e,2)}},62453:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/logs",function(){return t(59860)}])}},function(e){e.O(0,[2678,1154,844,5820,1751,4495,4267,600,8487,8264,7858,5499,5457,4366,9774,2888,179],(function(){return n=62453,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8662],{28108:function(t,e,n){"use strict";n.d(e,{Z:function(){return m}});var r=n(82684),i=n(63588),o=n.n(i),u=n(75823),a=n(29989),c=n(62072),l=n(53989),s=n(49894),d=n(18246),f=n(59309),p=n(65743),h=["data","className","top","left","y","x0","x1","xScale","yScale","color","keys","value","order","offset","children"];function v(){return v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},v.apply(this,arguments)}function m(t){var e=t.data,n=t.className,i=t.top,m=t.left,g=t.y,b=t.x0,y=void 0===b?c.l8:b,x=t.x1,j=void 0===x?c.xf:x,O=t.xScale,Z=t.yScale,w=t.color,k=t.keys,E=t.value,T=t.order,P=t.offset,S=t.children,I=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,h),A=(0,u.Z)();k&&A.keys(k),E&&(0,s.Z)(A.value,E),T&&A.order((0,d.ZP)(T)),P&&A.offset((0,f.ZP)(P));var D=A(e),L=(0,l.Z)(Z),_=D.map((function(t,e){var n=t.key;return{index:e,key:n,bars:t.map((function(e,r){var i=(O(j(e))||0)-(O(y(e))||0),o=O(y(e)),u="bandwidth"in Z?Z(g(e.data)):Math.max((Z(g(e.data))||0)-i/2);return{bar:e,key:n,index:r,height:L,width:i,x:o||0,y:u||0,color:w(t.key,r)}}))}}));return S?r.createElement(r.Fragment,null,S(_)):r.createElement(a.Z,{className:o()("visx-bar-stack-horizontal",n),top:i,left:m},_.map((function(t){return t.bars.map((function(e){return r.createElement(p.Z,v({key:"bar-stack-"+t.index+"-"+e.index,x:e.x,y:e.y,height:e.height,width:e.width,fill:e.color},I))}))})))}},62072:function(t,e,n){"use strict";function r(t){return null==t?void 0:t[0]}function i(t){return null==t?void 0:t[1]}n.d(e,{l8:function(){return r},xf:function(){return i}})},59309:function(t,e,n){"use strict";n.d(e,{ZP:function(){return l}});var r=n(12759),i=n(27500),o=n(82610),u=n(34812),a=n(77944),c={expand:r.Z,diverging:i.Z,none:o.Z,silhouette:u.Z,wiggle:a.Z};Object.keys(c);function l(t){return t&&c[t]||c.none}},18246:function(t,e,n){"use strict";n.d(e,{ZP:function(){return l}});var r=n(39586),i=n(25516),o=n(54164),u=n(8512),a=n(2010),c={ascending:r.Z,descending:i.Z,insideout:o.Z,none:u.Z,reverse:a.Z};Object.keys(c);function l(t){return t&&c[t]||c.none}},93859:function(t,e,n){"use strict";n.d(e,{r:function(){return I},Z:function(){return _}});var r=n(82394),i=n(21831),o=n(82684),u=n(48670),a=n(12691),c=n.n(a),l=n(38626),s=n(78141),d=n(44628),f=n(6508),p=n(55485),h=n(30160),v=n(44897),m=n(70987),g=function(){var t=document.createElement("div");t.setAttribute("style","width: 100px; height: 100px; overflow: scroll; position:absolute; top:-9999px;"),document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e},b=n(95363),y=n(61896),x=n(47041),j=n(48888),O=n(70515),Z=n(40489),w=n(86735),k=n(28598);function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function T(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){(0,r.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var P=2*O.iI+y.dN,S=20*O.iI,I=8.7,A=l.default.div.withConfig({displayName:"DataTable__Styles",componentId:"sc-1arr863-0"})([""," "," "," .body > div{","}.table{border-spacing:0;display:inline-block;"," "," "," "," .tr{.td.td-index-column{","}}.th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;","}.th,.td{"," font-family:",";margin:0;","}.td{padding:","px;}&.sticky{overflow:auto;}.header{overflow:hidden;}}"],(function(t){return t.disableScrolling&&"\n overflow: hidden;\n "}),(function(t){return t.height&&"\n height: ".concat(t.height,"px;\n ")}),(function(t){return t.maxHeight&&"\n max-height: ".concat(t.maxHeight,"px;\n ")}),x.w5,(function(t){return!t.noBorderBottom&&"\n border-bottom: 1px solid ".concat((t.theme.borders||m.Z.borders).medium,";\n ")}),(function(t){return!t.noBorderLeft&&"\n border-left: 1px solid ".concat((t.theme.borders||m.Z.borders).medium,";\n ")}),(function(t){return!t.noBorderRight&&"\n border-right: 1px solid ".concat((t.theme.borders||m.Z.borders).medium,";\n ")}),(function(t){return!t.noBorderTop&&"\n border-top: 1px solid ".concat((t.theme.borders||m.Z.borders).medium,";\n ")}),(function(t){return"\n color: ".concat((t.theme.content||m.Z.content).default,";\n ")}),(function(t){return"\n height: ".concat(t.columnHeaderHeight||P,"px;\n ")}),y.iD,b.ry,(function(t){return"\n background-color: ".concat((t.theme.background||m.Z.background).table,";\n border-bottom: 1px solid ").concat((t.theme.borders||m.Z.borders).medium,";\n border-right: 1px solid ").concat((t.theme.borders||m.Z.borders).medium,";\n ")}),1*O.iI);function D(t){var e=t.original,n=8.5*Math.max.apply(Math,(0,i.Z)(e.map((function(t){return(null===t||void 0===t?void 0:t.length)||0})))),r=Math.ceil(n/(S-2*O.iI));return Math.max(r,1)*y.dN+2*O.iI}function L(t){var e=t.columnHeaderHeight,n=t.columns,r=t.data,a=t.disableScrolling,x=t.height,E=t.index,A=t.invalidValues,L=t.maxHeight,_=t.numberOfIndexes,M=t.previewIndexes,C=t.renderColumnHeader,N=t.width,R=(0,o.useContext)(l.ThemeContext),H=(0,o.useRef)(null),Y=(0,o.useRef)(null);(0,o.useEffect)((function(){var t=function(t){var e;null===H||void 0===H||null===(e=H.current)||void 0===e||e.scroll(t.target.scrollLeft,0)};return Y&&Y.current.addEventListener("scroll",t),function(){var e;null===Y||void 0===Y||null===(e=Y.current)||void 0===e||e.removeEventListener("scroll",t)}}),[H,Y]);var U=(0,o.useMemo)((function(){return E&&r&&E.length===r.length}),[r,E]),V=(0,o.useMemo)((function(){var t=[];return(0,w.w6)(_).forEach((function(e,n){var o=String(null===r||void 0===r?void 0:r.length).length*I;if(U){var u=E.map((function(t){return _>=2?String(t[n]).length:String(t).length}));o=Math.max.apply(Math,(0,i.Z)(u))*I}t.push(o+2*O.iI)})),t}),[r,E,_,U]),B=n.map((function(t){return null===t||void 0===t?void 0:t.Header})).slice(1),F=(0,o.useMemo)((function(){return g()}),[]),z=(0,o.useMemo)((function(){var t=N-(Math.max.apply(Math,(0,i.Z)(V))+1.5*O.iI+F),e=n.length-1,r=S;return r*e<t&&(r=t/e),{width:r}}),[n,V,F,N]),G=(0,d.useTable)({columns:n,data:r,defaultColumn:z},d.useBlockLayout,f.useSticky),X=G.getTableBodyProps,W=G.getTableProps,J=G.headerGroups,q=G.prepareRow,K=G.rows,Q=(0,o.useCallback)((function(t){var e=t.index,n=t.style,r=new Set((null===M||void 0===M?void 0:M.removedRows)||[]),i=K[e];q(i);var a=i.original,l=r.has(e);return(0,k.jsx)("div",T(T({},i.getRowProps({style:T(T({},n),{},{width:"auto"})})),{},{className:"tr",children:i.cells.map((function(t,n){var r,i=n<=_-1,s=t.getCellProps(),d=t.column.id,f=null===A||void 0===A||null===(r=A[d])||void 0===r?void 0:r.includes(e),v=T({},s.style);i&&(v.fontFamily=b.Vp,v.left=0,v.position="sticky",v.textAlign=E?"right":"center",v.width=V[n]);var g,y=a[n-_],x=B.indexOf(d);if(f&&(v.color=m.Z.interactive.dangerBorder),l&&(v.backgroundColor=m.Z.background.danger),Array.isArray(y)||"object"===typeof y)try{y=JSON.stringify(y)}catch(O){y="Error: cannot display value"}return i&&(U?(g=E[e],Array.isArray(g)&&(g=g[n])):g=t.render("Cell")),(0,o.createElement)("div",T(T({},s),{},{className:"td ".concat(i?"td-index-column":""),key:"".concat(n,"-").concat(y),style:v}),g,!i&&(0,k.jsxs)(p.ZP,{justifyContent:"space-between",children:[(0,k.jsxs)(h.ZP,{danger:f,default:!0,wordBreak:!0,children:[!0===y&&"true",!1===y&&"false",(null===y||"null"===y)&&"null",!0!==y&&!1!==y&&null!==y&&"null"!==y&&y]}),f&&(0,k.jsx)(c(),{as:(0,Z.o_)(j.mW,x),href:"/datasets/[...slug]",passHref:!0,children:(0,k.jsx)(u.Z,{danger:!0,children:"View all"})})]}))}))}))}),[B,E,A,V,_,q,K,U,M]),$=(0,o.useMemo)((function(){var t;return L?(t=(0,w.Sm)(K.map(D)),t+=e||P-y.dN):(t=x,t-=e||P),t}),[e,x,L,K]),tt=(0,o.useMemo)((function(){return(0,k.jsx)(s.S_,{estimatedItemSize:P,height:$,itemCount:null===K||void 0===K?void 0:K.length,itemSize:function(t){return D(K[t])},outerRef:Y,style:{maxHeight:L,pointerEvents:a?"none":null},children:Q})}),[a,$,L,Q,K]);return(0,k.jsx)("div",T(T({},W()),{},{className:"table sticky",style:{width:N},children:(0,k.jsxs)("div",T(T({},X()),{},{className:"body",children:[(0,k.jsx)("div",{className:"header",ref:H,children:J.map((function(t,e){return(0,o.createElement)("div",T(T({},t.getHeaderGroupProps()),{},{className:"tr",key:"".concat(t.id,"_").concat(e)}),t.headers.map((function(t,e){var n,r=e<=_-1,i=t.getHeaderProps(),u=T({},i.style);return r?(u.fontFamily=b.Vp,u.left=0,u.position="sticky",u.textAlign="center",u.width=V[e],u.minWidth=V[e]):C?n=C(t,e-_,{width:z.width}):(n=t.render("Header"),u.color=(R||v.Z).content.default,u.padding=1*O.iI,u.minWidth=z.width),(0,o.createElement)("div",T(T({},i),{},{className:"th",key:t.id,style:u,title:r?"Row number":void 0}),n)})))}))}),tt]}))}))}var _=function(t){var e=t.columnHeaderHeight,n=t.columns,r=t.disableScrolling,i=t.height,u=t.index,a=t.invalidValues,c=t.maxHeight,l=t.noBorderBottom,s=t.noBorderLeft,d=t.noBorderRight,f=t.noBorderTop,p=t.previewIndexes,h=t.renderColumnHeader,v=t.rows,m=t.width;if(null===n||void 0===n?void 0:n.some((function(t){return""===t})))return null;var g=(0,o.useMemo)((function(){return null!==u&&void 0!==u&&u.length&&Array.isArray(u[0])?u[0].length:1}),[u]),b=(0,o.useMemo)((function(){return(0,w.w6)(g).map((function(t,e){return{Header:(0,w.w6)(e+1).map((function(){return" "})).join(" "),accessor:function(t,e){return e},sticky:"left"}})).concat(null===n||void 0===n?void 0:n.map((function(t){return{Header:String(t),accessor:String(t)}})))}),[n,g]),y=(0,o.useMemo)((function(){return(0,k.jsx)(L,{columnHeaderHeight:e,columns:b,data:v,disableScrolling:r,height:i,index:u,invalidValues:a,maxHeight:c,numberOfIndexes:g,previewIndexes:p,renderColumnHeader:h,width:m})}),[e,b,v,r,i,u,a,c,g,p,h,m]);return(0,k.jsx)(A,{columnHeaderHeight:e,disableScrolling:r,height:i,maxHeight:c?c+37:c,noBorderBottom:l,noBorderLeft:s,noBorderRight:d,noBorderTop:f,children:y})}},66909:function(t,e,n){"use strict";n.d(e,{Eh:function(){return l},t0:function(){return s}});var r=n(38626),i=n(2842),o=n(17679),u=n(61896),a=n(47041),c=n(70515),l=(c.iI,o.O$+3*c.iI+u.dN),s=r.default.div.withConfig({displayName:"indexstyle__SidekickContainerStyle",componentId:"sc-15ofupc-0"})([""," overflow:auto;position:absolute;width:100%;"," ",""],a.w5,(function(t){return"\n height: calc(100vh - ".concat(i.uX,"px - ").concat(t.heightOffset,"px);\n ")}),(function(t){return t.overflowHidden&&"\n overflow: hidden;\n "}));r.default.div.withConfig({displayName:"indexstyle__PaddingContainerStyle",componentId:"sc-15ofupc-1"})(["padding:","px;",""],2*c.iI,(function(t){return t.noPadding&&"\n padding: 0;\n "}))},16488:function(t,e,n){"use strict";n.d(e,{IJ:function(){return v},M8:function(){return k},Vx:function(){return x},XM:function(){return w},_U:function(){return h},eI:function(){return y},gU:function(){return O},lO:function(){return I},ri:function(){return g},tL:function(){return j},vJ:function(){return Z},xH:function(){return b}});var r,i=n(82394),o=n(92083),u=n.n(o),a=n(3917),c=n(4383),l=n(30229),s=n(42122),d=n(86735);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var h=function(t){return!!t&&!Object.values(l.U5).includes(t)};function v(t){return null===t||void 0===t?void 0:t.reduce((function(t,e){var n=e.block_uuid,r=e.completed_at,o=e.started_at,a=e.status,c=null;o&&r&&(c=u()(r).valueOf()-u()(o).valueOf());return p(p({},t),{},(0,i.Z)({},n,{runtime:c,status:a}))}),{})}var m,g=function(t){var e=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:l.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:l.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:l.Xm.API}];return t?e.slice(0,1):e};function b(t){var e=(0,s.gR)(t,[l.gm.INTERVAL,l.gm.TYPE]),n=t[l.gm.INTERVAL];n&&(e["schedule_interval[]"]=encodeURIComponent(n));var r=t[l.gm.TYPE];return r&&(e["schedule_type[]"]=r),e}function y(t){return t?new Date(u()(t).valueOf()):null}function x(t){if("string"!==typeof t)return t;var e=t.split("+")[0];return u()(y(e)).format(a.Nx)}!function(t){t.DAY="day",t.HOUR="hour",t.MINUTE="minute",t.SECOND="second"}(m||(m={}));var j=(r={},(0,i.Z)(r,m.DAY,86400),(0,i.Z)(r,m.HOUR,3600),(0,i.Z)(r,m.MINUTE,60),(0,i.Z)(r,m.SECOND,1),r);function O(t){var e=m.SECOND,n=t;return t%86400===0?(n/=86400,e=m.DAY):t%3600===0?(n/=3600,e=m.HOUR):t%60===0&&(n/=60,e=m.MINUTE),{time:n,unit:e}}function Z(t,e){return t*j[e]}function w(t,e,n){var r,i=u()(t);return i.set("hour",+(null===e||void 0===e?void 0:e.hour)||0),i.set("minute",+(null===e||void 0===e?void 0:e.minute)||0),i.set("second",0),r=i.format(a.TD),null!==n&&void 0!==n&&n.includeSeconds&&(r=r.concat(":00")),null!==n&&void 0!==n&&n.localTimezone&&(r=i.format(a.lE),null!==n&&void 0!==n&&n.convertToUtc&&(r=(0,a.d$)(r,{includeSeconds:null===n||void 0===n?void 0:n.includeSeconds,utcFormat:!0}))),r}function k(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",i=!0;return i&&(n?r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===t||void 0===t?void 0:t.id,"/api_trigger"):(r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===t||void 0===t?void 0:t.id,"/pipeline_runs"),null!==t&&void 0!==t&&t.token&&(r="".concat(r,"/").concat(t.token)))),i&&(e=window.location.port)&&(r=r.replace(e,c.QT)),r}function E(t,e,n){return t.match(/[*,-/]/)?{additionalOffset:0,cronValue:t}:function(t,e,n){var r=n.indexOf(t),i=0;if(e<0)for(var o=0;o>e;o--)0===r?(r=n.length-1,i-=1):r-=1;else if(e>0)for(var u=0;u<e;u++)r===n.length-1?(r=0,i+=1):r+=1;return{additionalOffset:i,cronValue:String(n[r]||t)}}(+t,e,n)}var T=(0,d.m5)(60),P=(0,d.m5)(24),S=(0,a.Cs)();function I(t,e){if(!t)return t;var n=u()().local().format("Z"),r=n.split(":"),i="-"===n[0],o=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),a=Number(r[1]);(i&&!e||!i&&e)&&(o=-o,a=-a);var c=t.split(" "),l=c[0],s=c[1],d=c[2],f=E(l,a,T),p=E(s,o+f.additionalOffset,P);if(c[0]=f.cronValue,c[1]=p.cronValue,0!==(null===p||void 0===p?void 0:p.additionalOffset)){var h=E(d,p.additionalOffset,S);c[2]=h.cronValue}return c.join(" ")}},52729:function(t,e,n){"use strict";n.d(e,{Z:function(){return U}});var r=n(26304),i=n(21831),o=n(82394),u=n(82684),a=n(26226),c=n(84969),l=n(90948),s=n(65743),d=n(29989),f=n(38626),p=n(61655),h=n(16853),v=n(65376),m=n(48072),g=n(98677),b=n(84181),y=n(55485),x=n(4190),j=n(30160),O=n(94035),Z=n(70987),w=n(79633),k=n(89370),E=n(95363),T=n(61896),P=n(70515),S=n(38469),I=n(6568),A=function(t){return t.slice(0,10)},D=function(t,e){var n=t.toISOString().slice(0,10),r=e.toISOString().slice(0,10);return"".concat(n,":").concat(r)},L=n(79221),_=n(98684),M=n(28598),C=["height","loading","selected","width","xAxisLabel","yAxisLabel"];function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?N(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var H={bottom:P.iI,left:3*P.iI,right:0,top:1*P.iI},Y=(0,p.Z)((function(t){var e=t.columnType,n=t.data,r=void 0===n?[]:n,o=t.getBarColor,a=t.getXValue,p=t.getYValue,y=t.height,x=t.hideTooltip,O=t.large,C=t.margin,N=void 0===C?{}:C,Y=t.muted,U=t.noPadding,V=t.numberOfXTicks,B=t.renderTooltipContent,F=t.selected,z=t.showAxisLabels,G=t.showTooltip,X=t.showYAxisLabels,W=t.showZeroes,J=t.sortData,q=t.tooltipData,K=t.tooltipLeft,Q=t.tooltipOpen,$=t.tooltipTop,tt=t.width,et=t.xLabelFormat,nt=t.yLabelFormat,rt=O?T.J5:T.VK,it=(0,u.useCallback)((function(t){return a?a(t):t[0]}),[a]),ot=(0,u.useCallback)((function(t){return p?p(t):t[1]}),[p]),ut=(0,u.useContext)(f.ThemeContext),at=e===k.RL.DATETIME,ct=R(R({},H),N);z&&(ct=R(R({},ct),{},{left:ct.left+P.iI}));var lt=J?J(r):r.sort((function(t,e){return e[1]-t[1]})),st=at?r.sort((function(t,e){return new Date(t[0])-new Date(e[0])})).filter((function(t){return!!t[0]})):lt.slice(0,60),dt=tt-(ct.left+ct.right),ft=y-(ct.bottom+ct.top),pt=at?function(t,e){var n,r=t.map((function(t){return new Date(t[0])})).sort((function(t,e){return t-e}));return(0,I.Z)({domain:(n=r,[(0,S.Z)(n[0]),(0,S.Z)(n[n.length-1])]),nice:!0,range:[0,e]})}(st,dt):null,ht=function(t,e){if(null===e)return{};var n=e.ticks().map((function(t){return t.toISOString()})),r={},i=0,o=1;return t.forEach((function(t){var e=new Date(t[0]),u=t[1],a=n[i],c=n[o];if(a&&c){var l=new Date(a),s=new Date(c),d=D(l,s);if(e>=l&&e<s)r[d]=(r[d]||0)+u;else for(;o<n.length||!r[d];)if(i+=1,o+=1,l=new Date(n[i]),s=new Date(n[o]),d=D(l,s),e>=l&&e<s)return void(r[d]=(r[d]||0)+u)}})),n.reduce((function(t,e,n,r){if(0===n)return t;var i=A(e),o=A(r[n-1]);return t.push("".concat(o,":").concat(i)),t}),[]).forEach((function(t){r[t]=r[t]||0})),r}(st,pt);st=pt?Object.entries(ht).sort((function(t,e){return new Date(A(t[0]))-new Date(A(e[0]))})):st;var vt=pt?Math.max.apply(Math,(0,i.Z)(Object.values(ht))):0,mt=st.reduce((function(t,e){return(0!==ot(e)||at||W)&&t.push(it(e)),t}),[]),gt=mt.length,bt=function(t,e,n){return n?.05:t>=30&&e<300?.5:t>=15?.3:t>=5?.1:t>2?.05:2===t?.025:0}(gt,tt,at),yt=(0,g.Z)({domain:mt,paddingInner:U?null:bt,range:[0,dt],round:!1}),xt=(0,b.Z)({domain:[0,Math.max.apply(Math,(0,i.Z)(st.map(ot)))],range:[ft,0],round:!0}),jt=(0,_.K)(ut),Ot={active:((null===ut||void 0===ut?void 0:ut.content)||Z.Z.content).active,default:jt[0],muted:((null===ut||void 0===ut?void 0:ut.monotone)||Z.Z.monotone).gray,selected:((null===ut||void 0===ut?void 0:ut.elevation)||Z.Z.elevation).visualizationAccent},Zt=Ot.default;Y?Zt=Ot.muted:F&&(Zt=Ot.selected);var wt=gt?at?vt:Math.max.apply(Math,(0,i.Z)(st.map((function(t){return ot(t)})))):0,kt=Math.floor(wt/6),Et=[0],Tt=0;if(wt>6)for(;Tt<wt;)Et.push(Tt+kt),Tt+=kt;else for(;Tt<=wt;)Et.push(Tt+1),Tt+=1;wt>9999?ct=R(R({},ct),{},{left:O?8*P.iI:4.1*P.iI}):wt>999&&(ct=R(R({},ct),{},{left:O?5*P.iI:3.6*P.iI}));var Pt=at?2.25:0,St=gt<10||e===k.RL.NUMBER||e===k.RL.NUMBER_WITH_DECIMALS||at||X,It=(0,u.useCallback)((function(t){var e=(0,m.Z)(t)||{x:0,y:0},n=e.x,r=e.y,i=(n-(z?ct.left:0))/dt,o=Math.floor(gt*i),u=st[o];"undefined"===typeof u&&(u=st[0]);var a=it(u);a=a.length>15?"".concat(a.slice(0,21)):a;var c=B?B(u):"".concat(a," (").concat(ot(u),")");G({tooltipData:c,tooltipLeft:n-ct.left,tooltipTop:r+ct.top})}),[st,gt,it,ot,ct.left,ct.top,B,z,G,tt]);return tt<10||!r.length?null:(0,M.jsxs)("div",{children:[(0,M.jsxs)("svg",{height:y+ct.bottom*(at?7.5:3),width:tt,children:[(0,M.jsx)(d.Z,{left:z?ct.left:0,top:ct.top+Pt,children:st.reduce((function(t,e){var n=it(e),r=ot(e);if(0!==r){var i,u=yt.bandwidth(),a=ft-(null!==(i=xt(r))&&void 0!==i?i:0),c=yt(n),l=ft-a;t.push((0,M.jsx)(s.Z,{fill:o?o(e):Zt,height:a,onMouseLeave:function(){return x()},onMouseMove:It,onTouchMove:It,onTouchStart:It,width:u,x:c,y:l},"bar-".concat(n)))}return t}),[])}),z&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(c.Z,{left:ct.left,scale:xt,stroke:Ot.muted,tickFormat:function(t){return nt?nt(t):(0,L.P5)(t)},tickLabelProps:function(){return{fill:Ot.active,fontFamily:E.ry,fontSize:rt,textAnchor:"end",transform:"translate(-2,2.5)"}},tickStroke:Ot.muted,tickValues:Et,top:ct.top+Pt}),(0,M.jsx)(l.Z,{left:ct.left,numTicks:at?void 0:V||6,orientation:"top",scale:pt||yt,stroke:Ot.muted,tickFormat:function(t){return et?et(String(t)):at?t.toISOString().slice(0,10):String(t)},tickLabelProps:function(t){return{fill:St?Ot.active:"transparent",fontFamily:E.ry,fontSize:rt,textAnchor:"middle",transform:at?"rotate(-90,".concat(pt(t),",0) translate(-33,10)"):"translate(0, ".concat(3*ct.bottom,")")}},tickLineProps:{transform:"translate(0,".concat(P.iI,")")},tickStroke:St?Ot.muted:"transparent",top:ft+ct.top+Pt})]})]}),Q&&q&&(0,M.jsx)(h.Z,{left:K,style:v.j,top:$,children:(0,M.jsx)(j.ZP,{color:w.E5,small:!0,children:q})})]})}));var U=function(t){var e=t.height,n=t.loading,i=t.selected,o=t.width,u=t.xAxisLabel,c=t.yAxisLabel,l=(0,r.Z)(t,C);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{style:{display:"flex",height:e,marginBottom:P.iI,width:"100%"},children:[c&&(0,M.jsx)(y.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,M.jsx)(O.Z,{children:(0,M.jsx)(j.ZP,{center:!0,muted:!0,small:!0,children:c})})}),(0,M.jsxs)("div",{style:{height:e,width:c?0===o?o:o-28:o},children:[n&&(0,M.jsx)(x.Z,{}),!n&&(0,M.jsx)(a.Z,{children:function(t){var e=t.height,n=t.width;return(0,M.jsx)(Y,R(R({},l),{},{height:e,selected:i,width:n}))}})]})]}),u&&(0,M.jsx)("div",{style:{paddingLeft:c?36:0,paddingTop:4},children:(0,M.jsx)(j.ZP,{center:!0,muted:!0,small:!0,children:u})})]})}},87862:function(t,e,n){"use strict";n.d(e,{Z:function(){return P}});var r=n(26304),i=n(82394),o=n(75582),u=n(26226),a=n(28940),c=n(82684),l=n(29989),s=n(38626),d=n(11684),f=n(24903),p=n(30160),h=n(44897),v=n(95363),m=n(61896),g=n(70515),b=n(98684),y=n(28598),x=["height","width","xAxisLabel"];function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Z={bottom:0,left:0,right:0,top:0},w=function(t){var e=t.endAngle;return{endAngle:e>Math.PI?2*Math.PI:0,opacity:0,startAngle:e>Math.PI?2*Math.PI:0}},k=function(t){var e=t.startAngle;return{endAngle:t.endAngle,opacity:1,startAngle:e}};function E(t){var e=t.animate,n=t.arcs,r=t.path,i=t.getKey,u=t.getColor,a=t.onClickDatum,c=t.textColor;return(0,d.useTransition)(n,{enter:k,from:e?w:k,keys:i,leave:e?w:k,update:k})((function(t,e,n){var l=n.key,s=r.centroid(e),f=(0,o.Z)(s,2),p=f[0],h=f[1],g=e.endAngle-e.startAngle>=.1;return(0,y.jsxs)("g",{children:[(0,y.jsx)(d.animated.path,{d:(0,d.to)([t.startAngle,t.endAngle],(function(t,n){return r(O(O({},e),{},{endAngle:n,startAngle:t}))})),fill:u(e),onClick:function(){return a(e)},onTouchStart:function(){return a(e)}}),g&&(0,y.jsx)(d.animated.g,{style:{opacity:t.opacity},children:(0,y.jsx)("text",{dy:".33em",fill:c,fontFamily:v.ry,fontSize:m.J5,pointerEvents:"none",textAnchor:"middle",x:p,y:h,children:i(e)})})]},l)}))}function T(t){var e=t.animate,n=void 0===e||e,r=t.data,i=t.getX,o=t.getY,u=t.height,d=t.margin,p=void 0===d?Z:d,v=t.textColor,m=t.width,x=(0,c.useState)(null),j=x[0],w=x[1],k=(0,c.useContext)(s.ThemeContext),T=v||(null===k||void 0===k?void 0:k.content.active)||h.Z.content.active;if(m<10)return null;var P=(0,f.Z)({domain:r.map((function(t){return i(t)})),range:(0,b.K)(k)}),S=m-p.left-p.right,I=u-p.top-p.bottom,A=Math.min(S,I)/2,D=I/2,L=S/2,_=Math.min(S/4,12*g.iI);return(0,y.jsx)("svg",{height:u,width:m,children:(0,y.jsx)(l.Z,{left:L+p.left,top:D+p.top,children:(0,y.jsx)(a.Z,{cornerRadius:g.iI/2,data:j?r.filter((function(t){return JSON.stringify(t)===JSON.stringify(j)})):r,innerRadius:Math.max(A-_,12.25),outerRadius:A,padAngle:.005,pieValue:o,children:function(t){return(0,y.jsx)(E,O(O({},t),{},{animate:n,getColor:function(t){var e=t.data;return P(i(e))},getKey:function(t){var e=t.data;return i(e)},onClickDatum:function(t){var e=t.data;return n&&w(j&&JSON.stringify(j)===JSON.stringify(e)?null:e)},textColor:T}))}})})})}function P(t){var e=t.height,n=t.width,i=t.xAxisLabel,o=(0,r.Z)(t,x),a={};return"undefined"!==typeof e&&(a.height=e),"undefined"!==typeof n&&(a.width=n),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{style:a,children:(0,y.jsx)(u.Z,{children:function(t){var e=t.width,n=t.height;return(0,y.jsx)(T,O(O({},o),{},{height:n,width:e}))}})}),i&&(0,y.jsx)("div",{style:{paddingTop:4},children:(0,y.jsx)(p.ZP,{center:!0,muted:!0,small:!0,children:i})})]})}},98684:function(t,e,n){"use strict";n.d(e,{K:function(){return i}});var r=n(70987),i=function(t){var e=t||r.Z,n=e.brand,i=n.earth200,o=n.earth300,u=n.earth400,a=n.energy200,c=n.energy300,l=n.energy400,s=n.fire200,d=n.fire300,f=n.fire400,p=n.water200,h=n.water300,v=n.water400,m=n.wind200,g=n.wind300,b=n.wind400,y=e.chart;return[y.backgroundPrimary,y.backgroundSecondary,y.backgroundTertiary].concat([b,v,f,l,u,g,h,d,c,o,m,p,s,a,i])}},94035:function(t,e,n){"use strict";var r=n(38626).default.div.withConfig({displayName:"YAxisLabelContainer",componentId:"sc-qwp21x-0"})(["-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-o-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);white-space:nowrap;"]);e.Z=r},79221:function(t,e,n){"use strict";n.d(e,{P5:function(){return r},Vs:function(){return i}});n(81728);function r(t,e){var n=e||{},r=n.maxFractionDigits,i=n.minAmount,o=Intl.NumberFormat("en-US",{maximumFractionDigits:r||2,notation:"compact"});return"number"!==typeof t?t:t>=(i||1e4)?o.format(t):t.toString()}function i(t,e,n){var r,i;if("undefined"===typeof t||"undefined"===typeof e)return 0;var o=null===t||void 0===t||null===(r=t(e,n))||void 0===r||null===(i=r.props)||void 0===i?void 0:i.children;return(Array.isArray(o)?o:[o]).join("").length}},48888:function(t,e,n){"use strict";n.d(e,{AE:function(){return i},H3:function(){return o},mW:function(){return u},oE:function(){return a},yg:function(){return r}});var r="tabs[]",i="show_columns",o="column",u="Reports",a="Visualizations"},17679:function(t,e,n){"use strict";n.d(e,{O$:function(){return ot},Fk:function(){return ut}});var r=n(75582),i=n(12691),o=n.n(i),u=n(26304),a=n(21831),c=n(82394),l=n(82684),s=n(26226),d=n(84969),f=n(90948),p=n(65743),h=n(28108),v=n(79487),m=n(29989),g=n(38626),b=n(61655),y=n(16853),x=n(65376),j=n(48072),O=n(24903),Z=n(84181),w=n(98677),k=n(30160),E=n(70987),T=n(79633),P=n(61896),S=n(70515),I=n(95363),A=n(28598),D=["height","width"];function L(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?L(Object(n),!0).forEach((function(e){(0,c.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var M={bottom:5*S.iI,left:3*S.iI,right:20*S.iI,top:0},C=function(t){return t.x},N=function(t){return t.y},R=(0,b.Z)((function(t){var e=t.data,n=t.height,r=t.hideTooltip,i=t.large,o=t.margin,u=void 0===o?{}:o,c=t.renderTooltipContent,s=t.showTooltip,b=t.tooltipData,S=t.tooltipLeft,D=t.tooltipOpen,L=t.tooltipTop,R=t.width,H=t.xAxisLabel,Y=t.xNumTicks,U=t.yLabelFormat,V=t.ySerialize,B=U;B||(B=function(t){return t.length>20?"".concat(t.substring(0,20),"..."):t});var F=i?P.iD:P.J5,z=(0,l.useContext)(g.ThemeContext),G=_(_({},M),u),X=e.slice(Math.max(0,e.length-50)),W=Object.keys(X[0]||[]).filter((function(t){return"x"===t})),J=(0,O.Z)({domain:W,range:[T.hM]}),q=(0,Z.Z)({domain:[0,Math.max.apply(Math,(0,a.Z)(X.map(C)))],nice:!0}),K=(0,w.Z)({domain:X.map(N),padding:.35}),Q={active:(null===z||void 0===z?void 0:z.content.default)||E.Z.content.default,backgroundPrimary:(null===z||void 0===z?void 0:z.chart.backgroundPrimary)||E.Z.chart.backgroundPrimary,backgroundSecondary:(null===z||void 0===z?void 0:z.chart.backgroundSecondary)||E.Z.chart.backgroundSecondary,muted:(null===z||void 0===z?void 0:z.content.muted)||E.Z.content.muted,primary:(null===z||void 0===z?void 0:z.chart.primary)||E.Z.chart.primary,tooltipBackground:(null===z||void 0===z?void 0:z.background.navigation)||E.Z.background.navigation},$=X.map(V),tt=Math.min(Math.max.apply(Math,(0,a.Z)($.map((function(t){return String(t).length})))),20);6*tt>2*G.right?G.right+=5.5*tt:6*tt>=G.right&&(G.right+=3.75*tt);var et=R-G.left-G.right,nt=n-G.top-G.bottom;G.left+=7*tt,q.rangeRound([0,et]),K.rangeRound([nt,0]);var rt=X.map(C).length,it=K($[rt-1]),ot=(0,l.useCallback)((function(t){var e=(0,j.Z)(t)||{x:0,y:0},n=e.x,r=e.y,i=1-(r-it/2)/(nt-it),o=Math.floor(i*rt),u=X[o];"undefined"===typeof u&&(u=X[o-1]),r>it&&r<nt-it&&s({tooltipData:u,tooltipLeft:n,tooltipTop:r+G.top})}),[X,rt,G.top,s,it,nt]);return R<10?null:(0,A.jsxs)("div",{children:[(0,A.jsxs)("svg",{height:n,width:R,children:[(0,A.jsx)(p.Z,{fill:"transparent",height:n-(G.top+G.bottom),onMouseLeave:function(){return r()},onMouseMove:ot,onTouchMove:ot,onTouchStart:ot,rx:14,width:R-G.left,x:G.left,y:0}),(0,A.jsxs)(m.Z,{left:G.left,top:G.top,children:[(0,A.jsx)(h.Z,{color:J,data:X,height:nt,keys:W,pointerEvents:"none",xScale:q,y:V,yScale:K,children:function(t){return t.map((function(t){return t.bars.map((function(e){return(0,A.jsx)("g",{children:(0,A.jsx)(A.Fragment,{children:(0,A.jsx)("rect",{fill:Q.backgroundPrimary,height:e.height,pointerEvents:"none",rx:4,width:e.width,x:e.x,y:e.y})})},"barstack-horizontal-".concat(t.index,"-").concat(e.index))}))}))}}),(0,A.jsx)(d.Z,{hideTicks:!0,scale:K,stroke:Q.muted,tickFormat:function(t){return B(t)},tickLabelProps:function(){return{fill:Q.active,fontFamily:I.ry,fontSize:F,style:{width:"10px"},textAnchor:"end"}},tickStroke:Q.muted,tickValues:$,top:2}),(0,A.jsx)(f.Z,{label:H,labelProps:{fill:Q.muted,fontFamily:I.ry,fontSize:F,textAnchor:"middle"},numTicks:Y,scale:q,stroke:Q.muted,tickLabelProps:function(){return{fill:Q.active,fontFamily:I.ry,fontSize:F,textAnchor:"middle"}},tickStroke:Q.muted,top:nt})]}),b&&(0,A.jsx)("g",{children:(0,A.jsx)(v.Z,{from:{x:G.left,y:L},pointerEvents:"none",stroke:T.Ej,strokeDasharray:"5,2",strokeWidth:1,to:{x:et+G.left,y:L}})})]}),D&&b&&(0,A.jsx)(y.Z,{left:S,style:_(_({},x.j),{},{backgroundColor:Q.tooltipBackground}),top:L,children:(0,A.jsxs)(k.ZP,{black:!0,small:!0,children:[null===c||void 0===c?void 0:c(b),!c&&C(b).toFixed(4)]})})]})}));var H,Y,U,V,B=function(t){var e=t.height,n=t.width,r=(0,u.Z)(t,D);return(0,A.jsx)("div",{style:{height:e,width:"undefined"===typeof n?"100%":n},children:(0,A.jsx)(s.Z,{children:function(t){var e=t.width,n=t.height;return(0,A.jsx)(R,_(_({},r),{},{height:n,width:e}))}})})},F=n(97618),z=n(52729),G=n(48670),X=n(87862),W=n(89370),J=n(86735),q=(J.Qj,J.tS,J.tS,J.tS,J.tS,J.Qj,J.Qj,J.Qj,J.tS,J.tS,H={},(0,c.Z)(H,W.RL.EMAIL,"domain_distribution"),(0,c.Z)(H,W.RL.TEXT,"word_distribution"),(0,c.Z)(H,W.RL.LIST,"element_distribution"),(0,c.Z)(H,"default","value_counts"),H),K=[].concat((0,a.Z)(W.P_),[W.RL.TEXT,W.RL.EMAIL,W.RL.LIST]),Q=(Y={},(0,c.Z)(Y,W.RL.EMAIL,"Domain distribution"),(0,c.Z)(Y,W.RL.TEXT,"Word distribution"),(0,c.Z)(Y,W.RL.LIST,"Element distribution"),(0,c.Z)(Y,"default","Distribution of values"),n(31353));!function(t){t.RANGE="range"}(U||(U={})),function(t){t.BAR_HORIZONTAL="bar_horizontal",t.LINE_CHART="line_chart",t.HISTOGRAM="histogram"}(V||(V={}));var $=n(48888),tt=n(92083),et=n.n(tt),nt=n(81728);function rt(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r||{},o=i.calculateAnomaly,u=i.feature,c=i.getYValue,l=t.x,s=t.x_metadata,d=s.label,f=s.label_type,p=t.y,h=(null===p||void 0===p?void 0:p.map((function(t){return null===c||void 0===c?void 0:c(t)})))||[],v=Math.max.apply(Math,(0,a.Z)(h)),m=Math.max.apply(Math,(0,a.Z)(h)),g=(0,J.Sm)(h),b=(0,J.IN)(h),y=g/Math.max(1,h.length),x=e[d]||u,j=null===x||void 0===x?void 0:x.columnType,O=W.RL.DATETIME===j,Z=[],w=[],k=l.length,E=l.map((function(t,e){var r,i,u,a,c=t.label,l=t.max,s=t.min,d=p[e];if(U.RANGE===f)if(n||(n=l-s),a=W.RL.NUMBER===j&&n<=k)r=Number(s);else if(r=n/2+s,O){var x="M/D/YYYY",E="M/D/YYYY",T="M/D/YYYY";n<=1?(x=n<=.1?"H:mm:ss.SSS":"H:mm:ss",E="H:mm:ss.SSS",T="H:mm:ss.SSS"):n<=60?(x="H:mm",E="H:mm:ss",T="H:mm:ss"):n<=3600?(x="H:mm",E="M/D/YYYY H:mm",T="H:mm"):n<=86400&&(E="M/D/YYYY H:mm",T="M/D/YYYY H:mm"),r=et().unix(r).format(x),i=et().unix(s).format(E),u=et().unix(l).format(T)}else r=(0,nt.QV)(r);else r=c;var P=e>=1?p[e-1]:null,S=!1;o&&(S=o({x:t,y:d,yPrevious:P,yValues:h,yValuesAverage:y,yValuesMax:v,yValuesMin:m,yValuesStandardDeviation:b,yValuesSum:g}));var I={hideRange:a,isUnusual:S,x:t,xLabel:r,xLabelMax:u,xLabelMin:i,y:d};return S&&(a?w.push(I):Z.push(I)),I}));return{distribution:{data:E,featureUUID:d},rangedWithUnusualDistribution:(0,J.YC)(Z,(function(t){var e=t.y;return c(e)}),{ascending:!1}),unusualDistribution:(0,J.YC)(w,(function(t){var e=t.y;return c(e)}),{ascending:!1})}}var it=n(40489);var ot=12*S.iI;function ut(t){var e=t.columnTypes,n=t.columns,i=t.insightsByFeatureUUID,u=t.insightsOverview,a=t.noColumnLinks,c=void 0!==a&&a,l=t.statistics;return function(t,a,s){var d=s.width,f=n[a],p=e[f],h=Q.T5[p],v=(i[f]||{}).charts,m=u.time_series,g=n.filter((function(t){return e[t]===W.RL.DATETIME})),b=null===m||void 0===m?void 0:m.map((function(t){return rt(t,{},{feature:{columnType:p,uuid:f}}).distribution})),y={};null===b||void 0===b||b.forEach((function(t,e){var n=t.data;y[g[e]]=(0,A.jsx)(z.Z,{data:n.map((function(t){var e=t.x,n=t.xLabel,r=t.xLabelMax,i=t.xLabelMin;return[n,t.y.count,i,r,e.min,e.max]})),height:ot,large:!0,margin:{bottom:0,left:0,right:0,top:0},renderTooltipContent:function(t){var e=(0,r.Z)(t,4),n=e[1],i=e[2],o=e[3];return(0,A.jsxs)("p",{children:["Rows: ",n,(0,A.jsx)("br",{}),"Start: ",i,(0,A.jsx)("br",{}),"End: ",o]})},sortData:function(t){return(0,J.YC)(t,"[4]")}},f)}));var x,j=null===v||void 0===v?void 0:v.find((function(t){var e=t.type;return V.HISTOGRAM===e})),O=(j?rt(j,{},{feature:{columnType:p,uuid:f},getYValue:function(t){return t.value}}):{}).distribution,Z=void 0===O?null:O,w=q[p]||q.default,E=null===l||void 0===l?void 0:l["".concat(f,"/").concat(w)],T=Object.entries(E||{}).map((function(t){var e=(0,r.Z)(t,2),n=e[0];return{x:e[1],y:n}})),P=W.RL.TRUE_OR_FALSE===p;if(W.RL.DATETIME===p)x=y[f];else if(Z&&!P)x=(0,A.jsx)(z.Z,{data:Z.data.map((function(t){var e=t.hideRange,n=t.isUnusual,r=t.x;return[t.xLabel,t.y.value,r.min,r.max,n,e]})),height:ot,margin:{bottom:0,left:0,right:0,top:0},renderTooltipContent:function(t){var e=(0,r.Z)(t,6),n=e[1],i=e[2],o=e[3],u=e[5];return(0,A.jsxs)("p",{children:[u&&(0,A.jsxs)(A.Fragment,{children:["Rows: ",n,(0,A.jsx)("br",{}),"Value: ",i]}),!u&&(0,A.jsxs)(A.Fragment,{children:["Rows: ",n,(0,A.jsx)("br",{}),"Range: ",i," - ",o]})]})},sortData:function(t){return(0,J.YC)(t,"[2]")},width:d-2*S.iI});else if(K.includes(p)){var I=(0,J.YC)((0,J.YC)(T,"x",{ascending:!1}).slice(0,5),"x");x=(0,A.jsx)(B,{data:I,height:ot,margin:{bottom:0,left:0,right:20,top:0},renderTooltipContent:function(t){var e=t.x,n=t.y;return"".concat(n," appears ").concat((0,nt.x6)(e)," times")},xNumTicks:2,ySerialize:function(t){return t.y}})}else P&&E&&(x=(0,A.jsx)(X.Z,{data:Object.entries(E),getX:function(t){var e=(0,r.Z)(t,2),n=e[0],i=e[1];return"".concat(n," (").concat((0,nt.x6)(i),")")},getY:function(t){return(0,r.Z)(t,2)[1]},height:ot}));return(0,A.jsxs)("div",{style:{padding:S.iI},children:[(0,A.jsxs)("div",{style:{alignItems:"center",display:"flex",marginBottom:S.iI},children:[h&&(0,A.jsx)(F.Z,{title:W.Rp[p],children:(0,A.jsx)(h,{size:2*S.iI})}),(0,A.jsx)("div",{style:{marginLeft:.5*S.iI,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:d-4.5*S.iI},children:c?(0,A.jsx)(k.ZP,{bold:!0,default:!0,title:n[a],children:n[a]}):(0,A.jsx)(o(),{as:(0,it.o_)($.oE,a),href:"/datasets/[...slug]",passHref:!0,children:(0,A.jsx)(G.Z,{bold:!0,monospace:!0,secondary:!0,small:!0,title:n[a],children:n[a]})})})]}),x,!x&&(0,A.jsx)("div",{style:{height:ot}})]})}}},40489:function(t,e,n){"use strict";n.d(e,{o_:function(){return c}});var r=n(75582),i=n(34376),o=n(48888);n(82684),n(12691),n(71180),n(58036),n(97618),n(55485),n(48670),n(38276),n(30160),n(72473),n(28598);var u,a=n(69419);!function(t){t.DATASETS="datasets",t.DATASET_DETAIL="dataset_detail",t.COLUMNS="features",t.COLUMN_DETAIL="feature_detail",t.EXPORT="export"}(u||(u={}));var c=function(t,e){var n=(0,i.useRouter)().query.slug,c=void 0===n?[]:n,l=(0,r.Z)(c,1)[0],s=(0,a.iV)(),d=s.show_columns,f=s.column,p="/".concat(u.DATASETS,"/").concat(l),h="".concat(o.H3,"=").concat(f||e),v="".concat(o.yg,"=").concat(t,"&").concat(h,"&").concat(o.AE,"=").concat(d||0);return"".concat(p,"?").concat(v)}},44265:function(t,e,n){"use strict";n.d(e,{Az:function(){return l},BF:function(){return c},Do:function(){return d},IK:function(){return a},P0:function(){return i},VO:function(){return u},sZ:function(){return s}});var r,i,o=n(82394),u=n(41143).V,a=[u.FAILED,u.COMPLETED,u.RUNNING,u.CANCELLED,u.INITIAL],c=[u.INITIAL,u.RUNNING],l=[u.CANCELLED,u.COMPLETED,u.FAILED],s="__mage_variables",d=(r={},(0,o.Z)(r,u.CANCELLED,"Cancelled"),(0,o.Z)(r,u.COMPLETED,"Done"),(0,o.Z)(r,u.FAILED,"Failed"),(0,o.Z)(r,u.INITIAL,"Ready"),(0,o.Z)(r,u.RUNNING,"Running"),r);!function(t){t.PIPELINE_UUID="pipeline_uuid[]",t.STATUS="status[]",t.TAG="pipeline_tag[]"}(i||(i={}))},30229:function(t,e,n){"use strict";n.d(e,{PN:function(){return a},TR:function(){return h},U5:function(){return l},Wb:function(){return p},Xm:function(){return o},Z4:function(){return s},fq:function(){return c},gm:function(){return d},kJ:function(){return f}});var r,i,o,u=n(82394),a="__bookmark_values__";!function(t){t.API="api",t.EVENT="event",t.TIME="time"}(o||(o={}));var c,l,s=(r={},(0,u.Z)(r,o.API,(function(){return"API"})),(0,u.Z)(r,o.EVENT,(function(){return"event"})),(0,u.Z)(r,o.TIME,(function(){return"schedule"})),r);!function(t){t.ACTIVE="active",t.INACTIVE="inactive"}(c||(c={})),function(t){t.ONCE="@once",t.HOURLY="@hourly",t.DAILY="@daily",t.WEEKLY="@weekly",t.MONTHLY="@monthly",t.ALWAYS_ON="@always_on"}(l||(l={}));var d,f,p=[l.ONCE,l.HOURLY,l.DAILY,l.WEEKLY,l.MONTHLY];!function(t){t.INTERVAL="frequency[]",t.STATUS="status[]",t.TAG="tag[]",t.TYPE="type[]"}(d||(d={})),function(t){t.CREATED_AT="created_at",t.NAME="name",t.PIPELINE="pipeline_uuid",t.STATUS="status",t.TYPE="schedule_type"}(f||(f={}));var h=(i={},(0,u.Z)(i,f.CREATED_AT,"Created at"),(0,u.Z)(i,f.NAME,"Name"),(0,u.Z)(i,f.PIPELINE,"Pipeline"),(0,u.Z)(i,f.STATUS,"Active"),(0,u.Z)(i,f.TYPE,"Type"),i)},14532:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return nt}});var r=n(77837),i=n(75582),o=n(82394),u=n(38860),a=n.n(u),c=n(82684),l=n(69864),s=n(34376),d=n(23192),f=n(71180),p=n(15338),h=n(97618),v=n(55485),m=n(85854),g=n(55072),b=n(75457),y=n(44265),x=n(57653),j=n(93808),O=n(38276),Z=n(4190),w=n(30160),k=n(35686),E=n(21831),T=n(26304),P=n(90299),S=n(93859),I=n(24138),A=n(48339),D=n(46684),L=n(70515),_=n(66909),M=n(8955),C=n(16488),N=n(81728),R=n(86735),H=n(28598),Y=["blockRuns","blocksOverride","columns","dataType","height","heightOffset","loadingData","outputs","pipeline","renderColumnHeader","rows","selectedRun","selectedTab","setSelectedTab","textData"];function U(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function V(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?U(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var B={uuid:"Dependency tree"},F={uuid:"Block output"},z=[F,B];var G=n(28795),X=n(81655),W=n(3917),J=n(72619),q=n(3314),K=n(69419),Q=n(70320);function $(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function et(t){var e=t.pipeline,n=t.pipelineRun,r=(0,Q.q)(),o=(0,s.useRouter)(),u=(0,K.iV)(),a=null!==u&&void 0!==u&&u.page?u.page:0,j=(0,c.useState)(null),U=j[0],$=j[1],et=(0,c.useState)(z[0]),nt=et[0],rt=et[1],it=(0,c.useState)(null),ot=it[0],ut=it[1],at=k.ZP.blocks.pipeline_runs.list(null===n||void 0===n?void 0:n.id,{},{refreshInterval:5e3}).data,ct=e.uuid,lt=k.ZP.pipelines.detail(ct,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,st=(0,c.useMemo)((function(){return tt(tt({},null===lt||void 0===lt?void 0:lt.pipeline),{},{uuid:ct})}),[lt,ct]),dt=k.ZP.pipeline_runs.detail(n.id,{_format:"with_basic_details"},{refreshInterval:3e3,revalidateOnFocus:!0}).data,ft=(0,c.useMemo)((function(){return(null===dt||void 0===dt?void 0:dt.pipeline_run)||{}}),[dt]),pt=ft.execution_date,ht=ft.id,vt=ft.status,mt={_limit:g.Q,_offset:a*g.Q,pipeline_run_id:ht},gt=null===u||void 0===u?void 0:u[X.lG.SORT_COL_IDX],bt=null===u||void 0===u?void 0:u[X.lG.SORT_DIRECTION];if(gt){var yt=d.fi[gt],xt=bt||X.sh.ASC;mt.order_by="".concat(yt,"%20").concat(xt)}var jt=k.ZP.block_runs.list(mt,{refreshInterval:5e3}),Ot=jt.data,Zt=jt.mutate,wt=(0,c.useMemo)((function(){return(null===Ot||void 0===Ot?void 0:Ot.block_runs)||[]}),[Ot]),kt=(0,l.Db)(k.ZP.pipeline_runs.useUpdate(ht),{onSuccess:function(t){return(0,J.wD)(t,{callback:function(){$(null),null===Zt||void 0===Zt||Zt()},onErrorCallback:function(t,e){return ut({errors:e,response:t})}})}}),Et=(0,i.Z)(kt,2),Tt=Et[0],Pt=Et[1].isLoading,St=k.ZP.outputs.block_runs.list(null===U||void 0===U?void 0:U.id),It=St.data,At=St.loading;(0,c.useEffect)((function(){U||(null===nt||void 0===nt?void 0:nt.uuid)!==F.uuid||rt(B)}),[U,null===nt||void 0===nt?void 0:nt.uuid]);var Dt=(0,c.useMemo)((function(){return(0,H.jsx)(d.ZP,{blockRuns:wt,onClickRow:function(t){$((function(e){var n=wt[t],r=(null===e||void 0===e?void 0:e.id)!==n.id?n:null;return r&&rt((function(t){return t!==F?F:t})),r}))},pipeline:st,selectedRun:U,setErrors:ut,sortableColumnIndexes:d.lG})}),[wt,st,U]),Lt=(null===st||void 0===st?void 0:st.type)!==x.qL.STREAMING&&vt&&vt!==y.VO.COMPLETED,_t=((null===st||void 0===st?void 0:st.type)===x.qL.PYTHON||(null===st||void 0===st?void 0:st.type)===x.qL.INTEGRATION)&&U&&y.Az.includes(vt),Mt=(0,c.useMemo)((function(){var t;return(null===Ot||void 0===Ot||null===(t=Ot.metadata)||void 0===t?void 0:t.count)||[]}),[Ot]),Ct=(0,c.useMemo)((function(){return(0,H.jsx)(O.Z,{p:2,children:(0,H.jsx)(g.ZP,{maxPages:g.Et,onUpdate:function(t){var e=Number(t),n=tt(tt({},u),{},{page:e>=0?e:0});$(null),o.push("/pipelines/[pipeline]/runs/[run]","/pipelines/".concat(ct,"/runs/").concat(ht,"?").concat((0,K.uM)(n)))},page:Number(a),totalPages:Math.ceil(Mt/g.Q)})})}),[a,ht,ct,u,o,Mt]),Nt=(0,c.useCallback)((function(t){return function(t){var e=t.blockRuns,n=t.blocksOverride,r=(t.columns,t.dataType,t.height),o=t.heightOffset,u=t.loadingData,a=t.outputs,c=t.pipeline,l=t.renderColumnHeader,s=(t.rows,t.selectedRun),d=t.selectedTab,f=t.setSelectedTab,h=(t.textData,V({},(0,T.Z)(t,Y)));h.blockStatus=(0,C.IJ)(e);var m=[],g=[],b=(0,N.bH)();if(!u){var y,x={};null===a||void 0===a||a.forEach((function(t){var e=t.type;x[e]||(x[e]={outputs:[],priority:Object.keys(x).length}),x[e].outputs.push(t)})),null===(y=(0,R.YC)(Object.entries(x),(function(t){var e=(0,i.Z)(t,2);return e[0],e[1].priority})))||void 0===y||y.forEach((function(t,e){var n=(0,i.Z)(t,2),u=n[0],a=n[1].outputs,c=[];null===a||void 0===a||a.forEach((function(t,n){var i,a=t.sample_data,s=t.text_data,d=t.type,f=(0,H.jsx)(O.Z,{ml:2,children:(0,H.jsx)(w.ZP,{children:"This block run has no output."})},"output-empty-".concat(e,"-").concat(n));if(d===A.Gi.TABLE){var p=((null===a||void 0===a?void 0:a.columns)||[]).slice(0,40),h=(null===a||void 0===a?void 0:a.rows)||[];i=h&&(null===h||void 0===h?void 0:h.length)>=1?(0,H.jsx)(S.Z,{columnHeaderHeight:l?_.Eh:0,columns:p,height:r-o-90,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,renderColumnHeader:l,rows:h},"output-table-".concat(e,"-").concat(n)):f}else{var v=(0,N.Pb)(s)?JSON.stringify(JSON.parse(s),null,2):s;i=s?(0,H.jsx)(O.Z,{ml:2,children:(0,H.jsx)(w.ZP,{monospace:!0,children:(0,H.jsx)("pre",{children:v})})},"output-text-".concat(e,"-").concat(n)):f}var y=b[e];A.Gi.TEXT===u?(c.push(i),0===n&&g.push({uuid:"Block output ".concat(n+1).concat(y)})):(m.push(i),g.push({uuid:"Block output ".concat(n+1).concat(y)}))})),A.Gi.TEXT===u&&m.push(c)}))}var j=m,k=g,U=z;(null===k||void 0===k?void 0:k.length)>=2&&(U=[F].concat((0,E.Z)(k.slice(1)),[B]));var G=d&&f,X=j[U.findIndex((function(t){return t.uuid===(null===d||void 0===d?void 0:d.uuid)}))];return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("div",{style:{position:"fixed",top:D.Mz},children:G&&(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(O.Z,{py:0,children:(0,H.jsx)(P.Z,{onClickTab:f,regularSizeText:!0,selectedTabUUID:null===d||void 0===d?void 0:d.uuid,tabs:s?U:[B],underlineStyle:!0})})})}),(0,H.jsxs)("div",{style:{position:"relative",top:M.u$},children:[G&&(0,H.jsx)(p.Z,{light:!0}),(!s||B.uuid===(null===d||void 0===d?void 0:d.uuid))&&(0,H.jsx)(I.ZP,V(V({},h),{},{blocksOverride:n,enablePorts:!1,height:r,heightOffset:(o||0)+(G?M.u$+1:0),pipeline:c})),s&&d&&B.uuid!==(null===d||void 0===d?void 0:d.uuid)&&(0,H.jsxs)(H.Fragment,{children:[u&&(0,H.jsx)(O.Z,{mt:2,children:(0,H.jsx)(v.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,H.jsx)(Z.Z,{color:"white",large:!0})})}),!u&&(0,H.jsx)(O.Z,{py:L.cd,children:X})]})]})]})}(tt(tt({},t),{},{blockRuns:wt,blocksOverride:null===at||void 0===at?void 0:at.blocks,loadingData:At,outputs:null===It||void 0===It?void 0:It.outputs,selectedRun:U,selectedTab:nt,setSelectedTab:rt,showDynamicBlocks:!0}))}),[wt,at,It,At,U,nt,rt]);return(0,H.jsxs)(b.Z,{breadcrumbs:[{label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(ct,"/runs"),href:"/pipelines/[pipeline]/runs"}},{label:function(){return r?(0,W.XG)(pt,r):pt}}],buildSidekick:Nt,errors:ot,pageName:G.M.RUNS,pipeline:st,setErrors:ut,subheader:(Lt||_t)&&(0,H.jsxs)(v.ZP,{alignItems:"center",children:[y.BF.includes(vt)&&(0,H.jsxs)(h.Z,{children:[(0,H.jsx)(w.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline is running"}),(0,H.jsx)(O.Z,{mr:1}),(0,H.jsx)(Z.Z,{inverted:!0}),(0,H.jsx)(O.Z,{mr:2})]}),Lt&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(f.ZP,{danger:!0,loading:Pt,onClick:function(t){(0,q.j)(t),Tt({pipeline_run:{pipeline_run_action:"retry_blocks"}})},outline:!0,children:"Retry incomplete blocks"}),(0,H.jsx)(O.Z,{mr:2})]}),_t&&(0,H.jsxs)(f.ZP,{loading:Pt,onClick:function(t){(0,q.j)(t),Tt({pipeline_run:{from_block_uuid:U.block_uuid,pipeline_run_action:"retry_blocks"}})},outline:!0,primary:!0,children:["Retry from selected block (",U.block_uuid,")"]})]}),title:function(t){var e=t.name;return"".concat(e," runs")},uuid:"".concat(G.M.RUNS,"_").concat(ct,"_").concat(ht),children:[(0,H.jsx)(O.Z,{mt:L.cd,px:L.cd,children:(0,H.jsx)(m.Z,{level:5,children:"Block runs"})}),(0,H.jsx)(p.Z,{light:!0,mt:L.cd,short:!0}),Dt,Ct]})}et.getInitialProps=function(){var t=(0,r.Z)(a().mark((function t(e){var n,r,i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.query,r=n.pipeline,i=n.run,t.abrupt("return",{pipeline:{uuid:r},pipelineRun:{id:i}});case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();var nt=(0,j.Z)(et)},39525:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs/[run]",function(){return n(14532)}])}},function(t){t.O(0,[2678,1154,844,5820,1124,1751,5896,9161,2631,4267,600,8487,8264,7858,5499,5457,4366,722,3419,9774,2888,179],(function(){return e=39525,t(t.s=e);var e}));var e=t.O();_N_E=e}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{44265:function(n,e,t){"use strict";t.d(e,{Az:function(){return s},BF:function(){return c},Do:function(){return a},IK:function(){return u},P0:function(){return o},VO:function(){return l},sZ:function(){return d}});var r,o,i=t(82394),l=t(41143).V,u=[l.FAILED,l.COMPLETED,l.RUNNING,l.CANCELLED,l.INITIAL],c=[l.INITIAL,l.RUNNING],s=[l.CANCELLED,l.COMPLETED,l.FAILED],d="__mage_variables",a=(r={},(0,i.Z)(r,l.CANCELLED,"Cancelled"),(0,i.Z)(r,l.COMPLETED,"Done"),(0,i.Z)(r,l.FAILED,"Failed"),(0,i.Z)(r,l.INITIAL,"Ready"),(0,i.Z)(r,l.RUNNING,"Running"),r);!function(n){n.PIPELINE_UUID="pipeline_uuid[]",n.STATUS="status[]",n.TAG="pipeline_tag[]"}(o||(o={}))},25050:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return ln}});var r=t(77837),o=t(38860),i=t.n(o),l=t(82684),u=t(75457),c=t(93808),s=t(75582),d=t(82394),a=t(97618),f=t(55485),v=t(85854),m=t(44265),p=t(38276),h=t(4190),x=t(30160),b=t(44897),j=t(72473),Z=t(38626),g=t(42631),_=t(95363),I=t(70515),y=t(61896),P=Z.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],g.n_,I.cd*I.iI,(function(n){return"\n background-color: ".concat((n.theme.background||b.Z.background).panel,";\n border: 1px solid ").concat((n.theme.borders||b.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||b.Z.accent).negative,";\n ")}),(function(n){return n.selected&&n.primary&&"\n border-color: ".concat((n.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.selected&&n.default&&"\n border-color: ".concat((n.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(n){return n.selected&&n.success&&"\n border-color: ".concat((n.theme.background||b.Z.background).success,";\n ")}),(function(n){return n.selected&&n.warning&&"\n border-color: ".concat((n.theme.accent||b.Z.accent).warning,";\n ")}),(function(n){return n.danger&&"\n border-color: ".concat((n.theme.accent||b.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n border-color: ".concat((n.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n border-color: ".concat((n.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(n){return n.success&&"\n border-color: ".concat((n.theme.background||b.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n border-color: ".concat((n.theme.accent||b.Z.accent).warning,";\n ")})),k=(0,Z.css)([""," "," "," "," ",""],(function(n){return n.danger&&"\n background-color: ".concat((n.theme.accent||b.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n background-color: ".concat((n.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||b.Z.interactive).defaultBackground,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||b.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n background-color: ".concat((n.theme.accent||b.Z.accent).warning,";\n ")})),N=Z.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],k,y.iD,g.D7,_.ry,(function(n){return n.danger&&"\n color: ".concat((n.theme.content||b.Z.content).active,";\n ")}),(function(n){return n.primary&&"\n color: ".concat((n.theme.content||b.Z.content).active,";\n ")}),(function(n){return(n.default||n.success)&&"\n "}),(function(n){return n.default&&"\n color: ".concat((n.theme.content||b.Z.content).default,";\n ")}),(function(n){return n.success&&"\n color: ".concat((n.theme.content||b.Z.content).inverted,";\n ")}),(function(n){return n.warning&&"\n color: ".concat((n.theme.content||b.Z.content).inverted,";\n ")})),O=Z.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],k,(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||b.Z.interactive).focusBackground,";\n ")})),E=t(81728),w=t(92083),M=t.n(w),L=t(41143),C=t(86735);function S(n){var e;return Object.keys((null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{}).sort()}function A(n){var e,t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null,i=null,l=null,u=null,c={},d=(null===n||void 0===n?void 0:n.block_runs)||[],a=(null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{},f=(null===n||void 0===n||null===(t=n.metrics)||void 0===t?void 0:t.pipeline)||{},v=D(n);return Object.entries(a).forEach((function(n){var e,t=(0,s.Z)(n,2),d=t[0],a=t[1];if(!r||r===d){var m,p=a||{},h=p.destinations,x=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,b=p.sources,j=void 0===b?{records:null}:b,Z=v[d]||[];if(r&&r===d&&Z.every((function(n){var e=n.status;return L.V.COMPLETED===e}))&&null===o&&(o=0),null!==f&&void 0!==f&&null!==(e=f[d])&&void 0!==e&&e.record_counts)null===o&&(o=0),o+=Number(null===f||void 0===f||null===(m=f[d])||void 0===m?void 0:m.record_counts);else null!==j&&void 0!==j&&j.records&&(null===o&&(o=0),o+=Number(j.records));null!==x&&void 0!==x&&x.records_updated?(null===l&&(l=0),l+=Number(x.records_updated),null===u&&(u=0),u+=Number(x.records_updated)):null!==x&&void 0!==x&&x.records_inserted?(null===l&&(l=0),l+=Number(x.records_inserted),null===i&&(i=0),i+=Number(x.records_inserted)):null!==x&&void 0!==x&&x.records_affected&&(null===l&&(l=0),l+=Number(x.records_affected)),["destinations","sources"].forEach((function(n){var e=a[n]||{};null!==e&&void 0!==e&&e.error&&(c[d]||(c[d]={}),c[d][n]={error:null===e||void 0===e?void 0:e.error,errors:null===e||void 0===e?void 0:e.errors,message:null===e||void 0===e?void 0:e.message})}))}})),null===d||void 0===d||d.forEach((function(n){var e=n.block_uuid,t=n.metrics,r=n.status;if(L.V.FAILED===r&&null!==t&&void 0!==t&&t.error&&e){var o=e.split(":"),i=(0,s.Z)(o,3),l=(i[0],i[1]);i[2];c[l]||(c[l]={}),c[l][""]=t.error}})),{errors:c,records:o,recordsInserted:i,recordsProcessed:l,recordsUpdated:u}}function 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 L.V.COMPLETED===e})),l=i.map((function(n){var e=n.completed_at,t=n.started_at,r=M().utc(e),o=M().utc(t);return r.diff(o,"second")})),u=i.length,c=o.length;t[r]={completed:u,runtime:l.length>=1?(0,C.Sm)(l)/l.length:null,total:c}})),t}function T(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 L.V.COMPLETED===e}))}(n).length||0;return r/t}function R(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=M().utc();if(e)i=M().utc(e);else if([m.VO.CANCELLED,m.VO.FAILED].includes(o)){var l=(0,C.YC)(r,(function(n){return n.started_at}),{ascending:!1})[0];i=M().utc(l.updated_at)}var u=M().utc(n.created_at);return i.diff(u,"second")}function U(n,e){var t,r,o,i,l,u=D(n),c=V(n),s=(null===n||void 0===n?void 0:n.metrics)||{blocks:null,pipeline:null},d=s.blocks||{},a=s.pipeline||{},f=(d[e],a[e],c[e]||{completed:null,total:null}),v=f.completed,m=f.total,p=v&&m?v/m:0,h=u[e]||[],x=h.every((function(n){var e=n.status;return L.V.COMPLETED===e})),b=(0,C.YC)(h,(function(n){return n.updated_at}),{ascending:!1})[0],j=null===(t=(0,C.YC)(h,(function(n){return n.started_at}),{ascending:!0})[0])||void 0===t?void 0:t.started_at;x?r=null===(l=(0,C.YC)(h,(function(n){return n.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:b&&(i=null===b||void 0===b?void 0:b.updated_at);var Z=x?M().utc(r||i):M().utc(),g=M().utc(j);return{completed:v,completedAt:r,done:x,progress:p,runtime:o=Z.diff(g,"second"),startedAt:j,status:null===b||void 0===b?void 0:b.status,timeText:(0,E.zf)(o),total:m,updatedAt:i}}var F=t(28598);function G(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 z(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?G(Object(t),!0).forEach((function(e){(0,d.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var B=function(n){var e=n.onSelect,t=n.pipelineRun,r=n.selected,o=(t.block_runs,t.created_at),i=t.status,u=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[t]),c=((0,l.useMemo)((function(){return u.blocks||{}}),[u]),(0,l.useMemo)((function(){return u.pipeline||{}}),[u])),d=u.destination,Z=u.source,g=(0,l.useMemo)((function(){return Object.keys(c).length}),[c]),_=(0,l.useMemo)((function(){return A(t)}),[t]),y=_.errors,k=_.records,w=_.recordsProcessed,M=(0,l.useMemo)((function(){return T(t)}),[t]),L=(0,l.useMemo)((function(){return[m.VO.COMPLETED].includes(i)}),[i]),C=(0,l.useMemo)((function(){return{danger:m.VO.FAILED===i,default:m.VO.INITIAL===i,primary:m.VO.RUNNING===i,success:L,warning:m.VO.CANCELLED===i}}),[L,i]),S=(0,l.useMemo)((function(){if(t){var n=R(t);return(0,E.zf)(n)}}),[t]);return(0,F.jsx)(P,z(z({},C),{},{onClick:function(){return e(r?null:t.id)},selected:r,children:(0,F.jsxs)(f.ZP,{fullHeight:!0,justifyContent:"space-between",children:[(0,F.jsx)(O,z({},C)),(0,F.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(p.Z,{ml:3,py:3,children:[(0,F.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:o}),(0,F.jsx)(p.Z,{fullWidth:!1,mt:2,children:(0,F.jsx)(N,z(z({},C),{},{children:(0,F.jsxs)(f.ZP,{alignItems:"center",children:[L&&(0,F.jsx)(j.Jr,{inverted:!0,size:2*I.iI}),[m.VO.INITIAL,m.VO.RUNNING].includes(i)&&(0,F.jsx)(h.Z,{color:m.VO.INITIAL!==i?b.Z.monotone.white:null,inverted:m.VO.INITIAL===i,small:!0}),"\xa0",m.VO.RUNNING===i&&(0,F.jsxs)(F.Fragment,{children:["\xa0",Math.round(100*M),"%"]}),![m.VO.INITIAL,m.VO.RUNNING].includes(i)&&m.Do[i],m.VO.INITIAL===i&&"Starting"]})}))}),Object.values(y).length>=1&&(0,F.jsx)(p.Z,{mt:1,children:Object.entries(y).map((function(n,e){var t=(0,s.Z)(n,2),r=t[0];t[1];return(0,F.jsxs)(x.ZP,{monospace:!0,muted:!0,small:!0,children:[r," stream failed"]},r)}))})]})}),(0,F.jsxs)(a.Z,{flex:1,children:[(0,F.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(p.Z,{ml:3,py:3,children:[(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(x.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,F.jsx)(x.ZP,{monospace:!0,children:w>=1?(0,E.x6)(w):"-"})]}),(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(x.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,F.jsx)(x.ZP,{monospace:!0,children:k>=1&&k>=w?(0,E.x6)(k-w):"-"})]}),m.VO.RUNNING!==i&&(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(x.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,F.jsx)(x.ZP,{monospace:!0,children:S})]})]})}),(0,F.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(p.Z,{ml:3,py:3,children:[(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(x.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,F.jsx)(x.ZP,{monospace:!0,children:Z||"-"})]}),(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(x.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,F.jsx)(x.ZP,{monospace:!0,children:d||"-"})]}),(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(x.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,F.jsx)(x.ZP,{monospace:!0,children:g>=1?(0,E.x6)(g):"-"})]})]})})]})]})}))},Y=t(89565),W=t.n(Y),J=t(34376),X=t(71180),q=t(48670),H=t(75499),K=Z.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||b.Z.accent).cyan,";\n ")}),(function(n){return n.even&&!n.fill&&"\n background-color: ".concat((n.theme.accent||b.Z.accent).cyanTransparent,";\n ")}),(function(n){return"\n height: ".concat((n.small?1:2)*I.iI,"px;\n ")})),Q=t(3314);var $=function(n){var e=n.onClickRow,t=n.pipelineRun,r=n.selectedStream,o=(0,J.useRouter)(),i=(0,l.useState)(null),u=i[0],c=i[1],d=(0,l.useState)(null),a=d[0],h=d[1],b=(0,l.useMemo)((function(){return t?D(t):{}}),[t]),Z=(0,l.useMemo)((function(){return t?V(t):{}}),[t]),g=(0,l.useMemo)((function(){var n=0,e=[],t=[];if(Object.entries(Z).forEach((function(r){var o=(0,s.Z)(r,2),i=(o[0],o[1]),l=i.completed,u=i.runtime,c=i.total;null===u?t.push(i):(e.push(u),n+=u*(c-l))})),0===e.length)return null;var r=(0,C.Sm)(e)/e.length;return t.forEach((function(e){var t=e.completed,o=e.total;n+=r*(o-t)})),n}),[Z]),_=(0,l.useMemo)((function(){return r?Z[r]:null}),[Z,r]),y=(0,l.useMemo)((function(){if(r&&Z){var n=Z[r]||{},e=n.completed,o=n.total;if(o>=1)return e/o}else if(t)return T(t);return 0}),[_,t,r]),P=(0,l.useMemo)((function(){return(0,F.jsx)(f.ZP,{children:(0,C.w6)(101).map((function(n,e){return(0,F.jsx)(K,{even:e%2===0,fill:y>0&&Math.round(100*y)>=e},e)}))})}),[y]),k=(0,l.useMemo)((function(){if(r){var n=b[r]||[],e=n.every((function(n){var e=n.status;return L.V.COMPLETED===e})),o=(0,C.YC)(n,(function(n){return n.updated_at}),{ascending:!1})[0],i=null===o||void 0===o?void 0:o.status,l=_||{},u=l.completed,c=l.runtime,s=l.total;if(e)return"Sync complete for ".concat(r);if([L.V.CANCELLED,L.V.FAILED].includes(i))return m.Do[i];if(c&&s>=1){var d=Math.ceil(c*(s-u)/60);return"".concat((0,E._6)("minute",d,!0)," to completion")}return"Estimating time remaining for stream..."}if(m.VO.COMPLETED===(null===t||void 0===t?void 0:t.status))return"Sync complete";if(t){if([m.VO.CANCELLED,m.VO.FAILED].includes(null===t||void 0===t?void 0:t.status))return m.Do[null===t||void 0===t?void 0:t.status];if(m.VO.INITIAL===(null===t||void 0===t?void 0:t.status))return"Initializing sync (this can take several minutes)";if(null===g)return"Estimating time remaining...";var a=Math.ceil(g/60);return"".concat((0,E._6)("minute",a,!0)," to completion")}return"Select a sync"}),[b,g,_,t,r]),N=(0,l.useMemo)((function(){return t&&r?U(t,r):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[t,r]);(0,l.useEffect)((function(){var n;if(t){var e=R(t);c(e),n=setInterval((function(){return c((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[t]),(0,l.useEffect)((function(){var n;if(t&&r&&N){var e=(null===N||void 0===N?void 0:N.runtime)||0;h(e),n=setInterval((function(){return h((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[t,r,N]);var O=(0,l.useMemo)((function(){if(t){if(r)return null===N||void 0===N?void 0:N.timeText;var n=R(t);return(0,E.zf)(n)}}),[t,r,N]),w=(0,l.useMemo)((function(){var n=Math.floor(u%86400/3600),e=Math.floor(u%3600/60),t=Math.floor(u%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(":")}),[u]),M=(0,l.useMemo)((function(){var n=Math.floor(a%86400/3600),e=Math.floor(a%3600/60),t=Math.floor(a%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(":")}),[a]),G=(0,l.useMemo)((function(){return t?A(t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t]),z=G.errors,B=G.records,Y=G.recordsInserted,$=G.recordsProcessed,nn=G.recordsUpdated,en=(0,l.useMemo)((function(){return t&&r?A(t,r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t,r]),tn=(0,l.useMemo)((function(){var n=r?null===en||void 0===en?void 0:en.records:B,e=r?null===en||void 0===en?void 0:en.recordsInserted:Y,t=r?null===en||void 0===en?void 0:en.recordsProcessed:$,o=r?null===en||void 0===en?void 0:en.recordsUpdated:nn,i=[{label:"Rows fetched",value:null===n?"-":(0,E.x6)(n)}];return null===e&&null===o?i.push({label:"Rows processed",value:null===t?"-":(0,E.x6)(t)}):null!==e?i.push({label:"Rows inserted",value:(0,E.x6)(e)}):null!==o&&i.push({label:"Rows updated",value:(0,E.x6)(o)}),i.map((function(n){var e=n.label,t=n.value;return(0,F.jsxs)("div",{children:[(0,F.jsx)(x.ZP,{bold:!0,large:!0,muted:!0,children:e}),(0,F.jsx)(x.ZP,{headline:!0,children:t})]},e)}))}),[B,en,Y,$,nn,O,w,status]),rn=(0,l.useMemo)((function(){if(!t)return(0,F.jsx)("div",{});var n=S(t);return(0,F.jsx)(H.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=U(t,n),r=(e.completed,e.completedAt),i=e.done,l=e.progress,u=e.startedAt,c=e.status,s=e.timeText,d=(e.total,!!z[n]);return[(0,F.jsx)(x.ZP,{danger:d,default:!d,monospace:!0,children:n},"stream"),(0,F.jsx)(x.ZP,{default:!0,monospace:!0,children:u?u.split(".")[0]:"-"},"started_at"),(0,F.jsx)(x.ZP,{default:!0,monospace:!0,children:r?r.split(".")[0]:"-"},"completed_at"),(0,F.jsx)(x.ZP,{default:!0,children:[L.V.INITIAL,L.V.RUNNING].includes(c)?"-":s},"runtime"),(0,F.jsxs)("div",{children:[i&&(0,F.jsx)(j.Jr,{default:!0,size:2*I.iI}),!i&&(0,F.jsx)(f.ZP,{children:(0,C.w6)(51).map((function(n,e){return(0,F.jsx)(K,{fill:l>0&&Math.round(50*l)>=e,even:e%2===0,small:!0},e)}))})]},"progress"),(0,F.jsx)(X.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,Q.j)(n)},children:(0,F.jsx)(j.UL,{default:!0,size:2*I.iI})},"logs")]})),uuid:"".concat(null===t||void 0===t?void 0:t.id,"-streams-table")})}),[z,Z,t,r]),on=(0,l.useMemo)((function(){var n,e,o,i,l,u,c,d;if(t&&r){var a=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===a||void 0===a||null===(n=a.pipeline)||void 0===n||null===(e=n[r])||void 0===e||null===(o=e.bookmarks)||void 0===o?void 0:o[r],v=null===a||void 0===a||null===(i=a.blocks)||void 0===i||null===(l=i[r])||void 0===l||null===(u=l.destinations)||void 0===u||null===(c=u.state)||void 0===c||null===(d=c.bookmarks)||void 0===d?void 0:d[r];if(f||v){var m=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),p=[];m.forEach((function(n){var e=[(0,F.jsx)(x.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[f,v].forEach((function(t,r){t&&e.push((0,F.jsx)(x.ZP,{monospace:!0,small:!0,children:t[n]},"".concat(n,"-").concat(r)))})),p.push(e)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===a||void 0===a?void 0:a.source,"source",f],[null===a||void 0===a?void 0:a.destination,"destination",v]].forEach((function(n){var e=(0,s.Z)(n,3),t=e[0],r=e[1];e[2]&&h.push({uuid:"".concat(t," (").concat(r,")")})})),(0,F.jsx)(H.Z,{columnFlex:[null,1,1],columns:h,rows:p,uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),ln=(0,l.useMemo)((function(){var n,e,o,i,l,u;if(t&&r){var c=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},d=null===c||void 0===c||null===(n=c.blocks)||void 0===n||null===(e=n[r])||void 0===e||null===(o=e.sources)||void 0===o?void 0:o.record,a=null===c||void 0===c||null===(i=c.blocks)||void 0===i||null===(l=i[r])||void 0===l||null===(u=l.destinations)||void 0===u?void 0:u.record;if(d||a){var f=Object.keys(a||d||{}).sort(),v=[];f.forEach((function(n){var e=[(0,F.jsx)(x.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[d,a].forEach((function(t,r){if(t){var o=t[n],i="object"===typeof o;e.push((0,F.jsxs)(x.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[i&&(0,F.jsx)("pre",{children:JSON.stringify(o,null,2)}),!i&&o]},"".concat(n,"-").concat(r)))}})),v.push(e)}));var m=[{label:function(){return""},uuid:"column"}];return[[null===c||void 0===c?void 0:c.source,"source",d],[null===c||void 0===c?void 0:c.destination,"destination",a]].forEach((function(n){var e=(0,s.Z)(n,3),t=e[0],r=e[1];e[2]&&m.push({uuid:"".concat(t," (").concat(r,")")})})),(0,F.jsx)(H.Z,{columnFlex:[null,1,1],columns:m,rows:v.map((function(n){return n.map((function(n){return(0,F.jsx)(x.ZP,{default:!0,monospace:!0,children:n},n)}))})),uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),un=(0,l.useMemo)((function(){var n,e,o,i,l,u,c=null===t||void 0===t||null===(n=t.metrics)||void 0===n||null===(e=n.blocks)||void 0===e?void 0:e[r];return(null===c||void 0===c||null===(o=c.sources)||void 0===o||null===(i=o.block_tags)||void 0===i?void 0:i.destination_table)||(null===c||void 0===c||null===(l=c.destinations)||void 0===l||null===(u=l.block_tags)||void 0===u?void 0:u.destination_table)}),[t,r]);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(p.Z,{p:3,children:[r&&(0,F.jsx)(p.Z,{mb:3,children:(0,F.jsxs)(f.ZP,{alignItems:"center",children:[(0,F.jsx)(q.Z,{block:!0,onClick:function(){return o.push("/pipelines/".concat(t.pipeline_uuid,"/syncs?pipeline_run_id=").concat(t.id))},preventDefault:!0,children:(0,F.jsxs)(f.ZP,{alignItems:"center",children:[(0,F.jsx)(j.Xd,{default:!0,size:1.5*I.iI}),(0,F.jsx)(p.Z,{mr:1}),(0,F.jsx)(x.ZP,{default:!0,children:"Syncs"})]})}),(0,F.jsx)(p.Z,{mx:1,children:(0,F.jsx)(x.ZP,{default:!0,monospace:!0,children:"/"})}),(0,F.jsx)(x.ZP,{bold:!0,monospace:!0,children:r})]})}),(0,F.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,F.jsx)(p.Z,{mr:2,my:1,children:(0,F.jsx)(v.Z,{level:5,muted:!t,children:k})}),t&&(0,F.jsx)(X.ZP,{onClick:function(){return o.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id))},small:!0,children:"Logs"})]}),(0,F.jsx)(p.Z,{mt:2,children:P}),t&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(p.Z,{mt:3,children:(0,F.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,F.jsxs)("div",{children:[(0,F.jsx)(x.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,F.jsxs)(x.ZP,{headline:!0,children:[r&&[L.V.INITIAL,L.V.RUNNING].includes(null===N||void 0===N?void 0:N.status)&&M,r&&![L.V.INITIAL,L.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)&&w,!r&&![m.VO.INITIAL,m.VO.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&O]})]}),tn]})}),Object.values(z).length>=1&&(0,F.jsxs)(p.Z,{mt:3,children:[(0,F.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(z).map((function(n,e){var t=(0,s.Z)(n,2),o=t[0],i=t[1];return(!r||r===o)&&(0,F.jsx)(p.Z,{mt:e>=1?1:0,children:Object.entries(i).map((function(n){var e=(0,s.Z)(n,2),t=e[0],r=e[1],i=r.error,l=r.errors,u=r.message,c=Array.isArray(i)?i.join(" "):i;return(0,F.jsxs)("div",{children:[(0,F.jsx)(p.Z,{mb:u||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,F.jsxs)(x.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[o,!!t&&(0,F.jsxs)(x.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",t,")"]}),": ",(0,F.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,children:c&&(0,F.jsx)(W(),{children:c})})]})}),(0,F.jsx)(x.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:u}),l.map((function(n){return(0,F.jsx)(x.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:n},n)}))]},"".concat(o,"-").concat(t))}))},o)}))]})]})]}),t&&!r&&(0,F.jsx)(p.Z,{my:3,children:rn}),t&&r&&(0,F.jsxs)(F.Fragment,{children:[un&&(0,F.jsx)(p.Z,{my:3,children:(0,F.jsxs)(p.Z,{px:3,children:[(0,F.jsx)(v.Z,{level:5,children:"Table name"}),(0,F.jsx)(p.Z,{mt:1,children:(0,F.jsx)(x.ZP,{default:!0,monospace:!0,children:un})})]})}),on&&(0,F.jsxs)(p.Z,{my:3,children:[(0,F.jsx)(p.Z,{px:3,children:(0,F.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,F.jsx)(p.Z,{px:1,children:on})]}),ln&&(0,F.jsxs)(p.Z,{my:3,children:[(0,F.jsx)(p.Z,{px:3,children:(0,F.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,F.jsx)(p.Z,{px:1,children:ln})]})]})]})},nn=t(35686),en=t(28795),tn=t(15610),rn=t(69419);function on(n){var e=n.pipeline,t=e.uuid,r=nn.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:t},{refreshInterval:5e3}).data,o=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.pipeline_runs)||[]}),[r]),i=(0,rn.iV)(),c=(0,l.useState)(null),s=c[0],d=c[1],a=(0,l.useState)(null),f=a[0],v=a[1],m=(0,l.useState)(null),p=m[0],h=m[1];(0,l.useEffect)((function(){null!==i&&void 0!==i&&i.pipeline_run_id?h(null===o||void 0===o?void 0:o.find((function(n){return n.id===Number(i.pipeline_run_id)}))):p&&h(null),null!==i&&void 0!==i&&i.stream?v(i.stream):f&&v(null)}),[o,i,p,f]);var x=(0,l.useCallback)((function(){var n=p?S(p):[];return(0,F.jsx)($,{onClickRow:function(e){var t=n[e];(0,tn.u7)({stream:f===t?null:t})},pipelineRun:p,selectedStream:f})}),[p,f]),b=(0,l.useMemo)((function(){var n="/pipelines/".concat(t,"/syncs");p&&(n="".concat(n,"?pipeline_run_id=").concat(p.id));var e=[{label:function(){return"Syncs"},linkProps:f?{as:n,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&e.push({label:function(){return f}}),e}),[t,p,f]);return(0,F.jsx)(u.Z,{breadcrumbs:b,buildSidekick:x,errors:s,pageName:en.M.SYNCS,pipeline:e,setErrors:d,title:function(n){var e=n.name;return"".concat(e," syncs")},uuid:"".concat(en.M.SYNCS,"_").concat(t),children:o.map((function(n){var e=(null===p||void 0===p?void 0:p.id)===n.id;return(0,F.jsx)(B,{onSelect:function(n){return(0,tn.u7)({pipeline_run_id:n,stream:null})},pipelineRun:n,selected:e},n.id)}))})}on.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 ln=(0,c.Z)(on)},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,600,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}]);
@@ -1 +0,0 @@
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),G=i(15610),X=i(86735),B=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.q)(),oe=(0,u.useMemo)((function(){return(0,X.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,B.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,X.HK)((null===ze||void 0===ze?void 0:ze.pipeline_triggers)||[],(function(e){return e.name}))}),[ze]),Ge=(0,u.useMemo)((function(){return!(null===qe||void 0===qe||!qe[null===l||void 0===l?void 0:l.name])}),[l,qe]),Xe=(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})}})}}),Be=(0,t.Z)(Xe,2),Je=Be[0],$e=Be[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,B.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:[Ge&&"Trigger exists in code",!Ge&&"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:[Ge&&"Update trigger in code",!Ge&&"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,G.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,600,8487,8264,7858,5499,5457,4366,722,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}]);
@@ -1 +0,0 @@
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},Vx: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){if("string"!==typeof e)return e;var n=e.split("+")[0];return u()(b(n)).format(l.Nx)}!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(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),q=r(47041),W=r(91437),X=G.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-pu8csx-0"})([""," overflow-y:auto;position:relative;width:100%;z-index:3;border-radius:","px;"," "," "," ",""],q.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,W.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)(X,{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.h)(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)(),q=(0,me.DQ)(z,[b.gm.INTERVAL,b.gm.STATUS,b.gm.TAG,b.gm.TYPE]),W=(0,xe.xH)(q),X=null!==z&&void 0!==z&&z.page?z.page:0,K=pe.ZP.pipeline_schedules.pipelines.list(u,Ie(Ie({},W),{},{_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)),qe=ze.data,We=(ze.mutate,pe.ZP.pipelines.detail(L&&u).data),Xe=(0,s.useMemo)((function(){return(null===Ge||void 0===Ge?void 0:Ge.pipeline_interaction)||{}}),[Ge]),Ke=((0,s.useMemo)((function(){return(null===qe||void 0===qe?void 0:qe.interactions)||[]}),[qe]),(0,s.useMemo)((function(){var e;return L&&(null===(e=Object.keys((null===Xe||void 0===Xe?void 0:Xe.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[L,Xe])),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:q,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,q,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===We||void 0===We?void 0:We.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(X),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,600,8487,8264,7858,5499,5457,4366,722,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}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{8666:function(e,n,i){"use strict";var t;i.d(n,{b:function(){return t}}),function(e){e.BLOCK="block",e.PIPELINE="pipeline"}(t||(t={}))},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.h)(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,600,8487,8264,7858,5499,4366,722,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}]);