mage-ai 0.9.32__py3-none-any.whl → 0.9.34__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 (365) hide show
  1. mage_ai/api/constants.py +37 -2
  2. mage_ai/api/errors.py +9 -5
  3. mage_ai/api/middleware.py +2 -2
  4. mage_ai/api/mixins/__init__.py +0 -0
  5. mage_ai/api/mixins/result_set.py +65 -0
  6. mage_ai/api/operations/base.py +41 -11
  7. mage_ai/api/operations/constants.py +7 -6
  8. mage_ai/api/parsers/BaseParser.py +6 -4
  9. mage_ai/api/parsers/PipelineScheduleParser.py +36 -2
  10. mage_ai/api/policies/BackfillPolicy.py +1 -0
  11. mage_ai/api/policies/BasePolicy.py +229 -40
  12. mage_ai/api/policies/PermissionPolicy.py +17 -0
  13. mage_ai/api/policies/PipelineSchedulePolicy.py +18 -2
  14. mage_ai/api/policies/RolePermissionPolicy.py +2 -1
  15. mage_ai/api/policies/RolePolicy.py +3 -0
  16. mage_ai/api/policies/SessionPolicy.py +36 -1
  17. mage_ai/api/policies/StatusPolicy.py +46 -3
  18. mage_ai/api/policies/UserPolicy.py +25 -2
  19. mage_ai/api/policies/mixins/__init__.py +0 -0
  20. mage_ai/api/policies/mixins/user_permissions.py +241 -0
  21. mage_ai/api/presenters/PermissionPresenter.py +35 -8
  22. mage_ai/api/presenters/RolePresenter.py +29 -12
  23. mage_ai/api/presenters/StatusPresenter.py +11 -0
  24. mage_ai/api/presenters/UserPresenter.py +21 -24
  25. mage_ai/api/resources/BaseResource.py +24 -9
  26. mage_ai/api/resources/BlockResource.py +3 -2
  27. mage_ai/api/resources/DatabaseResource.py +2 -2
  28. mage_ai/api/resources/PermissionResource.py +65 -3
  29. mage_ai/api/resources/Resource.py +8 -1
  30. mage_ai/api/resources/RolePermissionResource.py +23 -0
  31. mage_ai/api/resources/RoleResource.py +75 -4
  32. mage_ai/api/resources/StatusResource.py +34 -0
  33. mage_ai/api/resources/UserResource.py +35 -4
  34. mage_ai/api/result_set.py +8 -1
  35. mage_ai/authentication/permissions/constants.py +78 -0
  36. mage_ai/data_integrations/destinations/constants.py +1 -0
  37. mage_ai/data_integrations/utils/config.py +9 -0
  38. mage_ai/data_integrations/utils/scheduler.py +16 -7
  39. mage_ai/data_preparation/models/block/__init__.py +56 -16
  40. mage_ai/data_preparation/models/block/data_integration/mixins.py +92 -1
  41. mage_ai/data_preparation/models/block/data_integration/utils.py +5 -5
  42. mage_ai/data_preparation/models/block/integration/__init__.py +12 -7
  43. mage_ai/data_preparation/models/block/sql/__init__.py +5 -2
  44. mage_ai/data_preparation/models/block/sql/utils/shared.py +15 -1
  45. mage_ai/data_preparation/models/pipelines/interactions.py +15 -0
  46. mage_ai/data_preparation/shared/secrets.py +7 -17
  47. mage_ai/data_preparation/templates/data_exporters/streaming/google_cloud_pubsub.yaml +5 -0
  48. mage_ai/data_preparation/templates/repo/metadata.yaml +5 -0
  49. mage_ai/io/druid.py +9 -5
  50. mage_ai/io/mssql.py +52 -30
  51. mage_ai/io/postgres.py +1 -0
  52. mage_ai/io/sql.py +15 -1
  53. mage_ai/orchestration/db/models/oauth.py +181 -17
  54. mage_ai/orchestration/db/models/schedules.py +11 -0
  55. mage_ai/presenters/interactions/constants.py +1 -0
  56. mage_ai/presenters/pages/loaders/pipeline_schedules.py +9 -3
  57. mage_ai/server/api/base.py +16 -6
  58. mage_ai/server/api/v1.py +2 -1
  59. mage_ai/server/constants.py +1 -1
  60. mage_ai/server/frontend_dist/404.html +2 -2
  61. mage_ai/server/frontend_dist/_next/static/PBVuphyo_muEAj347ZP_b/_buildManifest.js +1 -0
  62. mage_ai/server/frontend_dist/_next/static/chunks/1124-d8fc76201b83b376.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/{1749-9ec0f4709f5a9284.js → 1749-a6bdce4ee8a09bce.js} +1 -1
  64. mage_ai/server/frontend_dist/_next/static/chunks/1769-613e23e361eb5bce.js +1 -0
  65. mage_ai/server/frontend_dist/_next/static/chunks/1821-953efd0da290d25f.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/2327-1a797c758f8b064a.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/2677-a85c5a72bb695304.js +1 -0
  68. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3419-6c8ec8db8c398c12.js → frontend_dist/_next/static/chunks/3419-0df6c5ef72f2e672.js} +1 -1
  69. mage_ai/server/frontend_dist/_next/static/chunks/3684-e1a713b7c16f0151.js +1 -0
  70. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3859-3501cdba0a33f9f2.js → frontend_dist/_next/static/chunks/3859-ba594d21a1260cd2.js} +1 -1
  71. mage_ai/server/frontend_dist/_next/static/chunks/4636-84f545d1d238df13.js +1 -0
  72. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4839-963da65cea58054f.js → frontend_dist/_next/static/chunks/4839-e5fe343a369734bc.js} +1 -1
  73. mage_ai/server/frontend_dist/_next/static/chunks/5457-97433bc45b42a88a.js +1 -0
  74. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5499-63667ad5a785dba5.js → frontend_dist/_next/static/chunks/5499-b74459f6be5f9229.js} +1 -1
  75. mage_ai/server/frontend_dist/_next/static/chunks/6043-6ea109833b88eb1d.js +1 -0
  76. mage_ai/server/frontend_dist/_next/static/chunks/6333-ca4cd6a73a597a40.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/7022-80d082a1d7fd1234.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/7361-25f211ef377e5958.js +1 -0
  79. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/8013-1d6b1f7c13264cb4.js → frontend_dist/_next/static/chunks/8013-e67c71ddea072a20.js} +1 -1
  80. mage_ai/server/frontend_dist/_next/static/chunks/8146-941c5155c3bfcc35.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/9161-837b653aa849a76f.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/9264-5730e4e059db40a8.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-752d991f239a128f.js +1 -0
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-a624972d126a3dbd.js → block-layout-a27a28d2a615e364.js} +1 -1
  85. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-98e27a4d7bd0da47.js +1 -0
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-a95787fe1695f493.js → [...slug]-9eb5dad57da13efd.js} +1 -1
  87. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-0d55711df91a78d0.js → global-data-products-26909dec66f00231.js} +1 -1
  88. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-b9eea6abc676ca81.js +1 -0
  89. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-11c601c6ef07fe86.js +1 -0
  90. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-ae6083077c9c1c41.js +1 -0
  91. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-bfce0ee677d57206.js +1 -0
  92. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-476c921d62f565fc.js +1 -0
  93. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/overview-9bc34ef66d84330a.js → frontend_dist/_next/static/chunks/pages/overview-2ec6b17e45a52be8.js} +1 -1
  94. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-605918f3a5c1aac4.js +1 -0
  95. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-84ec3ab0770bcd68.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ee65a62ed166bd85.js} +1 -1
  96. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-2402004a19a6ad53.js +1 -0
  97. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-9a5b4768a640cd68.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-8781db69f19759a1.js} +1 -1
  98. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-d7fd4857579e2b00.js +1 -0
  99. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-bd4bd009146bab36.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-234007c99efdccf6.js} +1 -1
  100. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8405a83adeaa8ff5.js → block-runs-da7510d4b277e47b.js} +1 -1
  101. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-98aa0840a00cc661.js → block-runtime-eae853ff34b09481.js} +1 -1
  102. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-0fb48e1cc51f78b2.js → monitors-a057b17847b82468.js} +1 -1
  103. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-845c1f010d5ec380.js → [run]-99d11c86f8b15369.js} +1 -1
  104. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-9255f85760e1f57a.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-3f0980d8810a540b.js} +1 -1
  105. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-187ac359020704e1.js → settings-9edf75d03460aaeb.js} +1 -1
  106. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-c52d0c49439ec620.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-e7692e54979f037d.js} +1 -1
  107. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-7b3b57523b226a0e.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-cb6a3bcaf4fa1a81.js} +1 -1
  108. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-5eff96c149584e87.js +1 -0
  109. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipelines-efc080913a247e99.js → pipelines-270b912e1ac189b5.js} +1 -1
  110. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-2058d022972cdea4.js +1 -0
  111. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/[...slug]-1a95628ea8d0d846.js +1 -0
  112. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions-cb1cdf5f8e5bf9c5.js +1 -0
  113. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-58978256db4efbda.js +1 -0
  114. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/[...slug]-9ddd7eb842d5a911.js +1 -0
  115. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-1694c5eb1acbcf30.js +1 -0
  116. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-6850e854fbedbb61.js +1 -0
  117. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/[...slug]-5061c073e1c0de07.js +1 -0
  118. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-f551c5665bfd3494.js +1 -0
  119. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-6fe3657070f98aca.js → frontend_dist/_next/static/chunks/pages/sign-in-e779dbab123e626e.js} +1 -1
  120. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-935113d252ada806.js +1 -0
  121. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates-25b6d24cfa81c306.js → frontend_dist/_next/static/chunks/pages/templates-7079d637e396f2a8.js} +1 -1
  122. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-67fdb4a3be93aa14.js +1 -0
  123. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-9c0374c7c783b34a.js +1 -0
  124. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-ea3a0d48e5822b42.js +1 -0
  125. mage_ai/server/frontend_dist/block-layout.html +2 -2
  126. mage_ai/server/frontend_dist/files.html +2 -2
  127. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  128. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  129. mage_ai/server/frontend_dist/index.html +2 -2
  130. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  131. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  132. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  133. mage_ai/server/frontend_dist/manage/users.html +2 -2
  134. mage_ai/server/frontend_dist/manage.html +2 -2
  135. mage_ai/server/frontend_dist/overview.html +2 -2
  136. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  137. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  138. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  139. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
  140. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  141. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  142. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  143. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  144. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  145. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  146. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  147. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  148. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  149. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  150. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  151. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  152. mage_ai/server/frontend_dist/pipelines.html +2 -2
  153. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  154. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +24 -0
  155. mage_ai/server/frontend_dist/settings/workspace/permissions.html +24 -0
  156. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  157. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +24 -0
  158. mage_ai/server/frontend_dist/settings/workspace/roles.html +24 -0
  159. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  160. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +24 -0
  161. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  162. mage_ai/server/frontend_dist/settings.html +2 -2
  163. mage_ai/server/frontend_dist/sign-in.html +5 -5
  164. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  165. mage_ai/server/frontend_dist/templates.html +2 -2
  166. mage_ai/server/frontend_dist/terminal.html +2 -2
  167. mage_ai/server/frontend_dist/test.html +2 -2
  168. mage_ai/server/frontend_dist/triggers.html +2 -2
  169. mage_ai/server/frontend_dist/version-control.html +2 -2
  170. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/L-IKw5_bRZUs-wyjnpN_j/_buildManifest.js +1 -0
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1124-d8fc76201b83b376.js +1 -0
  173. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1749-9ec0f4709f5a9284.js → 1749-a6bdce4ee8a09bce.js} +1 -1
  174. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1769-613e23e361eb5bce.js +1 -0
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1821-953efd0da290d25f.js +1 -0
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2327-1a797c758f8b064a.js +1 -0
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2677-a85c5a72bb695304.js +1 -0
  178. mage_ai/server/{frontend_dist/_next/static/chunks/3419-6c8ec8db8c398c12.js → frontend_dist_base_path_template/_next/static/chunks/3419-0df6c5ef72f2e672.js} +1 -1
  179. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3684-e1a713b7c16f0151.js +1 -0
  180. mage_ai/server/{frontend_dist/_next/static/chunks/3859-3501cdba0a33f9f2.js → frontend_dist_base_path_template/_next/static/chunks/3859-ba594d21a1260cd2.js} +1 -1
  181. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4636-84f545d1d238df13.js +1 -0
  182. mage_ai/server/{frontend_dist/_next/static/chunks/4839-963da65cea58054f.js → frontend_dist_base_path_template/_next/static/chunks/4839-e5fe343a369734bc.js} +1 -1
  183. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-97433bc45b42a88a.js +1 -0
  184. mage_ai/server/{frontend_dist/_next/static/chunks/5499-63667ad5a785dba5.js → frontend_dist_base_path_template/_next/static/chunks/5499-b74459f6be5f9229.js} +1 -1
  185. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6043-6ea109833b88eb1d.js +1 -0
  186. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-ca4cd6a73a597a40.js +1 -0
  187. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-80d082a1d7fd1234.js +1 -0
  188. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-25f211ef377e5958.js +1 -0
  189. mage_ai/server/{frontend_dist/_next/static/chunks/8013-1d6b1f7c13264cb4.js → frontend_dist_base_path_template/_next/static/chunks/8013-e67c71ddea072a20.js} +1 -1
  190. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-941c5155c3bfcc35.js +1 -0
  191. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9161-837b653aa849a76f.js +1 -0
  192. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-5730e4e059db40a8.js +1 -0
  193. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-752d991f239a128f.js +1 -0
  194. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-a624972d126a3dbd.js → block-layout-a27a28d2a615e364.js} +1 -1
  195. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-98e27a4d7bd0da47.js +1 -0
  196. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-a95787fe1695f493.js → [...slug]-9eb5dad57da13efd.js} +1 -1
  197. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-0d55711df91a78d0.js → global-data-products-26909dec66f00231.js} +1 -1
  198. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-b9eea6abc676ca81.js +1 -0
  199. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-11c601c6ef07fe86.js +1 -0
  200. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-ae6083077c9c1c41.js +1 -0
  201. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-bfce0ee677d57206.js +1 -0
  202. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-476c921d62f565fc.js +1 -0
  203. mage_ai/server/{frontend_dist/_next/static/chunks/pages/overview-9bc34ef66d84330a.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-2ec6b17e45a52be8.js} +1 -1
  204. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-605918f3a5c1aac4.js +1 -0
  205. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-84ec3ab0770bcd68.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ee65a62ed166bd85.js} +1 -1
  206. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-2402004a19a6ad53.js +1 -0
  207. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-9a5b4768a640cd68.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-8781db69f19759a1.js} +1 -1
  208. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-d7fd4857579e2b00.js +1 -0
  209. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-bd4bd009146bab36.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-234007c99efdccf6.js} +1 -1
  210. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8405a83adeaa8ff5.js → block-runs-da7510d4b277e47b.js} +1 -1
  211. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-98aa0840a00cc661.js → block-runtime-eae853ff34b09481.js} +1 -1
  212. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-0fb48e1cc51f78b2.js → monitors-a057b17847b82468.js} +1 -1
  213. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-845c1f010d5ec380.js → [run]-99d11c86f8b15369.js} +1 -1
  214. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-9255f85760e1f57a.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-3f0980d8810a540b.js} +1 -1
  215. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-187ac359020704e1.js → settings-9edf75d03460aaeb.js} +1 -1
  216. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-c52d0c49439ec620.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-e7692e54979f037d.js} +1 -1
  217. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-7b3b57523b226a0e.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-cb6a3bcaf4fa1a81.js} +1 -1
  218. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-5eff96c149584e87.js +1 -0
  219. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipelines-efc080913a247e99.js → pipelines-270b912e1ac189b5.js} +1 -1
  220. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-2058d022972cdea4.js +1 -0
  221. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/[...slug]-1a95628ea8d0d846.js +1 -0
  222. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions-cb1cdf5f8e5bf9c5.js +1 -0
  223. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-58978256db4efbda.js +1 -0
  224. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/[...slug]-9ddd7eb842d5a911.js +1 -0
  225. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-1694c5eb1acbcf30.js +1 -0
  226. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-6850e854fbedbb61.js +1 -0
  227. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/[...slug]-5061c073e1c0de07.js +1 -0
  228. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-f551c5665bfd3494.js +1 -0
  229. mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-6fe3657070f98aca.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-e779dbab123e626e.js} +1 -1
  230. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-935113d252ada806.js +1 -0
  231. mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates-25b6d24cfa81c306.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates-7079d637e396f2a8.js} +1 -1
  232. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-67fdb4a3be93aa14.js +1 -0
  233. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9c0374c7c783b34a.js +1 -0
  234. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-ea3a0d48e5822b42.js +1 -0
  235. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  236. mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
  237. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
  238. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
  239. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  240. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
  241. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
  242. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
  243. mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
  244. mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
  245. mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
  246. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
  247. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  248. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
  249. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
  250. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  251. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
  252. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  253. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  254. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
  255. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
  256. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
  257. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
  258. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
  259. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  260. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
  261. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  262. mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
  263. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
  264. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +24 -0
  265. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +24 -0
  266. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
  267. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +24 -0
  268. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +24 -0
  269. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
  270. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +24 -0
  271. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
  272. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  273. mage_ai/server/frontend_dist_base_path_template/sign-in.html +13 -13
  274. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
  275. mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
  276. mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
  277. mage_ai/server/frontend_dist_base_path_template/test.html +4 -4
  278. mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
  279. mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
  280. mage_ai/server/server.py +37 -2
  281. mage_ai/services/aws/__init__.py +19 -8
  282. mage_ai/services/spark/config.py +5 -1
  283. mage_ai/services/spark/spark.py +5 -4
  284. mage_ai/settings/__init__.py +2 -0
  285. mage_ai/streaming/constants.py +1 -0
  286. mage_ai/streaming/sinks/google_cloud_pubsub.py +66 -0
  287. mage_ai/streaming/sinks/sink_factory.py +6 -0
  288. mage_ai/tests/api/operations/test_operations.py +8 -2
  289. mage_ai/tests/api/operations/test_pipeline_schedules.py +3 -0
  290. mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +130 -5
  291. mage_ai/tests/factory.py +2 -0
  292. mage_ai/tests/orchestration/test_pipeline_scheduler.py +20 -3
  293. mage_ai/tests/streaming/sinks/test_google_cloud_pubsub.py +28 -0
  294. mage_ai/usage_statistics/logger.py +4 -1
  295. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/METADATA +1 -1
  296. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/RECORD +302 -268
  297. mage_ai/api/policies/utils.py +0 -14
  298. mage_ai/server/frontend_dist/_next/static/cbN7L4Ms6UUPoANozEh9w/_buildManifest.js +0 -1
  299. mage_ai/server/frontend_dist/_next/static/chunks/1769-e2efd4df8d09481f.js +0 -1
  300. mage_ai/server/frontend_dist/_next/static/chunks/2327-2d8a1555605cf4af.js +0 -1
  301. mage_ai/server/frontend_dist/_next/static/chunks/2369-cb9cd97052e18d27.js +0 -1
  302. mage_ai/server/frontend_dist/_next/static/chunks/2677-aea54e655c4a727f.js +0 -1
  303. mage_ai/server/frontend_dist/_next/static/chunks/5457-994e1044953f1425.js +0 -1
  304. mage_ai/server/frontend_dist/_next/static/chunks/5597-c034402ee26af3b4.js +0 -1
  305. mage_ai/server/frontend_dist/_next/static/chunks/6333-d1f8db4e7d9656a5.js +0 -1
  306. mage_ai/server/frontend_dist/_next/static/chunks/6648-9bd31397f1d1b551.js +0 -1
  307. mage_ai/server/frontend_dist/_next/static/chunks/9161-0101571a3635a938.js +0 -1
  308. mage_ai/server/frontend_dist/_next/static/chunks/9264-7c4fcfed1200046a.js +0 -1
  309. mage_ai/server/frontend_dist/_next/static/chunks/9696-3e8ab7786f0e3a0e.js +0 -1
  310. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-976b488b8aea327f.js +0 -1
  311. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-1a6c6654bfc953ac.js +0 -1
  312. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-49004d918b04c866.js +0 -1
  313. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-97177740fbb6eb9f.js +0 -1
  314. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-5b6411c9eb8c4ba4.js +0 -1
  315. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-0a7a746cc0998608.js +0 -1
  316. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-606012a580245001.js +0 -1
  317. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-0801de3c9a2976ea.js +0 -1
  318. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0a5865d4cf012127.js +0 -1
  319. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-87b1a0601c4236cd.js +0 -1
  320. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-77ffaa2d721a0a4e.js +0 -1
  321. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-4e72d40881ac0605.js +0 -1
  322. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-8da8f8e2fdb1c99f.js +0 -1
  323. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-be029347e99fcea2.js +0 -1
  324. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-d4b07df78b3d6037.js +0 -1
  325. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-87c492e9edc6064e.js +0 -1
  326. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-2ab9f3d0c50cce81.js +0 -1
  327. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-0ba40243a030ddf4.js +0 -1
  328. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-28a3a43d65074394.js +0 -1
  329. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1769-e2efd4df8d09481f.js +0 -1
  330. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2327-2d8a1555605cf4af.js +0 -1
  331. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2369-cb9cd97052e18d27.js +0 -1
  332. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2677-aea54e655c4a727f.js +0 -1
  333. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-994e1044953f1425.js +0 -1
  334. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5597-c034402ee26af3b4.js +0 -1
  335. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-d1f8db4e7d9656a5.js +0 -1
  336. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6648-9bd31397f1d1b551.js +0 -1
  337. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9161-0101571a3635a938.js +0 -1
  338. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-7c4fcfed1200046a.js +0 -1
  339. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9696-3e8ab7786f0e3a0e.js +0 -1
  340. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-976b488b8aea327f.js +0 -1
  341. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-1a6c6654bfc953ac.js +0 -1
  342. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-49004d918b04c866.js +0 -1
  343. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-97177740fbb6eb9f.js +0 -1
  344. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-5b6411c9eb8c4ba4.js +0 -1
  345. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-0a7a746cc0998608.js +0 -1
  346. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-606012a580245001.js +0 -1
  347. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-0801de3c9a2976ea.js +0 -1
  348. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0a5865d4cf012127.js +0 -1
  349. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-87b1a0601c4236cd.js +0 -1
  350. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-77ffaa2d721a0a4e.js +0 -1
  351. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-4e72d40881ac0605.js +0 -1
  352. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-8da8f8e2fdb1c99f.js +0 -1
  353. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-be029347e99fcea2.js +0 -1
  354. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-d4b07df78b3d6037.js +0 -1
  355. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-87c492e9edc6064e.js +0 -1
  356. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-2ab9f3d0c50cce81.js +0 -1
  357. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-0ba40243a030ddf4.js +0 -1
  358. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-28a3a43d65074394.js +0 -1
  359. mage_ai/server/frontend_dist_base_path_template/_next/static/o_Yc57jh8Te2SI-VoipGQ/_buildManifest.js +0 -1
  360. /mage_ai/server/frontend_dist/_next/static/{cbN7L4Ms6UUPoANozEh9w → PBVuphyo_muEAj347ZP_b}/_ssgManifest.js +0 -0
  361. /mage_ai/server/frontend_dist_base_path_template/_next/static/{o_Yc57jh8Te2SI-VoipGQ → L-IKw5_bRZUs-wyjnpN_j}/_ssgManifest.js +0 -0
  362. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/LICENSE +0 -0
  363. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/WHEEL +0 -0
  364. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/entry_points.txt +0 -0
  365. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{55729:function(e,n,t){"use strict";t.d(n,{Z:function(){return D}});var i=t(82394),r=t(75582),o=t(82684),c=t(69864),a=t(71180),l=t(15338),u=t(97618),d=t(55485),s=t(85854),f=t(48670),h=t(65956),p=t(82359),m=t(38276),g=t(30160),b=t(17488),x=t(69650),j=t(12468),y=t(35686),v=t(38626),Z=t(44897),w=t(42631),_=t(70515),O=v.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],w.n_,_.cd*_.iI,(function(e){return"\n background-color: ".concat((e.theme.background||Z.Z.background).codeArea,";\n ")})),P=t(72473),I=t(72191),k=t(72619),N=t(70320),C=t(23780),S=t(28598);function H(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 E(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,i.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 D=function(e){var n=e.cancelButtonText,t=e.contained,v=e.header,Z=e.onCancel,w=e.onSaveSuccess,H=(0,C.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),D=(0,r.Z)(H,1)[0],z=(0,o.useState)(null),L=z[0],A=z[1],T=(0,o.useState)(!1),W=T[0],M=T[1],V=y.ZP.projects.list(),B=V.data,F=V.mutate,R=(0,o.useMemo)((function(){var e;return null===B||void 0===B||null===(e=B.projects)||void 0===e?void 0:e[0]}),[B]),U=R||{},X=U.name,Y=U.openai_api_key,Q=U.project_uuid,q=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){L||A(R)}),[R,L]);var J=(0,c.Db)(y.ZP.projects.useUpdate(X),{onSuccess:function(e){return(0,k.wD)(e,{callback:function(e){var n,t=e.project;F(),A(t),M(!1),(0,N.h)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[p.d.LOCAL_TIMEZONE]),w&&(null===w||void 0===w||w(t))},onErrorCallback:function(e,n){return D({errors:n,response:e})}})}}),G=(0,r.Z)(J,2),K=G[0],$=G[1].isLoading,ee=(0,o.useCallback)((function(e){return K({project:e})}),[K]),ne=(0,S.jsxs)(S.Fragment,{children:[v,(0,S.jsxs)(h.Z,{noPadding:!0,children:[(0,S.jsxs)(m.Z,{p:_.cd,children:[(0,S.jsx)(m.Z,{mb:1,children:(0,S.jsx)(s.Z,{level:5,children:"Project name"})}),(0,S.jsx)(g.ZP,{default:!0,monospace:!0,children:X})]}),(0,S.jsx)(l.Z,{light:!0}),(0,S.jsxs)(m.Z,{p:_.cd,children:[(0,S.jsx)(m.Z,{mb:1,children:(0,S.jsx)(s.Z,{level:5,children:"Project UUID"})}),(0,S.jsx)(g.ZP,{default:!!Q,monospace:!0,muted:!Q,children:Q||"Not required"})]}),(0,S.jsx)(l.Z,{light:!0}),(0,S.jsx)(m.Z,{p:_.cd,children:(0,S.jsxs)(d.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,S.jsxs)(u.Z,{flexDirection:"column",children:[(0,S.jsx)(m.Z,{mb:1,children:(0,S.jsx)(s.Z,{level:5,children:"Help improve Mage"})}),(0,S.jsxs)(g.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,S.jsx)(f.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,S.jsx)(m.Z,{mr:_.cd}),(0,S.jsx)(x.Z,{compact:!0,checked:null===L||void 0===L?void 0:L.help_improve_mage,onCheck:function(){return A((function(e){return E(E({},e),{},{help_improve_mage:!(null!==L&&void 0!==L&&L.help_improve_mage)})}))}})]})})]}),(0,S.jsx)(m.Z,{mt:_.HN}),(0,S.jsx)(h.Z,{noPadding:!0,overflowVisible:!0,children:(0,S.jsxs)(m.Z,{p:_.cd,children:[(0,S.jsx)(m.Z,{mb:1,children:(0,S.jsx)(s.Z,{level:5,children:"Features"})}),Object.entries((null===L||void 0===L?void 0:L.features)||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],c=t[1];return(0,S.jsx)(m.Z,{mt:0===n?0:1,children:(0,S.jsxs)(d.ZP,{alignItems:"center",children:[(0,S.jsx)(x.Z,{checked:!!c,compact:!0,onCheck:function(){return A((function(e){return E(E({},e),{},{features:E(E({},null===L||void 0===L?void 0:L.features),{},(0,i.Z)({},o,!c))})}))}}),(0,S.jsx)(m.Z,{mr:_.cd}),(0,S.jsxs)(u.Z,{children:[(0,S.jsx)(g.ZP,{default:!c,monospace:!0,children:o}),o===p.d.LOCAL_TIMEZONE&&(0,S.jsx)(m.Z,{ml:1,children:(0,S.jsx)(j.Z,{block:!0,description:"Display dates in local timezone. Please note that certain pages (e.g. Monitor page) or components (e.g. Pipeline run bar charts) may still be in UTC time. Dates in local time will have a timezone offset in the timestamp (e.g. -07:00).",lightBackground:!0,muted:!0,size:I._k})})]})]})},o)}))]})}),(0,S.jsx)(m.Z,{mt:_.HN}),(0,S.jsx)(h.Z,{noPadding:!0,children:(0,S.jsxs)(m.Z,{p:_.cd,children:[(0,S.jsx)(m.Z,{mb:1,children:(0,S.jsx)(s.Z,{level:5,children:"OpenAI"})}),Y&&!W?(0,S.jsxs)(d.ZP,E(E({},d.A0),{},{children:[(0,S.jsx)(g.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,S.jsx)(a.Z,{iconOnly:!0,onClick:function(){return M(!0)},secondary:!0,title:"Edit",children:(0,S.jsx)(P.I8,{size:I.bL})})]})):(0,S.jsx)(b.Z,{disabled:q,label:q?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return A((function(n){return E(E({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===L||void 0===L?void 0:L.openai_api_key)||""})]})}),(0,S.jsx)(m.Z,{mt:_.HN}),(0,S.jsxs)(d.ZP,{alignItems:"center",children:[(0,S.jsx)(a.Z,{loading:$,onClick:function(){ee({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})},primary:!0,children:"Save project settings"}),Z&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(m.Z,{mr:_.cd}),(0,S.jsx)(a.Z,{onClick:Z,secondary:!0,children:n||"Cancel"})]})]})]});return t?(0,S.jsx)(O,{children:ne}):ne}},70320:function(e,n,t){"use strict";t.d(n,{h:function(){return c},q:function(){return o}});var i=t(78419),r=t(53808);function o(){return(0,r.U2)(i.am,null)||!1}function c(e){return"undefined"!==typeof e&&(0,r.t8)(i.am,e),e}},46568:function(e,n,t){"use strict";var i=t(82394),r=t(26304),o=(t(82684),t(33591)),c=t(28598),a=["children","fullHeight","gutter","style"];function l(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 u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,i=e.gutter,l=e.style,d=void 0===l?{}:l,s=(0,r.Z)(e,a),f=u({},d);return i&&(f.paddingLeft=i,f.paddingRight=f.paddingLeft),t&&(f.height="100%"),(0,c.jsx)(o.Col,u(u({},s),{},{style:f,children:n}))}},82682:function(e,n,t){"use strict";var i=t(82394),r=t(26304),o=t(82684),c=t(33591),a=t(28598),l=["children","fullHeight","gutter","justifyContent","style"];function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,i=e.gutter,u=e.justifyContent,s=e.style,f=void 0===s?{}:s,h=(0,r.Z)(e,l),p=d({},f);return i&&(p.marginLeft=-1*i,p.marginRight=p.marginLeft),t&&(p.height="100%"),(0,a.jsx)(c.Row,d(d({},h),{},{justifyContent:u,style:p,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:i,key:n})}))}))}},82359:function(e,n,t){"use strict";var i,r;t.d(n,{d:function(){return i},k:function(){return r}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2",e.DATA_INTEGRATION_IN_BATCH_PIPELINE="data_integration_in_batch_pipeline",e.INTERACTIONS="interactions",e.LOCAL_TIMEZONE="display_local_timezone",e.OPERATION_HISTORY="operation_history"}(i||(i={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(r||(r={}))},65956:function(e,n,t){"use strict";var i=t(38626),r=t(55485),o=t(38276),c=t(30160),a=t(44897),l=t(42631),u=t(47041),d=t(70515),s=t(28598),f=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*d.iI,1.5*d.iI,1.5*d.iI),h=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||a.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||a.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||a.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||a.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 "})),p=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||a.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),m=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*d.iI,u.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*d.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),g=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*d.iI);n.Z=function(e){var n=e.borderless,t=e.children,i=e.containerRef,a=e.contentContainerRef,l=e.dark,u=e.footer,d=e.fullHeight,f=void 0===d||d,b=e.fullWidth,x=void 0===b||b,j=e.header,y=e.headerHeight,v=e.headerIcon,Z=e.headerPaddingVertical,w=e.headerTitle,_=e.maxHeight,O=e.maxWidth,P=e.minWidth,I=e.noPadding,k=e.overflowVisible,N=e.subtitle,C=e.success;return(0,s.jsxs)(h,{borderless:n,dark:l,fullHeight:f,fullWidth:x,maxHeight:_,maxWidth:O,minWidth:P,overflowVisible:k,ref:i,success:C,children:[(j||w)&&(0,s.jsxs)(p,{headerPaddingVertical:Z,height:y,children:[j&&j,w&&(0,s.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(r.ZP,{alignItems:"center",children:[v&&v,(0,s.jsx)(o.Z,{ml:v?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,s.jsxs)(m,{maxHeight:_,noPadding:I,overflowVisible:k,ref:a,children:[N&&(0,s.jsx)(o.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:N})}),t]}),u&&(0,s.jsx)(g,{children:u})]})}},85854:function(e,n,t){"use strict";var i,r,o,c,a,l,u,d,s=t(82394),f=t(26304),h=t(26653),p=t(38626),m=t(33591),g=t(44897),b=t(95363),x=t(61896),j=t(30160),y=t(70515),v=t(38276),Z=t(28598),w=["children","condensed","inline","level","marketing","spacingBelow"];function _(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?_(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P=(0,p.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],j.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||g.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),I=p.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||g.Z.content).active,";\n ")})),k=p.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],P,m.media.md(i||(i=(0,h.Z)(["\n ","\n "])),x.aQ),m.media.lg(r||(r=(0,h.Z)(["\n ","\n "])),x.aQ),m.media.xl(o||(o=(0,h.Z)(["\n ","\n "])),x.aQ)),N=p.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],P,x.MJ),C=p.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],P,m.media.xs(c||(c=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.sm(a||(a=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.md(l||(l=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.lg(u||(u=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.xl(d||(d=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI)),S=p.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],P,x.BL),H=p.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],P),E=p.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],P),D=p.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],P),z=p.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],P,(function(e){return 1===e.level&&"\n ".concat(x.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(x.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),L=function(e){var n,t=e.children,i=e.condensed,r=e.inline,o=e.level,c=e.marketing,a=e.spacingBelow,l=(0,f.Z)(e,w);r?n=z:0===Number(o)?n=k:1===Number(o)?n=c?C:N:2===Number(o)?n=S:3===Number(o)?n=H:4===Number(o)?n=E:5===Number(o)&&(n=D);var u=(0,Z.jsxs)(n,O(O({},l),{},{level:o,children:[a&&(0,Z.jsx)(v.Z,{mb:i?2:3,children:t}),!a&&t]}));return r?u:(0,Z.jsx)(I,{children:u})};L.defaultProps={level:3,weightStyle:6},n.Z=L},72191:function(e,n,t){"use strict";t.d(n,{_k:function(){return o},bL:function(){return r},l2:function(){return c}});var i=t(70515),r=(i.iI,2*i.iI),o=2.5*i.iI,c=3*i.iI},61316:function(e,n,t){"use strict";t.r(n);var i=t(77837),r=t(38860),o=t.n(r),c=t(46568),a=t(55729),l=t(93808),u=t(82682),d=t(28274),s=t(38276),f=t(70515),h=t(24755),p=t(28598);function m(){return(0,p.jsx)(d.Z,{uuidItemSelected:h.HY,uuidWorkspaceSelected:h.WH,children:(0,p.jsx)(s.Z,{p:f.cd,children:(0,p.jsx)(u.Z,{justifyContent:"center",children:(0,p.jsx)(c.Z,{xl:8,xxl:6,children:(0,p.jsx)(a.Z,{})})})})})}m.getInitialProps=(0,i.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,l.Z)(m)},33323:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return t(61316)}])}},function(e){e.O(0,[844,8013,600,4636,8264,3684,9774,2888,179],(function(){return n=33323,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6875],{2591:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(93808),o=u(17022),a=u(28598);function c(n){var r=n.slug;return(0,a.jsx)(o.Z,{slug:r})}c.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null===u||void 0===u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,i.Z)(c)},44981:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/roles/[...slug]",function(){return u(2591)}])}},function(n){n.O(0,[844,2083,8013,600,4636,8264,4666,5499,3684,7022,9774,2888,179],(function(){return r=44981,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2344],{53795:function(e,n,r){"use strict";r.r(n);var t=r(77837),u=r(38860),o=r.n(u),s=r(82684),i=r(34376),d=r(71180),c=r(15338),l=r(48670),a=r(63637),p=r(93808),f=r(17022),h=r(28274),v=r(38276),w=r(75499),k=r(30160),x=r(35686),_=r(70515),j=r(24755),m=r(3917),Z=r(76417),b=r(3314),g=r(28598);function C(){var e=(0,i.useRouter)(),n=(0,s.useState)(!1),r=n[0],t=n[1],u=x.ZP.roles.list().data,o=(0,s.useMemo)((function(){return(null===u||void 0===u?void 0:u.roles)||[]}),[u]),p=[{bold:!r,label:function(){return"Roles"}}];return r?(p[0].onClick=function(){return t(!1)},p.push({bold:!0,label:function(){return"New role"}})):p[0].linkProps={href:"/settings/workspace/roles"},(0,g.jsxs)(h.Z,{appendBreadcrumbs:!0,breadcrumbs:p,title:"Roles",uuidItemSelected:j.B2.ROLES,uuidWorkspaceSelected:j.Pl.USER_MANAGEMENT,children:[r&&(0,g.jsx)(f.Z,{contained:!0,onCancel:function(){return t(!1)}}),!r&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(v.Z,{p:_.cd,children:(0,g.jsx)(d.Z,{beforeIcon:(0,g.jsx)(a.Z,{}),onClick:function(){return t(!0)},primary:!0,children:"Add new role"})}),(0,g.jsx)(c.Z,{light:!0}),(0,g.jsx)(w.Z,{columnFlex:[1,1,1,null],columns:[{uuid:"Role"},{uuid:"Created by"},{uuid:"Last updated"},{rightAligned:!0,uuid:"Created at"}],onClickRow:function(n){var r,t=null===(r=o[n])||void 0===r?void 0:r.id;e.push("/settings/workspace/roles/".concat(t))},rows:null===o||void 0===o?void 0:o.map((function(n){var r=n.created_at,t=(n.id,n.name),u=n.updated_at,o=n.user;return[(0,g.jsx)(k.ZP,{children:t},"name"),o?(0,g.jsx)(l.Z,{default:!0,onClick:function(n){(0,b.j)(n),e.push("/settings/workspace/users/".concat(null===o||void 0===o?void 0:o.id))},children:(0,Z.s)(o)}):(0,g.jsx)("div",{},"user"),(0,g.jsx)(k.ZP,{monospace:!0,default:!0,children:u&&(0,m.d$)(u)},"updatedAt"),(0,g.jsx)(k.ZP,{monospace:!0,default:!0,rightAligned:!0,children:r&&(0,m.d$)(r)},"createdAt")]})),uuid:"roles"})]})]})}C.getInitialProps=(0,t.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,p.Z)(C)},8619:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/roles",function(){return r(53795)}])}},function(e){e.O(0,[844,2083,8013,600,4636,8264,4666,5499,3684,7022,9774,2888,179],(function(){return n=8619,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2403],{85854:function(e,n,t){"use strict";var i,r,o,l,s,c,a,u,d=t(82394),h=t(26304),p=t(26653),m=t(38626),f=t(33591),y=t(44897),b=t(95363),g=t(61896),x=t(30160),j=t(70515),v=t(38276),_=t(28598),Z=["children","condensed","inline","level","marketing","spacingBelow"];function w(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function S(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var O=(0,m.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],x.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||y.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),k=m.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||y.Z.content).active,";\n ")})),P=m.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],O,f.media.md(i||(i=(0,p.Z)(["\n ","\n "])),g.aQ),f.media.lg(r||(r=(0,p.Z)(["\n ","\n "])),g.aQ),f.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),g.aQ)),C=m.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],O,g.MJ),I=m.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],O,f.media.xs(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),f.media.sm(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),f.media.md(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),f.media.lg(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),f.media.xl(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI)),N=m.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],O,g.BL),H=m.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],O),T=m.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],O),M=m.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],O),z=m.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],O,(function(e){return 1===e.level&&"\n ".concat(g.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(g.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),q=function(e){var n,t=e.children,i=e.condensed,r=e.inline,o=e.level,l=e.marketing,s=e.spacingBelow,c=(0,h.Z)(e,Z);r?n=z:0===Number(o)?n=P:1===Number(o)?n=l?I:C:2===Number(o)?n=N:3===Number(o)?n=H:4===Number(o)?n=T:5===Number(o)&&(n=M);var a=(0,_.jsxs)(n,S(S({},c),{},{level:o,children:[s&&(0,_.jsx)(v.Z,{mb:i?2:3,children:t}),!s&&t]}));return r?a:(0,_.jsx)(k,{children:a})};q.defaultProps={level:3,weightStyle:6},n.Z=q},60480:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return D}});var i,r=t(77837),o=t(82394),l=t(75582),s=t(38860),c=t.n(s),a=t(82684),u=t(12691),d=t.n(u),h=t(21764),p=t(69864),m=t(71180),f=t(70652),y=t(55485),b=t(85854),g=t(48670),x=t(93808),j=t(44085),v=t(28274),_=t(38276);!function(e){e.SSH="ssh",e.HTTPS="https"}(i||(i={}));var Z=[{autoComplete:"remote_repo_link",label:"Remote repo url",required:!0,uuid:"remote_repo_link"},{autoComplete:"repo_path",label:"Local directory path",labelDescription:"Defaults to Python's os.getcwd() if omitted. Mage will create this local directory if it doesn't already exist.",uuid:"repo_path"}],w=[{autoComplete:"username",label:"Username",uuid:"username"},{autoComplete:"email",label:"Email",uuid:"email"},{autoComplete:"ssh_public_key",label:"SSH public key in base64",type:"password",uuid:"ssh_public_key"},{autoComplete:"ssh_private_key",label:"SSH private key in base64",type:"password",uuid:"ssh_private_key"}],S=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",label:"Email",required:!0,uuid:"email"},{autoComplete:"access_token",label:"Access token",labelDescription:"Add your Git access token to authenticate with your provided username. The access token will be stored as a Mage secret.",required:!0,type:"password",uuid:"access_token"}],O=[{autoComplete:"branch",label:"Branch name",required:!0,uuid:"branch"}],k=t(30160),P=t(17488),C=t(35686),I=t(70515),N=t(24755),H=t(72619),T=t(28598);function M(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?M(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):M(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function q(){var e=C.ZP.syncs.list().data,n=(0,a.useState)(null),t=n[0],r=n[1],s=(0,a.useState)(null),c=s[0],u=s[1],x=(0,a.useState)(null),M=x[0],q=x[1],D=(0,a.useState)(null),A=D[0],E=D[1];(0,a.useEffect)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];u(null===t||void 0===t?void 0:t.user_git_settings),r(t),E(!(null===t||void 0===t||!t.branch))}}),[e]);var G=(0,a.useMemo)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];return!(null===t||void 0===t||!t.branch)}return!1}),[e]),B=(0,p.Db)(C.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){var n=e.sync;n&&(r(n),window.location.reload(),h.Am.success("Sync saved",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"}))},onErrorCallback:function(e){var n=e.error.exception;return q(n)}})}}),R=(0,l.Z)(B,2),F=R[0],L=R[1].isLoading,U=(0,p.Db)(C.ZP.syncs.useUpdate("git"),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){e.sync&&h.Am.success("Success!",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"})},onErrorCallback:function(e){var n=e.error.exception;return q(n)}})}}),W=(0,l.Z)(U,2),X=W[0],Q=W[1].isLoading,J=(0,a.useMemo)((function(){return(null===t||void 0===t?void 0:t.auth_type)||i.SSH}),[null===t||void 0===t?void 0:t.auth_type]),Y=(0,a.useMemo)((function(){return J===i.HTTPS?S:w}),[J]),K=C.ZP.statuses.list().data,V=(0,a.useMemo)((function(){var e,n;return null===K||void 0===K||null===(e=K.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.require_user_authentication}),[K]),$=(0,a.useMemo)((function(){var e=r,n=t;return!A&&V&&(e=u,n=c),(0,T.jsx)("form",{children:Y.map((function(t){var i,r,l=t.autoComplete,s=t.disabled,c=t.label,a=t.labelDescription,u=t.required,d=t.type,p=t.uuid;return r="ssh_public_key"===p?(0,T.jsx)(_.Z,{mb:1,children:(0,T.jsxs)(k.ZP,{small:!0,children:["Run ",(0,T.jsx)(g.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n | echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n | echo"})," in terminal to get base64 encoded public key and paste the result here. The key will be stored as a Mage secret."]})}):"ssh_private_key"===p?(0,T.jsx)(_.Z,{mb:1,children:(0,T.jsxs)(k.ZP,{small:!0,children:["Follow same steps as the public key, but run ",(0,T.jsx)(g.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"})," instead. The key will be stored as a Mage secret."]})}):a&&(0,T.jsx)(_.Z,{mb:1,children:(0,T.jsx)(k.ZP,{small:!0,children:a})}),(0,T.jsxs)(_.Z,{mt:2,children:[r,(0,T.jsx)(P.Z,{autoComplete:l,disabled:s,label:c,onChange:function(n){e((function(e){return z(z({},e),{},(0,o.Z)({},p,n.target.value))}))},primary:!0,required:u,setContentOnMount:!0,type:d,value:(null===(i=n)||void 0===i?void 0:i[p])||""})]},p)}))})}),[Y,V,u,r,A,t,c]);return(0,T.jsx)(v.Z,{uuidItemSelected:N.fF,uuidWorkspaceSelected:N.WH,children:(0,T.jsxs)(_.Z,{p:I.cd,style:{width:"600px"},children:[(0,T.jsx)(b.Z,{children:"Git repository settings"}),(0,T.jsxs)(k.ZP,{children:["If you are using Github and want to use a more feature rich integration, you can check out the ",(0,T.jsx)(d(),{as:"/version-control",href:"/version-control",children:(0,T.jsx)(g.Z,{inline:!0,children:"version control app"})}),"."]}),(0,T.jsx)(g.Z,{}),(0,T.jsx)(_.Z,{mt:1,children:(0,T.jsx)(k.ZP,{bold:!0,children:"Authentication type"})}),(0,T.jsx)(_.Z,{mt:1,children:(0,T.jsx)(j.Z,{compact:!0,label:"Authentication type",onChange:function(e){var n=e.target.value;r((function(e){return z(z({},e),{},{auth_type:n})}))},value:J,children:Object.entries(i).map((function(e){var n=(0,l.Z)(e,2),t=n[0],i=n[1];return(0,T.jsx)("option",{value:i,children:t},i)}))})}),(0,T.jsx)(_.Z,{mt:I.Mq,children:J===i.SSH&&(0,T.jsxs)(k.ZP,{bold:!0,children:["You will need to ",(0,T.jsx)(g.Z,{href:"https://docs.mage.ai/development/git/generate-an-ssh-token",openNewWindow:!0,children:"set up your SSH key"})," if you have not done so already."]})}),(0,T.jsx)("form",{children:Z.map((function(e){var n=e.autoComplete,i=e.disabled,l=e.label,s=e.labelDescription,c=e.required,a=e.type,u=e.uuid;return(0,T.jsxs)(_.Z,{mt:2,children:[s&&(0,T.jsx)(_.Z,{mb:1,children:(0,T.jsx)(k.ZP,{small:!0,children:s})}),(0,T.jsx)(P.Z,{autoComplete:n,disabled:i,label:l,onChange:function(e){r((function(n){return z(z({},n),{},(0,o.Z)({},u,e.target.value))}))},primary:!0,required:c,setContentOnMount:!0,type:a,value:(null===t||void 0===t?void 0:t[u])||""})]},u)}))}),(0,T.jsx)(_.Z,{mt:I.Mq,children:(0,T.jsxs)(y.ZP,{alignItems:"center",children:[(0,T.jsx)(_.Z,{mr:1,children:(0,T.jsx)(f.Z,{checked:!!A,onClick:function(){return E((function(e){var n=!e;return n||r((function(e){return z(z({},e),{},{branch:null,sync_on_pipeline_run:!1,sync_on_start:!1})})),n}))}})}),(0,T.jsxs)(k.ZP,{bold:!0,children:["Use ",(0,T.jsx)(g.Z,{bold:!0,href:"https://docs.mage.ai/production/data-sync/git-sync",openNewWindow:!0,children:"One-way git sync"})," (Click link for more info)"]})]})}),A?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(_.Z,{mt:I.Mq,children:(0,T.jsx)(k.ZP,{bold:!0,children:"Sync with a specified branch. These settings will be saved at the project level."})}),(0,T.jsx)("form",{children:O.map((function(e){var n=e.autoComplete,i=e.disabled,l=e.label,s=e.required,c=e.type,a=e.uuid;return(0,T.jsx)(_.Z,{mt:2,children:(0,T.jsx)(P.Z,{autoComplete:n,disabled:i,label:l,onChange:function(e){r((function(n){return z(z({},n),{},(0,o.Z)({},a,e.target.value))}))},primary:!0,required:s,setContentOnMount:!0,type:c,value:(null===t||void 0===t?void 0:t[a])||""})},a)}))}),(0,T.jsx)(y.ZP,{alignItems:"center",children:(0,T.jsx)(_.Z,{mt:2,children:(0,T.jsx)(f.Z,{checked:null===t||void 0===t?void 0:t.sync_submodules,label:"Include submodules",onClick:function(){r((function(e){return z(z({},e),{},{sync_submodules:!(null!==t&&void 0!==t&&t.sync_submodules)})}))}})})}),(0,T.jsx)(_.Z,{mt:2,children:(0,T.jsx)(b.Z,{level:5,children:"Additional sync settings"})}),(0,T.jsx)(y.ZP,{alignItems:"center",children:(0,T.jsx)(_.Z,{mt:2,children:(0,T.jsx)(f.Z,{checked:null===t||void 0===t?void 0:t.sync_on_pipeline_run,label:"Sync before each trigger run",onClick:function(){r((function(e){return z(z({},e),{},{sync_on_pipeline_run:!(null!==t&&void 0!==t&&t.sync_on_pipeline_run)})}))}})})}),(0,T.jsx)(y.ZP,{alignItems:"center",children:(0,T.jsx)(_.Z,{mt:2,children:(0,T.jsx)(f.Z,{checked:null===t||void 0===t?void 0:t.sync_on_start,label:"Sync on server start up",onClick:function(){r((function(e){return z(z({},e),{},{sync_on_start:!(null!==t&&void 0!==t&&t.sync_on_start)})}))}})})}),(0,T.jsx)(_.Z,{mt:I.Mq,children:(0,T.jsx)(k.ZP,{bold:!0,children:"Configure the Git authentication credentials that will be used to sync with the specified Git repository."})}),$]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(_.Z,{mt:I.Mq,children:(0,T.jsx)(k.ZP,{bold:!0,children:"These fields are required to help Mage configure your Git settings. These settings will be specific to your user."})}),$]}),(0,T.jsx)(_.Z,{mt:2,children:(0,T.jsx)(m.Z,{loading:L,onClick:function(){return F({sync:z(z({},t),{},{user_git_settings:c})})},primary:!0,children:"Save repository settings"})}),M&&(0,T.jsx)(_.Z,{mt:1,children:(0,T.jsx)(k.ZP,{danger:!0,children:M})}),G&&(0,T.jsxs)(_.Z,{mt:I.HN,children:[(0,T.jsx)(b.Z,{children:"Synchronize code from remote repository"}),(0,T.jsxs)(_.Z,{mt:1,children:[(0,T.jsxs)(k.ZP,{children:["Running the sync from this page will run a one time sync with the remote repository.",(0,T.jsx)("br",{}),"This may ",(0,T.jsx)(k.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," your existing data, so make sure you\u2019ve committed or backed up your current changes."]}),(0,T.jsx)(_.Z,{mt:2}),(0,T.jsxs)(k.ZP,{children:["Reset will tell Mage to try to clone your repository from remote. This will also ",(0,T.jsx)(k.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," all your local changes and reset any settings you may have configured for your local Git repo. This may be helpful if you are having issues syncing your repository."]})]}),(0,T.jsx)(_.Z,{mt:2,children:(0,T.jsxs)(y.ZP,{children:[(0,T.jsx)(m.Z,{loading:Q,onClick:function(){return X({sync:{action_type:"sync_data"}})},warning:!0,children:"Synchronize code"}),(0,T.jsx)(_.Z,{ml:2}),(0,T.jsx)(m.Z,{danger:!0,loading:Q,onClick:function(){return X({sync:{action_type:"reset"}})},children:"Reset repository"})]})})]})]})})}q.getInitialProps=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var D=(0,x.Z)(q)},37056:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/sync-data",function(){return t(60480)}])}},function(e){e.O(0,[844,8013,600,4636,8264,3684,9774,2888,179],(function(){return n=37056,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8011],{49597:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(93808),a=u(37361),c=u(28598);function o(n){var r=n.slug;return(0,c.jsx)(a.Z,{slug:r})}o.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null===u||void 0===u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,i.Z)(o)},23292:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/users/[...slug]",function(){return u(49597)}])}},function(n){n.O(0,[844,2083,8013,600,4636,8264,4666,5499,3684,7361,9774,2888,179],(function(){return r=23292,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2287],{87992:function(e,n,r){"use strict";r.r(n);var u=r(77837),s=r(38860),t=r.n(s),i=r(82684),a=r(34376),l=r(71180),d=r(15338),c=r(93808),o=r(28274),f=r(38276),p=r(75499),m=r(30160),h=r(37361),_=r(35686),v=r(72473),w=r(70515),x=r(24755),Z=r(3917),j=r(50178),P=r(28598);function k(){var e=(0,a.useRouter)(),n=(0,i.useState)(!1),r=n[0],u=n[1],s=(0,j.PR)()||{},t=(s.id,s.owner),c=_.ZP.users.list({},{revalidateOnFocus:!1}).data,k=(0,i.useMemo)((function(){return(null===c||void 0===c?void 0:c.users)||[]}),[null===c||void 0===c?void 0:c.users]),b=[{bold:!r,label:function(){return"Users"}}];return r?(b[0].onClick=function(){return u(!1)},b.push({bold:!0,label:function(){return"New user"}})):b[0].linkProps={href:"/settings/workspace/users"},(0,P.jsxs)(o.Z,{appendBreadcrumbs:!0,breadcrumbs:b,title:"Users",uuidItemSelected:x.B2.USERS,uuidWorkspaceSelected:x.Pl.USER_MANAGEMENT,children:[r&&(0,P.jsx)(h.Z,{contained:!0,onCancel:function(){return u(!1)}}),!r&&(0,P.jsxs)(P.Fragment,{children:[t&&(0,P.jsx)(f.Z,{p:w.cd,children:(0,P.jsx)(l.Z,{beforeIcon:(0,P.jsx)(v.DN,{}),onClick:function(){return u(!0)},primary:!0,children:"Add new user"})}),(0,P.jsx)(d.Z,{light:!0}),(0,P.jsx)(p.Z,{columnFlex:[null,1,1,1,1,null,null],columns:[{label:function(){return""},uuid:"avatar"},{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"},{uuid:"Email"},{uuid:"Role"},{rightAligned:!0,uuid:"Created"}],onClickRow:function(n){var r,u=null===(r=k[n])||void 0===r?void 0:r.id;e.push("/settings/workspace/users/".concat(u))},rows:k.map((function(e){var n=e.avatar,r=e.created_at,u=e.email,s=e.first_name,t=(e.id,e.last_name),i=e.roles_display,a=e.roles_new,l=e.username,d=a||[];return d.sort((function(e,n){return e.id-n.id})),[(0,P.jsx)(m.ZP,{large:!0,rightAligned:!0,children:n},"avatar"),(0,P.jsx)(m.ZP,{children:l||"-"},"username"),(0,P.jsx)(m.ZP,{default:!0,children:s||"-"},"firstName"),(0,P.jsx)(m.ZP,{default:!0,children:t||"-"},"lastName"),(0,P.jsx)(m.ZP,{default:!0,children:u},"email"),(0,P.jsx)(m.ZP,{default:!0,children:d.length>0?d[0].name:i},"roles"),(0,P.jsx)(m.ZP,{monospace:!0,default:!0,children:r&&(0,Z.d$)(r)},"created")]})),uuid:"pipeline-runs"})]})]})}k.getInitialProps=(0,u.Z)(t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,c.Z)(k)},48673:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/users",function(){return r(87992)}])}},function(e){e.O(0,[844,2083,8013,600,4636,8264,4666,5499,3684,7361,9774,2888,179],(function(){return n=48673,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1312],{46568:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(33591)),c=t(28598),l=["children","fullHeight","gutter","style"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,a=e.style,s=void 0===a?{}:a,f=(0,i.Z)(e,l),d=u({},s);return r&&(d.paddingLeft=r,d.paddingRight=d.paddingLeft),t&&(d.height="100%"),(0,c.jsx)(o.Col,u(u({},f),{},{style:d,children:n}))}},82682:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(33591),l=t(28598),a=["children","fullHeight","gutter","justifyContent","style"];function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,u=e.justifyContent,f=e.style,d=void 0===f?{}:f,p=(0,i.Z)(e,a),h=s({},d);return r&&(h.marginLeft=-1*r,h.marginRight=h.marginLeft),t&&(h.height="100%"),(0,l.jsx)(c.Row,s(s({},p),{},{justifyContent:u,style:h,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:r,key:n})}))}))}},26314:function(e,n,t){"use strict";var r;t.d(n,{G:function(){return r}}),function(e){e.ACTIVE_DIRECTORY="active_directory",e.GITHUB="github"}(r||(r={}))},85854:function(e,n,t){"use strict";var r,i,o,c,l,a,u,s,f=t(82394),d=t(26304),p=t(26653),h=t(38626),g=t(33591),m=t(44897),y=t(95363),b=t(61896),j=t(30160),O=t(70515),w=t(38276),x=t(28598),v=["children","condensed","inline","level","marketing","spacingBelow"];function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(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,f.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],j.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||m.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(y.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(y.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(y.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),C=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||m.Z.content).active,";\n ")})),S=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,g.media.md(r||(r=(0,p.Z)(["\n ","\n "])),b.aQ),g.media.lg(i||(i=(0,p.Z)(["\n ","\n "])),b.aQ),g.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),b.aQ)),k=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,b.MJ),I=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,g.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.sm(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.md(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.lg(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.xl(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI)),N=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,b.BL),z=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),H=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),D=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),E=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(b.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(b.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),M=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,l=e.spacingBelow,a=(0,d.Z)(e,v);i?n=E:0===Number(o)?n=S:1===Number(o)?n=c?I:k:2===Number(o)?n=N:3===Number(o)?n=z:4===Number(o)?n=H:5===Number(o)&&(n=D);var u=(0,x.jsxs)(n,Z(Z({},a),{},{level:o,children:[l&&(0,x.jsx)(w.Z,{mb:r?2:3,children:t}),!l&&t]}));return i?u:(0,x.jsx)(C,{children:u})};M.defaultProps={level:3,weightStyle:6},n.Z=M},23968:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return $}});var r=t(77837),i=t(38860),o=t.n(i),c=t(82394),l=t(70613),a=t(59696),u=t(33591),s=t(38276),f=t(70515),d=t(28598);var p=function(e){var n=e.children,t=e.width,r=void 0===t?12:t;return(0,d.jsx)(s.Z,{px:f.zC,children:(0,d.jsx)(u.Row,{children:(0,d.jsx)(u.Col,{lg:r,md:Math.min(12,Math.round(1.5*(12-r))),sm:Math.min(12,Math.round(1.75*(12-r))),xs:12,children:n})})})},h=t(38626),g=t(46684),m=h.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-jcgu5l-0"})(["padding-top:","px;",""],g.Mz,(function(e){return e.fullHeight&&"\n height: calc(100vh);\n "}));function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j=function(e){var n=e.children,t=e.headerProps,r=e.title;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.Z,{title:r}),(0,d.jsx)(a.Z,b({},t)),(0,d.jsx)(p,{children:(0,d.jsx)(m,{fullHeight:!0,children:n})})]})},O=t(75582),w=t(82684),x=t(69864),v=t(34376),P=t(40761),Z=t(55485),_=t(85854),C=t(93369),S=t(30160),k=t(17488),I=t(35686),N=t(44897),z=t(42631),H=h.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-641xul-0"})(["border-radius:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],z.TR,21*f.iI,f.Vj,f.Vj,f.Vj,(function(e){return"\n background-color: ".concat((e.theme.background||N.Z.background).panel,";\n ")})),D=h.default.div.withConfig({displayName:"indexstyle__BackgroundImageStyle",componentId:"sc-641xul-1"})(["border-radius:","px;font-size:0;overflow:hidden;",""],z.D7,(function(e){return e.src&&"\n background-image: url(".concat(e.src,");\n background-size: cover;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n ")})),E=t(46568),M=t(82682),R=E.Z,L=M.Z,T=t(39643),V=t(42122),F=t(72619),B=t(42041),G=t(69419),U=t(50178),X=t(72473),A=t(26314);function Q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var J="email",W="password";var q=function(e){var n=e.title,t=(0,v.useRouter)(),r=(0,w.useState)(null),i=r[0],o=r[1],l=(0,w.useState)({}),a=l[0],u=l[1],p=(0,x.Db)(I.ZP.sessions.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.session,r=n.token,i=n.user;(0,U.av)(i),P.Z.storeToken(r,(function(){var e="/",n=(0,G.iV)(window.location.href);if(n.redirect_url){var r=(0,G.uM)((0,V.gR)(n,["redirect_url","access_token","provider"]));e="".concat(n.redirect_url,"?").concat(r),window.location.href=e}else t.push(e)}))},onErrorCallback:function(e){var n=e.error;o(n)}})}}),h=(0,O.Z)(p,2),g=h[0],m=h[1].isLoading,y=(0,w.useCallback)((function(e){return P.Z.logout((function(){return g(e)}))}),[g]),b=I.ZP.oauths.detail(A.G.ACTIVE_DIRECTORY,{redirect_uri:encodeURIComponent(window.location.href)}).data,j=(0,w.useMemo)((function(){var e;return null===b||void 0===b||null===(e=b.oauth)||void 0===e?void 0:e.url}),[b]),N=(0,G.iV)()||{},z=N.access_token,E=N.provider;return(0,w.useEffect)((function(){var e;z&&E&&g({session:(e={},(0,c.Z)(e,"provider",E),(0,c.Z)(e,"token",z),e)})}),[z,g,E]),(0,d.jsxs)(L,{fullHeight:!0,children:[(0,d.jsx)(R,{lg:6,md:12,children:(0,d.jsx)(Z.ZP,{flexDirection:"column",fullHeight:!0,fullWidth:!0,justifyContent:"center",children:(0,d.jsx)(s.Z,{px:{xl:5*f.zC,xs:f.zC},py:f.zC,children:(0,d.jsxs)(H,{children:[(0,d.jsx)(_.Z,{yellow:!0,children:n}),(0,d.jsxs)("form",{children:[(0,d.jsxs)(s.Z,{mt:3,children:[(0,d.jsx)(k.Z,{autoComplete:"username",label:"Email",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return u((function(n){return Y(Y({},n),{},(0,c.Z)({},J,e.target.value))}))},primary:!i,value:a.email}),(0,d.jsx)(s.Z,{mt:2,children:(0,d.jsx)(k.Z,{autoComplete:"current-password",label:"Password",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return u((function(n){return Y(Y({},n),{},(0,c.Z)({},W,e.target.value))}))},primary:!i,type:"password",value:a.password})})]}),i&&(0,d.jsx)(s.Z,{mt:2,children:(0,d.jsx)(S.ZP,{danger:!0,children:i.message})}),(0,d.jsx)(s.Z,{mt:3,children:(0,d.jsx)(C.ZP,{bold:!0,inline:!0,keyTextGroups:[[T.Lz]],keyboardShortcutValidation:function(e){var n=e.keyMapping;return(0,B.y)([T.Uq],n)},large:!0,loading:m,noHoverUnderline:!0,onClick:function(){return y({session:a})},selected:!0,uuid:"SignForm/action",wind:!0,children:"Sign into Mage"})}),j&&(0,d.jsx)(s.Z,{mt:4,children:(0,d.jsx)(C.ZP,{beforeElement:(0,d.jsx)(X.Dg,{size:2*f.iI}),bold:!0,inline:!0,onClick:function(){return P.Z.logout((function(){return t.push(j)}))},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})]})]})})})}),(0,d.jsx)(R,{hiddenLgDown:!0,lg:6,style:{flex:1},children:(0,d.jsx)(s.Z,{fullHeight:!0,fullWidth:!0,px:f.zC,py:f.zC+8,children:(0,d.jsx)(D,{src:"".concat(t.basePath,"/images/sessions/abstract.png"),children:"Sign in abstract image"})})})]})};function K(){return(0,d.jsx)(j,{title:"Sign in",children:(0,d.jsx)(q,{title:"\ud83d\udc4b Sign in"})})}K.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var $=K},6821:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sign-in",function(){return t(23968)}])}},function(e){e.O(0,[844,8013,600,9696,9774,2888,179],(function(){return n=6821,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1312],{46568:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(33591)),c=t(28598),l=["children","fullHeight","gutter","style"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,a=e.style,s=void 0===a?{}:a,f=(0,i.Z)(e,l),d=u({},s);return r&&(d.paddingLeft=r,d.paddingRight=d.paddingLeft),t&&(d.height="100%"),(0,c.jsx)(o.Col,u(u({},f),{},{style:d,children:n}))}},82682:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(33591),l=t(28598),a=["children","fullHeight","gutter","justifyContent","style"];function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,u=e.justifyContent,f=e.style,d=void 0===f?{}:f,p=(0,i.Z)(e,a),h=s({},d);return r&&(h.marginLeft=-1*r,h.marginRight=h.marginLeft),t&&(h.height="100%"),(0,l.jsx)(c.Row,s(s({},p),{},{justifyContent:u,style:h,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:r,key:n})}))}))}},26314:function(e,n,t){"use strict";var r;t.d(n,{G:function(){return r}}),function(e){e.ACTIVE_DIRECTORY="active_directory",e.GITHUB="github"}(r||(r={}))},85854:function(e,n,t){"use strict";var r,i,o,c,l,a,u,s,f=t(82394),d=t(26304),p=t(26653),h=t(38626),g=t(33591),m=t(44897),y=t(95363),b=t(61896),j=t(30160),O=t(70515),w=t(38276),x=t(28598),v=["children","condensed","inline","level","marketing","spacingBelow"];function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(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,f.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],j.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||m.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(y.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(y.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(y.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),C=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||m.Z.content).active,";\n ")})),S=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,g.media.md(r||(r=(0,p.Z)(["\n ","\n "])),b.aQ),g.media.lg(i||(i=(0,p.Z)(["\n ","\n "])),b.aQ),g.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),b.aQ)),k=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,b.MJ),I=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,g.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.sm(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.md(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.lg(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.xl(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI)),N=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,b.BL),z=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),H=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),D=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),E=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(b.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(b.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),M=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,l=e.spacingBelow,a=(0,d.Z)(e,v);i?n=E:0===Number(o)?n=S:1===Number(o)?n=c?I:k:2===Number(o)?n=N:3===Number(o)?n=z:4===Number(o)?n=H:5===Number(o)&&(n=D);var u=(0,x.jsxs)(n,Z(Z({},a),{},{level:o,children:[l&&(0,x.jsx)(w.Z,{mb:r?2:3,children:t}),!l&&t]}));return i?u:(0,x.jsx)(C,{children:u})};M.defaultProps={level:3,weightStyle:6},n.Z=M},23968:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return $}});var r=t(77837),i=t(38860),o=t.n(i),c=t(82394),l=t(70613),a=t(94636),u=t(33591),s=t(38276),f=t(70515),d=t(28598);var p=function(e){var n=e.children,t=e.width,r=void 0===t?12:t;return(0,d.jsx)(s.Z,{px:f.zC,children:(0,d.jsx)(u.Row,{children:(0,d.jsx)(u.Col,{lg:r,md:Math.min(12,Math.round(1.5*(12-r))),sm:Math.min(12,Math.round(1.75*(12-r))),xs:12,children:n})})})},h=t(38626),g=t(46684),m=h.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-jcgu5l-0"})(["padding-top:","px;",""],g.Mz,(function(e){return e.fullHeight&&"\n height: calc(100vh);\n "}));function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j=function(e){var n=e.children,t=e.headerProps,r=e.title;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.Z,{title:r}),(0,d.jsx)(a.Z,b({},t)),(0,d.jsx)(p,{children:(0,d.jsx)(m,{fullHeight:!0,children:n})})]})},O=t(75582),w=t(82684),x=t(69864),v=t(34376),P=t(40761),Z=t(55485),_=t(85854),C=t(93369),S=t(30160),k=t(17488),I=t(35686),N=t(44897),z=t(42631),H=h.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-641xul-0"})(["border-radius:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],z.TR,21*f.iI,f.Vj,f.Vj,f.Vj,(function(e){return"\n background-color: ".concat((e.theme.background||N.Z.background).panel,";\n ")})),D=h.default.div.withConfig({displayName:"indexstyle__BackgroundImageStyle",componentId:"sc-641xul-1"})(["border-radius:","px;font-size:0;overflow:hidden;",""],z.D7,(function(e){return e.src&&"\n background-image: url(".concat(e.src,");\n background-size: cover;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n ")})),E=t(46568),M=t(82682),R=E.Z,L=M.Z,T=t(39643),V=t(42122),F=t(72619),B=t(42041),G=t(69419),U=t(50178),X=t(72473),A=t(26314);function Q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var J="email",W="password";var q=function(e){var n=e.title,t=(0,v.useRouter)(),r=(0,w.useState)(null),i=r[0],o=r[1],l=(0,w.useState)({}),a=l[0],u=l[1],p=(0,x.Db)(I.ZP.sessions.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.session,r=n.token,i=n.user;(0,U.av)(i),P.Z.storeToken(r,(function(){var e="/",n=(0,G.iV)(window.location.href);if(n.redirect_url){var r=(0,G.uM)((0,V.gR)(n,["redirect_url","access_token","provider"]));e="".concat(n.redirect_url,"?").concat(r),window.location.href=e}else t.push(e)}))},onErrorCallback:function(e){var n=e.error;o(n)}})}}),h=(0,O.Z)(p,2),g=h[0],m=h[1].isLoading,y=(0,w.useCallback)((function(e){return P.Z.logout((function(){return g(e)}))}),[g]),b=I.ZP.oauths.detail(A.G.ACTIVE_DIRECTORY,{redirect_uri:encodeURIComponent(window.location.href)}).data,j=(0,w.useMemo)((function(){var e;return null===b||void 0===b||null===(e=b.oauth)||void 0===e?void 0:e.url}),[b]),N=(0,G.iV)()||{},z=N.access_token,E=N.provider;return(0,w.useEffect)((function(){var e;z&&E&&g({session:(e={},(0,c.Z)(e,"provider",E),(0,c.Z)(e,"token",z),e)})}),[z,g,E]),(0,d.jsxs)(L,{fullHeight:!0,children:[(0,d.jsx)(R,{lg:6,md:12,children:(0,d.jsx)(Z.ZP,{flexDirection:"column",fullHeight:!0,fullWidth:!0,justifyContent:"center",children:(0,d.jsx)(s.Z,{px:{xl:5*f.zC,xs:f.zC},py:f.zC,children:(0,d.jsxs)(H,{children:[(0,d.jsx)(_.Z,{yellow:!0,children:n}),(0,d.jsxs)("form",{children:[(0,d.jsxs)(s.Z,{mt:3,children:[(0,d.jsx)(k.Z,{autoComplete:"username",label:"Email",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return u((function(n){return Y(Y({},n),{},(0,c.Z)({},J,e.target.value))}))},primary:!i,value:a.email}),(0,d.jsx)(s.Z,{mt:2,children:(0,d.jsx)(k.Z,{autoComplete:"current-password",label:"Password",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return u((function(n){return Y(Y({},n),{},(0,c.Z)({},W,e.target.value))}))},primary:!i,type:"password",value:a.password})})]}),i&&(0,d.jsx)(s.Z,{mt:2,children:(0,d.jsx)(S.ZP,{danger:!0,children:i.message})}),(0,d.jsx)(s.Z,{mt:3,children:(0,d.jsx)(C.ZP,{bold:!0,inline:!0,keyTextGroups:[[T.Lz]],keyboardShortcutValidation:function(e){var n=e.keyMapping;return(0,B.y)([T.Uq],n)},large:!0,loading:m,noHoverUnderline:!0,onClick:function(){return y({session:a})},selected:!0,uuid:"SignForm/action",wind:!0,children:"Sign into Mage"})}),j&&(0,d.jsx)(s.Z,{mt:4,children:(0,d.jsx)(C.ZP,{beforeElement:(0,d.jsx)(X.Dg,{size:2*f.iI}),bold:!0,inline:!0,onClick:function(){return P.Z.logout((function(){return t.push(j)}))},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})]})]})})})}),(0,d.jsx)(R,{hiddenLgDown:!0,lg:6,style:{flex:1},children:(0,d.jsx)(s.Z,{fullHeight:!0,fullWidth:!0,px:f.zC,py:f.zC+8,children:(0,d.jsx)(D,{src:"".concat(t.basePath,"/images/sessions/abstract.png"),children:"Sign in abstract image"})})})]})};function K(){return(0,d.jsx)(j,{title:"Sign in",children:(0,d.jsx)(q,{title:"\ud83d\udc4b Sign in"})})}K.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var $=K},6821:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sign-in",function(){return t(23968)}])}},function(e){e.O(0,[844,8013,600,4636,9774,2888,179],(function(){return n=6821,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6568],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return P}});var n=r(82394),i=r(21831),o=r(82684),u=r(50724),s=r(82555),d=r(97618),l=r(70613),a=r(94636),c=r(68899),f=r(28598);function h(e,t){var r=e.children,n=e.noPadding;return(0,f.jsx)(c.HS,{noPadding:n,ref:t,children:r})}var p=o.forwardRef(h),v=r(62547),b=r(82571),m=r(35686),j=r(98464),O=r(46684),g=r(70515),w=r(53808),_=r(19183);function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function y(e,t){var r,n=e.addProjectBreadcrumbToCustomBreadcrumbs,h=e.after,x=e.afterHeader,y=e.afterHidden,P=e.afterWidth,C=e.afterWidthOverride,k=e.appendBreadcrumbs,E=e.before,H=e.beforeWidth,M=e.breadcrumbs,A=e.children,S=e.errors,B=e.headerMenuItems,R=e.headerOffset,T=e.mainContainerHeader,I=e.navigationItems,N=e.setAfterHidden,W=e.setErrors,D=e.subheaderChildren,F=e.subheaderNoPadding,U=e.title,z=e.uuid,X=(0,_.i)().width,q="dashboard_after_width_".concat(z),V="dashboard_before_width_".concat(z),G=(0,o.useRef)(null),J=(0,o.useState)(C?P:(0,w.U2)(q,P)),K=J[0],L=J[1],Q=(0,o.useState)(!1),Y=Q[0],$=Q[1],ee=(0,o.useState)(E?Math.max((0,w.U2)(V,H),13*g.iI):null),te=ee[0],re=ee[1],ne=(0,o.useState)(!1),ie=ne[0],oe=ne[1],ue=(0,o.useState)(null)[1],se=m.ZP.projects.list({},{revalidateOnFocus:!1}).data,de=null===se||void 0===se?void 0:se.projects,le={label:function(){var e;return null===de||void 0===de||null===(e=de[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ae=[];M&&(n&&ae.push(le),ae.push.apply(ae,(0,i.Z)(M))),(null===M||void 0===M||!M.length||k)&&(null===de||void 0===de?void 0:de.length)>=1&&(null!==M&&void 0!==M&&M.length||ae.unshift({bold:!k,label:function(){return U}}),ae.unshift(le)),(0,o.useEffect)((function(){null===G||void 0===G||!G.current||Y||ie||null===ue||void 0===ue||ue(G.current.getBoundingClientRect().width)}),[Y,K,ie,te,G,ue,X]),(0,o.useEffect)((function(){Y||(0,w.t8)(q,K)}),[y,Y,K,q]),(0,o.useEffect)((function(){ie||(0,w.t8)(V,te)}),[ie,te,V]);var ce=(0,j.Z)(P);return(0,o.useEffect)((function(){C&&ce!==P&&L(P)}),[C,P,ce]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(l.Z,{title:U}),(0,f.jsx)(a.Z,{breadcrumbs:ae,menuItems:B,project:null===de||void 0===de?void 0:de[0],version:null===de||void 0===de||null===(r=de[0])||void 0===r?void 0:r.version}),(0,f.jsxs)(c.Nk,{ref:t,children:[0!==(null===I||void 0===I?void 0:I.length)&&(0,f.jsx)(c.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:I,showMore:!0})}),(0,f.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(v.Z,{after:h,afterHeader:x,afterHeightOffset:O.Mz,afterHidden:y,afterMousedownActive:Y,afterWidth:K,before:E,beforeHeightOffset:O.Mz,beforeMousedownActive:ie,beforeWidth:c.k1+(E?te:0),headerOffset:R,hideAfterCompletely:!N,leftOffset:E?c.k1:null,mainContainerHeader:T,mainContainerRef:G,setAfterHidden:N,setAfterMousedownActive:$,setAfterWidth:L,setBeforeMousedownActive:oe,setBeforeWidth:re,children:[D&&(0,f.jsx)(p,{noPadding:F,children:D}),A]})})]}),S&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===W||void 0===W?void 0:W(null)},children:(0,f.jsx)(s.Z,Z(Z({},S),{},{onClose:function(){return null===W||void 0===W?void 0:W(null)}}))})]})}var P=o.forwardRef(y)},14759:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(38860),o=r.n(i),u=r(82684),s=r(44898),d=r(94629),l=r(88328),a=r(93808),c=r(38276),f=r(4190),h=r(5755),p=r(35686),v=r(70515),b=r(69419),m=r(28598);function j(e){var t,r=e.objectType,n=e.slug,i=(0,b.iV)().object_type,o=(0,u.useState)(null),a=o[0],j=o[1],O=i||r||s.Z,g=s.R===O,w=p.ZP.custom_templates.detail(n&&encodeURIComponent(n),{object_type:O}).data;return(0,u.useEffect)((function(){w&&j(null===w||void 0===w?void 0:w.custom_template)}),[w]),(0,m.jsxs)(d.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Templates"},linkProps:{href:g?"/templates?object_type=".concat(s.R):"/templates"}},{bold:!0,label:function(){return n}}],title:n,uuid:"TemplatesDetail/index",children:[!w&&(0,m.jsx)(c.Z,{p:v.cd,children:(0,m.jsx)(f.Z,{inverted:!0})}),a&&(0,m.jsxs)(m.Fragment,{children:[(!O||s.Z===O)&&(0,m.jsx)(h.Z,{template:a},null===a||void 0===a||null===(t=a.content)||void 0===t?void 0:t.slice(0,40)),g&&(0,m.jsx)(l.Z,{template:a})]})]})}j.getInitialProps=function(){var e=(0,n.Z)(o().mark((function e(t){var r,n,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.query,n=r.object_type,i=r.slug,e.abrupt("return",{objectType:n,slug:i});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.default=(0,a.Z)(j)},45082:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates/[...slug]",function(){return r(14759)}])}},function(e){e.O(0,[844,2083,2851,1124,341,8789,4913,1821,8013,600,4636,8264,4666,5499,4839,7055,5810,1769,3859,9264,9774,2888,179],(function(){return t=45082,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5240],{60523:function(e,n,t){"use strict";var i=t(21831),r=t(82394),u=t(82684),o=t(38626),l=t(34376),d=t(54750),s=t(71180),c=t(90299),a=t(44898),p=t(55485),f=t(88328),h=t(38276),m=t(4190),v=t(48381),j=t(5755),b=t(30160),x=t(35686),g=t(72473),y=t(84649),Z=t(32929),w=t(15610),O=t(19183),P=t(28598);function k(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 C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(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,k=e.defaultTab,_=e.objectType,I=e.onClickCustomTemplate,T=e.pipelineUUID,M=e.showAddingNewTemplates,S=e.showBreadcrumbs,A=e.tabs,U=(0,l.useRouter)(),E=(0,u.useContext)(o.ThemeContext),N=(0,O.i)(),R=N.height,D=N.width,B=(0,u.useMemo)((function(){return A||Z.dP}),[A]),q=(0,u.useState)(M||!1),F=q[0],z=q[1],H=(0,u.useState)(r?Z.qy.find((function(e){return e.uuid===r})):Z.qy[0]),W=H[0],L=H[1],G=(0,u.useState)(k?B.find((function(e){return e.uuid===(null===k||void 0===k?void 0:k.uuid)})):B[0]),X=G[0],Y=G[1],V=(0,u.useState)(null),J=V[0],K=V[1],Q=x.ZP.custom_templates.list({object_type:a.Z},{},{pauseFetch:Z.n9.uuid!==(null===X||void 0===X?void 0:X.uuid)}),$=Q.data,ee=Q.mutate,ne=(0,u.useMemo)((function(){var e=(null===$||void 0===$?void 0:$.custom_templates)||[];return null!==W&&void 0!==W&&W.filterTemplates?null===W||void 0===W?void 0:W.filterTemplates(e):e}),[$,W]),te=x.ZP.custom_templates.list({object_type:a.R},{},{pauseFetch:Z.A2.uuid!==(null===X||void 0===X?void 0:X.uuid)}),ie=te.data,re=te.mutate,ue=(0,u.useMemo)((function(){var e=(null===ie||void 0===ie?void 0:ie.custom_templates)||[];return null!==W&&void 0!==W&&W.filterTemplates?null===W||void 0===W?void 0:W.filterTemplates(e):e}),[ie,W]),oe=(0,u.useMemo)((function(){return Z.qy.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,u=e.uuid,o=(null===W||void 0===W?void 0:W.uuid)===u,l=C({size:y.ZG},o&&r?r:{});return(0,P.jsx)(y.wj,{onClick:function(){return L(e)},selected:o,children:(0,P.jsxs)(p.ZP,{alignItems:"center",children:[(0,P.jsx)(y.ze,{backgroundColor:o&&i?i(E):null,children:n?(0,P.jsx)(n,C({},l)):(0,P.jsx)(g.pd,C({},l))}),(0,P.jsx)(b.ZP,{bold:!0,large:!0,children:t?t():u})]})},u)}))}),[W,E]),le=(0,u.useMemo)((function(){return Z.hS.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,u=e.uuid,o=(null===W||void 0===W?void 0:W.uuid)===u,l=C({size:y.ZG},o&&r?r:{});return(0,P.jsx)(y.wj,{onClick:function(){return L(e)},selected:o,children:(0,P.jsxs)(p.ZP,{alignItems:"center",children:[(0,P.jsx)(y.ze,{backgroundColor:o&&i?i(E):null,children:n?(0,P.jsx)(n,C({},l)):(0,P.jsx)(g.pd,C({},l))}),(0,P.jsx)(b.ZP,{bold:!0,large:!0,children:t?t():u})]})},u)}))}),[W,E]),de=(0,u.useMemo)((function(){return null===ne||void 0===ne?void 0:ne.map((function(e){var n=e.description,t=e.name,r=e.tags,u=e.template_uuid,o=e.user,l=[];return null!==r&&void 0!==r&&r.length?l.push.apply(l,(0,i.Z)(r)):null!==o&&void 0!==o&&o.username&&l.push(null===o||void 0===o?void 0:o.username),(0,P.jsxs)(y.UE,{onClick:function(){I?I(e):U.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(u)))},children:[(0,P.jsx)(y.Tj,{children:(0,P.jsx)(b.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||u})}),(0,P.jsx)(y.SL,{children:(0,P.jsx)(b.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,P.jsx)(y.EN,{children:(null===l||void 0===l?void 0:l.length)>=1&&(0,P.jsx)(v.Z,{tags:null===l||void 0===l?void 0:l.map((function(e){return{uuid:e}}))})})]},u)}))}),[ne,I,U]),se=(0,u.useMemo)((function(){return null===ue||void 0===ue?void 0:ue.map((function(e){var n=e.description,t=e.name,r=e.tags,u=e.template_uuid,o=e.user,l=[];return null!==r&&void 0!==r&&r.length?l.push.apply(l,(0,i.Z)(r)):null!==o&&void 0!==o&&o.username&&l.push(null===o||void 0===o?void 0:o.username),(0,P.jsxs)(y.UE,{onClick:function(){I?I(e):U.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(u),"?object_type=").concat(a.R))},children:[(0,P.jsx)(y.Tj,{children:(0,P.jsx)(b.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||u})}),(0,P.jsx)(y.SL,{children:(0,P.jsx)(b.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,P.jsx)(y.EN,{children:(null===l||void 0===l?void 0:l.length)>=1&&(0,P.jsx)(v.Z,{tags:null===l||void 0===l?void 0:l.map((function(e){return{uuid:e}}))})})]},u)}))}),[ue,I,U]),ce=(0,u.useMemo)((function(){if(!S)return null;var e=[];return F?e.push.apply(e,[{label:function(){return"Templates"},onClick:function(){z(!1)}},{bold:!0,label:function(){return"New custom template"}}]):e.push({label:function(){return"Templates"}}),(0,P.jsx)(y.FX,{children:(0,P.jsx)(d.Z,{breadcrumbs:e})})}),[F,S]),ae=(0,u.useMemo)((function(){return S?36:0}),[S]),pe=(0,u.useMemo)((function(){return R-ae}),[R,ae]);if(F)return n=a.R===_&&T?(0,P.jsx)(f.Z,{onMutateSuccess:re,pipelineUUID:T,templateAttributes:W&&(null===W||void 0===W?void 0:W.uuid)!==(null===Z.qy||void 0===Z.qy?void 0:Z.qy[0].uuid)?{pipeline_type:null===W||void 0===W?void 0:W.uuid}:null,templateUUID:null===J||void 0===J?void 0:J.template_uuid}):(0,P.jsx)(j.Z,{contained:t,heightOffset:ae,onCreateCustomTemplate:t?function(e){K(e)}:null,onMutateSuccess:ee,templateAttributes:W&&(null===W||void 0===W?void 0:W.uuid)!==(null===Z.qy||void 0===Z.qy?void 0:Z.qy[0].uuid)?{block_type:null===W||void 0===W?void 0:W.uuid}:null,templateUUID:null===J||void 0===J?void 0:J.template_uuid}),t?(0,P.jsxs)(P.Fragment,{children:[S&&ce,(0,P.jsx)(y.Rd,{height:pe,width:D,children:n})]}):n;var fe=(0,P.jsxs)(y.Nk,{children:[(0,P.jsxs)(y.bC,{height:t?pe:null,children:[(0,P.jsx)(y.Yf,{children:(0,P.jsx)(c.Z,{noPadding:!0,onClickTab:function(e){t?Y(e):(0,w.u7)({object_type:Z.A2.uuid===e.uuid?a.R:a.Z})},selectedTabUUID:null===X||void 0===X?void 0:X.uuid,tabs:B})}),(0,P.jsxs)(y.wl,{contained:t,heightOffset:ae,children:[Z.n9.uuid===(null===X||void 0===X?void 0:X.uuid)&&oe,Z.A2.uuid===(null===X||void 0===X?void 0:X.uuid)&&le]})]}),(0,P.jsxs)(y.w5,{children:[Z.n9.uuid===(null===X||void 0===X?void 0:X.uuid)&&(0,P.jsx)(y.HS,{children:(0,P.jsx)(s.Z,{beforeIcon:(0,P.jsx)(g.mm,{size:y.ZG}),onClick:function(){z(!0)},primary:!0,children:"New block template"})}),Z.n9.uuid===(null===X||void 0===X?void 0:X.uuid)&&(0,P.jsxs)(P.Fragment,{children:[!$&&(0,P.jsx)(h.Z,{p:2,children:(0,P.jsx)(m.Z,{inverted:!0})}),$&&!(null!==de&&void 0!==de&&de.length)&&(0,P.jsxs)(h.Z,{p:2,children:[(0,P.jsx)(b.ZP,{children:"There are currently no templates matching your search."}),(0,P.jsx)("br",{}),(0,P.jsx)(b.ZP,{children:"Add a new template by clicking the button above."})]}),(null===de||void 0===de?void 0:de.length)>=1&&(0,P.jsx)(y.n8,{children:de})]}),Z.A2.uuid===(null===X||void 0===X?void 0:X.uuid)&&(0,P.jsxs)(P.Fragment,{children:[!ie&&(0,P.jsx)(h.Z,{p:2,children:(0,P.jsx)(m.Z,{inverted:!0})}),ie&&!(null!==se&&void 0!==se&&se.length)&&(0,P.jsxs)(h.Z,{p:2,children:[(0,P.jsx)(b.ZP,{children:"There are currently no templates matching your search."}),(0,P.jsx)("br",{}),(0,P.jsx)(b.ZP,{children:'Add a new template by right-clicking a pipeline row from the Pipelines page and selecting "Create template".'})]}),(null===se||void 0===se?void 0:se.length)>=1&&(0,P.jsx)(y.n8,{children:se})]})]})]});return t?(0,P.jsxs)(P.Fragment,{children:[S&&ce,(0,P.jsx)(y.Rd,{height:pe,width:D,children:fe})]}):fe}},94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return k}});var i=t(82394),r=t(21831),u=t(82684),o=t(50724),l=t(82555),d=t(97618),s=t(70613),c=t(59696),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=u.forwardRef(f),m=t(62547),v=t(82571),j=t(35686),b=t(98464),x=t(46684),g=t(70515),y=t(53808),Z=t(19183);function w(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function P(e,n){var t,i=e.addProjectBreadcrumbToCustomBreadcrumbs,f=e.after,w=e.afterHidden,P=e.afterWidth,k=e.afterWidthOverride,C=e.before,_=e.beforeWidth,I=e.breadcrumbs,T=e.children,M=e.errors,S=e.headerMenuItems,A=e.headerOffset,U=e.mainContainerHeader,E=e.navigationItems,N=e.setErrors,R=e.subheaderChildren,D=e.subheaderNoPadding,B=e.title,q=e.uuid,F=(0,Z.i)().width,z="dashboard_after_width_".concat(q),H="dashboard_before_width_".concat(q),W=(0,u.useRef)(null),L=(0,u.useState)(k?P:(0,y.U2)(z,P)),G=L[0],X=L[1],Y=(0,u.useState)(!1),V=Y[0],J=Y[1],K=(0,u.useState)(C?Math.max((0,y.U2)(H,_),13*g.iI):null),Q=K[0],$=K[1],ee=(0,u.useState)(!1),ne=ee[0],te=ee[1],ie=(0,u.useState)(null)[1],re=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ue=null===re||void 0===re?void 0:re.projects,oe={label:function(){var e;return null===ue||void 0===ue||null===(e=ue[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},le=[];I?(i&&le.push(oe),le.push.apply(le,(0,r.Z)(I))):(null===ue||void 0===ue?void 0:ue.length)>=1&&le.push.apply(le,[oe,{bold:!0,label:function(){return B}}]),(0,u.useEffect)((function(){null===W||void 0===W||!W.current||V||ne||null===ie||void 0===ie||ie(W.current.getBoundingClientRect().width)}),[V,G,ne,Q,W,ie,F]),(0,u.useEffect)((function(){V||(0,y.t8)(z,G)}),[w,V,G,z]),(0,u.useEffect)((function(){ne||(0,y.t8)(H,Q)}),[ne,Q,H]);var de=(0,b.Z)(P);return(0,u.useEffect)((function(){k&&de!==P&&X(P)}),[k,P,de]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(s.Z,{title:B}),(0,p.jsx)(c.Z,{breadcrumbs:le,menuItems:S,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===E||void 0===E?void 0:E.length)&&(0,p.jsx)(a.lm,{showMore:!0,children:(0,p.jsx)(v.Z,{navigationItems:E,showMore:!0})}),(0,p.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(m.Z,{after:f,afterHeightOffset:x.Mz,afterHidden:w,afterMousedownActive:V,afterWidth:G,before:C,beforeHeightOffset:x.Mz,beforeMousedownActive:ne,beforeWidth:a.k1+(C?Q:0),headerOffset:A,hideAfterCompletely:!0,leftOffset:C?a.k1:null,mainContainerHeader:U,mainContainerRef:W,setAfterMousedownActive:J,setAfterWidth:X,setBeforeMousedownActive:te,setBeforeWidth:$,children:[R&&(0,p.jsx)(h,{noPadding:D,children:R}),T]})})]}),M&&(0,p.jsx)(o.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===N||void 0===N?void 0:N(null)},children:(0,p.jsx)(l.Z,O(O({},M),{},{onClose:function(){return null===N||void 0===N?void 0:N(null)}}))})]})}var k=u.forwardRef(P)},48381:function(e,n,t){"use strict";var i=t(82684),r=t(31882),u=t(55485),o=t(30160),l=t(86735),d=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,s=void 0===t?[]:t,c=(0,i.useMemo)((function(){return(null===s||void 0===s?void 0:s.length)||0}),[s]),a=(0,i.useMemo)((function(){return(0,l.YC)(s||[],"uuid")}),[s]);return(0,d.jsx)(u.ZP,{alignItems:"center",flexWrap:"wrap",children:null===a||void 0===a?void 0:a.reduce((function(e,t){return e.push((0,d.jsx)("div",{style:{marginBottom:2,marginRight:c>=2?4:0,marginTop:2},children:(0,d.jsx)(r.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,d.jsx)(o.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},31882:function(e,n,t){"use strict";var i=t(38626),r=t(71180),u=t(55485),o=t(30160),l=t(44897),d=t(72473),s=t(70515),c=t(61896),a=t(28598),p=i.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+c.Al)/2,"px;\n height: ").concat(1.5*s.iI+c.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+c.Al)/2,"px;\n height: ").concat(c.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((s.iI/1+c.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,i=e.disabled,l=e.label,c=e.monospace,f=e.onClick,h=e.primary,m=e.small,v=e.xsmall;return(0,a.jsx)(p,{border:n,primary:h,small:m,xsmall:v,children:(0,a.jsx)(r.Z,{basic:!0,disabled:i,noBackground:!0,noPadding:!0,onClick:f,transparent:!0,children:(0,a.jsxs)(u.ZP,{alignItems:"center",children:[t,l&&(0,a.jsx)(o.ZP,{monospace:c,small:m,xsmall:v,children:l}),!i&&f&&(0,a.jsx)("div",{style:{marginLeft:2}}),!i&&f&&(0,a.jsx)(d.x8,{default:h,muted:!h,size:m?s.iI:1.25*s.iI})]})})})}},60820:function(e,n,t){"use strict";t.r(n);var i=t(77837),r=t(38860),u=t.n(r),o=t(82684),l=t(60523),d=t(94629),s=t(93808),c=t(32929),a=t(44898),p=t(69419),f=t(28598);function h(){var e=(0,o.useState)(!1),n=e[0],t=e[1],i=(0,o.useState)(null),r=i[0],u=i[1],s=(0,o.useState)(null),h=s[0],m=s[1],v=(0,p.iV)();(0,o.useEffect)((function(){var e=v.new,n=v.object_type,i=v.pipeline_uuid;n&&u(n),i&&m(i),t(!!e)}),[v]);var j=(0,o.useMemo)((function(){var e=[n?"New":"Browse"];return r&&e.push(r),h&&e.push(h),e}),[n,r,h]),b=(0,o.useMemo)((function(){return a.R===r}),[r]);return(0,f.jsx)(d.Z,{addProjectBreadcrumbToCustomBreadcrumbs:n,breadcrumbs:n?[{label:function(){return"Templates"},linkProps:{href:b?"/templates?object_type=".concat(a.R):"/templates"}},{bold:!0,label:function(){return"New"}}]:null,title:"Templates",uuid:"Templates/index",children:(0,f.jsx)(l.Z,{defaultTab:b?c.A2:null,objectType:r,pipelineUUID:h,showAddingNewTemplates:n},j.join("_"))})}h.getInitialProps=(0,i.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,s.Z)(h)},87710:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates",function(){return t(60820)}])}},function(e){e.O(0,[844,2083,2851,2369,341,8789,4913,6648,8013,600,9696,8264,4666,5499,4839,7055,5810,1769,3859,9264,9774,2888,179],(function(){return n=87710,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5240],{60523:function(e,n,t){"use strict";var i=t(21831),r=t(82394),u=t(82684),o=t(38626),l=t(34376),d=t(54750),s=t(71180),c=t(90299),a=t(44898),p=t(55485),f=t(88328),h=t(38276),v=t(4190),m=t(48381),j=t(5755),b=t(30160),x=t(35686),g=t(72473),y=t(84649),Z=t(32929),w=t(15610),O=t(19183),P=t(28598);function k(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 C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(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,k=e.defaultTab,_=e.objectType,I=e.onClickCustomTemplate,T=e.pipelineUUID,M=e.showAddingNewTemplates,A=e.showBreadcrumbs,S=e.tabs,U=(0,l.useRouter)(),E=(0,u.useContext)(o.ThemeContext),N=(0,O.i)(),R=N.height,D=N.width,B=(0,u.useMemo)((function(){return S||Z.dP}),[S]),H=(0,u.useState)(M||!1),q=H[0],F=H[1],z=(0,u.useState)(r?Z.qy.find((function(e){return e.uuid===r})):Z.qy[0]),W=z[0],L=z[1],G=(0,u.useState)(k?B.find((function(e){return e.uuid===(null===k||void 0===k?void 0:k.uuid)})):B[0]),X=G[0],Y=G[1],V=(0,u.useState)(null),J=V[0],K=V[1],Q=x.ZP.custom_templates.list({object_type:a.Z},{},{pauseFetch:Z.n9.uuid!==(null===X||void 0===X?void 0:X.uuid)}),$=Q.data,ee=Q.mutate,ne=(0,u.useMemo)((function(){var e=(null===$||void 0===$?void 0:$.custom_templates)||[];return null!==W&&void 0!==W&&W.filterTemplates?null===W||void 0===W?void 0:W.filterTemplates(e):e}),[$,W]),te=x.ZP.custom_templates.list({object_type:a.R},{},{pauseFetch:Z.A2.uuid!==(null===X||void 0===X?void 0:X.uuid)}),ie=te.data,re=te.mutate,ue=(0,u.useMemo)((function(){var e=(null===ie||void 0===ie?void 0:ie.custom_templates)||[];return null!==W&&void 0!==W&&W.filterTemplates?null===W||void 0===W?void 0:W.filterTemplates(e):e}),[ie,W]),oe=(0,u.useMemo)((function(){return Z.qy.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,u=e.uuid,o=(null===W||void 0===W?void 0:W.uuid)===u,l=C({size:y.ZG},o&&r?r:{});return(0,P.jsx)(y.wj,{onClick:function(){return L(e)},selected:o,children:(0,P.jsxs)(p.ZP,{alignItems:"center",children:[(0,P.jsx)(y.ze,{backgroundColor:o&&i?i(E):null,children:n?(0,P.jsx)(n,C({},l)):(0,P.jsx)(g.pd,C({},l))}),(0,P.jsx)(b.ZP,{bold:!0,large:!0,children:t?t():u})]})},u)}))}),[W,E]),le=(0,u.useMemo)((function(){return Z.hS.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,u=e.uuid,o=(null===W||void 0===W?void 0:W.uuid)===u,l=C({size:y.ZG},o&&r?r:{});return(0,P.jsx)(y.wj,{onClick:function(){return L(e)},selected:o,children:(0,P.jsxs)(p.ZP,{alignItems:"center",children:[(0,P.jsx)(y.ze,{backgroundColor:o&&i?i(E):null,children:n?(0,P.jsx)(n,C({},l)):(0,P.jsx)(g.pd,C({},l))}),(0,P.jsx)(b.ZP,{bold:!0,large:!0,children:t?t():u})]})},u)}))}),[W,E]),de=(0,u.useMemo)((function(){return null===ne||void 0===ne?void 0:ne.map((function(e){var n=e.description,t=e.name,r=e.tags,u=e.template_uuid,o=e.user,l=[];return null!==r&&void 0!==r&&r.length?l.push.apply(l,(0,i.Z)(r)):null!==o&&void 0!==o&&o.username&&l.push(null===o||void 0===o?void 0:o.username),(0,P.jsxs)(y.UE,{onClick:function(){I?I(e):U.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(u)))},children:[(0,P.jsx)(y.Tj,{children:(0,P.jsx)(b.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||u})}),(0,P.jsx)(y.SL,{children:(0,P.jsx)(b.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,P.jsx)(y.EN,{children:(null===l||void 0===l?void 0:l.length)>=1&&(0,P.jsx)(m.Z,{tags:null===l||void 0===l?void 0:l.map((function(e){return{uuid:e}}))})})]},u)}))}),[ne,I,U]),se=(0,u.useMemo)((function(){return null===ue||void 0===ue?void 0:ue.map((function(e){var n=e.description,t=e.name,r=e.tags,u=e.template_uuid,o=e.user,l=[];return null!==r&&void 0!==r&&r.length?l.push.apply(l,(0,i.Z)(r)):null!==o&&void 0!==o&&o.username&&l.push(null===o||void 0===o?void 0:o.username),(0,P.jsxs)(y.UE,{onClick:function(){I?I(e):U.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(u),"?object_type=").concat(a.R))},children:[(0,P.jsx)(y.Tj,{children:(0,P.jsx)(b.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||u})}),(0,P.jsx)(y.SL,{children:(0,P.jsx)(b.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,P.jsx)(y.EN,{children:(null===l||void 0===l?void 0:l.length)>=1&&(0,P.jsx)(m.Z,{tags:null===l||void 0===l?void 0:l.map((function(e){return{uuid:e}}))})})]},u)}))}),[ue,I,U]),ce=(0,u.useMemo)((function(){if(!A)return null;var e=[];return q?e.push.apply(e,[{label:function(){return"Templates"},onClick:function(){F(!1)}},{bold:!0,label:function(){return"New custom template"}}]):e.push({label:function(){return"Templates"}}),(0,P.jsx)(y.FX,{children:(0,P.jsx)(d.Z,{breadcrumbs:e})})}),[q,A]),ae=(0,u.useMemo)((function(){return A?36:0}),[A]),pe=(0,u.useMemo)((function(){return R-ae}),[R,ae]);if(q)return n=a.R===_&&T?(0,P.jsx)(f.Z,{onMutateSuccess:re,pipelineUUID:T,templateAttributes:W&&(null===W||void 0===W?void 0:W.uuid)!==(null===Z.qy||void 0===Z.qy?void 0:Z.qy[0].uuid)?{pipeline_type:null===W||void 0===W?void 0:W.uuid}:null,templateUUID:null===J||void 0===J?void 0:J.template_uuid}):(0,P.jsx)(j.Z,{contained:t,heightOffset:ae,onCreateCustomTemplate:t?function(e){K(e)}:null,onMutateSuccess:ee,templateAttributes:W&&(null===W||void 0===W?void 0:W.uuid)!==(null===Z.qy||void 0===Z.qy?void 0:Z.qy[0].uuid)?{block_type:null===W||void 0===W?void 0:W.uuid}:null,templateUUID:null===J||void 0===J?void 0:J.template_uuid}),t?(0,P.jsxs)(P.Fragment,{children:[A&&ce,(0,P.jsx)(y.Rd,{height:pe,width:D,children:n})]}):n;var fe=(0,P.jsxs)(y.Nk,{children:[(0,P.jsxs)(y.bC,{height:t?pe:null,children:[(0,P.jsx)(y.Yf,{children:(0,P.jsx)(c.Z,{noPadding:!0,onClickTab:function(e){t?Y(e):(0,w.u7)({object_type:Z.A2.uuid===e.uuid?a.R:a.Z})},selectedTabUUID:null===X||void 0===X?void 0:X.uuid,tabs:B})}),(0,P.jsxs)(y.wl,{contained:t,heightOffset:ae,children:[Z.n9.uuid===(null===X||void 0===X?void 0:X.uuid)&&oe,Z.A2.uuid===(null===X||void 0===X?void 0:X.uuid)&&le]})]}),(0,P.jsxs)(y.w5,{children:[Z.n9.uuid===(null===X||void 0===X?void 0:X.uuid)&&(0,P.jsx)(y.HS,{children:(0,P.jsx)(s.Z,{beforeIcon:(0,P.jsx)(g.mm,{size:y.ZG}),onClick:function(){F(!0)},primary:!0,children:"New block template"})}),Z.n9.uuid===(null===X||void 0===X?void 0:X.uuid)&&(0,P.jsxs)(P.Fragment,{children:[!$&&(0,P.jsx)(h.Z,{p:2,children:(0,P.jsx)(v.Z,{inverted:!0})}),$&&!(null!==de&&void 0!==de&&de.length)&&(0,P.jsxs)(h.Z,{p:2,children:[(0,P.jsx)(b.ZP,{children:"There are currently no templates matching your search."}),(0,P.jsx)("br",{}),(0,P.jsx)(b.ZP,{children:"Add a new template by clicking the button above."})]}),(null===de||void 0===de?void 0:de.length)>=1&&(0,P.jsx)(y.n8,{children:de})]}),Z.A2.uuid===(null===X||void 0===X?void 0:X.uuid)&&(0,P.jsxs)(P.Fragment,{children:[!ie&&(0,P.jsx)(h.Z,{p:2,children:(0,P.jsx)(v.Z,{inverted:!0})}),ie&&!(null!==se&&void 0!==se&&se.length)&&(0,P.jsxs)(h.Z,{p:2,children:[(0,P.jsx)(b.ZP,{children:"There are currently no templates matching your search."}),(0,P.jsx)("br",{}),(0,P.jsx)(b.ZP,{children:'Add a new template by right-clicking a pipeline row from the Pipelines page and selecting "Create template".'})]}),(null===se||void 0===se?void 0:se.length)>=1&&(0,P.jsx)(y.n8,{children:se})]})]})]});return t?(0,P.jsxs)(P.Fragment,{children:[A&&ce,(0,P.jsx)(y.Rd,{height:pe,width:D,children:fe})]}):fe}},94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return k}});var i=t(82394),r=t(21831),u=t(82684),o=t(50724),l=t(82555),d=t(97618),s=t(70613),c=t(94636),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=u.forwardRef(f),v=t(62547),m=t(82571),j=t(35686),b=t(98464),x=t(46684),g=t(70515),y=t(53808),Z=t(19183);function w(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function P(e,n){var t,i=e.addProjectBreadcrumbToCustomBreadcrumbs,f=e.after,w=e.afterHeader,P=e.afterHidden,k=e.afterWidth,C=e.afterWidthOverride,_=e.appendBreadcrumbs,I=e.before,T=e.beforeWidth,M=e.breadcrumbs,A=e.children,S=e.errors,U=e.headerMenuItems,E=e.headerOffset,N=e.mainContainerHeader,R=e.navigationItems,D=e.setAfterHidden,B=e.setErrors,H=e.subheaderChildren,q=e.subheaderNoPadding,F=e.title,z=e.uuid,W=(0,Z.i)().width,L="dashboard_after_width_".concat(z),G="dashboard_before_width_".concat(z),X=(0,u.useRef)(null),Y=(0,u.useState)(C?k:(0,y.U2)(L,k)),V=Y[0],J=Y[1],K=(0,u.useState)(!1),Q=K[0],$=K[1],ee=(0,u.useState)(I?Math.max((0,y.U2)(G,T),13*g.iI):null),ne=ee[0],te=ee[1],ie=(0,u.useState)(!1),re=ie[0],ue=ie[1],oe=(0,u.useState)(null)[1],le=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,de=null===le||void 0===le?void 0:le.projects,se={label:function(){var e;return null===de||void 0===de||null===(e=de[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ce=[];M&&(i&&ce.push(se),ce.push.apply(ce,(0,r.Z)(M))),(null===M||void 0===M||!M.length||_)&&(null===de||void 0===de?void 0:de.length)>=1&&(null!==M&&void 0!==M&&M.length||ce.unshift({bold:!_,label:function(){return F}}),ce.unshift(se)),(0,u.useEffect)((function(){null===X||void 0===X||!X.current||Q||re||null===oe||void 0===oe||oe(X.current.getBoundingClientRect().width)}),[Q,V,re,ne,X,oe,W]),(0,u.useEffect)((function(){Q||(0,y.t8)(L,V)}),[P,Q,V,L]),(0,u.useEffect)((function(){re||(0,y.t8)(G,ne)}),[re,ne,G]);var ae=(0,b.Z)(k);return(0,u.useEffect)((function(){C&&ae!==k&&J(k)}),[C,k,ae]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(s.Z,{title:F}),(0,p.jsx)(c.Z,{breadcrumbs:ce,menuItems:U,project:null===de||void 0===de?void 0:de[0],version:null===de||void 0===de||null===(t=de[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)(m.Z,{navigationItems:R,showMore:!0})}),(0,p.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:f,afterHeader:w,afterHeightOffset:x.Mz,afterHidden:P,afterMousedownActive:Q,afterWidth:V,before:I,beforeHeightOffset:x.Mz,beforeMousedownActive:re,beforeWidth:a.k1+(I?ne:0),headerOffset:E,hideAfterCompletely:!D,leftOffset:I?a.k1:null,mainContainerHeader:N,mainContainerRef:X,setAfterHidden:D,setAfterMousedownActive:$,setAfterWidth:J,setBeforeMousedownActive:ue,setBeforeWidth:te,children:[H&&(0,p.jsx)(h,{noPadding:q,children:H}),A]})})]}),S&&(0,p.jsx)(o.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===B||void 0===B?void 0:B(null)},children:(0,p.jsx)(l.Z,O(O({},S),{},{onClose:function(){return null===B||void 0===B?void 0:B(null)}}))})]})}var k=u.forwardRef(P)},48381:function(e,n,t){"use strict";var i=t(82684),r=t(31882),u=t(55485),o=t(30160),l=t(86735),d=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,s=void 0===t?[]:t,c=(0,i.useMemo)((function(){return(null===s||void 0===s?void 0:s.length)||0}),[s]),a=(0,i.useMemo)((function(){return(0,l.YC)(s||[],"uuid")}),[s]);return(0,d.jsx)(u.ZP,{alignItems:"center",flexWrap:"wrap",children:null===a||void 0===a?void 0:a.reduce((function(e,t){return e.push((0,d.jsx)("div",{style:{marginBottom:2,marginRight:c>=2?4:0,marginTop:2},children:(0,d.jsx)(r.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,d.jsx)(o.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},31882:function(e,n,t){"use strict";var i=t(38626),r=t(71180),u=t(55485),o=t(30160),l=t(44897),d=t(72473),s=t(70515),c=t(61896),a=t(28598),p=i.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+c.Al)/2,"px;\n height: ").concat(1.5*s.iI+c.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+c.Al)/2,"px;\n height: ").concat(c.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((s.iI/1+c.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,i=e.disabled,l=e.label,c=e.monospace,f=e.onClick,h=e.primary,v=e.small,m=e.xsmall;return(0,a.jsx)(p,{border:n,primary:h,small:v,xsmall:m,children:(0,a.jsx)(r.Z,{basic:!0,disabled:i,noBackground:!0,noPadding:!0,onClick:f,transparent:!0,children:(0,a.jsxs)(u.ZP,{alignItems:"center",children:[t,l&&(0,a.jsx)(o.ZP,{monospace:c,small:v,xsmall:m,children:l}),!i&&f&&(0,a.jsx)("div",{style:{marginLeft:2}}),!i&&f&&(0,a.jsx)(d.x8,{default:h,muted:!h,size:v?s.iI:1.25*s.iI})]})})})}},60820:function(e,n,t){"use strict";t.r(n);var i=t(77837),r=t(38860),u=t.n(r),o=t(82684),l=t(60523),d=t(94629),s=t(93808),c=t(32929),a=t(44898),p=t(69419),f=t(28598);function h(){var e=(0,o.useState)(!1),n=e[0],t=e[1],i=(0,o.useState)(null),r=i[0],u=i[1],s=(0,o.useState)(null),h=s[0],v=s[1],m=(0,p.iV)();(0,o.useEffect)((function(){var e=m.new,n=m.object_type,i=m.pipeline_uuid;n&&u(n),i&&v(i),t(!!e)}),[m]);var j=(0,o.useMemo)((function(){var e=[n?"New":"Browse"];return r&&e.push(r),h&&e.push(h),e}),[n,r,h]),b=(0,o.useMemo)((function(){return a.R===r}),[r]);return(0,f.jsx)(d.Z,{addProjectBreadcrumbToCustomBreadcrumbs:n,breadcrumbs:n?[{label:function(){return"Templates"},linkProps:{href:b?"/templates?object_type=".concat(a.R):"/templates"}},{bold:!0,label:function(){return"New"}}]:null,title:"Templates",uuid:"Templates/index",children:(0,f.jsx)(l.Z,{defaultTab:b?c.A2:null,objectType:r,pipelineUUID:h,showAddingNewTemplates:n},j.join("_"))})}h.getInitialProps=(0,i.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,s.Z)(h)},87710:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates",function(){return t(60820)}])}},function(e){e.O(0,[844,2083,2851,1124,341,8789,4913,1821,8013,600,4636,8264,4666,5499,4839,7055,5810,1769,3859,9264,9774,2888,179],(function(){return n=87710,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4841],{94629:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(82394),o=n(21831),i=n(82684),u=n(50724),s=n(82555),c=n(97618),f=n(70613),d=n(94636),a=n(68899),l=n(28598);function h(e,t){var n=e.children,r=e.noPadding;return(0,l.jsx)(a.HS,{noPadding:r,ref:t,children:n})}var v=i.forwardRef(h),p=n(62547),b=n(82571),O=n(35686),j=n(98464),m=n(46684),w=n(70515),g=n(53808),_=n(19183);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e,t){var n,r=e.addProjectBreadcrumbToCustomBreadcrumbs,h=e.after,y=e.afterHeader,Z=e.afterHidden,x=e.afterWidth,E=e.afterWidthOverride,M=e.appendBreadcrumbs,k=e.before,C=e.beforeWidth,H=e.breadcrumbs,A=e.children,S=e.errors,R=e.headerMenuItems,I=e.headerOffset,N=e.mainContainerHeader,W=e.navigationItems,B=e.setAfterHidden,D=e.setErrors,T=e.subheaderChildren,z=e.subheaderNoPadding,F=e.title,U=e.uuid,X=(0,_.i)().width,q="dashboard_after_width_".concat(U),G="dashboard_before_width_".concat(U),J=(0,i.useRef)(null),K=(0,i.useState)(E?x:(0,g.U2)(q,x)),L=K[0],Q=K[1],V=(0,i.useState)(!1),Y=V[0],$=V[1],ee=(0,i.useState)(k?Math.max((0,g.U2)(G,C),13*w.iI):null),te=ee[0],ne=ee[1],re=(0,i.useState)(!1),oe=re[0],ie=re[1],ue=(0,i.useState)(null)[1],se=O.ZP.projects.list({},{revalidateOnFocus:!1}).data,ce=null===se||void 0===se?void 0:se.projects,fe={label:function(){var e;return null===ce||void 0===ce||null===(e=ce[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},de=[];H&&(r&&de.push(fe),de.push.apply(de,(0,o.Z)(H))),(null===H||void 0===H||!H.length||M)&&(null===ce||void 0===ce?void 0:ce.length)>=1&&(null!==H&&void 0!==H&&H.length||de.unshift({bold:!M,label:function(){return F}}),de.unshift(fe)),(0,i.useEffect)((function(){null===J||void 0===J||!J.current||Y||oe||null===ue||void 0===ue||ue(J.current.getBoundingClientRect().width)}),[Y,L,oe,te,J,ue,X]),(0,i.useEffect)((function(){Y||(0,g.t8)(q,L)}),[Z,Y,L,q]),(0,i.useEffect)((function(){oe||(0,g.t8)(G,te)}),[oe,te,G]);var ae=(0,j.Z)(x);return(0,i.useEffect)((function(){E&&ae!==x&&Q(x)}),[E,x,ae]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.Z,{title:F}),(0,l.jsx)(d.Z,{breadcrumbs:de,menuItems:R,project:null===ce||void 0===ce?void 0:ce[0],version:null===ce||void 0===ce||null===(n=ce[0])||void 0===n?void 0:n.version}),(0,l.jsxs)(a.Nk,{ref:t,children:[0!==(null===W||void 0===W?void 0:W.length)&&(0,l.jsx)(a.lm,{showMore:!0,children:(0,l.jsx)(b.Z,{navigationItems:W,showMore:!0})}),(0,l.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(p.Z,{after:h,afterHeader:y,afterHeightOffset:m.Mz,afterHidden:Z,afterMousedownActive:Y,afterWidth:L,before:k,beforeHeightOffset:m.Mz,beforeMousedownActive:oe,beforeWidth:a.k1+(k?te:0),headerOffset:I,hideAfterCompletely:!B,leftOffset:k?a.k1:null,mainContainerHeader:N,mainContainerRef:J,setAfterHidden:B,setAfterMousedownActive:$,setAfterWidth:Q,setBeforeMousedownActive:ie,setBeforeWidth:ne,children:[T&&(0,l.jsx)(v,{noPadding:z,children:T}),A]})})]}),S&&(0,l.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===D||void 0===D?void 0:D(null)},children:(0,l.jsx)(s.Z,P(P({},S),{},{onClose:function(){return null===D||void 0===D?void 0:D(null)}}))})]})}var x=i.forwardRef(Z)},74805:function(e,t,n){"use strict";n.r(t);var r=n(77837),o=n(38860),i=n.n(o),u=(n(82684),n(56085)),s=n(94629),c=n(93808),f=n(28026),d=n(4383),a=n(50178),l=n(28598);function h(){var e=(0,a.PR)()||{},t=(0,u.ZP)((0,d.Ib)("terminal"),{queryParams:{term_name:null===e||void 0===e?void 0:e.id},shouldReconnect:function(){return!0}}),n=t.lastMessage,r=t.sendMessage;return(0,l.jsx)(s.Z,{title:"Terminal",uuid:"terminal/index",children:(0,l.jsx)(f.Z,{lastMessage:n,sendMessage:r})})}h.getInitialProps=(0,r.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,c.Z)(h)},27271:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/terminal",function(){return n(74805)}])},80022:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},15544:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},99177:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,{Z:function(){return o}})},93189:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(12539),o=n(80022);function i(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[844,8013,600,4636,8264,9774,2888,179],(function(){return t=27271,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return I}});var r=t(82394),i=t(21831),o=t(82684),u=t(50724),c=t(82555),l=t(97618),a=t(70613),s=t(94636),d=t(68899),f=t(28598);function v(e,n){var t=e.children,r=e.noPadding;return(0,f.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var p=o.forwardRef(v),h=t(62547),O=t(82571),b=t(35686),g=t(98464),m=t(46684),j=t(70515),E=t(53808),_=t(19183);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function y(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,r.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 T(e,n){var t,r=e.addProjectBreadcrumbToCustomBreadcrumbs,v=e.after,P=e.afterHeader,T=e.afterHidden,I=e.afterWidth,A=e.afterWidthOverride,Z=e.appendBreadcrumbs,w=e.before,N=e.beforeWidth,x=e.breadcrumbs,C=e.children,k=e.errors,S=e.headerMenuItems,D=e.headerOffset,M=e.mainContainerHeader,L=e.navigationItems,R=e.setAfterHidden,U=e.setErrors,H=e.subheaderChildren,Y=e.subheaderNoPadding,V=e.title,B=e.uuid,W=(0,_.i)().width,F="dashboard_after_width_".concat(B),X="dashboard_before_width_".concat(B),z=(0,o.useRef)(null),J=(0,o.useState)(A?I:(0,E.U2)(F,I)),Q=J[0],K=J[1],q=(0,o.useState)(!1),G=q[0],$=q[1],ee=(0,o.useState)(w?Math.max((0,E.U2)(X,N),13*j.iI):null),ne=ee[0],te=ee[1],re=(0,o.useState)(!1),ie=re[0],oe=re[1],ue=(0,o.useState)(null)[1],ce=b.ZP.projects.list({},{revalidateOnFocus:!1}).data,le=null===ce||void 0===ce?void 0:ce.projects,ae={label:function(){var e;return null===le||void 0===le||null===(e=le[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},se=[];x&&(r&&se.push(ae),se.push.apply(se,(0,i.Z)(x))),(null===x||void 0===x||!x.length||Z)&&(null===le||void 0===le?void 0:le.length)>=1&&(null!==x&&void 0!==x&&x.length||se.unshift({bold:!Z,label:function(){return V}}),se.unshift(ae)),(0,o.useEffect)((function(){null===z||void 0===z||!z.current||G||ie||null===ue||void 0===ue||ue(z.current.getBoundingClientRect().width)}),[G,Q,ie,ne,z,ue,W]),(0,o.useEffect)((function(){G||(0,E.t8)(F,Q)}),[T,G,Q,F]),(0,o.useEffect)((function(){ie||(0,E.t8)(X,ne)}),[ie,ne,X]);var de=(0,g.Z)(I);return(0,o.useEffect)((function(){A&&de!==I&&K(I)}),[A,I,de]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:V}),(0,f.jsx)(s.Z,{breadcrumbs:se,menuItems:S,project:null===le||void 0===le?void 0:le[0],version:null===le||void 0===le||null===(t=le[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{ref:n,children:[0!==(null===L||void 0===L?void 0:L.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(O.Z,{navigationItems:L,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(h.Z,{after:v,afterHeader:P,afterHeightOffset:m.Mz,afterHidden:T,afterMousedownActive:G,afterWidth:Q,before:w,beforeHeightOffset:m.Mz,beforeMousedownActive:ie,beforeWidth:d.k1+(w?ne:0),headerOffset:D,hideAfterCompletely:!R,leftOffset:w?d.k1:null,mainContainerHeader:M,mainContainerRef:z,setAfterHidden:R,setAfterMousedownActive:$,setAfterWidth:K,setBeforeMousedownActive:oe,setBeforeWidth:te,children:[H&&(0,f.jsx)(p,{noPadding:Y,children:H}),C]})})]}),k&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===U||void 0===U?void 0:U(null)},children:(0,f.jsx)(c.Z,y(y({},k),{},{onClose:function(){return null===U||void 0===U?void 0:U(null)}}))})]})}var I=o.forwardRef(T)},16488:function(e,n,t){"use strict";t.d(n,{IJ:function(){return h},M8:function(){return T},Vx:function(){return j},XM:function(){return y},_U:function(){return p},eI:function(){return m},gU:function(){return _},lO:function(){return N},ri:function(){return b},tL:function(){return E},vJ:function(){return P},xH:function(){return g}});var r,i=t(82394),o=t(92083),u=t.n(o),c=t(3917),l=t(4383),a=t(30229),s=t(42122),d=t(86735);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var p=function(e){return!!e&&!Object.values(a.U5).includes(e)};function h(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,o=n.started_at,c=n.status,l=null;o&&r&&(l=u()(r).valueOf()-u()(o).valueOf());return v(v({},e),{},(0,i.Z)({},t,{runtime:l,status:c}))}),{})}var O,b=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return e?n.slice(0,1):n};function g(e){var n=(0,s.gR)(e,[a.gm.INTERVAL,a.gm.TYPE]),t=e[a.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var r=e[a.gm.TYPE];return r&&(n["schedule_type[]"]=r),n}function m(e){if(!e)return null;var n=new Date(u()(e).valueOf()),t=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(t)}function j(e){return"string"!==typeof e?e:m(e.split("+")[0]).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(O||(O={}));var E=(r={},(0,i.Z)(r,O.DAY,86400),(0,i.Z)(r,O.HOUR,3600),(0,i.Z)(r,O.MINUTE,60),(0,i.Z)(r,O.SECOND,1),r);function _(e){var n=O.SECOND,t=e;return e%86400===0?(t/=86400,n=O.DAY):e%3600===0?(t/=3600,n=O.HOUR):e%60===0&&(t/=60,n=O.MINUTE),{time:t,unit:n}}function P(e,n){return e*E[n]}function y(e,n,t){var r="".concat(e.toISOString().split("T")[0]," ").concat(null===n||void 0===n?void 0:n.hour,":").concat(null===n||void 0===n?void 0:n.minute);if(null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone){var i=u()(e);i.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),i.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),i.set("second",0),r=i.format(c.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,c.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))}return r}function T(e){var n,t="";return t="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(t="".concat(t,"/").concat(e.token)),(n=window.location.port)&&(t=t.replace(n,l.QT)),t}function I(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var r=t.indexOf(e),i=0;if(n<0)for(var o=0;o>n;o--)0===r?(r=t.length-1,i-=1):r-=1;else if(n>0)for(var u=0;u<n;u++)r===t.length-1?(r=0,i+=1):r+=1;return{additionalOffset:i,cronValue:String(t[r]||e)}}(+e,n,t)}var A=(0,d.m5)(60),Z=(0,d.m5)(24),w=(0,c.Cs)();function N(e,n){if(!e)return e;var t=u()().local().format("Z"),r=t.split(":"),i="-"===t[0],o=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),c=Number(r[1]);(i&&!n||!i&&n)&&(o=-o,c=-c);var l=e.split(" "),a=l[0],s=l[1],d=l[2],f=I(a,c,A),v=I(s,o+f.additionalOffset,Z);if(l[0]=f.cronValue,l[1]=v.cronValue,0!==(null===v||void 0===v?void 0:v.additionalOffset)){var p=I(d,v.additionalOffset,w);l[2]=p.cronValue}return l.join(" ")}},70320:function(e,n,t){"use strict";t.d(n,{h:function(){return u},q:function(){return o}});var r=t(78419),i=t(53808);function o(){return(0,i.U2)(r.am,null)||!1}function u(e){return"undefined"!==typeof e&&(0,i.t8)(r.am,e),e}},55072:function(e,n,t){"use strict";t.d(n,{Et:function(){return f},Q:function(){return d}});t(82684);var r=t(71180),i=t(55485),o=t(38276),u=t(31748),c=t(72473),l=t(79633),a=t(70515),s=t(28598),d=30,f=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,f=e.totalPages,v=[],p=t;if(p>f)v=Array.from({length:f},(function(e,n){return n}));else{var h=Math.floor(p/2),O=n-h;n+h>=f?(O=f-p+2,p-=2):n-h<=0?(O=0,p-=2):(p-=4,O=n-Math.floor(p/2)),v=Array.from({length:p},(function(e,n){return n+O}))}return(0,s.jsx)(s.Fragment,{children:f>0&&(0,s.jsxs)(i.ZP,{alignItems:"center",children:[(0,s.jsx)(r.Z,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,s.jsx)(c.Hd,{size:1.5*a.iI,stroke:u.Av})}),!v.includes(0)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!v.includes(1)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),v.map((function(e){return(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{backgroundColor:e===n&&l.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!v.includes(f-1)&&(0,s.jsxs)(s.Fragment,{children:[!v.includes(f-2)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{borderLess:!0,noBackground:!0,onClick:function(){return d(f-1)},children:f})},f-1)]}),(0,s.jsx)(o.Z,{ml:1}),(0,s.jsx)(r.Z,{disabled:n===f-1,onClick:function(){return d(n+1)},children:(0,s.jsx)(c.Kw,{size:1.5*a.iI,stroke:u.Av})})]})})}},41143:function(e,n,t){"use strict";var r;t.d(n,{V:function(){return r}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(r||(r={}))},30229:function(e,n,t){"use strict";t.d(n,{TR:function(){return v},U5:function(){return l},Wb:function(){return f},Xm:function(){return o},Z4:function(){return a},fq:function(){return c},gm:function(){return s},kJ:function(){return d}});var r,i,o,u=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var c,l,a=(r={},(0,u.Z)(r,o.API,(function(){return"API"})),(0,u.Z)(r,o.EVENT,(function(){return"event"})),(0,u.Z)(r,o.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(c||(c={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly",e.ALWAYS_ON="@always_on"}(l||(l={}));var s,d,f=[l.ONCE,l.HOURLY,l.DAILY,l.WEEKLY,l.MONTHLY];!function(e){e.INTERVAL="frequency[]",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(s||(s={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(d||(d={}));var v=(i={},(0,u.Z)(i,d.CREATED_AT,"Created at"),(0,u.Z)(i,d.NAME,"Name"),(0,u.Z)(i,d.PIPELINE,"Pipeline"),(0,u.Z)(i,d.STATUS,"Active"),(0,u.Z)(i,d.TYPE,"Type"),i)},82359:function(e,n,t){"use strict";var r,i;t.d(n,{d:function(){return r},k:function(){return i}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2",e.DATA_INTEGRATION_IN_BATCH_PIPELINE="data_integration_in_batch_pipeline",e.INTERACTIONS="interactions",e.LOCAL_TIMEZONE="display_local_timezone",e.OPERATION_HISTORY="operation_history"}(r||(r={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(i||(i={}))},72191:function(e,n,t){"use strict";t.d(n,{_k:function(){return o},bL:function(){return i},l2:function(){return u}});var r=t(70515),i=(r.iI,2*r.iI),o=2.5*r.iI,u=3*r.iI},77174:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(82394),o=t(75582),u=t(38860),c=t.n(u),l=t(82684),a=t(34376),s=t(94629),d=t(55485),f=t(55072),v=t(93808),p=t(82359),h=t(44085),O=t(38276),b=t(30160),g=t(31743),m=t(35686),j=t(30229),E=t(70515),_=t(15610),P=t(69419),y=t(70320),T=t(28598);function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function A(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,i.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}function Z(){var e=(0,a.useRouter)(),n=(0,P.iV)(),t=null!==n&&void 0!==n&&n.page?n.page:0,r=(null===n||void 0===n?void 0:n.order_by)||j.kJ.CREATED_AT,i=m.ZP.projects.list().data,u=(0,l.useMemo)((function(){var e;return null===i||void 0===i||null===(e=i.projects)||void 0===e?void 0:e[0]}),[i]),c=((0,l.useMemo)((function(){var e;return(0,y.h)(null===u||void 0===u||null===(e=u.features)||void 0===e?void 0:e[p.d.LOCAL_TIMEZONE])}),[null===u||void 0===u?void 0:u.features]),{_limit:f.Q,_offset:t*f.Q,order_by:r}),v=m.ZP.pipeline_schedules.list(c,{refreshInterval:7500,revalidateOnFocus:!0}),I=v.data,Z=v.mutate,w=(0,l.useMemo)((function(){return(null===I||void 0===I?void 0:I.pipeline_schedules)||[]}),[I]),N=(0,l.useMemo)((function(){var e;return(null===I||void 0===I||null===(e=I.metadata)||void 0===e?void 0:e.count)||[]}),[I]);return(0,T.jsxs)(s.Z,{title:"Triggers",uuid:"triggers/index",children:[(0,T.jsx)(O.Z,{mx:2,my:1,children:(0,T.jsxs)(d.ZP,{alignItems:"center",children:[(0,T.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Sort runs by:"}),(0,T.jsx)(O.Z,{mr:1}),(0,T.jsx)(h.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(e){e.preventDefault(),(0,_.u7)({order_by:e.target.value,page:0})},paddingRight:4*E.iI,placeholder:"Select column",value:r||j.kJ.CREATED_AT,children:Object.entries(j.TR).map((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1];return(0,T.jsx)("option",{value:t,children:r},t)}))})]})}),(0,T.jsx)(g.Z,{fetchPipelineSchedules:Z,highlightRowOnHover:!0,includeCreatedAtColumn:!0,includePipelineColumn:!0,pipelineSchedules:w,stickyHeader:!0}),(0,T.jsx)(O.Z,{p:2,children:(0,T.jsx)(f.ZP,{maxPages:9,onUpdate:function(t){var r=Number(t),i=A(A({},n),{},{page:r>=0?r:0});e.push("/triggers","/triggers?".concat((0,P.uM)(i)))},page:Number(t),totalPages:Math.ceil(N/f.Q)})})]})}Z.getInitialProps=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,v.Z)(Z)},59733:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/triggers",function(){return t(77174)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},99177:function(e,n,t){"use strict";function r(e,n){return r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},r(e,n)}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&&r(e,n)}t.d(n,{Z:function(){return i}})},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,2083,8013,600,4636,8264,4666,5499,1743,9774,2888,179],(function(){return n=59733,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2858],{94629:function(e,n,r){"use strict";r.d(n,{Z:function(){return w}});var t=r(82394),o=r(21831),i=r(82684),l=r(50724),c=r(82555),s=r(97618),u=r(70613),a=r(94636),d=r(68899),h=r(28598);function f(e,n){var r=e.children,t=e.noPadding;return(0,h.jsx)(d.HS,{noPadding:t,ref:n,children:r})}var m=i.forwardRef(f),v=r(62547),b=r(82571),g=r(35686),p=r(98464),x=r(46684),j=r(70515),Z=r(53808),_=r(19183);function P(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?P(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function C(e,n){var r,t=e.addProjectBreadcrumbToCustomBreadcrumbs,f=e.after,P=e.afterHeader,C=e.afterHidden,w=e.afterWidth,k=e.afterWidthOverride,I=e.appendBreadcrumbs,S=e.before,O=e.beforeWidth,T=e.breadcrumbs,E=e.children,N=e.errors,A=e.headerMenuItems,R=e.headerOffset,M=e.mainContainerHeader,D=e.navigationItems,B=e.setAfterHidden,H=e.setErrors,L=e.subheaderChildren,F=e.subheaderNoPadding,G=e.title,V=e.uuid,U=(0,_.i)().width,Y="dashboard_after_width_".concat(V),W="dashboard_before_width_".concat(V),q=(0,i.useRef)(null),z=(0,i.useState)(k?w:(0,Z.U2)(Y,w)),K=z[0],Q=z[1],X=(0,i.useState)(!1),J=X[0],$=X[1],ee=(0,i.useState)(S?Math.max((0,Z.U2)(W,O),13*j.iI):null),ne=ee[0],re=ee[1],te=(0,i.useState)(!1),oe=te[0],ie=te[1],le=(0,i.useState)(null)[1],ce=g.ZP.projects.list({},{revalidateOnFocus:!1}).data,se=null===ce||void 0===ce?void 0:ce.projects,ue={label:function(){var e;return null===se||void 0===se||null===(e=se[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ae=[];T&&(t&&ae.push(ue),ae.push.apply(ae,(0,o.Z)(T))),(null===T||void 0===T||!T.length||I)&&(null===se||void 0===se?void 0:se.length)>=1&&(null!==T&&void 0!==T&&T.length||ae.unshift({bold:!I,label:function(){return G}}),ae.unshift(ue)),(0,i.useEffect)((function(){null===q||void 0===q||!q.current||J||oe||null===le||void 0===le||le(q.current.getBoundingClientRect().width)}),[J,K,oe,ne,q,le,U]),(0,i.useEffect)((function(){J||(0,Z.t8)(Y,K)}),[C,J,K,Y]),(0,i.useEffect)((function(){oe||(0,Z.t8)(W,ne)}),[oe,ne,W]);var de=(0,p.Z)(w);return(0,i.useEffect)((function(){k&&de!==w&&Q(w)}),[k,w,de]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u.Z,{title:G}),(0,h.jsx)(a.Z,{breadcrumbs:ae,menuItems:A,project:null===se||void 0===se?void 0:se[0],version:null===se||void 0===se||null===(r=se[0])||void 0===r?void 0:r.version}),(0,h.jsxs)(d.Nk,{ref:n,children:[0!==(null===D||void 0===D?void 0:D.length)&&(0,h.jsx)(d.lm,{showMore:!0,children:(0,h.jsx)(b.Z,{navigationItems:D,showMore:!0})}),(0,h.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,h.jsxs)(v.Z,{after:f,afterHeader:P,afterHeightOffset:x.Mz,afterHidden:C,afterMousedownActive:J,afterWidth:K,before:S,beforeHeightOffset:x.Mz,beforeMousedownActive:oe,beforeWidth:d.k1+(S?ne:0),headerOffset:R,hideAfterCompletely:!B,leftOffset:S?d.k1:null,mainContainerHeader:M,mainContainerRef:q,setAfterHidden:B,setAfterMousedownActive:$,setAfterWidth:Q,setBeforeMousedownActive:ie,setBeforeWidth:re,children:[L&&(0,h.jsx)(m,{noPadding:F,children:L}),E]})})]}),N&&(0,h.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,h.jsx)(c.Z,y(y({},N),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}var w=i.forwardRef(C)},85385:function(e,n,r){"use strict";r.d(n,{Qq:function(){return f},Z7:function(){return m},cH:function(){return o},du:function(){return d},fp:function(){return a},j5:function(){return h},uM:function(){return u}});var t,o,i=r(82394),l=r(82359),c=r(72473),s=r(86735),u="sideview",a=90;!function(e){e.ADDON_BLOCKS="addon_blocks",e.BLOCK_SETTINGS="block_settings",e.CALLBACKS="callbacks",e.CHARTS="charts",e.DATA="data",e.EXTENSIONS="power_ups",e.FILE_VERSIONS="file_versions",e.GRAPHS="graphs",e.INTERACTIONS="interactions",e.REPORTS="reports",e.SECRETS="secrets",e.SETTINGS="settings",e.TERMINAL="terminal",e.TREE="tree",e.VARIABLES="variables"}(o||(o={}));o.BLOCK_SETTINGS,o.CALLBACKS,o.CHARTS,o.DATA,o.EXTENSIONS,o.TREE;var d=[o.DATA];function h(e){var n,r,t=[{key:o.TREE,label:"Tree"},{buildLabel:function(e){var n=(e.pipeline||{}).widgets,r=void 0===n?[]:n;return(null===r||void 0===r?void 0:r.length)>=1?"Charts (".concat(r.length,")"):"Charts"},key:o.CHARTS},{buildLabel:function(e){var n=e.variables;return(null===n||void 0===n?void 0:n.length)>=1?"Variables (".concat(n.length,")"):"Variables"},key:o.VARIABLES},{buildLabel:function(e){var n=e.secrets;return(null===n||void 0===n?void 0:n.length)>=1?"Secrets (".concat(n.length,")"):"Secrets"},key:o.SECRETS},{buildLabel:function(e){e.pipeline;return"Add-on blocks"},key:o.ADDON_BLOCKS},{buildLabel:function(e){var n=(e.pipeline||{}).extensions,r=void 0===n?{}:n,t=0;return Object.values(r).forEach((function(e){var n=e.blocks;t+=(null===n||void 0===n?void 0:n.length)||0})),t>=1?"Power ups (".concat(t,")"):"Power ups"},key:o.EXTENSIONS},{key:o.DATA,label:"Data"},{key:o.TERMINAL,label:"Terminal"},{key:o.BLOCK_SETTINGS,label:"Block settings"}];return null!==e&&void 0!==e&&null!==(n=e.project)&&void 0!==n&&null!==(r=n.features)&&void 0!==r&&r[l.d.INTERACTIONS]&&t.push({key:o.INTERACTIONS,label:"Interactions"}),t}function f(e){return(0,s.HK)(h(e),(function(e){return e.key}))}var m=(t={},(0,i.Z)(t,o.ADDON_BLOCKS,c.EJ),(0,i.Z)(t,o.BLOCK_SETTINGS,c.JG),(0,i.Z)(t,o.CALLBACKS,c.AQ),(0,i.Z)(t,o.CHARTS,c.GQ),(0,i.Z)(t,o.DATA,c.iA),(0,i.Z)(t,o.EXTENSIONS,c.Bf),(0,i.Z)(t,o.INTERACTIONS,c.yd),(0,i.Z)(t,o.SECRETS,c.Yo),(0,i.Z)(t,o.SETTINGS,c.Zr),(0,i.Z)(t,o.TERMINAL,c.oI),(0,i.Z)(t,o.TREE,c.mp),(0,i.Z)(t,o.VARIABLES,c.LO),t)},15135:function(e,n,r){"use strict";r.d(n,{JD:function(){return v},Lu:function(){return i},PF:function(){return h},dT:function(){return l},n6:function(){return u},nB:function(){return m},oy:function(){return f},xF:function(){return d}});var t,o,i,l,c=r(82394),s=r(44425);!function(e){e.CSV="csv",e.JSON="json",e.MD="md",e.PY="py",e.R="r",e.SQL="sql",e.TXT="txt",e.YAML="yaml",e.YML="yml"}(i||(i={})),function(e){e.INIT_PY="__init__.py",e.METADATA_YAML="metadata.yaml",e.REQS_TXT="requirements.txt"}(l||(l={}));var u=[i.PY,i.SQL],a=[i.JSON,i.MD,i.PY,i.R,i.SQL,i.TXT,i.YAML,i.YML],d=new RegExp(a.map((function(e){return".".concat(e,"$")})).join("|")),h=(new RegExp(a.map((function(e){return".".concat(e,"$")})).join("|")),"charts"),f="pipelines",m=(t={},(0,c.Z)(t,i.MD,s.t6.MARKDOWN),(0,c.Z)(t,i.JSON,i.JSON),(0,c.Z)(t,i.PY,s.t6.PYTHON),(0,c.Z)(t,i.R,s.t6.R),(0,c.Z)(t,i.SQL,s.t6.SQL),(0,c.Z)(t,i.TXT,"text"),(0,c.Z)(t,i.YAML,s.t6.YAML),(0,c.Z)(t,i.YML,s.t6.YAML),t),v=(o={},(0,c.Z)(o,s.t6.MARKDOWN,i.MD),(0,c.Z)(o,s.t6.PYTHON,i.PY),(0,c.Z)(o,s.t6.R,i.R),(0,c.Z)(o,s.t6.SQL,i.SQL),(0,c.Z)(o,s.t6.YAML,i.YAML),(0,c.Z)(o,"text",i.TXT),o)},26314:function(e,n,r){"use strict";var t;r.d(n,{G:function(){return t}}),function(e){e.ACTIVE_DIRECTORY="active_directory",e.GITHUB="github"}(t||(t={}))},57653:function(e,n,r){"use strict";r.d(n,{$1:function(){return a},G7:function(){return h},LM:function(){return f},Mj:function(){return m},QK:function(){return u},a_:function(){return b},kA:function(){return v},qL:function(){return l},r0:function(){return d}});var t,o,i,l,c=r(82394),s=r(72473);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(l||(l={}));var u,a,d,h=(t={},(0,c.Z)(t,l.INTEGRATION,"Integration"),(0,c.Z)(t,l.PYTHON,"Standard"),(0,c.Z)(t,l.PYSPARK,"PySpark"),(0,c.Z)(t,l.STREAMING,"Streaming"),t),f="all",m=(l.PYTHON,l.INTEGRATION,l.STREAMING,o={},(0,c.Z)(o,f,s.ie),(0,c.Z)(o,l.INTEGRATION,s.YC),(0,c.Z)(o,l.PYTHON,s.El),(0,c.Z)(o,l.STREAMING,s.dB),o);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry",e.RETRY_INCOMPLETE_BLOCK_RUNS="retry_incomplete_block_runs"}(u||(u={})),function(e){e.GROUP="group_by",e.HISTORY_DAYS="from_history_days",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(a||(a={})),function(e){e.STATUS="status",e.TAG="tag",e.TYPE="type"}(d||(d={}));var v=[u.ACTIVE,u.INACTIVE,u.NO_SCHEDULES],b=(i={},(0,c.Z)(i,l.PYTHON,"python3"),(0,c.Z)(i,l.PYSPARK,"pysparkkernel"),i)},82359:function(e,n,r){"use strict";var t,o;r.d(n,{d:function(){return t},k:function(){return o}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2",e.DATA_INTEGRATION_IN_BATCH_PIPELINE="data_integration_in_batch_pipeline",e.INTERACTIONS="interactions",e.LOCAL_TIMEZONE="display_local_timezone",e.OPERATION_HISTORY="operation_history"}(t||(t={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(o||(o={}))},65956:function(e,n,r){"use strict";var t=r(38626),o=r(55485),i=r(38276),l=r(30160),c=r(44897),s=r(42631),u=r(47041),a=r(70515),d=r(28598),h=(0,t.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*a.iI,1.5*a.iI,1.5*a.iI),f=t.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],s.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 "})),m=t.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],s.n_,s.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 ")}),h,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),v=t.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*a.iI,u.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*a.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),b=t.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],s.M8,s.YF,1.75*a.iI);n.Z=function(e){var n=e.borderless,r=e.children,t=e.containerRef,c=e.contentContainerRef,s=e.dark,u=e.footer,a=e.fullHeight,h=void 0===a||a,g=e.fullWidth,p=void 0===g||g,x=e.header,j=e.headerHeight,Z=e.headerIcon,_=e.headerPaddingVertical,P=e.headerTitle,y=e.maxHeight,C=e.maxWidth,w=e.minWidth,k=e.noPadding,I=e.overflowVisible,S=e.subtitle,O=e.success;return(0,d.jsxs)(f,{borderless:n,dark:s,fullHeight:h,fullWidth:p,maxHeight:y,maxWidth:C,minWidth:w,overflowVisible:I,ref:t,success:O,children:[(x||P)&&(0,d.jsxs)(m,{headerPaddingVertical:_,height:j,children:[x&&x,P&&(0,d.jsx)(o.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(o.ZP,{alignItems:"center",children:[Z&&Z,(0,d.jsx)(i.Z,{ml:Z?1:0,children:(0,d.jsx)(l.ZP,{bold:!0,default:!0,children:P})})]})})]}),(0,d.jsxs)(v,{maxHeight:y,noPadding:k,overflowVisible:I,ref:c,children:[S&&(0,d.jsx)(i.Z,{mb:2,children:(0,d.jsx)(l.ZP,{default:!0,children:S})}),r]}),u&&(0,d.jsx)(b,{children:u})]})}},35185:function(e,n,r){"use strict";var t=r(82394),o=r(91835),i=(r(82684),r(38626)),l=r(44897),c=r(42631),s=r(70515),u=r(28598);function a(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function d(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?a(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var h=i.default.div.withConfig({displayName:"ProgressBar__ProgressBarContainerStyle",componentId:"sc-10x9ojc-0"})(["border-radius:","px;height:","px;overflow:hidden;position:relative;width:100%;",""],c.BG,.75*s.iI,(function(e){return"\n background-color: ".concat((e.theme.monotone||l.Z.monotone).grey200,";\n ")})),f=i.default.div.withConfig({displayName:"ProgressBar__ProgressBarStyle",componentId:"sc-10x9ojc-1"})(["height:inherit;position:absolute;"," "," "," ",""],(function(e){return!e.danger&&"\n background-color: ".concat((e.theme.progress||l.Z.progress).positive,";\n ")}),(function(e){return e.progress&&"\n width: ".concat(e.progress,"%;\n ")}),(function(e){return e.danger&&"\n background-color: ".concat((e.theme.progress||l.Z.progress).negative,";\n ")}),(function(e){return e.animateProgress&&"\n animation: animate-progress ".concat(e.animateProgress.duration,"ms linear forwards;\n\n @keyframes animate-progress {\n 0% {\n width: ").concat(e.animateProgress.start,"%;\n }\n\n 100% {\n width: ").concat(e.animateProgress.end,"%;\n }\n }\n ")}));n.Z=function(e){var n=(0,o.Z)({},e);return(0,u.jsx)(h,d(d({},n),{},{children:(0,u.jsx)(f,d({},n))}))}},90299:function(e,n,r){"use strict";r.d(n,{Z:function(){return p}});var t=r(82684),o=r(71180),i=r(55485),l=r(64888),c=r(38276),s=r(30160),u=r(8059),a=r(38626),d=r(44897),h=r(70515),f=r(47041),m=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],h.cd*h.iI,h.cd*h.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),f.w5),v=a.default.div.withConfig({displayName:"indexstyle__SelectedUnderlineStyle",componentId:"sc-segf7l-1"})(["border-radius:6px;height:","px;"," "," ",""],2,(function(e){return!e.selected&&"\n background-color: transparent;\n "}),(function(e){return e.selected&&!e.backgroundColor&&"\n background-color: ".concat((e.theme||d.Z).borders.darkLight,";\n ")}),(function(e){return e.selected&&e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")})),b=r(3314),g=r(28598);var p=function(e){var n=e.allowScroll,r=e.compact,a=e.contained,d=e.noPadding,f=e.onClickTab,p=e.regularSizeText,x=e.selectedTabUUID,j=e.small,Z=e.tabs,_=e.underlineColor,P=e.underlineStyle,y=(0,t.useMemo)((function(){var e=Z.length,n=[];return Z.forEach((function(t,a){var d=t.Icon,m=t.IconSelected,Z=t.label,y=t.uuid,C=y===x,w=C&&m||d,k=Z?Z():y,I=(0,g.jsxs)(i.ZP,{alignItems:"center",children:[w&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(w,{default:!C,size:2*h.iI}),(0,g.jsx)(c.Z,{mr:1})]}),(0,g.jsx)(s.ZP,{bold:!0,default:!C,noWrapping:!0,small:!p,children:k})]});a>=1&&e>=2&&n.push((0,g.jsx)("div",{style:{marginLeft:(p?2:1.5)*h.iI}},"spacing-".concat(y))),C&&!P?n.push((0,g.jsx)(l.Z,{backgroundGradient:u.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:r||j,onClick:function(e){(0,b.j)(e),f(t)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:j,children:I},y)):n.push((0,g.jsxs)(i.ZP,{flexDirection:"column",style:{paddingLeft:2,paddingRight:2,paddingBottom:P?0:2,paddingTop:P?0:2},children:[(0,g.jsxs)(o.Z,{borderLess:!0,compact:r||j,default:!0,noBackground:P,noPadding:P,onClick:function(e){(0,b.j)(e),f(t)},outline:!P,small:j,children:[!P&&I,P&&(0,g.jsx)("div",{style:{paddingBottom:(r||j?h.iI/2:h.iI)+2,paddingTop:(r||j?h.iI/2:h.iI)+2+2},children:I})]}),P&&(0,g.jsx)(v,{backgroundColor:_,selected:C})]},"button-tab-".concat(y)))})),n}),[r,f,x,j,Z,P]),C=(0,g.jsx)(i.ZP,{alignItems:"center",children:y});return a?C:(0,g.jsx)(m,{allowScroll:n,noPadding:d,children:C})}},58024:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return ke}});var t=r(77837),o=r(38860),i=r.n(o),l=r(93808),c=r(82394),s=r(75582),u=r(54407),a=r.n(u),d=r(82684),h=r(69864),f=r(71180),m=r(15338),v=r(55485),b=r(85854),g=r(44085),p=r(38276),x=r(4190),j=r(30160),Z=r(35576),_=r(17488),P=r(12468),y=r(35686),C=r(72473),w="delete",k="fetch",I="merge",S="pull",O="push",T="rebase",E="git_remote_name",N="git_repository_name",A={uuid:"Branches"},R={uuid:"Files"},M={uuid:"Push"},D={uuid:"Setup"},B=[D,A,R,M],H=r(70515),L=r(81728),F=r(72619),G=r(28598);var V=function(e){var n=e.actionRemoteName,r=e.branch,t=e.branches,o=e.fetchBranch,i=e.fetchBranches,l=e.remotes,u=e.setActionRemoteName,a=e.showError,k=(0,d.useState)(""),S=k[0],O=k[1],E=(0,d.useState)(null),N=E[0],A=E[1],M=(0,d.useState)(null),B=M[0],V=M[1],U=(0,d.useState)(null),Y=U[0],W=U[1],q=(0,d.useState)(""),z=q[0],K=q[1],Q=(0,d.useMemo)((function(){return null===l||void 0===l?void 0:l.find((function(e){return e.name===n}))}),[n,l]),X=(0,d.useMemo)((function(){return(null===t||void 0===t?void 0:t.concat((null===Q||void 0===Q?void 0:Q.refs)||[]))||[]}),[t,Q]),J=(0,h.Db)(y.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){o(),i(),K("")},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),$=(0,s.Z)(J,2),ee=$[0],ne=$[1].isLoading,re=(0,h.Db)(y.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){o()},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),te=(0,s.Z)(re,2),oe=te[0],ie=te[1].isLoading,le=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.git_custom_branch.progress;o(),O(""),A(""),V(n),W("")},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),ce=(0,s.Z)(le,2),se=ce[0],ue=ce[1].isLoading;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsxs)(b.Z,{children:["Branches",t?" (".concat(null===t||void 0===t?void 0:t.length,")"):""]}),(0,G.jsx)(p.Z,{mt:H.Mq,children:(0,G.jsxs)(v.ZP,{children:[(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Remote"})}),(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.VW,{}),beforeIconSize:1.5*H.iI,monospace:!0,onChange:function(e){return u(e.target.value)},placeholder:"Choose a remote",value:n||"",children:null===l||void 0===l?void 0:l.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsx)(P.Z,{fullSize:!0,label:"Choose a different branch to switch branches",widthFitContent:!0,children:(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{muted:!1}),beforeIconSize:2*H.iI,monospace:!0,onChange:function(e){return oe({git_custom_branch:{name:e.target.value}})},value:null===r||void 0===r?void 0:r.name,children:(null===r||void 0===r?void 0:r.name)&&(null===t||void 0===t?void 0:t.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)})))})}),(0,G.jsx)(p.Z,{mr:H.cd}),ie&&(0,G.jsx)(x.Z,{inverted:!0})]})]})]})}),(0,G.jsx)(p.Z,{mt:H.Mq,children:(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsx)(_.Z,{label:"New branch name",monospace:!0,onChange:function(e){var n;return K(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:z||""}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.mm,{size:2*H.iI}),disabled:!z,loading:ne,onClick:function(){ee({git_custom_branch:{name:z}})},primary:!0,children:"Create new branch"})]})})]}),(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsx)(b.Z,{children:"Actions"}),(0,G.jsxs)(p.Z,{mt:H.Mq,children:[(0,G.jsxs)(p.Z,{mb:H.Mq,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),(null===r||void 0===r?void 0:r.name)&&(0,G.jsx)(j.ZP,{monospace:!0,children:null===r||void 0===r?void 0:r.name})]}),(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Base branch"})}),(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{}),beforeIconSize:1.5*H.iI,monospace:!0,onChange:function(e){return W(e.target.value)},placeholder:"Choose a branch",value:Y,children:null===X||void 0===X?void 0:X.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Action"})}),(0,G.jsxs)(g.Z,{onChange:function(e){return A(e.target.value)},placeholder:"Choose action",value:N||"",children:[(0,G.jsx)("option",{value:I,children:(0,L.vg)(I)}),(0,G.jsx)("option",{value:T,children:(0,L.vg)(T)}),(0,G.jsx)("option",{value:w,children:(0,L.vg)(w)})]})]})]}),N&&[I,T].includes(N)&&(0,G.jsxs)(p.Z,{mt:H.cd,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsxs)(j.ZP,{bold:!0,muted:!0,children:["Message for ",N]})}),(0,G.jsx)(Z.Z,{monospace:!0,onChange:function(e){return O(e.target.value)},value:S||""})]}),(0,G.jsxs)(p.Z,{mt:H.cd,children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Bf,{size:2*H.iI}),disabled:!N||!Y,loading:ue,onClick:function(){(w!==N||"undefined"!==typeof location&&window.confirm("Are you sure you want to delete branch ".concat(Y,"?")))&&se({git_custom_branch:(0,c.Z)({action_type:N,message:S},N,{base_branch:Y})})},primary:!0,children:N?(0,L.vg)(N):"Execute action"}),B&&(0,G.jsx)(p.Z,{mt:H.cd,children:(0,G.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,children:B})})]})]})]}),(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsx)(p.Z,{mb:H.HN,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsxs)(v.ZP,{children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Hd,{}),linkProps:{href:"/version-control?tab=".concat(D.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:D.uuid}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)(f.Z,{afterIcon:(0,G.jsx)(C.Kw,{}),linkProps:{href:"/version-control?tab=".concat(R.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",R.uuid]})]})]})]})},U=r(90299),Y=r(32013),W=r(98777),q=r(48670),z=r(75499);function K(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Q(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?K(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var X={base_branch:null,body:null,compare_branch:null,repository:null,title:null};var J=function(e){var n=e.actionRemoteName,r=e.branch,t=e.branches,o=e.fetchBranch,i=e.loading,l=e.remotes,u=e.repositories,a=e.repositoryName,P=e.setActionRemoteName,w=e.setRepositoryName,k=e.showError,I=(0,d.useState)((null===r||void 0===r?void 0:r.name)||""),S=I[0],T=I[1],E=(0,d.useState)(null),N=E[0],A=E[1],M=(0,d.useState)(null),D=M[0],B=M[1],V=(0,d.useState)(X),U=V[0],K=V[1],J=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.git_custom_branch,r=n.error,t=n.progress;r?(A(r),B(null)):(o(),A(null),B(t))},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),$=(0,s.Z)(J,2),ee=$[0],ne=$[1].isLoading,re=y.ZP.pull_requests.list({repository:a},{},{pauseFetch:!a}),te=re.data,oe=re.mutate,ie=(0,d.useMemo)((function(){return(null===te||void 0===te?void 0:te.pull_requests)||[]}),[te]),le=(0,d.useMemo)((function(){return(0,G.jsx)(z.Z,{columnFlex:[null,null,null,null],columns:[{uuid:"Title"},{uuid:"Author"},{uuid:"Created"},{uuid:"Last modified"}],onClickRow:function(e){var n,r=null===ie||void 0===ie||null===(n=ie[e])||void 0===n?void 0:n.url;r&&window.open(r,"_blank")},rows:null===ie||void 0===ie?void 0:ie.map((function(e){var n=e.created_at,r=e.last_modified,t=e.title,o=e.url,i=e.user;return[(0,G.jsx)(q.Z,{default:!0,href:o,monospace:!0,openNewWindow:!0,small:!0,children:t},"title"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:i},"user"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:n},"createdAt"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:r||"-"},"lastModified")]})),uuid:"pull-requests"})}),[ie]),ce=y.ZP.git_custom_branches.list({repository:a},{},{pauseFetch:!a}).data,se=(0,d.useMemo)((function(){return(null===ce||void 0===ce?void 0:ce.git_custom_branches)||[]}),[ce]);(0,d.useEffect)((function(){null!==U&&void 0!==U&&U.compare_branch||null===se||void 0===se||!se.find((function(e){return e.name===(null===r||void 0===r?void 0:r.name)}))||K((function(e){return Q(Q({},e),{},{compare_branch:null===r||void 0===r?void 0:r.name})}))}),[r,se,U]);var ue=(0,h.Db)(y.ZP.pull_requests.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){oe(),K(X)},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),ae=(0,s.Z)(ue,2),de=ae[0],he=ae[1].isLoading;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(b.Z,{children:(0,L.vg)(O)})}),(0,G.jsxs)(p.Z,{mt:H.Mq,children:[(0,G.jsxs)(v.ZP,{children:[(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Remote"})}),i&&(0,G.jsx)(x.Z,{inverted:!0}),!i&&(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.VW,{}),beforeIconSize:1.5*H.iI,monospace:!0,onChange:function(e){return P(e.target.value)},placeholder:"Choose remote",value:n||"",children:null===l||void 0===l?void 0:l.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Branch"})}),(0,G.jsxs)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{}),beforeIconSize:1.5*H.iI,monospace:!0,onChange:function(e){return T(e.target.value)},placeholder:"Choose branch",value:S||"",children:[(0,G.jsx)("option",{value:""}),null===t||void 0===t?void 0:t.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,G.jsx)(p.Z,{mt:H.cd,children:(0,G.jsxs)(f.Z,{beforeIcon:(0,G.jsx)(C.Bf,{size:2*H.iI}),disabled:!n||!S,loading:ne,onClick:function(){B(null),ee({git_custom_branch:(0,c.Z)({action_type:O},O,{branch:S,remote:n})})},primary:!0,children:[(0,L.vg)(O)," ",n," ",n&&S]})}),(D||N)&&(0,G.jsx)(p.Z,{mt:H.cd,children:(0,G.jsx)(j.ZP,{danger:!!N,default:!!D,monospace:!0,preWrap:!0,children:D||N})})]})]}),(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(b.Z,{children:"Create pull request"})}),(0,G.jsxs)(p.Z,{mt:H.Mq,children:[i&&(0,G.jsx)(x.Z,{inverted:!0}),!i&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(v.ZP,{children:[(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Repository"})}),(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.fy,{}),beforeIconSize:1.5*H.iI,monospace:!0,onChange:function(e){return w(e.target.value)},placeholder:"Choose repository",value:a||"",children:null===u||void 0===u?void 0:u.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Base branch"})}),a&&!ce&&(0,G.jsx)(x.Z,{inverted:!0}),(!a||ce)&&(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{}),beforeIconSize:1.5*H.iI,disabled:!a,monospace:!0,onChange:function(e){return K((function(n){return Q(Q({},n),{},{base_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===U||void 0===U?void 0:U.base_branch)||"",children:null===se||void 0===se?void 0:se.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),a&&!ce&&(0,G.jsx)(x.Z,{inverted:!0}),(!a||ce||(null===U||void 0===U?void 0:U.compare_branch))&&(0,G.jsxs)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{}),beforeIconSize:1.5*H.iI,disabled:!a,monospace:!0,onChange:function(e){return K((function(n){return Q(Q({},n),{},{compare_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===U||void 0===U?void 0:U.compare_branch)||"",children:[!(null!==se&&void 0!==se&&se.length)&&(null===U||void 0===U?void 0:U.compare_branch)&&(0,G.jsx)("option",{value:null===U||void 0===U?void 0:U.compare_branch,children:null===U||void 0===U?void 0:U.compare_branch}),null===se||void 0===se?void 0:se.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,G.jsx)(p.Z,{mt:1,children:(0,G.jsx)(_.Z,{label:"Title",monospace:!0,onChange:function(e){return K((function(n){return Q(Q({},n),{},{title:e.target.value})}))},value:(null===U||void 0===U?void 0:U.title)||""})}),(0,G.jsx)(p.Z,{mt:1,children:(0,G.jsx)(Z.Z,{label:"Description",monospace:!0,onChange:function(e){return K((function(n){return Q(Q({},n),{},{body:e.target.value})}))},value:(null===U||void 0===U?void 0:U.body)||""})}),(0,G.jsx)(p.Z,{mt:H.cd,children:(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Bf,{size:2*H.iI}),disabled:!a||!(null!==U&&void 0!==U&&U.title)||!(null!==U&&void 0!==U&&U.base_branch)||!(null!==U&&void 0!==U&&U.compare_branch),loading:he,onClick:function(){de({pull_request:Q(Q({},U),{},{repository:a})})},primary:!0,children:"Create new pull request"})})]})]}),(0,G.jsx)(p.Z,{mt:H.Mq,children:(0,G.jsx)(Y.Z,{visibleMapping:{0:!a},children:(0,G.jsxs)(W.Z,{noPaddingContent:!0,title:te?"Pull requests (".concat(null===ie||void 0===ie?void 0:ie.length,")"):"Pull requests",children:[!a&&(0,G.jsx)(p.Z,{p:H.cd,children:(0,G.jsx)(j.ZP,{muted:!0,children:"Please select a repository to view open pull requests."})}),a&&(0,G.jsxs)(G.Fragment,{children:[!te&&(0,G.jsx)(p.Z,{p:H.cd,children:(0,G.jsx)(x.Z,{inverted:!0})}),te&&le]})]})})})]}),(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsx)(p.Z,{mb:H.HN,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsx)(v.ZP,{children:(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Hd,{}),linkProps:{href:"/version-control?tab=".concat(R.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:R.uuid})})]})]})},$=r(94629),ee=r(10553),ne=r(70652),re=r(97618),te=r(38626),oe=te.default.div.withConfig({displayName:"indexstyle__SpacingStyle",componentId:"sc-el09vr-0"})(["margin-top:","px;"],.5*H.iI),ie=r(42122);function le(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function ce(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?le(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var se=function(e){var n=e.branch,r=e.fetchBranch,t=e.modifiedFiles,o=e.setSelectedFilePath,i=e.showError,l=e.stagedFiles,c=e.untrackedFiles,u=(0,d.useRef)(null),a=(0,d.useState)(""),g=a[0],_=a[1],P=(0,d.useState)({}),w=P[0],k=P[1],I=(0,d.useState)({}),S=I[0],O=I[1],T=(0,d.useMemo)((function(){return Object.keys(t).concat(Object.keys(c)).sort()}),[t,c]),E=(0,d.useMemo)((function(){return Object.keys(l||{})}),[l]),N=(0,d.useMemo)((function(){return E.length}),[E]),R=(0,d.useMemo)((function(){return Object.keys(w).length===(null===T||void 0===T?void 0:T.length)}),[w,T]),D=(0,d.useMemo)((function(){return Object.keys(S).length===(null===E||void 0===E?void 0:E.length)}),[S,E]),B=(0,d.useMemo)((function(){return{onErrorCallback:function(e,n){return i({errors:n,response:e})}}}),[i]),V=(0,d.useMemo)((function(){return{onSuccess:function(e){return(0,F.wD)(e,ce({callback:function(){r(),k({})}},B))}}}),[r,B]),U=(0,d.useMemo)((function(){return y.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name)}),[n]),K=(0,h.Db)(U,V),Q=(0,s.Z)(K,2),X=Q[0],J=Q[1].isLoading,$=(0,h.Db)(U,V),ee=(0,s.Z)($,2),te=ee[0],le=ee[1].isLoading,se=(0,h.Db)(U,{onSuccess:function(e){return(0,F.wD)(e,ce({callback:function(){r(),O({})}},B))}}),ue=(0,s.Z)(se,2),ae=ue[0],de=ue[1].isLoading,he=(0,d.useCallback)((function(e,n,r,t,o){var i=(null===e||void 0===e?void 0:e.length)>=1;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(q.Z,{block:!0,noHoverUnderline:!0,onClick:function(){r(o?{}:t)},preventDefault:!0,children:(0,G.jsxs)(v.ZP,{alignItems:"center",flexDirection:"row",children:[(0,G.jsx)(ne.Z,{checked:i&&o,disabled:!i}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(j.ZP,{bold:!0,children:i&&o?"Unselect all":"Select all"})]})}),e.map((function(e){return(0,G.jsx)(oe,{children:(0,G.jsx)(q.Z,{block:!0,noHoverUnderline:!0,onClick:function(){return r((function(n){var r=ce({},n);return!(null!==r&&void 0!==r&&r[e])?r[e]=!0:delete r[e],r}))},preventDefault:!0,children:(0,G.jsxs)(v.ZP,{alignItems:"center",flexDirection:"row",children:[(0,G.jsx)(ne.Z,{checked:!(null===n||void 0===n||!n[e])}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,children:e})]})})},e)}))]})}),[]),fe=(0,d.useMemo)((function(){return(0,ie.Qr)(w)}),[w]),me=y.ZP.git_custom_branches.detail("with_logs",{_format:"with_logs"}),ve=me.data,be=me.mutate,ge=(0,d.useMemo)((function(){var e;return(null===ve||void 0===ve||null===(e=ve.git_custom_branch)||void 0===e?void 0:e.logs)||[]}),[ve]),pe=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){be(),r(),_("")},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),xe=(0,s.Z)(pe,2),je=xe[0],Ze=xe[1].isLoading,_e=(0,d.useMemo)((function(){return(0,G.jsx)(z.Z,{columnFlex:[1,1,1],columns:[{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:ge.map((function(e){var n=e.author,r=e.date,t=e.message;return[(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===n||void 0===n?void 0:n.name},"author"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:r},"date"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:t},"message")]})),uuid:"git-branch-logs"})}),[ge]);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(p.Z,{mb:H.HN,children:(0,G.jsxs)(v.ZP,{children:[(0,G.jsxs)(re.Z,{flex:1,flexDirection:"column",children:[(0,G.jsxs)(b.Z,{children:["Not staged ",(null===T||void 0===T?void 0:T.length)>=1&&"(".concat(null===T||void 0===T?void 0:T.length,")")]}),(0,G.jsx)(p.Z,{my:H.cd,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsx)(p.Z,{mb:H.cd,children:(0,G.jsxs)(v.ZP,{flexDirection:"row",children:[(0,G.jsx)(f.Z,{compact:!0,disabled:fe||de||le,loading:J,onClick:function(){X({git_custom_branch:{action_type:"add",files:Object.keys(w)}}).then((function(e){var n,r=e.data;null!==r&&void 0!==r&&r.git_custom_branch&&(null===u||void 0===u||null===(n=u.current)||void 0===n||n.focus())}))},primary:!0,children:"Add files"}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(f.Z,{compact:!0,disabled:fe||J||de,loading:le,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to undo all changes in the selected files?")&&te({git_custom_branch:{action_type:"checkout",files:Object.keys(w)}})},children:"Checkout files"})]})}),he(T,w,k,ce(ce({},t),c),R)]}),(0,G.jsx)(p.Z,{mr:H.cd}),(0,G.jsxs)(re.Z,{flex:1,flexDirection:"column",children:[(0,G.jsxs)(b.Z,{children:["Staged files ",(null===E||void 0===E?void 0:E.length)>=1&&"(".concat(null===E||void 0===E?void 0:E.length,")")]}),(0,G.jsx)(p.Z,{my:H.cd,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsx)(p.Z,{mb:H.cd,children:(0,G.jsx)(v.ZP,{flexDirection:"row",children:(0,G.jsx)(f.Z,{compact:!0,disabled:(0,ie.Qr)(S)||J||le,loading:de,onClick:function(){ae({git_custom_branch:{action_type:"reset",files:Object.keys(S)}})},secondary:!0,children:"Reset files"})})}),he(E,S,O,l,D)]})]})}),(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(b.Z,{children:"Commit"})}),(0,G.jsx)(p.Z,{mb:H.cd,children:(0,G.jsx)(Y.Z,{children:(0,G.jsx)(W.Z,{noPaddingContent:!0,title:N>=1?"Staged files (".concat(N,")"):"No staged files",children:null===E||void 0===E?void 0:E.map((function(e){return(0,G.jsx)(p.Z,{my:1,px:H.cd,children:(0,G.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,G.jsx)(q.Z,{default:!0,monospace:!0,onClick:function(){return o((function(n){return n===e?null:e}))},warning:null===t||void 0===t?void 0:t[e],children:e}),(0,G.jsx)(p.Z,{mr:1}),(null===t||void 0===t?void 0:t[e])&&(0,G.jsx)(j.ZP,{warning:!0,children:"Modified after staging"})]})},e)}))})})}),(0,G.jsx)(Z.Z,{label:"Commit message",monospace:!0,onChange:function(e){return _(e.target.value)},ref:u,value:g||""}),(0,G.jsx)(p.Z,{mt:H.cd,children:(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsxs)(f.Z,{disabled:0===N||!((null===g||void 0===g?void 0:g.length)>=1),loading:Ze,onClick:function(){je({git_custom_branch:{action_type:"commit",message:g}})},primary:!0,children:["Commit ",(0,L._6)("file",N,!0)," with message"]}),0===N&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(j.ZP,{danger:!0,small:!0,children:"Please stage at least 1 file before committing."})]})]})})]}),(0,G.jsx)(p.Z,{mb:H.HN,children:(0,G.jsx)(Y.Z,{children:(0,G.jsxs)(W.Z,{noPaddingContent:!0,title:"Logs",children:[!ve&&(0,G.jsx)(p.Z,{p:H.cd,children:(0,G.jsx)(x.Z,{inverted:!0})}),ve&&_e]})})}),(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsx)(p.Z,{mb:H.HN,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsxs)(v.ZP,{children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Hd,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:A.uuid}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)(f.Z,{afterIcon:(0,G.jsx)(C.Kw,{}),linkProps:fe?{href:"/version-control?tab=".concat(M.uuid)}:null,noHoverUnderline:!0,primary:fe,sameColorAsText:!0,secondary:!fe,children:["Next: ",M.uuid]})]})]})]})},ue=r(12691),ae=r.n(ue),de=r(34376),he=r(26314),fe=r(69419);var me=function(e){var n=e.actionRemoteName,r=e.branch,t=e.fetchBranch,o=e.loading,i=e.remotes,l=e.setActionRemoteName,u=e.showError,a=(0,de.useRouter)(),Z=(0,d.useRef)(null),P=(0,d.useState)(null),w=P[0],I=P[1],O=(0,d.useState)(null),T=O[0],E=O[1],N=(0,d.useState)(null),R=N[0],M=N[1],D=(0,d.useState)(null),B=D[0],V=D[1],U=(0,d.useState)(!1),K=U[0],Q=U[1],X=(0,d.useState)(null),J=X[0],$=X[1],ee=(0,d.useState)(""),ne=ee[0],te=ee[1],oe=(0,d.useState)(""),ie=oe[0],le=oe[1],ce=(0,d.useState)(null),se=ce[0],ue=ce[1],me=(0,d.useMemo)((function(){return!(null===r||void 0===r||!r.name)}),[r]);(0,d.useEffect)((function(){var e,n;null!==r&&void 0!==r&&null!==(e=r.sync_config)&&void 0!==e&&e.repo_path&&null===se&&ue(null===r||void 0===r||null===(n=r.sync_config)||void 0===n?void 0:n.repo_path)}),[r,se]);var ve=(0,d.useMemo)((function(){var e,r;return null===i||void 0===i||null===(e=i.find((function(e){return e.name===n})))||void 0===e||null===(r=e.refs)||void 0===r?void 0:r.map((function(e){var n=e.name.split("/");return{name:n[n.length-1]}}))}),[n,i]),be=(0,h.Db)(y.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){t(),Q(!1)},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),ge=(0,s.Z)(be,2),pe=ge[0],xe=ge[1].isLoading,je=(0,h.Db)(y.ZP.oauths.useUpdate("github"),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){return window.location.href=window.location.href.split("?")[0]},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),Ze=(0,s.Z)(je,2),_e=Ze[0],Pe=Ze[1].isLoading,ye=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.git_custom_branch,r=n.error,o=n.progress;r?(E(r),V(null)):(t(),I(null),E(null),M(null),V(o))},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),Ce=(0,s.Z)(ye,2),we=Ce[0],ke=Ce[1].isLoading,Ie=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){t(),te(""),le("")},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),Se=(0,s.Z)(Ie,2),Oe=Se[0],Te=Se[1].isLoading,Ee=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){t(),$(null)},onErrorCallback:function(e,n){$(null),u({errors:n,response:e})}})}}),Ne=(0,s.Z)(Ee,2),Ae=Ne[0],Re=Ne[1].isLoading,Me=y.ZP.oauths.detail(he.G.GITHUB,{redirect_uri:encodeURIComponent(window.location.href)}),De=Me.data,Be=Me.mutate,He=(0,d.useMemo)((function(){return(null===De||void 0===De?void 0:De.oauth)||{}}),[De]),Le=(0,h.Db)(y.ZP.oauths.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){Be()},onErrorCallback:function(e,n){u({errors:n,response:e})}})}}),Fe=(0,s.Z)(Le,2),Ge=Fe[0],Ve=Fe[1].isLoading,Ue=((0,fe.iV)()||{}).access_token;(0,d.useEffect)((function(){!He||null!==He&&void 0!==He&&He.authenticated||!Ue||Ge({oauth:{provider:he.G.GITHUB,token:Ue}})}),[Ue,Ge,He]);var Ye=(0,d.useMemo)((function(){return null===i||void 0===i?void 0:i.map((function(e){var r=e.name,t=e.refs,o=e.urls;return(0,G.jsxs)(p.Z,{mt:H.Mq,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,G.jsxs)(re.Z,{alignItems:"center",children:[(0,G.jsx)(j.ZP,{bold:!0,children:r}),(0,G.jsx)(p.Z,{mx:1,children:(0,G.jsx)(C._Q,{muted:!0})}),null===o||void 0===o?void 0:o.map((function(e){return(0,G.jsx)(p.Z,{mr:1,children:(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:e})},e)}))]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(f.Z,{compact:!0,disabled:Re&&J!==r,iconOnly:!0,loading:Re&&J===r,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to remove remote ".concat(r,"?"))&&($(r),Ae({git_custom_branch:{action_type:"remove_remote",remote:{name:r}}}).then((function(){n===r&&l(null)})))},small:!0,title:"Remote remote ".concat(r),children:(0,G.jsx)(C.rF,{})})]})}),(0,G.jsx)(Y.Z,{children:(0,G.jsxs)(W.Z,{noPaddingContent:!0,smallTitle:!0,title:"Refs (".concat(null===t||void 0===t?void 0:t.length,")"),children:[0===(null===t||void 0===t?void 0:t.length)&&(0,G.jsx)(p.Z,{p:H.cd,children:(0,G.jsx)(j.ZP,{muted:!0,children:"This remote has no refs."})}),(null===t||void 0===t?void 0:t.length)>=1&&(0,G.jsx)(z.Z,{columnFlex:[1,1,1],columns:[{uuid:"Ref"},{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:t.map((function(e){var n,r=e.commit,t=e.name;return[(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:t},"ref-name"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r||null===(n=r.author)||void 0===n?void 0:n.name},"author"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r?void 0:r.date},"date"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r?void 0:r.message},"message")]})),uuid:"git-branch-remotes-refs"})]})}),(0,G.jsx)(p.Z,{mt:H.Mq,children:(0,G.jsx)(m.Z,{light:!0})})]},r)}))}),[Re,J,i,Ae]);return(0,G.jsxs)(G.Fragment,{children:[De&&(0,G.jsxs)(p.Z,{mb:H.HN,children:[(null===He||void 0===He?void 0:He.authenticated)&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.fy,{size:2*H.iI}),disabled:!0,children:"Successfully authenticated with GitHub"}),(0,G.jsx)(p.Z,{my:1,children:(0,G.jsx)(j.ZP,{muted:!0,children:"You can pull, push, and create pull requests on GitHub."})}),(0,G.jsx)(f.Z,{loading:Pe,onClick:function(){return _e({oauth:{action_type:"reset"}})},warning:!0,children:"Reset GitHub authentication"})]}),!(null!==He&&void 0!==He&&He.authenticated)&&(null===He||void 0===He?void 0:He.url)&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.fy,{size:2*H.iI}),loading:Ve,onClick:function(){return a.push(null===He||void 0===He?void 0:He.url)},primary:!0,children:"Authenticate with GitHub"}),(0,G.jsx)(p.Z,{mt:1,children:(0,G.jsx)(j.ZP,{muted:!0,children:"Authenticating with GitHub will allow you to pull, push, and create pull requests on GitHub."})})]})]}),(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsx)(b.Z,{children:"Setup"}),(0,G.jsxs)(p.Z,{mt:H.Mq,children:[(0,G.jsxs)(p.Z,{mb:1,children:[(0,G.jsx)(j.ZP,{bold:!0,large:!0,children:me?"Git init directory":"Initialize Git directory"}),!me&&(0,G.jsxs)(j.ZP,{muted:!0,children:["Enter the directory you want to initialize git in. For example, ",(0,G.jsx)(j.ZP,{bold:!0,inline:!0,monospace:!0,muted:!0,children:"/home/src/default_repo"}),"."]}),me&&(0,G.jsxs)(j.ZP,{muted:!0,children:["If the directory below is blank, then the current working directory will be used to initialize git.",(0,G.jsx)("br",{}),"If git hasn\u2019t been initialized in the directory below, Mage will automatically run git init for you."]})]}),(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsx)(_.Z,{disabled:me&&!K,label:"Git directory",monospace:!0,onChange:function(e){return ue(e.target.value)},ref:Z,value:se||""}),(0,G.jsx)(p.Z,{mr:1}),(!me||K)&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(f.Z,{compact:!0,disabled:!me&&!se,loading:xe,onClick:function(){pe({sync:{repo_path:se}})},primary:!0,small:!0,children:"Save"}),me&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(q.Z,{onClick:function(){return Q(!1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Cancel"})]})]}),me&&!K&&(0,G.jsx)(q.Z,{onClick:function(){Q(!0),setTimeout((function(){var e;return null===Z||void 0===Z||null===(e=Z.current)||void 0===e?void 0:e.focus()}),1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Edit"})]})]})]}),me&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsxs)(b.Z,{children:["Remotes",!o&&i?" (".concat(null===i||void 0===i?void 0:i.length,")"):""]}),o&&(0,G.jsx)(p.Z,{mt:H.Mq,children:(0,G.jsx)(x.Z,{inverted:!0})}),!o&&Ye,(0,G.jsx)(p.Z,{mt:H.Mq,children:(0,G.jsxs)(v.ZP,{alignItems:"flex-start",children:[(0,G.jsx)(_.Z,{label:"New remote name",monospace:!0,onChange:function(e){var n;return te(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:ne||""}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)(v.ZP,{flexDirection:"column",children:[(0,G.jsx)(_.Z,{label:"Remote URL",monospace:!0,onChange:function(e){var n;return le(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:ie||""}),(0,G.jsx)(p.Z,{mt:1,children:(0,G.jsxs)(j.ZP,{muted:!0,small:!0,children:["Use the https URL if you",(0,G.jsx)("br",{}),"authenticated with GitHub above."]})})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.mm,{size:2*H.iI}),disabled:!ne||!ie,loading:Te,onClick:function(){Oe({git_custom_branch:{action_type:"add_remote",remote:{name:ne,url:ie}}})},primary:!0,children:"Create new remote"})]})})]}),(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsx)(b.Z,{children:"Actions"}),(0,G.jsxs)(p.Z,{mt:H.Mq,children:[(0,G.jsxs)(p.Z,{mb:H.Mq,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(null===r||void 0===r?void 0:r.name)&&(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsx)(j.ZP,{monospace:!0,children:null===r||void 0===r?void 0:r.name}),(0,G.jsx)(p.Z,{mr:H.cd}),(0,G.jsx)(ae(),{href:"/version-control?tab=".concat(A.uuid),passHref:!0,children:(0,G.jsx)(q.Z,{small:!0,children:"Switch branch"})})]})]}),(0,G.jsxs)(v.ZP,{children:[(0,G.jsxs)(g.Z,{onChange:function(e){return M(e.target.value)},placeholder:"Action",value:R||"",children:[(0,G.jsx)("option",{value:k,children:(0,L.vg)(k)}),(0,G.jsx)("option",{value:S,children:(0,L.vg)(S)}),(0,G.jsx)("option",{value:"reset",children:(0,L.vg)("reset --hard")})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.VW,{}),beforeIconSize:1.5*H.iI,monospace:!0,onChange:function(e){return l(e.target.value)},placeholder:"Remote",value:n||"",children:null===i||void 0===i?void 0:i.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))}),R!==k&&(0,G.jsx)(p.Z,{ml:1,children:(0,G.jsxs)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{}),beforeIconSize:1.5*H.iI,monospace:!0,onChange:function(e){return I(e.target.value)},value:w||"",children:[(0,G.jsx)("option",{value:"",children:"All branches"}),null===ve||void 0===ve?void 0:ve.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))]})})]}),(0,G.jsxs)(p.Z,{mt:H.cd,children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Bf,{size:2*H.iI}),disabled:!R||!n,loading:ke,onClick:function(){V(null),we({git_custom_branch:(0,c.Z)({action_type:R},R,{branch:w,remote:n})})},primary:!0,children:R?(0,L.vg)(R):"Execute action"}),(B||T)&&(0,G.jsx)(p.Z,{mt:H.cd,children:(0,G.jsx)(j.ZP,{danger:!!T,default:!!B,monospace:!0,preWrap:!0,children:B||T})})]})]})]}),(0,G.jsxs)(p.Z,{mb:H.HN,children:[(0,G.jsx)(p.Z,{mb:H.HN,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsx)(v.ZP,{children:(0,G.jsxs)(f.Z,{afterIcon:(0,G.jsx)(C.Kw,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",A.uuid]})})]})]})]})},ve=r(95363),be=te.default.div.withConfig({displayName:"indexstyle__DiffContainerStyle",componentId:"sc-1fo4nus-0"})(["pre{font-family:",";}"],ve.Vp),ge={codeFoldGutter:{},content:{},contentText:{},diffAdded:{},diffContainer:{},diffRemoved:{},emptyGutter:{},emptyLine:{},gutter:{},highlightedGutter:{},highlightedLine:{},line:{},lineNumber:{},marker:{},splitView:{},titleBlock:{},variables:{dark:{addedBackground:"#044B53",addedColor:"white",addedGutterBackground:"#034148",addedGutterColor:"#8c8c8c",codeFoldBackground:"#262831",codeFoldContentColor:"#555a7b",codeFoldGutterBackground:"#21232b",diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",diffViewerTitleBackground:"#2f323e",diffViewerTitleBorderColor:"#353846",diffViewerTitleColor:"#555a7b",emptyLineBackground:"#363946",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",gutterColor:"#464c67",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",removedBackground:"#632F34",removedColor:"white",removedGutterBackground:"#632b30",removedGutterColor:"#8c8c8c",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f"},light:{addedBackground:"#e6ffed",addedColor:"#24292e",addedGutterBackground:"#cdffd8",addedGutterColor:"#212529",codeFoldBackground:"#f1f8ff",codeFoldContentColor:"#212529",codeFoldGutterBackground:"#dbedff",diffViewerBackground:"#fff",diffViewerColor:"212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleBorderColor:"#eee",diffViewerTitleColor:"#212529",emptyLineBackground:"#fafbfc",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",gutterColor:"#212529",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",removedBackground:"#ffeef0",removedColor:"#24292e",removedGutterBackground:"#ffdce0",removedGutterColor:"#212529",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0"}},wordAdded:{},wordDiff:{},wordRemoved:{}},pe=r(53808),xe=r(53005),je=r(15610),Ze=r(86735),_e=r(23780);function Pe(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function ye(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var Ce=function(){var e=(0,d.useRef)(null),n=(0,d.useRef)(null),r=(0,_e.VI)(null,{},[],{uuid:"VersionControlPage"}),t=(0,s.Z)(r,1)[0],o=(0,d.useState)(null),i=o[0],l=o[1],h=(0,d.useState)(null),f=h[0],v=h[1],b=(0,d.useState)(B[0]),Z=b[0],_=b[1],C=(0,fe.iV)();(0,d.useEffect)((function(){null!==C&&void 0!==C&&C.tab&&_(B.find((function(e){return e.uuid===(null===C||void 0===C?void 0:C.tab)})))}),[C]);var w=y.ZP.git_custom_branches.list({include_remote_branches:1}),k=w.data,I=w.mutate,S=(0,d.useMemo)((function(){return null===k||void 0===k?void 0:k.git_custom_branches}),[k]),O=y.ZP.git_custom_branches.detail("current",{_format:"with_files"}),T=O.data,L=O.mutate,F=(0,d.useMemo)((function(){return(null===T||void 0===T?void 0:T.git_custom_branch)||{}}),[T]),Y=(0,d.useMemo)((function(){return(null===F||void 0===F?void 0:F.files)||[]}),[F]),W=y.ZP.git_custom_branches.detail("with_remotes",{_format:"with_remotes"}),q=W.data,z=W.mutate,K=(0,d.useMemo)((function(){return null===q||void 0===q?void 0:q.git_custom_branch}),[q]),Q=(0,d.useMemo)((function(){return(null===K||void 0===K?void 0:K.remotes)||[]}),[K]),X=(0,d.useState)(null),ne=X[0],re=X[1],te=(0,d.useCallback)((function(e){(0,pe.t8)(E,e),re(e)}),[]);(0,d.useEffect)((function(){var e=(0,pe.U2)(E,null);if(q&&e){var n=null===Q||void 0===Q?void 0:Q.find((function(n){return n.name===e}));te(n?null===n||void 0===n?void 0:n.name:null)}}),[q,Q,te]);var oe=(0,d.useState)((0,pe.U2)(N,"")),le=oe[0],ce=oe[1],ue=(0,d.useCallback)((function(e){(0,pe.t8)(N,e),ce(e)}),[]),ae=(0,d.useMemo)((function(){return(0,Ze.Tw)(Q.reduce((function(e,n){var r;return e.concat((null===n||void 0===n||null===(r=n.repository_names)||void 0===r?void 0:r.map((function(e){var r;return{name:e,url:null===n||void 0===n||null===(r=n.urls)||void 0===r?void 0:r[0]}})))||[])}),[]),(function(e){return e.name}))}),[Q]);(0,d.useEffect)((function(){var e=(0,pe.U2)(N,null);if(q&&e){var n=null===ae||void 0===ae?void 0:ae.find((function(n){return n.name===e}));ue(n?null===n||void 0===n?void 0:n.name:null)}}),[q,ae,ue]);var de=y.ZP.git_files.detail(f?encodeURIComponent(f):null,{base_branch:i}),he=de.data,ve=de.mutate,Pe=(0,d.useMemo)((function(){return null===he||void 0===he?void 0:he.git_file}),[he]);(0,d.useEffect)((function(){i&&ve()}),[i,ve]),(0,d.useEffect)((function(){null!==he&&void 0!==he&&he.error&&t({errors:null===he||void 0===he?void 0:he.error,response:he})}),[he,t]);var Ce=(0,d.useMemo)((function(){var e,n,r;return{modifiedFiles:null===F||void 0===F||null===(e=F.modified_files)||void 0===e?void 0:e.reduce((function(e,n){return ye(ye({},e),{},(0,c.Z)({},n,!0))}),{}),stagedFiles:null===F||void 0===F||null===(n=F.staged_files)||void 0===n?void 0:n.reduce((function(e,n){return ye(ye({},e),{},(0,c.Z)({},n,!0))}),{}),untrackedFiles:null===F||void 0===F||null===(r=F.untracked_files)||void 0===r?void 0:r.reduce((function(e,n){return ye(ye({},e),{},(0,c.Z)({},n,!0))}),{})}}),[F]),we=Ce.modifiedFiles,ke=void 0===we?{}:we,Ie=Ce.stagedFiles,Se=void 0===Ie?{}:Ie,Oe=Ce.untrackedFiles,Te=void 0===Oe?{}:Oe;(0,d.useEffect)((function(){f&&(0,ie.Qr)(ke)&&(0,ie.Qr)(Se)&&(0,ie.Qr)(Te)&&v(null)}),[ke,f,Se,Te]);var Ee=(0,d.useMemo)((function(){return(null===Y||void 0===Y?void 0:Y.length)>=1?(0,G.jsx)(ee.Z,{allowEmptyFolders:!0,disableContextMenu:!0,fetchFileTree:L,files:Y,isFileDisabled:function(){return!1},onClickFile:function(e){v((function(r){if(!r||r!==e){var t;if(!i)null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus();return e}return null}))},ref:e,renderAfterContent:function(e){var n,r,t=e.children,o=(null===t||void 0===t?void 0:t.length)>=1,i=(0,xe.a9)(e);o&&(i="".concat(i,"/"));var l={};return null!==ke&&void 0!==ke&&ke[i]?(n="M",r="Modified",l.warning=!0):null!==Te&&void 0!==Te&&Te[i]?(n="U",r="Untracked",l.danger=!0):null!==Se&&void 0!==Se&&Se[i]&&(n="S",r="Staged",l.success=!0),o&&!n?null:(0,G.jsx)(p.Z,{mx:1,children:(0,G.jsx)(P.Z,{appearBefore:!0,label:r,widthFitContent:!0,children:(0,G.jsx)(j.ZP,ye(ye({},l),{},{monospace:!0,rightAligned:!0,small:!0,children:n}))})})},useRootFolder:!0}):(0,G.jsx)(p.Z,{p:H.cd,children:(0,G.jsx)(j.ZP,{monospace:!0,muted:!0,children:"No files modified"})})}),[i,L,e,Y,ke,n,v,Se,Te]),Ne=(0,d.useMemo)((function(){return!he||!Pe||f&&(null===Pe||void 0===Pe?void 0:Pe.filename)!==f}),[he,Pe,f]),Ae=(0,d.useMemo)((function(){if(!f)return null;var e=Pe||{},n=e.content,r=e.content_from_base;return(0,G.jsxs)(be,{children:[!i&&(0,G.jsx)(p.Z,{p:H.cd,children:(0,G.jsx)(j.ZP,{muted:!0,children:"Please select a base branch to see the file diffs."})}),(null===Pe||void 0===Pe?void 0:Pe.error)&&(0,G.jsx)(p.Z,{p:H.cd,children:(0,G.jsx)(j.ZP,{danger:!0,monospace:!0,preWrap:!0,children:null===Pe||void 0===Pe?void 0:Pe.error})}),i&&!(null!==Pe&&void 0!==Pe&&Pe.error)&&(0,G.jsxs)(G.Fragment,{children:[Ne&&(0,G.jsx)(p.Z,{p:H.cd,children:(0,G.jsx)(x.Z,{inverted:!0})}),!Ne&&(0,G.jsx)(a(),{compareMethod:u.DiffMethod.WORDS,newValue:n||"",oldValue:r||"",renderContent:function(e){return(0,G.jsx)(j.ZP,{monospace:!0,children:e})},splitView:!0,styles:ge,useDarkTheme:!0})]})]})}),[i,Pe,Ne,f]),Re=(0,d.useMemo)((function(){return T&&null!==F&&void 0!==F&&F.name?B:B.slice(0,1)}),[F,T]),Me=(0,d.useMemo)((function(){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)("div",{style:{marginBottom:.5*H.iI,marginTop:.5*H.iI},children:(0,G.jsx)(U.Z,{compact:!0,onClickTab:function(e){var n=e.uuid;(0,je.u7)({tab:n})},selectedTabUUID:null===Z||void 0===Z?void 0:Z.uuid,tabs:Re})}),(0,G.jsx)(m.Z,{light:!0})]})}),[Z,Re]),De=(0,d.useMemo)((function(){return(0,G.jsx)(me,{actionRemoteName:ne,branch:F,fetchBranch:function(){L(),z()},loading:!q,remotes:Q,setActionRemoteName:te,showError:t})}),[ne,F,q,L,z,Q,te,t]),Be=(0,d.useMemo)((function(){return(0,G.jsx)(V,{actionRemoteName:ne,branch:F,branches:S,fetchBranch:L,fetchBranches:I,remotes:Q,setActionRemoteName:te,showError:t})}),[ne,F,S,L,I,Q,te,t]),He=(0,d.useMemo)((function(){return(0,G.jsx)(se,{branch:F,fetchBranch:L,modifiedFiles:ke,setSelectedFilePath:v,showError:t,stagedFiles:Se,untrackedFiles:Te})}),[F,L,ke,v,t,Se,Te]),Le=(0,d.useMemo)((function(){return(0,G.jsx)(J,{actionRemoteName:ne,branch:F,branches:S,fetchBranch:L,loading:!q,modifiedFiles:ke,remotes:Q,repositories:ae,repositoryName:le,setActionRemoteName:te,setRepositoryName:ue,showError:t,stagedFiles:Se})}),[ne,F,S,q,L,ke,Q,ae,le,te,ue,t,Se]);return(0,G.jsx)($.Z,{after:Ae,afterHidden:!f,afterWidth:40*H.iI,before:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(p.Z,{p:1,children:(0,G.jsx)(g.Z,{compact:!0,label:"Base branch",onChange:function(e){return l(e.target.value)},ref:n,small:!0,value:i||"",children:null===S||void 0===S?void 0:S.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})}),Ee]}),mainContainerHeader:Me,title:"Version control",uuid:"Version control/index",children:(0,G.jsxs)(p.Z,{p:H.cd,children:[!T&&(0,G.jsx)(x.Z,{inverted:!0}),T&&(0,G.jsxs)(G.Fragment,{children:[D.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&De,A.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&Be,R.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&He,M.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&Le]})]})})};function we(){return(0,G.jsx)(Ce,{})}we.getInitialProps=(0,t.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var ke=(0,l.Z)(we)},75302:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/version-control",function(){return r(58024)}])}},function(e){e.O(0,[844,2083,7011,8478,8013,600,4636,8264,4666,5499,4839,553,9774,2888,179],(function(){return n=75302,e(e.s=n);var n}));var n=e.O();_N_E=n}]);