mage-ai 0.9.46__py3-none-any.whl → 0.9.47__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.
Files changed (309) hide show
  1. mage_ai/api/operations/base.py +27 -5
  2. mage_ai/api/policies/GlobalHookPolicy.py +1 -1
  3. mage_ai/api/policies/IntegrationSourcePolicy.py +62 -0
  4. mage_ai/api/policies/OauthPolicy.py +6 -6
  5. mage_ai/api/presenters/GlobalHookPresenter.py +1 -1
  6. mage_ai/api/presenters/IntegrationSourcePresenter.py +9 -2
  7. mage_ai/api/presenters/PipelinePresenter.py +2 -0
  8. mage_ai/api/presenters/PipelineRunPresenter.py +8 -3
  9. mage_ai/api/presenters/PipelineSchedulePresenter.py +22 -1
  10. mage_ai/api/resources/BlockResource.py +5 -0
  11. mage_ai/api/resources/DataProviderResource.py +2 -0
  12. mage_ai/api/resources/IntegrationSourceResource.py +149 -2
  13. mage_ai/data_integrations/sources/constants.py +5 -0
  14. mage_ai/data_integrations/utils/scheduler.py +57 -2
  15. mage_ai/data_preparation/executors/block_executor.py +9 -1
  16. mage_ai/data_preparation/models/block/__init__.py +25 -12
  17. mage_ai/data_preparation/models/block/data_integration/constants.py +3 -0
  18. mage_ai/data_preparation/models/block/data_integration/utils.py +196 -37
  19. mage_ai/data_preparation/models/block/sql/utils/shared.py +18 -1
  20. mage_ai/data_preparation/models/block/utils.py +28 -13
  21. mage_ai/data_preparation/models/global_hooks/constants.py +50 -1
  22. mage_ai/data_preparation/models/global_hooks/models.py +148 -84
  23. mage_ai/data_preparation/models/global_hooks/predicates.py +316 -0
  24. mage_ai/data_preparation/models/pipeline.py +2 -0
  25. mage_ai/data_preparation/models/pipelines/integration_pipeline.py +0 -1
  26. mage_ai/data_preparation/preferences.py +29 -18
  27. mage_ai/data_preparation/repo_manager.py +12 -2
  28. mage_ai/data_preparation/sync/__init__.py +2 -0
  29. mage_ai/data_preparation/templates/constants.py +14 -0
  30. mage_ai/data_preparation/templates/data_exporters/chroma.py +24 -0
  31. mage_ai/data_preparation/templates/data_exporters/streaming/rabbitmq.yaml +7 -0
  32. mage_ai/data_preparation/templates/data_loaders/chroma.py +27 -0
  33. mage_ai/data_preparation/templates/repo/io_config.yaml +3 -0
  34. mage_ai/io/base.py +1 -0
  35. mage_ai/io/chroma.py +153 -0
  36. mage_ai/io/config.py +8 -0
  37. mage_ai/orchestration/db/models/schedules.py +98 -34
  38. mage_ai/orchestration/pipeline_scheduler.py +58 -19
  39. mage_ai/server/constants.py +1 -1
  40. mage_ai/server/frontend_dist/404.html +2 -2
  41. mage_ai/server/frontend_dist/_next/static/N3FS4bHv0jpYeeg672uYK/_buildManifest.js +1 -0
  42. mage_ai/server/frontend_dist/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
  43. mage_ai/server/frontend_dist/_next/static/chunks/{1952-ac7722e8b1ab88fe.js → 1952-57858e7445d24413.js} +1 -1
  44. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
  45. mage_ai/server/frontend_dist/_next/static/chunks/2717-92cdffd87b6f6e05.js +1 -0
  46. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3419-f8d518d024e7b5c8.js → frontend_dist/_next/static/chunks/3419-715ca383fa15a5ef.js} +1 -1
  47. mage_ai/server/frontend_dist/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
  48. mage_ai/server/frontend_dist/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
  49. mage_ai/server/frontend_dist/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
  50. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4366-93e09e5a4a7e182c.js → frontend_dist/_next/static/chunks/4366-3e52497942acbafe.js} +1 -1
  51. mage_ai/server/frontend_dist/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
  52. mage_ai/server/frontend_dist/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
  53. mage_ai/server/frontend_dist/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
  54. mage_ai/server/frontend_dist/_next/static/chunks/{6285-e9b45335bfb9ccaf.js → 6285-648f9a732e100b2f.js} +1 -1
  55. mage_ai/server/frontend_dist/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
  56. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
  57. mage_ai/server/frontend_dist/_next/static/chunks/722-900f786d24f91b2e.js +1 -0
  58. mage_ai/server/frontend_dist/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
  59. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/8146-92e7ccfed169ee9c.js → frontend_dist/_next/static/chunks/8146-27f0e31f309897a5.js} +1 -1
  60. mage_ai/server/frontend_dist/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
  61. mage_ai/server/frontend_dist/_next/static/chunks/8487-8e1c09546dff4dbf.js +1 -0
  62. mage_ai/server/frontend_dist/_next/static/chunks/9264-cc44b07f248707b0.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
  64. mage_ai/server/frontend_dist/_next/static/chunks/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
  65. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
  68. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{files-449a022f2f0f2d94.js → files-fe6e73463a20d67c.js} +1 -1
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/{manage-f83deb790548693b.js → manage-d8a38b5d1f50e798.js} +1 -1
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
  74. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e051057d9fe94f23.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js} +1 -1
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
  76. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
  84. mage_ai/server/frontend_dist/block-layout.html +2 -2
  85. mage_ai/server/frontend_dist/compute.html +5 -5
  86. mage_ai/server/frontend_dist/files.html +5 -5
  87. mage_ai/server/frontend_dist/global-data-products/[...slug].html +5 -5
  88. mage_ai/server/frontend_dist/global-data-products.html +5 -5
  89. mage_ai/server/frontend_dist/global-hooks/[...slug].html +5 -5
  90. mage_ai/server/frontend_dist/global-hooks.html +5 -5
  91. mage_ai/server/frontend_dist/index.html +2 -2
  92. mage_ai/server/frontend_dist/manage/files.html +5 -5
  93. mage_ai/server/frontend_dist/manage/settings.html +5 -5
  94. mage_ai/server/frontend_dist/manage/users/[user].html +5 -5
  95. mage_ai/server/frontend_dist/manage/users/new.html +5 -5
  96. mage_ai/server/frontend_dist/manage/users.html +5 -5
  97. mage_ai/server/frontend_dist/manage.html +5 -5
  98. mage_ai/server/frontend_dist/oauth.html +4 -4
  99. mage_ai/server/frontend_dist/overview.html +5 -5
  100. mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
  101. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  102. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
  103. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +5 -5
  104. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  105. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
  106. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  107. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  108. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
  109. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
  110. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
  111. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +5 -5
  112. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
  113. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  114. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
  115. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  116. mage_ai/server/frontend_dist/pipelines.html +5 -5
  117. mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
  118. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +5 -5
  119. mage_ai/server/frontend_dist/settings/workspace/permissions.html +5 -5
  120. mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
  121. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +5 -5
  122. mage_ai/server/frontend_dist/settings/workspace/roles.html +5 -5
  123. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +5 -5
  124. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +5 -5
  125. mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
  126. mage_ai/server/frontend_dist/settings.html +2 -2
  127. mage_ai/server/frontend_dist/sign-in.html +20 -20
  128. mage_ai/server/frontend_dist/templates/[...slug].html +5 -5
  129. mage_ai/server/frontend_dist/templates.html +5 -5
  130. mage_ai/server/frontend_dist/terminal.html +5 -5
  131. mage_ai/server/frontend_dist/test.html +5 -5
  132. mage_ai/server/frontend_dist/triggers.html +5 -5
  133. mage_ai/server/frontend_dist/version-control.html +5 -5
  134. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  135. mage_ai/server/frontend_dist_base_path_template/_next/static/aoO6jYZLVlUGCCdY-wmy8/_buildManifest.js +1 -0
  136. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
  137. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1952-ac7722e8b1ab88fe.js → 1952-57858e7445d24413.js} +1 -1
  138. mage_ai/server/{frontend_dist/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist_base_path_template/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
  139. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-92cdffd87b6f6e05.js +1 -0
  140. mage_ai/server/{frontend_dist/_next/static/chunks/3419-f8d518d024e7b5c8.js → frontend_dist_base_path_template/_next/static/chunks/3419-715ca383fa15a5ef.js} +1 -1
  141. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
  142. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
  143. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
  144. mage_ai/server/{frontend_dist/_next/static/chunks/4366-93e09e5a4a7e182c.js → frontend_dist_base_path_template/_next/static/chunks/4366-3e52497942acbafe.js} +1 -1
  145. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
  146. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
  147. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
  148. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{6285-e9b45335bfb9ccaf.js → 6285-648f9a732e100b2f.js} +1 -1
  149. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
  150. mage_ai/server/{frontend_dist/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist_base_path_template/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
  151. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-900f786d24f91b2e.js +1 -0
  152. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
  153. mage_ai/server/{frontend_dist/_next/static/chunks/8146-92e7ccfed169ee9c.js → frontend_dist_base_path_template/_next/static/chunks/8146-27f0e31f309897a5.js} +1 -1
  154. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
  155. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-8e1c09546dff4dbf.js +1 -0
  156. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-cc44b07f248707b0.js +1 -0
  157. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
  158. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
  159. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
  160. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
  161. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
  162. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
  163. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{files-449a022f2f0f2d94.js → files-fe6e73463a20d67c.js} +1 -1
  164. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{manage-f83deb790548693b.js → manage-d8a38b5d1f50e798.js} +1 -1
  165. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
  166. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
  167. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
  168. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e051057d9fe94f23.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js} +1 -1
  169. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
  170. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
  173. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
  174. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
  178. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  179. mage_ai/server/frontend_dist_base_path_template/compute.html +5 -5
  180. mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
  181. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
  182. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
  183. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +5 -5
  184. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +5 -5
  185. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  186. mage_ai/server/frontend_dist_base_path_template/manage/files.html +5 -5
  187. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
  188. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
  189. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
  190. mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
  191. mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
  192. mage_ai/server/frontend_dist_base_path_template/oauth.html +4 -4
  193. mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
  194. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
  195. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  196. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
  197. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
  198. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  199. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
  200. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  201. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  202. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
  203. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
  204. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
  205. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
  206. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
  207. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  208. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
  209. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  210. mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
  211. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
  212. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +5 -5
  213. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +5 -5
  214. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
  215. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +5 -5
  216. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +5 -5
  217. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
  218. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +5 -5
  219. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
  220. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  221. mage_ai/server/frontend_dist_base_path_template/sign-in.html +23 -23
  222. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
  223. mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
  224. mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
  225. mage_ai/server/frontend_dist_base_path_template/test.html +5 -5
  226. mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
  227. mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
  228. mage_ai/server/server.py +9 -3
  229. mage_ai/services/k8s/job_manager.py +1 -0
  230. mage_ai/settings/repo.py +3 -0
  231. mage_ai/shared/files.py +47 -0
  232. mage_ai/shared/models.py +1 -0
  233. mage_ai/streaming/constants.py +1 -0
  234. mage_ai/streaming/sinks/postgres.py +2 -0
  235. mage_ai/streaming/sinks/rabbitmq.py +76 -0
  236. mage_ai/streaming/sinks/sink_factory.py +4 -0
  237. mage_ai/tests/api/operations/test_operations_with_hooks.py +136 -91
  238. mage_ai/tests/api/policies/test_oauth_policy.py +38 -0
  239. mage_ai/tests/data_preparation/models/global_hooks/test_global_hooks.py +33 -8
  240. mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +82 -38
  241. mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +803 -0
  242. mage_ai/tests/data_preparation/models/global_hooks/test_utils.py +6 -1
  243. mage_ai/tests/data_preparation/models/test_block.py +26 -0
  244. mage_ai/tests/data_preparation/models/test_pipeline.py +10 -0
  245. mage_ai/tests/factory.py +40 -2
  246. mage_ai/tests/orchestration/test_pipeline_scheduler.py +82 -1
  247. mage_ai/tests/services/k8s/test_job_manager.py +16 -0
  248. mage_ai/tests/shared/mixins.py +60 -23
  249. mage_ai/tests/streaming/sinks/test_rabbitmq.py +36 -0
  250. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/METADATA +7 -4
  251. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/RECORD +257 -243
  252. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/WHEEL +1 -1
  253. mage_ai/server/frontend_dist/_next/static/9jB4XPuz6BzxBcG9VNao5/_buildManifest.js +0 -1
  254. mage_ai/server/frontend_dist/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
  255. mage_ai/server/frontend_dist/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
  256. mage_ai/server/frontend_dist/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
  257. mage_ai/server/frontend_dist/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
  258. mage_ai/server/frontend_dist/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
  259. mage_ai/server/frontend_dist/_next/static/chunks/722-a1584445357a276c.js +0 -1
  260. mage_ai/server/frontend_dist/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
  261. mage_ai/server/frontend_dist/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
  262. mage_ai/server/frontend_dist/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
  263. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
  264. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
  265. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
  266. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-e561ae38cf5592e8.js +0 -1
  267. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
  268. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
  269. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
  270. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
  271. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
  272. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
  273. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
  274. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
  275. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
  276. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
  277. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
  278. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
  279. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
  280. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
  281. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
  282. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
  283. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
  284. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-a1584445357a276c.js +0 -1
  285. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
  286. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
  287. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
  288. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
  289. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
  290. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
  291. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-e561ae38cf5592e8.js +0 -1
  292. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
  293. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
  294. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
  295. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
  296. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
  297. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
  298. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
  299. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
  300. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
  301. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
  302. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
  303. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
  304. mage_ai/server/frontend_dist_base_path_template/_next/static/uPDjJYpJMst1q6psbRyte/_buildManifest.js +0 -1
  305. /mage_ai/server/frontend_dist/_next/static/{9jB4XPuz6BzxBcG9VNao5 → N3FS4bHv0jpYeeg672uYK}/_ssgManifest.js +0 -0
  306. /mage_ai/server/frontend_dist_base_path_template/_next/static/{uPDjJYpJMst1q6psbRyte → aoO6jYZLVlUGCCdY-wmy8}/_ssgManifest.js +0 -0
  307. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/LICENSE +0 -0
  308. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/entry_points.txt +0 -0
  309. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2858],{94629:function(e,n,r){"use strict";r.d(n,{Z:function(){return C}});var t=r(82394),o=r(21831),i=r(82684),l=r(50724),c=r(82555),u=r(97618),s=r(70613),a=r(68487),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),j=r(46684),x=r(70515),Z=r(53808),P=r(19183);function y(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 _(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?y(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function w(e,n){var r,t=e.addProjectBreadcrumbToCustomBreadcrumbs,f=e.after,y=e.afterHeader,w=e.afterHidden,C=e.afterWidth,k=e.afterWidthOverride,S=e.appendBreadcrumbs,O=e.before,I=e.beforeWidth,T=e.breadcrumbs,E=e.children,A=e.errors,N=e.headerMenuItems,R=e.headerOffset,M=e.hideAfterCompletely,D=e.mainContainerHeader,B=e.navigationItems,H=e.setAfterHidden,L=e.setErrors,F=e.subheaderChildren,G=e.subheaderNoPadding,V=e.title,Y=e.uuid,U=(0,P.i)().width,q="dashboard_after_width_".concat(Y),W="dashboard_before_width_".concat(Y),z=(0,i.useRef)(null),K=(0,i.useState)(k?C:(0,Z.U2)(q,C)),Q=K[0],X=K[1],J=(0,i.useState)(!1),$=J[0],ee=J[1],ne=(0,i.useState)(O?Math.max((0,Z.U2)(W,I),13*x.iI):null),re=ne[0],te=ne[1],oe=(0,i.useState)(!1),ie=oe[0],le=oe[1],ce=(0,i.useState)(null)[1],ue=g.ZP.projects.list({},{revalidateOnFocus:!1}).data,se=null===ue||void 0===ue?void 0:ue.projects,ae={label:function(){var e;return null===se||void 0===se||null===(e=se[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},de=[];T&&(t&&de.push(ae),de.push.apply(de,(0,o.Z)(T))),(null===T||void 0===T||!T.length||S)&&(null===se||void 0===se?void 0:se.length)>=1&&(null!==T&&void 0!==T&&T.length||de.unshift({bold:!S,label:function(){return V}}),de.unshift(ae)),(0,i.useEffect)((function(){null===z||void 0===z||!z.current||$||ie||null===ce||void 0===ce||ce(z.current.getBoundingClientRect().width)}),[$,Q,ie,re,z,ce,U]),(0,i.useEffect)((function(){$||(0,Z.t8)(q,Q)}),[w,$,Q,q]),(0,i.useEffect)((function(){ie||(0,Z.t8)(W,re)}),[ie,re,W]);var he=(0,p.Z)(C);return(0,i.useEffect)((function(){k&&he!==C&&X(C)}),[k,C,he]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s.Z,{title:V}),(0,h.jsx)(a.Z,{breadcrumbs:de,menuItems:N,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===B||void 0===B?void 0:B.length)&&(0,h.jsx)(d.lm,{showMore:!0,children:(0,h.jsx)(b.Z,{navigationItems:B,showMore:!0})}),(0,h.jsx)(u.Z,{flex:1,flexDirection:"column",children:(0,h.jsxs)(v.Z,{after:f,afterHeader:y,afterHeightOffset:j.Mz,afterHidden:w,afterMousedownActive:$,afterWidth:Q,before:O,beforeHeightOffset:j.Mz,beforeMousedownActive:ie,beforeWidth:d.k1+(O?re:0),headerOffset:R,hideAfterCompletely:!H||M,leftOffset:O?d.k1:null,mainContainerHeader:D,mainContainerRef:z,setAfterHidden:H,setAfterMousedownActive:ee,setAfterWidth:X,setBeforeMousedownActive:le,setBeforeWidth:te,children:[F&&(0,h.jsx)(m,{noPadding:G,children:F}),E]})})]}),A&&(0,h.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===L||void 0===L?void 0:L(null)},children:(0,h.jsx)(c.Z,_(_({},A),{},{onClose:function(){return null===L||void 0===L?void 0:L(null)}}))})]})}var C=i.forwardRef(w)},85385:function(e,n,r){"use strict";r.d(n,{Qq:function(){return m},Z7:function(){return v},cH:function(){return o},du:function(){return h},fp:function(){return d},j5:function(){return f},uM:function(){return a}});var t,o,i=r(82394),l=r(57653),c=r(82359),u=r(72473),s=r(86735),a="sideview",d=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 h=[o.DATA];function f(e){var n,r,t,i=[{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}];return l.qL.PYSPARK!==(null===e||void 0===e||null===(n=e.pipeline)||void 0===n?void 0:n.type)&&i.push.apply(i,[{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}]),i.push.apply(i,[{key:o.DATA,label:"Data"},{key:o.TERMINAL,label:"Terminal"},{key:o.BLOCK_SETTINGS,label:"Block settings"}]),null!==e&&void 0!==e&&null!==(r=e.project)&&void 0!==r&&null!==(t=r.features)&&void 0!==t&&t[c.d.INTERACTIONS]&&i.push({key:o.INTERACTIONS,label:"Interactions"}),i}function m(e){return(0,s.HK)(f(e),(function(e){return e.key}))}var v=(t={},(0,i.Z)(t,o.ADDON_BLOCKS,u.EJ),(0,i.Z)(t,o.BLOCK_SETTINGS,u.JG),(0,i.Z)(t,o.CALLBACKS,u.AQ),(0,i.Z)(t,o.CHARTS,u.GQ),(0,i.Z)(t,o.DATA,u.iA),(0,i.Z)(t,o.EXTENSIONS,u.Bf),(0,i.Z)(t,o.INTERACTIONS,u.yd),(0,i.Z)(t,o.SECRETS,u.Yo),(0,i.Z)(t,o.SETTINGS,u.Zr),(0,i.Z)(t,o.TERMINAL,u.oI),(0,i.Z)(t,o.TREE,u.mp),(0,i.Z)(t,o.VARIABLES,u.LO),t)},89706: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 s},nB:function(){return m},oy:function(){return f},xF:function(){return d}});var t,o,i,l,c=r(82394),u=r(44425);!function(e){e.CSV="csv",e.JSON="json",e.MD="md",e.PY="py",e.R="r",e.SH="sh",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 s=[i.PY,i.SQL],a=[i.JSON,i.MD,i.PY,i.R,i.SH,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,u.t6.MARKDOWN),(0,c.Z)(t,i.JSON,i.JSON),(0,c.Z)(t,i.PY,u.t6.PYTHON),(0,c.Z)(t,i.R,u.t6.R),(0,c.Z)(t,i.SQL,u.t6.SQL),(0,c.Z)(t,i.TXT,"text"),(0,c.Z)(t,i.YAML,u.t6.YAML),(0,c.Z)(t,i.YML,u.t6.YAML),t),v=(o={},(0,c.Z)(o,u.t6.MARKDOWN,i.MD),(0,c.Z)(o,u.t6.PYTHON,i.PY),(0,c.Z)(o,u.t6.R,i.R),(0,c.Z)(o,u.t6.SQL,i.SQL),(0,c.Z)(o,u.t6.YAML,i.YAML),(0,c.Z)(o,"text",i.TXT),o)},72098:function(e,n,r){"use strict";var t;r.d(n,{U:function(){return t}}),function(e){e.PYSPARK="pysparkkernel",e.PYTHON3="python3"}(t||(t={}))},40109:function(e,n,r){"use strict";r.d(n,{f:function(){return g},h:function(){return v}});var t=r(82394),o=r(82684),i=r(34376),l=r(93369),c=r(72473),u=r(70515),s=r(69419),a=r(53808),d=r(28598);var h=function(e){var n=e.oauthResponse,r=(0,i.useRouter)(),t=(0,o.useMemo)((function(){return n||{}}),[n]),h=t.url,f=t.redirect_query_params,m=void 0===f?{}:f;return(0,d.jsx)(d.Fragment,{children:h&&(0,d.jsx)(l.ZP,{beforeElement:(0,d.jsx)(c._8,{size:2*u.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,s.iV)(h).state;(0,a.t8)(e,m),r.push(h)},uuid:"SignForm/google",children:"Sign in with Google"})})};var f=function(e){var n=e.oauthResponse,r=(0,i.useRouter)(),t=(0,o.useMemo)((function(){return n||{}}),[n]),h=t.url,f=t.redirect_query_params,m=void 0===f?{}:f;return(0,d.jsx)(d.Fragment,{children:h&&(0,d.jsx)(l.ZP,{beforeElement:(0,d.jsx)(c.Dg,{size:2*u.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,s.iV)(h).state;m&&(0,a.t8)(e,m),r.push(h)},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})};var m,v,b=function(e){var n=e.oauthResponse,r=(0,i.useRouter)(),t=(0,o.useMemo)((function(){return n||{}}),[n]),c=t.url,u=t.redirect_query_params,h=void 0===u?{}:u;return(0,d.jsx)(d.Fragment,{children:c&&(0,d.jsx)(l.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,s.iV)(c).state;(0,a.t8)(e,h),r.push(c)},uuid:"SignForm/okta",children:"Sign in with Okta"})})};!function(e){e.ACTIVE_DIRECTORY="active_directory",e.GITHUB="github",e.GOOGLE="google",e.OKTA="okta"}(v||(v={}));var g=(m={},(0,t.Z)(m,v.ACTIVE_DIRECTORY,f),(0,t.Z)(m,v.GOOGLE,h),(0,t.Z)(m,v.OKTA,b),m)},57653:function(e,n,r){"use strict";r.d(n,{$1:function(){return v},G7:function(){return p},LM:function(){return j},Mj:function(){return x},QK:function(){return m},RH:function(){return g},a_:function(){return P},fj:function(){return y},kA:function(){return Z},qL:function(){return c},r0:function(){return b}});var t,o,i,l,c,u=r(75582),s=r(82394),a=r(72473),d=r(72098);function h(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function f(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?h(Object(r),!0).forEach((function(n){(0,s.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(c||(c={}));var m,v,b,g=(t={},(0,s.Z)(t,c.INTEGRATION,"Integration"),(0,s.Z)(t,c.PYTHON,"Python"),(0,s.Z)(t,c.PYSPARK,"PySpark"),(0,s.Z)(t,c.STREAMING,"Streaming"),t),p=(o={},(0,s.Z)(o,c.INTEGRATION,"Integration"),(0,s.Z)(o,c.PYTHON,"Standard"),(0,s.Z)(o,c.PYSPARK,"PySpark"),(0,s.Z)(o,c.STREAMING,"Streaming"),o),j="all",x=(c.PYTHON,c.INTEGRATION,c.STREAMING,i={},(0,s.Z)(i,j,a.ie),(0,s.Z)(i,c.INTEGRATION,a.YC),(0,s.Z)(i,c.PYTHON,a.El),(0,s.Z)(i,c.STREAMING,a.dB),i);!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"}(m||(m={})),function(e){e.GROUP="group_by",e.HISTORY_DAYS="from_history_days",e.NO_TAGS="no_tags",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(v||(v={})),function(e){e.STATUS="status",e.TAG="tag",e.TYPE="type"}(b||(b={}));var Z=[m.ACTIVE,m.INACTIVE,m.NO_SCHEDULES],P=(l={},(0,s.Z)(l,c.PYTHON,d.U.PYTHON3),(0,s.Z)(l,c.PYSPARK,d.U.PYSPARK),l),y=Object.entries(P).reduce((function(e,n){var r=(0,u.Z)(n,2),t=r[0],o=r[1];return f(f({},e),{},(0,s.Z)({},o,t))}),{})},65956:function(e,n,r){"use strict";var t=r(38626),o=r(55485),i=r(38276),l=r(30160),c=r(44897),u=r(42631),s=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;"," "," "," "," "," "," "," "," "," "," "," ",""],u.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;"," "," "," ",""],u.n_,u.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,s.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;"],u.M8,u.YF,1.75*a.iI);n.Z=function(e){var n=e.borderless,r=e.children,t=e.containerRef,c=e.contentContainerRef,u=e.dark,s=e.footer,a=e.fullHeight,h=void 0===a||a,g=e.fullWidth,p=void 0===g||g,j=e.header,x=e.headerHeight,Z=e.headerIcon,P=e.headerPaddingVertical,y=e.headerTitle,_=e.maxHeight,w=e.maxWidth,C=e.minWidth,k=e.noPadding,S=e.overflowVisible,O=e.subtitle,I=e.success;return(0,d.jsxs)(f,{borderless:n,dark:u,fullHeight:h,fullWidth:p,maxHeight:_,maxWidth:w,minWidth:C,overflowVisible:S,ref:t,success:I,children:[(j||y)&&(0,d.jsxs)(m,{headerPaddingVertical:P,height:x,children:[j&&j,y&&(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:y})})]})})]}),(0,d.jsxs)(v,{maxHeight:_,noPadding:k,overflowVisible:S,ref:c,children:[O&&(0,d.jsx)(i.Z,{mb:2,children:(0,d.jsx)(l.ZP,{default:!0,children:O})}),r]}),s&&(0,d.jsx)(b,{children:s})]})}},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),u=r(70515),s=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*u.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,s.jsx)(h,d(d({},n),{},{children:(0,s.jsx)(f,d({},n))}))}},58024:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return Se}});var t=r(77837),o=r(38860),i=r.n(o),l=r(93808),c=r(82394),u=r(75582),s=r(54407),a=r.n(s),d=r(82684),h=r(69864),f=r(71180),m=r(15338),v=r(55485),b=r(85854),g=r(44085),p=r(38276),j=r(4190),x=r(30160),Z=r(35576),P=r(17488),y=r(12468),_=r(35686),w=r(72473),C="clone",k="delete",S="fetch",O="merge",I="pull",T="push",E="rebase",A="git_remote_name",N="git_repository_name",R={uuid:"Branches"},M={uuid:"Files"},D={uuid:"Push"},B={uuid:"Setup"},H=[B,R,M,D],L=r(70515),F=r(81728),G=r(72619),V=r(28598);var Y=function(e){var n=e.actionRemoteName,r=e.branch,t=e.branches,o=e.fetchBranch,i=e.fetchBranches,l=e.remotes,s=e.setActionRemoteName,a=e.showError,C=(0,d.useState)(""),S=C[0],I=C[1],T=(0,d.useState)(null),A=T[0],N=T[1],R=(0,d.useState)(null),D=R[0],H=R[1],Y=(0,d.useState)(null),U=Y[0],q=Y[1],W=(0,d.useState)(""),z=W[0],K=W[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)(_.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(){o(),i(),K("")},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),$=(0,u.Z)(J,2),ee=$[0],ne=$[1].isLoading,re=(0,h.Db)(_.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(){o()},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),te=(0,u.Z)(re,2),oe=te[0],ie=te[1].isLoading,le=(0,h.Db)(_.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(e){var n=e.git_custom_branch.progress;o(),I(""),N(""),H(n),q("")},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),ce=(0,u.Z)(le,2),ue=ce[0],se=ce[1].isLoading;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsxs)(b.Z,{children:["Branches",t?" (".concat(null===t||void 0===t?void 0:t.length,")"):""]}),(0,V.jsx)(p.Z,{mt:L.Mq,children:(0,V.jsxs)(v.ZP,{children:[(0,V.jsxs)("div",{children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(x.ZP,{bold:!0,muted:!0,children:"Remote"})}),(0,V.jsx)(g.Z,{beforeIcon:(0,V.jsx)(w.VW,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return s(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,V.jsx)("option",{value:n,children:n},n)}))})]}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsxs)("div",{children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(x.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(0,V.jsxs)(v.ZP,{alignItems:"center",children:[(0,V.jsx)(y.Z,{fullSize:!0,label:"Choose a different branch to switch branches",widthFitContent:!0,children:(0,V.jsx)(g.Z,{beforeIcon:(0,V.jsx)(w.I0,{muted:!1}),beforeIconSize:2*L.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,V.jsx)("option",{value:n,children:n},n)})))})}),(0,V.jsx)(p.Z,{mr:L.cd}),ie&&(0,V.jsx)(j.Z,{inverted:!0})]})]})]})}),(0,V.jsx)(p.Z,{mt:L.Mq,children:(0,V.jsxs)(v.ZP,{alignItems:"center",children:[(0,V.jsx)(P.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,V.jsx)(p.Z,{mr:1}),(0,V.jsx)(f.ZP,{beforeIcon:(0,V.jsx)(w.mm,{size:2*L.iI}),disabled:!z,loading:ne,onClick:function(){ee({git_custom_branch:{name:z}})},primary:!0,children:"Create new branch"})]})})]}),(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsx)(b.Z,{children:"Actions"}),(0,V.jsxs)(p.Z,{mt:L.Mq,children:[(0,V.jsxs)(p.Z,{mb:L.Mq,children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(x.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),(null===r||void 0===r?void 0:r.name)&&(0,V.jsx)(x.ZP,{monospace:!0,children:null===r||void 0===r?void 0:r.name})]}),(0,V.jsxs)(v.ZP,{alignItems:"center",children:[(0,V.jsxs)("div",{children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(x.ZP,{bold:!0,muted:!0,children:"Base branch"})}),(0,V.jsx)(g.Z,{beforeIcon:(0,V.jsx)(w.I0,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return q(e.target.value)},placeholder:"Choose a branch",value:U,children:null===X||void 0===X?void 0:X.map((function(e){var n=e.name;return(0,V.jsx)("option",{value:n,children:n},n)}))})]}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsxs)("div",{children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(x.ZP,{bold:!0,muted:!0,children:"Action"})}),(0,V.jsxs)(g.Z,{onChange:function(e){return N(e.target.value)},placeholder:"Choose action",value:A||"",children:[(0,V.jsx)("option",{value:O,children:(0,F.vg)(O)}),(0,V.jsx)("option",{value:E,children:(0,F.vg)(E)}),(0,V.jsx)("option",{value:k,children:(0,F.vg)(k)})]})]})]}),A&&[O,E].includes(A)&&(0,V.jsxs)(p.Z,{mt:L.cd,children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsxs)(x.ZP,{bold:!0,muted:!0,children:["Message for ",A]})}),(0,V.jsx)(Z.Z,{monospace:!0,onChange:function(e){return I(e.target.value)},value:S||""})]}),(0,V.jsxs)(p.Z,{mt:L.cd,children:[(0,V.jsx)(f.ZP,{beforeIcon:(0,V.jsx)(w.Bf,{size:2*L.iI}),disabled:!A||!U,loading:se,onClick:function(){(k!==A||"undefined"!==typeof location&&window.confirm("Are you sure you want to delete branch ".concat(U,"?")))&&ue({git_custom_branch:(0,c.Z)({action_type:A,message:S},A,{base_branch:U})})},primary:!0,children:A?(0,F.vg)(A):"Execute action"}),D&&(0,V.jsx)(p.Z,{mt:L.cd,children:(0,V.jsx)(x.ZP,{default:!0,monospace:!0,preWrap:!0,children:D})})]})]})]}),(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsx)(p.Z,{mb:L.HN,children:(0,V.jsx)(m.Z,{light:!0})}),(0,V.jsxs)(v.ZP,{children:[(0,V.jsx)(f.ZP,{beforeIcon:(0,V.jsx)(w.Hd,{}),linkProps:{href:"/version-control?tab=".concat(B.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:B.uuid}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsxs)(f.ZP,{afterIcon:(0,V.jsx)(w.Kw,{}),linkProps:{href:"/version-control?tab=".concat(M.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",M.uuid]})]})]})]})},U=r(90299),q=r(32013),W=r(98777),z=r(48670),K=r(75499);function Q(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 X(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var J={base_branch:null,body:null,compare_branch:null,repository:null,title:null};var $=function(e){var n=e.actionRemoteName,r=e.branch,t=e.branches,o=e.fetchBranch,i=e.loading,l=e.remotes,s=e.repositories,a=e.repositoryName,y=e.setActionRemoteName,C=e.setRepositoryName,k=e.showError,S=(0,d.useState)((null===r||void 0===r?void 0:r.name)||""),O=S[0],I=S[1],E=(0,d.useState)(null),A=E[0],N=E[1],R=(0,d.useState)(null),D=R[0],B=R[1],H=(0,d.useState)(J),Y=H[0],U=H[1],Q=(0,h.Db)(_.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(e){var n=e.git_custom_branch,r=n.error,t=n.progress;r?(N(r),B(null)):(o(),N(null),B(t))},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),$=(0,u.Z)(Q,2),ee=$[0],ne=$[1].isLoading,re=_.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,V.jsx)(K.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,V.jsx)(z.Z,{default:!0,href:o,monospace:!0,openNewWindow:!0,small:!0,children:t},"title"),(0,V.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:i},"user"),(0,V.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:n},"createdAt"),(0,V.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:r||"-"},"lastModified")]})),uuid:"pull-requests"})}),[ie]),ce=_.ZP.git_custom_branches.list({repository:a},{},{pauseFetch:!a}).data,ue=(0,d.useMemo)((function(){return(null===ce||void 0===ce?void 0:ce.git_custom_branches)||[]}),[ce]);(0,d.useEffect)((function(){null!==Y&&void 0!==Y&&Y.compare_branch||null===ue||void 0===ue||!ue.find((function(e){return e.name===(null===r||void 0===r?void 0:r.name)}))||U((function(e){return X(X({},e),{},{compare_branch:null===r||void 0===r?void 0:r.name})}))}),[r,ue,Y]);var se=(0,h.Db)(_.ZP.pull_requests.useCreate(),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(){oe(),U(J)},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),ae=(0,u.Z)(se,2),de=ae[0],he=ae[1].isLoading;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(b.Z,{children:(0,F.vg)(T)})}),(0,V.jsxs)(p.Z,{mt:L.Mq,children:[(0,V.jsxs)(v.ZP,{children:[(0,V.jsxs)("div",{children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(x.ZP,{bold:!0,muted:!0,children:"Remote"})}),i&&(0,V.jsx)(j.Z,{inverted:!0}),!i&&(0,V.jsx)(g.Z,{beforeIcon:(0,V.jsx)(w.VW,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return y(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,V.jsx)("option",{value:n,children:n},n)}))})]}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsxs)("div",{children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(x.ZP,{bold:!0,muted:!0,children:"Branch"})}),(0,V.jsxs)(g.Z,{beforeIcon:(0,V.jsx)(w.I0,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return I(e.target.value)},placeholder:"Choose branch",value:O||"",children:[(0,V.jsx)("option",{value:""}),null===t||void 0===t?void 0:t.map((function(e){var n=e.name;return(0,V.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,V.jsx)(p.Z,{mt:L.cd,children:(0,V.jsxs)(f.ZP,{beforeIcon:(0,V.jsx)(w.Bf,{size:2*L.iI}),disabled:!n||!O,loading:ne,onClick:function(){B(null),ee({git_custom_branch:(0,c.Z)({action_type:T},T,{branch:O,remote:n})})},primary:!0,children:[(0,F.vg)(T)," ",n," ",n&&O]})}),(D||A)&&(0,V.jsx)(p.Z,{mt:L.cd,children:(0,V.jsx)(x.ZP,{danger:!!A,default:!!D,monospace:!0,preWrap:!0,children:D||A})})]})]}),(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(b.Z,{children:"Create pull request"})}),(0,V.jsxs)(p.Z,{mt:L.Mq,children:[i&&(0,V.jsx)(j.Z,{inverted:!0}),!i&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(v.ZP,{children:[(0,V.jsxs)("div",{children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(x.ZP,{bold:!0,muted:!0,children:"Repository"})}),(0,V.jsx)(g.Z,{beforeIcon:(0,V.jsx)(w.fy,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return C(e.target.value)},placeholder:"Choose repository",value:a||"",children:null===s||void 0===s?void 0:s.map((function(e){var n=e.name;return(0,V.jsx)("option",{value:n,children:n},n)}))})]}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsxs)("div",{children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(x.ZP,{bold:!0,muted:!0,children:"Base branch"})}),a&&!ce&&(0,V.jsx)(j.Z,{inverted:!0}),(!a||ce)&&(0,V.jsx)(g.Z,{beforeIcon:(0,V.jsx)(w.I0,{}),beforeIconSize:1.5*L.iI,disabled:!a,monospace:!0,onChange:function(e){return U((function(n){return X(X({},n),{},{base_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===Y||void 0===Y?void 0:Y.base_branch)||"",children:null===ue||void 0===ue?void 0:ue.map((function(e){var n=e.name;return(0,V.jsx)("option",{value:n,children:n},n)}))})]}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsxs)("div",{children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(x.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),a&&!ce&&(0,V.jsx)(j.Z,{inverted:!0}),(!a||ce||(null===Y||void 0===Y?void 0:Y.compare_branch))&&(0,V.jsxs)(g.Z,{beforeIcon:(0,V.jsx)(w.I0,{}),beforeIconSize:1.5*L.iI,disabled:!a,monospace:!0,onChange:function(e){return U((function(n){return X(X({},n),{},{compare_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===Y||void 0===Y?void 0:Y.compare_branch)||"",children:[!(null!==ue&&void 0!==ue&&ue.length)&&(null===Y||void 0===Y?void 0:Y.compare_branch)&&(0,V.jsx)("option",{value:null===Y||void 0===Y?void 0:Y.compare_branch,children:null===Y||void 0===Y?void 0:Y.compare_branch}),null===ue||void 0===ue?void 0:ue.map((function(e){var n=e.name;return(0,V.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,V.jsx)(p.Z,{mt:1,children:(0,V.jsx)(P.Z,{label:"Title",monospace:!0,onChange:function(e){return U((function(n){return X(X({},n),{},{title:e.target.value})}))},value:(null===Y||void 0===Y?void 0:Y.title)||""})}),(0,V.jsx)(p.Z,{mt:1,children:(0,V.jsx)(Z.Z,{label:"Description",monospace:!0,onChange:function(e){return U((function(n){return X(X({},n),{},{body:e.target.value})}))},value:(null===Y||void 0===Y?void 0:Y.body)||""})}),(0,V.jsx)(p.Z,{mt:L.cd,children:(0,V.jsx)(f.ZP,{beforeIcon:(0,V.jsx)(w.Bf,{size:2*L.iI}),disabled:!a||!(null!==Y&&void 0!==Y&&Y.title)||!(null!==Y&&void 0!==Y&&Y.base_branch)||!(null!==Y&&void 0!==Y&&Y.compare_branch),loading:he,onClick:function(){de({pull_request:X(X({},Y),{},{repository:a})})},primary:!0,children:"Create new pull request"})})]})]}),(0,V.jsx)(p.Z,{mt:L.Mq,children:(0,V.jsx)(q.Z,{visibleMapping:{0:!a},children:(0,V.jsxs)(W.Z,{noPaddingContent:!0,title:te?"Pull requests (".concat(null===ie||void 0===ie?void 0:ie.length,")"):"Pull requests",children:[!a&&(0,V.jsx)(p.Z,{p:L.cd,children:(0,V.jsx)(x.ZP,{muted:!0,children:"Please select a repository to view open pull requests."})}),a&&(0,V.jsxs)(V.Fragment,{children:[!te&&(0,V.jsx)(p.Z,{p:L.cd,children:(0,V.jsx)(j.Z,{inverted:!0})}),te&&le]})]})})})]}),(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsx)(p.Z,{mb:L.HN,children:(0,V.jsx)(m.Z,{light:!0})}),(0,V.jsx)(v.ZP,{children:(0,V.jsx)(f.ZP,{beforeIcon:(0,V.jsx)(w.Hd,{}),linkProps:{href:"/version-control?tab=".concat(M.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:M.uuid})})]})]})},ee=r(94629),ne=r(10553),re=r(70652),te=r(97618),oe=r(38626),ie=oe.default.div.withConfig({displayName:"indexstyle__SpacingStyle",componentId:"sc-el09vr-0"})(["margin-top:","px;"],.5*L.iI),le=r(42122);function ce(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 ue(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?ce(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(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,s=(0,d.useRef)(null),a=(0,d.useState)(""),g=a[0],P=a[1],y=(0,d.useState)({}),C=y[0],k=y[1],S=(0,d.useState)({}),O=S[0],I=S[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]),A=(0,d.useMemo)((function(){return E.length}),[E]),N=(0,d.useMemo)((function(){return Object.keys(C).length===(null===T||void 0===T?void 0:T.length)}),[C,T]),M=(0,d.useMemo)((function(){return Object.keys(O).length===(null===E||void 0===E?void 0:E.length)}),[O,E]),B=(0,d.useMemo)((function(){return{onErrorCallback:function(e,n){return i({errors:n,response:e})}}}),[i]),H=(0,d.useMemo)((function(){return{onSuccess:function(e){return(0,G.wD)(e,ue({callback:function(){r(),k({})}},B))}}}),[r,B]),Y=(0,d.useMemo)((function(){return _.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name)}),[n]),U=(0,h.Db)(Y,H),Q=(0,u.Z)(U,2),X=Q[0],J=Q[1].isLoading,$=(0,h.Db)(Y,H),ee=(0,u.Z)($,2),ne=ee[0],oe=ee[1].isLoading,ce=(0,h.Db)(Y,{onSuccess:function(e){return(0,G.wD)(e,ue({callback:function(){r(),I({})}},B))}}),se=(0,u.Z)(ce,2),ae=se[0],de=se[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,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(z.Z,{block:!0,noHoverUnderline:!0,onClick:function(){r(o?{}:t)},preventDefault:!0,children:(0,V.jsxs)(v.ZP,{alignItems:"center",flexDirection:"row",children:[(0,V.jsx)(re.Z,{checked:i&&o,disabled:!i}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsx)(x.ZP,{bold:!0,children:i&&o?"Unselect all":"Select all"})]})}),e.map((function(e){return(0,V.jsx)(ie,{children:(0,V.jsx)(z.Z,{block:!0,noHoverUnderline:!0,onClick:function(){return r((function(n){var r=ue({},n);return!(null!==r&&void 0!==r&&r[e])?r[e]=!0:delete r[e],r}))},preventDefault:!0,children:(0,V.jsxs)(v.ZP,{alignItems:"center",flexDirection:"row",children:[(0,V.jsx)(re.Z,{checked:!(null===n||void 0===n||!n[e])}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsx)(x.ZP,{default:!0,monospace:!0,children:e})]})})},e)}))]})}),[]),fe=(0,d.useMemo)((function(){return(0,le.Qr)(C)}),[C]),me=_.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)(_.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(){be(),r(),P("")},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),je=(0,u.Z)(pe,2),xe=je[0],Ze=je[1].isLoading,Pe=(0,d.useMemo)((function(){return(0,V.jsx)(K.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,V.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===n||void 0===n?void 0:n.name},"author"),(0,V.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:r},"date"),(0,V.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:t},"message")]})),uuid:"git-branch-logs"})}),[ge]);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.Z,{mb:L.HN,children:(0,V.jsxs)(v.ZP,{children:[(0,V.jsxs)(te.Z,{flex:1,flexDirection:"column",children:[(0,V.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,V.jsx)(p.Z,{my:L.cd,children:(0,V.jsx)(m.Z,{light:!0})}),(0,V.jsx)(p.Z,{mb:L.cd,children:(0,V.jsxs)(v.ZP,{flexDirection:"row",children:[(0,V.jsx)(f.ZP,{compact:!0,disabled:fe||de||oe,loading:J,onClick:function(){X({git_custom_branch:{action_type:"add",files:Object.keys(C)}}).then((function(e){var n,r=e.data;null!==r&&void 0!==r&&r.git_custom_branch&&(null===s||void 0===s||null===(n=s.current)||void 0===n||n.focus())}))},primary:!0,children:"Add files"}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsx)(f.ZP,{compact:!0,disabled:fe||J||de,loading:oe,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to undo all changes in the selected files?")&&ne({git_custom_branch:{action_type:"checkout",files:Object.keys(C)}})},children:"Checkout files"})]})}),he(T,C,k,ue(ue({},t),c),N)]}),(0,V.jsx)(p.Z,{mr:L.cd}),(0,V.jsxs)(te.Z,{flex:1,flexDirection:"column",children:[(0,V.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,V.jsx)(p.Z,{my:L.cd,children:(0,V.jsx)(m.Z,{light:!0})}),(0,V.jsx)(p.Z,{mb:L.cd,children:(0,V.jsx)(v.ZP,{flexDirection:"row",children:(0,V.jsx)(f.ZP,{compact:!0,disabled:(0,le.Qr)(O)||J||oe,loading:de,onClick:function(){ae({git_custom_branch:{action_type:"reset",files:Object.keys(O)}})},secondary:!0,children:"Reset files"})})}),he(E,O,I,l,M)]})]})}),(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(b.Z,{children:"Commit"})}),(0,V.jsx)(p.Z,{mb:L.cd,children:(0,V.jsx)(q.Z,{children:(0,V.jsx)(W.Z,{noPaddingContent:!0,title:A>=1?"Staged files (".concat(A,")"):"No staged files",children:null===E||void 0===E?void 0:E.map((function(e){return(0,V.jsx)(p.Z,{my:1,px:L.cd,children:(0,V.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,V.jsx)(z.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,V.jsx)(p.Z,{mr:1}),(null===t||void 0===t?void 0:t[e])&&(0,V.jsx)(x.ZP,{warning:!0,children:"Modified after staging"})]})},e)}))})})}),(0,V.jsx)(Z.Z,{label:"Commit message",monospace:!0,onChange:function(e){return P(e.target.value)},ref:s,value:g||""}),(0,V.jsx)(p.Z,{mt:L.cd,children:(0,V.jsxs)(v.ZP,{alignItems:"center",children:[(0,V.jsxs)(f.ZP,{disabled:0===A||!((null===g||void 0===g?void 0:g.length)>=1),loading:Ze,onClick:function(){xe({git_custom_branch:{action_type:"commit",message:g}})},primary:!0,children:["Commit ",(0,F._6)("file",A,!0)," with message"]}),0===A&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.Z,{mr:1}),(0,V.jsx)(x.ZP,{danger:!0,small:!0,children:"Please stage at least 1 file before committing."})]})]})})]}),(0,V.jsx)(p.Z,{mb:L.HN,children:(0,V.jsx)(q.Z,{children:(0,V.jsxs)(W.Z,{noPaddingContent:!0,title:"Logs",children:[!ve&&(0,V.jsx)(p.Z,{p:L.cd,children:(0,V.jsx)(j.Z,{inverted:!0})}),ve&&Pe]})})}),(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsx)(p.Z,{mb:L.HN,children:(0,V.jsx)(m.Z,{light:!0})}),(0,V.jsxs)(v.ZP,{children:[(0,V.jsx)(f.ZP,{beforeIcon:(0,V.jsx)(w.Hd,{}),linkProps:{href:"/version-control?tab=".concat(R.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:R.uuid}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsxs)(f.ZP,{afterIcon:(0,V.jsx)(w.Kw,{}),linkProps:fe?{href:"/version-control?tab=".concat(D.uuid)}:null,noHoverUnderline:!0,primary:fe,sameColorAsText:!0,secondary:!fe,children:["Next: ",D.uuid]})]})]})]})},ae=r(12691),de=r.n(ae),he=r(34376),fe=r(40109),me=r(69419),ve=r(53808);var be=function(e){var n=e.actionRemoteName,r=e.branch,t=e.fetchBranch,o=e.loading,i=e.remotes,l=e.setActionRemoteName,s=e.showError,a=(0,he.useRouter)(),Z=(0,d.useRef)(null),y=(0,d.useState)(null),k=y[0],O=y[1],T=(0,d.useState)(null),E=T[0],A=T[1],N=(0,d.useState)(null),M=N[0],D=N[1],B=(0,d.useState)(null),H=B[0],Y=B[1],U=(0,d.useState)(!1),Q=U[0],X=U[1],J=(0,d.useState)(null),$=J[0],ee=J[1],ne=(0,d.useState)(""),re=ne[0],oe=ne[1],ie=(0,d.useState)(""),le=ie[0],ce=ie[1],ue=(0,d.useState)(null),se=ue[0],ae=ue[1],be=(0,d.useMemo)((function(){return!(null===r||void 0===r||!r.name)}),[r]),ge=(0,d.useMemo)((function(){return null===r||void 0===r?void 0:r.access_token_exists}),[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&&ae(null===r||void 0===r||null===(n=r.sync_config)||void 0===n?void 0:n.repo_path)}),[r,se]);var pe=(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]),je=(0,h.Db)(_.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(){t(),X(!1)},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),xe=(0,u.Z)(je,2),Ze=xe[0],Pe=xe[1].isLoading,ye=(0,h.Db)(_.ZP.oauths.useUpdate("github"),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(){return window.location.href=window.location.href.split("?")[0]},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),_e=(0,u.Z)(ye,2),we=_e[0],Ce=_e[1].isLoading,ke=(0,h.Db)(_.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(e){var n=e.git_custom_branch,r=n.error,o=n.progress;r?(A(r),Y(null)):(t(),O(null),A(null),D(null),Y(o))},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),Se=(0,u.Z)(ke,2),Oe=Se[0],Ie=Se[1].isLoading,Te=(0,h.Db)(_.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(){t(),oe(""),ce("")},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),Ee=(0,u.Z)(Te,2),Ae=Ee[0],Ne=Ee[1].isLoading,Re=(0,h.Db)(_.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(){t(),ee(null)},onErrorCallback:function(e,n){ee(null),s({errors:n,response:e})}})}}),Me=(0,u.Z)(Re,2),De=Me[0],Be=Me[1].isLoading,He=_.ZP.oauths.detail(fe.h.GITHUB,{redirect_uri:encodeURIComponent(window.location.href)}),Le=He.data,Fe=He.mutate,Ge=(0,d.useMemo)((function(){return(null===Le||void 0===Le?void 0:Le.oauth)||{}}),[Le]),Ve=(0,h.Db)(_.ZP.oauths.useCreate(),{onSuccess:function(e){return(0,G.wD)(e,{callback:function(){Fe()},onErrorCallback:function(e,n){s({errors:n,response:e})}})}}),Ye=(0,u.Z)(Ve,2),Ue=Ye[0],qe=Ye[1].isLoading,We=(0,me.iV)()||{},ze=We.access_token,Ke=We.provider;(0,d.useEffect)((function(){!Ge||null!==Ge&&void 0!==Ge&&Ge.authenticated||!ze||Ue({oauth:{provider:Ke||fe.h.GITHUB,token:ze}})}),[ze,Ue,Ge,Ke]);var Qe=(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,V.jsxs)(p.Z,{mt:L.Mq,children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,V.jsxs)(te.Z,{alignItems:"center",children:[(0,V.jsx)(x.ZP,{bold:!0,children:r}),(0,V.jsx)(p.Z,{mx:1,children:(0,V.jsx)(w._Q,{muted:!0})}),null===o||void 0===o?void 0:o.map((function(e){return(0,V.jsx)(p.Z,{mr:1,children:(0,V.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:e})},e)}))]}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsx)(f.ZP,{compact:!0,disabled:Be&&$!==r,iconOnly:!0,loading:Be&&$===r,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to remove remote ".concat(r,"?"))&&(ee(r),De({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,V.jsx)(w.rF,{})})]})}),(0,V.jsx)(q.Z,{children:(0,V.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,V.jsx)(p.Z,{p:L.cd,children:(0,V.jsx)(x.ZP,{muted:!0,children:"This remote has no refs."})}),(null===t||void 0===t?void 0:t.length)>=1&&(0,V.jsx)(K.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,V.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:t},"ref-name"),(0,V.jsx)(x.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,V.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r?void 0:r.date},"date"),(0,V.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r?void 0:r.message},"message")]})),uuid:"git-branch-remotes-refs"})]})}),(0,V.jsx)(p.Z,{mt:L.Mq,children:(0,V.jsx)(m.Z,{light:!0})})]},r)}))}),[Be,$,i,De]);return(0,V.jsxs)(V.Fragment,{children:[Le&&(0,V.jsxs)(p.Z,{mb:L.HN,children:[(null===Ge||void 0===Ge?void 0:Ge.authenticated)&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(f.ZP,{beforeIcon:(0,V.jsx)(w.fy,{size:2*L.iI}),disabled:!0,children:"Successfully authenticated with GitHub"}),(0,V.jsx)(p.Z,{my:1,children:(0,V.jsx)(x.ZP,{muted:!0,children:"You can pull, push, and create pull requests on GitHub."})}),(0,V.jsx)(f.ZP,{loading:Ce,onClick:function(){return we({oauth:{action_type:"reset"}})},warning:!0,children:"Reset GitHub authentication"})]}),!(null!==Ge&&void 0!==Ge&&Ge.authenticated)&&(null===Ge||void 0===Ge?void 0:Ge.url)&&(0,V.jsxs)(V.Fragment,{children:[ge&&(0,V.jsxs)(p.Z,{mb:2,children:[(0,V.jsx)(f.ZP,{disabled:!0,children:"Using access token from Git Settings"}),(0,V.jsx)(p.Z,{mt:1,children:(0,V.jsx)(x.ZP,{muted:!0,children:"Some features may not work unless you authenticate with GitHub."})})]}),(0,V.jsx)(f.ZP,{beforeIcon:(0,V.jsx)(w.fy,{size:2*L.iI}),loading:qe,onClick:function(){var e=null===Ge||void 0===Ge?void 0:Ge.url,n=(0,me.iV)(e).state;(0,ve.t8)(n,(null===Ge||void 0===Ge?void 0:Ge.redirect_query_params)||{}),a.push(e)},primary:!0,children:"Authenticate with GitHub"}),(0,V.jsx)(p.Z,{mt:1,children:(0,V.jsx)(x.ZP,{muted:!0,children:"Authenticating with GitHub will allow you to pull, push, and create pull requests on GitHub."})})]})]}),(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsx)(b.Z,{children:"Setup"}),(0,V.jsxs)(p.Z,{mt:L.Mq,children:[(0,V.jsxs)(p.Z,{mb:1,children:[(0,V.jsx)(x.ZP,{bold:!0,large:!0,children:be?"Git init directory":"Initialize Git directory"}),!be&&(0,V.jsxs)(x.ZP,{muted:!0,children:["Enter the directory you want to initialize git in. For example, ",(0,V.jsx)(x.ZP,{bold:!0,inline:!0,monospace:!0,muted:!0,children:"/home/src/default_repo"}),"."]}),be&&(0,V.jsxs)(x.ZP,{muted:!0,children:["If the directory below is blank, then the current working directory will be used to initialize git.",(0,V.jsx)("br",{}),"If git hasn\u2019t been initialized in the directory below, Mage will automatically run git init for you."]})]}),(0,V.jsxs)(v.ZP,{alignItems:"center",children:[(0,V.jsx)(P.Z,{disabled:be&&!Q,label:"Git directory",monospace:!0,onChange:function(e){return ae(e.target.value)},ref:Z,value:se||""}),(0,V.jsx)(p.Z,{mr:1}),(!be||Q)&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(f.ZP,{compact:!0,disabled:!be&&!se,loading:Pe,onClick:function(){Ze({sync:{repo_path:se}})},primary:!0,small:!0,children:"Save"}),be&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.Z,{mr:1}),(0,V.jsx)(z.Z,{onClick:function(){return X(!1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Cancel"})]})]}),be&&!Q&&(0,V.jsx)(z.Z,{onClick:function(){X(!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"})]})]})]}),be&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsxs)(b.Z,{children:["Remotes",!o&&i?" (".concat(null===i||void 0===i?void 0:i.length,")"):""]}),o&&(0,V.jsx)(p.Z,{mt:L.Mq,children:(0,V.jsx)(j.Z,{inverted:!0})}),!o&&Qe,(0,V.jsx)(p.Z,{mt:L.Mq,children:(0,V.jsxs)(v.ZP,{alignItems:"flex-start",children:[(0,V.jsx)(P.Z,{label:"New remote name",monospace:!0,onChange:function(e){var n;return oe(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:re||""}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsxs)(v.ZP,{flexDirection:"column",children:[(0,V.jsx)(P.Z,{label:"Remote URL",monospace:!0,onChange:function(e){var n;return ce(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:le||""}),(0,V.jsx)(p.Z,{mt:1,children:(0,V.jsxs)(x.ZP,{muted:!0,small:!0,children:["Use the https URL if you",(0,V.jsx)("br",{}),"authenticated with GitHub above."]})})]}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsx)(f.ZP,{beforeIcon:(0,V.jsx)(w.mm,{size:2*L.iI}),disabled:!re||!le,loading:Ne,onClick:function(){Ae({git_custom_branch:{action_type:"add_remote",remote:{name:re,url:le}}})},primary:!0,children:"Create new remote"})]})})]}),(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsx)(b.Z,{children:"Actions"}),(0,V.jsxs)(p.Z,{mt:L.Mq,children:[(0,V.jsxs)(p.Z,{mb:L.Mq,children:[(0,V.jsx)(p.Z,{mb:1,children:(0,V.jsx)(x.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(null===r||void 0===r?void 0:r.name)&&(0,V.jsxs)(v.ZP,{alignItems:"center",children:[(0,V.jsx)(x.ZP,{monospace:!0,children:null===r||void 0===r?void 0:r.name}),(0,V.jsx)(p.Z,{mr:L.cd}),(0,V.jsx)(de(),{href:"/version-control?tab=".concat(R.uuid),passHref:!0,children:(0,V.jsx)(z.Z,{small:!0,children:"Switch branch"})})]})]}),(0,V.jsxs)(v.ZP,{children:[(0,V.jsxs)(g.Z,{onChange:function(e){return D(e.target.value)},placeholder:"Action",value:M||"",children:[(0,V.jsx)("option",{value:S,children:(0,F.vg)(S)}),(0,V.jsx)("option",{value:I,children:(0,F.vg)(I)}),(0,V.jsx)("option",{value:"reset",children:(0,F.vg)("reset --hard")}),(0,V.jsx)("option",{value:C,children:(0,F.vg)(C)})]}),(0,V.jsx)(p.Z,{mr:1}),(0,V.jsx)(g.Z,{beforeIcon:(0,V.jsx)(w.VW,{}),beforeIconSize:1.5*L.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,V.jsx)("option",{value:n,children:n},n)}))}),![S,C].includes(M)&&(0,V.jsx)(p.Z,{ml:1,children:(0,V.jsxs)(g.Z,{beforeIcon:(0,V.jsx)(w.I0,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return O(e.target.value)},value:k||"",children:[(0,V.jsx)("option",{value:"",children:"All branches"}),null===pe||void 0===pe?void 0:pe.map((function(e){var n=e.name;return(0,V.jsx)("option",{value:n,children:n},n)}))]})})]}),(0,V.jsxs)(p.Z,{mt:L.cd,children:[(0,V.jsx)(f.ZP,{beforeIcon:(0,V.jsx)(w.Bf,{size:2*L.iI}),disabled:!M||!n,loading:Ie,onClick:function(){Y(null),(M!==C||"undefined"!==typeof location&&window.confirm("Are you sure you want to clone remote ".concat(n,"? This will ")+"overwrite all your local changes and may reset any settings you may have configured for your local Git repo. This action cannot be undone."))&&Oe({git_custom_branch:(0,c.Z)({action_type:M},M,{branch:k,remote:n})})},primary:!0,children:M?(0,F.vg)(M):"Execute action"}),(H||E)&&(0,V.jsx)(p.Z,{mt:L.cd,children:(0,V.jsx)(x.ZP,{danger:!!E,default:!!H,monospace:!0,preWrap:!0,children:H||E})})]})]})]}),(0,V.jsxs)(p.Z,{mb:L.HN,children:[(0,V.jsx)(p.Z,{mb:L.HN,children:(0,V.jsx)(m.Z,{light:!0})}),(0,V.jsx)(v.ZP,{children:(0,V.jsxs)(f.ZP,{afterIcon:(0,V.jsx)(w.Kw,{}),linkProps:{href:"/version-control?tab=".concat(R.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",R.uuid]})})]})]})]})},ge=r(95363),pe=oe.default.div.withConfig({displayName:"indexstyle__DiffContainerStyle",componentId:"sc-1fo4nus-0"})(["pre{font-family:",";}"],ge.Vp),je={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:{}},xe=r(53005),Ze=r(15610),Pe=r(86735),ye=r(23780);function _e(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 we(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?_e(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(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,ye.VI)(null,{},[],{uuid:"VersionControlPage"}),t=(0,u.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)(H[0]),Z=b[0],P=b[1],w=(0,me.iV)();(0,d.useEffect)((function(){null!==w&&void 0!==w&&w.tab&&P(H.find((function(e){return e.uuid===(null===w||void 0===w?void 0:w.tab)})))}),[w]);var C=_.ZP.git_custom_branches.list({include_remote_branches:1}),k=C.data,S=C.mutate,O=(0,d.useMemo)((function(){return null===k||void 0===k?void 0:k.git_custom_branches}),[k]),I=_.ZP.git_custom_branches.detail("current",{_format:"with_files"}),T=I.data,E=I.mutate,F=(0,d.useMemo)((function(){return(null===T||void 0===T?void 0:T.git_custom_branch)||{}}),[T]),G=(0,d.useMemo)((function(){return(null===F||void 0===F?void 0:F.files)||[]}),[F]),q=_.ZP.git_custom_branches.detail("with_remotes",{_format:"with_remotes"}),W=q.data,z=q.mutate,K=(0,d.useMemo)((function(){return null===W||void 0===W?void 0:W.git_custom_branch}),[W]),Q=(0,d.useMemo)((function(){return(null===K||void 0===K?void 0:K.remotes)||[]}),[K]),X=(0,d.useState)(null),J=X[0],re=X[1],te=(0,d.useCallback)((function(e){(0,ve.t8)(A,e),re(e)}),[]);(0,d.useEffect)((function(){var e=(0,ve.U2)(A,null);if(W&&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)}}),[W,Q,te]);var oe=(0,d.useState)((0,ve.U2)(N,"")),ie=oe[0],ce=oe[1],ue=(0,d.useCallback)((function(e){(0,ve.t8)(N,e),ce(e)}),[]),ae=(0,d.useMemo)((function(){return(0,Pe.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,ve.U2)(N,null);if(W&&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)}}),[W,ae,ue]);var de=_.ZP.git_files.detail(f?encodeURIComponent(f):null,{base_branch:i}),he=de.data,fe=de.mutate,ge=(0,d.useMemo)((function(){return null===he||void 0===he?void 0:he.git_file}),[he]);(0,d.useEffect)((function(){i&&fe()}),[i,fe]),(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 _e=(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 we(we({},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 we(we({},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 we(we({},e),{},(0,c.Z)({},n,!0))}),{})}}),[F]),Ce=_e.modifiedFiles,ke=void 0===Ce?{}:Ce,Se=_e.stagedFiles,Oe=void 0===Se?{}:Se,Ie=_e.untrackedFiles,Te=void 0===Ie?{}:Ie;(0,d.useEffect)((function(){f&&(0,le.Qr)(ke)&&(0,le.Qr)(Oe)&&(0,le.Qr)(Te)&&v(null)}),[ke,f,Oe,Te]);var Ee=(0,d.useMemo)((function(){return(null===G||void 0===G?void 0:G.length)>=1?(0,V.jsx)(ne.Z,{allowEmptyFolders:!0,disableContextMenu:!0,fetchFileTree:E,files:G,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!==Oe&&void 0!==Oe&&Oe[i]&&(n="S",r="Staged",l.success=!0),o&&!n?null:(0,V.jsx)(p.Z,{mx:1,children:(0,V.jsx)(y.Z,{appearBefore:!0,label:r,widthFitContent:!0,children:(0,V.jsx)(x.ZP,we(we({},l),{},{monospace:!0,rightAligned:!0,small:!0,children:n}))})})},useRootFolder:!0}):(0,V.jsx)(p.Z,{p:L.cd,children:(0,V.jsx)(x.ZP,{monospace:!0,muted:!0,children:"No files modified"})})}),[i,E,e,G,ke,n,v,Oe,Te]),Ae=(0,d.useMemo)((function(){return!he||!ge||f&&(null===ge||void 0===ge?void 0:ge.filename)!==f}),[he,ge,f]),Ne=(0,d.useMemo)((function(){if(!f)return null;var e=ge||{},n=e.content,r=e.content_from_base;return(0,V.jsxs)(pe,{children:[!i&&(0,V.jsx)(p.Z,{p:L.cd,children:(0,V.jsx)(x.ZP,{muted:!0,children:"Please select a base branch to see the file diffs."})}),(null===ge||void 0===ge?void 0:ge.error)&&(0,V.jsx)(p.Z,{p:L.cd,children:(0,V.jsx)(x.ZP,{danger:!0,monospace:!0,preWrap:!0,children:null===ge||void 0===ge?void 0:ge.error})}),i&&!(null!==ge&&void 0!==ge&&ge.error)&&(0,V.jsxs)(V.Fragment,{children:[Ae&&(0,V.jsx)(p.Z,{p:L.cd,children:(0,V.jsx)(j.Z,{inverted:!0})}),!Ae&&(0,V.jsx)(a(),{compareMethod:s.DiffMethod.WORDS,newValue:n||"",oldValue:r||"",renderContent:function(e){return(0,V.jsx)(x.ZP,{monospace:!0,children:e})},splitView:!0,styles:je,useDarkTheme:!0})]})]})}),[i,ge,Ae,f]),Re=(0,d.useMemo)((function(){return T&&null!==F&&void 0!==F&&F.name?H:H.slice(0,1)}),[F,T]),Me=(0,d.useMemo)((function(){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{style:{marginBottom:.5*L.iI,marginTop:.5*L.iI},children:(0,V.jsx)(U.Z,{compact:!0,onClickTab:function(e){var n=e.uuid;(0,Ze.u7)({tab:n})},selectedTabUUID:null===Z||void 0===Z?void 0:Z.uuid,tabs:Re})}),(0,V.jsx)(m.Z,{light:!0})]})}),[Z,Re]),De=(0,d.useMemo)((function(){return(0,V.jsx)(be,{actionRemoteName:J,branch:F,fetchBranch:function(){E(),z()},loading:!W,remotes:Q,setActionRemoteName:te,showError:t})}),[J,F,W,E,z,Q,te,t]),Be=(0,d.useMemo)((function(){return(0,V.jsx)(Y,{actionRemoteName:J,branch:F,branches:O,fetchBranch:E,fetchBranches:S,remotes:Q,setActionRemoteName:te,showError:t})}),[J,F,O,E,S,Q,te,t]),He=(0,d.useMemo)((function(){return(0,V.jsx)(se,{branch:F,fetchBranch:E,modifiedFiles:ke,setSelectedFilePath:v,showError:t,stagedFiles:Oe,untrackedFiles:Te})}),[F,E,ke,v,t,Oe,Te]),Le=(0,d.useMemo)((function(){return(0,V.jsx)($,{actionRemoteName:J,branch:F,branches:O,fetchBranch:E,loading:!W,modifiedFiles:ke,remotes:Q,repositories:ae,repositoryName:ie,setActionRemoteName:te,setRepositoryName:ue,showError:t,stagedFiles:Oe})}),[J,F,O,W,E,ke,Q,ae,ie,te,ue,t,Oe]);return(0,V.jsx)(ee.Z,{after:Ne,afterHidden:!f,afterWidth:40*L.iI,before:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.Z,{p:1,children:(0,V.jsx)(g.Z,{compact:!0,label:"Base branch",onChange:function(e){return l(e.target.value)},ref:n,small:!0,value:i||"",children:null===O||void 0===O?void 0:O.map((function(e){var n=e.name;return(0,V.jsx)("option",{value:n,children:n},n)}))})}),Ee]}),mainContainerHeader:Me,title:"Version control",uuid:"Version control/index",children:(0,V.jsxs)(p.Z,{p:L.cd,children:[!T&&(0,V.jsx)(j.Z,{inverted:!0}),T&&(0,V.jsxs)(V.Fragment,{children:[B.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&De,R.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&Be,M.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&He,D.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&Le]})]})})};function ke(){return(0,V.jsx)(Ce,{})}ke.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 Se=(0,l.Z)(ke)},75302:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/version-control",function(){return r(58024)}])}},function(e){e.O(0,[2678,1154,844,7011,6965,4267,600,8487,8264,7858,5499,4366,553,9774,2888,179],(function(){return n=75302,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3943],{4611:function(e,n,t){t.d(n,{f:function(){return o}});var i=t(38626),r=t(44897),u=t(70515),l=t(42631),o=i.default.div.withConfig({displayName:"Tablestyle__PopupContainerStyle",componentId:"sc-8ammqd-0"})(["position:absolute;max-height:","px;z-index:10;border-radius:","px;padding:","px;"," "," "," ",""],58*u.iI,l.TR,2*u.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||r.Z.shadow).popup,";\n background-color: ").concat((e.theme.interactive||r.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.leftOffset&&"\n left: ".concat(e.leftOffset,"px;\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")}))},53943:function(e,n,t){var i=t(82394),r=t(75582),u=t(12691),l=t.n(u),o=t(69864),c=t(82684),a=t(34376),s=t(71180),d=t(70652),p=t(50724),f=t(97618),h=t(55485),v=t(48670),m=t(44265),g=t(89515),x=t(38276),b=t(4190),_=t(75499),j=t(48381),E=t(30160),I=t(35686),O=t(44897),y=t(42631),P=t(72473),Z=t(81655),C=t(72191),w=t(39643),k=t(4611),N=t(30229),D=t(31608),T=t(70515),L=t(3917),A=t(16488),R=t(86735),S=t(50178),V=t(72619),F=t(3314),U=t(69419),M=t(70320),Y=t(44688),H=t(28598);function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function B(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?G(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z={monospace:!0,small:!0};function X(e){var n=e.cancelingRunId,t=e.disabled,i=e.isLoadingCancelPipeline,u=e.onCancel,l=e.onSuccess,a=e.pipelineRun,d=e.setCancelingRunId,f=e.setErrors,v=e.setShowConfirmationId,g=e.showConfirmationId,_=(0,S.Ct)(),j=a||{},Z=j.id,w=j.pipeline_schedule_id,D=j.pipeline_schedule_token,T=j.pipeline_schedule_type,L=j.status,A=i&&Z===n&&m.VO.RUNNING===L,R=(0,U.iV)(),F=(0,c.useMemo)((function(){return(null!==R&&void 0!==R&&R.page?+R.page:0)>0}),[null===R||void 0===R?void 0:R.page]),M=(0,o.Db)(N.Xm.API===T&&D?I.ZP.pipeline_runs.pipeline_schedules.useCreateWithParent(w,D):I.ZP.pipeline_runs.pipeline_schedules.useCreate(w),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){l()},onErrorCallback:function(e,n){return null===f||void 0===f?void 0:f({errors:n,response:e})}})}}),Y=(0,r.Z)(M,1)[0],G=(0,c.useCallback)((function(){v(null),Y({pipeline_run:{backfill_id:null===a||void 0===a?void 0:a.backfill_id,event_variables:(null===a||void 0===a?void 0:a.event_variables)||{},execution_date:null===a||void 0===a?void 0:a.execution_date,pipeline_schedule_id:null===a||void 0===a?void 0:a.pipeline_schedule_id,pipeline_uuid:null===a||void 0===a?void 0:a.pipeline_uuid,variables:(null===a||void 0===a?void 0:a.variables)||{}}})}),[Y,a,v]),B=(0,c.useCallback)((function(){v(null),d(Z),u({id:Z,status:m.VO.CANCELLED})}),[u,Z,d,v]);return(0,H.jsxs)("div",{style:{position:"relative"},children:[(0,H.jsx)(s.ZP,{backgroundColor:A&&O.Z.accent.yellow,beforeIcon:m.VO.INITIAL!==L&&!t&&(0,H.jsxs)(H.Fragment,{children:[m.VO.COMPLETED===L&&(0,H.jsx)(P.Jr,{size:C.bL}),[m.VO.FAILED,m.VO.CANCELLED].includes(L)&&(0,H.jsx)(P.Py,{inverted:m.VO.CANCELLED===L&&!_,size:C.bL}),[m.VO.RUNNING].includes(L)&&(0,H.jsx)(b.Z,{color:A?O.Z.status.negative:O.Z.monotone.white,small:!0})]}),borderRadius:"".concat(y.D7,"px"),danger:m.VO.FAILED===L&&!_,default:m.VO.INITIAL===L,disabled:t||_,loading:!a,onClick:function(e){e.stopPropagation(),v(Z)},padding:"6px",primary:m.VO.RUNNING===L&&!A&&!_,warning:m.VO.CANCELLED===L&&!_,children:t?"Ready":A?"Canceling":m.Do[L]}),(0,H.jsx)(p.Z,{onClickOutside:function(){return v(null)},open:g===Z,children:(0,H.jsxs)(k.f,{children:[[m.VO.RUNNING,m.VO.INITIAL].includes(L)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(E.ZP,{bold:!0,color:"#9ECBFF",children:"Run is in progress"}),(0,H.jsx)(x.Z,{mb:1}),(0,H.jsxs)(E.ZP,{children:["This pipeline run is currently ongoing. Retrying will cancel",(0,H.jsx)("br",{}),"the current pipeline run."]}),(0,H.jsx)(E.ZP,{}),(0,H.jsx)(x.Z,{mt:1,children:(0,H.jsxs)(h.ZP,{children:[(0,H.jsx)(s.ZP,{onClick:function(){B(),G()},children:"Retry run"}),(0,H.jsx)(x.Z,{ml:1}),(0,H.jsx)(s.ZP,{onClick:B,children:"Cancel run"})]})})]}),[m.VO.CANCELLED,m.VO.FAILED,m.VO.COMPLETED].includes(L)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(E.ZP,{bold:!0,color:"#9ECBFF",children:["Run ",L]}),(0,H.jsx)(x.Z,{mb:1}),(0,H.jsxs)(E.ZP,{children:["Retry the run with changes you have made to the pipeline.",F?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("br",{}),"Note that the retried run may appear on a previous page."]}):null]}),(0,H.jsx)(x.Z,{mb:1}),(0,H.jsx)(s.ZP,{onClick:G,children:"Retry run"})]})]})})]})}n.Z=function(e){var n=e.allowBulkSelect,t=e.allowDelete,u=e.deletePipelineRun,b=e.disableKeyboardNav,O=e.disableRowSelect,k=e.emptyMessage,N=void 0===k?"No runs available":k,U=e.fetchPipelineRuns,G=e.hideTriggerColumn,K=e.includePipelineTags,Q=e.onClickRow,W=e.pipelineRuns,q=e.selectedRun,J=e.selectedRuns,$=e.setSelectedRun,ee=e.setSelectedRuns,ne=e.setErrors,te=(0,a.useRouter)(),ie=(0,S.Ct)(),re=(0,M.q)(),ue=(0,c.useRef)({}),le=(0,c.useState)(null),oe=le[0],ce=le[1],ae=(0,c.useState)(null),se=ae[0],de=ae[1],pe=(0,c.useState)(null),fe=pe[0],he=pe[1],ve=(0,c.useState)(0),me=ve[0],ge=ve[1],xe=(0,c.useState)(0),be=xe[0],_e=xe[1],je=(0,o.Db)((function(e){var n=e.id,t=e.status;return I.ZP.pipeline_runs.useUpdate(n)({pipeline_run:{status:t}})}),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){ce(null),null===U||void 0===U||U()},onErrorCallback:function(e,n){ce(null),null===ne||void 0===ne||ne({errors:n,response:e})}})}}),Ee=(0,r.Z)(je,2),Ie=Ee[0],Oe=Ee[1].isLoading,ye="PipelineDetail/Runs/Table",Pe="pipeline-runs",Ze=(0,c.useCallback)((function(e){if(!e)return null;var n=W.findIndex((function(n){return n.id===e.id}));return n>=0?n:null}),[W]),Ce=(0,Y.y)(),we=Ce.registerOnKeyDown,ke=Ce.unregisterOnKeyDown;(0,c.useEffect)((function(){return function(){ke(ye)}}),[ke,ye]),we(ye,(function(e,n){var t=n[w.Bu],i=n[w.kD];$&&!b&&(t||i)&&$((function(n){var r=Ze(n);if(null!==r){if(e.repeat)return e.preventDefault(),n;if(t){var u=r-1;return u<0&&(u=W.length-1),W[u]}if(i){var l=r+1;return l>=W.length&&(l=0),W[l]}}return n}))}),[W,$]),(0,c.useEffect)((function(){var e=Ze(q);if(null!==e){var n=(0,Z.w4)({rowIndex:e,uuid:Pe}),t=document.getElementById(n);t&&t.scrollIntoView({behavior:"smooth",block:"center"})}}),[Ze,q]);var Ne=re?Z.O$:{},De=[null,1],Te=[{uuid:"Status"},{uuid:"Pipeline"}];G||(De.push(1),Te.push({uuid:"Trigger"})),K&&(De.push(null),Te.push({uuid:"Pipeline tags"})),De.push.apply(De,[1,1,1,null,null]),Te.push.apply(Te,[B(B({},Ne),{},{uuid:"Execution date"}),B(B({},Ne),{},{uuid:"Started at"}),B(B({},Ne),{},{uuid:"Completed at"}),{uuid:"Execution time"},{uuid:"Block runs"},{uuid:"Logs"}]),t&&!ie&&(De.push.apply(De,[null]),Te.push({label:function(){return""},uuid:"Delete"}));var Le=(0,c.useMemo)((function(){return W.every((function(e){var n=e.id;return!(null===J||void 0===J||!J[n])}))}),[W,J]);n&&(De.unshift(null),Te.unshift({label:function(){return(0,H.jsx)(d.Z,{checked:Le,onClick:function(){var e=(0,R.HK)(W||[],(function(e){return e.id}));ee(Le?{}:e)}})},uuid:"Selected"})),!O&&Q&&(De.push(null),Te.push({label:function(){return""},uuid:"action"}));var Ae=(0,c.useCallback)((function(e,n){if(Q&&ee&&n&&n.metaKey){var t=W[e];ee((function(e){var n=!(null===e||void 0===e||!e[t.id]);return B(B({},e),{},(0,i.Z)({},t.id,n?null:t))}))}else Q&&Q(e)}),[Q,W,ee]);return(0,H.jsx)(D.cl,{minHeight:30*T.iI,overflowVisible:!!se,children:0===(null===W||void 0===W?void 0:W.length)?(0,H.jsx)(x.Z,{px:3,py:1,children:(0,H.jsx)(E.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:N})}):(0,H.jsx)(_.Z,{columnFlex:De,columns:Te,isSelectedRow:function(e){return!O&&W[e].id===(null===q||void 0===q?void 0:q.id)},onClickRow:O?null:Ae,rowVerticalPadding:6,rows:null===W||void 0===W?void 0:W.map((function(e,r){var o=e.block_runs_count,a=e.completed_block_runs_count,b=e.completed_at,_=e.execution_date,I=e.id,w=e.pipeline_schedule_id,k=e.pipeline_schedule_name,N=e.pipeline_tags,D=e.pipeline_uuid,T=e.started_at,R=e.status;ue.current[I]=(0,c.createRef)();var S,V,M=!I&&!R,Y="".concat(a," out of ").concat(o," block runs completed"),q=(0,H.jsx)(j.Z,{tags:null===N||void 0===N?void 0:N.map((function(e){return{uuid:e}}))},"row_pipeline_tags_".concat(r)),$=[];r>0&&W[r-1].execution_date===e.execution_date&&W[r-1].pipeline_schedule_id===e.pipeline_schedule_id?($=[(0,H.jsx)(x.Z,{ml:1,children:(0,H.jsxs)(h.ZP,{alignItems:"center",children:[(0,H.jsx)(P.TT,{size:C.bL,useStroke:!0}),(0,H.jsx)(s.ZP,{borderRadius:"".concat(y.D7,"px"),notClickable:!0,padding:"6px",children:(0,H.jsx)(E.ZP,{muted:!0,children:m.Do[R]})})]})},"row_status"),(0,H.jsx)(E.ZP,{default:!0,monospace:!0,muted:!0,children:D},"row_pipeline_uuid")],G||$.push((0,H.jsx)(E.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_trigger_retry")),K&&$.push(q),(S=$).push.apply(S,[(0,H.jsx)(E.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_date_retry"),(0,c.createElement)(E.ZP,B(B({},z),{},{key:"row_started_at",muted:!0,title:T?(0,L._6)(T):null}),T?re?(0,L.XG)(T,re):(0,A.Vx)(T):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(E.ZP,B(B({},z),{},{key:"row_completed_at",muted:!0,title:b?(0,L._6)(b):null}),b?re?(0,L.XG)(b,re):(0,A.Vx)(b):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(E.ZP,B(B({},z),{},{default:!0,key:"row_execution_time",title:T&&b?(0,L.Qf)({endDatetime:b,showFullFormat:!0,startDatetime:T}):null}),T&&b?(0,L.Qf)({endDatetime:b,startDatetime:T}):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,H.jsx)(l(),{as:"/pipelines/".concat(D,"/runs/").concat(I),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,muted:!0,title:Y,children:"".concat(a," / ").concat(o)})},"row_block_runs"),(0,H.jsx)(s.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){e.stopPropagation(),te.push("/pipelines/".concat(D,"/logs?pipeline_run_id[]=").concat(I))},children:(0,H.jsx)(P.UL,{default:!0,size:C.bL})},"row_logs")])):($=[(0,H.jsx)(X,{cancelingRunId:oe,disabled:M,isLoadingCancelPipeline:Oe,onCancel:Ie,onSuccess:U,pipelineRun:e,setCancelingRunId:ce,setErrors:ne,setShowConfirmationId:de,showConfirmationId:se},"row_retry_button"),(0,H.jsx)(E.ZP,{default:!0,monospace:!0,children:D},"row_pipeline_uuid")],G||$.push((0,H.jsx)(l(),{as:"/pipelines/".concat(D,"/triggers/").concat(w),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,sky:!0,children:k})},"row_trigger")),K&&$.push(q),(V=$).push.apply(V,[(0,c.createElement)(E.ZP,B(B({},z),{},{default:!0,key:"row_date",title:_?(0,L._6)(_):null}),_?re?(0,L.XG)(_,re):(0,A.Vx)(_):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(E.ZP,B(B({},z),{},{default:!0,key:"row_started_at",title:T?(0,L._6)(T):null}),T?re?(0,L.XG)(T,re):(0,A.Vx)(T):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(E.ZP,B(B({},z),{},{default:!0,key:"row_completed_at",title:b?(0,L._6)(b):null}),b?re?(0,L.XG)(b,re):(0,A.Vx)(b):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(E.ZP,B(B({},z),{},{default:!0,key:"row_execution_time",title:T&&b?(0,L.Qf)({endDatetime:b,showFullFormat:!0,startDatetime:T}):null}),T&&b?(0,L.Qf)({endDatetime:b,startDatetime:T}):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,H.jsx)(l(),{as:"/pipelines/".concat(D,"/runs/").concat(I),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,disabled:M,sky:!0,title:Y,children:M?"":"".concat(a," / ").concat(o)})},"row_block_runs"),(0,H.jsx)(s.ZP,{default:!0,disabled:M,iconOnly:!0,noBackground:!0,onClick:function(e){e.stopPropagation(),te.push("/pipelines/".concat(D,"/logs?pipeline_run_id[]=").concat(I))},children:(0,H.jsx)(P.UL,{default:!0,size:C.bL})},"row_logs")]));if(t&&!ie&&$.push((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(s.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){var n,t,i,r;(0,F.j)(e),he(I),ge((null===(n=ue.current[I])||void 0===n||null===(t=n.current)||void 0===t?void 0:t.offsetTop)||0),_e((null===(i=ue.current[I])||void 0===i||null===(r=i.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:ue.current[I],title:"Delete",children:(0,H.jsx)(P.rF,{default:!0,size:C.bL})}),(0,H.jsx)(p.Z,{onClickOutside:function(){return he(null)},open:fe===I,children:(0,H.jsx)(g.Z,{danger:!0,left:(be||0)-Z.nH,onCancel:function(){return he(null)},onClick:function(){he(null),u(I)},title:"Are you sure you want to delete this run (id ".concat(I,' for trigger "').concat(k,'")?'),top:(me||0)-(r<=1?Z.oz:Z.OK),width:Z.Xx})})]})),n){var le=!(null===J||void 0===J||!J[I]);$.unshift((0,H.jsx)(d.Z,{checked:le,onClick:function(n){n.stopPropagation(),ee((function(n){return B(B({},n),{},(0,i.Z)({},I,le?null:e))}))}},"selected-pipeline-run-".concat(I)))}return!O&&Q&&$.push((0,H.jsx)(f.Z,{flex:1,justifyContent:"flex-end",children:(0,H.jsx)(P._Q,{default:!0,size:C.bL})})),$})),uuid:Pe})})}},48381:function(e,n,t){var i=t(82684),r=t(31882),u=t(55485),l=t(30160),o=t(86735),c=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,a=void 0===t?[]:t,s=(0,i.useMemo)((function(){return(null===a||void 0===a?void 0:a.length)||0}),[a]),d=(0,i.useMemo)((function(){return(0,o.YC)(a||[],"uuid")}),[a]);return(0,c.jsx)(u.ZP,{alignItems:"center",flexWrap:"wrap",children:null===d||void 0===d?void 0:d.reduce((function(e,t){return e.push((0,c.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,c.jsx)(r.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,c.jsx)(l.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},16488:function(e,n,t){t.d(n,{IJ:function(){return v},M8:function(){return y},Vx:function(){return _},XM:function(){return O},_U:function(){return h},eI:function(){return b},gU:function(){return E},lO:function(){return k},ri:function(){return g},tL:function(){return j},vJ:function(){return I},xH:function(){return x}});var i,r=t(82394),u=t(92083),l=t.n(u),o=t(3917),c=t(4383),a=t(30229),s=t(42122),d=t(86735);function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function f(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}var h=function(e){return!!e&&!Object.values(a.U5).includes(e)};function v(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,i=n.completed_at,u=n.started_at,o=n.status,c=null;u&&i&&(c=l()(i).valueOf()-l()(u).valueOf());return f(f({},e),{},(0,r.Z)({},t,{runtime:c,status:o}))}),{})}var m,g=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return e?n.slice(0,1):n};function x(e){var n=(0,s.gR)(e,[a.gm.INTERVAL,a.gm.TYPE]),t=e[a.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var i=e[a.gm.TYPE];return i&&(n["schedule_type[]"]=i),n}function b(e){if(!e)return null;var n=new Date(l()(e).valueOf()),t=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(t)}function _(e){return"string"!==typeof e?e:b(e.split("+")[0]).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(m||(m={}));var j=(i={},(0,r.Z)(i,m.DAY,86400),(0,r.Z)(i,m.HOUR,3600),(0,r.Z)(i,m.MINUTE,60),(0,r.Z)(i,m.SECOND,1),i);function E(e){var n=m.SECOND,t=e;return e%86400===0?(t/=86400,n=m.DAY):e%3600===0?(t/=3600,n=m.HOUR):e%60===0&&(t/=60,n=m.MINUTE),{time:t,unit:n}}function I(e,n){return e*j[n]}function O(e,n,t){var i="".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&&(i=i.concat(":00")),null!==t&&void 0!==t&&t.localTimezone){var r=l()(e);r.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),r.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),r.set("second",0),i=r.format(o.lE),null!==t&&void 0!==t&&t.convertToUtc&&(i=(0,o.d$)(i,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))}return i}function y(e){var n,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i="",r=!0;return r&&(t?i="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(i="".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&&(i="".concat(i,"/").concat(e.token)))),r&&(n=window.location.port)&&(i=i.replace(n,c.QT)),i}function P(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var i=t.indexOf(e),r=0;if(n<0)for(var u=0;u>n;u--)0===i?(i=t.length-1,r-=1):i-=1;else if(n>0)for(var l=0;l<n;l++)i===t.length-1?(i=0,r+=1):i+=1;return{additionalOffset:r,cronValue:String(t[i]||e)}}(+e,n,t)}var Z=(0,d.m5)(60),C=(0,d.m5)(24),w=(0,o.Cs)();function k(e,n){if(!e)return e;var t=l()().local().format("Z"),i=t.split(":"),r="-"===t[0],u=3===i[0].length?Number(i[0].slice(1)):Number(i[0]),o=Number(i[1]);(r&&!n||!r&&n)&&(u=-u,o=-o);var c=e.split(" "),a=c[0],s=c[1],d=c[2],p=P(a,o,Z),f=P(s,u+p.additionalOffset,C);if(c[0]=p.cronValue,c[1]=f.cronValue,0!==(null===f||void 0===f?void 0:f.additionalOffset)){var h=P(d,f.additionalOffset,w);c[2]=h.cronValue}return c.join(" ")}},44265:function(e,n,t){t.d(n,{Az:function(){return a},BF:function(){return c},Do:function(){return d},IK:function(){return o},P0:function(){return r},VO:function(){return l},sZ:function(){return s}});var i,r,u=t(82394),l=t(41143).V,o=[l.FAILED,l.COMPLETED,l.RUNNING,l.CANCELLED,l.INITIAL],c=[l.INITIAL,l.RUNNING],a=[l.CANCELLED,l.COMPLETED,l.FAILED],s="__mage_variables",d=(i={},(0,u.Z)(i,l.CANCELLED,"Cancelled"),(0,u.Z)(i,l.COMPLETED,"Done"),(0,u.Z)(i,l.FAILED,"Failed"),(0,u.Z)(i,l.INITIAL,"Ready"),(0,u.Z)(i,l.RUNNING,"Running"),i);!function(e){e.PIPELINE_UUID="pipeline_uuid[]",e.STATUS="status[]",e.TAG="pipeline_tag[]"}(r||(r={}))},30229:function(e,n,t){t.d(n,{TR:function(){return f},U5:function(){return c},Wb:function(){return p},Xm:function(){return u},Z4:function(){return a},fq:function(){return o},gm:function(){return s},kJ:function(){return d}});var i,r,u,l=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(u||(u={}));var o,c,a=(i={},(0,l.Z)(i,u.API,(function(){return"API"})),(0,l.Z)(i,u.EVENT,(function(){return"event"})),(0,l.Z)(i,u.TIME,(function(){return"schedule"})),i);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(o||(o={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly",e.ALWAYS_ON="@always_on"}(c||(c={}));var s,d,p=[c.ONCE,c.HOURLY,c.DAILY,c.WEEKLY,c.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 f=(r={},(0,l.Z)(r,d.CREATED_AT,"Created at"),(0,l.Z)(r,d.NAME,"Name"),(0,l.Z)(r,d.PIPELINE,"Pipeline"),(0,l.Z)(r,d.STATUS,"Active"),(0,l.Z)(r,d.TYPE,"Type"),r)},31882:function(e,n,t){var i=t(38626),r=t(71180),u=t(55485),l=t(30160),o=t(44897),c=t(72473),a=t(70515),s=t(61896),d=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||o.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||o.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((a.iI+s.Al)/2,"px;\n height: ").concat(1.5*a.iI+s.Al,"px;\n padding: ").concat(a.iI/1.5,"px ").concat(1.25*a.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((a.iI/2+s.Al)/2,"px;\n height: ").concat(s.Al+a.iI/2+2,"px;\n padding: ").concat(a.iI/4,"px ").concat(a.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((a.iI/1+s.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||o.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,i=e.disabled,o=e.label,s=e.monospace,f=e.onClick,h=e.primary,v=e.small,m=e.xsmall;return(0,d.jsx)(p,{border:n,primary:h,small:v,xsmall:m,children:(0,d.jsx)(r.ZP,{basic:!0,disabled:i,noBackground:!0,noPadding:!0,onClick:f,transparent:!0,children:(0,d.jsxs)(u.ZP,{alignItems:"center",children:[t,o&&(0,d.jsx)(l.ZP,{monospace:s,small:v,xsmall:m,children:o}),!i&&f&&(0,d.jsx)("div",{style:{marginLeft:2}}),!i&&f&&(0,d.jsx)(c.x8,{default:h,muted:!h,size:v?a.iI:1.25*a.iI})]})})})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4267],{28968:function(n,t,e){e.d(t,{p:function(){return O}});var r=e(82394),o=e(26304),i=e(82684),c=e(38626),a=e(65976),u=e(30160),l=e(44897),d=e(42631),s=e(95363),f=e(61896),p=e(70515),m=e(91437),h=e(28598),g=["afterIcon","afterIconSize","afterIconClick","autoGenerated","beforeIcon","beforeIconSize","compact","dynamicSizing","fitContent","fullWidth","input","invertedTheme","label","labelDescription","labelFixed","maxWidth","meta","name","onChange","onClick","passwordrules","placeholder","readOnly","required","setContentOnMount","showLabelRequirement","small","topPosition","type","value","visible","width"];function b(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function v(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?b(Object(e),!0).forEach((function(t){(0,r.Z)(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):b(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var y=c.default.div.withConfig({displayName:"InputWrapper__ContainerStyle",componentId:"sc-aepxnk-0"})(["display:flex;align-items:center;.label-enter{opacity:0;transform:translate(0,","px);}.label-enter-active{opacity:1;transform:translate(0,0);transition:all 200ms;}.label-exit{opacity:1;transform:translate(0,0);}.label-exit-active{opacity:0;transform:translate(0,13px);transition:all 100ms;}"," "," "," "," ",""],p.iI,(function(n){return n.visible&&"\n position: relative;\n "}),(function(n){return!n.visible&&"\n opacity: 0;\n position: absolute;\n z-index: 0;\n "}),(function(n){return n.fitContent&&"\n width: fit-content;\n "}),(function(n){return n.maxWidth&&"\n max-width: ".concat(n.maxWidth,"px;\n ")}),(function(n){return n.fullWidth&&"\n width: 100%;\n "})),w=c.default.div.withConfig({displayName:"InputWrapper__LabelContainerStyle",componentId:"sc-aepxnk-1"})(["position:absolute;"," ",""],(function(n){return!n.compact&&!n.beforeIcon&&"\n left: ".concat(2*p.iI,"px;\n top: ").concat(.75*p.iI,"px;\n ")}),(function(n){return!n.compact&&n.beforeIcon&&"\n left: ".concat(5*p.iI,"px;\n top: ").concat(.5*p.iI,"px;\n ")})),x=c.default.div.withConfig({displayName:"InputWrapper__IconContainerStyle",componentId:"sc-aepxnk-2"})(["align-items:center;display:flex;height:100%;position:absolute;top:","px;"," "," "," ",""],(function(n){return n.top?0:d.YF}),(function(n){return n.noPointerEvents&&"\n pointer-events: none;\n "}),(function(n){return!n.compact&&"\n padding: ".concat(p.iI,"px;\n ")}),(function(n){return n.compact&&"\n padding: ".concat(.75*p.iI,"px;\n ")}),(function(n){return n.right&&"\n right: 0;\n "})),O=(0,c.css)([""," "," "," -moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;background-color:transparent;box-sizing:border-box;outline-style:none;"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",""],(0,m.Xh)("appearance","none"),(0,m.Xh)("transition","background 300ms ease 0s, border 300ms ease 0s, color 300ms ease 0s"),(0,m.eR)("200ms box-shadow linear"),u.G,(function(n){return!n.small&&!n.large&&"\n ".concat(f.iD,"\n ")}),(function(n){return n.small&&"\n ".concat(f.HC,"\n line-height: 20px !important;\n ")}),(function(n){return!n.monospace&&"\n font-family: ".concat(s.YC,";\n ")}),(function(n){return n.monospace&&"\n font-family: ".concat(s.Vp,";\n ")}),(function(n){return n.bold&&"\n font-family: ".concat(s.nF,";\n ")}),(function(n){return!n.borderless&&"\n border-radius: ".concat(d.n_,"px;\n border-style: ").concat(d.M8,";\n border-width: ").concat(d.YF,"px};\n ")}),(function(n){return n.noBorderRadiusBottom&&"\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n "}),(function(n){return n.noBorderRadiusBottom&&"\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n "}),(function(n){return n.borderRadius&&"\n border-radius: ".concat(n.borderRadius,"px;\n ")}),(function(n){return n.borderless&&"\n border-style: none;\n "}),(function(n){return n.noBorder&&"\n border-style: none;\n "}),(function(n){return!n.noBorder&&n.noBorderUntilFocus&&"\n border-style: none;\n\n &:focus {\n border-style: ".concat(d.M8,";\n }\n ")}),(function(n){return!n.noBorder&&n.noBorderUntilHover&&"\n border-style: none;\n\n &:hover {\n border-style: ".concat(d.M8,";\n }\n ")}),(function(n){return!n.disabled&&!n.invertedTheme&&"\n border-color: ".concat((n.theme.interactive||l.Z.interactive).defaultBorder,";\n color: ").concat((n.theme.content||l.Z.content).active,";\n\n ::placeholder {\n color: ").concat((n.theme.content||l.Z.content).default,";\n }\n ")}),(function(n){return!n.disabled&&!n.noBackground&&"\n &:hover {\n background-color: ".concat((n.theme.interactive||l.Z.interactive).hoverOverlay,";\n border-color: ").concat((n.theme.interactive||l.Z.interactive).hoverBorder,";\n }\n\n &:focus {\n background-color: ").concat((n.theme.interactive||l.Z.interactive).hoverBackground,";\n border-color: ").concat((n.theme.interactive||l.Z.interactive).focusBorder,";\n color: ").concat((n.theme.content||l.Z.content).active,";\n }\n\n &:active {\n background-color: ").concat((n.theme.interactive||l.Z.interactive).activeOverlay,";\n }\n ")}),(function(n){return n.noBlinkingCursor&&"\n &:focus {\n text-indent: -9999em;\n text-shadow : 9999em 0 0 #000;\n }\n "}),(function(n){return n.shadow&&"\n &:focus {\n box-shadow:\n 0 0 0 1px ".concat((n.theme.interactive||l.Z.interactive).focusBorder," inset,\n 0 0 0 1px ").concat((n.theme.interactive||l.Z.interactive).focusBorder,"\n ;\n }\n ")}),(function(n){return n.disabled&&"\n border-color: ".concat((n.theme.interactive||l.Z.interactive).disabledBorder,";\n color: ").concat((n.theme.content||l.Z.content).disabled,";\n\n ::placeholder {\n color: ").concat((n.theme.content||l.Z.content).disabled,";\n }\n ")}),(function(n){return n.danger&&"\n border-color: ".concat((n.theme.interactive||l.Z.interactive).dangerBorder," !important;\n\n &:active,\n &:focus,\n &:hover {\n border-color: ").concat((n.theme.interactive||l.Z.interactive).dangerBorder," !important;\n }\n ")}),(function(n){return!n.compact&&"\n padding-left: ".concat(2*p.iI,"px;\n padding-right: ").concat(2*p.iI,"px;\n ")}),(function(n){return!n.compact&&!(n.label&&n.isFocused)&&"\n padding-bottom: ".concat(1.5*p.iI,"px;\n padding-top: ").concat(1.5*p.iI,"px;\n ")}),(function(n){return!n.compact&&n.label&&n.isFocused&&"\n padding-bottom: ".concat(.75*p.iI,"px;\n padding-top: ").concat(.75*p.iI+12,"px;\n ")}),(function(n){return n.beforeIcon&&!n.compact&&"\n padding-left: ".concat(5*p.iI,"px !important;\n ")}),(function(n){return n.afterIcon&&!n.compact&&"\n padding-right: ".concat(5*p.iI,"px !important;\n ")}),(function(n){return n.compact&&"\n padding-bottom: ".concat(.75*p.iI,"px;\n padding-left: ").concat(1.25*p.iI,"px;\n padding-right: ").concat(1.25*p.iI,"px;\n padding-top: ").concat(.75*p.iI,"px;\n ")}),(function(n){return n.beforeIcon&&n.compact&&"\n padding-left: ".concat(4*p.iI,"px !important;\n ")}),(function(n){return n.afterIcon&&n.compact&&"\n padding-right: ".concat(4*p.iI,"px !important;\n ")}),(function(n){return!n.inputWidth&&!n.minWidth&&"\n width: 100%;\n "}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,"px;\n ")}),(function(n){return n.minWidth&&"\n min-width: ".concat(n.minWidth,"px;\n ")}),(function(n){return n.inputWidth&&"\n width: ".concat(n.inputWidth,"px;\n ")}),(function(n){return n.alignCenter&&"\n text-align: center;\n "}),(function(n){return n.alignRight&&"\n text-align: right;\n "}),(function(n){return n.basic&&"\n border: none;\n padding: 0 ".concat(.25*p.iI,"px;\n ")}),(function(n){return n.basicPadding&&"\n border: none;\n padding: ".concat(.5*p.iI,"px ").concat(1*p.iI,"px !important;\n ")}),(function(n){return"undefined"!==typeof n.paddingHorizontal&&"\n padding-left: ".concat(n.paddingHorizontal,"px;\n padding-right: ").concat(n.paddingHorizontal,"px;\n ")}),(function(n){return"undefined"!==typeof n.paddingVertical&&"\n padding-bottom: ".concat(n.paddingVertical,"px;\n padding-top: ").concat(n.paddingVertical,"px;\n ")}),(function(n){return"undefined"!==typeof n.paddingRight&&"\n padding-right: ".concat(n.paddingRight,"px !important;\n ")}),(function(n){return n.basic&&!n.noBackground&&"\n background-color: ".concat((n.theme.monotone||l.Z.monotone).grey500,";\n\n &:active,\n &:focus,\n &:hover {\n background-color: ").concat((n.theme.monotone||l.Z.monotone).grey500,";\n }\n ")}),(function(n){return n.basic&&n.noBackground&&"\n background-color: none;\n\n &:active,\n &:focus,\n &:hover {\n background-color: ".concat((n.theme.monotone||l.Z.monotone).grey200,";\n }\n ")}),(function(n){return n.primary&&!n.swapBackgroundAndTextColor&&"\n border-color: ".concat((n.theme.accent||l.Z.accent).purpleLight,";\n\n &:active,\n &:focus {\n border-color: ").concat((n.theme.accent||l.Z.accent).purple," !important;\n }\n\n &:hover {\n border-color: ").concat((n.theme.chart||l.Z.chart).primary," !important;\n }\n ")}),(function(n){return n.swapBackgroundAndTextColor&&"\n background-color: transparent;\n\n &:active,\n &:focus,\n &:hover {\n background-color: transparent;\n }\n "}),(function(n){return n.earth&&n.swapBackgroundAndTextColor&&"\n color: ".concat((n.theme.brand||l.Z.brand).earth500," !important;\n\n &:active,\n &:focus,\n &:hover {\n color: ").concat((n.theme.brand||l.Z.brand).earth500," !important;\n }\n\n ::placeholder {\n color: ").concat((n.theme.brand||l.Z.brand).earth300,";\n }\n ")}),(function(n){return n.fire&&n.swapBackgroundAndTextColor&&"\n color: ".concat((n.theme.brand||l.Z.brand).fire500," !important;\n\n &:active,\n &:focus,\n &:hover {\n color: ").concat((n.theme.brand||l.Z.brand).fire500," !important;\n }\n\n ::placeholder {\n color: ").concat((n.theme.brand||l.Z.brand).fire300,";\n }\n ")}),(function(n){return n.primary&&n.swapBackgroundAndTextColor&&"\n color: ".concat((n.theme.brand||l.Z.brand).wind500," !important;\n\n &:active,\n &:focus,\n &:hover {\n color: ").concat((n.theme.brand||l.Z.brand).wind500," !important;\n }\n\n ::placeholder {\n color: ").concat((n.theme.brand||l.Z.brand).wind300,";\n }\n ")}),(function(n){return n.warning&&!n.swapBackgroundAndTextColor&&"\n background-color: ".concat((n.theme.brand||l.Z.brand).energy200," !important;\n\n &:active,\n &:focus,\n &:hover {\n background-color: ").concat((n.theme.brand||l.Z.brand).energy200," !important;\n }\n ")}),(function(n){return n.warning&&n.swapBackgroundAndTextColor&&"\n color: ".concat((n.theme.brand||l.Z.brand).energy500," !important;\n\n &:active,\n &:focus,\n &:hover {\n color: ").concat((n.theme.brand||l.Z.brand).energy500," !important;\n }\n ")}),(function(n){return n.water&&n.swapBackgroundAndTextColor&&"\n color: ".concat((n.theme.brand||l.Z.brand).water500," !important;\n\n &:active,\n &:focus,\n &:hover {\n color: ").concat((n.theme.brand||l.Z.brand).water500," !important;\n }\n ")}),(function(n){return n.earth&&n.borderTheme&&"\n &:focus,\n &:active {\n border-color: ".concat((n.theme.brand||l.Z.brand).earth300,";\n border-width: ").concat(d.mP,"px;\n }\n ")}),(function(n){return n.fire&&n.borderTheme&&"\n &:focus,\n &:active {\n border-color: ".concat((n.theme.brand||l.Z.brand).fire300,";\n border-width: ").concat(d.mP,"px;\n }\n ")}),(function(n){return n.water&&n.borderTheme&&"\n &:focus,\n &:active {\n border-color: ".concat((n.theme.brand||l.Z.brand).water300,";\n border-width: ").concat(d.mP,"px;\n }\n ")}),(function(n){return n.wind&&n.borderTheme&&"\n &:focus,\n &:active {\n border-color: ".concat((n.theme.brand||l.Z.brand).wind300,";\n border-width: ").concat(d.mP,"px;\n }\n ")}),(function(n){return n.info&&"\n background-color: ".concat((n.theme.brand||l.Z.brand).water100," !important;\n\n &:active,\n &:focus,\n &:hover {\n background-color: ").concat((n.theme.brand||l.Z.brand).water100," !important;\n }\n ")}),(function(n){return n.negative&&"\n background-color: ".concat((n.theme.accent||l.Z.accent).negativeTransparent," !important;\n\n &:active,\n &:focus,\n &:hover {\n background-color: ").concat((n.theme.accent||l.Z.accent).negativeTransparent," !important;\n }\n ")}),(function(n){return n.defaultColor&&"\n background-color: ".concat((n.theme.interactive||l.Z.interactive).defaultBackground," !important;\n border: ").concat(d.YF,"px ").concat(d.M8," ").concat((n.theme.monotone||l.Z.monotone).black,";\n\n &:active,\n &:focus,\n &:hover {\n background-color: ").concat((n.theme.interactive||l.Z.interactive).hoverBackground," !important;\n }\n ")}),(function(n){return n.greyBorder&&"\n border: ".concat(d.YF,"px ").concat(d.M8," ").concat((n.theme||l.Z).borders.button,";\n ")}),(function(n){return n.width&&"\n width: ".concat(n.width,"px;\n ")}),(function(n){return n.disablePointerEvents&&"\n pointer-events: none;\n "})),k=c.default.div.withConfig({displayName:"InputWrapper__LabelWrapperStyle",componentId:"sc-aepxnk-3"})(["margin-bottom:","px;"],.75*p.iI),Z=c.default.span.withConfig({displayName:"InputWrapper__SpanStyle",componentId:"sc-aepxnk-4"})(["position:absolute;opacity:0;"]),j=function(n,t){var e=n.afterIcon,r=n.afterIconSize,c=n.afterIconClick,l=n.autoGenerated,d=n.beforeIcon,s=n.beforeIconSize,f=n.compact,m=n.dynamicSizing,b=n.fitContent,O=n.fullWidth,j=n.input,I=n.invertedTheme,S=n.label,C=n.labelDescription,D=n.labelFixed,P=n.maxWidth,M=n.meta,_=n.name,Y=n.onChange,B=n.onClick,T=n.passwordrules,H=n.placeholder,E=n.readOnly,W=n.required,z=n.setContentOnMount,A=n.showLabelRequirement,L=n.small,N=n.topPosition,F=n.type,R=n.value,q=n.visible,V=void 0===q||q,U=n.width,K=(0,o.Z)(n,g),G=!!(M&&M.touched&&M.error),X=(0,i.useRef)(null),J=(0,i.useRef)(null),$={muted:!0,size:p.iI*(f?2.5:3)},Q=e&&(0,h.jsx)(x,{compact:f,noPointerEvents:!c,right:!0,children:i.cloneElement(e,r?v(v({},$),{},{size:r}):$)}),nn=(0,i.useState)(R),tn=nn[0],en=nn[1],rn=(0,i.useState)(!1),on=rn[0],cn=rn[1],an=(0,i.useState)(!1),un=an[0],ln=an[1],dn=(0,i.useState)(10),sn=dn[0],fn=dn[1],pn=A?A({content:tn,isFocused:on}):on||!!tn;return(0,i.useEffect)((function(){z&&!tn&&R&&en(R)}),[tn,en,z,R]),(0,i.useEffect)((function(){var n;m&&fn(((null===J||void 0===J||null===(n=J.current)||void 0===n?void 0:n.offsetWidth)||25*p.iI)+p.iI)}),[tn,m,t]),(0,h.jsxs)(y,{fitContent:b,fullWidth:O,maxWidth:P,visible:V,children:[(D||C)&&(0,h.jsxs)(k,{children:[(0,h.jsx)("div",{children:D&&(0,h.jsxs)(u.ZP,{bold:!0,inline:!0,inverted:I,small:L,children:[D," ",W&&(0,h.jsx)(u.ZP,{inline:!0,inverted:I,muted:!I,small:!0,children:"(required)"})," ",l&&(0,h.jsx)(u.ZP,{inline:!0,inverted:I,muted:!I,small:!0,children:"(auto-generated)"})]})}),C&&(0,h.jsx)(u.ZP,{inverted:I,muted:!I,small:!0,children:C})]}),(S||0===S)&&!f&&(0,h.jsx)(a.Z,{classNames:"label",in:(S||0===S)&&pn,timeout:200,unmountOnExit:!0,children:(0,h.jsx)(w,{beforeIcon:d,children:(0,h.jsx)(u.ZP,{muted:!0,xsmall:!0,children:S})})}),d&&(0,h.jsx)(x,{compact:f,top:N,children:i.cloneElement(d,v(v({},s?v(v(v({},$),null===d||void 0===d?void 0:d.props),{},{size:s}):$),null===d||void 0===d?void 0:d.props))}),c&&(0,h.jsx)("a",{href:"#",onClick:function(n){n.preventDefault(),c(n,t||X)},children:Q}),!c&&Q,m&&(0,h.jsx)(Z,{ref:J,children:tn}),i.cloneElement(j,{afterIcon:e,beforeIcon:d,compact:f,danger:G,fullWidth:O,hasContent:!!tn,isFocused:pn,label:0===S?"0":S,name:_,onBlur:function(n){K.onBlur&&K.onBlur(n),cn(!1),ln(!0)},onChange:function(n){en(n.target.value),Y&&Y(n)},onClick:B,onFocus:function(n){K.onFocus&&K.onFocus(n),cn(!0)},passwordrules:T,placeholder:S||0===S?pn?"":S:H,readOnly:E,ref:t||X,type:F,value:R,width:m?sn:U}),((null===M||void 0===M?void 0:M.touched)&&(null===M||void 0===M?void 0:M.error)||!on&&un&&!tn&&W)&&(0,h.jsx)(u.ZP,{danger:!0,noWrapping:!0,small:!0,style:{marginLeft:12},children:(null===M||void 0===M?void 0:M.error)||"This field is required."})]})};t.Z=i.forwardRef(j)},44085:function(n,t,e){var r=e(82394),o=e(26304),i=e(82684),c=e(38626),a=e(28968),u=e(70987),l=e(70515),d=e(28598),s=["beforeIcon","children","label","multiple","placeholder"];function f(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function p(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?f(Object(e),!0).forEach((function(t){(0,r.Z)(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):f(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var m=c.default.select.withConfig({displayName:"Select__SelectStyle",componentId:"sc-q6ezu2-0"})([""," padding-right:","px;&:hover{cursor:pointer;}"," "," "," "," ",""],a.p,3*l.iI,(function(n){return!n.afterIcon&&'\n background-image: url("data:image/svg+xml;utf8,'.concat("\n <svg width='12' height='12' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'>\n <path\n clip-rule='evenodd'\n d='M8.0015 11.7109L14.0022 5.71017L12.588 4.29597L7.99485 8.88914L3.40754 4.34482L2 5.76567L8.0015 11.7109Z'\n fill='%23B4B8C0'\n fill-rule='evenodd'\n />\n </svg>",'");\n background-repeat: no-repeat;\n background-position: -webkit-calc(100% - ').concat(l.iI,"px) center;\n background-position: calc(100% - ").concat(l.iI,"px) center;\n ")}),(function(n){return!n.hasContent&&!n.showPlaceholder&&"\n color: ".concat((n.theme.content||u.Z.content).muted,";\n ")}),(function(n){return n.backgroundColor&&"\n background-color: ".concat(n.backgroundColor,";\n ")}),(function(n){return n.color&&"\n color: ".concat(n.color,";\n ")}),(function(n){return n.showPlaceholder&&"\n color: ".concat((n.theme.content||u.Z.content).inverted,";\n ")})),h=function(n,t){var e=n.beforeIcon,r=n.children,i=n.label,c=n.multiple,u=n.placeholder,l=(0,o.Z)(n,s);return(0,d.jsx)(a.Z,p(p({},l),{},{beforeIcon:e,input:(0,d.jsxs)(m,p(p({multiple:c},l),{},{children:[(i||u)&&(0,d.jsx)("option",{disabled:!(null===l||void 0===l||!l.value),value:"",children:i||u}),r]})),label:i,placeholder:u,ref:t,setContentOnMount:!0,showLabelRequirement:function(n){return!!n.content}}))};t.Z=i.forwardRef(h)},17488:function(n,t,e){var r=e(82394),o=e(91835),i=e(82684),c=e(38626),a=e(28968),u=e(28598);function l(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function d(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?l(Object(e),!0).forEach((function(t){(0,r.Z)(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var s=c.default.input.withConfig({displayName:"TextInput__TextInputStyle",componentId:"sc-1ii4qtc-0"})(["",""],a.p),f=function(n,t){var e=(0,o.Z)({},n);return(0,u.jsx)(a.Z,d(d({},e),{},{input:(0,u.jsx)(s,d({},e)),ref:t}))};t.Z=i.forwardRef(f)},86735:function(n,t,e){e.d(t,{$C:function(){return d},HK:function(){return m},Hk:function(){return l},Hl:function(){return s},IN:function(){return S},Od:function(){return y},Qj:function(){return k},Sm:function(){return I},Tw:function(){return b},VS:function(){return u},YC:function(){return h},fS:function(){return x},jV:function(){return D},m5:function(){return j},mp:function(){return C},mr:function(){return g},oM:function(){return w},ry:function(){return v},sE:function(){return f},tS:function(){return O},vM:function(){return p},w6:function(){return Z}});var r=e(82394),o=e(21831),i=e(42122);function c(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function a(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?c(Object(e),!0).forEach((function(t){(0,r.Z)(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function u(n,t,e){var r=e.slice(0,t),i=e.slice(t,null===e||void 0===e?void 0:e.length),c=[];return c.push.apply(c,(0,o.Z)(r)),c.push(n),c.push.apply(c,(0,o.Z)(i)),c}function l(n,t,e){var r=e.slice();return r.splice(t,0,n),r}function d(n,t,e){var r=t.slice();return f(t,e)||r.push(n),r}function s(n,t){var e=t.slice();return e.push(n),e}function f(n,t){return null===n||void 0===n?void 0:n.find(t)}function p(n,t){return null===n||void 0===n?void 0:n.reduce((function(n,e){var r=t(e);return n[r]||(n[r]=[]),n[r].push(e),n}),{})}function m(n,t){return null===n||void 0===n?void 0:n.reduce((function(n,e){return a(a({},n),{},(0,r.Z)({},t(e),e))}),{})}function h(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.ascending,c=void 0===r||r,a=e.absoluteValue,u=void 0!==a&&a,l="string"===typeof t||"number"===typeof t?function(n){return u?Math.abs((0,i.t2)(n,t)):(0,i.t2)(n,t)}:function(n){return u?Math.abs(t(n)):t(n)};return(0,o.Z)(n).sort((function(n,t){var e=0;return l(n)>l(t)?e=c?1:-1:l(n)<l(t)&&(e=c?-1:1),e}))}function g(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.ascending,r=void 0===e||e;return n.sort((function(n,t){var e=0;return n[0]>t[0]?e=r?1:-1:n[0]<t[0]&&(e=r?-1:1),e}))}function b(n,t){return n.reduce((function(n,e){return n.map(t).includes(t(e))?n:[].concat((0,o.Z)(n),[e])}),[])}function v(n,t){for(var e=-1,r=n.length;1+e<r;){var o=e+(r-e>>1);t(n[o])?e=o:r=o}return r}function y(n,t){var e=n.findIndex(t);return w(n,e)}function w(n,t){return n.slice(0,t).concat(n.slice(t+1,n.length))}function x(n,t){return n.map((function(n){return String(n)})).join()===t.map((function(n){return String(n)})).join()}function O(n,t){return n>t}function k(n,t){return n<t}function Z(n){return Array(n).fill(0)}function j(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=Array.from(Array(n).keys());return 0!==t&&(e=e.map((function(n){return n+t}))),e}function I(n){return n.reduce((function(n,t){return n+t}),0)}function S(n){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=n.reduce((function(n,t){return n+t}),0)/n.length;return Math.sqrt(n.reduce((function(n,t){return n.concat(Math.pow(t-e,2))}),[]).reduce((function(n,t){return n+t}),0)/(n.length-(t?0:1)))}function C(n){return n[Math.floor(Math.random()*n.length)]}function D(n,t,e){var r=e?t.map(e):t;return n.filter((function(n){var t=e?e(n):n;return r.includes(t)}))}},3917:function(n,t,e){e.d(t,{A5:function(){return E},AY:function(){return W},BL:function(){return v},BP:function(){return H},Cs:function(){return F},JX:function(){return T},Mg:function(){return B},OC:function(){return b},Oh:function(){return a},Pc:function(){return z},Qf:function(){return C},Ro:function(){return A},Tz:function(){return M},WT:function(){return Y},XG:function(){return S},Y_:function(){return N},_6:function(){return D},d$:function(){return I},e:function(){return _},jV:function(){return L},kE:function(){return O},lE:function(){return w},lJ:function(){return R},mi:function(){return j},n$:function(){return P},n1:function(){return x},s8:function(){return h},vk:function(){return c},yD:function(){return g},yd:function(){return Z}});var r,o,i,c,a,u=e(82394),l=e(92083),d=e.n(l),s=e(83991),f=e.n(s),p=(e(15135),e(81728)),m=e(86735);!function(n){n.TODAY="today",n.WEEK="week",n.MONTH="month"}(c||(c={})),function(n){n.LOCAL="LOCAL",n.UTC="UTC"}(a||(a={}));var h=(r={},(0,u.Z)(r,c.TODAY,"today"),(0,u.Z)(r,c.WEEK,"last 7 days"),(0,u.Z)(r,c.MONTH,"last 30 days"),r),g=(o={},(0,u.Z)(o,c.TODAY,0),(0,u.Z)(o,c.WEEK,6),(0,u.Z)(o,c.MONTH,29),o),b="YYYY-MM-DD HH:mm:ss",v="YYYY-MM-DD HH:mm:ss.SSS",y="YYYY-MM-DD HH:mm",w="YYYY-MM-DD HH:mmZ",x="YYYY-MM-DD",O="YYYY-MM-DDTHH:mm:ss.SSSGMT",k="MMMM D, YYYY",Z=Intl.DateTimeFormat().resolvedOptions().timeZone,j=(i={},(0,u.Z)(i,a.LOCAL,Z),(0,u.Z)(i,a.UTC,"Etc/Universal"),i);function I(n,t){var e=t||{},r=e.dayAgo,o=e.includeSeconds,i=e.utcFormat,c=d()(n),a=(null===t||void 0===t?void 0:t.dateFormat)||y;return i&&(c=c.utc()),r&&(c=c.subtract(1,"days")),o&&(a=b),c.format(a)}function S(n,t){return t?d().utc(n).local().format():n}function C(n){var t=n.startDatetime,e=n.endDatetime,r=n.showFullFormat,o=void 0!==r&&r,i=d().utc(t),c=d().utc(e),a=d().duration(c.diff(i));return o?a.format("Y __, M __, W __, D __, H __, m __, s __, S __"):a.asWeeks()>=1?"> 1 week":a.asDays()>=1?a.format("d[d],HH:mm:ss.SS",{trim:!1}):a.format("HH:mm:ss.SS",{trim:!1})}function D(n){var t=d().utc(n),e=d().utc(),r=d().duration(e.diff(t));return r.years()>=1?"".concat((0,p._6)("year",r.years(),!0)," ago"):r.months()>=1?"".concat((0,p._6)("month",r.months(),!0)," ago"):r.days()>=1?"".concat((0,p._6)("day",r.days(),!0)," ago"):r.hours()>=1?"".concat((0,p._6)("hr",r.hours(),!0)," ")+"".concat((0,p._6)("min",r.minutes(),!0)," ago"):"".concat((0,p._6)("min",r.minutes(),!0)," ago")}function P(n){return d().utc(n).local().toDate()}function M(n){var t=I((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==n&&void 0!==n&&n.dateObj?new Date(t):t}function _(n){var t=n.timeZones,e=n.includeSeconds,r=void 0!==e&&e,o=f().utc();return new Map(t.map((function(n){var t=o;if(n===a.LOCAL)t=o.local();return[n,t.format(r?"HH:mm:ss":"HH:mm")]})))}function Y(n){return f().tz(j[n]).zoneAbbr()}function B(n,t){return null!==t&&void 0!==t&&t.withMilliseconds?d().unix(n/1e3):d().unix(n)}function T(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d().unix(n).format(null!==t&&void 0!==t&&t.withSeconds?b:y)}function H(n,t,e){return d()(n).utc().hours(+t).minutes(+e).format()}function E(n){return d()(n).unix()}function W(n,t,e,r){var o="".concat(n.toISOString().split("T")[0]," ").concat(t,":").concat(e);return r?"".concat(o,":").concat(r):o}function z(n){var t=d().unix(+n).utc();return{date:t.toDate(),hour:String(t.hour()),minute:String(t.minute())}}function A(n,t){var e=d().utc(),r=d().utc();null!==t&&void 0!==t&&t.localTime&&(e=d()().local(),r=d()().local());var o=(e=e.subtract(n,"days")).format(k),i=r.format(k);return null!==t&&void 0!==t&&t.endDateOnly?i:"".concat(o," - ").concat(i)}function L(n,t){var e=null!==t&&void 0!==t&&t.localTime?d()().local():d().utc();if(n===c.WEEK){var r=g[c.WEEK];e=e.subtract(r,"days")}else if(n===c.MONTH){var o=g[c.MONTH];e=e.subtract(o,"days")}return null!==t&&void 0!==t&&t.isoString?e.startOf("day").toISOString():e.startOf("day").format(b)}function N(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90,t=new Date,e=[],r=0;r<n;r++)e.unshift(t.toISOString().split("T")[0]),t.setDate(t.getDate()-1);return e}function F(){var n=new Date,t=String(n.getMonth()+1).padStart(2,"0"),e=n.getFullYear(),r=d()("".concat(e,"-").concat(t),"YYYY-MM").daysInMonth();return(0,m.m5)(r,1)}function R(n){return n.padStart(2,"0")}},3314:function(n,t,e){function r(n){return n.stopPropagation&&n.stopPropagation(),n.preventDefault&&n.preventDefault(),n.cancelBubble=!0,n.returnValue=!1,!1}e.d(t,{j:function(){return r}})},81728:function(n,t,e){e.d(t,{RA:function(){return p},bH:function(){return _},j3:function(){return O},kC:function(){return m},vg:function(){return x},kE:function(){return D},NR:function(){return M},Mp:function(){return h},Pb:function(){return d},HW:function(){return Z},HD:function(){return s},wX:function(){return g},x6:function(){return b},_6:function(){return v},zf:function(){return k},Y6:function(){return S},Lo:function(){return C},wE:function(){return P},Tz:function(){return j},J3:function(){return y},We:function(){return f},QV:function(){return I},C5:function(){return w}});var r=e(75582),o=e(17717),i=["aged","amazing","ancient","arcane","artistic","astonishing","astral","autumn","beaming","beautiful","billowing","bitter","black","blue","bold","brave","bright","brilliant","broken","carefree","celestial","charismatic","charmed","cheerful","chromatic","cold","colorful","colossal","confident","cool","cosmic","cozy","creative","crimson","crystal","curious","damp","daring","dark","dauntless","dawn","dazzling","delicate","delightful","divine","draconic","dramatic","dreamy","dry","dwarven","eccentric","eclipsing","effortless","elden","electrifying","elemental","elusive","elven","enchanted","enchanting","endearing","endless","energetic","enigmatic","ephemeral","epic","esoteric","ethereal","exciting","exquisite","fabled","falling","fanciful","fancy","fantastic","festive","flawless","floral","friendly","frosty","gallant","genuine","gleaming","gleeful","glorious","golden","good","graceful","gracious","great","grateful","green","happy","harmonic","heroic","hidden","halcyon","honorable","hopeful","humble","hypnotic","holy","icy","idyllic","illuminated","illusory","impressive","indigo","insightful","inspiring","intriguing","intuitive","iridescent","jazzy","jeweled","joyful","joyous","kind","kinetic","knightly","late","legendary","limitless","lingering","little","lively","lucid","luminous","lyrical","magical","magnificent","majestic","marvelous","masterful","meditative","mellow","melodic","melodious","mindful","misty","moonlit","morning","musical","mysterious","mystic","mystical","nameless","natural","nebulous","nimble","noble","old","opaque","organic","original","ornate","outgoing","outstanding","pastel","patient","peaceful","phenomenal","playful","pleasant","poetic","polished","precise","primal","prismatic","pristine","profound","prosperous","proud","purple","quaint","quiet","quixotic","radiant","red","refined","relaxed","remarkable","renewed","resilient","resolute","resonant","resounding","resplendent","restless","revered","rhapsodic","righteous","rough","royal","scenic","serene","shining","shy","silent","silver","sincere","small","snowy","solitary","sorcerous","soulful","sparkling","spectacular","spellbinding","spirited","spiritual","splendid","spring","starry","stellar","still","stylish","sublime","summer","super","superlative","surreal","sweet","symmetrical","thoughtful","thrilling","timeless","towering","tranquil","twilight","uncharted","unifying","unstoppable","uplifting","utopian","valiant","valorous","vast","veiled","verdant","versatile","vibrant","victorious","virtuous","visionary","vivid","volcanic","wandering","wavy","weathered","whimsical","white","wild","windy","winter","wise","wispy","wistful","withered","wizardly","wonderful","wondrous","zesty"],c=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],a=(e(92083),["alchemist","amulet","ancient","arcanist","artifact","artificer","ash","aspen","astronomer","aurora","bard","bird","bonsai","breeze","brook","butterfly","byte","cedar","charm","cleric","cloud","core","crafter","crystal","dawn","destiny","dew","dream","druid","echo","elixir","elm","enchanter","explorer","familiar","feather","field","fire","firefly","flower","fog","forest","frog","frost","glacier","glade","glitter","grass","grace","grimoire","haiku","haze","healer","herald","herbalist","hill","illusion","inventor","knight","labyrinth","lake","leaf","magic","mana","maple","meadow","melody","merchant","monk","moon","morning","mountain","music","mystic","myth","nexus","night","noble","oak","oracle","paladin","paper","phoenix","pine","pond","portal","potion","prophecy","quest","rain","ranger","realm","resonance","ring","river","rogue","ronin","rune","runesmith","scholar","scroll","sea","shadow","shape","shield","silence","silversmith","sky","smoke","snow","snowflake","song","sorcerer","sound","spell","spellcaster","star","sun","sumo","sunrise","sunset","surf","sword","talisman","thunder","tome","treasure","tree","violet","voice","warrior","water","waterfall","wave","wildflower","willow","wind","wizard"]),u=["0","1","2","3","4","5","6","7","8","9"],l=e(86735);function d(n){if(!n)return!1;try{JSON.parse(n)}catch(t){return!1}return!0}function s(n){return"string"===typeof n}function f(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return n.split(" ").join(t)}function p(n){return n.split(" ").join("_")}function m(n){return n?n.charAt(0).toUpperCase()+n.slice(1):""}function h(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*n)}function g(n){return n.charAt(0).toLowerCase()+n.slice(1)}function b(n){if(null===n||"undefined"===typeof n)return"";var t=n.toString().split("."),e=(0,r.Z)(t,2),o=e[0],i=e[1],c=o.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return i?"".concat(c,".").concat(i):c}function v(n,t){var e,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=t,c=void 0!==i&&null!==i;if(c||(i=2),1===i)e=n;else{var a=n.length,u=n[a-1];e="y"===u&&"day"!==n?"".concat(n.slice(0,a-1),"ies"):"".concat(n,"s"===u?"es":"s")}if(c&&!o){var l=r?b(i):i;return"".concat(l," ").concat(e)}return e}function y(n){return null===n||void 0===n?void 0:n.replace(/_/g," ")}function w(n){var t=n.length;return"ies"===n.slice(t-3,t)?"".concat(n.slice(0,t-3),"y"):"es"===n.slice(t-2,t)&&"ces"!==n.slice(t-3,t)?n.slice(0,t-2):n.slice(0,t-1)}function x(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return m(y(n.toLowerCase()))}function O(n){return n.replace(/([A-Z])/g," $1")}function k(n){var t,e=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return e.forEach((function(o,i){if(!t){var c=(0,r.Z)(o,2),a=c[0],u=c[1],l=e.slice(0,i).reduce((function(n,t){return n*Number(t[1])}),1);n<Number(u)*l&&(t=v(a,Math.round(n/l)))}})),t}function Z(n){return"undefined"!==typeof n&&null!==n&&!isNaN(n)}function j(n){var t,e=n.match(/\d+(\.?\d*)%/)||[];return Number(null===(t=e[0])||void 0===t?void 0:t.slice(0,-1))}function I(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,e=Math.pow(10,t);return Math.round((n||0)*e)/e}function S(){return"".concat((0,l.mp)(i)," ").concat((0,l.mp)(a))}function C(){return"".concat((0,l.mp)(c)).concat((0,l.mp)(u))}function D(n){return null===n||void 0===n?void 0:n.toLowerCase().replace(/\W+/g,"_")}function P(n){var t,e=n.split(o.sep),r=e[e.length-1].split(".");return t=1===r.length?r[0]:r.slice(0,-1).join("."),e.slice(0,e.length-1).concat(t).join(o.sep)}function M(n){var t=String(n);return n&&(t=n>=36e5?"".concat(I(n/36e5,2),"h"):n>=6e4?"".concat(I(n/6e4,2),"m"):n>=1e3?"".concat(I(n/1e3,2),"s"):"".concat(n,"ms")),t}function _(){return Array.from(Array(26)).map((function(n,t){return t+65})).map((function(n){return String.fromCharCode(n)}))}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5810],{7432:function(n,e,o){var t={"./Active4D.json":[266,266],"./All Hallows Eve.json":[4450,4450],"./Amy.json":[88849,8849],"./Birds of Paradise.json":[78097,8097],"./Blackboard.json":[88018,6115],"./Brilliance Black.json":[73835,3835],"./Brilliance Dull.json":[6507,6507],"./Chrome DevTools.json":[22508,2508],"./Clouds Midnight.json":[49566,9566],"./Clouds.json":[57951,7951],"./Cobalt.json":[80826,826],"./Cobalt2.json":[98256,8256],"./Dawn.json":[76958,6958],"./Dominion Day.json":[89307,9307],"./Dracula.json":[33453,3453],"./Dreamweaver.json":[19363,9363],"./Eiffel.json":[82481,2481],"./Espresso Libre.json":[44776,4776],"./GitHub Dark.json":[792,792],"./GitHub Light.json":[61450,1450],"./GitHub.json":[10739,739],"./IDLE.json":[67947,7947],"./Katzenmilch.json":[81240,1240],"./Kuroir Theme.json":[4388,4388],"./LAZY.json":[25164,5164],"./MagicWB (Amiga).json":[76443,6443],"./Merbivore Soft.json":[99361,9361],"./Merbivore.json":[86042,6042],"./Monokai Bright.json":[14883,4883],"./Monokai.json":[34454,4454],"./Night Owl.json":[60261,261],"./Nord.json":[59785,9785],"./Oceanic Next.json":[58920,8920],"./Pastels on Dark.json":[38901,8901],"./Slush and Poppies.json":[26434,6434],"./Solarized-dark.json":[36116,6116],"./Solarized-light.json":[5008,5008],"./SpaceCadet.json":[20440,440],"./Sunburst.json":[68018,8018],"./Textmate (Mac Classic).json":[15824,5824],"./Tomorrow-Night-Blue.json":[81150,1150],"./Tomorrow-Night-Bright.json":[8762,8762],"./Tomorrow-Night-Eighties.json":[82545,2545],"./Tomorrow-Night.json":[99855,9855],"./Tomorrow.json":[34092,4092],"./Twilight.json":[93898,3898],"./Upstream Sunburst.json":[98807,8807],"./Vibrant Ink.json":[89927,9927],"./Xcode_default.json":[64042,4042],"./Zenburnesque.json":[33467,3467],"./iPlastic.json":[88277,8277],"./idleFingers.json":[5104,5104],"./krTheme.json":[9633,9633],"./monoindustrial.json":[15729,5729],"./themelist.json":[79437,9437]};function i(n){if(!o.o(t,n))return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+n+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=t[n],i=e[0];return o.e(e[1]).then((function(){return o.t(i,19)}))}i.keys=function(){return Object.keys(t)},i.id=7432,n.exports=i},89209:function(n,e,o){"use strict";o.d(e,{M4:function(){return d},S0:function(){return s},S_:function(){return c},Yn:function(){return f},rW:function(){return l}});var t=o(82394),i=o(21831),r=o(75582);function a(n,e){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.push.apply(o,t)}return o}function u(n){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?a(Object(o),!0).forEach((function(e){(0,t.Z)(n,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function c(n,e){return Object.entries(e).map((function(e){var o=(0,r.Z)(e,2),t=o[0],i=o[1];return n.languages.registerCompletionItemProvider(t,{provideCompletionItems:i(n)})}))}function s(n){var e=function(n){var e="[\\w.]+",o=["import ".concat(e," as ").concat(e),"import ".concat(e),"from ".concat(e," import ").concat(e," as ").concat(e),"from ".concat(e," import ").concat(e)],t=new RegExp("(".concat(o.join("|"),")"),"g");return(0,i.Z)(n.matchAll(t)).map((function(n){return n[1]}))}(n),o="[\\w.]+",r=["from ".concat(o," import ").concat(o," as (").concat(o,")"),"from ".concat(o," import (").concat(o,")"),"import ".concat(o," as (").concat(o,")"),"import (".concat(o,")")],a=new RegExp("(".concat(r.join("|"),")"));return e.reduce((function(n,e){var o=e.match(a);if(!o)return n;var r=(0,i.Z)(o),c=r[2],s=r[3],l=r[4],d=r[5],f=c||s||l||d;return u(u({},n),{},(0,t.Z)({},f,e))}),{})}function l(n,e){var o=n;e&&(o=o.split(" as ".concat(e))[0]);var t="[\\w.]+",a=["from ".concat(t," import (").concat(t,")"),"import (".concat(t,")")],u=new RegExp("(".concat(a.join("|"),")"),"g"),c=(0,i.Z)(o.matchAll(u))[0];if(c){var s=(0,r.Z)(c,4),l=s[2],d=s[3];return l||d}}function d(n,e){return function(n,e){return n.split("\n")[e.startLineNumber-1]}(n,e).slice(0,e.startColumn-1)}function f(n){var e=new RegExp("([\\w_]+)[ ]*=[ ]*([\\w_]+)","g");return(0,i.Z)(n.matchAll(e)).map((function(n){return{assignmentValue:n[2],variableName:n[1]}}))}},89678:function(n,e,o){"use strict";o.d(e,{Ep:function(){return u},KT:function(){return l},Nk:function(){return s},aU:function(){return c}});var t=o(38626),i=o(44897),r=o(95363),a=o(70515),u=2,c=21,s=t.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-w2hta3-0"})(["font-family:",";"," ",""],r.ry,(function(n){return n.padding&&"\n padding-top: ".concat(2*a.iI,"px;\n background-color: ").concat((n.theme.background||i.Z.background).codeTextarea,";\n ")}),(function(n){return n.hideDuplicateMenuItems&&'\n /*\n * The (n + 10) assumes a specific number of items in the block editor context\n * menu. This includes "Run selected block", "Change All Occurrences", "Cut",\n * "Copy", "Paste", "Command Palette", and 3 dividers. The 10th item from the\n * bottom and higher are hidden to avoid duplicate shortcut items in the\n * context menu.\n */\n .monaco-menu li.action-item:nth-last-child(n + 10) {\n display: none;\n }\n '})),l=t.default.div.withConfig({displayName:"indexstyle__PlaceholderStyle",componentId:"sc-w2hta3-1"})(["padding-left:67px;position:absolute;z-index:1;"])},75810:function(n,e,o){"use strict";o.d(e,{Z:function(){return j}});var t=o(85202),i=o(66639),r=o(82684),a=o(4383),u=o(44425),c=o(30160),s=o(98464),l=o(95363),d=o(61896),f=o(89678),m=o(89209);function h(n,e,o){o.forEach((function(n){e.addAction(n)}))}var g=o(75582),p={"all-hallows-eve":"All Hallows Eve","birds-of-paradise":"Birds of Paradise","brilliance-black":"Brilliance Black","brilliance-dull":"Brilliance Dull","chrome-devtools":"Chrome DevTools","clouds-midnight":"Clouds Midnight","espresso-libre":"Espresso Libre","kuroir-theme":"Kuroir Theme","magicwb--amiga-":"MagicWB (Amiga)","merbivore-soft":"Merbivore Soft","monokai-bright":"Monokai Bright","night-owl":"Night Owl","oceanic-next":"Oceanic Next","pastels-on-dark":"Pastels on Dark","slush-and-poppies":"Slush and Poppies","solarized-dark":"Solarized-dark","solarized-light":"Solarized-light","textmate--mac-classic-":"Textmate (Mac Classic)","tomorrow-night":"Tomorrow-Night","tomorrow-night-blue":"Tomorrow-Night-Blue","tomorrow-night-bright":"Tomorrow-Night-Bright","tomorrow-night-eighties":"Tomorrow-Night-Eighties","upstream-sunburst":"Upstream Sunburst","vibrant-ink":"Vibrant Ink","xcode-default":"Xcode_default",active4d:"Active4D",amy:"Amy",blackboard:"Blackboard",clouds:"Clouds",cobalt:"Cobalt",dawn:"Dawn",dreamweaver:"Dreamweaver",eiffel:"Eiffel",github:"GitHub",idle:"IDLE",idlefingers:"idleFingers",iplastic:"iPlastic",katzenmilch:"Katzenmilch",krtheme:"krTheme",lazy:"LAZY",merbivore:"Merbivore",monoindustrial:"monoindustrial",monokai:"Monokai",spacecadet:"SpaceCadet",sunburst:"Sunburst",tomorrow:"Tomorrow",twilight:"Twilight",zenburnesque:"Zenburnesque"};var v=o(37529),b=o(28598);i._m.config({paths:{vs:"".concat((0,a.XF)(),"/monaco-editor/min/vs")}});var j=function(n){var e=n.autocompleteProviders,a=n.autoHeight,j=n.autoSave,w=n.block,k=n.fontSize,C=void 0===k?d.i3:k,y=n.height,S=n.language,E=n.onChange,O=n.onContentSizeChangeCallback,x=n.onDidChangeCursorPosition,D=n.onMountCallback,T=n.onSave,M=n.padding,N=n.placeholder,P=n.readOnly,_=n.selected,B=(n.setSelected,n.setTextareaFocused),Z=n.shortcuts,z=n.showLineNumbers,A=void 0===z||z,F=n.tabSize,I=void 0===F?4:F,L=n.textareaFocused,R=n.theme,K=void 0===R?"twilight":R,H=n.value,W=n.width,U=void 0===W?"100%":W,G=(0,r.useRef)(null),V=(0,r.useRef)(null),q=(0,r.useRef)(null),X=(0,r.useState)([]),Y=X[0],Q=X[1],J=(0,r.useState)(null),$=J[0],nn=J[1],en=(0,r.useState)(!1),on=en[0],tn=en[1],rn=(0,r.useState)(null),an=rn[0],un=rn[1],cn=(0,r.useCallback)((function(n){un((function(e){return e!==K&&function(n){return new Promise((function(e){Promise.all([i._m.init(),o(7432)("./".concat(p[n],".json"))]).then((function(o){var t=(0,g.Z)(o,2),i=t[0],r=t[1];r.colors["editor.background"]="#000000",r.colors["editor.foreground"]="#FFFFFF",i.editor.defineTheme(n,r),e(!0)})).catch((function(){e(!1)}))}))}(K).then((function(e){if(e)return n.editor.setTheme(K),K})),e}))}),[K]),sn=(0,r.useCallback)((function(n){n.languages.typescript.javascriptDefaults.setEagerModelSync(!0),nn(n),cn(n)}),[cn]),ln=(0,r.useCallback)((function(n,e){G.current=n,V.current=e;var o=[];null===Z||void 0===Z||Z.forEach((function(t){o.push(t(e,n))})),T&&o.push((0,v.e)(e,(function(){T(n.getValue())}))),h(0,n,o),n.getModel().updateOptions({tabSize:I}),a&&!y&&(n._domElement.style.height="".concat(((H||"").split("\n").length+f.Ep)*f.aU,"px")),n.onDidFocusEditorWidget((function(){null===B||void 0===B||B(!0)})),n.onDidContentSizeChange((function(e){var o=e.contentHeight,t=e.contentHeightChanged;a&&t&&(n._domElement.style.height="".concat(o+2*f.aU,"px")),O&&(null===O||void 0===O||O())})),_&&L&&setTimeout((function(){n.focus()}),1),x&&n.onDidChangeCursorPosition((function(e){var o=e.position.lineNumber,t=n._domElement.getBoundingClientRect(),i=t.height,r=t.top,a=n.getTopForLineNumber(o);x({editorRect:{height:Number(i),top:Number(r)},position:{lineNumberTop:a}})})),tn(!0),null===D||void 0===D||D()}),[a,y,O,x,D,T,_,tn,B,Z,I,L,H]);(0,r.useEffect)((function(){var n;return j&&T&&(n=setInterval((function(){T(G.current.getValue())}),5e3)),function(){j&&n&&clearInterval(n)}}),[j,G,T]);var dn=(0,s.Z)(_),fn=(0,s.Z)(L);return(0,r.useEffect)((function(){null!==G&&void 0!==G&&G.current&&(_&&L?setTimeout((function(){G.current.focus()}),1):t.findDOMNode(G.current._domElement).getElementsByClassName("inputarea")[0].blur())}),[G,_,dn,L,fn]),(0,r.useEffect)((function(){if(null!==V&&void 0!==V&&V.current&&null!==G&&void 0!==G&&G.current){var n=[];null===Z||void 0===Z||Z.forEach((function(e){n.push(e(null===V||void 0===V?void 0:V.current,null===G||void 0===G?void 0:G.current))})),h(null===V||void 0===V||V.current,null===G||void 0===G?void 0:G.current,n)}}),[null===w||void 0===w?void 0:w.downstream_blocks,null===w||void 0===w?void 0:w.upstream_blocks]),(0,r.useEffect)((function(){return function(){Y.map((function(n){return n.dispose()}))}}),[Y]),(0,r.useEffect)((function(){$&&e&&(0===Y.length&&L||!fn&&L?Q((0,m.S_)($,e)):fn&&!L&&Y.map((function(n){return n.dispose()})))}),[e,Y,$,L,fn]),(0,b.jsxs)(f.Nk,{hideDuplicateMenuItems:!0,padding:M,style:{display:on?null:"none"},children:[N&&!(null!==H&&void 0!==H&&H.length)&&(0,b.jsx)(f.KT,{children:(0,b.jsx)(c.ZP,{monospace:!0,muted:!0,children:N})}),(0,b.jsx)(i.ZP,{beforeMount:sn,height:y,language:S||"python",onChange:function(n){null===E||void 0===E||E(n)},onMount:ln,options:{domReadOnly:P,fontFamily:l.Vp,fontLigatures:!0,fontSize:C,hideCursorInOverviewRuler:!0,lineNumbers:A?"on":"off",minimap:{enabled:!1},overviewRulerBorder:!1,readOnly:P,renderLineHighlightOnlyWhenFocus:!0,scrollBeyondLastLine:!1,scrollbar:{alwaysConsumeMouseWheel:!1,vertical:"hidden"},useShadowDOM:!1,wordBasedSuggestions:!1,wordWrap:(null===w||void 0===w?void 0:w.type)===u.tf.MARKDOWN?"on":"off"},theme:an||"vs-dark",value:H,width:U}),(0,b.jsx)("div",{ref:q})]})}},37529:function(n,e,o){"use strict";function t(n,e){return{contextMenuGroupId:"navigation",contextMenuOrder:1.5,id:"saveCode",keybindingContext:null,keybindings:[n.KeyMod.CtrlCmd|n.KeyCode.KeyS],label:"Save",precondition:null,run:function(n){e()}}}function i(n,e){return{contextMenuGroupId:"navigation",contextMenuOrder:1.5,id:"executeCode",keybindingContext:null,keybindings:[n.KeyMod.CtrlCmd|n.KeyCode.Enter],label:"Run selected block",precondition:null,run:function(){return e()}}}o.d(e,{Q:function(){return i},e:function(){return t}})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[595],{55283:function(e,n,t){t.d(n,{HC:function(){return O},HS:function(){return j},IN:function(){return h},Kf:function(){return g},Nk:function(){return m},PB:function(){return x},PY:function(){return b},WC:function(){return p},fk:function(){return S},gE:function(){return A},j1:function(){return C},jv:function(){return Z},nz:function(){return y},oh:function(){return s},qn:function(){return v},t1:function(){return k},u2:function(){return f},y9:function(){return _}});var o=t(38626),i=t(44897),r=t(44425),l=t(42631),d=t(8059),c=t(70515),u=t(47041),a=t(91437),s=68,h=1.5*c.iI,p=3*c.iI;function f(e){var n=d.eW;return r.tf.CALLBACK===e?n=d.J:r.tf.CHART===e||r.tf.CONDITIONAL===e?n=d.Hv:r.tf.CUSTOM===e?n=d.AK:r.tf.DATA_EXPORTER===e?n=d.Sr:r.tf.DATA_LOADER===e?n=d.R2:r.tf.DBT===e?n=d.J:r.tf.EXTENSION===e?n=d.FI:r.tf.GLOBAL_DATA_PRODUCT===e?n=d.yr:r.tf.SCRATCHPAD===e?n=d.Hv:r.tf.SENSOR===e?n=d.rK:r.tf.MARKDOWN===e?n=d.RK:r.tf.TRANSFORMER===e&&(n=d.eW),n}function v(e,n){var t,o,l=((null===n||void 0===n||null===(t=n.theme)||void 0===t?void 0:t.borders)||i.Z.borders).light,d=((null===n||void 0===n||null===(o=n.theme)||void 0===o?void 0:o.monotone)||i.Z.monotone).grey500,c=n||{},u=c.blockColor,a=c.isSelected,s=c.theme;return a?l=(s||i.Z).content.active:r.tf.TRANSFORMER===e||u===r.Lq.PURPLE?(l=(s||i.Z).accent.purple,d=(s||i.Z).accent.purpleLight):r.tf.DATA_EXPORTER===e||u===r.Lq.YELLOW?(l=(s||i.Z).accent.yellow,d=(s||i.Z).accent.yellowLight):r.tf.DATA_LOADER===e||u===r.Lq.BLUE?(l=(s||i.Z).accent.blue,d=(s||i.Z).accent.blueLight):r.tf.MARKDOWN===e?(l=(s||i.Z).accent.sky,d=(s||i.Z).accent.skyLight):r.tf.SENSOR===e||u===r.Lq.PINK?(l=(s||i.Z).accent.pink,d=(s||i.Z).accent.pinkLight):r.tf.DBT===e?(l=(s||i.Z).accent.dbt,d=(s||i.Z).accent.dbtLight):r.tf.EXTENSION===e||u===r.Lq.TEAL?(l=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).teal,d=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).tealLight):r.tf.CALLBACK===e?(l=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).rose,d=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).roseLight):r.tf.CONDITIONAL===e||r.tf.SCRATCHPAD===e||u===r.Lq.GREY||r.tf.CUSTOM===e&&!u?(l=(s||i.Z).content.default,d=(s||i.Z).accent.contentDefaultTransparent):r.tf.GLOBAL_DATA_PRODUCT!==e||u||(l=(s||i.Z).monotone.white,d=(s||i.Z).monotone.whiteTransparent),{accent:l,accentLight:d}}var g=(0,o.css)([""," "," "," "," "," "," ",""],(0,a.eR)(),(function(e){return!e.selected&&!e.hasError&&"\n border-color: ".concat(v(e.blockType,e).accentLight,";\n ")}),(function(e){return e.selected&&!e.hasError&&"\n border-color: ".concat(v(e.blockType,e).accent,";\n ")}),(function(e){return!e.selected&&e.hasError&&"\n border-color: ".concat((e.theme.accent||i.Z.accent).negativeTransparent,";\n ")}),(function(e){return e.selected&&e.hasError&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).danger,";\n ")}),(function(e){return e.dynamicBlock&&"\n border-style: dashed !important;\n "}),(function(e){return e.dynamicChildBlock&&"\n border-style: dotted !important;\n "})),m=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-s5rj34-0"})(["border-radius:","px;position:relative;"],l.n_),b=o.default.div.withConfig({displayName:"indexstyle__HiddenBlockContainerStyle",componentId:"sc-s5rj34-1"})([""," border-radius:","px;border-style:",";border-width:","px;",""],g,l.n_,l.M8,l.mP,(function(e){return"\n background-color: ".concat((e.theme||i.Z).background.content,";\n\n &:hover {\n border-color: ").concat(v(e.blockType,e).accent,";\n }\n ")})),x=o.default.div.withConfig({displayName:"indexstyle__HeaderHorizontalBorder",componentId:"sc-s5rj34-2"})(["",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme||i.Z).borders.darkLight,";\n ")})),y=o.default.div.withConfig({displayName:"indexstyle__BlockHeaderStyle",componentId:"sc-s5rj34-3"})([""," border-top-left-radius:","px;border-top-right-radius:","px;border-top-style:",";border-top-width:","px;border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding-bottom:","px;padding-top:","px;"," "," "," ",""],g,l.n_,l.n_,l.M8,l.mP,l.M8,l.mP,l.M8,l.mP,1*c.iI,1*c.iI,(function(e){return"\n background-color: ".concat((e.theme||i.Z).background.dashboard,";\n ")}),(function(e){return"undefined"!==typeof e.zIndex&&null!==e.zIndex&&"\n z-index: ".concat(6+(e.zIndex||0),";\n ")}),(function(e){return!e.noSticky&&"\n // This is to hide the horizontal scrollbar in the block header when sideBySide is enabled,\n // and the screen width is too small.\n position: sticky;\n top: -5px;\n "}),(function(e){return e.noSticky&&"\n ".concat((0,u.y$)(),"\n\n overflow-x: auto;\n overflow-y: visible;\n ")})),j=o.default.div.withConfig({displayName:"indexstyle__SubheaderStyle",componentId:"sc-s5rj34-4"})([""," "," ",""],(function(e){return!e.darkBorder&&"\n border-bottom: 1px solid ".concat((e.theme.borders||i.Z.borders).darkLight,";\n ")}),(function(e){return e.darkBorder&&"\n border-bottom: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n ")}),(function(e){return!e.noBackground&&"\n background-color: ".concat((e.theme||i.Z).background.dashboard,";\n ")})),Z=o.default.div.withConfig({displayName:"indexstyle__CodeContainerStyle",componentId:"sc-s5rj34-5"})([""," border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;position:relative;"," "," "," "," .line-numbers{opacity:0;}&.selected{.line-numbers{opacity:1 !important;}}"],g,l.M8,l.mP,l.M8,l.mP,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).codeTextarea,";\n ")}),(function(e){return!e.noPadding&&"\n padding-bottom: ".concat(c.iI,"px;\n padding-top: ").concat(c.iI,"px;\n ")}),(function(e){return e.lightBackground&&"\n background-color: ".concat((e.theme||i.Z).background.content,";\n ")}),(function(e){return!e.hideBorderBottom&&"\n border-bottom-left-radius: ".concat(l.n_,"px;\n border-bottom-right-radius: ").concat(l.n_,"px;\n border-bottom-style: ").concat(l.M8,";\n border-bottom-width: ").concat(l.mP,"px;\n overflow: hidden;\n ")})),A=o.default.div.withConfig({displayName:"indexstyle__BlockDivider",componentId:"sc-s5rj34-6"})(["align-items:center;display:flex;height:","px;justify-content:center;position:relative;z-index:8;&:hover{"," .block-divider-inner{","}}"," "," "," ",""],2*c.iI,(function(e){return e.additionalZIndex>0&&"\n z-index: ".concat(8+e.additionalZIndex,";\n ")}),(function(e){return"\n background-color: ".concat((e.theme.text||i.Z.text).fileBrowser,";\n ")}),(function(e){return!e.height&&"\n height: ".concat(2*c.iI,"px;\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return!e.bottom&&"\n bottom: ".concat(.5*c.iI,"px;\n ")}),(function(e){return"undefined"!==typeof e.bottom&&"\n bottom: ".concat(e.bottom,"px;\n ")})),k=o.default.div.withConfig({displayName:"indexstyle__BlockDividerInner",componentId:"sc-s5rj34-7"})(["height 1px;width:100%;position:absolute;z-index:-1;"," ",""],(function(e){return!e.top&&"\n top: ".concat(1.5*c.iI,"px;\n ")}),(function(e){return"undefined"!==typeof e.top&&"\n top: ".concat(e.top,"px;\n ")})),_=o.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-s5rj34-8"})([""," ",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n padding-left: ").concat(e.normalPadding?c.iI:s,"px;\n ")}),(function(e){return!e.noMargin&&"\n margin-bottom: ".concat(1*c.iI,"px;\n padding-bottom: ").concat(1*c.iI,"px;\n ")})),O=o.default.div.withConfig({displayName:"indexstyle__TimeTrackerStyle",componentId:"sc-s5rj34-9"})(["bottom:","px;left:","px;position:absolute;"],1*c.iI,s),S=o.default.div.withConfig({displayName:"indexstyle__ScrollColunnsContainerStyle",componentId:"sc-s5rj34-10"})(["position:relative;",""],(function(e){return"\n z-index: ".concat((null===e||void 0===e?void 0:e.zIndex)||1,";\n ")})),C=o.default.div.attrs((function(e){var n=e.height,t=e.left,o=e.right,i=e.top;return{style:{position:"fixed",height:n,width:e.width,left:t,right:o,top:i,zIndex:(e.zIndex||0)+2}}})).withConfig({displayName:"indexstyle__ScrollColunnStyle",componentId:"sc-s5rj34-11"})([""])},94629:function(e,n,t){t.d(n,{Z:function(){return O}});var o=t(82394),i=t(21831),r=t(82684),l=t(50724),d=t(82555),c=t(97618),u=t(70613),a=t(68487),s=t(68899),h=t(28598);function p(e,n){var t=e.children,o=e.noPadding;return(0,h.jsx)(s.HS,{noPadding:o,ref:n,children:t})}var f=r.forwardRef(p),v=t(62547),g=t(82571),m=t(35686),b=t(98464),x=t(46684),y=t(70515),j=t(53808),Z=t(19183);function A(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function k(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,o.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}function _(e,n){var t,o=e.addProjectBreadcrumbToCustomBreadcrumbs,p=e.after,A=e.afterHeader,_=e.afterHidden,O=e.afterWidth,S=e.afterWidthOverride,C=e.appendBreadcrumbs,R=e.before,E=e.beforeWidth,P=e.breadcrumbs,T=e.children,I=e.errors,w=e.headerMenuItems,D=e.headerOffset,L=e.hideAfterCompletely,N=e.mainContainerHeader,M=e.navigationItems,B=e.setAfterHidden,H=e.setErrors,U=e.subheaderChildren,W=e.subheaderNoPadding,F=e.title,K=e.uuid,z=(0,Z.i)().width,X="dashboard_after_width_".concat(K),Y="dashboard_before_width_".concat(K),G=(0,r.useRef)(null),V=(0,r.useState)(S?O:(0,j.U2)(X,O)),q=V[0],Q=V[1],J=(0,r.useState)(!1),$=J[0],ee=J[1],ne=(0,r.useState)(R?Math.max((0,j.U2)(Y,E),13*y.iI):null),te=ne[0],oe=ne[1],ie=(0,r.useState)(!1),re=ie[0],le=ie[1],de=(0,r.useState)(null)[1],ce=m.ZP.projects.list({},{revalidateOnFocus:!1}).data,ue=null===ce||void 0===ce?void 0:ce.projects,ae={label:function(){var e;return null===ue||void 0===ue||null===(e=ue[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},se=[];P&&(o&&se.push(ae),se.push.apply(se,(0,i.Z)(P))),(null===P||void 0===P||!P.length||C)&&(null===ue||void 0===ue?void 0:ue.length)>=1&&(null!==P&&void 0!==P&&P.length||se.unshift({bold:!C,label:function(){return F}}),se.unshift(ae)),(0,r.useEffect)((function(){null===G||void 0===G||!G.current||$||re||null===de||void 0===de||de(G.current.getBoundingClientRect().width)}),[$,q,re,te,G,de,z]),(0,r.useEffect)((function(){$||(0,j.t8)(X,q)}),[_,$,q,X]),(0,r.useEffect)((function(){re||(0,j.t8)(Y,te)}),[re,te,Y]);var he=(0,b.Z)(O);return(0,r.useEffect)((function(){S&&he!==O&&Q(O)}),[S,O,he]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u.Z,{title:F}),(0,h.jsx)(a.Z,{breadcrumbs:se,menuItems:w,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,h.jsxs)(s.Nk,{ref:n,children:[0!==(null===M||void 0===M?void 0:M.length)&&(0,h.jsx)(s.lm,{showMore:!0,children:(0,h.jsx)(g.Z,{navigationItems:M,showMore:!0})}),(0,h.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,h.jsxs)(v.Z,{after:p,afterHeader:A,afterHeightOffset:x.Mz,afterHidden:_,afterMousedownActive:$,afterWidth:q,before:R,beforeHeightOffset:x.Mz,beforeMousedownActive:re,beforeWidth:s.k1+(R?te:0),headerOffset:D,hideAfterCompletely:!B||L,leftOffset:R?s.k1:null,mainContainerHeader:N,mainContainerRef:G,setAfterHidden:B,setAfterMousedownActive:ee,setAfterWidth:Q,setBeforeMousedownActive:le,setBeforeWidth:oe,children:[U&&(0,h.jsx)(f,{noPadding:W,children:U}),T]})})]}),I&&(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)(d.Z,k(k({},I),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}var O=r.forwardRef(_)},11364:function(e,n,t){t.d(n,{Z:function(){return Y}});var o=t(61049);function i(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,n,t){return r=i()?Reflect.construct:function(e,n,t){var i=[null];i.push.apply(i,n);var r=new(Function.bind.apply(e,i));return t&&(0,o.Z)(r,t.prototype),r},r.apply(null,arguments)}var l,d,c,u,a,s=t(21831),h=t(82394),p=t(75582),f=t(12691),v=t.n(f),g=t(38626),m=t(21764),b=t(82684),x=t(69864),y=t(34376),j=t(32013),Z=t(98777),A=t(71180),k=t(31882),_=t(97618),O=t(55485);!function(e){e.CREATE="create",e.DELETE="delete",e.DETAIL="detail",e.EXECUTE="execute",e.LIST="list",e.UPDATE="update",e.UPDATE_ANYWHERE="update_anywhere"}(l||(l={})),function(e){e.BREAK="break",e.CONTINUE="continue",e.RAISE="raise"}(d||(d={})),function(e){e.AFTER="after",e.BEFORE="before"}(c||(c={})),function(e){e.ERROR="error",e.META="meta",e.METADATA="metadata",e.PAYLOAD="payload",e.QUERY="query",e.RESOURCE="resource",e.RESOURCES="resources"}(u||(u={})),function(e){e.FAILURE="failure",e.SUCCESS="success"}(a||(a={}));var S=t(48670),C=t(57114),R=t(38276),E=t(30160),P=t(35686),T=t(72473),I=t(8193),w=t(70515),D=t(81728),L=t(3917),N=t(55283),M=t(50178),B=t(42122),H=t(86735),U=t(72619),W=t(70320),F=t(23780),K=t(28598);function z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function X(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?z(Object(t),!0).forEach((function(n){(0,h.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Y=function(e){var n,t,o,i,l,h,f,z,Y,G,V,q,Q,J,$,ee,ne,te,oe,ie,re,le,de=e.isNew,ce=e.operationType,ue=e.resourceType,ae=e.uuid,se=(0,W.q)(),he=(0,M.PR)(),pe=(0,y.useRouter)(),fe="GlobalHookDetail/".concat(ae),ve=(0,b.useContext)(g.ThemeContext),ge=(0,b.useState)(null),me=ge[0],be=ge[1],xe=(0,b.useState)(!1),ye=xe[0],je=xe[1],Ze=(0,b.useState)(ce),Ae=Ze[0],ke=(Ze[1],(0,b.useState)(ue)),_e=ke[0],Oe=(ke[1],(0,F.VI)(null,{},[],{uuid:fe})),Se=(0,p.Z)(Oe,1)[0],Ce=(0,b.useMemo)((function(){return(0,B.hB)({include_operation_types:1,include_resource_types:1,include_snapshot_validation:1,operation_type:"undefined"===typeof Ae?null:Ae,resource_type:"undefined"===typeof _e?null:_e})}),[Ae,_e]),Re=P.ZP.global_hooks.detail(de?"__new__":ae,Ce).data,Ee=(0,b.useMemo)((function(){return null===Re||void 0===Re?void 0:Re.global_hook}),[Re]),Pe=(0,b.useMemo)((function(){return{onErrorCallback:function(e){var n=e.error,t=n.errors,o=n.exception,i=n.message,r=n.type,l=e.response;return m.Am.error((null===t||void 0===t?void 0:t.error)||o||i,{position:m.Am.POSITION.BOTTOM_RIGHT,toastId:r}),Se({errors:t,response:l})}}}),[]),Te=(0,x.Db)(P.ZP.global_hooks.useCreate(),{onSuccess:function(e){return(0,U.wD)(e,X({callback:function(e){var n=e.global_hook;pe.replace("/global-hooks/".concat(n.uuid,"?operation_type=").concat(n.operation_type,"&resource_type=").concat(n.resource_type))}},Pe))}}),Ie=(0,p.Z)(Te,2),we=Ie[0],De=Ie[1].isLoading,Le=(0,x.Db)(P.ZP.global_hooks.useUpdate(null===Ee||void 0===Ee?void 0:Ee.uuid,Ce),{onSuccess:function(e){return(0,U.wD)(e,X({callback:function(e){var n=e.global_hook;Qe((function(e){return X(X({},e),n)})),m.Am.success("Global hook changes successfully saved.",{position:m.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-success-".concat(n.uuid)})}},Pe))}}),Ne=(0,p.Z)(Le,2),Me=Ne[0],Be=Ne[1].isLoading,He=(0,x.Db)((function(e){var n=e.pipeline;return P.ZP.global_hooks.useUpdate(null===Ee||void 0===Ee?void 0:Ee.uuid,Ce)({global_hook:{pipeline:n,snapshot:1}})}),{onSuccess:function(e){return(0,U.wD)(e,X({callback:function(e){var n=e.global_hook;Qe((function(e){return X(X({},e),{},{metadata:X(X({},null===e||void 0===e?void 0:e.metadata),null===n||void 0===n?void 0:n.metadata),pipeline:X(X({},null===e||void 0===e?void 0:e.pipeline),null===n||void 0===n?void 0:n.pipeline)})})),m.Am.success("Snapshot successfully created.",{position:m.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-snapshot-success-".concat(n.uuid)})}},Pe))}}),Ue=(0,p.Z)(He,2),We=Ue[0],Fe=Ue[1].isLoading,Ke=(0,x.Db)(P.ZP.global_hooks.useDelete(null===Ee||void 0===Ee?void 0:Ee.uuid,Ce),{onSuccess:function(e){return(0,U.wD)(e,X({callback:function(e){var n=e.global_hook;m.Am.success("Global hook changes successfully saved.",{position:m.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-success-".concat(n.uuid)}),pe.replace("/global-hooks")}},Pe))}}),ze=(0,p.Z)(Ke,2),Xe=ze[0],Ye=ze[1].isLoading,Ge=P.ZP.pipelines.list().data,Ve=(0,b.useMemo)((function(){return(0,H.YC)((null===Ge||void 0===Ge?void 0:Ge.pipelines)||[],(function(e){return e.name}))}),[Ge]),qe=(0,b.useMemo)((function(){return(0,H.HK)(Ve||[],(function(e){return e.uuid}))}),[Ve]),Qe=(0,b.useCallback)((function(e){be(e),je(!0)}),[be,je]);(0,b.useEffect)((function(){Ee&&!me&&be(Ee)}),[me,Ee,be]);var Je=(0,b.useMemo)((function(){return null!==me&&void 0!==me&&me.operation_type&&null!==me&&void 0!==me&&me.resource_type?"".concat((0,D.vg)(null===me||void 0===me?void 0:me.operation_type)," ").concat(null===me||void 0===me?void 0:me.resource_type," operation"):null!==me&&void 0!==me&&me.resource_type?"".concat(null===me||void 0===me?void 0:me.resource_type," operation"):null!==me&&void 0!==me&&me.operation_type?"".concat(null===me||void 0===me?void 0:me.operation_type," operation"):"operation"}),[me]),$e=(0,b.useMemo)((function(){var e;return null===qe||void 0===qe?void 0:qe[null===me||void 0===me||null===(e=me.pipeline)||void 0===e?void 0:e.uuid]}),[me,qe]),en=(0,b.useMemo)((function(){return(null===$e||void 0===$e?void 0:$e.blocks)||[]}),[$e]),nn=(0,b.useMemo)((function(){return(0,H.HK)(en||[],(function(e){return e.uuid}))}),[en]),tn=(0,b.useMemo)((function(){return(null===me||void 0===me?void 0:me.outputs)||[]}),[me]),on=(0,b.useCallback)((function(e,n){var t=(0,s.Z)(tn||[]);t[n]=e,Qe((function(e){return X(X({},e),{},{outputs:t})}))}),[tn,Qe]),rn=(0,b.useMemo)((function(){return(0,K.jsx)(A.ZP,{beforeIcon:(0,K.jsx)(T.mm,{}),compact:(null===tn||void 0===tn?void 0:tn.length)>=1,small:(null===tn||void 0===tn?void 0:tn.length)>=1,onClick:function(){return Qe((function(e){return X(X({},e),{},{outputs:((null===e||void 0===e?void 0:e.outputs)||[]).concat({block:{uuid:null},key:u.PAYLOAD})})}))},secondary:!0,children:"Add block output"})}),[tn,Qe]),ln=(0,b.useMemo)((function(){return null===tn||void 0===tn?void 0:tn.map((function(e,n){var t,o,i=e.block,r=e.key,l=e.keyMore,d=e.keys,c=null===nn||void 0===nn?void 0:nn[null===i||void 0===i?void 0:i.uuid];return o=c?(0,K.jsx)(v(),{as:"/pipelines/".concat(null===$e||void 0===$e?void 0:$e.uuid,"/edit?block_uuid=").concat(null===c||void 0===c?void 0:c.uuid),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,K.jsx)(S.Z,{block:!0,openNewWindow:!0,children:(0,K.jsx)(E.ZP,{color:(0,N.qn)(null===c||void 0===c?void 0:c.type,{blockColor:null===c||void 0===c?void 0:c.color,theme:ve}).accent,monospace:!0,children:(null===c||void 0===c?void 0:c.uuid)||"[select a block]"})})}):(0,K.jsx)(E.ZP,{default:!0,monospace:!0,children:(null===c||void 0===c?void 0:c.uuid)||(null===i||void 0===i?void 0:i.uuid)||"[select a block]"}),(0,K.jsxs)(Z.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,K.jsxs)(O.ZP,{alignItems:"center",children:[o,(0,K.jsx)(R.Z,{mr:1}),(0,K.jsx)(T.Kw,{muted:!0}),(0,K.jsx)(R.Z,{mr:1}),(0,K.jsxs)(E.ZP,{default:!0,monospace:!0,children:[r||"{object}",(null===d||void 0===d?void 0:d.length)>=1&&(null===d||void 0===d?void 0:d.map((function(e){return(0,K.jsxs)(E.ZP,{default:!0,inline:!0,monospace:!0,children:["['",e,"']"]})})))]})]}),titleXPadding:w.cd*w.iI,titleYPadding:w.cd*w.iI,children:[(0,K.jsx)(C.S,{title:"Block to extract data from",description:"The output data from this block will be merged into the ".concat(Je,"\u2019s data."),selectInput:{monospace:!0,onChange:function(t){return on(X(X({},e),{},{block:X(X({},c),{},{uuid:t.target.value})}),n)},options:null===en||void 0===en?void 0:en.map((function(e){return{label:e.name,value:e.uuid}})),placeholder:"Select a block",value:null===c||void 0===c?void 0:c.uuid}},"block-uuid-".concat(n)),(0,K.jsx)(C.S,{title:"Object to merge block output data into",description:"Select the ".concat(Je," object to merge the block output data into."),selectInput:{monospace:!0,onChange:function(t){return on(X(X({},e),{},{key:t.target.value}),n)},options:null===(t=Object.values(u))||void 0===t?void 0:t.map((function(e){return{label:e,value:e}})),placeholder:"Select an object",value:r}},"key-".concat(n)),(0,K.jsxs)(C.S,{title:"Additional dictionary keys",description:(0,K.jsxs)(E.ZP,{muted:!0,small:!0,children:["If there is a nested object or value in the $",Je," data that you want to merge the block output data into,",(0,K.jsx)("br",{}),"use these additional keys to instruct the hook on how nested you want to merge the block output data."]}),textInput:{fullWidth:!1,monospace:!0,placeholder:"optional",onChange:function(t){return on(X(X({},e),{},{keyMore:t.target.value}),n)},value:l},children:[null===d||void 0===d?void 0:d.map((function(t){return(0,K.jsx)(R.Z,{ml:1,children:(0,K.jsx)(k.Z,{border:!0,label:t,monospace:!0,onClick:function(){on(X(X({},e),{},{keys:(d||[]).filter((function(e){return e!==t}))}),n)}})},"keys-".concat(n,"-").concat(t))})),(null===d||void 0===d?void 0:d.length)>=1&&(0,K.jsx)(R.Z,{mr:w.cd}),l&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(A.ZP,{compact:!0,small:!0,onClick:function(){on(X(X({},e),{},{keyMore:"",keys:(d||[]).concat(l)}),n)},children:["Add key ",l]}),(0,K.jsx)(R.Z,{mr:w.cd})]})]},"keys-".concat(n))]})}))}),[en,nn,tn,$e,on]),dn=(0,b.useMemo)((function(){return(0,B.GL)(me||{},["conditions","operation_type","outputs","pipeline","predicates","resource_type","run_settings","stages","strategies"])}),[me]),cn=(0,b.useMemo)((function(){return(null===me||void 0===me?void 0:me.metadata)||{created_at:null,snapshot_hash:null,snapshot_valid:!1,snapshotted_at:null,updated_at:null,user:{id:null}}}),[me]);return(0,K.jsxs)(R.Z,{mb:8,p:w.cd,children:[(0,K.jsxs)(C.Z,{title:"What to run hook for",children:[(0,K.jsx)(C.S,{description:"This hook\u2019s UUID must be unique across all hooks for the same resource type and operation type.",invalid:ye&&!(null!==me&&void 0!==me&&me.uuid),textInput:de?{monospace:!0,onChange:function(e){return Qe((function(n){return X(X({},n),{},{uuid:e.target.value})}))},placeholder:"e.g. bootstrap pipeline blocks",value:null===me||void 0===me?void 0:me.uuid}:null,title:"Hook UUID",children:!de&&(0,K.jsx)(R.Z,{px:w.cd,children:(0,K.jsx)(E.ZP,{large:!0,monospace:!0,children:ae})})}),(0,K.jsx)(C.S,{description:"Select the resource this hook should be attached to.",invalid:ye&&!(null!==me&&void 0!==me&&me.resource_type),selectInput:{monospace:!0,onChange:function(e){return Qe((function(n){return X(X({},n),{},{resource_type:e.target.value})}))},options:null===me||void 0===me||null===(n=me.resource_types)||void 0===n?void 0:n.map((function(e){return{label:(0,D.j3)(e),value:e}})),placeholder:"e.g. Pipeline",value:null===me||void 0===me?void 0:me.resource_type},title:"Resource type"}),(0,K.jsx)(C.S,{description:"When a specific operation occurs for a given resource, this hook will be invoked for that specific operation on the configured resource.",invalid:ye&&!(null!==me&&void 0!==me&&me.operation_type),selectInput:{monospace:!0,onChange:function(e){return Qe((function(n){return X(X({},n),{},{operation_type:e.target.value})}))},options:null===me||void 0===me||null===(t=me.operation_types)||void 0===t?void 0:t.map((function(e){return{label:(0,D.vg)(e),value:e}})),placeholder:"e.g. Update",value:null===me||void 0===me?void 0:me.operation_type},title:"Operation type"})]}),!de&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(R.Z,{mb:w.cd}),(0,K.jsxs)(C.Z,{title:"When to run hook",children:[(0,K.jsx)(C.S,{title:"Before operation starts",description:"If enabled, this hook will be invoked before the ".concat(Je," starts."),toggleSwitch:{checked:null===me||void 0===me||null===(o=me.stages)||void 0===o?void 0:o.includes(c.BEFORE),onCheck:function(e){return Qe((function(n){var t,o;return X(X({},n),{},{stages:e(null===n||void 0===n||null===(t=n.stages)||void 0===t?void 0:t.includes(c.BEFORE))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.stages)||[]).concat(c.BEFORE)])):(null===n||void 0===n||null===(o=n.stages)||void 0===o?void 0:o.filter((function(e){return e!==c.BEFORE})))||[]})}))}}}),(0,K.jsx)(C.S,{title:"After operation completes",description:"If enabled, this hook will be invoked after the ".concat(Je," ends."),toggleSwitch:{checked:null===me||void 0===me||null===(i=me.stages)||void 0===i?void 0:i.includes(c.AFTER),onCheck:function(e){return Qe((function(n){var t,o;return X(X({},n),{},{stages:e(null===n||void 0===n||null===(t=n.stages)||void 0===t?void 0:t.includes(c.AFTER))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.stages)||[]).concat(c.AFTER)])):(null===n||void 0===n||null===(o=n.stages)||void 0===o?void 0:o.filter((function(e){return e!==c.AFTER})))||[]})}))}}}),(0,K.jsx)(C.S,{title:"Run if ".concat(Je," succeeds"),description:"If enabled, this hook will be invoked if the ".concat(Je," is successful and doesn\u2019t error."),toggleSwitch:{checked:null===me||void 0===me||null===(l=me.conditions)||void 0===l?void 0:l.includes(a.SUCCESS),onCheck:function(e){return Qe((function(n){var t,o;return X(X({},n),{},{conditions:e(null===n||void 0===n||null===(t=n.conditions)||void 0===t?void 0:t.includes(a.SUCCESS))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.conditions)||[]).concat(a.SUCCESS)])):(null===n||void 0===n||null===(o=n.conditions)||void 0===o?void 0:o.filter((function(e){return e!==a.SUCCESS})))||[]})}))}}}),(0,K.jsx)(C.S,{title:"Run if ".concat(Je," fails"),description:"If enabled, this hook will be invoked if the ".concat(Je," fails with an error."),toggleSwitch:{checked:null===me||void 0===me||null===(h=me.conditions)||void 0===h?void 0:h.includes(a.FAILURE),onCheck:function(e){return Qe((function(n){var t,o;return X(X({},n),{},{conditions:e(null===n||void 0===n||null===(t=n.conditions)||void 0===t?void 0:t.includes(a.FAILURE))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.conditions)||[]).concat(a.FAILURE)])):(null===n||void 0===n||null===(o=n.conditions)||void 0===o?void 0:o.filter((function(e){return e!==a.FAILURE})))||[]})}))}}})]}),(0,K.jsx)(R.Z,{mb:w.cd}),(0,K.jsxs)(C.Z,{title:"Code to run",description:"When the current hook gets triggered, it will execute the associated pipeline.",children:[(0,K.jsx)(C.S,{title:"Pipeline to execute",description:"Select a pipeline that will be executed every time this hook is triggered.",invalid:ye&&!(null!==me&&void 0!==me&&null!==(f=me.pipeline)&&void 0!==f&&f.uuid),selectInput:{monospace:!0,onChange:function(e){return Qe((function(n){return X(X({},n),{},{pipeline:X(X({},null===n||void 0===n?void 0:n.pipeline),{},{uuid:e.target.value})})}))},options:null===Ve||void 0===Ve?void 0:Ve.map((function(e){var n=e.name,t=e.uuid;return{label:n||t,value:t}})),placeholder:"Select a pipeline",value:null===me||void 0===me||null===(z=me.pipeline)||void 0===z?void 0:z.uuid}}),(0,K.jsxs)(C.S,{title:null===me||void 0===me||null===(Y=me.pipeline)||void 0===Y||!Y.uuid||null!==cn&&void 0!==cn&&cn.snapshot_hash||null!==cn&&void 0!==cn&&cn.snapshot_valid?"Valid code snapshot":"Code snapshot hasn\u2019t been created yet",description:(0,K.jsx)(K.Fragment,{children:(0,K.jsxs)(E.ZP,{muted:!0,small:!0,children:["Take a snapshot of ",null!==me&&void 0!==me&&null!==(G=me.pipeline)&&void 0!==G&&G.uuid?(0,K.jsx)(E.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null===me||void 0===me||null===(V=me.pipeline)||void 0===V?void 0:V.uuid}):"the associated pipeline","\u2019s code. The snapshot is used to validate the hook before it runs.",(0,K.jsx)("br",{}),"A hook cannot run if ",null!==me&&void 0!==me&&null!==(q=me.pipeline)&&void 0!==q&&q.uuid?(0,K.jsx)(E.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null===me||void 0===me||null===(Q=me.pipeline)||void 0===Q?void 0:Q.uuid}):"the associated pipeline","\u2019s code has changed after the most recent snapshot has been made.",(0,K.jsx)("br",{}),"If the code changes, a new snapshot must be created."]})}),invalid:(null===me||void 0===me||null===(J=me.pipeline)||void 0===J?void 0:J.uuid)&&(null===cn||void 0===cn?void 0:cn.snapshot_hash)&&!(null!==cn&&void 0!==cn&&cn.snapshot_valid),warning:(null===me||void 0===me||null===($=me.pipeline)||void 0===$?void 0:$.uuid)&&!(null!==cn&&void 0!==cn&&cn.snapshot_hash)&&!(null!==cn&&void 0!==cn&&cn.snapshot_valid),children:[!(null!==cn&&void 0!==cn&&cn.snapshot_hash)&&(0,K.jsx)(E.ZP,{default:!0,large:!0,children:null!==me&&void 0!==me&&null!==(ee=me.pipeline)&&void 0!==ee&&ee.uuid?"No snapshot has been created":"Select a pipeline before taking a snapshot"}),(null===cn||void 0===cn?void 0:cn.snapshot_hash)&&(0,K.jsx)(O.ZP,{flexDirection:"column",children:(0,K.jsx)(E.ZP,{danger:!(null!==cn&&void 0!==cn&&cn.snapshot_valid),large:!0,rightAligned:!0,success:null===cn||void 0===cn?void 0:cn.snapshot_valid,children:null!==cn&&void 0!==cn&&cn.snapshot_valid?"Snapshot valid":"Snapshot outdated"})})]}),(0,K.jsx)(R.Z,{p:w.cd,children:(0,K.jsx)(O.ZP,{alignItems:"center",justifyContent:"flex-end",children:(0,K.jsxs)(O.ZP,{alignItems:"center",children:[(null===cn||void 0===cn?void 0:cn.snapshotted_at)&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(E.ZP,{muted:!0,rightAligned:!0,small:!0,children:["Last snapshot at ",(0,K.jsx)(E.ZP,{inline:!0,muted:!0,small:!0,monospace:!0,children:null===cn||void 0===cn?void 0:cn.snapshotted_at})]}),(0,K.jsx)(R.Z,{mr:w.cd})]}),(0,K.jsx)(A.ZP,{disabled:!(null!==me&&void 0!==me&&null!==(ne=me.pipeline)&&void 0!==ne&&ne.uuid),loading:Fe,onClick:function(){return We({pipeline:null===me||void 0===me?void 0:me.pipeline})},primary:!(null!==cn&&void 0!==cn&&cn.snapshot_valid),secondary:null===cn||void 0===cn?void 0:cn.snapshot_valid,children:null!==cn&&void 0!==cn&&cn.snapshot_hash?null!==cn&&void 0!==cn&&cn.snapshot_valid?"Update snapshot even though it\u2019s valid":"Update snapshot to make it valid":"Create snapshot of code"})]})})})]}),(0,K.jsx)(R.Z,{mb:w.cd}),(0,K.jsxs)(C.Z,{title:"How to run hook",children:[(0,K.jsx)(C.S,{title:"Stop operation if hook fails",description:"If enabled, the ".concat(Je," will be cancelled and an error will be raised."),toggleSwitch:{checked:null===me||void 0===me||null===(te=me.strategies)||void 0===te?void 0:te.includes(d.RAISE),onCheck:function(e){return Qe((function(n){var t,o;return X(X({},n),{},{strategies:e(null===n||void 0===n||null===(t=n.strategies)||void 0===t?void 0:t.includes(d.RAISE))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.strategies)||[]).concat(d.RAISE)])):(null===n||void 0===n||null===(o=n.strategies)||void 0===o?void 0:o.filter((function(e){return e!==d.RAISE})))||[]})}))}}}),(0,K.jsx)(C.S,{title:"Execute hook with history and logging",description:(0,K.jsxs)(E.ZP,{muted:!0,small:!0,children:["If enabled, anytime this hook is executed an associated pipeline run and block runs will be created.",(0,K.jsx)("br",{}),"This will provide a history of the hook execution as well as logging for observability.",(0,K.jsx)("br",{}),"However, this will have a significant impact on the ",Je," resolution time.",(0,K.jsx)("br",{}),"This may cause very delayed API responsed and a degraded devloper experience."]}),toggleSwitch:{checked:!(null===me||void 0===me||null===(oe=me.run_settings)||void 0===oe||!oe.with_trigger),onCheck:function(e){return Qe((function(n){var t;return X(X({},n),{},{run_settings:X(X({},null===n||void 0===n?void 0:n.run_settings),{},{with_trigger:e(null===n||void 0===n||null===(t=n.run_settings)||void 0===t?void 0:t.with_trigger)})})}))}}})]}),(0,K.jsx)(R.Z,{mb:w.cd}),(0,K.jsxs)(C.Z,{title:"Block outputs ".concat((null===tn||void 0===tn?void 0:tn.length)>=1?"(".concat((null===tn||void 0===tn?void 0:tn.length)||0,")"):""),description:(0,K.jsx)(R.Z,{mt:1,children:(0,K.jsxs)(E.ZP,{muted:!0,children:["When a hook runs and executes a pipeline, the output from the pipeline\u2019s blocks",(0,K.jsx)("br",{}),"can optionally be used to mutate the ",Je," input and output data."]})}),headerChildren:(null===tn||void 0===tn?void 0:tn.length)>=1&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(R.Z,{ml:w.cd}),rn]}),children:[!(null!==tn&&void 0!==tn&&tn.length)&&(0,K.jsx)(R.Z,{p:w.cd,children:rn}),(null===tn||void 0===tn?void 0:tn.length)>=1&&(0,K.jsx)(j.Z,{noBorder:!0,noBoxShadow:!0,children:ln})]}),(0,K.jsx)(R.Z,{mb:w.cd}),(0,K.jsxs)(C.Z,{title:"Metadata",children:[(0,K.jsx)(C.S,{title:"Last updated",children:(0,K.jsxs)(_.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,K.jsx)(E.ZP,{large:!0,monospace:!0,muted:!0,children:null!==cn&&void 0!==cn&&cn.updated_at?(0,L.XG)(null===cn||void 0===cn?void 0:cn.updated_at,se):"-"}),(0,K.jsx)(R.Z,{mr:w.cd}),(0,K.jsx)(T.Pf,{muted:!0,size:I.Z}),(0,K.jsx)(R.Z,{mr:1})]})}),(0,K.jsx)(C.S,{title:"Created at",children:(0,K.jsxs)(_.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,K.jsx)(E.ZP,{large:!0,monospace:!0,muted:!0,children:null!==cn&&void 0!==cn&&cn.created_at?(0,L.XG)(null===cn||void 0===cn?void 0:cn.created_at,se):"-"}),(0,K.jsx)(R.Z,{mr:w.cd}),(0,K.jsx)(T.Pf,{muted:!0,size:I.Z}),(0,K.jsx)(R.Z,{mr:1})]})}),(0,K.jsx)(C.S,{title:"Snapshotted at",children:(0,K.jsxs)(_.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,K.jsx)(E.ZP,{large:!0,monospace:!0,muted:!0,children:null!==cn&&void 0!==cn&&cn.snapshotted_at?(0,L.XG)(null===cn||void 0===cn?void 0:cn.snapshotted_at,se):"-"}),(0,K.jsx)(R.Z,{mr:w.cd}),(0,K.jsx)(T.Pf,{muted:!0,size:I.Z}),(0,K.jsx)(R.Z,{mr:1})]})}),(0,K.jsx)(C.S,{title:"Snapshot valid",children:(0,K.jsxs)(_.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,K.jsx)(E.ZP,{large:!0,danger:!(null!==cn&&void 0!==cn&&cn.snapshot_valid),muted:null===cn||void 0===cn?void 0:cn.snapshot_valid,children:null!==cn&&void 0!==cn&&cn.snapshot_valid?"Valid":"Hook won\u2019t run until snapshot is valid"}),(0,K.jsx)(R.Z,{mr:w.cd}),null!==cn&&void 0!==cn&&cn.snapshot_valid?(0,K.jsx)(T.Jr,{size:I.Z,success:!0}):(0,K.jsx)(T.uy,{danger:!0,size:I.Z}),(0,K.jsx)(R.Z,{mr:1})]})}),(0,K.jsx)(C.S,{title:"Created by",children:(0,K.jsxs)(_.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,K.jsx)(E.ZP,{large:!0,monospace:!0,muted:!0,children:null!==cn&&void 0!==cn&&null!==(ie=cn.user)&&void 0!==ie&&ie.id?String(null===cn||void 0===cn||null===(re=cn.user)||void 0===re?void 0:re.id)===String(null===he||void 0===he?void 0:he.id)?"You created this hook":"User ID ".concat(null===cn||void 0===cn||null===(le=cn.user)||void 0===le?void 0:le.id):"-"}),(0,K.jsx)(R.Z,{mr:w.cd}),(0,K.jsx)(T.SC,{muted:!0,size:I.Z}),(0,K.jsx)(R.Z,{mr:1})]})})]})]}),(0,K.jsx)(R.Z,{mt:w.HN,children:(0,K.jsxs)(O.ZP,{alignItems:"center",justifyContent:"space-between",children:[!de&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(A.ZP,{compact:!0,danger:!0,loading:Ye,onClick:function(){window.confirm("Are you sure you wantt to delete this hook?")&&Xe()},small:!0,children:"Delete global hook"}),(0,K.jsx)(R.Z,{mr:w.cd})]}),(0,K.jsxs)(_.Z,{flex:1,justifyContent:"flex-end",children:[(0,K.jsx)(A.ZP,{beforeIcon:(0,K.jsx)(T.Hd,{}),disabled:De||Be||Ye,onClick:function(){return pe.push("/global-hooks")},secondary:!0,children:ye?"Cancel changes & go back":"Go back to all hooks"}),(0,K.jsx)(R.Z,{mr:w.cd}),(0,K.jsx)(A.ZP,{beforeIcon:(0,K.jsx)(T.vc,{}),disabled:Ye,loading:De||Be,onClick:function(){return(de?we:Me)({global_hook:X(X({},dn),de?{uuid:null===me||void 0===me?void 0:me.uuid}:{})})},primary:!0,children:de?"Create new global hook":"Save changes"})]})]})})]})}},70320:function(e,n,t){t.d(n,{h:function(){return l},q:function(){return r}});var o=t(78419),i=t(53808);function r(){return(0,i.U2)(o.am,null)||!1}function l(e){return"undefined"!==typeof e&&(0,i.t8)(o.am,e),e}},57114:function(e,n,t){t.d(n,{S:function(){return j},Z:function(){return Z}});var o=t(82684),i=t(15338),r=t(97618),l=t(55485),d=t(85854),c=t(65956),u=t(82394),a=t(44085),s=t(38276),h=t(30160),p=t(17488),f=t(69650),v=t(72473),g=t(8193),m=t(70515),b=t(28598);function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j=function(e){var n,t=e.children,o=e.description,i=e.invalid,d=e.selectInput,c=e.textInput,u=e.title,x=e.toggleSwitch,j=e.warning;return(0,b.jsx)(s.Z,{p:m.cd,children:(0,b.jsxs)(l.ZP,{alignItems:"center",children:[(0,b.jsxs)(l.ZP,{flexDirection:"column",children:[(0,b.jsxs)(h.ZP,{danger:i,default:!0,large:!0,warning:j,children:[u," ",i&&(0,b.jsx)(h.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),o&&"string"===typeof o&&(0,b.jsx)(h.ZP,{muted:!0,small:!0,children:o}),o&&"string"!==typeof o&&o]}),(0,b.jsx)(s.Z,{mr:m.cd}),(0,b.jsxs)(r.Z,{flex:1,justifyContent:"flex-end",children:[t,c&&(0,b.jsx)(p.Z,y({afterIcon:(0,b.jsx)(v.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:g.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},c)),d&&(0,b.jsx)(a.Z,y(y({},d),{},{afterIcon:(0,b.jsx)(v._M,{}),afterIconSize:g.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===d||void 0===d||null===(n=d.options)||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.value;return(0,b.jsx)("option",{value:t,children:n||t},t)}))})),x&&(0,b.jsx)(f.Z,{checked:!(null===x||void 0===x||!x.checked),compact:!0,onCheck:null===x||void 0===x?void 0:x.onCheck})]})]})})},Z=function(e){var n=e.children,t=e.description,u=e.headerChildren,a=e.title;return(0,b.jsxs)(c.Z,{noPadding:!0,children:[(0,b.jsx)(s.Z,{p:m.cd,children:(0,b.jsxs)(l.ZP,{alignItems:"center",children:[(0,b.jsxs)(r.Z,{flex:1,flexDirection:"column",children:[(0,b.jsx)(d.Z,{level:4,children:a}),t&&"string"===typeof t&&(0,b.jsx)(s.Z,{mt:1,children:(0,b.jsx)(h.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),u]})}),o.Children.map(n,(function(e,n){return(0,b.jsxs)("div",{children:[(0,b.jsx)(i.Z,{light:!0}),e]},"".concat(a,"-").concat(n))}))]})}},8193:function(e,n,t){t.d(n,{N:function(){return c},Z:function(){return d}});var o=t(38626),i=t(44897),r=t(42631),l=t(70515),d=2*l.iI,c=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],r.n_,l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).codeArea,";\n ")}))},44425:function(e,n,t){t.d(n,{$W:function(){return m},DA:function(){return v},HX:function(){return j},J8:function(){return y},L8:function(){return d},LE:function(){return h},Lk:function(){return k},Lq:function(){return p},M5:function(){return f},Q3:function(){return b},Qj:function(){return Z},Ut:function(){return S},V4:function(){return O},VZ:function(){return x},dO:function(){return s},f2:function(){return _},iZ:function(){return A},t6:function(){return c},tf:function(){return a}});var o,i,r,l,d,c,u=t(82394);!function(e){e.CONDITION="condition",e.DBT_SNAPSHOT="snapshot",e.DYNAMIC="dynamic",e.DYNAMIC_CHILD="dynamic_child",e.REDUCE_OUTPUT="reduce_output",e.REPLICA="replica"}(d||(d={})),function(e){e.MARKDOWN="markdown",e.PYTHON="python",e.R="r",e.SQL="sql",e.YAML="yaml"}(c||(c={}));var a,s=(o={},(0,u.Z)(o,c.MARKDOWN,"MD"),(0,u.Z)(o,c.PYTHON,"PY"),(0,u.Z)(o,c.R,"R"),(0,u.Z)(o,c.SQL,"SQL"),(0,u.Z)(o,c.YAML,"YAML"),o),h=(i={},(0,u.Z)(i,c.MARKDOWN,"Markdown"),(0,u.Z)(i,c.PYTHON,"Python"),(0,u.Z)(i,c.R,"R"),(0,u.Z)(i,c.SQL,"SQL"),(0,u.Z)(i,c.YAML,"YAML"),i);!function(e){e.CALLBACK="callback",e.CHART="chart",e.CONDITIONAL="conditional",e.CUSTOM="custom",e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.DBT="dbt",e.EXTENSION="extension",e.GLOBAL_DATA_PRODUCT="global_data_product",e.SCRATCHPAD="scratchpad",e.SENSOR="sensor",e.MARKDOWN="markdown",e.TRANSFORMER="transformer"}(a||(a={}));var p,f=[a.CALLBACK,a.CONDITIONAL,a.EXTENSION];!function(e){e.BLUE="blue",e.GREY="grey",e.PINK="pink",e.PURPLE="purple",e.TEAL="teal",e.YELLOW="yellow"}(p||(p={}));var v,g,m=[a.CHART,a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.SCRATCHPAD,a.SENSOR,a.MARKDOWN,a.TRANSFORMER],b=[a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.SCRATCHPAD,a.SENSOR,a.MARKDOWN,a.TRANSFORMER],x=[a.DATA_EXPORTER,a.DATA_LOADER],y=[a.DATA_EXPORTER,a.DATA_LOADER,a.TRANSFORMER],j=[a.DATA_EXPORTER,a.DATA_LOADER,a.DBT,a.TRANSFORMER],Z=[a.CHART,a.SCRATCHPAD,a.SENSOR,a.MARKDOWN],A=[a.CALLBACK,a.CHART,a.EXTENSION,a.SCRATCHPAD,a.MARKDOWN],k=[a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.SENSOR,a.TRANSFORMER];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(v||(v={})),function(e){e.BLOCK_FILE="block_file",e.CUSTOM_BLOCK_TEMPLATE="custom_block_template",e.MAGE_TEMPLATE="mage_template"}(g||(g={}));var _=[a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.TRANSFORMER],O=(r={},(0,u.Z)(r,a.CALLBACK,"Callback"),(0,u.Z)(r,a.CHART,"Chart"),(0,u.Z)(r,a.CONDITIONAL,"Conditional"),(0,u.Z)(r,a.CUSTOM,"Custom"),(0,u.Z)(r,a.DATA_EXPORTER,"Data exporter"),(0,u.Z)(r,a.DATA_LOADER,"Data loader"),(0,u.Z)(r,a.DBT,"DBT"),(0,u.Z)(r,a.EXTENSION,"Extension"),(0,u.Z)(r,a.GLOBAL_DATA_PRODUCT,"Global data product"),(0,u.Z)(r,a.MARKDOWN,"Markdown"),(0,u.Z)(r,a.SCRATCHPAD,"Scratchpad"),(0,u.Z)(r,a.SENSOR,"Sensor"),(0,u.Z)(r,a.TRANSFORMER,"Transformer"),r),S=[a.DATA_LOADER,a.TRANSFORMER,a.DATA_EXPORTER,a.SENSOR];l={},(0,u.Z)(l,a.DATA_EXPORTER,"DE"),(0,u.Z)(l,a.DATA_LOADER,"DL"),(0,u.Z)(l,a.SCRATCHPAD,"SP"),(0,u.Z)(l,a.SENSOR,"SR"),(0,u.Z)(l,a.MARKDOWN,"MD"),(0,u.Z)(l,a.TRANSFORMER,"TF")},31882:function(e,n,t){var o=t(38626),i=t(71180),r=t(55485),l=t(30160),d=t(44897),c=t(72473),u=t(70515),a=t(61896),s=t(28598),h=o.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||d.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||d.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((u.iI+a.Al)/2,"px;\n height: ").concat(1.5*u.iI+a.Al,"px;\n padding: ").concat(u.iI/1.5,"px ").concat(1.25*u.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((u.iI/2+a.Al)/2,"px;\n height: ").concat(a.Al+u.iI/2+2,"px;\n padding: ").concat(u.iI/4,"px ").concat(u.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((u.iI/1+a.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||d.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,o=e.disabled,d=e.label,a=e.monospace,p=e.onClick,f=e.primary,v=e.small,g=e.xsmall;return(0,s.jsx)(h,{border:n,primary:f,small:v,xsmall:g,children:(0,s.jsx)(i.ZP,{basic:!0,disabled:o,noBackground:!0,noPadding:!0,onClick:p,transparent:!0,children:(0,s.jsxs)(r.ZP,{alignItems:"center",children:[t,d&&(0,s.jsx)(l.ZP,{monospace:a,small:v,xsmall:g,children:d}),!o&&p&&(0,s.jsx)("div",{style:{marginLeft:2}}),!o&&p&&(0,s.jsx)(c.x8,{default:f,muted:!f,size:v?u.iI:1.25*u.iI})]})})})}},65956:function(e,n,t){var o=t(38626),i=t(55485),r=t(38276),l=t(30160),d=t(44897),c=t(42631),u=t(47041),a=t(70515),s=t(28598),h=(0,o.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*a.iI,1.5*a.iI,1.5*a.iI),p=o.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],c.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||d.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||d.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||d.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||d.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||d.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 "})),f=o.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],c.n_,c.n_,(function(e){return"\n background-color: ".concat((e.theme.background||d.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||d.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=o.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 "})),g=o.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],c.M8,c.YF,1.75*a.iI);n.Z=function(e){var n=e.borderless,t=e.children,o=e.containerRef,d=e.contentContainerRef,c=e.dark,u=e.footer,a=e.fullHeight,h=void 0===a||a,m=e.fullWidth,b=void 0===m||m,x=e.header,y=e.headerHeight,j=e.headerIcon,Z=e.headerPaddingVertical,A=e.headerTitle,k=e.maxHeight,_=e.maxWidth,O=e.minWidth,S=e.noPadding,C=e.overflowVisible,R=e.subtitle,E=e.success;return(0,s.jsxs)(p,{borderless:n,dark:c,fullHeight:h,fullWidth:b,maxHeight:k,maxWidth:_,minWidth:O,overflowVisible:C,ref:o,success:E,children:[(x||A)&&(0,s.jsxs)(f,{headerPaddingVertical:Z,height:y,children:[x&&x,A&&(0,s.jsx)(i.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(i.ZP,{alignItems:"center",children:[j&&j,(0,s.jsx)(r.Z,{ml:j?1:0,children:(0,s.jsx)(l.ZP,{bold:!0,default:!0,children:A})})]})})]}),(0,s.jsxs)(v,{maxHeight:k,noPadding:S,overflowVisible:C,ref:d,children:[R&&(0,s.jsx)(r.Z,{mb:2,children:(0,s.jsx)(l.ZP,{default:!0,children:R})}),t]}),u&&(0,s.jsx)(g,{children:u})]})}},80022:function(e,n,t){function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return o}})},15544:function(e,n,t){function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}t.d(n,{Z:function(){return o}})},13692:function(e,n,t){t.d(n,{Z:function(){return i}});var o=t(61049);function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,o.Z)(e,n)}},93189:function(e,n,t){t.d(n,{Z:function(){return r}});var o=t(12539),i=t(80022);function r(e,n){if(n&&("object"===o(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}},61049:function(e,n,t){function o(e,n){return o=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},o(e,n)}t.d(n,{Z:function(){return o}})}}]);