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
@@ -506,75 +506,6 @@ class PipelineScheduler:
506
506
  pass
507
507
  return any_block_run_timed_out
508
508
 
509
- def __update_block_run_statuses(self, block_runs: List[BlockRun]) -> None:
510
- """Update the statuses of the block runs to CONDITION_FAILED or UPSTREAM_FAILED.
511
-
512
- This method updates the statuses of the block runs based on the pipeline run's block runs.
513
- It retrieves the block UUIDs for failed block runs and conditionally failed block runs.
514
- It maps the block run statuses to their corresponding block UUIDs.
515
-
516
- The method iterates overthe provided block runs and checks if their dynamic upstream block
517
- UUIDs or upstream block UUIDs match the failed or conditionally failed block UUIDs.
518
- * If there is a match, the block run's status is updated accordingly.
519
- * If no updates are made for a block run, it is added to the list of not updated block runs.
520
-
521
- The method refreshes the pipeline run and continues iterating through block runs until no
522
- more updates can be made.
523
-
524
- Args:
525
- block_runs (List[BlockRun]): A list of block runs to update.
526
-
527
- Returns:
528
- None
529
- """
530
- failed_block_uuids = set(
531
- b.block_uuid for b in self.pipeline_run.block_runs
532
- if b.status in [
533
- BlockRun.BlockRunStatus.UPSTREAM_FAILED,
534
- BlockRun.BlockRunStatus.FAILED,
535
- ]
536
- )
537
- condition_failed_block_uuids = set(
538
- b.block_uuid for b in self.pipeline_run.block_runs
539
- if b.status in [
540
- BlockRun.BlockRunStatus.CONDITION_FAILED,
541
- ]
542
- )
543
-
544
- statuses = {
545
- BlockRun.BlockRunStatus.CONDITION_FAILED: condition_failed_block_uuids,
546
- BlockRun.BlockRunStatus.UPSTREAM_FAILED: failed_block_uuids,
547
- }
548
- not_updated_block_runs = []
549
- for block_run in block_runs:
550
- updated_status = False
551
- dynamic_upstream_block_uuids = block_run.metrics and block_run.metrics.get(
552
- 'dynamic_upstream_block_uuids',
553
- )
554
-
555
- for status, block_uuids in statuses.items():
556
- upstream_block_uuids = []
557
- if dynamic_upstream_block_uuids:
558
- upstream_block_uuids = dynamic_upstream_block_uuids
559
- else:
560
- block = self.pipeline.get_block(block_run.block_uuid)
561
- if block:
562
- upstream_block_uuids = block.upstream_block_uuids
563
- if any(
564
- b in block_uuids
565
- for b in upstream_block_uuids
566
- ):
567
- block_run.update(status=status)
568
- updated_status = True
569
-
570
- if not updated_status:
571
- not_updated_block_runs.append(block_run)
572
-
573
- self.pipeline_run.refresh()
574
- # keep iterating through block runs until no more updates can be made
575
- if len(block_runs) != len(not_updated_block_runs):
576
- self.__update_block_run_statuses(not_updated_block_runs)
577
-
578
509
  def __schedule_blocks(self, block_runs: List[BlockRun] = None) -> None:
579
510
  """Schedule the block runs for execution.
580
511
 
@@ -591,7 +522,7 @@ class PipelineScheduler:
591
522
  Returns:
592
523
  None
593
524
  """
594
- self.__update_block_run_statuses(self.pipeline_run.initial_block_runs)
525
+ self.pipeline_run.update_block_run_statuses(self.pipeline_run.initial_block_runs)
595
526
  if block_runs is None:
596
527
  block_runs_to_schedule = self.pipeline_run.executable_block_runs(
597
528
  allow_blocks_to_fail=self.allow_blocks_to_fail,
@@ -12,4 +12,4 @@ DATAFRAME_OUTPUT_SAMPLE_COUNT = 10
12
12
  # Dockerfile depends on it because it runs ./scripts/install_mage.sh and uses
13
13
  # the last line to determine the version to install.
14
14
  VERSION = \
15
- '0.9.47'
15
+ '0.9.48'
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/d1e8e64d0b07af2f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d1e8e64d0b07af2f.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-fea697dd168c6d0c.js" defer=""></script><script src="/_next/static/chunks/framework-22b71764bf44ede4.js" defer=""></script><script src="/_next/static/chunks/main-77fe248a6fbd12d8.js" defer=""></script><script src="/_next/static/chunks/pages/_app-78c4a077a2f279c2.js" defer=""></script><script src="/_next/static/chunks/pages/_error-e989623bffcbf724.js" defer=""></script><script src="/_next/static/N3FS4bHv0jpYeeg672uYK/_buildManifest.js" defer=""></script><script src="/_next/static/N3FS4bHv0jpYeeg672uYK/_ssgManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.6">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/d1e8e64d0b07af2f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d1e8e64d0b07af2f.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-fea697dd168c6d0c.js" defer=""></script><script src="/_next/static/chunks/framework-22b71764bf44ede4.js" defer=""></script><script src="/_next/static/chunks/main-77fe248a6fbd12d8.js" defer=""></script><script src="/_next/static/chunks/pages/_app-8254de4f793643d0.js" defer=""></script><script src="/_next/static/chunks/pages/_error-e989623bffcbf724.js" defer=""></script><script src="/_next/static/xxcdnITr3IkTdETH5ghqw/_buildManifest.js" defer=""></script><script src="/_next/static/xxcdnITr3IkTdETH5ghqw/_ssgManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.6">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
2
2
  *,*::before,*::after{-webkit-box-sizing:inherit;box-sizing:inherit;}/*!sc*/
3
3
  data-styled.g4[id="sc-global-czSCUT1"]{content:"sc-global-czSCUT1,"}/*!sc*/
4
4
  .kOVcuR .Toastify__toast-container{margin-top:24px;padding:0 !important;width:500px !important;}/*!sc*/
@@ -20,4 +20,4 @@ data-styled.g5[id="ToastWrapper-sc-1a33ph1-0"]{content:"kOVcuR,"}/*!sc*/
20
20
  .next-error-h1 {
21
21
  border-right: 1px solid rgba(255, 255, 255, .3);
22
22
  }
23
- }</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404<!-- --></h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:49px;margin:0;padding:0">This page could not be found<!-- -->.<!-- --></h2></div></div></div><div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanLight":"rgba(101, 227, 255, 0.3)","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"rgb(255, 79, 248, 0.5)","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","rose":"#D1A2AB","roseLight":"rgba(209, 162, 171, 0.5)","sky":"#6AA1E0","skyLight":"rgba(106, 161, 224, 0.05)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","dashboard":"#18181C","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","successLight":"rgb(138, 222, 0, 0.3)","table":"#292A2F","tag":"#3A4550"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","darkLight":"#2E3036","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBorder":"#ffffff1a","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","linkTextLight":"#9ECBFF","purple":"#885EFF","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF","whiteTransparent":"rgba(255, 255, 255, 0.6)"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(0, 0, 0, 0.3)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/_error","query":{},"buildId":"N3FS4bHv0jpYeeg672uYK","nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
23
+ }</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404<!-- --></h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:49px;margin:0;padding:0">This page could not be found<!-- -->.<!-- --></h2></div></div></div><div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanLight":"rgba(101, 227, 255, 0.3)","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"rgb(255, 79, 248, 0.5)","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","rose":"#D1A2AB","roseLight":"rgba(209, 162, 171, 0.5)","sky":"#6AA1E0","skyLight":"rgba(106, 161, 224, 0.05)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","dashboard":"#18181C","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","successLight":"rgb(138, 222, 0, 0.3)","table":"#292A2F","tag":"#3A4550"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","darkLight":"#2E3036","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBorder":"#ffffff1a","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","linkTextLight":"#9ECBFF","purple":"#885EFF","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF","whiteTransparent":"rgba(255, 255, 255, 0.6)"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(0, 0, 0, 0.3)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/_error","query":{},"buildId":"xxcdnITr3IkTdETH5ghqw","nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1952],{52749:function(e,n,t){var i=t(82394),r=t(82684),o=t(71180),l=t(55485),d=t(93369),c=t(7267),u=t(38276),s=t(30160),a=t(35576),p=t(17488),f=t(72473),h=t(4015),v=t(70515),j=t(81728),m=t(28598);function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n,t,i,g,b=e.createPipeline,Z=e.isLoading,y=e.onClose,P=(0,r.useRef)(null),O=(0,r.useState)(!1),w=O[0],I=O[1],k=(0,r.useState)({name:(0,j.Y6)()}),C=k[0],_=k[1];return(0,r.useEffect)((function(){var e;null===P||void 0===P||null===(e=P.current)||void 0===e||e.focus()}),[]),(0,m.jsxs)(h.Nk,{children:[(0,m.jsx)(h.I5,{children:(0,m.jsx)(l.ZP,{alignItems:"center",justifyContent:"center",children:(0,m.jsx)(f.xq,{size:5*v.iI,warning:!0})})}),(0,m.jsx)(h.gI,{children:(0,m.jsxs)(u.Z,{py:1,children:[(0,m.jsx)(u.Z,{mb:1,children:(0,m.jsx)(s.ZP,{default:!0,children:"New pipeline"})}),(0,m.jsx)(s.ZP,{textOverflow:!0,children:"Using AI"})]})}),(0,m.jsxs)(h.gI,{children:[(0,m.jsx)(s.ZP,{default:!0,children:"Name"}),(0,m.jsx)(p.Z,{alignRight:!0,noBackground:!0,noBorder:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{name:e.target.value})}))},paddingVertical:v.iI,placeholder:"Enter pipeline name...",value:(null===C||void 0===C?void 0:C.name)||""})]}),(0,m.jsx)(h.gI,{children:(0,m.jsxs)(l.ZP,{flexDirection:"column",fullWidth:!0,children:[(0,m.jsx)(u.Z,{mb:2,pt:1,children:(0,m.jsx)(s.ZP,{default:!0,children:"Describe what the pipeline should do"})}),(0,m.jsxs)(u.Z,{pb:1,pr:v.cd,children:[(0,m.jsx)(a.Z,{fullWidth:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{llm:{request:{pipeline_description:e.target.value},use_case:c.z.GENERATE_PIPELINE_WITH_DESCRIPTION}})}))},placeholder:"Type the pipeline purpose...",ref:P,rows:8,value:(null===C||void 0===C||null===(n=C.llm)||void 0===n||null===(t=n.request)||void 0===t?void 0:t.pipeline_description)||""}),(Z||w)&&(0,m.jsx)(u.Z,{mt:1,children:(0,m.jsx)(s.ZP,{warning:!0,children:"Pipeline is being generated using AI based on your description above..."})})]})]})}),(0,m.jsx)(h.$b,{children:(0,m.jsxs)(l.ZP,{fullWidth:!0,children:[(0,m.jsx)(d.ZP,{bold:!0,centerText:!0,disabled:!(null!==C&&void 0!==C&&C.name)||!(null!==C&&void 0!==C&&null!==(i=C.llm)&&void 0!==i&&null!==(g=i.request)&&void 0!==g&&g.pipeline_description),loading:Z||w,onClick:function(){I(!0),b({pipeline:C}).then((function(){return I(!1)}))},primary:!0,tabIndex:0,uuid:"AIControlPanel/CreatePipeline",children:"Create pipeline"}),y&&(0,m.jsx)(u.Z,{ml:1,children:(0,m.jsx)(o.ZP,{onClick:y,tabIndex:0,children:"Cancel"})})]})})]})}},60523:function(e,n,t){var i=t(21831),r=t(82394),o=t(82684),l=t(38626),d=t(34376),c=t(54750),u=t(71180),s=t(90299),a=t(44898),p=t(55485),f=t(88328),h=t(38276),v=t(4190),j=t(48381),m=t(5755),g=t(30160),x=t(35686),b=t(72473),Z=t(84649),y=t(32929),P=t(15610),O=t(19183),w=t(28598);function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n,t=e.contained,r=e.defaultLinkUUID,I=e.defaultTab,C=e.objectType,_=e.onClickCustomTemplate,S=e.pipelineUUID,N=e.showAddingNewTemplates,A=e.showBreadcrumbs,E=e.tabs,M=(0,d.useRouter)(),D=(0,o.useContext)(l.ThemeContext),T=(0,O.i)(),B=T.height,R=T.width,U=(0,o.useMemo)((function(){return E||y.dP}),[E]),H=(0,o.useState)(N||!1),q=H[0],L=H[1],z=(0,o.useState)(r?y.qy.find((function(e){return e.uuid===r})):y.qy[0]),F=z[0],W=z[1],G=(0,o.useState)(I?U.find((function(e){return e.uuid===(null===I||void 0===I?void 0:I.uuid)})):U[0]),V=G[0],Y=G[1],X=(0,o.useState)(null),$=X[0],K=X[1],Q=x.ZP.custom_templates.list({object_type:a.Z},{},{pauseFetch:y.n9.uuid!==(null===V||void 0===V?void 0:V.uuid)}),J=Q.data,ee=Q.mutate,ne=(0,o.useMemo)((function(){var e=(null===J||void 0===J?void 0:J.custom_templates)||[];return null!==F&&void 0!==F&&F.filterTemplates?null===F||void 0===F?void 0:F.filterTemplates(e):e}),[J,F]),te=x.ZP.custom_templates.list({object_type:a.R},{},{pauseFetch:y.A2.uuid!==(null===V||void 0===V?void 0:V.uuid)}),ie=te.data,re=te.mutate,oe=(0,o.useMemo)((function(){var e=(null===ie||void 0===ie?void 0:ie.custom_templates)||[];return null!==F&&void 0!==F&&F.filterTemplates?null===F||void 0===F?void 0:F.filterTemplates(e):e}),[ie,F]),le=(0,o.useMemo)((function(){return y.qy.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,l=(null===F||void 0===F?void 0:F.uuid)===o,d=k({size:Z.ZG},l&&r?r:{});return(0,w.jsx)(Z.wj,{onClick:function(){return W(e)},selected:l,children:(0,w.jsxs)(p.ZP,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:l&&i?i(D):null,children:n?(0,w.jsx)(n,k({},d)):(0,w.jsx)(b.pd,k({},d))}),(0,w.jsx)(g.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[F,D]),de=(0,o.useMemo)((function(){return y.hS.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,l=(null===F||void 0===F?void 0:F.uuid)===o,d=k({size:Z.ZG},l&&r?r:{});return(0,w.jsx)(Z.wj,{onClick:function(){return W(e)},selected:l,children:(0,w.jsxs)(p.ZP,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:l&&i?i(D):null,children:n?(0,w.jsx)(n,k({},d)):(0,w.jsx)(b.pd,k({},d))}),(0,w.jsx)(g.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[F,D]),ce=(0,o.useMemo)((function(){return null===ne||void 0===ne?void 0:ne.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,l=e.user,d=[];return null!==r&&void 0!==r&&r.length?d.push.apply(d,(0,i.Z)(r)):null!==l&&void 0!==l&&l.username&&d.push(null===l||void 0===l?void 0:l.username),(0,w.jsxs)(Z.UE,{onClick:function(){_?_(e):M.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o)))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(g.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(g.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===d||void 0===d?void 0:d.length)>=1&&(0,w.jsx)(j.Z,{tags:null===d||void 0===d?void 0:d.map((function(e){return{uuid:e}}))})})]},o)}))}),[ne,_,M]),ue=(0,o.useMemo)((function(){return null===oe||void 0===oe?void 0:oe.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,l=e.user,d=[];return null!==r&&void 0!==r&&r.length?d.push.apply(d,(0,i.Z)(r)):null!==l&&void 0!==l&&l.username&&d.push(null===l||void 0===l?void 0:l.username),(0,w.jsxs)(Z.UE,{onClick:function(){_?_(e):M.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o),"?object_type=").concat(a.R))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(g.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(g.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===d||void 0===d?void 0:d.length)>=1&&(0,w.jsx)(j.Z,{tags:null===d||void 0===d?void 0:d.map((function(e){return{uuid:e}}))})})]},o)}))}),[oe,_,M]),se=(0,o.useMemo)((function(){if(!A)return null;var e=[];return q?e.push.apply(e,[{label:function(){return"Templates"},onClick:function(){L(!1)}},{bold:!0,label:function(){return"New custom template"}}]):e.push({label:function(){return"Templates"}}),(0,w.jsx)(Z.FX,{children:(0,w.jsx)(c.Z,{breadcrumbs:e})})}),[q,A]),ae=(0,o.useMemo)((function(){return A?36:0}),[A]),pe=(0,o.useMemo)((function(){return B-ae}),[B,ae]);if(q)return n=a.R===C&&S?(0,w.jsx)(f.Z,{onMutateSuccess:re,pipelineUUID:S,templateAttributes:F&&(null===F||void 0===F?void 0:F.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{pipeline_type:null===F||void 0===F?void 0:F.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}):(0,w.jsx)(m.Z,{contained:t,heightOffset:ae,onCreateCustomTemplate:t?function(e){K(e)}:null,onMutateSuccess:ee,templateAttributes:F&&(null===F||void 0===F?void 0:F.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{block_type:null===F||void 0===F?void 0:F.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}),t?(0,w.jsxs)(w.Fragment,{children:[A&&se,(0,w.jsx)(Z.Rd,{height:pe,width:R,children:n})]}):n;var fe=(0,w.jsxs)(Z.Nk,{children:[(0,w.jsxs)(Z.bC,{height:t?pe:null,children:[(0,w.jsx)(Z.Yf,{children:(0,w.jsx)(s.Z,{noPadding:!0,onClickTab:function(e){t?Y(e):(0,P.u7)({object_type:y.A2.uuid===e.uuid?a.R:a.Z})},selectedTabUUID:null===V||void 0===V?void 0:V.uuid,tabs:U})}),(0,w.jsxs)(Z.wl,{contained:t,heightOffset:ae,children:[y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&le,y.A2.uuid===(null===V||void 0===V?void 0:V.uuid)&&de]})]}),(0,w.jsxs)(Z.w5,{children:[y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsx)(Z.HS,{children:(0,w.jsx)(u.ZP,{beforeIcon:(0,w.jsx)(b.mm,{size:Z.ZG}),onClick:function(){L(!0)},primary:!0,children:"New block template"})}),y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!J&&(0,w.jsx)(h.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),J&&!(null!==ce&&void 0!==ce&&ce.length)&&(0,w.jsxs)(h.Z,{p:2,children:[(0,w.jsx)(g.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(g.ZP,{children:"Add a new template by clicking the button above."})]}),(null===ce||void 0===ce?void 0:ce.length)>=1&&(0,w.jsx)(Z.n8,{children:ce})]}),y.A2.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!ie&&(0,w.jsx)(h.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),ie&&!(null!==ue&&void 0!==ue&&ue.length)&&(0,w.jsxs)(h.Z,{p:2,children:[(0,w.jsx)(g.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(g.ZP,{children:'Add a new template by right-clicking a pipeline row from the Pipelines page and selecting "Create template".'})]}),(null===ue||void 0===ue?void 0:ue.length)>=1&&(0,w.jsx)(Z.n8,{children:ue})]})]})]});return t?(0,w.jsxs)(w.Fragment,{children:[A&&se,(0,w.jsx)(Z.Rd,{height:pe,width:R,children:fe})]}):fe}},94629:function(e,n,t){t.d(n,{Z:function(){return I}});var i=t(82394),r=t(21831),o=t(82684),l=t(50724),d=t(82555),c=t(97618),u=t(70613),s=t(68487),a=t(68899),p=t(28598);function f(e,n){var t=e.children,i=e.noPadding;return(0,p.jsx)(a.HS,{noPadding:i,ref:n,children:t})}var h=o.forwardRef(f),v=t(62547),j=t(82571),m=t(35686),g=t(98464),x=t(46684),b=t(70515),Z=t(53808),y=t(19183);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function w(e,n){var t,i=e.addProjectBreadcrumbToCustomBreadcrumbs,f=e.after,P=e.afterHeader,w=e.afterHidden,I=e.afterWidth,k=e.afterWidthOverride,C=e.appendBreadcrumbs,_=e.before,S=e.beforeWidth,N=e.breadcrumbs,A=e.children,E=e.errors,M=e.headerMenuItems,D=e.headerOffset,T=e.hideAfterCompletely,B=e.mainContainerHeader,R=e.navigationItems,U=e.setAfterHidden,H=e.setErrors,q=e.subheaderChildren,L=e.subheaderNoPadding,z=e.title,F=e.uuid,W=(0,y.i)().width,G="dashboard_after_width_".concat(F),V="dashboard_before_width_".concat(F),Y=(0,o.useRef)(null),X=(0,o.useState)(k?I:(0,Z.U2)(G,I)),$=X[0],K=X[1],Q=(0,o.useState)(!1),J=Q[0],ee=Q[1],ne=(0,o.useState)(_?Math.max((0,Z.U2)(V,S),13*b.iI):null),te=ne[0],ie=ne[1],re=(0,o.useState)(!1),oe=re[0],le=re[1],de=(0,o.useState)(null)[1],ce=m.ZP.projects.list({},{revalidateOnFocus:!1}).data,ue=null===ce||void 0===ce?void 0:ce.projects,se={label:function(){var e;return null===ue||void 0===ue||null===(e=ue[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ae=[];N&&(i&&ae.push(se),ae.push.apply(ae,(0,r.Z)(N))),(null===N||void 0===N||!N.length||C)&&(null===ue||void 0===ue?void 0:ue.length)>=1&&(null!==N&&void 0!==N&&N.length||ae.unshift({bold:!C,label:function(){return z}}),ae.unshift(se)),(0,o.useEffect)((function(){null===Y||void 0===Y||!Y.current||J||oe||null===de||void 0===de||de(Y.current.getBoundingClientRect().width)}),[J,$,oe,te,Y,de,W]),(0,o.useEffect)((function(){J||(0,Z.t8)(G,$)}),[w,J,$,G]),(0,o.useEffect)((function(){oe||(0,Z.t8)(V,te)}),[oe,te,V]);var pe=(0,g.Z)(I);return(0,o.useEffect)((function(){k&&pe!==I&&K(I)}),[k,I,pe]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.Z,{title:z}),(0,p.jsx)(s.Z,{breadcrumbs:ae,menuItems:M,project:null===ue||void 0===ue?void 0:ue[0],version:null===ue||void 0===ue||null===(t=ue[0])||void 0===t?void 0:t.version}),(0,p.jsxs)(a.Nk,{ref:n,children:[0!==(null===R||void 0===R?void 0:R.length)&&(0,p.jsx)(a.lm,{showMore:!0,children:(0,p.jsx)(j.Z,{navigationItems:R,showMore:!0})}),(0,p.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:f,afterHeader:P,afterHeightOffset:x.Mz,afterHidden:w,afterMousedownActive:J,afterWidth:$,before:_,beforeHeightOffset:x.Mz,beforeMousedownActive:oe,beforeWidth:a.k1+(_?te:0),headerOffset:D,hideAfterCompletely:!U||T,leftOffset:_?a.k1:null,mainContainerHeader:B,mainContainerRef:Y,setAfterHidden:U,setAfterMousedownActive:ee,setAfterWidth:K,setBeforeMousedownActive:le,setBeforeWidth:ie,children:[q&&(0,p.jsx)(h,{noPadding:L,children:q}),A]})})]}),E&&(0,p.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,p.jsx)(d.Z,O(O({},E),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}var I=o.forwardRef(w)},65458:function(e,n,t){t.d(n,{d:function(){return s}});var i=t(13507),r=t(72473),o=t(57653),l=t(70515),d=t(81728),c=t(28598),u=1.5*l.iI,s=function(e,n){var t=[{beforeIcon:(0,c.jsx)(r.X5,{}),label:function(){return"Standard (batch)"},onClick:function(){return e({pipeline:{name:(0,d.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{beforeIcon:(0,c.jsx)(r.ZG,{}),label:function(){return"Data integration"},onClick:function(){return e({pipeline:{name:(0,d.Y6)(),type:o.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{beforeIcon:(0,c.jsx)(i.Z,{size:u}),label:function(){return"Streaming"},onClick:function(){return e({pipeline:{name:(0,d.Y6)(),type:o.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}];return null!==n&&void 0!==n&&n.showBrowseTemplates&&t.push({beforeIcon:(0,c.jsx)(r.zQ,{}),label:function(){return"From a template"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showBrowseTemplates)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/custom_template"}),null!==n&&void 0!==n&&n.showAIModal&&t.push({beforeIcon:(0,c.jsx)(r.xq,{}),label:function(){return"Using AI (beta)"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showAIModal)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/AI_modal"}),t}},4015:function(e,n,t){t.d(n,{$b:function(){return s},I5:function(){return c},Nk:function(){return d},gI:function(){return u}});var i=t(38626),r=t(44897),o=t(42631),l=t(70515),d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-h093u4-0"})([""," ",""],(function(e){return!e.width&&"\n width: ".concat(40*l.iI,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),c=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-h093u4-1"})(["padding:","px;",""],2.5*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top-left-radius: ").concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")})),u=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-h093u4-2"})(["align-items:center;justify-content:space-between;",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n display: ").concat((null===e||void 0===e?void 0:e.display)||"flex",";\n padding-bottom: ").concat(1*l.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n padding-left: ").concat(l.cd*l.iI,"px;\n padding-top: ").concat(1*l.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-h093u4-3"})(["padding:","px ","px;",""],2.5*l.iI,2*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom-left-radius: ").concat(o.n_,"px;\n border-bottom-right-radius: ").concat(o.n_,"px;\n border-bottom: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}))},48381:function(e,n,t){var i=t(82684),r=t(31882),o=t(55485),l=t(30160),d=t(86735),c=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,u=void 0===t?[]:t,s=(0,i.useMemo)((function(){return(null===u||void 0===u?void 0:u.length)||0}),[u]),a=(0,i.useMemo)((function(){return(0,d.YC)(u||[],"uuid")}),[u]);return(0,c.jsx)(o.ZP,{alignItems:"center",flexWrap:"wrap",children:null===a||void 0===a?void 0:a.reduce((function(e,t){return e.push((0,c.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,c.jsx)(r.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,c.jsx)(l.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},55729:function(e,n,t){t.d(n,{Z:function(){return B}});var i=t(82394),r=t(75582),o=t(82684),l=t(69864),d=t(71180),c=t(15338),u=t(97618),s=t(55485),a=t(85854),p=t(48670),f=t(65956),h=t(82359),v=t(88543),j=t(38276),m=t(30160),g=t(17488),x=t(69650),b=t(12468),Z=t(35686),y=t(38626),P=t(44897),O=t(42631),w=t(70515),I=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],O.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||P.Z.background).codeArea,";\n ")})),k=t(72473),C=t(72191),_=t(70320),S=t(81728),N=t(42122),A=t(72619),E=t(23780),M=t(28598);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function 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}var B=function(e){var n,t,y,P=e.cancelButtonText,O=e.contained,D=e.header,B=e.onCancel,R=e.onSaveSuccess,U=(0,E.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),H=(0,r.Z)(U,1)[0],q=(0,o.useState)(null),L=q[0],z=q[1],F=(0,o.useState)(!1),W=F[0],G=F[1],V=Z.ZP.projects.list(),Y=V.data,X=V.mutate,$=(0,o.useMemo)((function(){var e;return null===Y||void 0===Y||null===(e=Y.projects)||void 0===e?void 0:e[0]}),[Y]),K=$||{},Q=K.name,J=K.openai_api_key,ee=K.project_uuid,ne=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){L||z($)}),[$,L]);var te=(0,l.Db)(Z.ZP.projects.useUpdate(Q),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(e){var n,t=e.project;X(),z(t),G(!1),(0,_.hY)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[h.d.LOCAL_TIMEZONE]),R&&(null===R||void 0===R||R(t))},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),ie=(0,r.Z)(te,2),re=ie[0],oe=ie[1].isLoading,le=(0,o.useCallback)((function(e){return re({project:e})}),[re]),de=(0,M.jsxs)(M.Fragment,{children:[D,(0,M.jsxs)(f.Z,{noPadding:!0,children:[(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Project name"})}),(0,M.jsx)(m.ZP,{default:!0,monospace:!0,children:Q})]}),(0,M.jsx)(c.Z,{light:!0}),(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,M.jsx)(m.ZP,{default:!!ee,monospace:!0,muted:!ee,children:ee||"Not required"})]}),(0,M.jsx)(c.Z,{light:!0}),(0,M.jsx)(j.Z,{p:w.cd,children:(0,M.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,M.jsxs)(u.Z,{flexDirection:"column",children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,M.jsxs)(m.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,M.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,M.jsx)(j.Z,{mr:w.cd}),(0,M.jsx)(x.Z,{compact:!0,checked:null===L||void 0===L?void 0:L.help_improve_mage,onCheck:function(){return z((function(e){return T(T({},e),{},{help_improve_mage:!(null!==L&&void 0!==L&&L.help_improve_mage)})}))}})]})})]}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsx)(v.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,M.jsx)(v.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===L||void 0===L||null===(n=L.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(y=t.triggers)||void 0===y||!y.save_in_code_automatically),onCheck:function(e){return z((function(n){var t,i,r,o,l,d;return T(T({},n),{},{pipelines:T(T({},null===n||void 0===n?void 0:n.pipelines),{},{settings:T(T({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:T(T({},null===n||void 0===n||null===(i=n.pipelines)||void 0===i||null===(r=i.settings)||void 0===r?void 0:r.triggers),{},{save_in_code_automatically:e(null===n||void 0===n||null===(o=n.pipelines)||void 0===o||null===(l=o.settings)||void 0===l||null===(d=l.triggers)||void 0===d?void 0:d.save_in_code_automatically)})})})})}))}}})}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsx)(f.Z,{noPadding:!0,overflowVisible:!0,children:(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((0,N.gR)(null===L||void 0===L?void 0:L.features,[h.d.GLOBAL_HOOKS])||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],l=t[1];return(0,M.jsx)(j.Z,{mt:0===n?0:1,children:(0,M.jsxs)(s.ZP,{alignItems:"center",children:[(0,M.jsx)(x.Z,{checked:!!l,compact:!0,onCheck:function(){return z((function(e){return T(T({},e),{},{features:T(T({},null===L||void 0===L?void 0:L.features),{},(0,i.Z)({},o,!l))})}))}}),(0,M.jsx)(j.Z,{mr:w.cd}),(0,M.jsxs)(u.Z,{children:[(0,M.jsx)(m.ZP,{default:!l,monospace:!0,children:(0,S.vg)(o)}),o===h.d.LOCAL_TIMEZONE&&(0,M.jsx)(j.Z,{ml:1,children:(0,M.jsx)(b.Z,T({},_.EB))})]})]})},o)}))]})}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsx)(f.Z,{noPadding:!0,children:(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"OpenAI"})}),J&&!W?(0,M.jsxs)(s.ZP,T(T({},s.A0),{},{children:[(0,M.jsx)(m.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,M.jsx)(d.ZP,{iconOnly:!0,onClick:function(){return G(!0)},secondary:!0,title:"Edit",children:(0,M.jsx)(k.I8,{size:C.bL})})]})):(0,M.jsx)(g.Z,{disabled:ne,label:ne?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return z((function(n){return T(T({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===L||void 0===L?void 0:L.openai_api_key)||""})]})}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsxs)(s.ZP,{alignItems:"center",children:[(0,M.jsx)(d.ZP,{loading:oe,onClick:function(){le({features:null===L||void 0===L?void 0:L.features,help_improve_mage:null===L||void 0===L?void 0:L.help_improve_mage,openai_api_key:null===L||void 0===L?void 0:L.openai_api_key,pipelines:null===L||void 0===L?void 0:L.pipelines})},primary:!0,children:"Save project settings"}),B&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(j.Z,{mr:w.cd}),(0,M.jsx)(d.ZP,{onClick:B,secondary:!0,children:P||"Cancel"})]})]})]});return O?(0,M.jsx)(I,{children:de}):de}},88543:function(e,n,t){t.d(n,{S:function(){return Z},Z:function(){return y}});var i=t(82684),r=t(15338),o=t(97618),l=t(55485),d=t(85854),c=t(65956),u=t(82394),s=t(44085),a=t(38276),p=t(30160),f=t(17488),h=t(69650),v=t(72473),j=t(8193),m=t(70515),g=t(28598);function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.children,i=e.description,r=e.invalid,d=e.large,c=void 0===d||d,u=e.selectInput,x=e.textInput,Z=e.title,y=e.toggleSwitch,P=e.warning;return(0,g.jsx)(a.Z,{p:m.cd,children:(0,g.jsxs)(l.ZP,{alignItems:"center",children:[(0,g.jsxs)(l.ZP,{flexDirection:"column",children:[(0,g.jsxs)(p.ZP,{danger:r,default:!0,large:c,warning:P,children:[Z," ",r&&(0,g.jsx)(p.ZP,{danger:!0,inline:!0,large:c,children:"is required"})]}),i&&"string"===typeof i&&(0,g.jsx)(p.ZP,{muted:!0,small:!0,children:i}),i&&"string"!==typeof i&&i]}),(0,g.jsx)(a.Z,{mr:m.cd}),(0,g.jsxs)(o.Z,{flex:1,justifyContent:"flex-end",children:[t,x&&(0,g.jsx)(f.Z,b({afterIcon:(0,g.jsx)(v.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:j.Z,alignRight:!0,autoComplete:"off",large:c,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},x)),u&&(0,g.jsx)(s.Z,b(b({},u),{},{afterIcon:(0,g.jsx)(v._M,{}),afterIconSize:j.Z,alignRight:!0,autoComplete:"off",large:c,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===u||void 0===u||null===(n=u.options)||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.value;return(0,g.jsx)("option",{value:t,children:n||t},t)}))})),y&&(0,g.jsx)(h.Z,{checked:!(null===y||void 0===y||!y.checked),compact:!0,onCheck:null===y||void 0===y?void 0:y.onCheck})]})]})})},y=function(e){var n=e.children,t=e.description,u=e.headerChildren,s=e.title;return(0,g.jsxs)(c.Z,{noPadding:!0,children:[(0,g.jsx)(a.Z,{p:m.cd,children:(0,g.jsxs)(l.ZP,{alignItems:"center",children:[(0,g.jsxs)(o.Z,{flex:1,flexDirection:"column",children:[(0,g.jsx)(d.Z,{level:4,children:s}),t&&"string"===typeof t&&(0,g.jsx)(a.Z,{mt:1,children:(0,g.jsx)(p.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),u]})}),i.Children.map(n,(function(e,n){return(0,g.jsxs)("div",{children:[(0,g.jsx)(r.Z,{light:!0}),e]},"".concat(s,"-").concat(n))}))]})}},8193:function(e,n,t){t.d(n,{N:function(){return c},Z:function(){return d}});var i=t(38626),r=t(44897),o=t(42631),l=t(70515),d=2*l.iI,c=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],o.n_,l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2717],{71610:function(e,n,i){var t=i(82394),r=i(75582),l=i(12691),o=i.n(l),s=i(38626),u=i(82684),c=i(32013),a=i(98777),d=i(15338),v=i(48670),h=i(88543),p=i(38276),m=i(4190),f=i(75499),j=i(30160),x=i(35686),g=i(70515),Z=i(30229),b=i(32080),y=i(81728),P=i(3917),O=i(55283),_=i(70320),E=i(28598);function k(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 S(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var T={large:!1};n.Z=function(e){var n=e.bookmarkValues,i=e.originalBookmarkValues,l=e.setBookmarkValues,k=e.pipeline,I=(0,u.useContext)(s.ThemeContext),C=(0,_.qB)(),w=(0,u.useState)(null),M=w[0],A=w[1],N=(0,u.useMemo)((function(){return null!==k&&void 0!==k&&k.blocks?(0,b.n)(k):null}),[k]),L=(0,u.useMemo)((function(){return Object.keys(N||{})||[]}),[N]),D=x.ZP.integration_sources.pipelines.list(null===k||void 0===k?void 0:k.uuid,{block_uuid:L},{},{pauseFetch:!(null!==L&&void 0!==L&&L.length)}).data,R=(0,u.useMemo)((function(){return null===D||void 0===D?void 0:D.integration_sources}),[D]);return(0,u.useEffect)((function(){if((null===R||void 0===R?void 0:R.length)>=1&&(!n||!M)){var e={};null===R||void 0===R||R.map((function(n){var i,t=n.block,l=n.streams,o=null===t||void 0===t?void 0:t.uuid;e[o]={},null===(i=Object.entries(l||{}))||void 0===i||i.forEach((function(n){var i,t,l=(0,r.Z)(n,2),s=l[0],u=l[1];e[o][s]=null===u||void 0===u||null===(i=u.state)||void 0===i||null===(t=i.bookmarks)||void 0===t?void 0:t[s]}))})),n||l(e),M||A(e)}}),[n,M,l,A,R]),(0,E.jsxs)(p.Z,{p:g.cd,children:[!D&&(0,E.jsx)(m.Z,{inverted:!0,small:!0}),null===R||void 0===R?void 0:R.map((function(e){var s=e.block,m=e.pipeline_run,x=e.pipeline_schedule,b=e.streams,_=null===s||void 0===s?void 0:s.uuid;return(0,E.jsx)(h.Z,{title:(0,E.jsx)(j.ZP,{color:(0,O.qn)(null===s||void 0===s?void 0:s.type,{blockColor:null===s||void 0===s?void 0:s.color,theme:I}).accent,monospace:!0,children:_}),children:(0,E.jsx)(c.Z,{noBorder:!0,noBoxShadow:!0,children:Object.entries(b||{}).map((function(e){var s,c,b,O,I=(0,r.Z)(e,2),w=I[0],A=I[1],N=A.record,L=A.state,D=(null===L||void 0===L||null===(s=L.bookmarks)||void 0===s?void 0:s[w])||{};return(0,E.jsxs)(a.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:w}),titleXPadding:g.cd*g.iI,titleYPadding:g.cd*g.iI,children:[(0,E.jsx)(h.S,S(S({},T),{},{title:"Last pipeline run started at",children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:(null===m||void 0===m?void 0:m.started_at)&&(0,P.XG)(null===m||void 0===m?void 0:m.started_at,C)})})),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsx)(h.S,S(S({},T),{},{title:"Last pipeline run completed at",children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:(null===m||void 0===m?void 0:m.completed_at)&&(0,P.XG)(null===m||void 0===m?void 0:m.completed_at,C)})})),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsx)(h.S,S(S({},T),{},{title:"Trigger",children:(0,E.jsx)(o(),{as:"/pipelines/".concat(null===k||void 0===k?void 0:k.uuid,"/triggers/").concat(null===x||void 0===x?void 0:x.id),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,E.jsx)(v.Z,{block:!0,default:!0,openNewWindow:!0,children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:null===x||void 0===x?void 0:x.name})})})})),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsx)(h.S,S(S({},T),{},{title:"Type",children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:(0,y.kC)((null===(c=Z.Z4[null===x||void 0===x?void 0:x.schedule_type])||void 0===c?void 0:c.call(Z.Z4))||"")})})),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsx)(h.S,S(S({},T),{},{title:"Frequency",children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:null===x||void 0===x?void 0:x.schedule_interval})})),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsxs)(p.Z,{p:g.cd,children:[(0,E.jsx)(j.ZP,{bold:!0,large:!0,children:"Bookmark values"}),(0,E.jsx)(p.Z,{mt:1,children:(0,E.jsxs)(j.ZP,{muted:!0,small:!0,children:["Overriding the bookmark values will be applied to all pipeline runs",(0,E.jsx)("br",{}),"for this trigger until there is at least 1 successful pipeline run in this trigger."]})})]}),(0,E.jsx)(d.Z,{light:!0,short:!0}),!(null!==(b=Object.values(D||{}))&&void 0!==b&&b.length)&&(0,E.jsx)(p.Z,{p:g.cd,children:(0,E.jsx)(j.ZP,{muted:!0,children:"There are currently no bookmark values for this stream."})}),Object.entries(D||{}).map((function(e){var o,s,c,a,d,v,p=(0,r.Z)(e,2),m=p[0],f=(p[1],null===n||void 0===n||null===(o=n[_])||void 0===o||null===(s=o[w])||void 0===s?void 0:s[m]),x=(null===i||void 0===i||null===(c=i[_])||void 0===c||null===(a=c[w])||void 0===a||a[m],null===M||void 0===M||null===(d=M[_])||void 0===d||null===(v=d[w])||void 0===v?void 0:v[m]);return(0,u.createElement)(h.S,S(S({},T),{},{title:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:m}),description:x&&x!==f&&(0,E.jsxs)(j.ZP,{muted:!0,small:!0,children:["Original bookmark value from the last pipeline run: ",(0,E.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:x})]}),key:"".concat(_,"-bookmark-values-").concat(m),textInput:{monospace:!0,onChange:function(e){return l((function(i){var r;return S(S({},i),{},(0,t.Z)({},_,S(S({},null===n||void 0===n?void 0:n[_]),{},(0,t.Z)({},w,S(S({},null===n||void 0===n||null===(r=n[_])||void 0===r?void 0:r[w]),{},(0,t.Z)({},m,e.target.value))))))}))},value:String(f||"")}}))})),(0,E.jsx)(d.Z,{light:!0}),(0,u.createElement)(h.S,S(S({},T),{},{title:"Record",description:"The most recently synced record.",key:"block-uuid-".concat(_,"-").concat(w)}),(0,E.jsx)(f.Z,{columnFlex:[1,null],columns:[{uuid:"Column"},{uuid:"Value"}],rows:null===(O=Object.entries(N||{}))||void 0===O?void 0:O.map((function(e){var n=(0,r.Z)(e,2),i=n[0],t=n[1];return[(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:i},i),(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:String(t)},"".concat(i,"-").concat(t))]}))}))]})}))})})}))]})}},12717:function(e,n,i){i.d(n,{Z:function(){return Ue}});var t=i(21831),r=i(82394),l=i(75582),o=i(12691),s=i.n(o),u=i(82684),c=i(20026),a=i.n(c),d=i(92083),v=i.n(d),h=i(21764),p=i(69864),m=i(34376),f=i(71610),j=i(71180),x=i(90299),g=i(14805),Z=i(70652),b=i(50724),y=i(9134),P=i(39457),O=i(38626),_=i(39867),E=i(55485),k=i(85854),S=i(38276),T=i(75499),I=i(30160),C=i(17488),w=i(12468),M=i(44375),A=i(70515),N=i(55283),L=i(86735),D=i(28598);function R(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 U(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?R(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):R(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var H=function(e){var n=e.blocks,i=e.updateVariables,t=e.variables,l=(0,u.useContext)(O.ThemeContext),o=(0,u.useCallback)((function(e,n){return i((function(){var i=(null===t||void 0===t?void 0:t.__mage_variables)||{},l=(null===i||void 0===i?void 0:i.blocks)||{},o=l[e]||{},s=(null===o||void 0===o?void 0:o.configuration)||{};return U(U({},t),{},{__mage_variables:U(U({},i),{},{blocks:U(U({},l),{},(0,r.Z)({},e,U(U({},o),{},{configuration:U(U({},s),n)})))})})}))}),[i,t]);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(k.Z,{children:"dbt runtime settings"}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(T.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,i,r,s=e.type,u=e.uuid,c=(0,M.IU)(e).name,a=(0,N.qn)(s,{blockColor:e.color,theme:l}).accent,d=null===t||void 0===t||null===(n=t.__mage_variables)||void 0===n||null===(i=n.blocks)||void 0===i||null===(r=i[u])||void 0===r?void 0:r.configuration,v=d||{},h=v.prefix,p=v.suffix,m=(null===d||void 0===d?void 0:d.flags)||[],f=!(null===m||void 0===m||!m.includes(M.Dy));return[(0,D.jsx)(w.Z,{block:!0,label:(0,D.jsx)(I.ZP,{monospace:!0,small:!0,children:u}),size:null,widthFitContent:!0,children:(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(_.Z,{color:a,size:1.5*A.iI,square:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsxs)(I.ZP,{monospace:!0,small:!0,children:[h&&(0,D.jsx)(I.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:h}),c,p&&(0,D.jsx)(I.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:p})]})]})},"uuid-".concat(u)),(0,D.jsx)(E.ZP,{alignItems:"center",children:(0,D.jsx)(Z.Z,{checked:f,label:M.Dy,monospace:!0,onClick:function(){return o(u,{flags:f?(0,L.Od)(m,(function(e){return M.Dy===e})):m.concat(M.Dy)})},small:!0})},"flags-".concat(u)),(0,D.jsx)(C.Z,{compact:!0,monospace:!0,onChange:function(e){return o(u,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:h,width:10*A.iI},"prefix-".concat(u)),(0,D.jsx)(C.Z,{compact:!0,monospace:!0,onChange:function(e){return o(u,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:p,width:10*A.iI},"suffix-".concat(u))]}))})})]})},q=i(97196),B=i(15338),F=i(97618),z=i(48670),G=i(26304),W=i(44897),Y=i(95363),K=i(61896),V=["children","large","lineHeight","ordered"];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 Q=(0,O.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||W.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||W.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||W.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(Y.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(Y.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(K.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(K.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(K.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),$=O.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],Q),ee=O.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],Q),ne=O.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*A.iI,"px;\n ")}));var ie,te=function(e){var n=e.children,i=e.large,t=e.lineHeight,r=e.ordered,l=(0,G.Z)(e,V),o=r?ee:$;return(0,D.jsx)(o,X(X({large:i,lineHeight:t},l),{},{children:u.Children.map(n,(function(e,n){var t;return(0,D.jsx)(ne,X(X({large:i,marginTop:n>=1},l),{},{children:u.cloneElement(e)}),(null===(t=e.props)||void 0===t?void 0:t.key)||n)}))}))},re=i(37899),le=i(75457),oe=i(30229),se=i(57653),ue=i(83784),ce=i(82359),ae=i(44085),de=i(81334),ve=i(69650),he=i(81769),pe=i(54193),me=i(72473),fe=i(81728),je=i(16488),xe=i(70320),ge=(ie={},(0,r.Z)(ie,pe.zj.DATE,me.aw),(0,r.Z)(ie,pe.zj.DATETIME,me.Pf),(0,r.Z)(ie,pe.zj.DICTIONARY,me.$l),(0,r.Z)(ie,pe.zj.FLOAT,me.As),(0,r.Z)(ie,pe.zj.INTEGER,me.qZ),(0,r.Z)(ie,pe.zj.LIST,me.B4),(0,r.Z)(ie,pe.zj.STRING,me.KJ),ie);var Ze=function(e){var n,i,t,r=e.containerRef,o=e.date,s=e.interactions,c=e.pipeline,a=e.pipelineInteraction,d=e.pipelineSchedule,v=e.setVariables,h=e.showSummary,p=e.time,m=e.triggerTypes,f=e.variables,j=(0,u.useMemo)((function(){return(0,L.HK)(s||[],(function(e){return e.uuid}))}),[s]),x=(0,u.useMemo)((function(){return(null===c||void 0===c?void 0:c.blocks)||[]}),[c]),g=(0,u.useMemo)((function(){return(null===a||void 0===a?void 0:a.blocks)||{}}),[a]),Z=(0,u.useMemo)((function(){var e=[];null===x||void 0===x||x.length;return null===x||void 0===x||x.map((function(n,i){var t=(n||{uuid:null}).uuid,l=(null===g||void 0===g?void 0:g[t])||[];null===l||void 0===l||l.length;e.push((0,D.jsx)(S.Z,{p:A.cd,children:null===l||void 0===l?void 0:l.map((function(e,n){return(0,D.jsx)(S.Z,{mt:n>=1?2*A.cd:0,children:(0,D.jsx)(he.Z,{blockInteraction:e,containerRef:r,interaction:null===j||void 0===j?void 0:j[null===e||void 0===e?void 0:e.uuid],setVariables:v,variables:f})},"".concat(null===e||void 0===e?void 0:e.uuid,"-").concat(n))}))}))})),e}),[x,r,j,v,f]),b=(0,xe.qB)(),y=(0,u.useMemo)((function(){return o&&null!==p&&void 0!==p&&p.hour&&null!==p&&void 0!==p&&p.minute?(0,je.XM)(o,p,{convertToUtc:b,includeSeconds:!0,localTimezone:b}):null}),[o,b,p]),P=(0,u.useMemo)((function(){var e=[];null===x||void 0===x||x.length;return null===x||void 0===x||x.map((function(n,i){var t=(n||{uuid:null}).uuid,r=(null===g||void 0===g?void 0:g[t])||[];null===r||void 0===r||r.forEach((function(n,r){var o=null===j||void 0===j?void 0:j[null===n||void 0===n?void 0:n.uuid];Object.entries((null===o||void 0===o?void 0:o.variables)||{}).forEach((function(n,o){var s,u=(0,l.Z)(n,2),c=u[0],a=u[1],d=a.name,v=a.required,h=a.types,p=null===f||void 0===f?void 0:f[c],m="undefined"===typeof p,j=v&&m,x=(null===ge||void 0===ge?void 0:ge[h[0]])||me.KJ,g=[];"undefined"!==typeof p?p&&Array.isArray(p||[])?null===p||void 0===p||p.forEach((function(e){g.push(e&&"object"===typeof e?g.push(JSON.stringify(e)):g.push(String(e)))})):p&&"object"===typeof p?Object.entries(p||{}).forEach((function(e){var n=(0,l.Z)(e,2),i=n[0];n[1]&&g.push(String(i))})):g.push(String(p)):g.push(p||""),e.push([(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(x,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,monospace:!0,children:c})]},"".concat(t,"-").concat(c,"-label-").concat(d,"-").concat(i,"-").concat(r,"-").concat(o)),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsxs)(I.ZP,{danger:j,monospace:!j,muted:m,children:[m&&!j&&"-",j&&"This is required",!m&&!j&&(null===g||void 0===g||null===(s=g.map((function(e){return String(e)})))||void 0===s?void 0:s.join(", "))]})},"".concat(t,"-").concat(c,"-value-").concat(d,"-").concat(p,"-").concat(i,"-").concat(r,"-").concat(o))])}))}))})),(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:e})}),[x,j,f]);return(0,D.jsxs)(D.Fragment,{children:[!h&&Z,h&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{p:A.cd,children:(0,D.jsx)(k.Z,{children:"Settings"})}),(0,D.jsx)(B.Z,{light:!0,short:!0}),(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:[[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.Bf,{default:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Trigger type"})]},"trigger_type"),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsx)(I.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_type),monospace:!0,children:null!==d&&void 0!==d&&d.schedule_type?null===m||void 0===m||null===(n=m.find((function(e){return e.uuid===(null===d||void 0===d?void 0:d.schedule_type)})))||void 0===n||null===(i=n.label)||void 0===i?void 0:i.call(n):"This is required"})},"trigger_type_input")],[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.KJ,{default:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsx)(I.ZP,{danger:!(null!==d&&void 0!==d&&d.name),monospace:!0,children:(null===d||void 0===d?void 0:d.name)||"This is required"})},"trigger_name_input")],[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.KJ,{default:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsx)(I.ZP,{monospace:!0,muted:!(null!==d&&void 0!==d&&d.description),children:(null===d||void 0===d?void 0:d.description)||"-"})},"trigger_description_input")],[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.Pf,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsxs)(I.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_interval),monospace:!0,muted:!(null!==d&&void 0!==d&&d.schedule_interval),children:[(null===d||void 0===d?void 0:d.schedule_interval)&&(0,fe.vg)((null===d||void 0===d||null===(t=d.schedule_interval)||void 0===t?void 0:t.substring(1))||""),!(null!==d&&void 0!==d&&d.schedule_interval)&&"This is required"]})},"frequency_input")],[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.aw,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsx)(I.ZP,{danger:!y,monospace:!!y,muted:!y,children:y||"This is required"})},"start_time_input")]]}),(0,D.jsx)(S.Z,{p:A.cd,children:(0,D.jsx)(k.Z,{children:"Customize"})}),(0,D.jsx)(B.Z,{light:!0,short:!0}),P]})]})},be=i(35686),ye=i(77417),Pe=i(44425),Oe=i(88785),_e=i(28795),Ee={label:function(){return"CUSTOMIZE"},uuid:"customize"},ke={label:function(){return"SETTINGS"},uuid:"settings"},Se={label:function(){return"REVIEW"},uuid:"review"},Te=[ke,Ee,Se],Ie=i(32080),Ce=i(22286),we=i(79500),Me=i(8916),Ae=i(42122),Ne=i(72619),Le=i(3917);function De(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 Re(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?De(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):De(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var Ue=function(e){var n=e.creatingWithLimitation,i=e.errors,o=e.fetchPipelineSchedule,c=e.onCancel,d=e.pipeline,O=e.pipelineSchedule,_=e.setErrors,w=e.variables,M=e.useCreateScheduleMutation,R=(0,ye.Z)().project,U=(0,u.useRef)(null),G=(0,m.useRouter)(),W=(0,xe.qB)(),Y=null===d||void 0===d?void 0:d.uuid,K=(0,u.useMemo)((function(){return null===O||void 0===O?void 0:O.id}),[O]),V=(null===d||void 0===d?void 0:d.type)===se.qL.STREAMING,J=(0,u.useMemo)((function(){var e;return null===O||void 0===O||null===(e=O.variables)||void 0===e?void 0:e[oe.PN]}),[O]),X=(0,u.useState)(J?"string"===typeof J&&(0,fe.Pb)(J)?JSON.stringify(J):J:null),Q=X[0],$=X[1],ee=(0,u.useState)([]),ne=ee[0],ie=ee[1],he=(0,u.useState)(!0),pe=he[0],ge=he[1],De=(0,u.useState)(!1),Ue=De[0],He=De[1],qe=(0,u.useState)(!1),Be=qe[0],Fe=qe[1],ze=(0,u.useState)(null),Ge=ze[0],We=ze[1],Ye=(0,u.useState)({}),Ke=Ye[0],Ve=Ye[1],Je=(0,u.useState)(null),Xe=Je[0],Qe=Je[1],$e=(0,u.useState)(null),en=$e[0],nn=$e[1],tn=(0,u.useState)(!1),rn=tn[0],ln=tn[1],on=(0,u.useState)(null),sn=on[0],un=on[1],cn=be.ZP.client_pages.detail("pipeline_schedule:create",{"pipeline_schedules[]":[K],"pipelines[]":[Y]},{},{key:"Triggers/Edit/".concat(Y,"/").concat(K),pauseFetch:!Y||!K}).data,an=((0,u.useMemo)((function(){return null===cn||void 0===cn?void 0:cn.client_page}),[cn]),(0,u.useState)(Te[0].uuid)),dn=an[0],vn=an[1],hn=(0,u.useMemo)((function(){var e;return!(null===R||void 0===R||null===(e=R.features)||void 0===e||!e[ce.d.INTERACTIONS])}),[null===R||void 0===R?void 0:R.features]),pn=(0,u.useMemo)((function(){return!K&&n}),[n,K]),mn=be.ZP.pipeline_interactions.detail(hn&&Y,{filter_for_permissions:1}).data,fn=be.ZP.interactions.pipeline_interactions.list(hn&&Y).data,jn=(0,u.useMemo)((function(){return(null===mn||void 0===mn?void 0:mn.pipeline_interaction)||{}}),[mn]),xn=(0,u.useMemo)((function(){return(null===fn||void 0===fn?void 0:fn.interactions)||[]}),[fn]),gn=(0,u.useMemo)((function(){var e;return hn&&(null===(e=Object.keys((null===jn||void 0===jn?void 0:jn.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[hn,jn]),Zn=(0,u.useMemo)((function(){return!!K&&gn}),[gn,K]),bn=(0,u.useMemo)((function(){var e,n={};return null===jn||void 0===jn||null===(e=jn.permissions)||void 0===e||e.forEach((function(e){var i=e.triggers;null===i||void 0===i||i.forEach((function(e){var i=e.schedule_interval,t=e.schedule_type;null!==n&&void 0!==n&&n[t]||(n[t]={}),i&&(n[t][i]=!0)}))})),n}),[jn]),yn=(0,u.useMemo)((function(){return(0,Me.wx)(w,(function(e){return e.uuid===ue.C}))}),[w]),Pn=(0,u.useMemo)((function(){return Xe||{}}),[Xe]),On=Pn.description,_n=Pn.name,En=Pn.schedule_interval,kn=Pn.schedule_type,Sn=Pn.settings,Tn=void 0===Sn?{}:Sn,In=Pn.start_time,Cn=Pn.tags,wn=Pn.variables,Mn=void 0===wn?{}:wn;(0,u.useEffect)((function(){!Ge&&Tn&&We(Tn)}),[Ge,Tn]);var An=(0,u.useState)(null),Nn=An[0],Ln=An[1],Dn=(0,u.useState)({hour:"00",minute:"00"}),Rn=Dn[0],Un=Dn[1],Hn=(0,u.useState)({dayOfMonth:null,dayOfWeek:null,hour:null,minute:null,second:null}),qn=Hn[0],Bn=Hn[1],Fn=be.ZP.event_rules.detail(oe.Xm.EVENT===kn?"aws":null).data,zn=(0,u.useMemo)((function(){var e;return(null===Fn||void 0===Fn||null===(e=Fn.event_rule)||void 0===e?void 0:e.rules)||[]}),[Fn]),Gn=(0,u.useMemo)((function(){return(0,L.HK)(zn,(function(e){return e.name}))}),[zn]),Wn=(0,p.Db)(be.ZP.pipeline_schedules.useUpdate(K),{onSuccess:function(e){return(0,Ne.wD)(e,{callback:function(){null===o||void 0===o||o(),G.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(Y,"/triggers/").concat(K))},onErrorCallback:function(e,n){return _({errors:n,response:e})}})}}),Yn=(0,l.Z)(Wn,2),Kn=Yn[0],Vn=Yn[1].isLoading,Jn=(0,u.useMemo)((function(){return Mn||{}}),[Mn]);(0,u.useEffect)((function(){if(In){var e=(0,we.a)(In,{localTimezone:W});Ln(null===e||void 0===e?void 0:e.date),Un(null===e||void 0===e?void 0:e.time);var n=v()(In).utc();Bn({dayOfMonth:n.date(),dayOfWeek:n.day(),hour:n.hours(),minute:n.minutes(),second:n.seconds()})}else{var i=new Date;Ln(i),Un(W?{hour:(0,Le.lJ)(String(i.getHours())),minute:(0,Le.lJ)(String(i.getMinutes()))}:{hour:(0,Le.lJ)(String(i.getUTCHours())),minute:(0,Le.lJ)(String(i.getUTCMinutes()))})}}),[W,In]),(0,u.useEffect)((function(){Jn&&Object.keys(Jn).length>0&&ge(!0)}),[Jn]),(0,u.useEffect)((function(){Ve(pe?null===yn||void 0===yn?void 0:yn.reduce((function(e,n){var i=n.uuid,t=n.value;return Re(Re({},e),{},(0,r.Z)({},i,Jn[i]||t))}),{}):null)}),[yn,pe,Jn]);var Xn=(0,u.useMemo)((function(){return(0,je._U)(En)}),[En]),Qn=(0,u.useMemo)((function(){return Xn&&sn?a().toString(sn,{throwExceptionOnParseError:!1}):""}),[sn,Xn]),$n=(0,u.useMemo)((function(){return null===Qn||void 0===Qn?void 0:Qn.toLowerCase().includes("error")}),[Qn]);(0,u.useEffect)((function(){if(O&&!Xe){if(ie(O.event_matchers),(0,je._U)(null===O||void 0===O?void 0:O.schedule_interval)){var e=W?(0,je.lO)(null===O||void 0===O?void 0:O.schedule_interval):null===O||void 0===O?void 0:O.schedule_interval;un(e),Qe(Re(Re({},O),{},{schedule_interval:"custom"}))}else Qe(V?Re(Re({},O),{},{schedule_interval:oe.U5.ONCE}):O);var n=O.sla;if(n){He(!0);var i=(0,je.gU)(n),t=i.time,r=i.unit;Qe((function(e){return Re(Re({},e),{},{slaAmount:t,slaUnit:r})}))}}}),[W,V,O,Xe,En]);var ei=(0,u.useMemo)((function(){return!(null===Ge||void 0===Ge||!Ge.landing_time_enabled)}),[Ge]),ni=(0,u.useMemo)((function(){return oe.Xm.TIME!==kn||![oe.U5.DAILY,oe.U5.HOURLY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(En)}),[En,kn]),ii=(0,u.useMemo)((function(){return ei&&!ni}),[ni,ei]),ti=(0,u.useCallback)((function(){var e=Re(Re({},(0,Ae.GL)(Xe,["name","description","schedule_type","tags"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,Me.e7)(Re(Re({},Ke),Q?(0,r.Z)({},oe.PN,Q):{}))});if(ii){var n=qn.dayOfMonth,i=qn.dayOfWeek,t=qn.hour,l=qn.minute,o=qn.second,s=v()("2023-07-01").utc();(0,fe.HW)(n)&&(s=s.date(n)),(0,fe.HW)(i)&&(s=s.day(i)),(0,fe.HW)(t)&&(s=s.hours(t)),(0,fe.HW)(l)&&(s=s.minutes(l)),(0,fe.HW)(o)&&(s=s.seconds(o)),e.schedule_interval=Xn?sn:Xe.schedule_interval,e.start_time=s.toISOString()}else oe.Xm.EVENT===Xe.schedule_type?e.event_matchers=ne:(e.schedule_interval=Xn?W&&!$n&&sn?(0,je.lO)(sn,!0):sn:Xe.schedule_interval,e.start_time=Nn&&null!==Rn&&void 0!==Rn&&Rn.hour&&null!==Rn&&void 0!==Rn&&Rn.minute?(0,je.XM)(Nn,Rn,{convertToUtc:W,includeSeconds:!0,localTimezone:W}):null);if(Ue){var u=null===Xe||void 0===Xe?void 0:Xe.slaAmount,c=null===Xe||void 0===Xe?void 0:Xe.slaUnit;if(!u||isNaN(u)||!c)return void h.Am.error("Please enter a valid SLA",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,je.vJ)(u,c)}else null!==O&&void 0!==O&&O.sla&&(e.sla=0);e.settings=Ge,Kn({pipeline_schedule:Re(Re({},e),{},{variables:en||(null===e||void 0===e?void 0:e.variables)})})}),[Q,$n,sn,Nn,W,Ue,ne,Xn,qn,O,Ke,Xe,Ge,ii,Rn,Kn,en]),ri=(0,u.useMemo)((function(){if(null===O||void 0===O||!O.runtime_average)return"Trigger doesn\u2019t have enough history to estimate runtime.";var e=Number(null===O||void 0===O?void 0:O.runtime_average),n=Math.max(Math.floor(e/3600),0),i=Math.max(Math.floor((e-60*n*60)/60),0),t=Math.max(Math.floor(e-(60*n*60+60*i)),0),r=[];return n>=1&&r.push((0,fe._6)("hour",n,!0)),i>=1&&r.push((0,fe._6)("minute",i,!0)),t>=1&&r.push((0,fe._6)("second",t,!0)),r.join(" ")}),[O]),li=(0,u.useMemo)((function(){if(!ii)return null;var e=[(0,D.jsxs)(S.Z,{mr:1,children:[(0,D.jsx)(S.Z,{mb:1,children:(0,D.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Minute"})}),(0,D.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){Bn((function(n){return Re(Re({},n),{},{minute:e.target.value})}))},value:(null===qn||void 0===qn?void 0:qn.minute)||"",children:[(0,D.jsx)("option",{value:""}),(0,L.w6)(60).map((function(e,n){return(0,D.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Minute"),(0,D.jsxs)(S.Z,{mr:1,children:[(0,D.jsx)(S.Z,{mb:1,children:(0,D.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Second"})}),(0,D.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){Bn((function(n){return Re(Re({},n),{},{second:e.target.value})}))},value:(null===qn||void 0===qn?void 0:qn.second)||"",children:[(0,D.jsx)("option",{value:""}),(0,L.w6)(60).map((function(e,n){return(0,D.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Second")];return[oe.U5.DAILY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(En)&&e.unshift((0,D.jsxs)(S.Z,{mr:1,children:[(0,D.jsx)(S.Z,{mb:1,children:(0,D.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Hour"})}),(0,D.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){Bn((function(n){return Re(Re({},n),{},{hour:e.target.value})}))},value:(null===qn||void 0===qn?void 0:qn.hour)||"",children:[(0,D.jsx)("option",{value:""}),(0,L.w6)(24).map((function(e,n){return(0,D.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Hour")),oe.U5.WEEKLY===En?e.unshift((0,D.jsxs)(S.Z,{mr:1,children:[(0,D.jsx)(S.Z,{mb:1,children:(0,D.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Day of the week"})}),(0,D.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){Bn((function(n){return Re(Re({},n),{},{dayOfWeek:e.target.value})}))},value:(null===qn||void 0===qn?void 0:qn.dayOfWeek)||"",children:[(0,D.jsx)("option",{value:""}),(0,D.jsx)("option",{value:6,children:"Sunday"}),(0,D.jsx)("option",{value:0,children:"Monday"}),(0,D.jsx)("option",{value:1,children:"Tuesday"}),(0,D.jsx)("option",{value:2,children:"Wednesday"}),(0,D.jsx)("option",{value:3,children:"Thursday"}),(0,D.jsx)("option",{value:4,children:"Friday"}),(0,D.jsx)("option",{value:5,children:"Saturday"})]})]},"Day of the week")):oe.U5.MONTHLY===En&&e.unshift((0,D.jsxs)(S.Z,{mr:1,children:[(0,D.jsx)(S.Z,{mb:1,children:(0,D.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Day of the month"})}),(0,D.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){Bn((function(n){return Re(Re({},n),{},{dayOfMonth:e.target.value})}))},value:(null===qn||void 0===qn?void 0:qn.dayOfMonth)||"",children:[(0,D.jsx)("option",{value:""}),(0,L.w6)(31).map((function(e,n){return(0,D.jsx)("option",{value:n+1,children:n+1>=10?String(n+1):"0".concat(n+1)},n+1)}))]})]},"Day of the month")),(0,D.jsx)(E.ZP,{children:e})}),[qn,En,ii]),oi=(0,u.useMemo)((function(){return[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.KJ,{default:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,D.jsx)(C.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_n},"trigger_name_input")]}),[_n]),si=(0,u.useMemo)((function(){return[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.KJ,{default:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,D.jsx)(C.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{description:e.target.value})}))},placeholder:"Description",value:On},"trigger_description_input")]}),[On]),ui=(0,u.useMemo)((function(){var e=[oi,si,[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.Pf,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,D.jsxs)("div",{children:[(0,D.jsxs)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;Qe((function(e){return Re(Re({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:En,children:[Object.values(oe.U5).reduce((function(e,n){var i;return!pn||null!==bn&&void 0!==bn&&null!==(i=bn[oe.Xm.TIME])&&void 0!==i&&i[n]?e.concat((0,D.jsx)("option",{value:n,children:n.substring(1)},n)):e}),[]),!pn&&(0,D.jsx)("option",{value:"custom",children:"custom"},"custom")]}),!pn&&(0,D.jsx)(S.Z,{mt:1,p:1,children:(0,D.jsxs)(I.ZP,{muted:!0,small:!0,children:["If you don't see the frequency option you need, select ",(0,D.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")]];return pn||e.push([(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.rs,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Enable landing time"})]},"frequency"),(0,D.jsxs)("div",{children:[(0,D.jsx)(ve.Z,{checked:ei,disabled:ni,onCheck:function(){We((function(e){return Re(Re({},e),{},{landing_time_enabled:!ei})}))}}),(0,D.jsxs)(S.Z,{mt:1,p:1,children:[ni&&(0,D.jsxs)(I.ZP,{muted:!0,small:!0,children:["In order to enable landing time, the trigger\u2019s frequency must be ",(0,D.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.HOURLY}),", ",(0,D.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.DAILY}),", ",(0,D.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.WEEKLY}),", or ",(0,D.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.MONTHLY}),"."]}),!ni&&(0,D.jsx)(I.ZP,{muted:!0,small:!0,children:"Instead of starting at a specific time, this trigger will schedule pipeline runs at a time where it will finish by the specified time below."})]})]},"frequency_input")]),ii&&e.push([(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.Pf,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Average runtime"})]},"runtime_average"),(0,D.jsx)(E.ZP,{alignItems:"center",style:{minHeight:"".concat(5.75*A.iI,"px")},children:(0,D.jsx)(I.ZP,{monospace:!0,children:ri})},"runtime_average_value")]),e.push([(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.aw,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsxs)(I.ZP,{default:!0,children:[ii&&"Pipeline complete by",!ii&&"Start date and time"]})]},"start_time"),ii?li:(0,D.jsxs)("div",{style:{minHeight:"".concat(5.75*A.iI,"px")},children:[!rn&&(0,D.jsx)(C.Z,{monospace:!0,onClick:function(){return ln((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Nn?(0,je.XM)(Nn,Rn,{localTimezone:W}):""}),(0,D.jsx)("div",{style:{width:"400px"},children:(0,D.jsx)(b.Z,{disableEscape:!0,onClickOutside:function(){return ln(!1)},open:rn,style:{position:"relative"},children:(0,D.jsx)(g.Z,{localTime:W,selectedDate:Nn,selectedTime:Rn,setSelectedDate:Ln,setSelectedTime:Un,topPosition:!0})})})]},"start_time_input")]),V&&e.splice(2,2),Xn&&e.splice(2,0,[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.EK,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,D.jsxs)("div",{children:[(0,D.jsx)(C.Z,{monospace:!0,onChange:function(e){e.preventDefault(),un(e.target.value)},placeholder:"* * * * *",value:sn}),(0,D.jsxs)(S.Z,{mt:1,p:1,children:[(0,D.jsx)(I.ZP,{monospace:!0,xsmall:!0,children:"[minute] [hour] [day(month)] [month] [day(week)]"}),(0,D.jsx)(S.Z,{mb:"2px"}),sn?(0,D.jsx)(I.ZP,{danger:$n,muted:!0,small:!0,children:$n?"Invalid cron expression. Please check the cron syntax.":(0,D.jsxs)(D.Fragment,{children:['"',Qn,'"']})}):null,W&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(I.ZP,{bold:!0,inline:!0,small:!0,warning:!0,children:"Note:\xa0"}),(0,D.jsxs)(I.ZP,{inline:!0,small:!0,children:["If you have the display_local_timezone setting enabled, the local cron expression above will match your local timezone only",(0,D.jsx)("br",{}),"if the minute and hour values are single values without any special characters, such as the comma, hyphen, or slash.",(0,D.jsx)("br",{}),"You can still use cron expressions with special characters for the minute/hour values, but it will be based in UTC time."]})]})]})]},"cron_expression_input")]),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{mb:2,px:A.cd,children:(0,D.jsx)(k.Z,{children:"Settings"})}),(0,D.jsx)(B.Z,{light:!0,short:!0}),(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:e})]})}),[$n,sn,Nn,W,pn,Xn,V,ni,ei,li,bn,Qn,ri,En,rn,ii,Rn,oi,si]),ci=(0,u.useCallback)((function(e,n){ie((function(i){return Object.entries(n).forEach((function(n){var t=(0,l.Z)(n,2),r=t[0],o=t[1];i[e][r]=o})),(0,t.Z)(i)}))}),[ie]),ai=(0,u.useMemo)((function(){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{mb:A.cd,px:A.cd,children:(0,D.jsx)(k.Z,{children:"Settings"})}),(0,D.jsx)(B.Z,{light:!0,short:!0}),(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:[oi,si]}),(0,D.jsxs)(S.Z,{mb:2,mt:5,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Events"}),(0,D.jsxs)(I.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,D.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,D.jsxs)(S.Z,{mt:A.Mq,children:[(0,D.jsx)(I.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,D.jsxs)(I.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,D.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,D.jsx)(z.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,D.jsx)(S.Z,{mt:1,children:(0,D.jsxs)(te,{monospace:!0,ordered:!0,children:[(0,D.jsx)(I.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,D.jsx)(I.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,D.jsx)(I.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,D.jsx)(B.Z,{light:!0,short:!0}),(null===ne||void 0===ne?void 0:ne.length)>=1&&(0,D.jsx)(T.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===ne||void 0===ne?void 0:ne.map((function(e,n){var i=e.event_type,t=e.name,r=e.pattern,l=e.id||"".concat(i,"-").concat(t,"-").concat(n,"-").concat(JSON.stringify(r)),o=[];return r&&JSON.stringify(r,null,2).split("\n").forEach((function(e){o.push(" ".concat(e))})),[(0,D.jsx)(ae.Z,{monospace:!0,onChange:function(e){return ci(n,{event_type:e.target.value})},placeholder:"Event provider",value:i||"",children:q.S5.map((function(e){var n=e.label,i=e.uuid;return(0,D.jsx)("option",{value:i,children:n()},i)}))},"event-provider-".concat(l)),(0,D.jsx)(ae.Z,{monospace:!0,onChange:function(e){var i,t=e.target.value,r=null===(i=Gn[t])||void 0===i?void 0:i.event_pattern;ci(n,{name:t,pattern:r?JSON.parse(r):null})},placeholder:"Event name",value:t,children:zn.map((function(e){var n=e.name;return(0,D.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(l)),r&&(0,D.jsx)(y.Z,{language:"json",small:!0,source:o.join("\n")}),(0,D.jsx)(j.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return ie((function(e){return(0,L.oM)(e,n)}))},children:(0,D.jsx)(me.rF,{default:!0,size:2*A.iI})},"remove_event")]}))}),(0,D.jsx)(S.Z,{p:A.cd,children:(0,D.jsx)(j.ZP,{beforeIcon:(0,D.jsx)(me.mm,{size:2*A.iI}),onClick:function(){return ie((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[ne,zn,Gn,oi,si,ci]),di=(0,u.useMemo)((function(){var e=(0,je.M8)(O,Be);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{mb:A.cd,px:A.cd,children:(0,D.jsx)(k.Z,{children:"Settings"})}),(0,D.jsx)(B.Z,{light:!0,short:!0}),(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:[oi,si]}),(0,D.jsxs)(S.Z,{mb:2,mt:5,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Endpoint"}),(0,D.jsxs)(I.ZP,{muted:!0,children:["Make a ",(0,D.jsx)(I.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(P.Z,{copiedText:e,linkText:e,monospace:!0,withCopyIcon:!0})}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(S.Z,{mr:1,children:(0,D.jsx)(ve.Z,{checked:Be,onCheck:function(){return Fe(!Be)}})}),(0,D.jsx)(I.ZP,{muted:!0,children:"Show alternative endpoint to pass token in headers"})]})})]}),Be&&(0,D.jsxs)(S.Z,{mb:2,mt:5,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Headers"}),(0,D.jsx)(I.ZP,{muted:!0,children:"You will need to include the following headers in your request to authenticate with the server."}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(P.Z,{copiedText:"Content-Type: application/json\n Authorization: Bearer ".concat(null===O||void 0===O?void 0:O.token,"\n "),withCopyIcon:!0,children:(0,D.jsx)(y.Z,{language:"json",small:!0,source:"\n Content-Type: application/json\n Authorization: Bearer ".concat(null===O||void 0===O?void 0:O.token,"\n ")})})})]}),(0,D.jsxs)(S.Z,{mb:2,mt:5,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Payload"}),(0,D.jsx)(I.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(P.Z,{copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',withCopyIcon:!0,children:(0,D.jsx)(y.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,D.jsxs)(S.Z,{mb:2,mt:5,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Sample cURL command"}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(y.Z,{language:"bash",small:!0,source:Be?"\n curl -X POST ".concat(e," \\\n --header 'Content-Type: application/json' \\\n --header 'Authorization: Bearer ").concat(null===O||void 0===O?void 0:O.token,'\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n '):"\n curl -X POST ".concat(e,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[O,Fe,si,oi,Be]),vi=!kn||oe.Xm.TIME===kn&&!(V&&Nn||!V&&Nn&&En)||oe.Xm.EVENT===kn&&(!(null!==ne&&void 0!==ne&&ne.length)||!ne.every((function(e){var n=e.event_type,i=e.name;return n&&i}))),hi=(0,u.useMemo)((function(){var e;return(null===d||void 0===d||null===(e=d.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return Pe.tf.DBT===n})))||[]}),[d]),pi=(0,u.useMemo)((function(){return null!==d&&void 0!==d&&d.blocks?(0,Ie.n)(d):null}),[d]),mi=(0,u.useMemo)((function(){var e,n;return(0,D.jsxs)(S.Z,{py:A.cd,children:[(0,D.jsxs)(S.Z,{mb:A.HN,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Run settings"}),(0,D.jsxs)(S.Z,{mt:A.Mq,children:[!V&&(0,D.jsxs)(S.Z,{mb:A.Mq,children:[(0,D.jsx)(I.ZP,{children:"Set a timeout for each run of this trigger (optional)"}),(0,D.jsx)(S.Z,{mb:1}),(0,D.jsx)(C.Z,{label:"Timeout (in seconds)",onChange:function(e){return We((function(n){return Re(Re({},n),{},{timeout:e.target.value})}))},primary:!0,setContentOnMount:!0,type:"number",value:null===Ge||void 0===Ge?void 0:Ge.timeout})]}),(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(S.Z,{mr:2,children:(0,D.jsx)(ve.Z,{checked:Ue,onCheck:function(e){He(e),e||Qe((function(e){return Re(Re({},e),{},{slaAmount:0})}))}})}),(0,D.jsx)(I.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),Ue&&(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:[[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.aw,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,D.jsxs)(E.ZP,{children:[(0,D.jsx)(F.Z,{flex:1,children:(0,D.jsx)(C.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===Xe||void 0===Xe?void 0:Xe.slaAmount})}),(0,D.jsx)(F.Z,{flex:1,children:(0,D.jsx)(ae.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===Xe||void 0===Xe?void 0:Xe.slaUnit,children:Object.keys(je.tL).map((function(e){return(0,D.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(E.ZP,{alignItems:"center",children:(0,D.jsx)(Z.Z,{checked:null===Ge||void 0===Ge?void 0:Ge.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return We((function(e){return Re(Re({},e),{},{allow_blocks_to_fail:!(null!==Ge&&void 0!==Ge&&Ge.allow_blocks_to_fail)})}))}})})}),oe.Xm.TIME===kn&&(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(E.ZP,{alignItems:"center",children:(0,D.jsx)(Z.Z,{checked:null===Ge||void 0===Ge?void 0:Ge.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return We((function(e){return Re(Re({},e),{},{skip_if_previous_running:!(null!==Ge&&void 0!==Ge&&Ge.skip_if_previous_running)})}))}})})})]}),(0,D.jsxs)(S.Z,{mb:A.HN,children:[(0,D.jsxs)(S.Z,{px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Runtime variables"}),(0,Ae.Qr)(yn)&&(0,D.jsxs)(S.Z,{mt:1,children:[(0,D.jsx)(I.ZP,{default:!0,children:"This pipeline has no runtime variables."}),(0,D.jsx)(s(),{as:"/pipelines/".concat(Y,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,D.jsx)(z.Z,{primary:!0,children:"Click here"})})," ",(0,D.jsx)(I.ZP,{default:!0,inline:!0,children:"to add variables to this pipeline."})]})]}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(re.Z,{enableVariablesOverwrite:!0,originalVariables:null===O||void 0===O?void 0:O.variables,runtimeVariables:Ke,setRuntimeVariables:Ve})})]}),pi&&(null===(e=Object.keys(pi||{}))||void 0===e?void 0:e.length)>=1&&(0,D.jsxs)(S.Z,{mb:A.HN,children:[(0,D.jsx)(S.Z,{px:A.cd,children:(0,D.jsx)(k.Z,{children:"Override bookmark values"})}),(0,D.jsx)(f.Z,{bookmarkValues:Q,originalBookmarkValues:null===O||void 0===O||null===(n=O.variables)||void 0===n?void 0:n[oe.PN],pipeline:d,setBookmarkValues:$})]}),(null===hi||void 0===hi?void 0:hi.length)>=1&&(0,D.jsx)(S.Z,{mb:A.HN,children:(0,D.jsx)(H,{blocks:hi,updateVariables:Ve,variables:Re(Re({},Jn),Ke)})})]})}),[pi,Q,hi,Ue,yn,V,pe,d,Y,Ke,Xe,kn,Jn,$,He,ge,Ve,Ge]),fi=be.ZP.tags.list().data,ji=(0,u.useMemo)((function(){return((null===fi||void 0===fi?void 0:fi.tags)||[]).filter((function(e){var n=e.uuid;return!(null!==Cn&&void 0!==Cn&&Cn.includes(n))}))}),[fi,Cn]),xi=(0,u.useMemo)((function(){return(0,je.ri)(V)}),[V]),gi=(0,u.useMemo)((function(){return(0,D.jsx)(Ze,{containerRef:U,date:Nn,interactions:xn,pipeline:d,pipelineInteraction:jn,pipelineSchedule:Xe,setVariables:function(e){Qe((function(n){var i=Re({},e((null===n||void 0===n?void 0:n.variables)||{})),t=Re({},i);return null===xn||void 0===xn||xn.forEach((function(e){Object.entries((null===e||void 0===e?void 0:e.variables)||{}).forEach((function(e){var n=(0,l.Z)(e,2),i=n[0],r=n[1].types;t&&i in t&&(t[i]=(0,Ce.M)(t[i],r))}))})),nn(t),Re(Re({},n),{},{variables:i})}))},showSummary:Se.uuid===dn,time:Rn,triggerTypes:xi,variables:null===Xe||void 0===Xe?void 0:Xe.variables})}),[U,Nn,xn,d,jn,Xe,dn,Qe,nn,Rn,xi]),Zi=(0,u.useMemo)((function(){return oe.fq.ACTIVE===(null===Xe||void 0===Xe?void 0:Xe.status)}),[Xe]),bi=M?null===M||void 0===M?void 0:M((function(e){return G.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===d||void 0===d?void 0:d.uuid,"/triggers/").concat(e))})):[null,{isLoading:!1}],yi=(0,l.Z)(bi,2),Pi=yi[0],Oi=yi[1].isLoading,_i=(0,u.useCallback)((function(){null===Pi||void 0===Pi||Pi({pipeline_schedule:Re(Re({},Xe),{},{variables:en||(null===Xe||void 0===Xe?void 0:Xe.variables)})})}),[Pi,en,Xe]),Ei=(0,u.useMemo)((function(){var e,n;return K?(e=(0,D.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(Y,"/triggers/").concat(K),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel and go back"}),n=(0,D.jsx)(j.ZP,{onClick:ti,primary:!0,children:"Save trigger"})):ke.uuid===dn?(e=(0,D.jsx)(j.ZP,{onClick:function(){return null===c||void 0===c?void 0:c()},secondary:!0,children:"Cancel and go back"}),n=(0,D.jsx)(j.ZP,{afterIcon:(0,D.jsx)(me.Kw,{}),onClick:function(){return vn(Ee.uuid)},primary:!0,children:"Next: Customize"})):Ee.uuid===dn?(e=(0,D.jsx)(j.ZP,{beforeIcon:(0,D.jsx)(me.Hd,{}),onClick:function(){return vn(ke.uuid)},secondary:!0,children:"Back: Settings"}),n=(0,D.jsx)(j.ZP,{afterIcon:(0,D.jsx)(me.Kw,{}),onClick:function(){return vn(Se.uuid)},primary:!0,children:"Next: Review"})):Se.uuid===dn&&(e=(0,D.jsx)(j.ZP,{beforeIcon:(0,D.jsx)(me.Hd,{}),onClick:function(){return vn(Ee.uuid)},secondary:!0,children:"Back: Customize"}),n=(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(j.ZP,{beforeIcon:(0,D.jsx)(me.Bf,{}),loading:Oi,onClick:function(){return _i()},primary:!0,children:K?"Save trigger":"Create trigger"}),!K&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{mr:A.cd}),(0,D.jsx)(ve.Z,{checked:Zi,compact:!0,onCheck:function(e){return Qe((function(n){return Re(Re({},n),{},{status:e(Zi)?oe.fq.ACTIVE:oe.fq.INACTIVE})}))}}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:Zi,muted:!Zi,small:!0,children:"Set trigger to be active immediately after creating"})]})]})),(0,D.jsx)(S.Z,{p:A.cd,children:(0,D.jsxs)(E.ZP,{alignItems:"center",children:[e,e&&n&&(0,D.jsx)(S.Z,{mr:A.cd}),n]})})}),[_i,Oi,Zi,c,ti,K,Y,dn,vn]),ki=(0,u.useMemo)((function(){var e,n,i,t,r,l,o;return"undefined"===typeof(null===d||void 0===d||null===(e=d.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null===R||void 0===R||null===(i=R.pipelines)||void 0===i||null===(t=i.settings)||void 0===t||null===(r=t.triggers)||void 0===r?void 0:r.save_in_code_automatically:null===d||void 0===d||null===(l=d.settings)||void 0===l||null===(o=l.triggers)||void 0===o?void 0:o.save_in_code_automatically}),[d,R]);return(0,D.jsx)(D.Fragment,{children:(0,D.jsx)(le.Z,{after:!pn&&mi,afterHidden:pn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(Y,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===O||void 0===O?void 0:O.name},linkProps:{as:"/pipelines/".concat(Y,"/triggers/").concat(K),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:i,pageName:_e.M.TRIGGERS,pipeline:d,setErrors:_,subheader:pn||Zn?(0,D.jsx)(S.Z,{px:A.cd,children:(0,D.jsx)(x.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return vn(n)},regularSizeText:!0,selectedTabUUID:dn,tabs:Te,underlineColor:(0,N.qn)(Pe.tf.DATA_LOADER).accent,underlineStyle:!0})}):(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(j.ZP,{disabled:vi,loading:Vn,onClick:ti,outline:!0,primary:!0,children:"Save changes"}),(0,D.jsx)(S.Z,{mr:A.cd}),(0,D.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(Y,"/triggers/").concat(K),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"}),ki&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{mr:A.cd}),(0,D.jsxs)(I.ZP,{default:!0,xsmall:!0,children:["This trigger will automatically be persisted in code.",(0,D.jsx)("br",{}),"To change this behavior, update the ",(0,D.jsx)(s(),{as:"/pipelines/".concat(Y,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,D.jsx)(z.Z,{openNewWindow:!0,xsmall:!0,children:"pipeline\u2019s settings"})})," or ",(0,D.jsx)(s(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,D.jsx)(z.Z,{openNewWindow:!0,xsmall:!0,children:"project settings"})}),"."]})]})]}),subheaderNoPadding:pn||Zn,title:function(){return null!==O&&void 0!==O&&O.name?"Edit ".concat(null===O||void 0===O?void 0:O.name):"New trigger"},uuid:"triggers/edit",children:(0,D.jsxs)("div",{ref:U,children:[(pn||Zn)&&(0,D.jsx)(B.Z,{light:!0}),(pn||Zn)&&(Ee.uuid===dn||Se.uuid===dn)&&gi,(!pn||ke.uuid===dn)&&(!Zn||ke.uuid===dn)&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(S.Z,{p:A.cd,children:[(0,D.jsxs)(S.Z,{mb:2,children:[(0,D.jsx)(k.Z,{children:"Trigger type"}),(0,D.jsx)(I.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,D.jsx)(E.ZP,{children:xi.reduce((function(e,n){var i=n.label,t=n.description,r=n.uuid,l=kn===r,o=kn&&!l;return!pn||null!==bn&&void 0!==bn&&bn[r]?e.concat((0,D.jsx)(j.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){oe.Xm.EVENT!==r||null!==ne&&void 0!==ne&&ne.length||ie([{}]),Qe((function(e){return Re(Re({},e),{},{schedule_type:r})}))},children:(0,D.jsx)(Oe.U,{selected:l,children:(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(F.Z,{children:(0,D.jsx)("input",{checked:l,type:"radio"})}),(0,D.jsx)(S.Z,{mr:A.cd}),(0,D.jsxs)(F.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,D.jsx)(k.Z,{bold:!0,default:!l&&!o,level:5,muted:!l&&o,children:i()}),(0,D.jsx)(I.ZP,{default:!l&&!o,leftAligned:!0,muted:o,children:t()})]})]})})},r)):e}),[])})]}),(0,D.jsxs)(S.Z,{mt:A.HN,children:[oe.Xm.TIME===kn&&ui,oe.Xm.EVENT===kn&&ai,oe.Xm.API===kn&&di]}),!pn&&(0,D.jsxs)(S.Z,{mt:A.HN,px:A.cd,children:[(0,D.jsxs)(S.Z,{mb:2,children:[(0,D.jsx)(k.Z,{children:"Tags"}),(0,D.jsx)(I.ZP,{muted:!0,children:"Add or remove tags from this trigger."})]}),(0,D.jsx)(de.Z,{removeTag:function(e){Qe((function(n){return Re(Re({},n),{},{tags:null===Cn||void 0===Cn?void 0:Cn.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){Qe((function(n){return Re(Re({},n),{},{tags:(0,L.$C)(e.uuid,Cn,(function(n){return n===e.uuid}))})}))},selectedTags:null===Cn||void 0===Cn?void 0:Cn.map((function(e){return{uuid:e}})),tags:ji,uuid:"TagsAutocompleteInputField-trigger-".concat(K)})]})]}),(pn||Zn)&&Ei]})})})}},97196:function(e,n,i){i.d(n,{S5:function(){return l},_P:function(){return o}});var t,r=i(86735);!function(e){e.AWS="aws_event"}(t||(t={}));var l=[{label:function(){return"AWS"},uuid:t.AWS}],o=(0,r.HK)(l,(function(e){return e.uuid}))},61599:function(e,n,i){i.d(n,{D5:function(){return j},MU:function(){return o},RL:function(){return c},Xv:function(){return a},Zj:function(){return f},_B:function(){return r},eL:function(){return d},fe:function(){return p},jL:function(){return u},kB:function(){return x},ks:function(){return h},th:function(){return m},u7:function(){return v},zS:function(){return s}});var t,r,l=i(82394);!function(e){e.FULL_TABLE="FULL_TABLE",e.INCREMENTAL="INCREMENTAL",e.LOG_BASED="LOG_BASED"}(r||(r={}));var o,s,u=[r.FULL_TABLE,r.INCREMENTAL];!function(e){e.IGNORE="IGNORE",e.UPDATE="UPDATE"}(o||(o={})),function(e){e.DATE_TIME="date-time",e.UUID="uuid"}(s||(s={}));var c,a="datetime",d=(t={},(0,l.Z)(t,s.DATE_TIME,a),(0,l.Z)(t,s.UUID,s.UUID),t);!function(e){e.ARRAY="array",e.BOOLEAN="boolean",e.INTEGER="integer",e.NULL="null",e.NUMBER="number",e.OBJECT="object",e.STRING="string"}(c||(c={}));var v,h,p,m,f,j=[c.ARRAY,c.BOOLEAN,a,c.INTEGER,c.NULL,c.NUMBER,c.OBJECT,c.STRING,s.UUID];!function(e){e.PROPERTIES="properties"}(v||(v={})),function(e){e.AUTOMATIC="automatic",e.AVAILABLE="available",e.UNSUPPORTED="unsupported"}(h||(h={})),function(e){e.FORCED_REPLICATION_METHOD="forced-replication-method",e.KEY_PROPERTIES="table-key-properties",e.REPLICATION_KEYS="valid-replication-keys",e.SCHEMA_NAME="schema-name"}(p||(p={})),function(e){e.AMPLITUDE="amplitude",e.BIGQUERY="bigquery",e.CHARGEBEE="chargebee",e.GOOGLE_ADS="google_ads",e.GOOGLE_SEARCH_CONSOLE="google_search_console",e.GOOGLE_SHEETS="google_sheets",e.INTERCOM="intercom",e.MYSQL="mysql",e.PIPEDRIVE="pipedrive",e.POSTGRESQL="postgresql",e.REDSHIFT="redshift",e.SALESFORCE="salesforce",e.STRIPE="stripe"}(m||(m={})),function(e){e.AMAZON_S3="amazon_s3",e.BIGQUERY="bigquery",e.DELTA_LAKE_S3="delta_lake_s3",e.GOOGLE_CLOUD_STORAGE="google_cloud_storage",e.KAFKA="kafka",e.MYSQL="mysql",e.POSTGRESQL="postgresql",e.SNOWFLAKE="snowflake"}(f||(f={}));var x=[f.AMAZON_S3,f.GOOGLE_CLOUD_STORAGE,f.KAFKA]},39457:function(e,n,i){var t,r=i(82394),l=(i(82684),i(64866)),o=i(21764),s=i(55485),u=i(48670),c=i(38276),a=i(30160),d=i(12468),v=i(72473),h=i(70515),p=i(28598);function m(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 f(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?m(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}!function(e){e.LEFT="left",e.RIGHT="right"}(t||(t={})),n.Z=function(e){var n,i=e.children,r=e.copiedText,m=e.iconPosition,j=void 0===m?t.LEFT:m,x=e.inverted,g=e.linkProps,Z=e.linkText,b=e.monospace,y=e.muted,P=e.small,O=e.toastMessage,_=e.withCopyIcon;return i?n=(0,p.jsx)("span",{children:i}):_&&(n=(0,p.jsx)(u.Z,f(f({href:"#",inline:!0,muted:y,preventDefault:!0,sameColorAsText:!0,small:P},g),{},{children:(0,p.jsxs)(s.ZP,{alignItems:"center",children:[j===t.LEFT&&(0,p.jsx)(c.Z,{mr:Z?1:0,children:(0,p.jsx)(s.ZP,{alignItems:"center",children:(0,p.jsx)(v.CK,{inverted:x,muted:y,size:2*h.iI})})}),Z&&(0,p.jsx)(a.ZP,{inverted:x,monospace:b,muted:y,small:P,children:Z}),j===t.RIGHT&&(0,p.jsx)(c.Z,{ml:Z?1:0,children:(0,p.jsx)(s.ZP,{alignItems:"center",children:(0,p.jsx)(v.CK,{inverted:x,muted:y})})})]})}))),(0,p.jsx)(d.Z,{block:!0,label:"Copy",size:null,widthFitContent:!0,children:(0,p.jsx)(l.CopyToClipboard,{onCopy:function(){return o.Am.success(O||"Successfully copied to clipboard.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:r})},text:r,children:n})})}},22286:function(e,n,i){i.d(n,{M:function(){return a}});var t=i(82394),r=i(75582),l=i(54193),o=i(81728),s=i(42122);function u(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 c(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?u(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function a(e,n){var i,u;if(!n||null===n||void 0===n||!n.length)return e;if(null!==n&&void 0!==n&&n.includes(l.zj.LIST))return((0,s.Kn)(e)?Object.keys(e||{}):[e]).map((function(e){return a(e,null===n||void 0===n?void 0:n.filter((function(e){return l.zj.LIST!==e})))}));if(null!==n&&void 0!==n&&n.includes(l.zj.DICTIONARY)){var d=(0,s.Kn)(e)?e:(0,o.Pb)(e)?JSON.parse(e):e;if((0,s.Kn)(d))return Object.entries(d).reduce((function(e,i){var o=(0,r.Z)(i,2),s=o[0],u=o[1];return c(c({},e),{},(0,t.Z)({},s,a(u,null===n||void 0===n?void 0:n.filter((function(e){return l.zj.DICTIONARY!==e})))))}),{})}if(null!==n&&void 0!==n&&n.includes(l.zj.BOOLEAN)){var v,h;if("boolean"===typeof e)return e;if("true"===(null===(v=String(e))||void 0===v?void 0:v.toLowerCase()))return!0;if("false"===(null===(h=String(e))||void 0===h?void 0:h.toLowerCase()))return!1}return null!==n&&void 0!==n&&null!==(i=n.includes)&&void 0!==i&&i.call(n,l.zj.FLOAT)&&(0,o.HW)(e)?parseFloat(e):null!==n&&void 0!==n&&null!==(u=n.includes)&&void 0!==u&&u.call(n,l.zj.INTEGER)&&(0,o.HW)(e)?parseInt(e):e}},32080:function(e,n,i){i.d(n,{n:function(){return l}});var t=i(44425),r=i(61599);function l(e){var n,i={};return null===e||void 0===e||null===(n=e.blocks)||void 0===n||n.forEach((function(e){var n=e.catalog,l=e.type,o=e.uuid;if(t.tf.DATA_LOADER===l&&null!==n&&void 0!==n&&n.streams){var s,u=null===n||void 0===n||null===(s=n.streams)||void 0===s?void 0:s.filter((function(e){var n=e.replication_method;return r._B.INCREMENTAL===n}));(null===u||void 0===u?void 0:u.length)>=1&&(o in i||(i[o]={block:e,streams:[]}),i[o].streams.push(u))}})),i}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3419],{23192:function(n,e,t){t.d(e,{fi:function(){return B},lG:function(){return Y}});var o=t(82394),r=t(75582),i=t(82684),u=t(12691),c=t.n(u),l=t(34376),a=t.n(l),d=t(38626),s=t(69864),p=t(40761),f=t(41143),v=t(71180),b=t(39867),h=t(55485),m=t(48670),j=t(57653),g=t(38276),O=t(75499),x=t(30160),y=t(12468),P=t(35686),Z=t(89706),k=t(11498),_=t(72473),S=t(81655),C=t(70515),w=t(3917),L=t(55283),T=t(86735),D=t(72619),R=t(74052),M=t(69419),I=t(70320),E=t(28598);function N(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function A(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?N(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var Y=[0,1,3,4,5],B={0:"status",1:"block_uuid",3:"created_at",4:"started_at",5:"completed_at"};e.ZP=function(n){var e=n.blockRuns,t=n.onClickRow,o=n.pipeline,u=n.selectedRun,l=n.setErrors,N=n.sortableColumnIndexes,Y=(0,I.qB)(),B=(0,i.useContext)(d.ThemeContext),F=(0,i.useState)(null),U=F[0],X=F[1],H=(0,i.useState)(null),Q=H[0],G=H[1],z=o||{},J=z.uuid,K=z.type,q=(0,i.useMemo)((function(){return o.blocks||[]}),[o]),V=(0,i.useMemo)((function(){return(0,T.HK)(q,(function(n){return n.uuid}))}),[q]),$=(0,i.useMemo)((function(){return j.qL.INTEGRATION===K}),[K]),W=(0,i.useMemo)((function(){return j.qL.PYTHON===K}),[K]),nn=(0,M.iV)(),en=null===nn||void 0===nn?void 0:nn[S.lG.SORT_COL_IDX],tn=(0,i.useMemo)((function(){return en?{columnIndex:+en,sortDirection:(null===nn||void 0===nn?void 0:nn[S.lG.SORT_DIRECTION])||S.sh.ASC}:void 0}),[nn,en]),on=(0,i.useMemo)((function(){var n,e;return null===(n=new p.Z)||void 0===n||null===(e=n.decodedToken)||void 0===e?void 0:e.token}),[]),rn=(0,s.Db)((function(n){var e=n.blockUUID,t=n.pipelineRunId;return P.ZP.block_outputs.pipelines.downloads.detailAsync(null===o||void 0===o?void 0:o.uuid,e,{pipeline_run_id:t,token:on},{onDownloadProgress:function(n){return X((Number((null===n||void 0===n?void 0:n.loaded)||0)/1e6).toFixed(3))},responseType:k.E.BLOB})}),{onSuccess:function(n){return(0,D.wD)(n,{callback:function(n){G(null),(0,R.uS)(n,"block_output.".concat(Z.Lu.CSV))},onErrorCallback:function(n,e){return null===l||void 0===l?void 0:l({errors:e,response:n})}})}}),un=(0,r.Z)(rn,2),cn=un[0],ln=un[1].isLoading,an=Y?S.O$:{},dn=[{uuid:"Status"},{uuid:"Block"},{uuid:"Trigger"},A(A({},an),{},{uuid:"Created at"}),A(A({},an),{},{uuid:"Started at"}),A(A({},an),{},{uuid:"Completed at"}),{uuid:"Logs"}];return W&&dn.push({uuid:"Output"}),(0,E.jsx)(O.Z,{columnFlex:[1,2,2,1,1,1,null,null],columns:dn,isSelectedRow:function(n){return e[n].id===(null===u||void 0===u?void 0:u.id)},onClickRow:t,rows:null===e||void 0===e?void 0:e.map((function(n){var e,t,o,r,u=n||{},l=u.block_uuid,d=u.completed_at,s=u.created_at,p=u.id,j=u.pipeline_run_id,O=u.pipeline_schedule_id,P=u.pipeline_schedule_name,Z=u.started_at,k=u.status,T=l,D=T.split(":"),R=Q===p&&ln;$&&(T=D[0],o=D[1],r=D[2]);var M=V[T];M||(M=V[D[0]]);var I=[(0,i.createElement)(x.ZP,A(A({},(0,S.NC)(k)),{},{key:"".concat(p,"_status")}),k),(0,E.jsx)(c(),{as:"/pipelines/".concat(J,"/edit?block_uuid=").concat(T),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,E.jsxs)(m.Z,{bold:!0,fitContentWidth:!0,verticalAlignContent:!0,children:[(0,E.jsx)(b.Z,{color:(0,L.qn)(null===(e=M)||void 0===e?void 0:e.type,{blockColor:null===(t=M)||void 0===t?void 0:t.color,theme:B}).accent,size:1.5*C.iI,square:!0}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsxs)(x.ZP,{monospace:!0,sky:!0,children:[T,o&&":",o&&(0,E.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,children:o}),r>=0&&":",r>=0&&(0,E.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,children:r})]})]})},"".concat(p,"_block_uuid")),(0,E.jsx)(c(),{as:"/pipelines/".concat(J,"/triggers/").concat(O),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,E.jsx)(m.Z,{bold:!0,sky:!0,children:P})},"".concat(p,"_trigger")),(0,E.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,title:s?(0,w._6)(s):null,children:Y?(0,w.XG)(s,Y):(0,w.d$)(s,{includeSeconds:!0})},"".concat(p,"_created_at")),(0,E.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,title:Z?(0,w._6)(Z):null,children:Z?Y?(0,w.XG)(Z,Y):(0,w.d$)(Z,{includeSeconds:!0}):(0,E.jsx)(E.Fragment,{children:"\u2014"})},"".concat(p,"_started_at")),(0,E.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,title:d?(0,w._6)(d):null,children:d?Y?(0,w.XG)(d,Y):(0,w.d$)(d,{includeSeconds:!0}):(0,E.jsx)(E.Fragment,{children:"\u2014"})},"".concat(p,"_completed_at")),(0,E.jsx)(v.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return a().push("/pipelines/".concat(J,"/logs?block_run_id[]=").concat(p))},children:(0,E.jsx)(_.UL,{default:!0,size:2*C.iI})},"".concat(p,"_logs"))];return W&&I.push((0,E.jsx)(h.ZP,{alignItems:"center",justifyContent:"center",children:(0,E.jsx)(y.Z,{appearBefore:!0,autoHide:!R,block:!0,forceVisible:R,label:R?"".concat(U||0,"mb downloaded..."):"Save block run output as CSV file (not supported for dynamic blocks)",size:null,children:(0,E.jsx)(v.ZP,{default:!0,disabled:!W||!(f.V.COMPLETED===k)||ln,iconOnly:!0,loading:R,noBackground:!0,onClick:function(){X(null),G(p),cn({blockUUID:T,pipelineRunId:j})},children:(0,E.jsx)(_.vc,{default:!0,size:2*C.iI})})})},"".concat(p,"_save_output"))),I})),sortableColumnIndexes:N,sortedColumn:tn,uuid:"block-runs"})}},74052:function(n,e,t){t.d(e,{Dp:function(){return j},OF:function(){return g},Q9:function(){return x},Rt:function(){return b},Rz:function(){return P},h8:function(){return O},k1:function(){return h},uS:function(){return y},zv:function(){return Z}});var o=t(21831),r=t(82394),i=t(92083),u=t.n(i),c=t(48339),l=t(53808),a=t(3917),d=t(86735),s=t(81728),p=t(70320);function f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function v(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){(0,r.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function b(n){var e={},t={};return null===n||void 0===n||n.forEach((function(n){var o=n.content,r=n.outputs,i=n.type,u=n.uuid;(null===r||void 0===r?void 0:r.length)>=1&&(e[u]=r.map((function(n){if("object"===typeof n){var e=n||{},t=e.sample_data,o=e.shape,r=e.text_data,i=e.type;return t?{data:v({shape:o},t),type:i}:r&&(0,s.Pb)(r)?JSON.parse(r):r}return{data:String(n),type:c.Gi.TEXT}}))),t[i]||(t[i]={}),t[i][u]=o})),{content:t,messages:e}}function h(n,e,t){n.forEach((function(n){(0,l.t8)("".concat(t,"/").concat(n.uuid,"/codeCollapsed"),(0,l.Od)("".concat(e,"/").concat(n.uuid,"/codeCollapsed"))),(0,l.t8)("".concat(t,"/").concat(n.uuid,"/outputCollapsed"),(0,l.Od)("".concat(e,"/").concat(n.uuid,"/outputCollapsed")))}))}function m(n){return"".concat(n,"/").concat(l.kP)}function j(n){return(0,l.U2)(m(n),[])}function g(n,e){var t=j(n);t.includes(e)||(0,l.t8)(m(n),[].concat((0,o.Z)(t),[e]))}function O(n,e){var t=j(n).filter((function(n){return n!==e}));(0,l.t8)(m(n),t)}function x(n,e){var t=(0,d.HK)(e,(function(n){return n.uuid}));return n.map((function(n){return t[n]})).filter((function(n){return!!n}))}var y=function(n,e){var t=window.URL.createObjectURL(n),o=document.createElement("a");o.href=t,o.download=e,document.body.appendChild(o),o.click(),o.remove()};function P(n,e){var t,o=(0,p.qB)(),r=null===e||void 0===e?void 0:e.isPipelineUpdating,i=null===e||void 0===e?void 0:e.pipelineContentTouched,c=null===e||void 0===e?void 0:e.pipelineLastSaved;if(i)t="Unsaved changes";else if(r)t="Saving changes...";else if(c){var l=u()().utc().unix();if(null!==e&&void 0!==e&&e.displayRelative&&l-c<3600){var d=u().unix(l-(l-c)).utc().fromNow();t="Saved ".concat(d)}else{var s=(0,a.JX)(c/1e3);null!==n&&void 0!==n&&n.updated_at&&(s=(0,a.XG)(null===n||void 0===n?void 0:n.updated_at,o)),t="Last saved ".concat(s)}}else t="All changes saved";return t}function Z(n){var e=n.type,t=n.uuid;return"".concat(e,"s/").concat(t,".py")}},8955:function(n,e,t){t.d(e,{G7:function(){return y},ZP:function(){return P},u$:function(){return g}});var o=t(75582),r=t(82394),i=t(26304),u=t(90299),c=t(9134),l=t(24138),a=t(38276),d=t(30160),s=t(75499),p=t(70515),f=t(16488),v=t(42122),b=t(28598),h=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function m(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function j(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?m(Object(t),!0).forEach((function(e){(0,r.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var g=44,O={uuid:"Run details"},x={uuid:"Dependency tree"},y=[x,O];function P(n){var e=n.height,t=n.heightOffset,r=n.pipeline,m=n.selectedRun,P=n.selectedTab,Z=n.setSelectedTab,k=j({},(0,i.Z)(n,h));m?k.blockStatus=(0,f.IJ)(null===m||void 0===m?void 0:m.block_runs):k.noStatus=!0;var _=(0,v.Kn)(null===m||void 0===m?void 0:m.variables)?j({},null===m||void 0===m?void 0:m.variables):(null===m||void 0===m?void 0:m.variables)||{},S=null===m||void 0===m?void 0:m.event_variables;if(S&&(0,v.Kn)(S)&&!(0,v.Qr)(S))if((0,v.Kn)(_)&&_.hasOwnProperty("event")){var C=(0,v.Kn)(_.event)?_.event:{};_.event=j(j({},C),S)}else _.event=j({},S);var w=[];_&&JSON.stringify(_,null,2).split("\n").forEach((function(n){w.push(" ".concat(n))}));var L=m&&[["Run ID",null===m||void 0===m?void 0:m.id],["Variables",(0,b.jsx)(c.Z,{language:"json",small:!0,source:w.join("\n")},"variable_value")]],T=m&&(0,b.jsx)(a.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(s.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(n){return 1===n?"100px":null},rows:L.map((function(n,e){var t=(0,o.Z)(n,2),r=t[0],i=t[1];return[(0,b.jsx)(d.ZP,{monospace:!0,muted:!0,children:r},"key_".concat(e)),(0,b.jsx)(d.ZP,{monospace:!0,textOverflow:!0,children:i},"val_".concat(e))]})),uuid:"LogDetail"})}),D=P&&Z;return(0,b.jsxs)(b.Fragment,{children:[D&&(0,b.jsx)(a.Z,{py:p.cd,children:(0,b.jsx)(u.Z,{onClickTab:Z,selectedTabUUID:null===P||void 0===P?void 0:P.uuid,tabs:y,underlineStyle:!0})}),(!D||x.uuid===(null===P||void 0===P?void 0:P.uuid))&&(0,b.jsx)(l.ZP,j(j({},k),{},{height:e,heightOffset:(t||0)+(D?g:0),pipeline:r})),O.uuid===(null===P||void 0===P?void 0:P.uuid)&&T]})}},55072:function(n,e,t){t.d(e,{Et:function(){return p},Q:function(){return s}});t(82684);var o=t(71180),r=t(55485),i=t(38276),u=t(31748),c=t(72473),l=t(79633),a=t(70515),d=t(28598),s=30,p=9;e.ZP=function(n){var e=n.page,t=n.maxPages,s=n.onUpdate,p=n.totalPages,f=[],v=t;if(v>p)f=Array.from({length:p},(function(n,e){return e}));else{var b=Math.floor(v/2),h=e-b;e+b>=p?(h=p-v+2,v-=2):e-b<=0?(h=0,v-=2):(v-=4,h=e-Math.floor(v/2)),f=Array.from({length:v},(function(n,e){return e+h}))}return(0,d.jsx)(d.Fragment,{children:p>0&&(0,d.jsxs)(r.ZP,{alignItems:"center",children:[(0,d.jsx)(o.ZP,{disabled:0===e,onClick:function(){return s(e-1)},children:(0,d.jsx)(c.Hd,{size:1.5*a.iI,stroke:u.Av})}),!f.includes(0)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.Z,{ml:1,children:(0,d.jsx)(o.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return s(0)},children:1})},0),!f.includes(1)&&(0,d.jsx)(i.Z,{ml:1,children:(0,d.jsx)(o.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),f.map((function(n){return(0,d.jsx)(i.Z,{ml:1,children:(0,d.jsx)(o.ZP,{backgroundColor:n===e&&l.a$,borderLess:!0,noBackground:!0,notClickable:n===e,onClick:function(){n!==e&&s(n)},children:n+1})},n)})),!f.includes(p-1)&&(0,d.jsxs)(d.Fragment,{children:[!f.includes(p-2)&&(0,d.jsx)(i.Z,{ml:1,children:(0,d.jsx)(o.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,d.jsx)(i.Z,{ml:1,children:(0,d.jsx)(o.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return s(p-1)},children:p})},p-1)]}),(0,d.jsx)(i.Z,{ml:1}),(0,d.jsx)(o.ZP,{disabled:e===p-1,onClick:function(){return s(e+1)},children:(0,d.jsx)(c.Kw,{size:1.5*a.iI,stroke:u.Av})})]})})}},89706:function(n,e,t){t.d(e,{JD:function(){return b},Lu:function(){return i},PF:function(){return p},dT:function(){return u},n6:function(){return a},nB:function(){return v},oy:function(){return f},xF:function(){return s}});var o,r,i,u,c=t(82394),l=t(44425);!function(n){n.CSV="csv",n.JSON="json",n.MD="md",n.PY="py",n.R="r",n.SH="sh",n.SQL="sql",n.TXT="txt",n.YAML="yaml",n.YML="yml"}(i||(i={})),function(n){n.INIT_PY="__init__.py",n.METADATA_YAML="metadata.yaml",n.REQS_TXT="requirements.txt"}(u||(u={}));var a=[i.PY,i.SQL],d=[i.JSON,i.MD,i.PY,i.R,i.SH,i.SQL,i.TXT,i.YAML,i.YML],s=new RegExp(d.map((function(n){return".".concat(n,"$")})).join("|")),p=(new RegExp(d.map((function(n){return".".concat(n,"$")})).join("|")),"charts"),f="pipelines",v=(o={},(0,c.Z)(o,i.MD,l.t6.MARKDOWN),(0,c.Z)(o,i.JSON,i.JSON),(0,c.Z)(o,i.PY,l.t6.PYTHON),(0,c.Z)(o,i.R,l.t6.R),(0,c.Z)(o,i.SQL,l.t6.SQL),(0,c.Z)(o,i.TXT,"text"),(0,c.Z)(o,i.YAML,l.t6.YAML),(0,c.Z)(o,i.YML,l.t6.YAML),o),b=(r={},(0,c.Z)(r,l.t6.MARKDOWN,i.MD),(0,c.Z)(r,l.t6.PYTHON,i.PY),(0,c.Z)(r,l.t6.R,i.R),(0,c.Z)(r,l.t6.SQL,i.SQL),(0,c.Z)(r,l.t6.YAML,i.YAML),(0,c.Z)(r,"text",i.TXT),r)},9134:function(n,e,t){var o=t(82684),r=t(21124),i=t(68432),u=t(38626),c=t(65292),l=t(44897),a=t(95363),d=t(70515),s=t(28598);e.Z=function(n){var e=n.language,t=n.maxWidth,p=n.showLineNumbers,f=n.small,v=n.source,b=n.wrapLines,h=(0,o.useContext)(u.ThemeContext);function m(n){var o=n.value;return(0,s.jsx)(i.Z,{customStyle:{backgroundColor:(h.background||l.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:a.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*d.iI,paddingTop:2*d.iI},language:e,lineNumberStyle:{color:(h.content||l.Z.content).muted},showLineNumbers:p,style:c._4,useInlineStyles:!0,wrapLines:b,children:o})}return(0,s.jsx)(r.D,{components:{code:function(n){var e=n.children;return(0,s.jsx)(m,{value:e})}},children:v})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3437],{55283:function(e,n,t){t.d(n,{HC:function(){return S},HS:function(){return y},IN:function(){return p},Kf:function(){return m},Nk:function(){return g},PB:function(){return b},PY:function(){return x},WC:function(){return f},fk:function(){return P},gE:function(){return Z},j1:function(){return k},jv:function(){return _},nz:function(){return j},oh:function(){return s},qn:function(){return v},t1:function(){return O},u2:function(){return h},y9:function(){return A}});var o=t(38626),i=t(44897),r=t(44425),l=t(42631),c=t(8059),d=t(70515),a=t(47041),u=t(91437),s=68,p=1.5*d.iI,f=3*d.iI;function h(e){var n=c.eW;return r.tf.CALLBACK===e?n=c.J:r.tf.CHART===e||r.tf.CONDITIONAL===e?n=c.Hv:r.tf.CUSTOM===e?n=c.AK:r.tf.DATA_EXPORTER===e?n=c.Sr:r.tf.DATA_LOADER===e?n=c.R2:r.tf.DBT===e?n=c.J:r.tf.EXTENSION===e?n=c.FI:r.tf.GLOBAL_DATA_PRODUCT===e?n=c.yr:r.tf.SCRATCHPAD===e?n=c.Hv:r.tf.SENSOR===e?n=c.rK:r.tf.MARKDOWN===e?n=c.RK:r.tf.TRANSFORMER===e&&(n=c.eW),n}function v(e,n){var t,o,l=((null===n||void 0===n||null===(t=n.theme)||void 0===t?void 0:t.borders)||i.Z.borders).light,c=((null===n||void 0===n||null===(o=n.theme)||void 0===o?void 0:o.monotone)||i.Z.monotone).grey500,d=n||{},a=d.blockColor,u=d.isSelected,s=d.theme;return u?l=(s||i.Z).content.active:r.tf.TRANSFORMER===e||a===r.Lq.PURPLE?(l=(s||i.Z).accent.purple,c=(s||i.Z).accent.purpleLight):r.tf.DATA_EXPORTER===e||a===r.Lq.YELLOW?(l=(s||i.Z).accent.yellow,c=(s||i.Z).accent.yellowLight):r.tf.DATA_LOADER===e||a===r.Lq.BLUE?(l=(s||i.Z).accent.blue,c=(s||i.Z).accent.blueLight):r.tf.MARKDOWN===e?(l=(s||i.Z).accent.sky,c=(s||i.Z).accent.skyLight):r.tf.SENSOR===e||a===r.Lq.PINK?(l=(s||i.Z).accent.pink,c=(s||i.Z).accent.pinkLight):r.tf.DBT===e?(l=(s||i.Z).accent.dbt,c=(s||i.Z).accent.dbtLight):r.tf.EXTENSION===e||a===r.Lq.TEAL?(l=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).teal,c=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).tealLight):r.tf.CALLBACK===e?(l=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).rose,c=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).roseLight):r.tf.CONDITIONAL===e||r.tf.SCRATCHPAD===e||a===r.Lq.GREY||r.tf.CUSTOM===e&&!a?(l=(s||i.Z).content.default,c=(s||i.Z).accent.contentDefaultTransparent):r.tf.GLOBAL_DATA_PRODUCT!==e||a||(l=(s||i.Z).monotone.white,c=(s||i.Z).monotone.whiteTransparent),{accent:l,accentLight:c}}var m=(0,o.css)([""," "," "," "," "," "," ",""],(0,u.eR)(),(function(e){return!e.selected&&!e.hasError&&"\n border-color: ".concat(v(e.blockType,e).accentLight,";\n ")}),(function(e){return e.selected&&!e.hasError&&"\n border-color: ".concat(v(e.blockType,e).accent,";\n ")}),(function(e){return!e.selected&&e.hasError&&"\n border-color: ".concat((e.theme.accent||i.Z.accent).negativeTransparent,";\n ")}),(function(e){return e.selected&&e.hasError&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).danger,";\n ")}),(function(e){return e.dynamicBlock&&"\n border-style: dashed !important;\n "}),(function(e){return e.dynamicChildBlock&&"\n border-style: dotted !important;\n "})),g=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-s5rj34-0"})(["border-radius:","px;position:relative;"],l.n_),x=o.default.div.withConfig({displayName:"indexstyle__HiddenBlockContainerStyle",componentId:"sc-s5rj34-1"})([""," border-radius:","px;border-style:",";border-width:","px;",""],m,l.n_,l.M8,l.mP,(function(e){return"\n background-color: ".concat((e.theme||i.Z).background.content,";\n\n &:hover {\n border-color: ").concat(v(e.blockType,e).accent,";\n }\n ")})),b=o.default.div.withConfig({displayName:"indexstyle__HeaderHorizontalBorder",componentId:"sc-s5rj34-2"})(["",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme||i.Z).borders.darkLight,";\n ")})),j=o.default.div.withConfig({displayName:"indexstyle__BlockHeaderStyle",componentId:"sc-s5rj34-3"})([""," border-top-left-radius:","px;border-top-right-radius:","px;border-top-style:",";border-top-width:","px;border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding-bottom:","px;padding-top:","px;"," "," "," ",""],m,l.n_,l.n_,l.M8,l.mP,l.M8,l.mP,l.M8,l.mP,1*d.iI,1*d.iI,(function(e){return"\n background-color: ".concat((e.theme||i.Z).background.dashboard,";\n ")}),(function(e){return"undefined"!==typeof e.zIndex&&null!==e.zIndex&&"\n z-index: ".concat(6+(e.zIndex||0),";\n ")}),(function(e){return!e.noSticky&&"\n // This is to hide the horizontal scrollbar in the block header when sideBySide is enabled,\n // and the screen width is too small.\n position: sticky;\n top: -5px;\n "}),(function(e){return e.noSticky&&"\n ".concat((0,a.y$)(),"\n\n overflow-x: auto;\n overflow-y: visible;\n ")})),y=o.default.div.withConfig({displayName:"indexstyle__SubheaderStyle",componentId:"sc-s5rj34-4"})([""," "," ",""],(function(e){return!e.darkBorder&&"\n border-bottom: 1px solid ".concat((e.theme.borders||i.Z.borders).darkLight,";\n ")}),(function(e){return e.darkBorder&&"\n border-bottom: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n ")}),(function(e){return!e.noBackground&&"\n background-color: ".concat((e.theme||i.Z).background.dashboard,";\n ")})),_=o.default.div.withConfig({displayName:"indexstyle__CodeContainerStyle",componentId:"sc-s5rj34-5"})([""," border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;position:relative;"," "," "," "," .line-numbers{opacity:0;}&.selected{.line-numbers{opacity:1 !important;}}"],m,l.M8,l.mP,l.M8,l.mP,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).codeTextarea,";\n ")}),(function(e){return!e.noPadding&&"\n padding-bottom: ".concat(d.iI,"px;\n padding-top: ").concat(d.iI,"px;\n ")}),(function(e){return e.lightBackground&&"\n background-color: ".concat((e.theme||i.Z).background.content,";\n ")}),(function(e){return!e.hideBorderBottom&&"\n border-bottom-left-radius: ".concat(l.n_,"px;\n border-bottom-right-radius: ").concat(l.n_,"px;\n border-bottom-style: ").concat(l.M8,";\n border-bottom-width: ").concat(l.mP,"px;\n overflow: hidden;\n ")})),Z=o.default.div.withConfig({displayName:"indexstyle__BlockDivider",componentId:"sc-s5rj34-6"})(["align-items:center;display:flex;height:","px;justify-content:center;position:relative;z-index:8;&:hover{"," .block-divider-inner{","}}"," "," "," ",""],2*d.iI,(function(e){return e.additionalZIndex>0&&"\n z-index: ".concat(8+e.additionalZIndex,";\n ")}),(function(e){return"\n background-color: ".concat((e.theme.text||i.Z.text).fileBrowser,";\n ")}),(function(e){return!e.height&&"\n height: ".concat(2*d.iI,"px;\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return!e.bottom&&"\n bottom: ".concat(.5*d.iI,"px;\n ")}),(function(e){return"undefined"!==typeof e.bottom&&"\n bottom: ".concat(e.bottom,"px;\n ")})),O=o.default.div.withConfig({displayName:"indexstyle__BlockDividerInner",componentId:"sc-s5rj34-7"})(["height 1px;width:100%;position:absolute;z-index:-1;"," ",""],(function(e){return!e.top&&"\n top: ".concat(1.5*d.iI,"px;\n ")}),(function(e){return"undefined"!==typeof e.top&&"\n top: ".concat(e.top,"px;\n ")})),A=o.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-s5rj34-8"})([""," ",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n padding-left: ").concat(e.normalPadding?d.iI:s,"px;\n ")}),(function(e){return!e.noMargin&&"\n margin-bottom: ".concat(1*d.iI,"px;\n padding-bottom: ").concat(1*d.iI,"px;\n ")})),S=o.default.div.withConfig({displayName:"indexstyle__TimeTrackerStyle",componentId:"sc-s5rj34-9"})(["bottom:","px;left:","px;position:absolute;"],1*d.iI,s),P=o.default.div.withConfig({displayName:"indexstyle__ScrollColunnsContainerStyle",componentId:"sc-s5rj34-10"})(["position:relative;",""],(function(e){return"\n z-index: ".concat((null===e||void 0===e?void 0:e.zIndex)||1,";\n ")})),k=o.default.div.attrs((function(e){var n=e.height,t=e.left,o=e.right,i=e.top;return{style:{position:"fixed",height:n,width:e.width,left:t,right:o,top:i,zIndex:(e.zIndex||0)+2}}})).withConfig({displayName:"indexstyle__ScrollColunnStyle",componentId:"sc-s5rj34-11"})([""])},94629:function(e,n,t){t.d(n,{Z:function(){return S}});var o=t(82394),i=t(21831),r=t(82684),l=t(50724),c=t(82555),d=t(97618),a=t(70613),u=t(68487),s=t(68899),p=t(28598);function f(e,n){var t=e.children,o=e.noPadding;return(0,p.jsx)(s.HS,{noPadding:o,ref:n,children:t})}var h=r.forwardRef(f),v=t(62547),m=t(82571),g=t(35686),x=t(98464),b=t(46684),j=t(70515),y=t(53808),_=t(19183);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function A(e,n){var t,o=e.addProjectBreadcrumbToCustomBreadcrumbs,f=e.after,Z=e.afterHeader,A=e.afterHidden,S=e.afterWidth,P=e.afterWidthOverride,k=e.appendBreadcrumbs,E=e.before,R=e.beforeWidth,T=e.breadcrumbs,C=e.children,I=e.errors,w=e.headerMenuItems,D=e.headerOffset,N=e.hideAfterCompletely,L=e.mainContainerHeader,M=e.navigationItems,B=e.setAfterHidden,H=e.setErrors,U=e.subheaderChildren,F=e.subheaderNoPadding,W=e.title,K=e.uuid,Y=(0,_.i)().width,G="dashboard_after_width_".concat(K),Q="dashboard_before_width_".concat(K),z=(0,r.useRef)(null),X=(0,r.useState)(P?S:(0,y.U2)(G,S)),V=X[0],q=X[1],J=(0,r.useState)(!1),$=J[0],ee=J[1],ne=(0,r.useState)(E?Math.max((0,y.U2)(Q,R),13*j.iI):null),te=ne[0],oe=ne[1],ie=(0,r.useState)(!1),re=ie[0],le=ie[1],ce=(0,r.useState)(null)[1],de=g.ZP.projects.list({},{revalidateOnFocus:!1}).data,ae=null===de||void 0===de?void 0:de.projects,ue={label:function(){var e;return null===ae||void 0===ae||null===(e=ae[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},se=[];T&&(o&&se.push(ue),se.push.apply(se,(0,i.Z)(T))),(null===T||void 0===T||!T.length||k)&&(null===ae||void 0===ae?void 0:ae.length)>=1&&(null!==T&&void 0!==T&&T.length||se.unshift({bold:!k,label:function(){return W}}),se.unshift(ue)),(0,r.useEffect)((function(){null===z||void 0===z||!z.current||$||re||null===ce||void 0===ce||ce(z.current.getBoundingClientRect().width)}),[$,V,re,te,z,ce,Y]),(0,r.useEffect)((function(){$||(0,y.t8)(G,V)}),[A,$,V,G]),(0,r.useEffect)((function(){re||(0,y.t8)(Q,te)}),[re,te,Q]);var pe=(0,x.Z)(S);return(0,r.useEffect)((function(){P&&pe!==S&&q(S)}),[P,S,pe]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(a.Z,{title:W}),(0,p.jsx)(u.Z,{breadcrumbs:se,menuItems:w,project:null===ae||void 0===ae?void 0:ae[0],version:null===ae||void 0===ae||null===(t=ae[0])||void 0===t?void 0:t.version}),(0,p.jsxs)(s.Nk,{ref:n,children:[0!==(null===M||void 0===M?void 0:M.length)&&(0,p.jsx)(s.lm,{showMore:!0,children:(0,p.jsx)(m.Z,{navigationItems:M,showMore:!0})}),(0,p.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:f,afterHeader:Z,afterHeightOffset:b.Mz,afterHidden:A,afterMousedownActive:$,afterWidth:V,before:E,beforeHeightOffset:b.Mz,beforeMousedownActive:re,beforeWidth:s.k1+(E?te:0),headerOffset:D,hideAfterCompletely:!B||N,leftOffset:E?s.k1:null,mainContainerHeader:L,mainContainerRef:z,setAfterHidden:B,setAfterMousedownActive:ee,setAfterWidth:q,setBeforeMousedownActive:le,setBeforeWidth:oe,children:[U&&(0,p.jsx)(h,{noPadding:F,children:U}),C]})})]}),I&&(0,p.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,p.jsx)(c.Z,O(O({},I),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}var S=r.forwardRef(A)},8569:function(e,n,t){t.d(n,{Z:function(){return ve}});var o=t(61049);function i(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,n,t){return r=i()?Reflect.construct:function(e,n,t){var i=[null];i.push.apply(i,n);var r=new(Function.bind.apply(e,i));return t&&(0,o.Z)(r,t.prototype),r},r.apply(null,arguments)}var l=t(21831),c=t(82394),d=t(75582),a=t(12691),u=t.n(a),s=t(38626),p=t(21764),f=t(82684),h=t(69864),v=t(34376),m=t(32013),g=t(98777),x=t(71180),b=t(31882),j=t(97618),y=t(55485),_=t(14466),Z=t(48670),O=t(88543),A=t(38276),S=t(30160),P=t(35686),k=t(72473),E=t(8193),R=t(70515),T=t(81728),C=t(3917),I=t(55283),w=t(50178),D=t(86735),N=t(72619),L=t(44085),M=t(17488),B=t(28598);function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function U(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var F="CUSTOM_VALUE_TYPE",W={compact:!0,monospace:!0,small:!0};var K=function(e){var n=e.leftKey,t=e.leftObjectKeys,o=e.leftObjectType,i=e.leftObjectTypeState,r=e.leftValue,l=e.leftValueType,d=e.rightAligned,a=e.setLeftKey,u=e.setLeftObjectTypeState,s=e.updatePredicate,p=(0,f.useRef)(null),h=(0,f.useState)(),v=h[0],m=h[1];(0,f.useEffect)((function(){var e,n;m(null===p||void 0===p||null===(e=p.current)||void 0===e||null===(n=e.getBoundingClientRect())||void 0===n?void 0:n.width)}),[]),(0,f.useEffect)((function(){var e,n;m(null===p||void 0===p||null===(e=p.current)||void 0===e||null===(n=e.getBoundingClientRect())||void 0===n?void 0:n.width)}),[o,i]);var g=(0,f.useMemo)((function(){return{alignItems:"center",justifyContent:d?"flex-start":"flex-end"}}),[d]),b=(0,f.useMemo)((function(){var e=(0,B.jsx)(S.ZP,{default:!0,small:!0,children:"Value data type"}),n=(0,B.jsx)(L.Z,{compact:!0,onChange:function(e){return s((0,c.Z)({},d?"right_value_type":"left_value_type",U(U({},l),{},{value_data_type:e.target.value})))},placeholder:"required",small:!0,value:null===l||void 0===l?void 0:l.value_data_type,children:Object.values(_.t4).map((function(e){return(0,B.jsx)("option",{value:e,children:e.toLowerCase()},e)}))});return(0,B.jsxs)(y.ZP,U(U({},g),{},{children:[d?n:e,(0,B.jsx)(A.Z,{mr:1}),d?e:n]}))}),[l,d,g,s]),j=(0,f.useMemo)((function(){var e=(0,B.jsx)(S.ZP,{default:!0,small:!0,children:"Get value from"}),n=(0,B.jsxs)(L.Z,U(U({},W),{},{onChange:function(e){var n,t,o=e.target.value;(u(o),F===o)?s((n={},(0,c.Z)(n,d?"right_object_keys":"left_object_keys",null),(0,c.Z)(n,d?"right_object_type":"left_object_type",null),n)):s((t={},(0,c.Z)(t,d?"right_object_type":"left_object_type",o),(0,c.Z)(t,d?"right_value":"left_value",null),t))},placeholder:"required",value:F===String(i)?F:o,children:[(0,B.jsx)("option",{value:F,children:"Custom value"}),Object.values(_.XG).map((function(e){return(0,B.jsx)("option",{value:e,children:e.toLowerCase()},e)}))]})),t=F===String(i)&&(0,B.jsxs)(B.Fragment,{children:[!d&&(0,B.jsx)(A.Z,{mr:1}),(0,B.jsx)(M.Z,U(U({},W),{},{onChange:function(e){return s((0,c.Z)({},d?"right_value":"left_value",e.target.value))},value:r||""})),d&&(0,B.jsx)(A.Z,{mr:1})]});return(0,B.jsxs)(y.ZP,U(U({},g),{},{children:[!d&&e,d&&t,d&&n,(0,B.jsx)(A.Z,{mr:1}),!d&&n,!d&&t,d&&e]}))}),[o,i,r,u,g,s]),Z=(0,f.useMemo)((function(){return(0,B.jsxs)(B.Fragment,{children:[d&&(0,B.jsx)("div",{style:{paddingRight:4}}),(0,B.jsx)(x.ZP,{compact:!0,disabled:!n,onClick:function(){s((0,c.Z)({},d?"right_object_keys":"left_object_keys",(t||[]).concat(n))),a(null)},padding:"2px 6px",ref:p,small:!0,children:"Add key"}),!d&&(0,B.jsx)("div",{style:{paddingRight:4}})]})}),[n,t,d,a,s]),O=(0,f.useMemo)((function(){var e=(0,B.jsx)(S.ZP,{default:!0,small:!0,children:"Value extraction keys"}),i=(0,B.jsx)(M.Z,U(U({},W),{},{buttonAfter:!d&&Z,buttonAfterWidth:d||"undefined"===typeof v?null:v+10,buttonBefore:d&&Z,buttonBeforeWidth:d&&"undefined"!==typeof v?v+10:null,onChange:function(e){a(e.target.value)},placeholder:"Enter key...",value:n||""}));B.Fragment,B.Fragment;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(y.ZP,U(U({},g),{},{children:[d?i:e,(0,B.jsx)(A.Z,{mr:1}),d?e:i]})),(null===t||void 0===t?void 0:t.length)>=1&&(0,B.jsx)(A.Z,{mt:1,children:(0,B.jsxs)(y.ZP,U(U({},g),{},{children:[(0,B.jsx)(S.ZP,{default:!0,monospace:!0,xsmall:!0,children:o}),!(null!==t&&void 0!==t&&t.length)&&(0,B.jsxs)(S.ZP,{monospace:!0,muted:!0,xsmall:!0,children:["['",(0,B.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,xsmall:!0,children:"..."}),"']"]}),null===t||void 0===t?void 0:t.map((function(e){return(0,B.jsxs)(S.ZP,{monospace:!0,muted:!0,xsmall:!0,children:["['",(0,B.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,xsmall:!0,children:e}),"']"]})})),(0,B.jsx)("div",{style:{marginRight:4}}),(0,B.jsx)(x.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){s((0,c.Z)({},d?"right_object_keys":"left_object_keys",(t||[]).slice(0,Math.max(0,(null===t||void 0===t?void 0:t.length)-1))))},children:(0,B.jsxs)(y.ZP,{alignItems:"center",children:[(0,B.jsx)(k.x8,{danger:!0,size:1.25*R.iI}),(0,B.jsx)("div",{style:{marginRight:2}}),(0,B.jsx)(S.ZP,{default:!0,xsmall:!0,children:"Delete key"})]})})]}))})]})}),[v,Z,n,t,o,d,g]);return(0,B.jsxs)(B.Fragment,{children:[b,(0,B.jsx)(A.Z,{mt:1}),j,(0,B.jsx)(A.Z,{mt:1}),o&&F!==String(i)&&O]})},Y=t(65956),G=t(44897),Q=t(61896),z=1.25*R.iI,X=1.5*R.iI,V=R.iI/4,q=.75*R.iI,J=R.iI/2,$=(0,s.css)([""," ",""],(function(e){return!e.default&&"\n background-color: ".concat((e.theme.accent||G.Z.accent).purple,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.content||G.Z.content).muted,";\n ")})),ee=s.default.div.withConfig({displayName:"indexstyle__LabelStyle",componentId:"sc-1v7t9a0-0"})(["border-radius:100px;padding:","px ","px;",""],V,X,(function(e){return"\n background-color: ".concat((e.theme.background||G.Z.background).chartBlock,";\n border: ").concat(1,"px solid ").concat((e.theme.interactive||G.Z.interactive).defaultBorder,";\n ")})),ne=s.default.div.withConfig({displayName:"indexstyle__CircleStyle",componentId:"sc-1v7t9a0-1"})(["",";border-radius:","px;height:","px;width:","px;",""],$,1.25*R.iI,z,z,(function(e){return"\n border: 1px solid ".concat((e.theme.interactive||G.Z.interactive).hoverBorder,";\n ")})),te=s.default.div.withConfig({displayName:"indexstyle__OperatorStyle",componentId:"sc-1v7t9a0-2"})(["",";min-width:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;"],$,z+2*(1+X),R.iI/4,J,J,R.iI/4+1),oe=s.default.div.withConfig({displayName:"indexstyle__VerticalLineStyle",componentId:"sc-1v7t9a0-3"})(["",";width:","px;margin-right:","px;"," ",""],$,q,X+1+z/2-q/2,(function(e){return e.last&&"\n height: calc(50% - ".concat(V+1+Q.dN/2,"px);\n ")}),(function(e){return!e.last&&"\n height: 100%;\n "}));var ie=function(e){var n=e.andOrOperator,t=e.children,o=e.first,i=e.last,r=e.level,l=e.predicate,c=e.removePredicate,d=e.title,a=e.updatePredicate,u=(0,f.useRef)(null),s=(0,f.useState)(null),p=s[0],h=s[1],v=(0,f.useState)(null),m=v[0],g=v[1],b=(0,f.useState)(null),Z=b[0],O=b[1],P=(0,f.useState)(null),E=P[0],T=P[1],C=(0,f.useState)(null),I=(C[0],C[1]),w=(l.and_or_operator,l.left_object_keys),D=l.left_object_type,N=l.left_value,M=l.left_value_type,H=l.operator,U=l.right_object_keys,F=l.right_object_type,W=l.right_value,G=l.right_value_type;(0,f.useEffect)((function(){var e,n;I(null===u||void 0===u||null===(e=u.current)||void 0===e||null===(n=e.getBoundingClientRect())||void 0===n?void 0:n.height)}),[]),(0,f.useEffect)((function(){var e,n;I(null===u||void 0===u||null===(e=u.current)||void 0===e||null===(n=e.getBoundingClientRect())||void 0===n?void 0:n.height)}),[D,F]);var Q=(0,f.useMemo)((function(){if(!n)return null;var e=(0,B.jsx)(S.ZP,{bold:!0,center:!0,monospace:!0,uppercase:!0,children:n});return(0,B.jsx)(te,{default:_.YB.OR===n,children:e})}),[n,r]);return(0,B.jsxs)(y.ZP,{children:[(0,B.jsxs)(y.ZP,{alignItems:"flex-end",flexDirection:"column",children:[!o&&i&&(0,B.jsx)(oe,{default:_.YB.OR===n,last:!0}),(0,B.jsx)(ee,{children:(0,B.jsxs)(y.ZP,{alignItems:"center",children:[(0,B.jsx)(S.ZP,{monospace:!0,children:d}),(0,B.jsx)(A.Z,{mr:1}),(0,B.jsx)(ne,{default:_.YB.OR===n})]})}),!i&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(oe,{default:_.YB.OR===n}),Q,(0,B.jsx)(oe,{default:_.YB.OR===n})]})]}),(0,B.jsx)(A.Z,{mr:R.cd}),(0,B.jsx)(j.Z,{flex:1,children:(0,B.jsxs)(y.ZP,{flexDirection:"column",fullWidth:!0,ref:u,children:[(0,B.jsxs)(Y.Z,{dark:!!(r%2),children:[(0,B.jsxs)(y.ZP,{children:[(0,B.jsxs)(j.Z,{flex:1,flexDirection:"column",children:[(0,B.jsxs)(y.ZP,{justifyContent:"center",children:[(0,B.jsxs)(y.ZP,{alignItems:"center",justifyContent:"flex-end",children:[!D&&"undefined"===typeof N&&(0,B.jsx)(S.ZP,{monospace:!0,muted:!0,small:!0,children:"Left expression"}),!D&&N&&(0,B.jsx)(S.ZP,{default:!0,monospace:!0,small:!0,children:_.t4.STRING===(null===M||void 0===M?void 0:M.value_data_type)?"'".concat(N,"'"):N}),D&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(S.ZP,{default:!0,monospace:!0,small:!0,children:D}),!(null!==w&&void 0!==w&&w.length)&&(0,B.jsxs)(S.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,B.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"..."}),"']"]}),null===w||void 0===w?void 0:w.map((function(e){return(0,B.jsxs)(S.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,B.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:e}),"']"]})}))]})]}),(0,B.jsx)(A.Z,{mr:1}),(0,B.jsx)(S.ZP,{default:!0,monospace:!0,small:!0,children:H?_.N_[H]:"operator"}),(!H||!_.i9.includes(H))&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(A.Z,{mr:1}),(0,B.jsxs)(y.ZP,{alignItems:"center",justifyContent:"flex-start",children:[!F&&"undefined"===typeof W&&(0,B.jsx)(S.ZP,{monospace:!0,muted:!0,small:!0,children:"Right expression"}),!F&&W&&(0,B.jsx)(S.ZP,{default:!0,monospace:!0,small:!0,children:_.t4.STRING===(null===G||void 0===G?void 0:G.value_data_type)?"'".concat(W,"'"):W}),F&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(S.ZP,{default:!0,monospace:!0,small:!0,children:F}),!(null!==U&&void 0!==U&&U.length)&&(0,B.jsxs)(S.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,B.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"..."}),"']"]}),null===U||void 0===U?void 0:U.map((function(e){return(0,B.jsxs)(S.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,B.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:e}),"']"]})}))]})]})]})]}),(0,B.jsx)(A.Z,{mb:R.cd}),(0,B.jsxs)(y.ZP,{alignItems:"center",children:[(0,B.jsx)(j.Z,{flex:1,flexDirection:"column",children:(0,B.jsx)(K,{leftKey:m,leftObjectKeys:w,leftObjectType:D,leftObjectTypeState:p,leftValue:N,leftValueType:M,setLeftKey:g,setLeftObjectTypeState:h,updatePredicate:a})}),(0,B.jsx)(A.Z,{mr:R.cd}),(0,B.jsx)("div",{children:(0,B.jsx)(L.Z,{alignCenter:!0,compact:!0,onChange:function(e){return a({operator:e.target.value})},placeholder:"required",small:!0,value:H,children:Object.values(_.W6).map((function(e){return(0,B.jsx)("option",{value:e,children:_.N_[e]},e)}))})}),(0,B.jsx)(A.Z,{mr:R.cd}),(0,B.jsx)(j.Z,{flex:1,flexDirection:"column",children:(0,B.jsx)(K,{leftKey:E,leftObjectKeys:U,leftObjectType:F,leftObjectTypeState:Z,leftValue:W,leftValueType:G,rightAligned:!0,setLeftKey:T,setLeftObjectTypeState:O,updatePredicate:a})})]})]}),(0,B.jsx)("div",{children:(0,B.jsx)(x.ZP,{beforeIcon:(0,B.jsx)(k.rF,{muted:!0,size:1.25*R.iI}),compact:!0,onClick:function(){return c()},small:!0,children:(0,B.jsxs)(S.ZP,{default:!0,monospace:!0,small:!0,children:["Delete ",d]})})})]}),t]}),!i&&(0,B.jsx)(A.Z,{mb:R.cd})]})})]})};function re(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?re(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):re(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ce={and_or_operator:_.YB.AND,left_value_type:{value_data_type:_.t4.STRING},operator:_.W6.EQUALS,right_value_type:{value_data_type:_.t4.STRING}};var de=function(e){var n=e.index,t=e.level,o=e.predicate,i=e.renderPredicate,r=e.setPredicate,c=(0,f.useMemo)((function(){return(null===o||void 0===o?void 0:o.predicates)||[]}),[o]),d=((0,f.useCallback)((function(e){r({predicates:e})}),[r]),(0,f.useCallback)((function(){r({predicates:(c||[]).concat(ce)})}),[c,r])),a=(0,f.useCallback)((function(e,n){var t=(0,l.Z)(c);t[n]=e,r({predicates:t})}),[c,r]),u=(0,f.useMemo)((function(){return(null===c||void 0===c?void 0:c.length)||0}),[c]),s=(0,f.useCallback)((function(e,n){if(!(e<0)){var t=(0,T.bH)()[n];return 0===e||(t=t.toLowerCase(),e>=2&&(t="".concat(t).concat(e-1))),t}}),[]),p=(0,f.useMemo)((function(){return s(t,n)}),[s,n,t]);return(0,B.jsxs)(B.Fragment,{children:[null===c||void 0===c?void 0:c.map((function(e,n){var l,d=function(t){return a(le(le({},e),t),n)};return(0,B.jsx)(ie,{andOrOperator:null===o||void 0===o?void 0:o.and_or_operator,first:0===n,last:n===u-1,level:t+1,predicate:e,removePredicate:function(){r(le(le({},e),{},{predicates:(0,D.oM)(c,n)}))},title:s(t+1,n),updatePredicate:d,children:(0,B.jsx)(A.Z,{mt:(null===e||void 0===e||null===(l=e.predicates)||void 0===l?void 0:l.length)>=1?R.cd:0,children:i({index:n,level:t+1,predicate:e,renderPredicate:i,setPredicate:d})})},"predicate-".concat(n))})),(0,B.jsx)(A.Z,{mt:R.cd,children:(0,B.jsxs)(y.ZP,{alignItems:"center",children:[t>=0&&(null===c||void 0===c?void 0:c.length)>=2&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(L.Z,{compact:!0,monospace:!0,onChange:function(e){return r(le(le({},o),{},{and_or_operator:e.target.value}))},small:!0,paddingVertical:3,value:null===o||void 0===o?void 0:o.and_or_operator,children:Object.values(_.YB).map((function(e){return(0,B.jsx)("option",{value:e,children:(_.YB.OR===e?"".concat(e," "):e).toUpperCase()},e)}))}),(0,B.jsx)(A.Z,{mr:1})]}),(0,B.jsxs)(x.ZP,{compact:t>=0,beforeIcon:(0,B.jsx)(k.mm,{}),onClick:function(){return d()},secondary:!0,small:t>=0,children:["Add predicate",p&&" in ".concat(p)]})]})})]})};function ae(e){var n=e.index,t=e.level,o=e.predicate,i=e.renderPredicate,r=e.setPredicate;return(0,B.jsx)(de,{index:n,level:t,predicate:o,renderPredicate:i,setPredicate:r})}var ue=t(42122),se=t(70320),pe=t(23780);function fe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function he(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?fe(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ve=function(e){var n,t,o,i,c,a,L,M,H,U,F,W,K,Y,G,Q,z,X,V,q,J,$,ee,ne,te,oe=e.isNew,ie=e.operationType,re=e.resourceType,le=e.uuid,ce=(0,se.qB)(),de=(0,w.PR)(),fe=(0,v.useRouter)(),ve="GlobalHookDetail/".concat(le),me=(0,f.useContext)(s.ThemeContext),ge=(0,f.useState)(null),xe=ge[0],be=ge[1],je=(0,f.useState)(!1),ye=je[0],_e=je[1],Ze=(0,f.useState)(ie),Oe=Ze[0],Ae=(Ze[1],(0,f.useState)(re)),Se=Ae[0],Pe=(Ae[1],(0,pe.VI)(null,{},[],{uuid:ve})),ke=(0,d.Z)(Pe,1)[0],Ee=(0,f.useMemo)((function(){return(0,ue.hB)({include_operation_types:1,include_resource_types:1,include_snapshot_validation:1,operation_type:"undefined"===typeof Oe?null:Oe,resource_type:"undefined"===typeof Se?null:Se})}),[Oe,Se]),Re=P.ZP.global_hooks.detail(oe?"__new__":le,Ee).data,Te=(0,f.useMemo)((function(){return null===Re||void 0===Re?void 0:Re.global_hook}),[Re]),Ce=(0,f.useMemo)((function(){return{onErrorCallback:function(e){var n=e.error,t=n.errors,o=n.exception,i=n.message,r=n.type,l=e.response;return p.Am.error((null===t||void 0===t?void 0:t.error)||o||i,{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:r}),ke({errors:t,response:l})}}}),[]),Ie=(0,h.Db)(P.ZP.global_hooks.useCreate(),{onSuccess:function(e){return(0,N.wD)(e,he({callback:function(e){var n=e.global_hook;fe.replace("/global-hooks/".concat(n.uuid,"?operation_type=").concat(n.operation_type,"&resource_type=").concat(n.resource_type))}},Ce))}}),we=(0,d.Z)(Ie,2),De=we[0],Ne=we[1].isLoading,Le=(0,h.Db)(P.ZP.global_hooks.useUpdate(null===Te||void 0===Te?void 0:Te.uuid,Ee),{onSuccess:function(e){return(0,N.wD)(e,he({callback:function(e){var n=e.global_hook;Je((function(e){return he(he({},e),n)})),p.Am.success("Global hook changes successfully saved.",{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-success-".concat(n.uuid)})}},Ce))}}),Me=(0,d.Z)(Le,2),Be=Me[0],He=Me[1].isLoading,Ue=(0,h.Db)((function(e){var n=e.pipeline;return P.ZP.global_hooks.useUpdate(null===Te||void 0===Te?void 0:Te.uuid,Ee)({global_hook:{pipeline:n,snapshot:1}})}),{onSuccess:function(e){return(0,N.wD)(e,he({callback:function(e){var n=e.global_hook;Je((function(e){return he(he({},e),{},{metadata:he(he({},null===e||void 0===e?void 0:e.metadata),null===n||void 0===n?void 0:n.metadata),pipeline:he(he({},null===e||void 0===e?void 0:e.pipeline),null===n||void 0===n?void 0:n.pipeline)})})),p.Am.success("Snapshot successfully created.",{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-snapshot-success-".concat(n.uuid)})}},Ce))}}),Fe=(0,d.Z)(Ue,2),We=Fe[0],Ke=Fe[1].isLoading,Ye=(0,h.Db)(P.ZP.global_hooks.useDelete(null===Te||void 0===Te?void 0:Te.uuid,Ee),{onSuccess:function(e){return(0,N.wD)(e,he({callback:function(e){var n=e.global_hook;p.Am.success("Global hook changes successfully saved.",{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-success-".concat(n.uuid)}),fe.replace("/global-hooks")}},Ce))}}),Ge=(0,d.Z)(Ye,2),Qe=Ge[0],ze=Ge[1].isLoading,Xe=P.ZP.pipelines.list().data,Ve=(0,f.useMemo)((function(){return(0,D.YC)((null===Xe||void 0===Xe?void 0:Xe.pipelines)||[],(function(e){return e.name}))}),[Xe]),qe=(0,f.useMemo)((function(){return(0,D.HK)(Ve||[],(function(e){return e.uuid}))}),[Ve]),Je=(0,f.useCallback)((function(e){be(e),_e(!0)}),[be,_e]);(0,f.useEffect)((function(){Te&&!xe&&be(Te)}),[xe,Te,be]);var $e=(0,f.useMemo)((function(){return null!==xe&&void 0!==xe&&xe.operation_type&&null!==xe&&void 0!==xe&&xe.resource_type?"".concat((0,T.vg)(null===xe||void 0===xe?void 0:xe.operation_type)," ").concat(null===xe||void 0===xe?void 0:xe.resource_type," operation"):null!==xe&&void 0!==xe&&xe.resource_type?"".concat(null===xe||void 0===xe?void 0:xe.resource_type," operation"):null!==xe&&void 0!==xe&&xe.operation_type?"".concat(null===xe||void 0===xe?void 0:xe.operation_type," operation"):"operation"}),[xe]),en=(0,f.useMemo)((function(){var e;return null===qe||void 0===qe?void 0:qe[null===xe||void 0===xe||null===(e=xe.pipeline)||void 0===e?void 0:e.uuid]}),[xe,qe]),nn=(0,f.useMemo)((function(){return(null===en||void 0===en?void 0:en.blocks)||[]}),[en]),tn=(0,f.useMemo)((function(){return(0,D.HK)(nn||[],(function(e){return e.uuid}))}),[nn]),on=(0,f.useMemo)((function(){return(null===xe||void 0===xe?void 0:xe.outputs)||[]}),[xe]),rn=(0,f.useCallback)((function(e,n){var t=(0,l.Z)(on||[]);t[n]=e,Je((function(e){return he(he({},e),{},{outputs:t})}))}),[on,Je]),ln=(0,f.useMemo)((function(){return(0,B.jsx)(x.ZP,{beforeIcon:(0,B.jsx)(k.mm,{}),compact:(null===on||void 0===on?void 0:on.length)>=1,small:(null===on||void 0===on?void 0:on.length)>=1,onClick:function(){return Je((function(e){return he(he({},e),{},{outputs:((null===e||void 0===e?void 0:e.outputs)||[]).concat({block:{uuid:null},key:_.TT.PAYLOAD})})}))},secondary:!0,children:"Add block output"})}),[on,Je]),cn=(0,f.useMemo)((function(){return null===on||void 0===on?void 0:on.map((function(e,n){var t,o,i=e.block,r=e.key,l=e.keyMore,c=e.keys,d=null===tn||void 0===tn?void 0:tn[null===i||void 0===i?void 0:i.uuid];return o=d?(0,B.jsx)(u(),{as:"/pipelines/".concat(null===en||void 0===en?void 0:en.uuid,"/edit?block_uuid=").concat(null===d||void 0===d?void 0:d.uuid),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,B.jsx)(Z.Z,{block:!0,openNewWindow:!0,children:(0,B.jsx)(S.ZP,{color:(0,I.qn)(null===d||void 0===d?void 0:d.type,{blockColor:null===d||void 0===d?void 0:d.color,theme:me}).accent,monospace:!0,children:(null===d||void 0===d?void 0:d.uuid)||"[select a block]"})})}):(0,B.jsx)(S.ZP,{default:!0,monospace:!0,children:(null===d||void 0===d?void 0:d.uuid)||(null===i||void 0===i?void 0:i.uuid)||"[select a block]"}),(0,B.jsxs)(g.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,B.jsxs)(y.ZP,{alignItems:"center",children:[o,(0,B.jsx)(A.Z,{mr:1}),(0,B.jsx)(k.Kw,{muted:!0}),(0,B.jsx)(A.Z,{mr:1}),(0,B.jsxs)(S.ZP,{default:!0,monospace:!0,children:[r||"{object}",(null===c||void 0===c?void 0:c.length)>=1&&(null===c||void 0===c?void 0:c.map((function(e){return(0,B.jsxs)(S.ZP,{default:!0,inline:!0,monospace:!0,children:["['",e,"']"]})})))]})]}),titleXPadding:R.cd*R.iI,titleYPadding:R.cd*R.iI,children:[(0,B.jsx)(O.S,{title:"Block to extract data from",description:"The output data from this block will be merged into the ".concat($e,"\u2019s data."),selectInput:{monospace:!0,onChange:function(t){return rn(he(he({},e),{},{block:he(he({},d),{},{uuid:t.target.value})}),n)},options:null===nn||void 0===nn?void 0:nn.map((function(e){return{label:e.name,value:e.uuid}})),placeholder:"Select a block",value:null===d||void 0===d?void 0:d.uuid}},"block-uuid-".concat(n)),(0,B.jsx)(O.S,{title:"Object to merge block output data into",description:"Select the ".concat($e," object to merge the block output data into."),selectInput:{monospace:!0,onChange:function(t){return rn(he(he({},e),{},{key:t.target.value}),n)},options:null===(t=Object.values(_.TT))||void 0===t?void 0:t.map((function(e){return{label:e,value:e}})),placeholder:"Select an object",value:r}},"key-".concat(n)),(0,B.jsxs)(O.S,{title:"Additional dictionary keys",description:(0,B.jsxs)(S.ZP,{muted:!0,small:!0,children:["If there is a nested object or value in the $",$e," data that you want to merge the block output data into,",(0,B.jsx)("br",{}),"use these additional keys to instruct the hook on how nested you want to merge the block output data."]}),textInput:{fullWidth:!1,monospace:!0,placeholder:"optional",onChange:function(t){return rn(he(he({},e),{},{keyMore:t.target.value}),n)},value:l},children:[null===c||void 0===c?void 0:c.map((function(t){return(0,B.jsx)(A.Z,{ml:1,children:(0,B.jsx)(b.Z,{border:!0,label:t,monospace:!0,onClick:function(){rn(he(he({},e),{},{keys:(c||[]).filter((function(e){return e!==t}))}),n)}})},"keys-".concat(n,"-").concat(t))})),(null===c||void 0===c?void 0:c.length)>=1&&(0,B.jsx)(A.Z,{mr:R.cd}),l&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(x.ZP,{compact:!0,onClick:function(){rn(he(he({},e),{},{keyMore:"",keys:(c||[]).concat(l)}),n)},small:!0,children:["Add key ",l]}),(0,B.jsx)(A.Z,{mr:R.cd})]})]},"keys-".concat(n)),(0,B.jsx)(O.S,{title:"Remove block output",children:(0,B.jsx)(x.ZP,{compact:!0,onClick:function(){return Je((function(e){return he(he({},e),{},{outputs:(0,D.oM)((null===e||void 0===e?void 0:e.outputs)||[],n)})}))},small:!0,children:"Remove"})})]})}))}),[nn,tn,on,en,rn]),dn=(0,f.useMemo)((function(){return(0,ue.GL)(xe||{},["conditions","operation_type","outputs","pipeline","predicate","resource_type","run_settings","stages","strategies"])}),[xe]),an=(0,f.useMemo)((function(){return(null===xe||void 0===xe?void 0:xe.metadata)||{created_at:null,snapshot_hash:null,snapshot_valid:!1,snapshotted_at:null,updated_at:null,user:{id:null}}}),[xe]),un=(0,f.useMemo)((function(){return null===xe||void 0===xe?void 0:xe.predicate}),[xe]),sn=(0,f.useMemo)((function(){return(0,B.jsx)(A.Z,{p:R.cd,children:ae({level:-1,predicate:un,renderPredicate:ae,setPredicate:function(e){return Je((function(n){return he(he({},n),{},{predicate:he(he({},e),{},{and_or_operator:_.YB.OR})})}))}})})}),[un,Je]);return(0,B.jsxs)(A.Z,{mb:8,p:R.cd,children:[(0,B.jsxs)(O.Z,{title:"What to run hook for",children:[(0,B.jsx)(O.S,{description:"This hook\u2019s UUID must be unique across all hooks for the same resource type and operation type.",invalid:ye&&!(null!==xe&&void 0!==xe&&xe.uuid),textInput:oe?{monospace:!0,onChange:function(e){return Je((function(n){return he(he({},n),{},{uuid:e.target.value})}))},placeholder:"e.g. bootstrap pipeline blocks",value:null===xe||void 0===xe?void 0:xe.uuid}:null,title:"Hook UUID",children:!oe&&(0,B.jsx)(A.Z,{px:R.cd,children:(0,B.jsx)(S.ZP,{large:!0,monospace:!0,children:le})})}),(0,B.jsx)(O.S,{description:"Select the resource this hook should be attached to.",invalid:ye&&!(null!==xe&&void 0!==xe&&xe.resource_type),selectInput:{monospace:!0,onChange:function(e){return Je((function(n){return he(he({},n),{},{resource_type:e.target.value})}))},options:null===xe||void 0===xe||null===(n=xe.resource_types)||void 0===n?void 0:n.map((function(e){return{label:(0,T.j3)(e),value:e}})),placeholder:"e.g. Pipeline",value:null===xe||void 0===xe?void 0:xe.resource_type},title:"Resource type"}),(0,B.jsx)(O.S,{description:"When a specific operation occurs for a given resource, this hook will be invoked for that specific operation on the configured resource.",invalid:ye&&!(null!==xe&&void 0!==xe&&xe.operation_type),selectInput:{monospace:!0,onChange:function(e){return Je((function(n){return he(he({},n),{},{operation_type:e.target.value})}))},options:null===xe||void 0===xe||null===(t=xe.operation_types)||void 0===t?void 0:t.map((function(e){return{label:(0,T.vg)(e),value:e}})),placeholder:"e.g. Update",value:null===xe||void 0===xe?void 0:xe.operation_type},title:"Operation type"}),!oe&&(0,B.jsx)(m.Z,{noBorder:!0,noBoxShadow:!0,visibleMappingForced:{0:!0},children:(0,B.jsxs)(g.Z,{noBorderRadius:!0,noPaddingContent:!0,title:"Targeting",titleXPadding:R.cd*R.iI,titleYPadding:R.cd*R.iI,children:[(0,B.jsx)(A.Z,{p:R.cd,children:(0,B.jsxs)(S.ZP,{default:!0,children:["Add targeting conditions to determine what subset of ",null!==xe&&void 0!==xe&&xe.resource_type?(0,T._6)((0,T.j3)(null===xe||void 0===xe?void 0:xe.resource_type),2,null,!0):"resources"," this hook should run for."]})}),sn]})})]}),!oe&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(A.Z,{mb:R.cd}),(0,B.jsxs)(O.Z,{title:"When to run hook",children:[(0,B.jsx)(O.S,{title:"Before operation starts",description:"If enabled, this hook will be invoked before the ".concat($e," starts."),toggleSwitch:{checked:null===xe||void 0===xe||null===(o=xe.stages)||void 0===o?void 0:o.includes(_.SQ.BEFORE),onCheck:function(e){return Je((function(n){var t,o;return he(he({},n),{},{stages:e(null===n||void 0===n||null===(t=n.stages)||void 0===t?void 0:t.includes(_.SQ.BEFORE))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.stages)||[]).concat(_.SQ.BEFORE)])):(null===n||void 0===n||null===(o=n.stages)||void 0===o?void 0:o.filter((function(e){return e!==_.SQ.BEFORE})))||[]})}))}}}),(0,B.jsx)(O.S,{title:"After operation completes",description:"If enabled, this hook will be invoked after the ".concat($e," ends."),toggleSwitch:{checked:null===xe||void 0===xe||null===(i=xe.stages)||void 0===i?void 0:i.includes(_.SQ.AFTER),onCheck:function(e){return Je((function(n){var t,o;return he(he({},n),{},{stages:e(null===n||void 0===n||null===(t=n.stages)||void 0===t?void 0:t.includes(_.SQ.AFTER))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.stages)||[]).concat(_.SQ.AFTER)])):(null===n||void 0===n||null===(o=n.stages)||void 0===o?void 0:o.filter((function(e){return e!==_.SQ.AFTER})))||[]})}))}}}),(0,B.jsx)(O.S,{title:"Run if ".concat($e," succeeds"),description:"If enabled, this hook will be invoked if the ".concat($e," is successful and doesn\u2019t error."),toggleSwitch:{checked:null===xe||void 0===xe||null===(c=xe.conditions)||void 0===c?void 0:c.includes(_.sw.SUCCESS),onCheck:function(e){return Je((function(n){var t,o;return he(he({},n),{},{conditions:e(null===n||void 0===n||null===(t=n.conditions)||void 0===t?void 0:t.includes(_.sw.SUCCESS))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.conditions)||[]).concat(_.sw.SUCCESS)])):(null===n||void 0===n||null===(o=n.conditions)||void 0===o?void 0:o.filter((function(e){return e!==_.sw.SUCCESS})))||[]})}))}}}),(0,B.jsx)(O.S,{title:"Run if ".concat($e," fails"),description:"If enabled, this hook will be invoked if the ".concat($e," fails with an error."),toggleSwitch:{checked:null===xe||void 0===xe||null===(a=xe.conditions)||void 0===a?void 0:a.includes(_.sw.FAILURE),onCheck:function(e){return Je((function(n){var t,o;return he(he({},n),{},{conditions:e(null===n||void 0===n||null===(t=n.conditions)||void 0===t?void 0:t.includes(_.sw.FAILURE))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.conditions)||[]).concat(_.sw.FAILURE)])):(null===n||void 0===n||null===(o=n.conditions)||void 0===o?void 0:o.filter((function(e){return e!==_.sw.FAILURE})))||[]})}))}}})]}),(0,B.jsx)(A.Z,{mb:R.cd}),(0,B.jsxs)(O.Z,{title:"Code to run",description:"When the current hook gets triggered, it will execute the associated pipeline.",children:[(0,B.jsx)(O.S,{title:"Pipeline to execute",description:"Select a pipeline that will be executed every time this hook is triggered.",invalid:ye&&!(null!==xe&&void 0!==xe&&null!==(L=xe.pipeline)&&void 0!==L&&L.uuid),selectInput:{fullWidth:!1,monospace:!0,onChange:function(e){return Je((function(n){return he(he({},n),{},{pipeline:he(he({},null===n||void 0===n?void 0:n.pipeline),{},{uuid:e.target.value})})}))},options:null===Ve||void 0===Ve?void 0:Ve.map((function(e){var n=e.name,t=e.uuid;return{label:n||t,value:t}})),placeholder:"Select a pipeline",value:null===xe||void 0===xe||null===(M=xe.pipeline)||void 0===M?void 0:M.uuid},children:(null===xe||void 0===xe||null===(H=xe.pipeline)||void 0===H?void 0:H.uuid)&&(0,B.jsx)(A.Z,{mr:2,children:(0,B.jsx)(u(),{as:"/pipelines/".concat(null===xe||void 0===xe||null===(U=xe.pipeline)||void 0===U?void 0:U.uuid,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,B.jsx)(Z.Z,{block:!0,openNewWindow:!0,children:"View pipeline"})})})}),(0,B.jsxs)(O.S,{title:null===xe||void 0===xe||null===(F=xe.pipeline)||void 0===F||!F.uuid||null!==an&&void 0!==an&&an.snapshot_hash||null!==an&&void 0!==an&&an.snapshot_valid?"Valid code snapshot":"Code snapshot hasn\u2019t been created yet",description:(0,B.jsx)(B.Fragment,{children:(0,B.jsxs)(S.ZP,{muted:!0,small:!0,children:["Take a snapshot of ",null!==xe&&void 0!==xe&&null!==(W=xe.pipeline)&&void 0!==W&&W.uuid?(0,B.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null===xe||void 0===xe||null===(K=xe.pipeline)||void 0===K?void 0:K.uuid}):"the associated pipeline","\u2019s code. The snapshot is used to validate the hook before it runs.",(0,B.jsx)("br",{}),"A hook cannot run if ",null!==xe&&void 0!==xe&&null!==(Y=xe.pipeline)&&void 0!==Y&&Y.uuid?(0,B.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null===xe||void 0===xe||null===(G=xe.pipeline)||void 0===G?void 0:G.uuid}):"the associated pipeline","\u2019s code has changed after the most recent snapshot has been made.",(0,B.jsx)("br",{}),"If the code changes, a new snapshot must be created."]})}),invalid:(null===xe||void 0===xe||null===(Q=xe.pipeline)||void 0===Q?void 0:Q.uuid)&&(null===an||void 0===an?void 0:an.snapshot_hash)&&!(null!==an&&void 0!==an&&an.snapshot_valid),warning:(null===xe||void 0===xe||null===(z=xe.pipeline)||void 0===z?void 0:z.uuid)&&!(null!==an&&void 0!==an&&an.snapshot_hash)&&!(null!==an&&void 0!==an&&an.snapshot_valid),children:[!(null!==an&&void 0!==an&&an.snapshot_hash)&&(0,B.jsx)(S.ZP,{default:!0,large:!0,children:null!==xe&&void 0!==xe&&null!==(X=xe.pipeline)&&void 0!==X&&X.uuid?"No snapshot has been created":"Select a pipeline before taking a snapshot"}),(null===an||void 0===an?void 0:an.snapshot_hash)&&(0,B.jsx)(y.ZP,{flexDirection:"column",children:(0,B.jsx)(S.ZP,{danger:!(null!==an&&void 0!==an&&an.snapshot_valid),large:!0,rightAligned:!0,success:null===an||void 0===an?void 0:an.snapshot_valid,children:null!==an&&void 0!==an&&an.snapshot_valid?"Snapshot valid":"Snapshot outdated"})})]}),(0,B.jsx)(A.Z,{p:R.cd,children:(0,B.jsx)(y.ZP,{alignItems:"center",justifyContent:"flex-end",children:(0,B.jsxs)(y.ZP,{alignItems:"center",children:[(null===an||void 0===an?void 0:an.snapshotted_at)&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(S.ZP,{muted:!0,rightAligned:!0,small:!0,children:["Last snapshot at ",(0,B.jsx)(S.ZP,{inline:!0,muted:!0,small:!0,monospace:!0,children:null===an||void 0===an?void 0:an.snapshotted_at})]}),(0,B.jsx)(A.Z,{mr:R.cd})]}),(0,B.jsx)(x.ZP,{disabled:!(null!==xe&&void 0!==xe&&null!==(V=xe.pipeline)&&void 0!==V&&V.uuid),loading:Ke,onClick:function(){return We({pipeline:null===xe||void 0===xe?void 0:xe.pipeline})},primary:!(null!==an&&void 0!==an&&an.snapshot_valid),secondary:null===an||void 0===an?void 0:an.snapshot_valid,children:null!==an&&void 0!==an&&an.snapshot_hash?null!==an&&void 0!==an&&an.snapshot_valid?"Update snapshot even though it\u2019s valid":"Update snapshot to make it valid":"Create snapshot of code"})]})})})]}),(0,B.jsx)(A.Z,{mb:R.cd}),(0,B.jsxs)(O.Z,{title:"How to run hook",children:[(0,B.jsx)(O.S,{title:"Stop operation if hook fails",description:"If enabled, the ".concat($e," will be cancelled and an error will be raised."),toggleSwitch:{checked:null===xe||void 0===xe||null===(q=xe.strategies)||void 0===q?void 0:q.includes(_.Ij.RAISE),onCheck:function(e){return Je((function(n){var t,o;return he(he({},n),{},{strategies:e(null===n||void 0===n||null===(t=n.strategies)||void 0===t?void 0:t.includes(_.Ij.RAISE))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.strategies)||[]).concat(_.Ij.RAISE)])):(null===n||void 0===n||null===(o=n.strategies)||void 0===o?void 0:o.filter((function(e){return e!==_.Ij.RAISE})))||[]})}))}}}),(0,B.jsx)(O.S,{title:"Execute hook with history and logging",description:(0,B.jsxs)(S.ZP,{muted:!0,small:!0,children:["If enabled, anytime this hook is executed an associated pipeline run and block runs will be created.",(0,B.jsx)("br",{}),"This will provide a history of the hook execution as well as logging for observability.",(0,B.jsx)("br",{}),"However, this will have a significant impact on the ",$e," resolution time.",(0,B.jsx)("br",{}),"This may cause very delayed API responsed and a degraded devloper experience."]}),toggleSwitch:{checked:!(null===xe||void 0===xe||null===(J=xe.run_settings)||void 0===J||!J.with_trigger),onCheck:function(e){return Je((function(n){var t;return he(he({},n),{},{run_settings:he(he({},null===n||void 0===n?void 0:n.run_settings),{},{with_trigger:e(null===n||void 0===n||null===(t=n.run_settings)||void 0===t?void 0:t.with_trigger)})})}))}}}),(0,B.jsx)(O.S,{title:"Run hook asynchronously",description:(0,B.jsxs)(S.ZP,{muted:!0,small:!0,children:["Hooks will execute the associated pipeline synchronously and prevent the current resource operation (e.g. API request) from resolving until all associated hooks for that resource operation are completed.",(0,B.jsx)("br",{}),"Hooks running synchronously can mutate the input data and output data. However, it can slow down the user experience in the application.",(0,B.jsx)("br",{}),"Enable this setting to run hooks asynchronously and not block the current resource operation from resolving.",(0,B.jsx)("br",{}),"However, asynchronous hooks cannot mutate the input data or output data. Use this asynchronous setting when hooks don\u2019t need to mutate data."]}),toggleSwitch:{checked:!(null===xe||void 0===xe||null===($=xe.run_settings)||void 0===$||!$.asynchronous),onCheck:function(e){return Je((function(n){var t;return he(he({},n),{},{run_settings:he(he({},null===n||void 0===n?void 0:n.run_settings),{},{asynchronous:e(null===n||void 0===n||null===(t=n.run_settings)||void 0===t?void 0:t.asynchronous)})})}))}}})]}),(0,B.jsx)(A.Z,{mb:R.cd}),(0,B.jsxs)(O.Z,{title:"Block outputs ".concat((null===on||void 0===on?void 0:on.length)>=1?"(".concat((null===on||void 0===on?void 0:on.length)||0,")"):""),description:(0,B.jsx)(A.Z,{mt:1,children:(0,B.jsxs)(S.ZP,{muted:!0,children:["When a hook runs and executes a pipeline, the output from the pipeline\u2019s blocks",(0,B.jsx)("br",{}),"can optionally be used to mutate the ",$e," input and output data."]})}),headerChildren:(null===on||void 0===on?void 0:on.length)>=1&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(A.Z,{ml:R.cd}),ln]}),children:[!(null!==on&&void 0!==on&&on.length)&&(0,B.jsx)(A.Z,{p:R.cd,children:ln}),(null===on||void 0===on?void 0:on.length)>=1&&(0,B.jsx)(m.Z,{noBorder:!0,noBoxShadow:!0,children:cn})]}),(0,B.jsx)(A.Z,{mb:R.cd}),(0,B.jsxs)(O.Z,{title:"Metadata",children:[(0,B.jsx)(O.S,{title:"Last updated",children:(0,B.jsxs)(j.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(S.ZP,{large:!0,monospace:!0,muted:!0,children:null!==an&&void 0!==an&&an.updated_at?(0,C.XG)(null===an||void 0===an?void 0:an.updated_at,ce):"-"}),(0,B.jsx)(A.Z,{mr:R.cd}),(0,B.jsx)(k.Pf,{muted:!0,size:E.Z}),(0,B.jsx)(A.Z,{mr:1})]})}),(0,B.jsx)(O.S,{title:"Created at",children:(0,B.jsxs)(j.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(S.ZP,{large:!0,monospace:!0,muted:!0,children:null!==an&&void 0!==an&&an.created_at?(0,C.XG)(null===an||void 0===an?void 0:an.created_at,ce):"-"}),(0,B.jsx)(A.Z,{mr:R.cd}),(0,B.jsx)(k.Pf,{muted:!0,size:E.Z}),(0,B.jsx)(A.Z,{mr:1})]})}),(0,B.jsx)(O.S,{title:"Snapshotted at",children:(0,B.jsxs)(j.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(S.ZP,{large:!0,monospace:!0,muted:!0,children:null!==an&&void 0!==an&&an.snapshotted_at?(0,C.XG)(null===an||void 0===an?void 0:an.snapshotted_at,ce):"-"}),(0,B.jsx)(A.Z,{mr:R.cd}),(0,B.jsx)(k.Pf,{muted:!0,size:E.Z}),(0,B.jsx)(A.Z,{mr:1})]})}),(0,B.jsx)(O.S,{title:"Snapshot valid",children:(0,B.jsxs)(j.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(S.ZP,{large:!0,danger:!(null!==an&&void 0!==an&&an.snapshot_valid),muted:null===an||void 0===an?void 0:an.snapshot_valid,children:null!==an&&void 0!==an&&an.snapshot_valid?"Valid":"Hook won\u2019t run until snapshot is valid"}),(0,B.jsx)(A.Z,{mr:R.cd}),null!==an&&void 0!==an&&an.snapshot_valid?(0,B.jsx)(k.Jr,{size:E.Z,success:!0}):(0,B.jsx)(k.uy,{danger:!0,size:E.Z}),(0,B.jsx)(A.Z,{mr:1})]})}),(0,B.jsx)(O.S,{title:"Created by",children:(0,B.jsxs)(j.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(S.ZP,{large:!0,monospace:!0,muted:!0,children:null!==an&&void 0!==an&&null!==(ee=an.user)&&void 0!==ee&&ee.id?String(null===an||void 0===an||null===(ne=an.user)||void 0===ne?void 0:ne.id)===String(null===de||void 0===de?void 0:de.id)?"You created this hook":"User ID ".concat(null===an||void 0===an||null===(te=an.user)||void 0===te?void 0:te.id):"-"}),(0,B.jsx)(A.Z,{mr:R.cd}),(0,B.jsx)(k.SC,{muted:!0,size:E.Z}),(0,B.jsx)(A.Z,{mr:1})]})})]})]}),(0,B.jsx)(A.Z,{mt:R.HN,children:(0,B.jsxs)(y.ZP,{alignItems:"center",justifyContent:"space-between",children:[!oe&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(x.ZP,{compact:!0,danger:!0,loading:ze,onClick:function(){window.confirm("Are you sure you wantt to delete this hook?")&&Qe()},small:!0,children:"Delete global hook"}),(0,B.jsx)(A.Z,{mr:R.cd})]}),(0,B.jsxs)(j.Z,{flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(x.ZP,{beforeIcon:(0,B.jsx)(k.Hd,{}),disabled:Ne||He||ze,onClick:function(){return fe.push("/global-hooks")},secondary:!0,children:ye?"Cancel changes & go back":"Go back to all hooks"}),(0,B.jsx)(A.Z,{mr:R.cd}),(0,B.jsx)(x.ZP,{beforeIcon:(0,B.jsx)(k.vc,{}),disabled:ze,loading:Ne||He,onClick:function(){return(oe?De:Be)({global_hook:he(he({},dn),oe?{uuid:null===xe||void 0===xe?void 0:xe.uuid}:{})})},primary:!0,children:oe?"Create new global hook":"Save changes"})]})]})})]})}},88543:function(e,n,t){t.d(n,{S:function(){return y},Z:function(){return _}});var o=t(82684),i=t(15338),r=t(97618),l=t(55485),c=t(85854),d=t(65956),a=t(82394),u=t(44085),s=t(38276),p=t(30160),f=t(17488),h=t(69650),v=t(72473),m=t(8193),g=t(70515),x=t(28598);function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach((function(n){(0,a.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var y=function(e){var n,t=e.children,o=e.description,i=e.invalid,c=e.large,d=void 0===c||c,a=e.selectInput,b=e.textInput,y=e.title,_=e.toggleSwitch,Z=e.warning;return(0,x.jsx)(s.Z,{p:g.cd,children:(0,x.jsxs)(l.ZP,{alignItems:"center",children:[(0,x.jsxs)(l.ZP,{flexDirection:"column",children:[(0,x.jsxs)(p.ZP,{danger:i,default:!0,large:d,warning:Z,children:[y," ",i&&(0,x.jsx)(p.ZP,{danger:!0,inline:!0,large:d,children:"is required"})]}),o&&"string"===typeof o&&(0,x.jsx)(p.ZP,{muted:!0,small:!0,children:o}),o&&"string"!==typeof o&&o]}),(0,x.jsx)(s.Z,{mr:g.cd}),(0,x.jsxs)(r.Z,{flex:1,justifyContent:"flex-end",children:[t,b&&(0,x.jsx)(f.Z,j({afterIcon:(0,x.jsx)(v.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:m.Z,alignRight:!0,autoComplete:"off",large:d,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},b)),a&&(0,x.jsx)(u.Z,j(j({},a),{},{afterIcon:(0,x.jsx)(v._M,{}),afterIconSize:m.Z,alignRight:!0,autoComplete:"off",large:d,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===a||void 0===a||null===(n=a.options)||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.value;return(0,x.jsx)("option",{value:t,children:n||t},t)}))})),_&&(0,x.jsx)(h.Z,{checked:!(null===_||void 0===_||!_.checked),compact:!0,onCheck:null===_||void 0===_?void 0:_.onCheck})]})]})})},_=function(e){var n=e.children,t=e.description,a=e.headerChildren,u=e.title;return(0,x.jsxs)(d.Z,{noPadding:!0,children:[(0,x.jsx)(s.Z,{p:g.cd,children:(0,x.jsxs)(l.ZP,{alignItems:"center",children:[(0,x.jsxs)(r.Z,{flex:1,flexDirection:"column",children:[(0,x.jsx)(c.Z,{level:4,children:u}),t&&"string"===typeof t&&(0,x.jsx)(s.Z,{mt:1,children:(0,x.jsx)(p.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),a]})}),o.Children.map(n,(function(e,n){return(0,x.jsxs)("div",{children:[(0,x.jsx)(i.Z,{light:!0}),e]},"".concat(u,"-").concat(n))}))]})}},8193:function(e,n,t){t.d(n,{N:function(){return d},Z:function(){return c}});var o=t(38626),i=t(44897),r=t(42631),l=t(70515),c=2*l.iI,d=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],r.n_,l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).codeArea,";\n ")}))},44425:function(e,n,t){t.d(n,{$W:function(){return g},DA:function(){return v},HX:function(){return y},J8:function(){return j},L8:function(){return c},LE:function(){return p},Lk:function(){return O},Lq:function(){return f},M5:function(){return h},Q3:function(){return x},Qj:function(){return _},Ut:function(){return P},V4:function(){return S},VZ:function(){return b},dO:function(){return s},f2:function(){return A},iZ:function(){return Z},t6:function(){return d},tf:function(){return u}});var o,i,r,l,c,d,a=t(82394);!function(e){e.CONDITION="condition",e.DBT_SNAPSHOT="snapshot",e.DYNAMIC="dynamic",e.DYNAMIC_CHILD="dynamic_child",e.REDUCE_OUTPUT="reduce_output",e.REPLICA="replica"}(c||(c={})),function(e){e.MARKDOWN="markdown",e.PYTHON="python",e.R="r",e.SQL="sql",e.YAML="yaml"}(d||(d={}));var u,s=(o={},(0,a.Z)(o,d.MARKDOWN,"MD"),(0,a.Z)(o,d.PYTHON,"PY"),(0,a.Z)(o,d.R,"R"),(0,a.Z)(o,d.SQL,"SQL"),(0,a.Z)(o,d.YAML,"YAML"),o),p=(i={},(0,a.Z)(i,d.MARKDOWN,"Markdown"),(0,a.Z)(i,d.PYTHON,"Python"),(0,a.Z)(i,d.R,"R"),(0,a.Z)(i,d.SQL,"SQL"),(0,a.Z)(i,d.YAML,"YAML"),i);!function(e){e.CALLBACK="callback",e.CHART="chart",e.CONDITIONAL="conditional",e.CUSTOM="custom",e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.DBT="dbt",e.EXTENSION="extension",e.GLOBAL_DATA_PRODUCT="global_data_product",e.SCRATCHPAD="scratchpad",e.SENSOR="sensor",e.MARKDOWN="markdown",e.TRANSFORMER="transformer"}(u||(u={}));var f,h=[u.CALLBACK,u.CONDITIONAL,u.EXTENSION];!function(e){e.BLUE="blue",e.GREY="grey",e.PINK="pink",e.PURPLE="purple",e.TEAL="teal",e.YELLOW="yellow"}(f||(f={}));var v,m,g=[u.CHART,u.CUSTOM,u.DATA_EXPORTER,u.DATA_LOADER,u.SCRATCHPAD,u.SENSOR,u.MARKDOWN,u.TRANSFORMER],x=[u.CUSTOM,u.DATA_EXPORTER,u.DATA_LOADER,u.SCRATCHPAD,u.SENSOR,u.MARKDOWN,u.TRANSFORMER],b=[u.DATA_EXPORTER,u.DATA_LOADER],j=[u.DATA_EXPORTER,u.DATA_LOADER,u.TRANSFORMER],y=[u.DATA_EXPORTER,u.DATA_LOADER,u.DBT,u.TRANSFORMER],_=[u.CHART,u.SCRATCHPAD,u.SENSOR,u.MARKDOWN],Z=[u.CALLBACK,u.CHART,u.EXTENSION,u.SCRATCHPAD,u.MARKDOWN],O=[u.CUSTOM,u.DATA_EXPORTER,u.DATA_LOADER,u.SENSOR,u.TRANSFORMER];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(v||(v={})),function(e){e.BLOCK_FILE="block_file",e.CUSTOM_BLOCK_TEMPLATE="custom_block_template",e.MAGE_TEMPLATE="mage_template"}(m||(m={}));var A=[u.CUSTOM,u.DATA_EXPORTER,u.DATA_LOADER,u.TRANSFORMER],S=(r={},(0,a.Z)(r,u.CALLBACK,"Callback"),(0,a.Z)(r,u.CHART,"Chart"),(0,a.Z)(r,u.CONDITIONAL,"Conditional"),(0,a.Z)(r,u.CUSTOM,"Custom"),(0,a.Z)(r,u.DATA_EXPORTER,"Data exporter"),(0,a.Z)(r,u.DATA_LOADER,"Data loader"),(0,a.Z)(r,u.DBT,"DBT"),(0,a.Z)(r,u.EXTENSION,"Extension"),(0,a.Z)(r,u.GLOBAL_DATA_PRODUCT,"Global data product"),(0,a.Z)(r,u.MARKDOWN,"Markdown"),(0,a.Z)(r,u.SCRATCHPAD,"Scratchpad"),(0,a.Z)(r,u.SENSOR,"Sensor"),(0,a.Z)(r,u.TRANSFORMER,"Transformer"),r),P=[u.DATA_LOADER,u.TRANSFORMER,u.DATA_EXPORTER,u.SENSOR];l={},(0,a.Z)(l,u.DATA_EXPORTER,"DE"),(0,a.Z)(l,u.DATA_LOADER,"DL"),(0,a.Z)(l,u.SCRATCHPAD,"SP"),(0,a.Z)(l,u.SENSOR,"SR"),(0,a.Z)(l,u.MARKDOWN,"MD"),(0,a.Z)(l,u.TRANSFORMER,"TF")},14466:function(e,n,t){t.d(n,{Ij:function(){return r},N_:function(){return v},SQ:function(){return l},TT:function(){return c},W6:function(){return p},XG:function(){return u},YB:function(){return a},i9:function(){return h},sw:function(){return d},t4:function(){return s}});var o,i,r,l,c,d,a,u,s,p,f=t(82394);!function(e){e.CREATE="create",e.DELETE="delete",e.DETAIL="detail",e.EXECUTE="execute",e.LIST="list",e.UPDATE="update",e.UPDATE_ANYWHERE="update_anywhere"}(i||(i={})),function(e){e.BREAK="break",e.CONTINUE="continue",e.RAISE="raise"}(r||(r={})),function(e){e.AFTER="after",e.BEFORE="before"}(l||(l={})),function(e){e.ERROR="error",e.META="meta",e.METADATA="metadata",e.PAYLOAD="payload",e.QUERY="query",e.RESOURCE="resource",e.RESOURCES="resources"}(c||(c={})),function(e){e.FAILURE="failure",e.SUCCESS="success"}(d||(d={})),function(e){e.AND="and",e.OR="or"}(a||(a={})),function(e){e.ERROR="error",e.HOOK="hook",e.META="meta",e.METADATA="metadata",e.OPERATION_RESOURCE="operation_resource",e.PAYLOAD="payload",e.QUERY="query",e.RESOURCE="resource",e.RESOURCES="resources",e.RESOURCE_ID="resource_id",e.RESOURCE_PARENT_ID="resource_parent_id",e.USER="user"}(u||(u={})),function(e){e.BOOLEAN="BOOLEAN",e.DICTIONARY="DICTIONARY",e.FLOAT="FLOAT",e.INTEGER="INTEGER",e.LIST="LIST",e.STRING="STRING"}(s||(s={})),function(e){e.EQUALS="EQUALS",e.GREATER_THAN="GREATER_THAN",e.GREATER_THAN_OR_EQUALS="GREATER_THAN_OR_EQUALS",e.INCLUDES="INCLUDES",e.LESS_THAN="LESS_THAN",e.LESS_THAN_OR_EQUALS="LESS_THAN_OR_EQUALS",e.NOT_EQUALS="NOT_EQUALS",e.NOT_INCLUDES="NOT_INCLUDES",e.NOT_PRESENT="NOT_PRESENT",e.PRESENT="PRESENT"}(p||(p={}));var h=[p.NOT_PRESENT,p.PRESENT],v=(o={},(0,f.Z)(o,p.EQUALS,"=="),(0,f.Z)(o,p.GREATER_THAN,">"),(0,f.Z)(o,p.GREATER_THAN_OR_EQUALS,">="),(0,f.Z)(o,p.INCLUDES,"includes"),(0,f.Z)(o,p.LESS_THAN,"<"),(0,f.Z)(o,p.LESS_THAN_OR_EQUALS,"<="),(0,f.Z)(o,p.NOT_EQUALS,"!="),(0,f.Z)(o,p.NOT_INCLUDES,"not includes"),(0,f.Z)(o,p.NOT_PRESENT,"is not present"),(0,f.Z)(o,p.PRESENT,"is present"),o)},31882:function(e,n,t){var o=t(38626),i=t(71180),r=t(55485),l=t(30160),c=t(44897),d=t(72473),a=t(70515),u=t(61896),s=t(28598),p=o.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||c.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||c.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((a.iI+u.Al)/2,"px;\n height: ").concat(1.5*a.iI+u.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+u.Al)/2,"px;\n height: ").concat(u.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+u.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||c.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,o=e.disabled,c=e.label,u=e.monospace,f=e.onClick,h=e.primary,v=e.small,m=e.xsmall;return(0,s.jsx)(p,{border:n,primary:h,small:v,xsmall:m,children:(0,s.jsx)(i.ZP,{basic:!0,disabled:o,noBackground:!0,noPadding:!0,onClick:f,transparent:!0,children:(0,s.jsxs)(r.ZP,{alignItems:"center",children:[t,c&&(0,s.jsx)(l.ZP,{monospace:u,small:v,xsmall:m,children:c}),!o&&f&&(0,s.jsx)("div",{style:{marginLeft:2}}),!o&&f&&(0,s.jsx)(d.x8,{default:h,muted:!h,size:v?a.iI:1.25*a.iI})]})})})}},65956:function(e,n,t){var o=t(38626),i=t(55485),r=t(38276),l=t(30160),c=t(44897),d=t(42631),a=t(47041),u=t(70515),s=t(28598),p=(0,o.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*u.iI,1.5*u.iI,1.5*u.iI),f=o.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||c.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||c.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||c.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||c.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=o.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],d.n_,d.n_,(function(e){return"\n background-color: ".concat((e.theme.background||c.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),v=o.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*u.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*u.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=o.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],d.M8,d.YF,1.75*u.iI);n.Z=function(e){var n=e.borderless,t=e.children,o=e.containerRef,c=e.contentContainerRef,d=e.dark,a=e.footer,u=e.fullHeight,p=void 0===u||u,g=e.fullWidth,x=void 0===g||g,b=e.header,j=e.headerHeight,y=e.headerIcon,_=e.headerPaddingVertical,Z=e.headerTitle,O=e.maxHeight,A=e.maxWidth,S=e.minWidth,P=e.noPadding,k=e.overflowVisible,E=e.subtitle,R=e.success;return(0,s.jsxs)(f,{borderless:n,dark:d,fullHeight:p,fullWidth:x,maxHeight:O,maxWidth:A,minWidth:S,overflowVisible:k,ref:o,success:R,children:[(b||Z)&&(0,s.jsxs)(h,{headerPaddingVertical:_,height:j,children:[b&&b,Z&&(0,s.jsx)(i.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(i.ZP,{alignItems:"center",children:[y&&y,(0,s.jsx)(r.Z,{ml:y?1:0,children:(0,s.jsx)(l.ZP,{bold:!0,default:!0,children:Z})})]})})]}),(0,s.jsxs)(v,{maxHeight:O,noPadding:P,overflowVisible:k,ref:c,children:[E&&"string"===typeof E&&(0,s.jsx)(r.Z,{mb:2,children:(0,s.jsx)(l.ZP,{default:!0,children:E})}),E&&"string"!==typeof E&&E,t]}),a&&(0,s.jsx)(m,{children:a})]})}},80022:function(e,n,t){function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return o}})},15544:function(e,n,t){function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}t.d(n,{Z:function(){return o}})},13692:function(e,n,t){t.d(n,{Z:function(){return i}});var o=t(61049);function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,o.Z)(e,n)}},93189:function(e,n,t){t.d(n,{Z:function(){return r}});var o=t(12539),i=t(80022);function r(e,n){if(n&&("object"===o(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}},61049:function(e,n,t){function o(e,n){return o=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},o(e,n)}t.d(n,{Z:function(){return o}})}}]);