mage-ai 0.9.46__py3-none-any.whl → 0.9.48__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mage-ai might be problematic. Click here for more details.

Files changed (405) 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 +3 -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 +30 -2
  16. mage_ai/data_preparation/executors/pipeline_executor.py +19 -4
  17. mage_ai/data_preparation/models/block/__init__.py +75 -32
  18. mage_ai/data_preparation/models/block/data_integration/constants.py +3 -0
  19. mage_ai/data_preparation/models/block/data_integration/mixins.py +6 -6
  20. mage_ai/data_preparation/models/block/data_integration/utils.py +198 -39
  21. mage_ai/data_preparation/models/block/sql/bigquery.py +2 -2
  22. mage_ai/data_preparation/models/block/sql/snowflake.py +2 -2
  23. mage_ai/data_preparation/models/block/sql/trino.py +2 -2
  24. mage_ai/data_preparation/models/block/sql/utils/shared.py +20 -3
  25. mage_ai/data_preparation/models/block/utils.py +53 -29
  26. mage_ai/data_preparation/models/global_hooks/constants.py +50 -1
  27. mage_ai/data_preparation/models/global_hooks/models.py +148 -84
  28. mage_ai/data_preparation/models/global_hooks/predicates.py +316 -0
  29. mage_ai/data_preparation/models/pipeline.py +7 -0
  30. mage_ai/data_preparation/models/pipelines/integration_pipeline.py +0 -1
  31. mage_ai/data_preparation/models/project/__init__.py +0 -2
  32. mage_ai/data_preparation/preferences.py +29 -18
  33. mage_ai/data_preparation/repo_manager.py +12 -2
  34. mage_ai/data_preparation/sync/__init__.py +2 -0
  35. mage_ai/data_preparation/templates/constants.py +14 -0
  36. mage_ai/data_preparation/templates/data_exporters/chroma.py +24 -0
  37. mage_ai/data_preparation/templates/data_exporters/streaming/rabbitmq.yaml +7 -0
  38. mage_ai/data_preparation/templates/data_loaders/chroma.py +27 -0
  39. mage_ai/data_preparation/templates/repo/io_config.yaml +3 -0
  40. mage_ai/io/base.py +1 -0
  41. mage_ai/io/chroma.py +162 -0
  42. mage_ai/io/config.py +8 -0
  43. mage_ai/orchestration/db/models/schedules.py +169 -34
  44. mage_ai/orchestration/pipeline_scheduler.py +59 -89
  45. mage_ai/server/constants.py +1 -1
  46. mage_ai/server/frontend_dist/404.html +2 -2
  47. mage_ai/server/frontend_dist/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
  48. mage_ai/server/frontend_dist/_next/static/chunks/1952-0f9a12782f0aaae6.js +1 -0
  49. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
  50. mage_ai/server/frontend_dist/_next/static/chunks/2717-14191a781cf2f286.js +1 -0
  51. mage_ai/server/frontend_dist/_next/static/chunks/3419-a7a52bcaaa687b07.js +1 -0
  52. mage_ai/server/frontend_dist/_next/static/chunks/3437-e81a62f33337ca06.js +1 -0
  53. mage_ai/server/frontend_dist/_next/static/chunks/3943-3cb1f765210dd7a4.js +1 -0
  54. mage_ai/server/frontend_dist/_next/static/chunks/4138-2c16e6d2f22246cd.js +1 -0
  55. mage_ai/server/frontend_dist/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
  56. mage_ai/server/frontend_dist/_next/static/chunks/{4366-93e09e5a4a7e182c.js → 4366-3e52497942acbafe.js} +1 -1
  57. mage_ai/server/frontend_dist/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
  58. mage_ai/server/frontend_dist/_next/static/chunks/{5499-76cf8f023c6b0985.js → 5499-c2853ef57d39fde8.js} +1 -1
  59. mage_ai/server/frontend_dist/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
  60. mage_ai/server/frontend_dist/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
  61. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/6285-e9b45335bfb9ccaf.js → frontend_dist/_next/static/chunks/6285-648f9a732e100b2f.js} +1 -1
  62. mage_ai/server/frontend_dist/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/6990-303bb87fc50f1755.js +1 -0
  64. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
  65. mage_ai/server/frontend_dist/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
  66. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7858-d9df72e95e438284.js → frontend_dist/_next/static/chunks/7858-26a5a5d04fa3c703.js} +1 -1
  67. mage_ai/server/frontend_dist/_next/static/chunks/{8146-92e7ccfed169ee9c.js → 8146-27f0e31f309897a5.js} +1 -1
  68. mage_ai/server/frontend_dist/_next/static/chunks/8264-9d6a7cea289e29ff.js +1 -0
  69. mage_ai/server/frontend_dist/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
  70. mage_ai/server/frontend_dist/_next/static/chunks/8487-608d62c0eef1f29a.js +1 -0
  71. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/1845-5ce774d5ab81ed57.js → frontend_dist/_next/static/chunks/8731-2f78ec7b7760be8f.js} +1 -1
  72. mage_ai/server/frontend_dist/_next/static/chunks/90-93d18aaecef0685b.js +1 -0
  73. mage_ai/server/frontend_dist/_next/static/chunks/9264-727704fc34e74ae0.js +1 -0
  74. mage_ai/server/frontend_dist/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
  75. mage_ai/server/frontend_dist/_next/static/chunks/9624-48fba6b4e6966fb7.js +1 -0
  76. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/976-18c98af60b76f1a7.js → frontend_dist/_next/static/chunks/976-0a8c2c4d7acd957b.js} +1 -1
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-8254de4f793643d0.js +1 -0
  78. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js → frontend_dist/_next/static/chunks/pages/block-layout-b926f6eb1ee9a53b.js} +1 -1
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-a9402b51e9fe748e.js +1 -0
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-85cecae037fd7a70.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-cfd68e760ae00958.js → [...slug]-c3c9523ea8072c11.js} +1 -1
  82. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-c3b79ef31007f95b.js → global-data-products-4d046f15202a1c8d.js} +1 -1
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-286133386c97a2b6.js +1 -0
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-hooks-e561ae38cf5592e8.js → global-hooks-3da370825153056c.js} +1 -1
  85. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-449a022f2f0f2d94.js → frontend_dist/_next/static/chunks/pages/manage/files-39b73da5a15590f6.js} +1 -1
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{settings-60845f0b59142f32.js → settings-666748ff5d101411.js} +1 -1
  87. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js → frontend_dist/_next/static/chunks/pages/manage/users/[user]-be27631e67dbe070.js} +1 -1
  88. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-abd8571907664fdf.js → frontend_dist/_next/static/chunks/pages/manage/users/new-1932ce64823b372b.js} +1 -1
  89. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-28a930b148d99766.js → frontend_dist/_next/static/chunks/pages/manage/users-ed509c75cf23f0f5.js} +1 -1
  90. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage-f83deb790548693b.js → frontend_dist/_next/static/chunks/pages/manage-1feebec1124123fc.js} +1 -1
  91. mage_ai/server/frontend_dist/_next/static/chunks/pages/{oauth-8bb62c4f6a511c43.js → oauth-e9b8f19c30381c28.js} +1 -1
  92. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/overview-f0c40645f385f23f.js → frontend_dist/_next/static/chunks/pages/overview-7b2ba2d5405c05fe.js} +1 -1
  93. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-70fc3351bd11025f.js +1 -0
  94. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-6ee3b88a5bb4ce94.js +1 -0
  95. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c9cf383bc13ce7b8.js +1 -0
  96. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-571c0962333b92f0.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-7bca6f718b939934.js} +1 -1
  97. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-c119f630038b0685.js +1 -0
  98. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-146051325c92d742.js +1 -0
  99. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-ddddcddd2f74b4f6.js → block-runs-15d307e6ba934a56.js} +1 -1
  100. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f6196e563b960e5c.js} +1 -1
  101. 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-25dbd73201d99e80.js} +1 -1
  102. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-06e55db757959ef8.js +1 -0
  103. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-ec3c45cfa027db58.js} +1 -1
  104. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-495e877aa7ed709e.js +1 -0
  105. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-49adfeed5157d92b.js +1 -0
  106. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-6143e028225390f5.js +1 -0
  107. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-0886f6320fef7131.js +1 -0
  108. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-e82a763d742cc034.js +1 -0
  109. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-50d20fa715d454af.js +1 -0
  110. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-b78b1be5b9ed84b9.js → [...slug]-2bbd63b7e93a8600.js} +1 -1
  111. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-37b78a436eeab258.js → permissions-4ea156c39608caab.js} +1 -1
  112. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-f3c29ec53ee35795.js +1 -0
  113. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-db05a80d18c168e5.js → [...slug]-64ec8928d2542f3c.js} +1 -1
  114. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-f55c77e4f46c8d33.js → roles-835e6ec2a48ec583.js} +1 -1
  115. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-2a1f8737561fdd94.js → sync-data-0769149af025de30.js} +1 -1
  116. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-e3bf6e5d8bb250c4.js → [...slug]-612a65c42bcadef0.js} +1 -1
  117. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-20f0a050a42a015d.js → users-e3365b4029a8db33.js} +1 -1
  118. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-99e2748e3c1d57a3.js → frontend_dist/_next/static/chunks/pages/sign-in-f3a33e8f83abdb58.js} +1 -1
  119. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js → frontend_dist/_next/static/chunks/pages/templates/[...slug]-f264097bf8120f31.js} +1 -1
  120. mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-1bfaa1c50e844813.js → templates-406e13cc5c4caab4.js} +1 -1
  121. mage_ai/server/frontend_dist/_next/static/chunks/pages/{terminal-ed121e305169cf1c.js → terminal-ef8ad878e5e7bb2f.js} +1 -1
  122. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-a90728798f964700.js +1 -0
  123. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-0e0c2713a2922be7.js +1 -0
  124. mage_ai/server/frontend_dist/_next/static/xxcdnITr3IkTdETH5ghqw/_buildManifest.js +1 -0
  125. mage_ai/server/frontend_dist/block-layout.html +2 -2
  126. mage_ai/server/frontend_dist/compute.html +5 -5
  127. mage_ai/server/frontend_dist/files.html +5 -5
  128. mage_ai/server/frontend_dist/global-data-products/[...slug].html +5 -5
  129. mage_ai/server/frontend_dist/global-data-products.html +5 -5
  130. mage_ai/server/frontend_dist/global-hooks/[...slug].html +5 -5
  131. mage_ai/server/frontend_dist/global-hooks.html +5 -5
  132. mage_ai/server/frontend_dist/index.html +2 -2
  133. mage_ai/server/frontend_dist/manage/files.html +5 -5
  134. mage_ai/server/frontend_dist/manage/settings.html +5 -5
  135. mage_ai/server/frontend_dist/manage/users/[user].html +5 -5
  136. mage_ai/server/frontend_dist/manage/users/new.html +5 -5
  137. mage_ai/server/frontend_dist/manage/users.html +5 -5
  138. mage_ai/server/frontend_dist/manage.html +5 -5
  139. mage_ai/server/frontend_dist/oauth.html +4 -4
  140. mage_ai/server/frontend_dist/overview.html +5 -5
  141. mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
  142. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  143. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
  144. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +5 -5
  145. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  146. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
  147. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  148. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  149. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
  150. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
  151. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
  152. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +5 -5
  153. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
  154. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  155. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
  156. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  157. mage_ai/server/frontend_dist/pipelines.html +5 -5
  158. mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
  159. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +5 -5
  160. mage_ai/server/frontend_dist/settings/workspace/permissions.html +5 -5
  161. mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
  162. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +5 -5
  163. mage_ai/server/frontend_dist/settings/workspace/roles.html +5 -5
  164. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +5 -5
  165. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +5 -5
  166. mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
  167. mage_ai/server/frontend_dist/settings.html +2 -2
  168. mage_ai/server/frontend_dist/sign-in.html +24 -24
  169. mage_ai/server/frontend_dist/templates/[...slug].html +5 -5
  170. mage_ai/server/frontend_dist/templates.html +5 -5
  171. mage_ai/server/frontend_dist/terminal.html +5 -5
  172. mage_ai/server/frontend_dist/test.html +5 -5
  173. mage_ai/server/frontend_dist/triggers.html +5 -5
  174. mage_ai/server/frontend_dist/version-control.html +5 -5
  175. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-0f9a12782f0aaae6.js +1 -0
  178. mage_ai/server/{frontend_dist/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist_base_path_template/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
  179. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-14191a781cf2f286.js +1 -0
  180. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-a7a52bcaaa687b07.js +1 -0
  181. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-e81a62f33337ca06.js +1 -0
  182. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-3cb1f765210dd7a4.js +1 -0
  183. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4138-2c16e6d2f22246cd.js +1 -0
  184. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
  185. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4366-93e09e5a4a7e182c.js → 4366-3e52497942acbafe.js} +1 -1
  186. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
  187. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5499-76cf8f023c6b0985.js → 5499-c2853ef57d39fde8.js} +1 -1
  188. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
  189. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
  190. mage_ai/server/{frontend_dist/_next/static/chunks/6285-e9b45335bfb9ccaf.js → frontend_dist_base_path_template/_next/static/chunks/6285-648f9a732e100b2f.js} +1 -1
  191. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
  192. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6990-303bb87fc50f1755.js +1 -0
  193. mage_ai/server/{frontend_dist/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist_base_path_template/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
  194. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
  195. mage_ai/server/{frontend_dist/_next/static/chunks/7858-d9df72e95e438284.js → frontend_dist_base_path_template/_next/static/chunks/7858-26a5a5d04fa3c703.js} +1 -1
  196. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{8146-92e7ccfed169ee9c.js → 8146-27f0e31f309897a5.js} +1 -1
  197. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-9d6a7cea289e29ff.js +1 -0
  198. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
  199. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-608d62c0eef1f29a.js +1 -0
  200. mage_ai/server/{frontend_dist/_next/static/chunks/1845-5ce774d5ab81ed57.js → frontend_dist_base_path_template/_next/static/chunks/8731-2f78ec7b7760be8f.js} +1 -1
  201. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/90-93d18aaecef0685b.js +1 -0
  202. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-727704fc34e74ae0.js +1 -0
  203. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
  204. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-48fba6b4e6966fb7.js +1 -0
  205. mage_ai/server/{frontend_dist/_next/static/chunks/976-18c98af60b76f1a7.js → frontend_dist_base_path_template/_next/static/chunks/976-0a8c2c4d7acd957b.js} +1 -1
  206. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-8254de4f793643d0.js +1 -0
  207. mage_ai/server/{frontend_dist/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js → frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-b926f6eb1ee9a53b.js} +1 -1
  208. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-a9402b51e9fe748e.js +1 -0
  209. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-85cecae037fd7a70.js +1 -0
  210. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-cfd68e760ae00958.js → [...slug]-c3c9523ea8072c11.js} +1 -1
  211. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-c3b79ef31007f95b.js → global-data-products-4d046f15202a1c8d.js} +1 -1
  212. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-286133386c97a2b6.js +1 -0
  213. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-hooks-e561ae38cf5592e8.js → global-hooks-3da370825153056c.js} +1 -1
  214. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/files-449a022f2f0f2d94.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-39b73da5a15590f6.js} +1 -1
  215. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{settings-60845f0b59142f32.js → settings-666748ff5d101411.js} +1 -1
  216. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-be27631e67dbe070.js} +1 -1
  217. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/new-abd8571907664fdf.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-1932ce64823b372b.js} +1 -1
  218. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users-28a930b148d99766.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-ed509c75cf23f0f5.js} +1 -1
  219. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage-f83deb790548693b.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage-1feebec1124123fc.js} +1 -1
  220. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{oauth-8bb62c4f6a511c43.js → oauth-e9b8f19c30381c28.js} +1 -1
  221. mage_ai/server/{frontend_dist/_next/static/chunks/pages/overview-f0c40645f385f23f.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-7b2ba2d5405c05fe.js} +1 -1
  222. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-70fc3351bd11025f.js +1 -0
  223. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-6ee3b88a5bb4ce94.js +1 -0
  224. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c9cf383bc13ce7b8.js +1 -0
  225. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-571c0962333b92f0.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-7bca6f718b939934.js} +1 -1
  226. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-c119f630038b0685.js +1 -0
  227. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-146051325c92d742.js +1 -0
  228. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-ddddcddd2f74b4f6.js → block-runs-15d307e6ba934a56.js} +1 -1
  229. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f6196e563b960e5c.js} +1 -1
  230. 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-25dbd73201d99e80.js} +1 -1
  231. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-06e55db757959ef8.js +1 -0
  232. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-ec3c45cfa027db58.js} +1 -1
  233. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-495e877aa7ed709e.js +1 -0
  234. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-49adfeed5157d92b.js +1 -0
  235. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-6143e028225390f5.js +1 -0
  236. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-0886f6320fef7131.js +1 -0
  237. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-e82a763d742cc034.js +1 -0
  238. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-50d20fa715d454af.js +1 -0
  239. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-b78b1be5b9ed84b9.js → [...slug]-2bbd63b7e93a8600.js} +1 -1
  240. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-37b78a436eeab258.js → permissions-4ea156c39608caab.js} +1 -1
  241. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-f3c29ec53ee35795.js +1 -0
  242. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-db05a80d18c168e5.js → [...slug]-64ec8928d2542f3c.js} +1 -1
  243. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-f55c77e4f46c8d33.js → roles-835e6ec2a48ec583.js} +1 -1
  244. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-2a1f8737561fdd94.js → sync-data-0769149af025de30.js} +1 -1
  245. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-e3bf6e5d8bb250c4.js → [...slug]-612a65c42bcadef0.js} +1 -1
  246. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-20f0a050a42a015d.js → users-e3365b4029a8db33.js} +1 -1
  247. mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-99e2748e3c1d57a3.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-f3a33e8f83abdb58.js} +1 -1
  248. mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-f264097bf8120f31.js} +1 -1
  249. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-1bfaa1c50e844813.js → templates-406e13cc5c4caab4.js} +1 -1
  250. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{terminal-ed121e305169cf1c.js → terminal-ef8ad878e5e7bb2f.js} +1 -1
  251. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-a90728798f964700.js +1 -0
  252. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-0e0c2713a2922be7.js +1 -0
  253. mage_ai/server/frontend_dist_base_path_template/_next/static/gDn6inKdLyj35NvURBSCV/_buildManifest.js +1 -0
  254. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  255. mage_ai/server/frontend_dist_base_path_template/compute.html +5 -5
  256. mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
  257. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
  258. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
  259. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +5 -5
  260. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +5 -5
  261. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  262. mage_ai/server/frontend_dist_base_path_template/manage/files.html +5 -5
  263. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
  264. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
  265. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
  266. mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
  267. mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
  268. mage_ai/server/frontend_dist_base_path_template/oauth.html +4 -4
  269. mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
  270. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
  271. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  272. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
  273. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
  274. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  275. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
  276. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  277. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  278. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
  279. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
  280. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
  281. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
  282. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
  283. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  284. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
  285. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  286. mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
  287. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
  288. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +5 -5
  289. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +5 -5
  290. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
  291. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +5 -5
  292. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +5 -5
  293. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
  294. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +5 -5
  295. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
  296. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  297. mage_ai/server/frontend_dist_base_path_template/sign-in.html +20 -20
  298. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
  299. mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
  300. mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
  301. mage_ai/server/frontend_dist_base_path_template/test.html +5 -5
  302. mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
  303. mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
  304. mage_ai/server/server.py +11 -3
  305. mage_ai/services/k8s/job_manager.py +1 -0
  306. mage_ai/settings/repo.py +3 -0
  307. mage_ai/shared/files.py +47 -0
  308. mage_ai/shared/models.py +1 -0
  309. mage_ai/streaming/constants.py +1 -0
  310. mage_ai/streaming/sinks/postgres.py +2 -0
  311. mage_ai/streaming/sinks/rabbitmq.py +76 -0
  312. mage_ai/streaming/sinks/sink_factory.py +4 -0
  313. mage_ai/streaming/sources/nats_js.py +12 -1
  314. mage_ai/tests/api/operations/test_operations_with_hooks.py +136 -91
  315. mage_ai/tests/api/policies/test_oauth_policy.py +38 -0
  316. mage_ai/tests/data_preparation/executors/test_block_executor.py +2 -0
  317. mage_ai/tests/data_preparation/models/global_hooks/test_global_hooks.py +33 -8
  318. mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +82 -38
  319. mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +803 -0
  320. mage_ai/tests/data_preparation/models/global_hooks/test_utils.py +6 -1
  321. mage_ai/tests/data_preparation/models/test_block.py +26 -0
  322. mage_ai/tests/data_preparation/models/test_pipeline.py +15 -0
  323. mage_ai/tests/factory.py +40 -2
  324. mage_ai/tests/orchestration/test_pipeline_scheduler.py +82 -1
  325. mage_ai/tests/services/k8s/test_job_manager.py +16 -0
  326. mage_ai/tests/shared/mixins.py +60 -23
  327. mage_ai/tests/streaming/sinks/test_rabbitmq.py +36 -0
  328. {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/METADATA +7 -4
  329. {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/RECORD +335 -321
  330. {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/WHEEL +1 -1
  331. mage_ai/server/frontend_dist/_next/static/9jB4XPuz6BzxBcG9VNao5/_buildManifest.js +0 -1
  332. mage_ai/server/frontend_dist/_next/static/chunks/1952-ac7722e8b1ab88fe.js +0 -1
  333. mage_ai/server/frontend_dist/_next/static/chunks/3419-f8d518d024e7b5c8.js +0 -1
  334. mage_ai/server/frontend_dist/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
  335. mage_ai/server/frontend_dist/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
  336. mage_ai/server/frontend_dist/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
  337. mage_ai/server/frontend_dist/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
  338. mage_ai/server/frontend_dist/_next/static/chunks/600-705fe234320ec5de.js +0 -1
  339. mage_ai/server/frontend_dist/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
  340. mage_ai/server/frontend_dist/_next/static/chunks/722-a1584445357a276c.js +0 -1
  341. mage_ai/server/frontend_dist/_next/static/chunks/8264-0d582a6ca33c3dfa.js +0 -1
  342. mage_ai/server/frontend_dist/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
  343. mage_ai/server/frontend_dist/_next/static/chunks/90-a7308bae028d7001.js +0 -1
  344. mage_ai/server/frontend_dist/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
  345. mage_ai/server/frontend_dist/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
  346. mage_ai/server/frontend_dist/_next/static/chunks/9624-334e7db5c84cb4ea.js +0 -1
  347. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
  348. mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-419775ca1293b354.js +0 -1
  349. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
  350. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
  351. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-b35d37bfba8fbccc.js +0 -1
  352. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
  353. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
  354. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
  355. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-ef680455ae54ccbe.js +0 -1
  356. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
  357. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
  358. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +0 -1
  359. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
  360. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
  361. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
  362. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
  363. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
  364. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
  365. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
  366. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-ac7722e8b1ab88fe.js +0 -1
  367. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-f8d518d024e7b5c8.js +0 -1
  368. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
  369. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
  370. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
  371. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
  372. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/600-705fe234320ec5de.js +0 -1
  373. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
  374. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-a1584445357a276c.js +0 -1
  375. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-0d582a6ca33c3dfa.js +0 -1
  376. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
  377. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/90-a7308bae028d7001.js +0 -1
  378. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
  379. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
  380. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-334e7db5c84cb4ea.js +0 -1
  381. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
  382. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-419775ca1293b354.js +0 -1
  383. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
  384. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
  385. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-b35d37bfba8fbccc.js +0 -1
  386. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
  387. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
  388. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
  389. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-ef680455ae54ccbe.js +0 -1
  390. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
  391. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
  392. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +0 -1
  393. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
  394. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
  395. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
  396. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
  397. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
  398. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
  399. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
  400. mage_ai/server/frontend_dist_base_path_template/_next/static/uPDjJYpJMst1q6psbRyte/_buildManifest.js +0 -1
  401. /mage_ai/server/frontend_dist/_next/static/{9jB4XPuz6BzxBcG9VNao5 → xxcdnITr3IkTdETH5ghqw}/_ssgManifest.js +0 -0
  402. /mage_ai/server/frontend_dist_base_path_template/_next/static/{uPDjJYpJMst1q6psbRyte → gDn6inKdLyj35NvURBSCV}/_ssgManifest.js +0 -0
  403. {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/LICENSE +0 -0
  404. {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/entry_points.txt +0 -0
  405. {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6990],{54750:function(n,e,t){var o=t(82394),r=t(12691),i=t.n(r),c=t(55485),a=t(48670),u=t(38276),d=t(30160),l=t(72473),s=t(28598),p=t(82684);function f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function h(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}e.Z=function(n){var e=n.breadcrumbs,t=n.noMarginLeft,o=e.length,r=[];return e.forEach((function(n,e){var c=n.bold,f=n.danger,b=n.label,g=n.linkProps,m=n.monospace,v=void 0===m||m,y=n.onClick,x=b();o>=2&&e>=1&&r.push((0,s.jsx)(u.Z,{mx:1,children:(0,s.jsx)(l._Q,{muted:!0})},"divider-".concat(x)));var O=(0,s.jsx)(d.ZP,{bold:c,danger:f,default:!c,monospace:v,children:x}),P=(0,s.jsx)(u.Z,{ml:t||0!==e?0:2,children:O},"breadcrumb-".concat(x));g?P=(0,p.createElement)(i(),h(h({},g),{},{key:"breadcrumb-link-".concat(x),passHref:!0}),(0,s.jsx)(a.Z,{block:!0,default:!c,noOutline:!0,sameColorAsText:c,children:P})):y&&(P=(0,s.jsx)(a.Z,{block:!0,default:!c,noOutline:!0,onClick:y,preventDefault:!0,sameColorAsText:c,children:P})),r.push(P)})),(0,s.jsx)(c.ZP,{alignItems:"center",children:r})}},46684:function(n,e,t){t.d(e,{I5:function(){return u},Mz:function(){return a},y7:function(){return c}});var o=t(38626),r=t(44897),i=t(70515),c=2.5*i.iI,a=6*i.iI,u=o.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-1bk8irg-0"})(["height:","px;left:0;padding-left:","px;padding-right:","px;position:fixed;top:0;width:100%;z-index:10;",""],a,2*i.iI,2*i.iI,(function(n){return"\n background-color: ".concat((n.theme.background||r.Z.background).panel,";\n border-bottom: 1px solid ").concat((n.theme.borders||r.Z.borders).medium,";\n ")}))},58036:function(n,e,t){var o=t(82684),r=t(28598);e.Z=function(n){var e=n.children,t=(0,o.useState)(!1),i=t[0],c=t[1];return(0,o.useEffect)((function(){c(!0)}),[]),i?e:(0,r.jsx)("div",{})}},89370:function(n,e,t){t.d(e,{P_:function(){return c},RL:function(){return r},Rp:function(){return a}});var o,r,i=t(82394);!function(n){n.CATEGORY="category",n.CATEGORY_HIGH_CARDINALITY="category_high_cardinality",n.DATETIME="datetime",n.EMAIL="email",n.LIST="list",n.NUMBER="number",n.NUMBER_WITH_DECIMALS="number_with_decimals",n.PHONE_NUMBER="phone_number",n.TEXT="text",n.TRUE_OR_FALSE="true_or_false",n.UUID="uuid",n.ZIP_CODE="zip_code"}(r||(r={}));r.NUMBER,r.NUMBER_WITH_DECIMALS,r.NUMBER,r.NUMBER_WITH_DECIMALS,r.DATETIME,r.NUMBER,r.NUMBER_WITH_DECIMALS,r.CATEGORY,r.CATEGORY_HIGH_CARDINALITY,r.DATETIME,r.EMAIL,r.PHONE_NUMBER,r.TEXT,r.TRUE_OR_FALSE,r.CATEGORY,r.CATEGORY_HIGH_CARDINALITY,r.DATETIME,r.EMAIL,r.PHONE_NUMBER,r.TEXT;var c=[r.CATEGORY,r.CATEGORY_HIGH_CARDINALITY],a=(o={},(0,i.Z)(o,r.NUMBER,"Number"),(0,i.Z)(o,r.NUMBER_WITH_DECIMALS,"Decimal number"),(0,i.Z)(o,r.CATEGORY,"Category"),(0,i.Z)(o,r.CATEGORY_HIGH_CARDINALITY,"Category (high cardinality)"),(0,i.Z)(o,r.DATETIME,"Date/Time"),(0,i.Z)(o,r.EMAIL,"Email"),(0,i.Z)(o,r.LIST,"List"),(0,i.Z)(o,r.PHONE_NUMBER,"Phone number"),(0,i.Z)(o,r.TEXT,"Text"),(0,i.Z)(o,r.TRUE_OR_FALSE,"Boolean"),(0,i.Z)(o,r.ZIP_CODE,"Zip code"),o)},82359:function(n,e,t){var o,r;t.d(e,{d:function(){return o},k:function(){return r}}),function(n){n.ADD_NEW_BLOCK_V2="add_new_block_v2",n.COMPUTE_MANAGEMENT="compute_management",n.DATA_INTEGRATION_IN_BATCH_PIPELINE="data_integration_in_batch_pipeline",n.GLOBAL_HOOKS="global_hooks",n.INTERACTIONS="interactions",n.NOTEBOOK_BLOCK_OUTPUT_SPLIT_VIEW="notebook_block_output_split_view",n.LOCAL_TIMEZONE="display_local_timezone",n.OPERATION_HISTORY="operation_history"}(o||(o={})),function(n){n.MAIN="main",n.STANDALONE="standalone",n.SUB="sub"}(r||(r={}))},70374:function(n,e,t){t.d(e,{Z:function(){return S}});var o=t(82394),r=t(82684),i=t(12691),c=t.n(i),a=t(34376),u=t(97618),d=t(55485),l=t(49130),s=t(38276),p=t(30160),f=t(12468),h=t(72473),b=t(38626),g=t(44897),m=t(42631),v=t(47041),y=t(70515),x=b.default.div.withConfig({displayName:"indexstyle__FlyoutMenuContainerStyle",componentId:"sc-1o7k6f4-0"})([""," position:absolute;max-height:","px;z-index:1;"," "," "," ",""],v.w5,58*y.iI,(function(n){return n.width&&"\n min-width: 0px;\n width: ".concat(n.width,"px;\n ")}),(function(n){var e=n.maxHeight;return e&&"\n max-height: ".concat(e,"px;\n overflow: auto;\n ")}),(function(n){return"\n box-shadow: ".concat((n.theme.shadow||g.Z.shadow).popup,";\n\n &:hover {\n background-color: ").concat((n.theme.interactive||g.Z.interactive).hoverBackground,";\n }\n ")}),(function(n){return n.roundedStyle&&"\n border: ".concat(m.YF,"px ").concat(m.M8," ").concat((n.theme||g.Z).borders.button,";\n border-radius: ").concat(m.n_,"px;\n\n div:first-child {\n border-top-left-radius: ").concat(m.n_,"px;\n border-top-right-radius: ").concat(m.n_,"px;\n }\n\n div:last-child {\n border-bottom-left-radius: ").concat(m.n_,"px;\n border-bottom-right-radius: ").concat(m.n_,"px;\n }\n ")})),O=b.default.div.withConfig({displayName:"indexstyle__TitleContainerStyle",componentId:"sc-1o7k6f4-1"})(["padding:","px;padding-bottom:0;"," ",""],y.iI,(function(n){return"\n background-color: ".concat((n.theme||g.Z).background.popup,";\n ")}),(function(n){return n.roundedStyle&&"\n background-color: ".concat((n.theme||g.Z).interactive.defaultBackground,";\n border-bottom: ").concat(m.YF,"px ").concat(m.M8," ").concat((n.theme||g.Z).borders.medium,";\n padding-bottom: ").concat(y.iI,"px;\n ")})),P=(0,b.css)(["justify-content:space-between;padding:","px;"," "," "," "," "," "," ",""],y.iI,(function(n){return n.largePadding&&"\n padding: ".concat(1.5*y.iI,"px;\n padding-right: ").concat(6*y.iI,"px;\n ")}),(function(n){return!n.disabled&&"\n &:hover {\n background-color: ".concat((n.theme.interactive||g.Z.interactive).hoverBackground,";\n cursor: pointer;\n }\n ")}),(function(n){return"\n background-color: ".concat((n.theme.background||g.Z.background).popup,";\n ")}),(function(n){return n.alternateBackground&&"\n background-color: ".concat((n.theme.interactive||g.Z.interactive).defaultBackground,";\n ")}),(function(n){return n.disabled&&"\n color: ".concat((n.theme.content||g.Z.content).disabled,";\n cursor: not-allowed;\n\n &:hover {\n color: ").concat((n.theme.content||g.Z.content).disabled,";\n }\n ")}),(function(n){return n.indent&&"\n padding-left: ".concat(2*y.iI,"px;\n ")}),(function(n){return n.highlighted&&"\n background-color: ".concat((n.theme.interactive||g.Z.interactive).hoverBackground,";\n ")})),k=b.default.div.withConfig({displayName:"indexstyle__LinkStyle",componentId:"sc-1o7k6f4-2"})(["",""],P),w=b.default.a.withConfig({displayName:"indexstyle__LinkAnchorStyle",componentId:"sc-1o7k6f4-3"})([""," display:block;"],P),j=t(39643),I=t(3314),T=t(44688),Z=t(28598);function _(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function E(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?_(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var C=4.5*y.iI;var S=function(n){var e,t,i=n.alternateBackground,b=n.customSubmenuHeights,g=n.disableKeyboardShortcuts,m=n.items,v=n.left,y=n.multipleConfirmDialogues,P=n.onClickCallback,_=n.open,S=n.parentRef,D=n.rightOffset,B=n.roundedStyle,N=n.setConfirmationAction,R=n.setConfirmationDialogueOpen,A=n.topOffset,M=void 0===A?0:A,H=n.uuid,L=n.width,U=(0,r.useState)([]),W=U[0],G=U[1],z=(0,r.useState)({}),F=z[0],K=z[1],Y=(0,r.useState)(0),V=Y[0],q=Y[1],X=(0,r.useState)(0),Q=X[0],$=X[1],J=(0,r.useState)(0),nn=J[0],en=J[1],tn=((null===S||void 0===S||null===(e=S.current)||void 0===e||null===(t=e.getBoundingClientRect)||void 0===t?void 0:t.call(e))||{}).height,on=(0,r.useRef)({}),rn=(0,r.useRef)(null),cn=(0,a.useRouter)(),an=(0,T.y)(),un=an.registerOnKeyDown,dn=an.unregisterOnKeyDown;return(0,r.useEffect)((function(){return function(){dn(H)}}),[dn,H]),un(H,(function(n,e,t){if(_)if(g)(0,I.j)(n);else{var o=W[0];if(e[j.kD])(0,I.j)(n),"undefined"===typeof o||o===m.length-1?G([0]):G([o+1]);else if(e[j.Bu])(0,I.j)(n),G("undefined"===typeof o||0===o?[m.length-1]:[o-1]);else if(e[j.Uq]&&"undefined"!==typeof o){var r,i=m[o];if(i)if(null!==i&&void 0!==i&&i.onClick)null===i||void 0===i||null===(r=i.onClick)||void 0===r||r.call(i);else if(null!==i&&void 0!==i&&i.linkProps){var c,a;cn.push(null===i||void 0===i||null===(c=i.linkProps)||void 0===c?void 0:c.href,null===i||void 0===i||null===(a=i.linkProps)||void 0===a?void 0:a.as)}null===P||void 0===P||P()}else null===m||void 0===m||m.forEach((function(n){var o=n.keyboardShortcutValidation;null===o||void 0===o||o({keyHistory:t,keyMapping:e})}))}}),[W,m,P,_,G]),(0,r.useEffect)((function(){_||G([])}),[_]),m?function n(e,t,a){var g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,m=arguments.length>4?arguments[4]:void 0;g+=1;var j=null===b||void 0===b?void 0:b.hasOwnProperty(t),I=j?null===b||void 0===b?void 0:b[t]:null,T=j?(null===b||void 0===b?void 0:b[t])-C:0;return(0,Z.jsx)(x,{maxHeight:I,roundedStyle:B,style:{display:a||F[t]?null:"none",left:"undefined"===typeof D&&(1===g?v||0:"100%"),right:1===g?D:null,top:(1===g?(tn||0)+M:(2===g?V:3===g?Q:nn)||0)-T},width:L,children:null===e||void 0===e?void 0:e.map((function(e,t){var a=e.beforeIcon,b=e.bold,v=e.disabled,x=e.items,j=e.indent,I=e.isGroupingTitle,T=e.keyTextGroups,_=e.label,C=e.leftAligned,S=e.linkProps,D=e.onClick,A=e.openConfirmationDialogue,M=e.tooltip,H=e.uuid;m.current[H]=(0,r.createRef)();var L=S?w:k,U=_();if(I)return(0,Z.jsxs)(O,{roundedStyle:B,children:["string"===typeof U&&(0,Z.jsx)(p.ZP,{bold:!0,muted:!0,noWrapping:!0,children:U}),"string"!==typeof U&&U]},H);var G=(0,Z.jsxs)(L,{alternateBackground:i||B,disabled:v,highlighted:W[0]===t,indent:j,largePadding:B,onClick:function(n){S||n.preventDefault(),A&&!v?(null===R||void 0===R||R(!y||H),null===N||void 0===N||N((function(){return D})),null===P||void 0===P||P()):D&&!v&&(null===D||void 0===D||D(),null===P||void 0===P||P())},onMouseEnter:function(){var n,e;if(K((function(n){return E(E({},n),{},(0,o.Z)({},H,!0))})),1===g)q((null===(n=m.current[H])||void 0===n||null===(e=n.current)||void 0===e?void 0:e.offsetTop)||0);else if(2===g){var t,r;$((null===(t=m.current[H])||void 0===t||null===(r=t.current)||void 0===r?void 0:r.offsetTop)||0)}else if(3===g){var i,c;en((null===(i=m.current[H])||void 0===i||null===(c=i.current)||void 0===c?void 0:c.offsetTop)||0)}},onMouseLeave:function(){K((function(n){return E(E({},n),{},(0,o.Z)({},H,!1))}))},ref:m.current[H],children:[(0,Z.jsxs)(d.ZP,{alignItems:"center",fullWidth:!0,justifyContent:C?"flex-start":"space-between",children:[(a||"string"===typeof U)&&(0,Z.jsxs)(u.Z,{alignItems:"center",children:[a&&(0,Z.jsxs)(Z.Fragment,{children:[a,(0,Z.jsx)(s.Z,{mr:1})]}),"string"===typeof U&&(0,Z.jsx)(p.ZP,{bold:b,disabled:v,noWrapping:!0,children:(0,Z.jsx)("div",{role:"menuitem",children:U})})]}),"string"!==typeof U&&U,x&&(0,Z.jsx)(s.Z,{ml:2,children:(0,Z.jsx)(h._Q,{})}),T&&(0,Z.jsx)(s.Z,{ml:4,ref:rn,children:(0,Z.jsx)(l.Z,{keyTextGroups:T})})]}),x&&n(x,H,!1,g,m)]},H);return M&&(G=(0,Z.jsx)(f.Z,{appearBefore:!0,block:!0,center:!0,description:M(),size:null,widthFitContent:!0,children:G})),S?(0,r.createElement)(c(),E(E({},S),{},{key:H,passHref:!0}),G):G}))})}(m,void 0,_,0,on):null}},12468:function(n,e,t){t.d(e,{Z:function(){return E}});var o=t(82394),r=t(26304),i=t(82684),c=t(38626),a=t(55485),u=t(30160),d=t(44897),l=t(42631),s=t(70515),p=t(71180),f=t(91437),h=t(28598),b=(0,c.css)(["position:static;"," "," "," ",""],(function(n){return n.relativePosition&&"\n position: relative;\n "}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return n.size&&"\n height: ".concat(n.size,"px;\n ")}),(function(n){return n.fullSize&&"\n height: 100%;\n "})),g=c.default.div.withConfig({displayName:"TooltipWrapper__ContainerStyle",componentId:"sc-1dd57l8-0"})(["",""],b),m=c.default.span.withConfig({displayName:"TooltipWrapper__ContainerSpanStyle",componentId:"sc-1dd57l8-1"})(["",""],b),v=c.default.div.withConfig({displayName:"TooltipWrapper__HoverStyle",componentId:"sc-1dd57l8-2"})([""," "," "," border-radius:50%;"," "," &:active,&:focus{outline:none;}"," ",""],(0,f.eR)(),(function(n){return n.size&&"\n height: ".concat(n.size,"px;\n width: ").concat(n.size,"px;\n ")}),(function(n){return n.fullSize&&"\n height: 100%;\n width: 100%;\n "}),(function(n){return!n.block&&"\n display: inline-block;\n "}),(function(n){return n.block&&"\n display: block;\n "}),(function(n){return n.noHoverOutline&&"\n &:hover {\n cursor: pointer;\n }\n "}),(function(n){return!n.noHoverOutline&&"\n &:hover {\n cursor: pointer;\n\n box-shadow:\n 0 0 0 ".concat(l.PV,"px ").concat((0,p.W5)(n),",\n 0 0 0 ").concat(l.PV+l.q2,"px ").concat((n.theme.interactive||d.Z.interactive).hoverOverlay,";\n }\n ")})),y=c.default.span.withConfig({displayName:"TooltipWrapper__BasicStyle",componentId:"sc-1dd57l8-3"})([""]),x=c.default.div.withConfig({displayName:"TooltipWrapper__ContentStyle",componentId:"sc-1dd57l8-4"})(["position:absolute;z-index:3;"," "," "," "," "," "," "," "," "," "," ",""],(function(n){return"\n box-shadow: ".concat((n.theme.shadow||d.Z.shadow).base,";\n ")}),(function(n){return n.lightBackground&&"\n box-shadow: ".concat((n.theme.shadow||d.Z.shadow).window,";\n ")}),(function(n){return n.appearAbove&&!n.size&&"\n bottom: 0;\n "}),(function(n){return n.appearAbove&&n.size&&"\n bottom: ".concat(n.size+l.PV+l.q2,"px;\n ")}),(function(n){return n.appearBefore&&"\n right: ".concat(2*s.iI,"px;\n ")}),(function(n){return n.leftPosition&&"\n left: ".concat(n.leftPosition,"px;\n ")}),(function(n){return!n.leftPosition&&n.rightPosition&&"\n right: 0px;\n "}),(function(n){return n.minWidth&&"\n min-width: ".concat(n.minWidth,"px;\n ")}),(function(n){return n.widthFitContent&&"\n width: max-content;\n "}),(function(n){return n.topOffset&&"\n top: ".concat(n.topOffset,"px;\n ")}),(function(n){return n.bottomOffset&&"\n bottom: ".concat(n.bottomOffset,"px;\n ")}));var O=function(n){var e=n.alignLeft,t=n.appearAbove,o=n.appearBefore,r=n.autoHide,c=n.autoWidth,a=n.basic,u=n.block,d=n.bottomOffset,l=n.center,p=n.children,f=n.content,b=n.forceVisible,O=void 0!==b&&b,P=n.fullSize,k=n.height,w=n.inline,j=n.lightBackground,I=n.minWidth,T=n.noHoverOutline,Z=n.relativePosition,_=n.size,E=void 0===_?2*s.iI:_,C=n.topOffset,S=n.visibleDelay,D=void 0===S?1e3:S,B=n.widthFitContent,N=(0,i.useState)(!1),R=N[0],A=N[1],M=(0,i.useState)(!1),H=M[0],L=M[1],U=(I-E)/-2,W=w?m:g,G=a?y:v,z=(0,h.jsx)(G,{block:u,fullSize:P,href:"#",noHoverOutline:T,onClick:function(n){return n.preventDefault()},onMouseEnter:function(){return A(!0)},size:E,children:p});return(0,i.useEffect)((function(){var n=setInterval((function(){return L(!0)}),D);return R||clearInterval(n),r&&setTimeout((function(){A(!1),L(!1)}),3*D),function(){return clearInterval(n)}}),[r,L,D,R]),(0,h.jsxs)(W,{fullSize:P,height:k,onMouseLeave:function(){A(!1),L(!1)},relativePosition:Z,size:E,children:[z,(H||O)&&(0,h.jsx)(x,{appearAbove:t,appearBefore:o,bottomOffset:d,leftPosition:l?U:null,lightBackground:j,minWidth:c?I:null,rightPosition:e,size:E,topOffset:C,widthFitContent:B,children:f})]})},P=t(72473),k=["autoWidth","children","default","description","inverted","keyboardShortcuts","label","lightBackground","maxWidth","muted","primary","size","warning","widthFitContent"];function w(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function j(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?w(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var I=42*s.iI,T=(0,c.css)(["border-radius:","px;"," "," "," ",""],l.BG,(function(n){return"\n box-shadow: ".concat((n.theme.shadow||d.Z.shadow).popup,";\n background-color: ").concat((n.theme.background||d.Z.background).popup,";\n ")}),(function(n){return n.lightBackground&&"\n background-color: ".concat((n.theme.interactive||d.Z.interactive).defaultBackground,";\n ")}),(function(n){return n.width&&!(n.widthFitContent||n.autoWidth)&&"\n width: ".concat(n.width,"px;\n ")}),(function(n){return!n.width&&!(n.widthFitContent||n.autoWidth)&&"\n width: ".concat(I,"px;\n ")})),Z=c.default.div.withConfig({displayName:"Tooltip__LabelStyle",componentId:"sc-allmdq-0"})([""," padding:","px ","px;"],T,.75*s.iI,1*s.iI),_=c.default.div.withConfig({displayName:"Tooltip__DescriptionStyle",componentId:"sc-allmdq-1"})([""," padding:","px ","px;"],T,1.5*s.iI,2*s.iI);var E=function(n){var e=n.autoWidth,t=n.children,o=n.default,c=n.description,d=n.inverted,l=n.keyboardShortcuts,p=n.label,f=n.lightBackground,b=n.maxWidth,g=n.muted,m=n.primary,v=n.size,y=void 0===v?2*s.iI:v,x=n.warning,w=n.widthFitContent,T=(0,r.Z)(n,k),E=c||p||"",C=c?_:Z,S=Math.min(b||I,E.length*s.Fo),D=[];null===l||void 0===l||l.forEach((function(n,e){e>=1&&D.push((0,h.jsx)(u.ZP,{default:!0,children:"+"})),D.push(n)}));var B=D.map((function(n,e){var t="keyboard-shortcut-".concat(e);return"string"===typeof n?(0,h.jsx)("span",{children:n},t):i.cloneElement(n,{key:t})}));return(0,h.jsx)(O,j(j({},T),{},{autoWidth:e,content:(0,h.jsx)(C,{autoWidth:e,lightBackground:f,width:b,widthFitContent:w,children:(0,h.jsxs)(a.ZP,{alignItems:"center",children:[(0,h.jsx)(u.ZP,{whiteSpaceNormal:!0,children:E}),B.length>=1&&(0,h.jsx)(u.ZP,{muted:!0,children:"\xa0\xa0\xa0\u2022\xa0\xa0\xa0"}),B.length>=1&&B]})}),lightBackground:f,minWidth:S,noHoverOutline:!!t,size:y,widthFitContent:w,children:t||(0,h.jsx)(P.kI,{default:o,inverted:d,muted:g,primary:m,size:y,warning:x})}))}},93369:function(n,e,t){t.d(e,{ZP:function(){return on}});var o=t(82394),r=t(26304),i=t(82684),c=t(12691),a=t.n(c),u=t(38626),d=t(97618),l=t(49130),s=t(34376),p=t(50178);function f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function h(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function b(){var n,e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h(h({},t),{},{groupId:null===(n=(0,p.ex)())||void 0===n?void 0:n.id,id:null===(e=(0,p.PR)())||void 0===e?void 0:e.id})}var g=t(75582),m=t(39421),v=t(39487);function y(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function x(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?y(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function O(){return[[v.go,"initialAsPath"],[v.iT,"initialPathname"],[v.FT,"notificationTemplate"],[v.Ll,"notificationUUID"],[v.$m,"referringURL"]].reduce((function(n,e){var t=(0,g.Z)(e,2),r=t[0],i=t[1];return x(x({},n),{},(0,o.Z)({},i,m.Z.get(r,v.vZ)))}),{})}var P=t(63055);function k(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function w(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?k(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var j="click",I="button";function T(n){var e,t,o=n.actionName,r=n.actionType,i=n.componentName,c=n.componentType,a=n.properties,u=n.screenName,d=(e=o||r,t=i||c,"".concat(u,".").concat(e,"_").concat(t)),l=function(){var n,e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=O(),r=(null!==t&&void 0!==t&&t.width,window.innerWidth);return w(w(w({},t),o),{},{groupId:null===(n=(0,p.ex)())||void 0===n?void 0:n.id,partner_id:"Mage",screenSize:(0,P.Z3)(r),userId:null===(e=(0,p.PR)())||void 0===e?void 0:e.id})}(w({actionType:r,componentType:c},a));return{eventProperties:l,eventType:d,userProperties:b()}}function Z(n,e){null===n||void 0===n||n(e)}var _=function(n){var e=n.children;return n.eventProperties,n.userProperties,e((function(n){return!1}))},E=t(44688),C=t(28598);function S(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function D(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?S(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):S(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var B,N,R=function(n){var e,t=n.buildChildren,o=n.disabled,r=n.eventActionName,c=void 0===r?j:r,a=n.eventComponentName,u=void 0===a?I:a,d=n.eventProperties,l=void 0===d?{}:d,p=n.eventScreenName,f=void 0===p?"generic":p,h=n.keyboardShortcutValidation,b=n.linkProps,g=n.onClick,m=n.openNewTab,v=n.requireKeyUp,y=n.uuid,x=(0,s.useRouter)(),O=(0,E.y)(),P=O.registerOnKeyDown,k=O.registerOnKeyUp,w=O.unregisterOnKeyDown,S=O.unregisterOnKeyUp;(0,i.useEffect)((function(){return function(){var n=v?S:w;null===n||void 0===n||n(y)}}),[v,w,S,y]),o||!g&&!b||(e=function(n){null===g||void 0===g||g(n),b&&(m?(window.open(b.as||b.href),n.preventDefault()):x.push(b.href,b.as))});var B=T({actionName:c,actionType:j,componentName:u,componentType:I,properties:l,screenName:f}),N=B.eventType,R=B.eventProperties,A=B.userProperties;return(0,C.jsx)(_,{eventProperties:R,userProperties:A,children:function(n){var o=n.logEvent;h&&e&&(v?k:P)(y,(function(n,t,r){h({keyHistory:r,keyMapping:t})&&(Z(o,N,{eventProperties:D(D({},R),{},{usedKeyboardShortcut:!0}),userProperties:A}),e(n))}),[R,N,o,e,A]);return t({eventProperties:R,eventType:N,logEvent:o,onClick:e,userProperties:A})}})},A={chatBubbleProps:null,graphicButtonProps:null,logoProps:null,mageImageUrl:null,mascotImageUrls:{base:null,castingSpell:null,chargingUp:null,thinking:null},sharedProps:null},M=i.createContext(A),H=M,L=t(38276),U=t(4190),W=t(44897),G=t(79633),z=t(42631),F=t(71180),K=t(95363),Y=t(61896),V=t(48670),q=t(70515),X=t(91437),Q=["Icon","afterElement","beforeElement","bold","borderless","centerText","children","compact","disabled","fitContentWidth","inverted","keyTextGroups","keyTextsPosition","linkProps","loading","mutedDisabled","noHover","onClick","padding","smallIcon","type","useModelTheme"];function $(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function J(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?$(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):$(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}!function(n){n.LEFT="left",n.RIGHT="right"}(B||(B={})),function(n){n.BUTTON="button",n.SUBMIT="submit"}(N||(N={}));var nn=(0,u.css)([""," "," align-items:center;border:none;display:flex;flex-direction:row;position:relative;text-align:left;z-index:0;"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",""],(0,X.eR)(),F.MY,(function(n){return!n.large1&&!n.large2&&"\n ".concat(Y.iD,"\n ")}),(function(n){return n.small&&"\n ".concat(Y.HC,"\n ")}),(function(n){return n.large1&&"\n ".concat(Y.ln,"\n ")}),(function(n){return n.large2&&"\n ".concat(Y.QU,"\n ")}),(function(n){return!n.inline&&"\n width: 100%;\n "}),(function(n){return n.shortWidth&&"\n min-width: ".concat(28*q.iI,"px;\n ")}),(function(n){return!n.wrapText&&"\n white-space: nowrap;\n "}),(function(n){return n.outline&&!n.disabled&&"\n &:hover {\n box-shadow:\n 0 0 0 ".concat(z.PV,"px ").concat((n.theme||W.Z).background.panel,",\n 0 0 0 ").concat(z.PV+z.q2,"px ").concat((n.theme.interactive||W.Z.interactive).hoverOverlay,";\n }\n\n &:focus {\n box-shadow:\n 0 0 0 ").concat(z.PV,"px ").concat((n.theme||W.Z).background.panel,",\n 0 0 0 ").concat(z.PV+z.q2,"px ").concat((n.theme.interactive||W.Z.interactive).focusBorder,";\n }\n\n &:active {\n box-shadow: none;\n }\n ")}),(function(n){return!n.secondary&&"\n font-family: ".concat(K.ry,";\n justify-content: space-between;\n ")}),(function(n){return n.primary&&!n.disabled&&"\n background-color: ".concat((n.theme.interactive||W.Z.interactive).linkPrimary,";\n border-color: ").concat((n.theme.interactive||W.Z.interactive).linkPrimary,";\n color: ").concat((n.theme.monotone||W.Z.monotone).white,";\n\n &:hover,\n &:focus,\n &:active {\n background-color: ").concat((n.theme.interactive||W.Z.interactive).linkPrimaryHover," !important;\n border-color: ").concat((n.theme.interactive||W.Z.interactive).linkPrimary," !important;\n }\n ")}),(function(n){return n.center&&"\n justify-content: center;\n "}),(function(n){return!n.noPadding&&!n.spacious&&!n.compact&&"\n padding: ".concat(1.25*q.iI,"px ").concat(1.5*q.iI,"px;\n ")}),(function(n){return n.compact&&"\n padding: ".concat(.5*q.iI,"px ").concat(.75*q.iI,"px;\n ")}),(function(n){return n.withIcon&&"\n padding: ".concat(1.25*q.iI-1,"px;\n ")}),(function(n){return!n.noPadding&&!n.spacious&&n.paddingTop&&"\n padding-top: ".concat(n.paddingTop,"px;\n ")}),(function(n){return!n.noPadding&&!n.spacious&&n.halfPaddingTop&&"\n padding-top: ".concat(.625*q.iI,"px;\n ")}),(function(n){return!n.noPadding&&!n.spacious&&n.halfPaddingBottom&&"\n padding-bottom: ".concat(.625*q.iI,"px;\n ")}),(function(n){return!n.noPadding&&!n.spacious&&n.paddingBottom&&"\n padding-bottom: ".concat(n.paddingBottom,"px;\n ")}),(function(n){return!n.noPadding&&!n.spacious&&n.halfPaddingRight&&"\n padding-right: ".concat(.75*q.iI,"px;\n ")}),(function(n){return!n.noPadding&&!n.spacious&&n.halfPaddingLeft&&"\n padding-left: ".concat(.75*q.iI,"px;\n ")}),(function(n){return!n.noPadding&&n.spacious&&!n.marketing&&"\n padding: ".concat(2.25*q.iI,"px ").concat(3*q.iI,"px;\n ")}),(function(n){return!n.noPadding&&n.spacious&&n.marketing&&"\n padding: ".concat(2.25*q.iI-2,"px ").concat(3*q.iI-2,"px;\n ")}),(function(n){return!n.noPadding&&n.spacious&&n.halfPaddingTop&&"\n padding-top: ".concat(1.125*q.iI,"px;\n ")}),(function(n){return!n.noPadding&&n.spacious&&n.halfPaddingBottom&&"\n padding-bottom: ".concat(1.125*q.iI,"px;\n ")}),(function(n){return!n.noPadding&&n.spacious&&n.halfPaddingRight&&"\n padding-right: ".concat(1.5*q.iI,"px;\n ")}),(function(n){return!n.noPadding&&n.spacious&&n.halfPaddingLeft&&"\n padding-left: ".concat(1.5*q.iI,"px;\n ")}),(function(n){return n.secondary&&"\n flex-basis: content;\n font-family: ".concat(K.nF,";\n padding: 0;\n ")}),(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.bold&&"\n font-family: ".concat(K.nF,";\n ")}),(function(n){return!n.muted&&!n.inverted&&"\n color: ".concat((n.theme.content||W.Z.content).active,";\n ")}),(function(n){return!n.muted&&n.inverted&&"\n color: ".concat((n.theme.content||W.Z.content).inverted,";\n ")}),(function(n){return n.muted&&"\n color: ".concat((n.theme.monotone||W.Z.monotone).grey300,";\n ")}),(function(n){return n.warning&&"\n color: ".concat((n.theme.brand||W.Z.brand).energy400,";\n ")}),(function(n){return n.noHover&&"\n &:hover {\n cursor: default;\n }\n "}),(function(n){return n.greyBorder&&"\n border: ".concat(z.YF,"px ").concat(z.M8," ").concat((n.theme||W.Z).borders.button,";\n ")}),(function(n){return n.blackBorder&&"\n border: ".concat(z.YF,"px ").concat(z.M8," ").concat((n.theme.monotone||W.Z.monotone).black,";\n ")}),(function(n){return!n.pill&&!n.borderless&&!n.compact&&"\n border-radius: ".concat(z.n_,"px;\n ")}),(function(n){return n.compact&&"\n border-radius: ".concat(z.BG,"px;\n ")}),(function(n){return!n.borderRadiusLeft&&!n.borderRadiusRight&&n.pill&&!n.spacious&&"\n border-radius: ".concat(5*q.iI,"px;\n ")}),(function(n){return n.borderRadiusLeft&&n.pill&&!n.spacious&&"\n border-bottom-left-radius: ".concat(5*q.iI,"px;\n border-top-left-radius: ").concat(5*q.iI,"px;\n ")}),(function(n){return n.borderRadiusRight&&n.pill&&!n.spacious&&"\n border-bottom-right-radius: ".concat(5*q.iI,"px;\n border-top-right-radius: ").concat(5*q.iI,"px;\n ")}),(function(n){return n.borderRadiusLeft&&n.pill&&n.spacious&&"\n border-bottom-left-radius: ".concat(8*q.iI,"px;\n border-top-left-radius: ").concat(8*q.iI,"px;\n ")}),(function(n){return n.borderRadiusRight&&n.pill&&n.spacious&&"\n border-bottom-right-radius: ".concat(8*q.iI,"px;\n border-top-right-radius: ").concat(8*q.iI,"px;\n ")}),(function(n){return n.inverted&&!n.noBackground&&!n.backgroundColor&&"\n background-color: ".concat((n.theme.monotone||W.Z.monotone).black,";\n ")}),(function(n){return!n.inverted&&!n.noBackground&&!n.primary&&!n.noHover&&"\n background-color: ".concat((n.theme.interactive||W.Z.interactive).defaultBackground,";\n\n &:hover {\n background-color: ").concat((n.theme.interactive||W.Z.interactive).hoverBackground,";\n }\n ")}),(function(n){return!n.inverted&&!n.noBackground&&!n.primary&&n.noHover&&"\n background-color: ".concat((n.theme.interactive||W.Z.interactive).defaultBackground,";\n ")}),(function(n){return!n.noBackground&&n.backgroundColor&&"\n background-color: ".concat(n.backgroundColor,";\n ")}),(function(n){return n.noBackground&&"\n background-color: transparent !important;\n "}),(function(n){return n.disabled&&n.inverted&&"\n color: ".concat((n.theme.monotone||W.Z.monotone).grey400," !important;\n ")}),(function(n){return n.disabled&&!n.inverted&&"\n color: ".concat((n.theme.monotone||W.Z.monotone).grey300," !important;\n ")}),(function(n){return n.disabled&&"\n &:hover {\n cursor: not-allowed;\n }\n "}),(function(n){return n.selected&&"\n background-color: ".concat((n.theme.monotone||W.Z.monotone).black,";\n color: ").concat((n.theme.monotone||W.Z.monotone).white,";\n ")}),(function(n){return n.selected&&n.grey300&&"\n background-color: ".concat((n.theme.monotone||W.Z.monotone).grey300,";\n ")}),(function(n){return(n.selected||n.useModelTheme)&&n.fire&&"\n background-color: ".concat((n.theme.brand||W.Z.brand).fire400,";\n ")}),(function(n){return n.useModelTheme&&"\n color: ".concat((n.theme.monotone||W.Z.monotone).white,";\n ")}),(function(n){return(n.selected||n.useModelTheme)&&n.earth&&"\n background-color: ".concat((n.theme.brand||W.Z.brand).earth400,";\n ")}),(function(n){return n.primaryGradient&&"\n background: ".concat(G.uH," !important;\n ")}),(function(n){return n.background&&"\n background: ".concat(n.background," !important;\n ")}),(function(n){return(n.selected||n.useModelTheme)&&n.wind&&"\n background-color: ".concat((n.theme.brand||W.Z.brand).wind400,";\n\n &:hover,\n &:focus,\n &:active {\n background-color: ").concat((n.theme.brand||W.Z.brand).wind500,";\n }\n ")}),(function(n){return(n.selected||n.useModelTheme)&&n.water&&"\n background-color: ".concat((n.theme.brand||W.Z.brand).water400,";\n ")}),(function(n){return n.padding>0&&"\n padding: ".concat(n.padding,"px;\n ")}),(function(n){return n.shadow&&"\n box-shadow: ".concat((n.theme.shadow||W.Z.shadow).large,";\n ")})),en=u.default.button.withConfig({displayName:"KeyboardShortcutButton__ButtonStyle",componentId:"sc-10tm4pj-0"})(["",""],nn),tn=u.default.a.withConfig({displayName:"KeyboardShortcutButton__AnchorStyle",componentId:"sc-10tm4pj-1"})([""," ",""],nn,V.R);var on=function(n){var e=n.Icon,t=n.afterElement,c=n.beforeElement,u=n.bold,s=n.borderless,p=n.centerText,f=n.children,h=n.compact,b=n.disabled,g=n.fitContentWidth,m=n.inverted,v=n.keyTextGroups,y=n.keyTextsPosition,x=void 0===y?B.RIGHT:y,O=n.linkProps,P=n.loading,k=n.mutedDisabled,w=n.noHover,j=n.onClick,I=n.padding,T=n.smallIcon,_=n.type,E=void 0===_?N.BUTTON:_,S=n.useModelTheme,D=(0,r.Z)(n,Q),A=O||{},M=A.as,W=A.href,G=M||W?tn:en,z=(0,i.useMemo)((function(){if(!v)return null;var n=(0,o.Z)({},x===B.RIGHT?"ml":"mr",f?1:0);return(0,C.jsx)(L.Z,J(J({},n),{},{children:(0,C.jsx)(l.Z,{borderless:m,disabled:b,keyTextGroups:v,mutedDisabled:k})}))}),[f,b,m,v,x,k]),F=((0,i.useContext)(H)||{}).sharedProps;return(0,C.jsx)(R,J(J({},D),{},{buildChildren:function(n){var o=n.eventProperties,r=n.eventType,i=n.logEvent,l=n.onClick,v=n.userProperties,y=(0,C.jsxs)(G,J(J(J({},D),S?F:{}),{},{bold:S||u,borderless:S||s,center:p,compact:h,disabled:b||k,fitContentWidth:g,inverted:m,noHover:(!l||w)&&!(M||W)&&E===N.BUTTON,onClick:function(n){Z(i,r,{eventProperties:o,userProperties:v}),null===l||void 0===l||l(n)},padding:T&&!f?11:I,type:M||W?null:E,useModelTheme:S,withIcon:!!e,children:[c&&!P&&(0,C.jsxs)(C.Fragment,{children:[c,(0,C.jsx)(L.Z,{mr:1})]}),x===B.LEFT&&z,(0,C.jsxs)(d.Z,{alignItems:"center",children:[e&&(0,C.jsx)(e,{muted:b||k,size:T?2*q.iI:2.5*q.iI}),e&&f&&(0,C.jsx)(L.Z,{mr:1}),P&&(0,C.jsx)(U.Z,{inverted:!m,small:T}),!P&&f]}),x===B.RIGHT&&z&&(0,C.jsx)(L.Z,{ml:1,children:z}),t&&!P&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(L.Z,{ml:t?1:0}),t]})]}));return!M&&!W||b||k?y:(0,C.jsx)(a(),J(J({},O),{},{passHref:!0,children:y}))},disabled:b||k,linkProps:O,onClick:j}))}},16756:function(n,e,t){var o=t(82684),r=t(38626),i=t(30160),c=t(44897),a=t(42631),u=t(28598),d=(0,r.css)(["min-width:18px;padding-left:2px;padding-right:2px;"," "," "," "," "," ",""],(function(n){return!n.disabled&&"\n background-color: ".concat((n.theme.content||c.Z.content).inverted,";\n ")}),(function(n){return n.disabled&&"\n // background-color: ".concat((n.theme.monotone||c.Z.monotone).grey400," !important;\n ")}),(function(n){return n.mutedDisabled&&"\n opacity: 0.3;\n "}),(function(n){return!n.borderless&&"\n box-shadow: ".concat((n.theme.shadow||c.Z.shadow).tiny,";\n padding-bottom: 3px;\n padding-top: 3px;\n ")}),(function(n){return n.borderless&&"\n border-radius: ".concat(a.BG,"px;\n padding-bottom: 4px;\n padding-top: 4px;\n ")}),(function(n){return n.spacingLeft&&"\n margin-left: ".concat(n.spacingLeft,"px;\n ")})),l=r.default.kbd.withConfig({displayName:"KeyboardText__KbdStyle",componentId:"sc-18540m4-0"})(["",""],d),s=r.default.div.withConfig({displayName:"KeyboardText__DivStyle",componentId:"sc-18540m4-1"})(["",""],d);e.Z=function(n){var e=n.borderless,t=n.disabled,d=n.inline,p=n.keyText,f=n.monospace,h=n.mutedDisabled,b=n.spacingLeft,g=d?s:l,m=(0,o.useContext)(r.ThemeContext),v={};if(!e){var y,x;if(t)v.borderColor=null===(y=(null===m||void 0===m?void 0:m.monotone)||c.Z.monotone)||void 0===y?void 0:y.grey400;else v.borderColor=null===(x=(null===m||void 0===m?void 0:m.content)||c.Z.content)||void 0===x?void 0:x.active;v.borderRadius=a.BG,v.borderStyle="solid",v.borderWidth=1,v.overflow="hidden"}return(0,u.jsx)(i.ZP,{center:!0,inline:!0,monospace:f,muted:t||h,style:v,xsmall:!0,children:(0,u.jsx)(g,{borderless:e,disabled:t,mutedDisabled:h,spacingLeft:b,children:p})})}},49130:function(n,e,t){var o=t(38626),r=t(55485),i=t(16756),c=t(30160),a=t(70515),u=t(28598),d=o.default.div.withConfig({displayName:"KeyboardTextGroup__SpacingStyle",componentId:"sc-1bx41p7-0"})([""," "," ",""],(function(n){return n.small&&"\n margin-left: ".concat(.25*a.iI,"px;\n ")}),(function(n){return!n.small&&"\n margin-left: ".concat(.25*a.iI,"px;\n ")}),(function(n){return n.marginRight&&"\n margin-right: ".concat(.25*a.iI,"px;\n ")}));e.Z=function(n){var e=n.addPlusSignBetweenKeys,t=n.borderless,o=n.disabled,a=n.keyTextGroups,l=n.inline,s=n.monospace,p=n.mutedDisabled,f=n.small,h=n.uuidForKey,b=[],g=[];return a.forEach((function(n,r){var a=[];n.forEach((function(n,r){g.push(n),r>=1&&(a.push((0,u.jsx)(d,{small:f},"spacing-".concat(n))),e&&(a.push((0,u.jsx)(c.ZP,{disabled:o,monospace:s,small:f,children:"+"},"spacing-".concat(n,"-plus-sign"))),a.push((0,u.jsx)(d,{small:f},"spacing-".concat(n,"-after-plus-sign"))))),a.push((0,u.jsx)(i.Z,{borderless:t,disabled:o,inline:!0,keyText:n,monospace:s,mutedDisabled:p},"key-".concat(g.join("-"),"-").concat(h)))})),r>=1&&b.push((0,u.jsx)(d,{marginRight:!0,children:(0,u.jsx)(c.ZP,{monospace:s,muted:!0,small:!f,xsmall:f,children:"then"})},"then-".concat(r))),b.push.apply(b,a)})),(0,u.jsx)(r.ZP,{alignItems:"center",inline:l,children:b})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7022],{17022:function(e,n,i){var t=i(75582),r=i(82394),o=i(21764),s=i(82684),l=i(69864),c=i(34376),d=i(71180),u=i(70652),a=i(15338),E=i(97618),f=i(55485),m=i(85854),h=i(65956),I=i(28274),p=i(38276),x=i(75499),A=i(30160),v=i(17488),L=i(35686),g=i(8193),Z=i(72473),_=i(70515),j=i(24755),D=i(3917),b=i(76417),S=i(36717),P=i(86735),T=i(42122),R=i(72619),O=i(3314),k=i(28598);function C(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function y(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?C(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):C(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var N,B=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.USERS="Users"}(N||(N={})),n.Z=function(e){var n,i=e.contained,r=e.onCancel,C=e.slug,w=(0,c.useRouter)(),W=(0,s.useState)(!0),M=W[0],U=W[1],H=(0,s.useState)(null),Y=H[0],Q=H[1],V=(0,s.useState)({}),F=V[0],K=V[1],G=(0,s.useState)(null),q=G[0],z=G[1],$=(0,s.useCallback)((function(e,n,i){z(y(y({},e),{},{permissionsMapping:(0,P.HK)(n||[],(function(e){return e.id})),usersMapping:(0,P.HK)(i||[],(function(e){return e.id}))}))}),[z]),J=(0,s.useCallback)((function(e){K((function(n){return y(y({},n),e)})),z((function(n){return y(y({},n),e)}))}),[K,z]),X=L.ZP.roles.detail(C,{},{revalidateOnFocus:!1}).data,ee=(0,s.useMemo)((function(){return null===X||void 0===X?void 0:X.role}),[X]);(0,s.useEffect)((function(){ee&&$(ee,null===ee||void 0===ee?void 0:ee.role_permissions,null===ee||void 0===ee?void 0:ee.users)}),[$,ee]);var ne=(0,l.Db)(ee?L.ZP.roles.useUpdate(null===ee||void 0===ee?void 0:ee.id):L.ZP.roles.useCreate(),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(e){var n=e.role;K({}),$(n,null===n||void 0===n?void 0:n.role_permissions,null===n||void 0===n?void 0:n.users),ee||w.push("/settings/workspace/roles/".concat(null===n||void 0===n?void 0:n.id)),o.Am.success(ee?"Role successfully updated.":"New role created successfully.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:"role-mutate-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,t=n.exception,r=n.message,s=n.type;o.Am.error((null===i||void 0===i?void 0:i.error)||t||r,{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ie=(0,t.Z)(ne,2),te=ie[0],re=ie[1].isLoading,oe=(0,l.Db)(L.ZP.roles.useDelete(null===ee||void 0===ee?void 0:ee.id),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){w.push("/settings/workspace/roles"),o.Am.success("Role successfully delete.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:"role-delete-success-".concat(null===ee||void 0===ee?void 0:ee.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,t=n.exception,r=n.message,s=n.type;o.Am.error((null===i||void 0===i?void 0:i.error)||t||r,{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),se=(0,t.Z)(oe,2),le=se[0],ce=se[1].isLoading,de=L.ZP.permissions.list({_limit:1e3},{},{pauseFetch:!ee}).data,ue=(0,s.useMemo)((function(){return(0,P.YC)((null===de||void 0===de?void 0:de.permissions)||[],"entity_name")}),[de]),ae=(0,s.useMemo)((function(){return(null===q||void 0===q?void 0:q.permissionsMapping)||{}}),[q]),Ee=(0,s.useMemo)((function(){return(0,P.YC)(Object.values(ae),"entity_name")}),[ae]),fe=L.ZP.users.list({},{},{pauseFetch:!ee}).data,me=(0,s.useMemo)((function(){return(0,P.YC)((null===fe||void 0===fe?void 0:fe.users)||[],(function(e){return(0,b.s)(e)}))}),[fe]),he=(0,s.useMemo)((function(){return(null===q||void 0===q?void 0:q.usersMapping)||{}}),[q]),Ie=(0,s.useMemo)((function(){return(0,P.YC)(Object.values(he),(function(e){return(0,b.s)(e)}))}),[he]),pe=(0,s.useMemo)((function(){return(null===Ee||void 0===Ee?void 0:Ee.length)>=1}),[Ee]),xe=(0,s.useMemo)((function(){return(0,k.jsx)(d.ZP,{beforeIcon:(0,k.jsx)(Z.mm,{}),compact:!0,onClick:function(){Q(N.PERMISSIONS),U(!1)},primary:!pe,secondary:pe,small:!0,children:"Add permission"})}),[pe,Q,U]),Ae=(0,s.useMemo)((function(){return(null===Ie||void 0===Ie?void 0:Ie.length)>=1}),[Ie]),ve=(0,s.useMemo)((function(){return(0,k.jsx)(d.ZP,{beforeIcon:(0,k.jsx)(Z.mm,{}),compact:!0,onClick:function(){Q(N.USERS),U(!1)},primary:!Ae,secondary:Ae,small:!0,children:"Add user"})}),[Ae]),Le=(0,s.useCallback)((function(e,n){return(0,k.jsx)(x.Z,{columnFlex:[null,null,2,1,1,6],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===ae||void 0===ae?void 0:ae[n]}));return(0,k.jsx)(u.Z,{checked:n,onClick:function(i){(0,O.j)(i),J(n?{permissionsMapping:{}}:{permissionsMapping:(0,P.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/permissions/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,i=e.entity,t=e.entity_id,r=e.entity_name,o=e.entity_type,s=e.id,l=n?(0,S.q)(n):[],c=(null===l||void 0===l?void 0:l.length)||0,d=!(null===ae||void 0===ae||!ae[s]);return[(0,k.jsx)(u.Z,{checked:d,onClick:function(n){(0,O.j)(n);var i=y({},ae);d?null===i||void 0===i||delete i[s]:i[s]=e,J({permissionsMapping:i})}},"checkbox"),(0,k.jsx)(A.ZP,{default:!0,monospace:!0,children:s},"id"),(0,k.jsx)(A.ZP,{monospace:!0,children:r||i},"entityName"),(0,k.jsx)(A.ZP,{default:!0,monospace:!!o,children:o||"-"},"entityType"),(0,k.jsx)(A.ZP,{default:!0,monospace:!!t,children:t||"-"},"entityID"),(0,k.jsx)("div",{children:c>=1&&(0,k.jsx)(f.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===l||void 0===l?void 0:l.map((function(e,n){return(0,k.jsx)("div",{children:(0,k.jsxs)(A.ZP,{default:!0,monospace:!0,small:!0,children:[e,c>=2&&n<c-1&&(0,k.jsx)(A.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[ae,J]),ge=(0,s.useCallback)((function(e,n){return(0,k.jsx)(x.Z,{columnFlex:[null,1,1,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===he||void 0===he?void 0:he[n]}));return(0,k.jsx)(u.Z,{checked:n,onClick:function(i){(0,O.j)(i),J(n?{usersMapping:{}}:{usersMapping:(0,P.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/users/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.first_name,i=e.id,t=e.last_name,r=e.username,o=!(null===he||void 0===he||!he[i]);return[(0,k.jsx)(u.Z,{checked:o,onClick:function(n){(0,O.j)(n);var t=y({},he);o?null===t||void 0===t||delete t[i]:t[i]=e,J({usersMapping:t})}},"checkbox"),(0,k.jsx)(A.ZP,{children:r},"username"),(0,k.jsx)(A.ZP,{default:!0,children:n},"firstName"),(0,k.jsx)(A.ZP,{default:!0,children:t},"lastName")]})),uuid:"users"})}),[he,J]),Ze=(0,s.useMemo)((function(){return Le(ue)}),[Le,ue]),_e=(0,s.useMemo)((function(){return ge(me)}),[ge,me]),je=(0,s.useMemo)((function(){return Le(Ee,!0)}),[Le,Ee]),De=(0,s.useMemo)((function(){return ge(Ie,!0)}),[ge,Ie]),be=(0,k.jsxs)(g.N,{children:[(0,k.jsxs)(h.Z,{noPadding:!0,children:[(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsx)(m.Z,{level:4,children:"Role"})}),(0,k.jsx)(a.Z,{light:!0}),(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",children:[(0,k.jsxs)(A.ZP,{danger:"name"in F&&!(null!==q&&void 0!==q&&q.name),default:!0,large:!0,children:["Name ","name"in F&&!(null!==q&&void 0!==q&&q.name)&&(0,k.jsx)(A.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(E.Z,{flex:1,children:(0,k.jsx)(v.Z,{afterIcon:(0,k.jsx)(Z.I8,{}),afterIconClick:function(e,n){var i;null===n||void 0===n||null===(i=n.current)||void 0===i||i.focus()},afterIconSize:B,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return J({name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Archmage",value:(null===q||void 0===q?void 0:q.name)||""})})]})})]}),(0,k.jsx)(p.Z,{mb:_.HN}),ee&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(h.Z,{noPadding:!0,children:[(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,k.jsx)(m.Z,{level:4,children:"Permissions"}),(0,k.jsx)(p.Z,{mr:_.cd}),pe&&(0,k.jsx)(f.ZP,{alignItems:"center",children:xe})]})}),(0,k.jsx)(a.Z,{light:!0}),!pe&&(0,k.jsxs)(p.Z,{p:_.cd,children:[(0,k.jsx)(p.Z,{mb:_.cd,children:(0,k.jsx)(A.ZP,{default:!0,children:"This role currently has no permissions attached."})}),(0,k.jsx)(f.ZP,{alignItems:"center",children:xe})]}),pe&&(0,k.jsx)(p.Z,{pb:_.Mq,children:je})]}),(0,k.jsx)(p.Z,{mb:_.HN}),(0,k.jsxs)(h.Z,{noPadding:!0,children:[(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,k.jsx)(m.Z,{level:4,children:"Users"}),(0,k.jsx)(p.Z,{mr:_.cd}),Ae&&(0,k.jsx)(f.ZP,{alignItems:"center",children:ve})]})}),(0,k.jsx)(a.Z,{light:!0}),!Ae&&(0,k.jsxs)(p.Z,{p:_.cd,children:[(0,k.jsx)(p.Z,{mb:_.cd,children:(0,k.jsx)(A.ZP,{default:!0,children:"There are currently no users with this role."})}),(0,k.jsx)(f.ZP,{alignItems:"center",children:ve})]}),Ae&&(0,k.jsx)(p.Z,{pb:_.Mq,children:De})]}),(0,k.jsx)(p.Z,{mb:_.HN}),(0,k.jsxs)(h.Z,{noPadding:!0,children:[(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsx)(m.Z,{level:4,children:"Metadata"})}),(0,k.jsx)(a.Z,{light:!0}),(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",children:[(0,k.jsx)(A.ZP,{default:!0,large:!0,children:"Last updated"}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,k.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(null===q||void 0===q?void 0:q.updated_at)&&(0,D.d$)(null===q||void 0===q?void 0:q.updated_at,{includeSeconds:!0})}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(Z.Pf,{muted:!0,size:B}),(0,k.jsx)(p.Z,{mr:1})]})]})}),(0,k.jsx)(a.Z,{light:!0}),(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",children:[(0,k.jsx)(A.ZP,{default:!0,large:!0,children:"Created at"}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,k.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(null===q||void 0===q?void 0:q.created_at)&&(0,D.d$)(null===q||void 0===q?void 0:q.created_at,{includeSeconds:!0})}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(Z.Pf,{muted:!0,size:B}),(0,k.jsx)(p.Z,{mr:1})]})]})}),(0,k.jsx)(a.Z,{light:!0}),(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",children:[(0,k.jsx)(A.ZP,{default:!0,large:!0,children:"Created by"}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,k.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(0,b.s)(null===ee||void 0===ee?void 0:ee.user)}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(Z.SC,{muted:!0,size:B}),(0,k.jsx)(p.Z,{mr:1})]})]})})]}),(0,k.jsx)(p.Z,{mb:_.HN})]}),(0,k.jsxs)(f.ZP,{children:[(0,k.jsx)(d.ZP,{beforeIcon:(0,k.jsx)(Z.vc,{}),disabled:!F||!(null!==(n=Object.keys(F))&&void 0!==n&&n.length),loading:re,onClick:function(){return te({role:y(y({},(0,T.GL)(q,["name"],{include_blanks:!0})),{},{permission_ids:Object.keys((null===q||void 0===q?void 0:q.permissionsMapping)||{}).map((function(e){return Number(e)})),user_ids:Object.keys((null===q||void 0===q?void 0:q.usersMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:ee?"Save changes":"Create new role"}),r&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(d.ZP,{onClick:function(){return null===r||void 0===r?void 0:r()},secondary:!0,children:"Cancel and go back"})]}),ee&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(d.ZP,{beforeIcon:(0,k.jsx)(Z.rF,{}),danger:!0,loading:ce,onClick:function(){return le()},children:"Delete role"})]})]})]});return i?be:(0,k.jsx)(I.Z,{after:N.PERMISSIONS===Y?Ze:N.USERS===Y?_e:null,afterHeader:(0,k.jsx)(p.Z,{px:_.cd,children:(0,k.jsx)(A.ZP,{bold:!0,children:Y})}),afterHidden:M,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Roles"},linkProps:{href:"/settings/workspace/roles"}},{bold:!0,label:function(){return null===ee||void 0===ee?void 0:ee.name}}],hideAfterCompletely:!0,setAfterHidden:U,title:null!==ee&&void 0!==ee&&ee.name?"".concat(null===ee||void 0===ee?void 0:ee.name," role"):"New role",uuidItemSelected:j.B2.ROLES,uuidWorkspaceSelected:j.Pl.USER_MANAGEMENT,children:ee&&be})}},8193:function(e,n,i){i.d(n,{N:function(){return c},Z:function(){return l}});var t=i(38626),r=i(44897),o=i(42631),s=i(70515),l=2*s.iI,c=t.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],o.n_,s.cd*s.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))},36288:function(e,n,i){i.d(n,{Fy:function(){return m},G9:function(){return u},H1:function(){return h},K4:function(){return c},ND:function(){return d},Pt:function(){return a},WG:function(){return o},hl:function(){return f},m_:function(){return s},oO:function(){return E}});var t,r,o,s,l=i(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(o||(o={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(s||(s={}));var c=(t={},(0,l.Z)(t,o.OWNER,"Owner"),(0,l.Z)(t,o.ADMIN,"Admin"),(0,l.Z)(t,o.EDITOR,"Editor"),(0,l.Z)(t,o.VIEWER,"Viewer"),(0,l.Z)(t,o.LIST,"List"),(0,l.Z)(t,o.DETAIL,"Detail"),(0,l.Z)(t,o.CREATE,"Create"),(0,l.Z)(t,o.UPDATE,"Update"),(0,l.Z)(t,o.DELETE,"Delete"),(0,l.Z)(t,o.OPERATION_ALL,"All operations"),(0,l.Z)(t,o.QUERY,"Query"),(0,l.Z)(t,o.QUERY_ALL,"Query all attributes"),(0,l.Z)(t,o.READ,"Read"),(0,l.Z)(t,o.READ_ALL,"Read all attributes"),(0,l.Z)(t,o.WRITE,"Write"),(0,l.Z)(t,o.WRITE_ALL,"Write all attributes"),(0,l.Z)(t,o.ALL,"All"),(0,l.Z)(t,o.DISABLE_LIST,"Disable list"),(0,l.Z)(t,o.DISABLE_DETAIL,"Disable detail"),(0,l.Z)(t,o.DISABLE_CREATE,"Disable create"),(0,l.Z)(t,o.DISABLE_UPDATE,"Disable update"),(0,l.Z)(t,o.DISABLE_DELETE,"Disable delete"),(0,l.Z)(t,o.DISABLE_OPERATION_ALL,"Disable all operations"),(0,l.Z)(t,o.DISABLE_QUERY,"Disable query"),(0,l.Z)(t,o.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,l.Z)(t,o.DISABLE_READ,"Disable read"),(0,l.Z)(t,o.DISABLE_READ_ALL,"Disable all read attributes"),(0,l.Z)(t,o.DISABLE_WRITE,"Disable write"),(0,l.Z)(t,o.DISABLE_WRITE_ALL,"Disable all write attributes"),t),d=(r={},(0,l.Z)(r,s.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,l.Z)(r,s.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,l.Z)(r,s.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),r),u=[o.OWNER,o.ADMIN,o.EDITOR,o.VIEWER,o.ALL],a=[o.LIST,o.DETAIL,o.CREATE,o.UPDATE,o.DELETE,o.OPERATION_ALL],E=[o.DISABLE_LIST,o.DISABLE_DETAIL,o.DISABLE_CREATE,o.DISABLE_UPDATE,o.DISABLE_DELETE,o.DISABLE_OPERATION_ALL],f=[o.QUERY,o.QUERY_ALL,o.DISABLE_QUERY,o.DISABLE_QUERY_ALL],m=[o.READ,o.READ_ALL,o.DISABLE_READ,o.DISABLE_READ_ALL],h=[o.WRITE,o.WRITE_ALL,o.DISABLE_WRITE,o.DISABLE_WRITE_ALL]},65956:function(e,n,i){var t=i(38626),r=i(55485),o=i(38276),s=i(30160),l=i(44897),c=i(42631),d=i(47041),u=i(70515),a=i(28598),E=(0,t.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*u.iI,1.5*u.iI,1.5*u.iI),f=t.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||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||l.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||l.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=t.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||l.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),E,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),h=t.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*u.iI,d.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*u.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),I=t.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],c.M8,c.YF,1.75*u.iI);n.Z=function(e){var n=e.borderless,i=e.children,t=e.containerRef,l=e.contentContainerRef,c=e.dark,d=e.footer,u=e.fullHeight,E=void 0===u||u,p=e.fullWidth,x=void 0===p||p,A=e.header,v=e.headerHeight,L=e.headerIcon,g=e.headerPaddingVertical,Z=e.headerTitle,_=e.maxHeight,j=e.maxWidth,D=e.minWidth,b=e.noPadding,S=e.overflowVisible,P=e.subtitle,T=e.success;return(0,a.jsxs)(f,{borderless:n,dark:c,fullHeight:E,fullWidth:x,maxHeight:_,maxWidth:j,minWidth:D,overflowVisible:S,ref:t,success:T,children:[(A||Z)&&(0,a.jsxs)(m,{headerPaddingVertical:g,height:v,children:[A&&A,Z&&(0,a.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,a.jsxs)(r.ZP,{alignItems:"center",children:[L&&L,(0,a.jsx)(o.Z,{ml:L?1:0,children:(0,a.jsx)(s.ZP,{bold:!0,default:!0,children:Z})})]})})]}),(0,a.jsxs)(h,{maxHeight:_,noPadding:b,overflowVisible:S,ref:l,children:[P&&(0,a.jsx)(o.Z,{mb:2,children:(0,a.jsx)(s.ZP,{default:!0,children:P})}),i]}),d&&(0,a.jsx)(I,{children:d})]})}},36717:function(e,n,i){i.d(n,{q:function(){return o}});var t=i(75582),r=i(36288);function o(e){return Object.entries(r.K4).reduce((function(n,i){var r=(0,t.Z)(i,2),o=r[0],s=r[1];return e&Number(o)?n.concat(s):n}),[])}},76417:function(e,n,i){function t(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}i.d(n,{s:function(){return t}})}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7022],{17022:function(e,n,i){var t=i(75582),r=i(82394),o=i(21764),s=i(82684),l=i(69864),c=i(34376),d=i(71180),u=i(70652),a=i(15338),E=i(97618),f=i(55485),m=i(85854),h=i(65956),I=i(28274),p=i(38276),x=i(75499),A=i(30160),v=i(17488),L=i(35686),g=i(8193),Z=i(72473),_=i(70515),j=i(24755),D=i(3917),b=i(76417),S=i(36717),P=i(86735),T=i(42122),R=i(72619),O=i(3314),y=i(28598);function k(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function C(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var N,B=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.USERS="Users"}(N||(N={})),n.Z=function(e){var n,i=e.contained,r=e.onCancel,k=e.slug,w=(0,c.useRouter)(),W=(0,s.useState)(!0),M=W[0],U=W[1],H=(0,s.useState)(null),Y=H[0],Q=H[1],V=(0,s.useState)({}),F=V[0],K=V[1],G=(0,s.useState)(null),q=G[0],z=G[1],$=(0,s.useCallback)((function(e,n,i){z(C(C({},e),{},{permissionsMapping:(0,P.HK)(n||[],(function(e){return e.id})),usersMapping:(0,P.HK)(i||[],(function(e){return e.id}))}))}),[z]),J=(0,s.useCallback)((function(e){K((function(n){return C(C({},n),e)})),z((function(n){return C(C({},n),e)}))}),[K,z]),X=L.ZP.roles.detail(k,{},{revalidateOnFocus:!1}).data,ee=(0,s.useMemo)((function(){return null===X||void 0===X?void 0:X.role}),[X]);(0,s.useEffect)((function(){ee&&$(ee,null===ee||void 0===ee?void 0:ee.role_permissions,null===ee||void 0===ee?void 0:ee.users)}),[$,ee]);var ne=(0,l.Db)(ee?L.ZP.roles.useUpdate(null===ee||void 0===ee?void 0:ee.id):L.ZP.roles.useCreate(),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(e){var n=e.role;K({}),$(n,null===n||void 0===n?void 0:n.role_permissions,null===n||void 0===n?void 0:n.users),ee||w.push("/settings/workspace/roles/".concat(null===n||void 0===n?void 0:n.id)),o.Am.success(ee?"Role successfully updated.":"New role created successfully.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:"role-mutate-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,t=n.exception,r=n.message,s=n.type;o.Am.error((null===i||void 0===i?void 0:i.error)||t||r,{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ie=(0,t.Z)(ne,2),te=ie[0],re=ie[1].isLoading,oe=(0,l.Db)(L.ZP.roles.useDelete(null===ee||void 0===ee?void 0:ee.id),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){w.push("/settings/workspace/roles"),o.Am.success("Role successfully delete.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:"role-delete-success-".concat(null===ee||void 0===ee?void 0:ee.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,t=n.exception,r=n.message,s=n.type;o.Am.error((null===i||void 0===i?void 0:i.error)||t||r,{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),se=(0,t.Z)(oe,2),le=se[0],ce=se[1].isLoading,de=L.ZP.permissions.list({_limit:1e3},{},{pauseFetch:!ee}).data,ue=(0,s.useMemo)((function(){return(0,P.YC)((null===de||void 0===de?void 0:de.permissions)||[],"entity_name")}),[de]),ae=(0,s.useMemo)((function(){return(null===q||void 0===q?void 0:q.permissionsMapping)||{}}),[q]),Ee=(0,s.useMemo)((function(){return(0,P.YC)(Object.values(ae),"entity_name")}),[ae]),fe=L.ZP.users.list({},{},{pauseFetch:!ee}).data,me=(0,s.useMemo)((function(){return(0,P.YC)((null===fe||void 0===fe?void 0:fe.users)||[],(function(e){return(0,b.s)(e)}))}),[fe]),he=(0,s.useMemo)((function(){return(null===q||void 0===q?void 0:q.usersMapping)||{}}),[q]),Ie=(0,s.useMemo)((function(){return(0,P.YC)(Object.values(he),(function(e){return(0,b.s)(e)}))}),[he]),pe=(0,s.useMemo)((function(){return(null===Ee||void 0===Ee?void 0:Ee.length)>=1}),[Ee]),xe=(0,s.useMemo)((function(){return(0,y.jsx)(d.ZP,{beforeIcon:(0,y.jsx)(Z.mm,{}),compact:!0,onClick:function(){Q(N.PERMISSIONS),U(!1)},primary:!pe,secondary:pe,small:!0,children:"Add permission"})}),[pe,Q,U]),Ae=(0,s.useMemo)((function(){return(null===Ie||void 0===Ie?void 0:Ie.length)>=1}),[Ie]),ve=(0,s.useMemo)((function(){return(0,y.jsx)(d.ZP,{beforeIcon:(0,y.jsx)(Z.mm,{}),compact:!0,onClick:function(){Q(N.USERS),U(!1)},primary:!Ae,secondary:Ae,small:!0,children:"Add user"})}),[Ae]),Le=(0,s.useCallback)((function(e,n){return(0,y.jsx)(x.Z,{columnFlex:[null,null,2,1,1,6],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===ae||void 0===ae?void 0:ae[n]}));return(0,y.jsx)(u.Z,{checked:n,onClick:function(i){(0,O.j)(i),J(n?{permissionsMapping:{}}:{permissionsMapping:(0,P.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/permissions/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,i=e.entity,t=e.entity_id,r=e.entity_name,o=e.entity_type,s=e.id,l=n?(0,S.q)(n):[],c=(null===l||void 0===l?void 0:l.length)||0,d=!(null===ae||void 0===ae||!ae[s]);return[(0,y.jsx)(u.Z,{checked:d,onClick:function(n){(0,O.j)(n);var i=C({},ae);d?null===i||void 0===i||delete i[s]:i[s]=e,J({permissionsMapping:i})}},"checkbox"),(0,y.jsx)(A.ZP,{default:!0,monospace:!0,children:s},"id"),(0,y.jsx)(A.ZP,{monospace:!0,children:r||i},"entityName"),(0,y.jsx)(A.ZP,{default:!0,monospace:!!o,children:o||"-"},"entityType"),(0,y.jsx)(A.ZP,{default:!0,monospace:!!t,children:t||"-"},"entityID"),(0,y.jsx)("div",{children:c>=1&&(0,y.jsx)(f.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===l||void 0===l?void 0:l.map((function(e,n){return(0,y.jsx)("div",{children:(0,y.jsxs)(A.ZP,{default:!0,monospace:!0,small:!0,children:[e,c>=2&&n<c-1&&(0,y.jsx)(A.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[ae,J]),ge=(0,s.useCallback)((function(e,n){return(0,y.jsx)(x.Z,{columnFlex:[null,1,1,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===he||void 0===he?void 0:he[n]}));return(0,y.jsx)(u.Z,{checked:n,onClick:function(i){(0,O.j)(i),J(n?{usersMapping:{}}:{usersMapping:(0,P.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/users/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.first_name,i=e.id,t=e.last_name,r=e.username,o=!(null===he||void 0===he||!he[i]);return[(0,y.jsx)(u.Z,{checked:o,onClick:function(n){(0,O.j)(n);var t=C({},he);o?null===t||void 0===t||delete t[i]:t[i]=e,J({usersMapping:t})}},"checkbox"),(0,y.jsx)(A.ZP,{children:r},"username"),(0,y.jsx)(A.ZP,{default:!0,children:n},"firstName"),(0,y.jsx)(A.ZP,{default:!0,children:t},"lastName")]})),uuid:"users"})}),[he,J]),Ze=(0,s.useMemo)((function(){return Le(ue)}),[Le,ue]),_e=(0,s.useMemo)((function(){return ge(me)}),[ge,me]),je=(0,s.useMemo)((function(){return Le(Ee,!0)}),[Le,Ee]),De=(0,s.useMemo)((function(){return ge(Ie,!0)}),[ge,Ie]),be=(0,y.jsxs)(g.N,{children:[(0,y.jsxs)(h.Z,{noPadding:!0,children:[(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsx)(m.Z,{level:4,children:"Role"})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsxs)(A.ZP,{danger:"name"in F&&!(null!==q&&void 0!==q&&q.name),default:!0,large:!0,children:["Name ","name"in F&&!(null!==q&&void 0!==q&&q.name)&&(0,y.jsx)(A.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(E.Z,{flex:1,children:(0,y.jsx)(v.Z,{afterIcon:(0,y.jsx)(Z.I8,{}),afterIconClick:function(e,n){var i;null===n||void 0===n||null===(i=n.current)||void 0===i||i.focus()},afterIconSize:B,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return J({name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Archmage",value:(null===q||void 0===q?void 0:q.name)||""})})]})})]}),(0,y.jsx)(p.Z,{mb:_.HN}),ee&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(h.Z,{noPadding:!0,children:[(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,y.jsx)(m.Z,{level:4,children:"Permissions"}),(0,y.jsx)(p.Z,{mr:_.cd}),pe&&(0,y.jsx)(f.ZP,{alignItems:"center",children:xe})]})}),(0,y.jsx)(a.Z,{light:!0}),!pe&&(0,y.jsxs)(p.Z,{p:_.cd,children:[(0,y.jsx)(p.Z,{mb:_.cd,children:(0,y.jsx)(A.ZP,{default:!0,children:"This role currently has no permissions attached."})}),(0,y.jsx)(f.ZP,{alignItems:"center",children:xe})]}),pe&&(0,y.jsx)(p.Z,{pb:_.Mq,children:je})]}),(0,y.jsx)(p.Z,{mb:_.HN}),(0,y.jsxs)(h.Z,{noPadding:!0,children:[(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,y.jsx)(m.Z,{level:4,children:"Users"}),(0,y.jsx)(p.Z,{mr:_.cd}),Ae&&(0,y.jsx)(f.ZP,{alignItems:"center",children:ve})]})}),(0,y.jsx)(a.Z,{light:!0}),!Ae&&(0,y.jsxs)(p.Z,{p:_.cd,children:[(0,y.jsx)(p.Z,{mb:_.cd,children:(0,y.jsx)(A.ZP,{default:!0,children:"There are currently no users with this role."})}),(0,y.jsx)(f.ZP,{alignItems:"center",children:ve})]}),Ae&&(0,y.jsx)(p.Z,{pb:_.Mq,children:De})]}),(0,y.jsx)(p.Z,{mb:_.HN}),(0,y.jsxs)(h.Z,{noPadding:!0,children:[(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsx)(m.Z,{level:4,children:"Metadata"})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsx)(A.ZP,{default:!0,large:!0,children:"Last updated"}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,y.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(null===q||void 0===q?void 0:q.updated_at)&&(0,D.d$)(null===q||void 0===q?void 0:q.updated_at,{includeSeconds:!0})}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(Z.Pf,{muted:!0,size:B}),(0,y.jsx)(p.Z,{mr:1})]})]})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsx)(A.ZP,{default:!0,large:!0,children:"Created at"}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,y.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(null===q||void 0===q?void 0:q.created_at)&&(0,D.d$)(null===q||void 0===q?void 0:q.created_at,{includeSeconds:!0})}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(Z.Pf,{muted:!0,size:B}),(0,y.jsx)(p.Z,{mr:1})]})]})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsx)(A.ZP,{default:!0,large:!0,children:"Created by"}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,y.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(0,b.s)(null===ee||void 0===ee?void 0:ee.user)}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(Z.SC,{muted:!0,size:B}),(0,y.jsx)(p.Z,{mr:1})]})]})})]}),(0,y.jsx)(p.Z,{mb:_.HN})]}),(0,y.jsxs)(f.ZP,{children:[(0,y.jsx)(d.ZP,{beforeIcon:(0,y.jsx)(Z.vc,{}),disabled:!F||!(null!==(n=Object.keys(F))&&void 0!==n&&n.length),loading:re,onClick:function(){return te({role:C(C({},(0,T.GL)(q,["name"],{include_blanks:!0})),{},{permission_ids:Object.keys((null===q||void 0===q?void 0:q.permissionsMapping)||{}).map((function(e){return Number(e)})),user_ids:Object.keys((null===q||void 0===q?void 0:q.usersMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:ee?"Save changes":"Create new role"}),r&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(d.ZP,{onClick:function(){return null===r||void 0===r?void 0:r()},secondary:!0,children:"Cancel and go back"})]}),ee&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(d.ZP,{beforeIcon:(0,y.jsx)(Z.rF,{}),danger:!0,loading:ce,onClick:function(){return le()},children:"Delete role"})]})]})]});return i?be:(0,y.jsx)(I.Z,{after:N.PERMISSIONS===Y?Ze:N.USERS===Y?_e:null,afterHeader:(0,y.jsx)(p.Z,{px:_.cd,children:(0,y.jsx)(A.ZP,{bold:!0,children:Y})}),afterHidden:M,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Roles"},linkProps:{href:"/settings/workspace/roles"}},{bold:!0,label:function(){return null===ee||void 0===ee?void 0:ee.name}}],hideAfterCompletely:!0,setAfterHidden:U,title:null!==ee&&void 0!==ee&&ee.name?"".concat(null===ee||void 0===ee?void 0:ee.name," role"):"New role",uuidItemSelected:j.B2.ROLES,uuidWorkspaceSelected:j.Pl.USER_MANAGEMENT,children:ee&&be})}},8193:function(e,n,i){i.d(n,{N:function(){return c},Z:function(){return l}});var t=i(38626),r=i(44897),o=i(42631),s=i(70515),l=2*s.iI,c=t.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],o.n_,s.cd*s.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))},36288:function(e,n,i){i.d(n,{Fy:function(){return m},G9:function(){return u},H1:function(){return h},K4:function(){return c},ND:function(){return d},Pt:function(){return a},WG:function(){return o},hl:function(){return f},m_:function(){return s},oO:function(){return E}});var t,r,o,s,l=i(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(o||(o={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(s||(s={}));var c=(t={},(0,l.Z)(t,o.OWNER,"Owner"),(0,l.Z)(t,o.ADMIN,"Admin"),(0,l.Z)(t,o.EDITOR,"Editor"),(0,l.Z)(t,o.VIEWER,"Viewer"),(0,l.Z)(t,o.LIST,"List"),(0,l.Z)(t,o.DETAIL,"Detail"),(0,l.Z)(t,o.CREATE,"Create"),(0,l.Z)(t,o.UPDATE,"Update"),(0,l.Z)(t,o.DELETE,"Delete"),(0,l.Z)(t,o.OPERATION_ALL,"All operations"),(0,l.Z)(t,o.QUERY,"Query"),(0,l.Z)(t,o.QUERY_ALL,"Query all attributes"),(0,l.Z)(t,o.READ,"Read"),(0,l.Z)(t,o.READ_ALL,"Read all attributes"),(0,l.Z)(t,o.WRITE,"Write"),(0,l.Z)(t,o.WRITE_ALL,"Write all attributes"),(0,l.Z)(t,o.ALL,"All"),(0,l.Z)(t,o.DISABLE_LIST,"Disable list"),(0,l.Z)(t,o.DISABLE_DETAIL,"Disable detail"),(0,l.Z)(t,o.DISABLE_CREATE,"Disable create"),(0,l.Z)(t,o.DISABLE_UPDATE,"Disable update"),(0,l.Z)(t,o.DISABLE_DELETE,"Disable delete"),(0,l.Z)(t,o.DISABLE_OPERATION_ALL,"Disable all operations"),(0,l.Z)(t,o.DISABLE_QUERY,"Disable query"),(0,l.Z)(t,o.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,l.Z)(t,o.DISABLE_READ,"Disable read"),(0,l.Z)(t,o.DISABLE_READ_ALL,"Disable all read attributes"),(0,l.Z)(t,o.DISABLE_WRITE,"Disable write"),(0,l.Z)(t,o.DISABLE_WRITE_ALL,"Disable all write attributes"),t),d=(r={},(0,l.Z)(r,s.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,l.Z)(r,s.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,l.Z)(r,s.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),r),u=[o.OWNER,o.ADMIN,o.EDITOR,o.VIEWER,o.ALL],a=[o.LIST,o.DETAIL,o.CREATE,o.UPDATE,o.DELETE,o.OPERATION_ALL],E=[o.DISABLE_LIST,o.DISABLE_DETAIL,o.DISABLE_CREATE,o.DISABLE_UPDATE,o.DISABLE_DELETE,o.DISABLE_OPERATION_ALL],f=[o.QUERY,o.QUERY_ALL,o.DISABLE_QUERY,o.DISABLE_QUERY_ALL],m=[o.READ,o.READ_ALL,o.DISABLE_READ,o.DISABLE_READ_ALL],h=[o.WRITE,o.WRITE_ALL,o.DISABLE_WRITE,o.DISABLE_WRITE_ALL]},65956:function(e,n,i){var t=i(38626),r=i(55485),o=i(38276),s=i(30160),l=i(44897),c=i(42631),d=i(47041),u=i(70515),a=i(28598),E=(0,t.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*u.iI,1.5*u.iI,1.5*u.iI),f=t.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||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||l.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||l.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=t.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||l.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),E,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),h=t.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*u.iI,d.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*u.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),I=t.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],c.M8,c.YF,1.75*u.iI);n.Z=function(e){var n=e.borderless,i=e.children,t=e.containerRef,l=e.contentContainerRef,c=e.dark,d=e.footer,u=e.fullHeight,E=void 0===u||u,p=e.fullWidth,x=void 0===p||p,A=e.header,v=e.headerHeight,L=e.headerIcon,g=e.headerPaddingVertical,Z=e.headerTitle,_=e.maxHeight,j=e.maxWidth,D=e.minWidth,b=e.noPadding,S=e.overflowVisible,P=e.subtitle,T=e.success;return(0,a.jsxs)(f,{borderless:n,dark:c,fullHeight:E,fullWidth:x,maxHeight:_,maxWidth:j,minWidth:D,overflowVisible:S,ref:t,success:T,children:[(A||Z)&&(0,a.jsxs)(m,{headerPaddingVertical:g,height:v,children:[A&&A,Z&&(0,a.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,a.jsxs)(r.ZP,{alignItems:"center",children:[L&&L,(0,a.jsx)(o.Z,{ml:L?1:0,children:(0,a.jsx)(s.ZP,{bold:!0,default:!0,children:Z})})]})})]}),(0,a.jsxs)(h,{maxHeight:_,noPadding:b,overflowVisible:S,ref:l,children:[P&&"string"===typeof P&&(0,a.jsx)(o.Z,{mb:2,children:(0,a.jsx)(s.ZP,{default:!0,children:P})}),P&&"string"!==typeof P&&P,i]}),d&&(0,a.jsx)(I,{children:d})]})}},36717:function(e,n,i){i.d(n,{q:function(){return o}});var t=i(75582),r=i(36288);function o(e){return Object.entries(r.K4).reduce((function(n,i){var r=(0,t.Z)(i,2),o=r[0],s=r[1];return e&Number(o)?n.concat(s):n}),[])}},76417:function(e,n,i){function t(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}i.d(n,{s:function(){return t}})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7361],{8193:function(e,n,r){r.d(n,{N:function(){return d},Z:function(){return s}});var i=r(38626),t=r(44897),l=r(42631),o=r(70515),s=2*o.iI,d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],l.n_,o.cd*o.iI,(function(e){return"\n background-color: ".concat((e.theme.background||t.Z.background).codeArea,";\n ")}))},37361:function(e,n,r){var i=r(75582),t=r(82394),l=r(21764),o=r(82684),s=r(69864),d=r(34376),a=r(71180),c=r(70652),u=r(15338),f=r(97618),h=r(55485),g=r(85854),m=r(65956),x=r(28274),p=r(38276),E=r(75499),I=r(30160),v=r(17488),j=r(35686),Z=r(8193),A=r(72473),_=r(70515),L=r(24755),D=r(3917),S=r(76417),b=r(36717),P=r(50178),R=r(86735),T=r(42122),w=r(72619),C=r(3314),O=r(28598);function k(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,i)}return r}function B(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?k(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var y,N=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.ROLES="Roles"}(y||(y={})),n.Z=function(e){var n,r=e.contained,t=e.onCancel,k=e.slug,W=(0,P.PR)()||{},H=W.id,M=W.owner,U=(0,d.useRouter)(),Y=(0,o.useState)(!0),V=Y[0],z=Y[1],Q=(0,o.useState)(null),F=Q[0],q=Q[1],K=(0,o.useState)({}),G=K[0],J=K[1],$=(0,o.useState)(null),X=$[0],ee=$[1],ne=(0,o.useCallback)((function(e,n,r){ee(B(B({},e),{},{rolesMapping:(0,R.HK)(n||[],(function(e){return e.id})),permissionsMapping:(0,R.HK)(r||[],(function(e){return e.id}))}))}),[ee]),re=(0,o.useCallback)((function(e){J((function(n){return B(B({},n),e)})),ee((function(n){return B(B({},n),e)}))}),[J,ee]),ie=j.ZP.users.detail(k,{},{revalidateOnFocus:!1}).data,te=(0,o.useMemo)((function(){return null===ie||void 0===ie?void 0:ie.user}),[ie]);(0,o.useEffect)((function(){te&&ne(te,null===te||void 0===te?void 0:te.roles_new,null===te||void 0===te?void 0:te.permissions)}),[ne,te]);var le=(0,s.Db)(te?j.ZP.users.useUpdate(k):j.ZP.users.useCreate(),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(e){var n=e.user;J({}),ne(n,null===n||void 0===n?void 0:n.roles_new,null===n||void 0===n?void 0:n.permissions),te||U.push("/settings/workspace/users/".concat(null===n||void 0===n?void 0:n.id)),l.Am.success(te?"User profile successfully updated.":"New user created successfully.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,t=n.message,o=n.type;l.Am.error((null===r||void 0===r?void 0:r.error)||i||t,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),oe=(0,i.Z)(le,2),se=oe[0],de=oe[1].isLoading,ae=(0,s.Db)(j.ZP.users.useDelete(null===te||void 0===te?void 0:te.id),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){U.push("/settings/workspace/users"),l.Am.success("User successfully delete.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"user-delete-success-".concat(null===te||void 0===te?void 0:te.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,t=n.message,o=n.type;l.Am.error((null===r||void 0===r?void 0:r.error)||i||t,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),ce=(0,i.Z)(ae,2),ue=ce[0],fe=ce[1].isLoading,he=j.ZP.roles.list().data,ge=(0,o.useMemo)((function(){return(0,R.YC)((null===he||void 0===he?void 0:he.roles)||[],"name")}),[he]),me=(0,o.useMemo)((function(){return(null===X||void 0===X?void 0:X.rolesMapping)||{}}),[X]),xe=(0,o.useMemo)((function(){return(0,R.YC)(Object.values(me),"name")}),[me]),pe=j.ZP.permissions.list({_limit:1e3}).data,Ee=((0,o.useMemo)((function(){return(0,R.YC)((null===pe||void 0===pe?void 0:pe.permissions)||[],"entity_name")}),[pe]),(0,o.useMemo)((function(){return(null===X||void 0===X?void 0:X.permissionsMapping)||{}}),[X])),Ie=(0,o.useMemo)((function(){return(0,R.YC)(Object.values(Ee),"entity_name")}),[Ee]),ve=(0,o.useMemo)((function(){return(null===xe||void 0===xe?void 0:xe.length)>=1}),[xe]),je=(0,o.useMemo)((function(){return(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.mm,{}),compact:!0,onClick:function(){q(y.ROLES),z(!1)},primary:!ve,secondary:ve,small:!0,children:"Add roles"})}),[ve,q,z]),Ze=(0,o.useMemo)((function(){return(null===Ie||void 0===Ie?void 0:Ie.length)>=1}),[Ie]),Ae=((0,o.useMemo)((function(){return(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.mm,{}),compact:!0,onClick:function(){q(y.PERMISSIONS),z(!1)},primary:!Ze,secondary:Ze,small:!0,children:"Add permission"})}),[Ze,q,z]),(0,o.useCallback)((function(e,n){return(0,O.jsx)(E.Z,{columnFlex:[null,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===me||void 0===me?void 0:me[n]}));return(0,O.jsx)(c.Z,{checked:n,onClick:function(r){(0,C.j)(r),re(n?{rolesMapping:{}}:{rolesMapping:(0,R.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Role"}],onClickRow:n?function(n){var r=e[n];r&&window.open("/settings/workspace/roles/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.name,r=e.id,i=!(null===me||void 0===me||!me[r]);return[(0,O.jsx)(c.Z,{checked:i,onClick:function(n){(0,C.j)(n);var t=B({},me);i?null===t||void 0===t||delete t[r]:t[r]=e,re({rolesMapping:t})}},"checkbox"),(0,O.jsx)(I.ZP,{monospace:!0,children:n},"name")]})),uuid:"roles"})}),[me,re])),_e=(0,o.useCallback)((function(e,n){return(0,O.jsx)(E.Z,{columnFlex:[null,2,1,1,6],columns:[{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n?function(n){var r=e[n];r&&window.open("/settings/workspace/permissions/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,r=e.entity,i=e.entity_id,t=e.entity_name,l=e.entity_type,o=e.id,s=n?(0,b.q)(n):[],d=(null===s||void 0===s?void 0:s.length)||0;return[(0,O.jsx)(I.ZP,{default:!0,monospace:!0,children:o},"id"),(0,O.jsx)(I.ZP,{monospace:!0,children:t||r},"entityName"),(0,O.jsx)(I.ZP,{default:!0,monospace:!!l,children:l||"-"},"entityType"),(0,O.jsx)(I.ZP,{default:!0,monospace:!!i,children:i||"-"},"entityID"),(0,O.jsx)("div",{children:d>=1&&(0,O.jsx)(h.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===s||void 0===s?void 0:s.map((function(e,n){return(0,O.jsx)("div",{children:(0,O.jsxs)(I.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,O.jsx)(I.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[]),Le=(0,o.useMemo)((function(){return Ae(ge)}),[Ae,ge]),De=(0,o.useMemo)((function(){return Ae(xe,!0)}),[Ae,xe]),Se=(0,o.useMemo)((function(){return _e(Ie,!0)}),[_e,Ie]),be=(0,O.jsxs)(Z.N,{children:[(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Profile"})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Avatar"}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({avatar:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Add initials or an emoji",value:(null===X||void 0===X?void 0:X.avatar)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"username"in G&&!(null!==X&&void 0!==X&&X.username),default:!0,large:!0,children:["Username ","username"in G&&!(null!==X&&void 0!==X&&X.username)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({username:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Mage Supreme",value:(null===X||void 0===X?void 0:X.username)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"First name"}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({first_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Urza",value:(null===X||void 0===X?void 0:X.first_name)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Last name"}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({last_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Andromeda",value:(null===X||void 0===X?void 0:X.last_name)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[te&&(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Email"}),!te&&(0,O.jsxs)(I.ZP,{danger:"email"in G&&!(null!==X&&void 0!==X&&X.email),default:!0,large:!0,children:["Email ","email"in G&&!(null!==X&&void 0!==X&&X.email)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(p.Z,{mr:_.cd}),te&&(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,muted:!0,children:null===X||void 0===X?void 0:X.email}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(A.KJ,{muted:!0,size:N}),(0,O.jsx)(p.Z,{mr:1})]}),!te&&(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.KJ,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({email:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. mage@power.com",type:"email",value:(null===X||void 0===X?void 0:X.email)||""})})]})})]}),(0,O.jsx)(p.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Authentication"})}),(0,O.jsx)(u.Z,{light:!0}),te&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password_current"in G&&!(null!==X&&void 0!==X&&X.password_current),default:!0,large:!0,children:["Current password ","password_current"in G&&!(null!==X&&void 0!==X&&X.password_current)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password_current:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password_current)||""})})]})}),(0,O.jsx)(u.Z,{light:!0})]}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password"in G&&!(null!==X&&void 0!==X&&X.password),default:!0,large:!0,children:[te?"New password":"Password"," ","password"in G&&!(null!==X&&void 0!==X&&X.password)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password_confirmation"in G&&!(null!==X&&void 0!==X&&X.password_confirmation),default:!0,large:!0,children:["Confirm ",te?"new password":"password"," ","password_confirmation"in G&&!(null!==X&&void 0!==X&&X.password_confirmation)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password_confirmation:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password_confirmation)||""})})]})})]}),(0,O.jsx)(p.Z,{mb:_.HN}),te&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,O.jsx)(g.Z,{level:4,children:"Roles"}),(0,O.jsx)(p.Z,{mr:_.cd}),ve&&(0,O.jsx)(h.ZP,{alignItems:"center",children:je})]})}),(0,O.jsx)(u.Z,{light:!0}),!ve&&(0,O.jsxs)(p.Z,{p:_.cd,children:[(0,O.jsx)(p.Z,{mb:_.cd,children:(0,O.jsx)(I.ZP,{default:!0,children:"This user currently has no roles attached."})}),(0,O.jsx)(h.ZP,{alignItems:"center",children:je})]}),ve&&(0,O.jsx)(p.Z,{pb:_.Mq,children:De})]}),(0,O.jsx)(p.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsx)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,O.jsx)(g.Z,{level:4,children:"Permissions"})})}),(0,O.jsx)(u.Z,{light:!0}),!Ze&&(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsx)(I.ZP,{default:!0,children:"This user currently has no permissions."})}),Ze&&(0,O.jsx)(p.Z,{pb:_.Mq,children:Se})]}),(0,O.jsx)(p.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Metadata"})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Last updated"}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,monospace:!0,muted:!0,children:(null===X||void 0===X?void 0:X.updated_at)&&(0,D.d$)(null===X||void 0===X?void 0:X.updated_at,{includeSeconds:!0})}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(A.Pf,{muted:!0,size:N}),(0,O.jsx)(p.Z,{mr:1})]})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Created at"}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,monospace:!0,muted:!0,children:(null===X||void 0===X?void 0:X.created_at)&&(0,D.d$)(null===X||void 0===X?void 0:X.created_at,{includeSeconds:!0})}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(A.Pf,{muted:!0,size:N}),(0,O.jsx)(p.Z,{mr:1})]})]})})]}),(0,O.jsx)(p.Z,{mb:_.HN})]}),(0,O.jsxs)(h.ZP,{children:[(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.vc,{}),disabled:!G||!(null!==(n=Object.keys(G))&&void 0!==n&&n.length),loading:de,onClick:function(){return se({user:B(B({},(0,T.GL)(X,["avatar","first_name","last_name","password","password_confirmation","password_current","username"].concat(te?[]:"email"),{include_blanks:!0})),{},{role_ids:Object.keys((null===X||void 0===X?void 0:X.rolesMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:te?"Save changes":"Create new user"}),t&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(a.ZP,{onClick:function(){return null===t||void 0===t?void 0:t()},secondary:!0,children:"Cancel and go back"})]}),te&&String(H)!==String(k)&&M&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.rF,{}),danger:!0,loading:fe,onClick:function(){return ue()},children:"Delete user"})]})]})]});return r?be:(0,O.jsx)(x.Z,{after:Le,afterHeader:(0,O.jsx)(p.Z,{px:_.cd,children:(0,O.jsx)(I.ZP,{bold:!0,children:F})}),afterHidden:V,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Users"},linkProps:{href:"/settings/workspace/users"}},{bold:!0,label:function(){return(0,S.s)(X)}}],setAfterHidden:z,title:te?(0,S.s)(te):"New user",uuidItemSelected:L.B2.USERS,uuidWorkspaceSelected:L.Pl.USER_MANAGEMENT,children:te&&be})}},36288:function(e,n,r){r.d(n,{Fy:function(){return g},G9:function(){return c},H1:function(){return m},K4:function(){return d},ND:function(){return a},Pt:function(){return u},WG:function(){return l},hl:function(){return h},m_:function(){return o},oO:function(){return f}});var i,t,l,o,s=r(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(l||(l={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(o||(o={}));var d=(i={},(0,s.Z)(i,l.OWNER,"Owner"),(0,s.Z)(i,l.ADMIN,"Admin"),(0,s.Z)(i,l.EDITOR,"Editor"),(0,s.Z)(i,l.VIEWER,"Viewer"),(0,s.Z)(i,l.LIST,"List"),(0,s.Z)(i,l.DETAIL,"Detail"),(0,s.Z)(i,l.CREATE,"Create"),(0,s.Z)(i,l.UPDATE,"Update"),(0,s.Z)(i,l.DELETE,"Delete"),(0,s.Z)(i,l.OPERATION_ALL,"All operations"),(0,s.Z)(i,l.QUERY,"Query"),(0,s.Z)(i,l.QUERY_ALL,"Query all attributes"),(0,s.Z)(i,l.READ,"Read"),(0,s.Z)(i,l.READ_ALL,"Read all attributes"),(0,s.Z)(i,l.WRITE,"Write"),(0,s.Z)(i,l.WRITE_ALL,"Write all attributes"),(0,s.Z)(i,l.ALL,"All"),(0,s.Z)(i,l.DISABLE_LIST,"Disable list"),(0,s.Z)(i,l.DISABLE_DETAIL,"Disable detail"),(0,s.Z)(i,l.DISABLE_CREATE,"Disable create"),(0,s.Z)(i,l.DISABLE_UPDATE,"Disable update"),(0,s.Z)(i,l.DISABLE_DELETE,"Disable delete"),(0,s.Z)(i,l.DISABLE_OPERATION_ALL,"Disable all operations"),(0,s.Z)(i,l.DISABLE_QUERY,"Disable query"),(0,s.Z)(i,l.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,s.Z)(i,l.DISABLE_READ,"Disable read"),(0,s.Z)(i,l.DISABLE_READ_ALL,"Disable all read attributes"),(0,s.Z)(i,l.DISABLE_WRITE,"Disable write"),(0,s.Z)(i,l.DISABLE_WRITE_ALL,"Disable all write attributes"),i),a=(t={},(0,s.Z)(t,o.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,s.Z)(t,o.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,s.Z)(t,o.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),t),c=[l.OWNER,l.ADMIN,l.EDITOR,l.VIEWER,l.ALL],u=[l.LIST,l.DETAIL,l.CREATE,l.UPDATE,l.DELETE,l.OPERATION_ALL],f=[l.DISABLE_LIST,l.DISABLE_DETAIL,l.DISABLE_CREATE,l.DISABLE_UPDATE,l.DISABLE_DELETE,l.DISABLE_OPERATION_ALL],h=[l.QUERY,l.QUERY_ALL,l.DISABLE_QUERY,l.DISABLE_QUERY_ALL],g=[l.READ,l.READ_ALL,l.DISABLE_READ,l.DISABLE_READ_ALL],m=[l.WRITE,l.WRITE_ALL,l.DISABLE_WRITE,l.DISABLE_WRITE_ALL]},65956:function(e,n,r){var i=r(38626),t=r(55485),l=r(38276),o=r(30160),s=r(44897),d=r(42631),a=r(47041),c=r(70515),u=r(28598),f=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*c.iI,1.5*c.iI,1.5*c.iI),h=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||s.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||s.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||s.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||s.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||s.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 "})),g=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],d.n_,d.n_,(function(e){return"\n background-color: ".concat((e.theme.background||s.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||s.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),m=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*c.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*c.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),x=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],d.M8,d.YF,1.75*c.iI);n.Z=function(e){var n=e.borderless,r=e.children,i=e.containerRef,s=e.contentContainerRef,d=e.dark,a=e.footer,c=e.fullHeight,f=void 0===c||c,p=e.fullWidth,E=void 0===p||p,I=e.header,v=e.headerHeight,j=e.headerIcon,Z=e.headerPaddingVertical,A=e.headerTitle,_=e.maxHeight,L=e.maxWidth,D=e.minWidth,S=e.noPadding,b=e.overflowVisible,P=e.subtitle,R=e.success;return(0,u.jsxs)(h,{borderless:n,dark:d,fullHeight:f,fullWidth:E,maxHeight:_,maxWidth:L,minWidth:D,overflowVisible:b,ref:i,success:R,children:[(I||A)&&(0,u.jsxs)(g,{headerPaddingVertical:Z,height:v,children:[I&&I,A&&(0,u.jsx)(t.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,u.jsxs)(t.ZP,{alignItems:"center",children:[j&&j,(0,u.jsx)(l.Z,{ml:j?1:0,children:(0,u.jsx)(o.ZP,{bold:!0,default:!0,children:A})})]})})]}),(0,u.jsxs)(m,{maxHeight:_,noPadding:S,overflowVisible:b,ref:s,children:[P&&(0,u.jsx)(l.Z,{mb:2,children:(0,u.jsx)(o.ZP,{default:!0,children:P})}),r]}),a&&(0,u.jsx)(x,{children:a})]})}},36717:function(e,n,r){r.d(n,{q:function(){return l}});var i=r(75582),t=r(36288);function l(e){return Object.entries(t.K4).reduce((function(n,r){var t=(0,i.Z)(r,2),l=t[0],o=t[1];return e&Number(l)?n.concat(o):n}),[])}},76417:function(e,n,r){function i(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}r.d(n,{s:function(){return i}})}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7361],{8193:function(e,n,r){r.d(n,{N:function(){return d},Z:function(){return s}});var i=r(38626),t=r(44897),l=r(42631),o=r(70515),s=2*o.iI,d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],l.n_,o.cd*o.iI,(function(e){return"\n background-color: ".concat((e.theme.background||t.Z.background).codeArea,";\n ")}))},37361:function(e,n,r){var i=r(75582),t=r(82394),l=r(21764),o=r(82684),s=r(69864),d=r(34376),a=r(71180),c=r(70652),u=r(15338),f=r(97618),h=r(55485),g=r(85854),m=r(65956),p=r(28274),x=r(38276),E=r(75499),I=r(30160),v=r(17488),j=r(35686),Z=r(8193),A=r(72473),_=r(70515),L=r(24755),D=r(3917),S=r(76417),b=r(36717),P=r(50178),R=r(86735),T=r(42122),w=r(72619),C=r(3314),O=r(28598);function k(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,i)}return r}function B(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?k(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var y,N=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.ROLES="Roles"}(y||(y={})),n.Z=function(e){var n,r=e.contained,t=e.onCancel,k=e.slug,W=(0,P.PR)()||{},H=W.id,M=W.owner,U=(0,d.useRouter)(),Y=(0,o.useState)(!0),V=Y[0],z=Y[1],Q=(0,o.useState)(null),F=Q[0],q=Q[1],K=(0,o.useState)({}),G=K[0],J=K[1],$=(0,o.useState)(null),X=$[0],ee=$[1],ne=(0,o.useCallback)((function(e,n,r){ee(B(B({},e),{},{rolesMapping:(0,R.HK)(n||[],(function(e){return e.id})),permissionsMapping:(0,R.HK)(r||[],(function(e){return e.id}))}))}),[ee]),re=(0,o.useCallback)((function(e){J((function(n){return B(B({},n),e)})),ee((function(n){return B(B({},n),e)}))}),[J,ee]),ie=j.ZP.users.detail(k,{},{revalidateOnFocus:!1}).data,te=(0,o.useMemo)((function(){return null===ie||void 0===ie?void 0:ie.user}),[ie]);(0,o.useEffect)((function(){te&&ne(te,null===te||void 0===te?void 0:te.roles_new,null===te||void 0===te?void 0:te.permissions)}),[ne,te]);var le=(0,s.Db)(te?j.ZP.users.useUpdate(k):j.ZP.users.useCreate(),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(e){var n=e.user;J({}),ne(n,null===n||void 0===n?void 0:n.roles_new,null===n||void 0===n?void 0:n.permissions),te||U.push("/settings/workspace/users/".concat(null===n||void 0===n?void 0:n.id)),l.Am.success(te?"User profile successfully updated.":"New user created successfully.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,t=n.message,o=n.type;l.Am.error((null===r||void 0===r?void 0:r.error)||i||t,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),oe=(0,i.Z)(le,2),se=oe[0],de=oe[1].isLoading,ae=(0,s.Db)(j.ZP.users.useDelete(null===te||void 0===te?void 0:te.id),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){U.push("/settings/workspace/users"),l.Am.success("User successfully delete.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"user-delete-success-".concat(null===te||void 0===te?void 0:te.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,t=n.message,o=n.type;l.Am.error((null===r||void 0===r?void 0:r.error)||i||t,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),ce=(0,i.Z)(ae,2),ue=ce[0],fe=ce[1].isLoading,he=j.ZP.roles.list().data,ge=(0,o.useMemo)((function(){return(0,R.YC)((null===he||void 0===he?void 0:he.roles)||[],"name")}),[he]),me=(0,o.useMemo)((function(){return(null===X||void 0===X?void 0:X.rolesMapping)||{}}),[X]),pe=(0,o.useMemo)((function(){return(0,R.YC)(Object.values(me),"name")}),[me]),xe=j.ZP.permissions.list({_limit:1e3}).data,Ee=((0,o.useMemo)((function(){return(0,R.YC)((null===xe||void 0===xe?void 0:xe.permissions)||[],"entity_name")}),[xe]),(0,o.useMemo)((function(){return(null===X||void 0===X?void 0:X.permissionsMapping)||{}}),[X])),Ie=(0,o.useMemo)((function(){return(0,R.YC)(Object.values(Ee),"entity_name")}),[Ee]),ve=(0,o.useMemo)((function(){return(null===pe||void 0===pe?void 0:pe.length)>=1}),[pe]),je=(0,o.useMemo)((function(){return(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.mm,{}),compact:!0,onClick:function(){q(y.ROLES),z(!1)},primary:!ve,secondary:ve,small:!0,children:"Add roles"})}),[ve,q,z]),Ze=(0,o.useMemo)((function(){return(null===Ie||void 0===Ie?void 0:Ie.length)>=1}),[Ie]),Ae=((0,o.useMemo)((function(){return(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.mm,{}),compact:!0,onClick:function(){q(y.PERMISSIONS),z(!1)},primary:!Ze,secondary:Ze,small:!0,children:"Add permission"})}),[Ze,q,z]),(0,o.useCallback)((function(e,n){return(0,O.jsx)(E.Z,{columnFlex:[null,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===me||void 0===me?void 0:me[n]}));return(0,O.jsx)(c.Z,{checked:n,onClick:function(r){(0,C.j)(r),re(n?{rolesMapping:{}}:{rolesMapping:(0,R.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Role"}],onClickRow:n?function(n){var r=e[n];r&&window.open("/settings/workspace/roles/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.name,r=e.id,i=!(null===me||void 0===me||!me[r]);return[(0,O.jsx)(c.Z,{checked:i,onClick:function(n){(0,C.j)(n);var t=B({},me);i?null===t||void 0===t||delete t[r]:t[r]=e,re({rolesMapping:t})}},"checkbox"),(0,O.jsx)(I.ZP,{monospace:!0,children:n},"name")]})),uuid:"roles"})}),[me,re])),_e=(0,o.useCallback)((function(e,n){return(0,O.jsx)(E.Z,{columnFlex:[null,2,1,1,6],columns:[{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n?function(n){var r=e[n];r&&window.open("/settings/workspace/permissions/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,r=e.entity,i=e.entity_id,t=e.entity_name,l=e.entity_type,o=e.id,s=n?(0,b.q)(n):[],d=(null===s||void 0===s?void 0:s.length)||0;return[(0,O.jsx)(I.ZP,{default:!0,monospace:!0,children:o},"id"),(0,O.jsx)(I.ZP,{monospace:!0,children:t||r},"entityName"),(0,O.jsx)(I.ZP,{default:!0,monospace:!!l,children:l||"-"},"entityType"),(0,O.jsx)(I.ZP,{default:!0,monospace:!!i,children:i||"-"},"entityID"),(0,O.jsx)("div",{children:d>=1&&(0,O.jsx)(h.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===s||void 0===s?void 0:s.map((function(e,n){return(0,O.jsx)("div",{children:(0,O.jsxs)(I.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,O.jsx)(I.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[]),Le=(0,o.useMemo)((function(){return Ae(ge)}),[Ae,ge]),De=(0,o.useMemo)((function(){return Ae(pe,!0)}),[Ae,pe]),Se=(0,o.useMemo)((function(){return _e(Ie,!0)}),[_e,Ie]),be=(0,O.jsxs)(Z.N,{children:[(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Profile"})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Avatar"}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({avatar:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Add initials or an emoji",value:(null===X||void 0===X?void 0:X.avatar)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"username"in G&&!(null!==X&&void 0!==X&&X.username),default:!0,large:!0,children:["Username ","username"in G&&!(null!==X&&void 0!==X&&X.username)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({username:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Mage Supreme",value:(null===X||void 0===X?void 0:X.username)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"First name"}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({first_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Urza",value:(null===X||void 0===X?void 0:X.first_name)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Last name"}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({last_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Andromeda",value:(null===X||void 0===X?void 0:X.last_name)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[te&&(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Email"}),!te&&(0,O.jsxs)(I.ZP,{danger:"email"in G&&!(null!==X&&void 0!==X&&X.email),default:!0,large:!0,children:["Email ","email"in G&&!(null!==X&&void 0!==X&&X.email)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(x.Z,{mr:_.cd}),te&&(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,muted:!0,children:null===X||void 0===X?void 0:X.email}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(A.KJ,{muted:!0,size:N}),(0,O.jsx)(x.Z,{mr:1})]}),!te&&(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.KJ,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({email:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. mage@power.com",type:"email",value:(null===X||void 0===X?void 0:X.email)||""})})]})})]}),(0,O.jsx)(x.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Authentication"})}),(0,O.jsx)(u.Z,{light:!0}),te&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password_current"in G&&!(null!==X&&void 0!==X&&X.password_current),default:!0,large:!0,children:["Current password ","password_current"in G&&!(null!==X&&void 0!==X&&X.password_current)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password_current:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password_current)||""})})]})}),(0,O.jsx)(u.Z,{light:!0})]}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password"in G&&!(null!==X&&void 0!==X&&X.password),default:!0,large:!0,children:[te?"New password":"Password"," ","password"in G&&!(null!==X&&void 0!==X&&X.password)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password_confirmation"in G&&!(null!==X&&void 0!==X&&X.password_confirmation),default:!0,large:!0,children:["Confirm ",te?"new password":"password"," ","password_confirmation"in G&&!(null!==X&&void 0!==X&&X.password_confirmation)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password_confirmation:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password_confirmation)||""})})]})})]}),(0,O.jsx)(x.Z,{mb:_.HN}),te&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,O.jsx)(g.Z,{level:4,children:"Roles"}),(0,O.jsx)(x.Z,{mr:_.cd}),ve&&(0,O.jsx)(h.ZP,{alignItems:"center",children:je})]})}),(0,O.jsx)(u.Z,{light:!0}),!ve&&(0,O.jsxs)(x.Z,{p:_.cd,children:[(0,O.jsx)(x.Z,{mb:_.cd,children:(0,O.jsx)(I.ZP,{default:!0,children:"This user currently has no roles attached."})}),(0,O.jsx)(h.ZP,{alignItems:"center",children:je})]}),ve&&(0,O.jsx)(x.Z,{pb:_.Mq,children:De})]}),(0,O.jsx)(x.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsx)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,O.jsx)(g.Z,{level:4,children:"Permissions"})})}),(0,O.jsx)(u.Z,{light:!0}),!Ze&&(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsx)(I.ZP,{default:!0,children:"This user currently has no permissions."})}),Ze&&(0,O.jsx)(x.Z,{pb:_.Mq,children:Se})]}),(0,O.jsx)(x.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Metadata"})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Last updated"}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,monospace:!0,muted:!0,children:(null===X||void 0===X?void 0:X.updated_at)&&(0,D.d$)(null===X||void 0===X?void 0:X.updated_at,{includeSeconds:!0})}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(A.Pf,{muted:!0,size:N}),(0,O.jsx)(x.Z,{mr:1})]})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Created at"}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,monospace:!0,muted:!0,children:(null===X||void 0===X?void 0:X.created_at)&&(0,D.d$)(null===X||void 0===X?void 0:X.created_at,{includeSeconds:!0})}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(A.Pf,{muted:!0,size:N}),(0,O.jsx)(x.Z,{mr:1})]})]})})]}),(0,O.jsx)(x.Z,{mb:_.HN})]}),(0,O.jsxs)(h.ZP,{children:[(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.vc,{}),disabled:!G||!(null!==(n=Object.keys(G))&&void 0!==n&&n.length),loading:de,onClick:function(){return se({user:B(B({},(0,T.GL)(X,["avatar","first_name","last_name","password","password_confirmation","password_current","username"].concat(te?[]:"email"),{include_blanks:!0})),{},{role_ids:Object.keys((null===X||void 0===X?void 0:X.rolesMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:te?"Save changes":"Create new user"}),t&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(a.ZP,{onClick:function(){return null===t||void 0===t?void 0:t()},secondary:!0,children:"Cancel and go back"})]}),te&&String(H)!==String(k)&&M&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.rF,{}),danger:!0,loading:fe,onClick:function(){return ue()},children:"Delete user"})]})]})]});return r?be:(0,O.jsx)(p.Z,{after:Le,afterHeader:(0,O.jsx)(x.Z,{px:_.cd,children:(0,O.jsx)(I.ZP,{bold:!0,children:F})}),afterHidden:V,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Users"},linkProps:{href:"/settings/workspace/users"}},{bold:!0,label:function(){return(0,S.s)(X)}}],setAfterHidden:z,title:te?(0,S.s)(te):"New user",uuidItemSelected:L.B2.USERS,uuidWorkspaceSelected:L.Pl.USER_MANAGEMENT,children:te&&be})}},36288:function(e,n,r){r.d(n,{Fy:function(){return g},G9:function(){return c},H1:function(){return m},K4:function(){return d},ND:function(){return a},Pt:function(){return u},WG:function(){return l},hl:function(){return h},m_:function(){return o},oO:function(){return f}});var i,t,l,o,s=r(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(l||(l={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(o||(o={}));var d=(i={},(0,s.Z)(i,l.OWNER,"Owner"),(0,s.Z)(i,l.ADMIN,"Admin"),(0,s.Z)(i,l.EDITOR,"Editor"),(0,s.Z)(i,l.VIEWER,"Viewer"),(0,s.Z)(i,l.LIST,"List"),(0,s.Z)(i,l.DETAIL,"Detail"),(0,s.Z)(i,l.CREATE,"Create"),(0,s.Z)(i,l.UPDATE,"Update"),(0,s.Z)(i,l.DELETE,"Delete"),(0,s.Z)(i,l.OPERATION_ALL,"All operations"),(0,s.Z)(i,l.QUERY,"Query"),(0,s.Z)(i,l.QUERY_ALL,"Query all attributes"),(0,s.Z)(i,l.READ,"Read"),(0,s.Z)(i,l.READ_ALL,"Read all attributes"),(0,s.Z)(i,l.WRITE,"Write"),(0,s.Z)(i,l.WRITE_ALL,"Write all attributes"),(0,s.Z)(i,l.ALL,"All"),(0,s.Z)(i,l.DISABLE_LIST,"Disable list"),(0,s.Z)(i,l.DISABLE_DETAIL,"Disable detail"),(0,s.Z)(i,l.DISABLE_CREATE,"Disable create"),(0,s.Z)(i,l.DISABLE_UPDATE,"Disable update"),(0,s.Z)(i,l.DISABLE_DELETE,"Disable delete"),(0,s.Z)(i,l.DISABLE_OPERATION_ALL,"Disable all operations"),(0,s.Z)(i,l.DISABLE_QUERY,"Disable query"),(0,s.Z)(i,l.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,s.Z)(i,l.DISABLE_READ,"Disable read"),(0,s.Z)(i,l.DISABLE_READ_ALL,"Disable all read attributes"),(0,s.Z)(i,l.DISABLE_WRITE,"Disable write"),(0,s.Z)(i,l.DISABLE_WRITE_ALL,"Disable all write attributes"),i),a=(t={},(0,s.Z)(t,o.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,s.Z)(t,o.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,s.Z)(t,o.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),t),c=[l.OWNER,l.ADMIN,l.EDITOR,l.VIEWER,l.ALL],u=[l.LIST,l.DETAIL,l.CREATE,l.UPDATE,l.DELETE,l.OPERATION_ALL],f=[l.DISABLE_LIST,l.DISABLE_DETAIL,l.DISABLE_CREATE,l.DISABLE_UPDATE,l.DISABLE_DELETE,l.DISABLE_OPERATION_ALL],h=[l.QUERY,l.QUERY_ALL,l.DISABLE_QUERY,l.DISABLE_QUERY_ALL],g=[l.READ,l.READ_ALL,l.DISABLE_READ,l.DISABLE_READ_ALL],m=[l.WRITE,l.WRITE_ALL,l.DISABLE_WRITE,l.DISABLE_WRITE_ALL]},65956:function(e,n,r){var i=r(38626),t=r(55485),l=r(38276),o=r(30160),s=r(44897),d=r(42631),a=r(47041),c=r(70515),u=r(28598),f=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*c.iI,1.5*c.iI,1.5*c.iI),h=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||s.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||s.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||s.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||s.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||s.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 "})),g=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],d.n_,d.n_,(function(e){return"\n background-color: ".concat((e.theme.background||s.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||s.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),m=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*c.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*c.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),p=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],d.M8,d.YF,1.75*c.iI);n.Z=function(e){var n=e.borderless,r=e.children,i=e.containerRef,s=e.contentContainerRef,d=e.dark,a=e.footer,c=e.fullHeight,f=void 0===c||c,x=e.fullWidth,E=void 0===x||x,I=e.header,v=e.headerHeight,j=e.headerIcon,Z=e.headerPaddingVertical,A=e.headerTitle,_=e.maxHeight,L=e.maxWidth,D=e.minWidth,S=e.noPadding,b=e.overflowVisible,P=e.subtitle,R=e.success;return(0,u.jsxs)(h,{borderless:n,dark:d,fullHeight:f,fullWidth:E,maxHeight:_,maxWidth:L,minWidth:D,overflowVisible:b,ref:i,success:R,children:[(I||A)&&(0,u.jsxs)(g,{headerPaddingVertical:Z,height:v,children:[I&&I,A&&(0,u.jsx)(t.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,u.jsxs)(t.ZP,{alignItems:"center",children:[j&&j,(0,u.jsx)(l.Z,{ml:j?1:0,children:(0,u.jsx)(o.ZP,{bold:!0,default:!0,children:A})})]})})]}),(0,u.jsxs)(m,{maxHeight:_,noPadding:S,overflowVisible:b,ref:s,children:[P&&"string"===typeof P&&(0,u.jsx)(l.Z,{mb:2,children:(0,u.jsx)(o.ZP,{default:!0,children:P})}),P&&"string"!==typeof P&&P,r]}),a&&(0,u.jsx)(p,{children:a})]})}},36717:function(e,n,r){r.d(n,{q:function(){return l}});var i=r(75582),t=r(36288);function l(e){return Object.entries(t.K4).reduce((function(n,r){var t=(0,i.Z)(r,2),l=t[0],o=t[1];return e&Number(l)?n.concat(o):n}),[])}},76417:function(e,n,r){function i(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}r.d(n,{s:function(){return i}})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7858],{98777:function(n,e,t){t.d(e,{e:function(){return P}});var i=t(82394),o=t(26304),r=t(82684),c=t(38626),a=t(65976),l=t(97618),d=t(55485),s=t(38276),u=t(30160),f=t(44897),p=t(72473),h=t(42631),g=t(47041),m=t(48670),b=t(70515),x=t(91437),y=t(28598),v=["beforeTitleElement","children","contentOverflowVisible","first","hideScrollbar","highlighted","last","maxHeight","noBackground","noBorderRadius","noPaddingContent","onClick","onEntered","onExited","singlePanel","smallTitle","title","titleXPadding","titleYPadding","visible","visibleCount","visibleHighlightDisabled"];function w(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function j(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?w(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var P=300,O=c.default.div.withConfig({displayName:"AccordionPanel__AccordionPanelStyle",componentId:"sc-sf242a-0"})([".accordion-panel-chevron-down-exit-done{transform:rotate(0deg);transition:all 200ms;}.accordion-panel-chevron-down-enter-active{transform:rotate(180deg);transition:all 200ms;}.accordion-panel-chevron-down-enter-done,.accordion-panel-chevron-down-enter-done-visible{transform:rotate(180deg);transition:all 300ms;}.accordion-panel-chevron-down-exit{transform:rotate(0deg);transition:all 300ms;}.accordion-panel-content-enter{display:block;max-height:0px;overflow:hidden;transition:max-height 400ms ease-in-out;}.accordion-panel-content-enter-active{max-height:100vh;","}.accordion-panel-content-enter-done{display:block;}.accordion-panel-content-exit{display:block;max-height:100vh;"," overflow:hidden;}.accordion-panel-content-exit-active{max-height:0px;transition:max-height 300ms cubic-bezier(0,1,0,1);}.accordion-panel-content-exit-done{display:none;}"],(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,"px;\n ")}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,"px;\n ")})),I=c.default.a.withConfig({displayName:"AccordionPanel__TitleStyle",componentId:"sc-sf242a-1"})([""," display:block;position:relative;z-index:1;"," "," "," "," "," "," "," "," ",""],m.R,(function(n){return"\n &:hover,\n &:focus {\n outline: none;\n }\n ".concat((0,x.Kl)(n),"\n\n background-color: ").concat((n.theme.background||f.Z.background).table,";\n\n &:hover {\n background-color: ").concat((n.theme||f.Z).background.page,";\n }\n\n &:active {\n background-color: ").concat((n.theme||f.Z).background.page,";\n }\n ")}),(function(n){return n.visible&&"\n border-bottom: 1px solid ".concat((n.theme||f.Z).borders.medium2,";\n ")}),(function(n){return!n.first&&n.visible&&"\n border-top: 1px solid ".concat((n.theme||f.Z).borders.medium2,";\n ")}),(function(n){return!n.noBorderRadius&&n.first&&"\n border-top-left-radius: ".concat(h.n_,"px;\n border-top-right-radius: ").concat(h.n_,"px;\n ")}),(function(n){return!n.noBorderRadius&&(n.last||n.singlePanel)&&!n.visible&&"\n border-bottom-left-radius: ".concat(h.n_,"px;\n border-bottom-right-radius: ").concat(h.n_,"px;\n ")}),(function(n){return"undefined"!==typeof n.titleXPadding&&"\n padding-left: ".concat(n.titleXPadding,"px;\n padding-right: ").concat(n.titleXPadding,"px;\n ")}),(function(n){return"undefined"===typeof n.titleXPadding&&"\n padding-left: ".concat(2*b.iI,"px;\n padding-right: ").concat(2*b.iI,"px;\n ")}),(function(n){return"undefined"!==typeof n.titleYPadding&&"\n padding-bottom: ".concat(n.titleYPadding,"px;\n padding-top: ").concat(n.titleYPadding,"px;\n ")}),(function(n){return"undefined"===typeof n.titleXPadding&&"\n padding-bottom: ".concat(2*b.iI,"px;\n padding-top: ").concat(2*b.iI,"px;\n ")})),C=c.default.div.withConfig({displayName:"AccordionPanel__ContentStyle",componentId:"sc-sf242a-2"})(["padding-left:","px;padding-right:","px;"," "," "," "," "," "," ",""],2*b.iI,2*b.iI,g.w5,(function(n){return n.hideScrollbar&&"\n ::-webkit-scrollbar {\n display: none;\n }\n "}),(function(n){return!n.visible&&"\n display: none;\n "}),(function(n){return!n.contentOverflowVisible&&"\n overflow-y: auto;\n "}),(function(n){return n.contentOverflowVisible&&"\n overflow-y: visible;\n "}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,"px;\n ")}),(function(n){return n.noPaddingContent&&"\n padding: 0;\n "})),Z=c.default.div.withConfig({displayName:"AccordionPanel__ContentInnerStyle",componentId:"sc-sf242a-3"})(["padding-bottom:","px;padding-top:","px;",""],2*b.iI,2*b.iI,(function(n){return n.noPaddingContent&&"\n padding: 0;\n "})),_=function(n,e){var t=n.beforeTitleElement,i=n.children,r=n.contentOverflowVisible,c=n.first,f=n.hideScrollbar,h=n.highlighted,g=n.last,m=n.maxHeight,x=n.noBackground,w=n.noBorderRadius,_=n.noPaddingContent,S=n.onClick,k=n.onEntered,N=n.onExited,H=n.singlePanel,z=n.smallTitle,D=n.title,E=n.titleXPadding,B=n.titleYPadding,A=n.visible,X=n.visibleCount,M=n.visibleHighlightDisabled,Y=(0,o.Z)(n,v);return(0,y.jsxs)(O,j(j({},Y),{},{maxHeight:m,children:[(0,y.jsx)(I,{first:c,href:"#",last:g,noBorderRadius:w,noHoverUnderline:!0,onClick:function(n){n.preventDefault(),S&&S(n)},onKeyPress:function(n){" "===n.key&&S&&S(n)},singlePanel:H,titleXPadding:E,titleYPadding:B,visible:A&&!M,children:(0,y.jsxs)(d.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,y.jsxs)(d.ZP,{alignItems:"center",children:[t,t&&(0,y.jsx)(s.Z,{ml:1}),"string"!==typeof D&&D,"string"===typeof D&&(0,y.jsx)(u.ZP,{bold:!0,default:!A,large:!z,wind:h,children:D})]}),(0,y.jsx)(s.Z,{mr:1}),(0,y.jsx)(a.Z,{classNames:"accordion-panel-chevron-down",in:A,timeout:400,children:(0,y.jsx)(l.Z,{className:A&&0===X&&"accordion-panel-chevron-down-enter-done-visible",children:(0,y.jsx)(p._M,{default:!0,size:2*b.iI})})})]})}),(0,y.jsx)(a.Z,{classNames:"accordion-panel-content",in:A,onEntered:function(n){return k&&k(n)},onExited:function(n){return N&&N(n)},timeout:P,children:(0,y.jsx)(C,{contentOverflowVisible:r,hideScrollbar:f,maxHeight:m,noBackground:x,noPaddingContent:_,visible:A,children:(0,y.jsx)(Z,{noPaddingContent:_,ref:e,children:i})})})]}))};e.Z=r.forwardRef(_)},32013:function(n,e,t){var i=t(82394),o=t(26304),r=t(82684),c=t(38626),a=(t(98777),t(15338)),l=t(44897),d=t(42631),s=t(28598),u=["activeItemIndex","children","onClick","showDividers","visibleMapping","visibleMappingForced"];function f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function p(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var h=c.default.div.withConfig({displayName:"Accordion__AccordionStyle",componentId:"sc-1xr4nou-0"})(["overflow:hidden;"," "," "," "," ",""],(function(n){return!n.noBoxShadow&&"\n box-shadow: ".concat((n.theme||l.Z).shadow.frame,";\n ")}),(function(n){return!n.noBackground&&"\n background-color: ".concat((n.theme.background||l.Z.background).content,";\n ")}),(function(n){return!n.highlighted&&"\n border-color: ".concat((n.theme||l.Z).background.panel,";\n ")}),(function(n){return n.highlighted&&"\n border-color: ".concat((n.theme||l.Z).brand.wind400,";\n ")}),(function(n){return!n.noBorder&&"\n border-radius: ".concat(d.n_,"px;\n border-width: ").concat(d.YF,"px;\n border-style: ").concat(d.M8,";\n ")})),g=c.default.div.withConfig({displayName:"Accordion__AccordionPanelContainerStyle",componentId:"sc-1xr4nou-1"})([""]);e.Z=function(n){var e=n.activeItemIndex,t=n.children,c=n.onClick,l=n.showDividers,d=n.visibleMapping,f=n.visibleMappingForced,m=(0,o.Z)(n,u),b=(0,r.useState)(d||{}),x=b[0],y=b[1],v=(0,r.useState)({}),w=v[0],j=v[1];return(0,r.useEffect)((function(){f&&y((function(n){return p(p({},n),f)}))}),[f]),(0,s.jsx)(h,p(p({},m),{},{children:r.Children.map(t,(function(n,o){var d=r.Children.count(t),u=o===d-1,f=x[o];return n&&(0,s.jsxs)("div",{children:[(0,s.jsx)(g,{index:o,showDividers:l,children:r.cloneElement(n,p(p({},m),{},{first:0===o,last:u,onClick:function(){var n;j(p(p({},w),{},(0,i.Z)({},o,w[o]?w[o]+1:1))),n=p(p({},x),{},(0,i.Z)({},o,!f)),y(n),c&&c(n)},singlePanel:1===d,visible:f,visibleCount:w[o]||0,visibleHighlightDisabled:"undefined"!==typeof e&&o!==e}))}),l&&(0,s.jsx)(a.Z,{})]},o)}))}))}},85854:function(n,e,t){var i,o,r,c,a,l,d,s,u=t(82394),f=t(26304),p=t(26653),h=t(38626),g=t(33591),m=t(44897),b=t(95363),x=t(61896),y=t(30160),v=t(70515),w=t(38276),j=t(28598),P=["children","condensed","inline","level","marketing","spacingBelow"];function O(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function I(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?O(Object(t),!0).forEach((function(e){(0,u.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var C=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," "," ",""],y.IH,(function(n){return n.color&&"\n color: ".concat(n.color,"\n ")}),(function(n){return n.yellow&&"\n color: ".concat((n.theme.accent||m.Z.accent).yellow,";\n ")}),(function(n){return n.center&&"\n text-align: center;\n "}),(function(n){return!n.monospace&&0===Number(n.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(n){return!n.monospace&&1===Number(n.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(n){return!n.monospace&&2===Number(n.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(n){return!n.monospace&&3===Number(n.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(n){return!n.monospace&&4===Number(n.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(n){return!n.monospace&&5===Number(n.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return!n.monospace&&(6===Number(n.weightStyle)||n.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return!n.monospace&&7===Number(n.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return!n.monospace&&8===Number(n.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return n.lineHeightAuto&&"\n line-height: normal !important;\n "}),(function(n){return n.strikethrough&&"\n text-decoration: line-through;\n "})),Z=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(n){return"\n color: ".concat((n.theme.content||m.Z.content).active,";\n ")})),_=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],C,g.media.md(i||(i=(0,p.Z)(["\n ","\n "])),x.aQ),g.media.lg(o||(o=(0,p.Z)(["\n ","\n "])),x.aQ),g.media.xl(r||(r=(0,p.Z)(["\n ","\n "])),x.aQ)),S=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],C,x.MJ),k=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],C,g.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),g.media.sm(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),g.media.md(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),g.media.lg(d||(d=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),g.media.xl(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI)),N=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],C,x.BL),H=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],C),z=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],C),D=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],C),E=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],C,(function(n){return 1===n.level&&"\n ".concat(x.MJ,"\n ")}),(function(n){return 2===n.level&&"\n ".concat(x.BL,"\n ")}),(function(n){return 3===n.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(n){return 4===n.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),B=function(n){var e,t=n.children,i=n.condensed,o=n.inline,r=n.level,c=n.marketing,a=n.spacingBelow,l=(0,f.Z)(n,P);o?e=E:0===Number(r)?e=_:1===Number(r)?e=c?k:S:2===Number(r)?e=N:3===Number(r)?e=H:4===Number(r)?e=z:5===Number(r)&&(e=D);var d=(0,j.jsxs)(e,I(I({},l),{},{level:r,children:[a&&(0,j.jsx)(w.Z,{mb:i?2:3,children:t}),!a&&t]}));return o?d:(0,j.jsx)(Z,{children:d})};B.defaultProps={level:3,weightStyle:6},e.Z=B}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7858],{98777:function(n,e,t){t.d(e,{e:function(){return P}});var i=t(82394),o=t(26304),r=t(82684),c=t(38626),a=t(65976),l=t(97618),d=t(55485),s=t(38276),u=t(30160),f=t(44897),p=t(72473),h=t(42631),g=t(47041),m=t(48670),b=t(70515),x=t(91437),y=t(28598),v=["beforeTitleElement","children","contentOverflowVisible","first","hideScrollbar","highlighted","last","maxHeight","noBackground","noBorderRadius","noPaddingContent","onClick","onEntered","onExited","singlePanel","smallTitle","title","titleXPadding","titleYPadding","visible","visibleCount","visibleHighlightDisabled"];function w(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function j(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?w(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var P=300,O=c.default.div.withConfig({displayName:"AccordionPanel__AccordionPanelStyle",componentId:"sc-sf242a-0"})([".accordion-panel-chevron-down-exit-done{transform:rotate(0deg);transition:all 200ms;}.accordion-panel-chevron-down-enter-active{transform:rotate(180deg);transition:all 200ms;}.accordion-panel-chevron-down-enter-done,.accordion-panel-chevron-down-enter-done-visible{transform:rotate(180deg);transition:all 300ms;}.accordion-panel-chevron-down-exit{transform:rotate(0deg);transition:all 300ms;}.accordion-panel-content-enter{display:block;max-height:0px;overflow:hidden;transition:max-height 400ms ease-in-out;}.accordion-panel-content-enter-active{max-height:100vh;","}.accordion-panel-content-enter-done{display:block;}.accordion-panel-content-exit{display:block;max-height:100vh;"," overflow:hidden;}.accordion-panel-content-exit-active{max-height:0px;transition:max-height 300ms cubic-bezier(0,1,0,1);}.accordion-panel-content-exit-done{display:none;}"],(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,"px;\n ")}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,"px;\n ")})),I=c.default.a.withConfig({displayName:"AccordionPanel__TitleStyle",componentId:"sc-sf242a-1"})([""," display:block;position:relative;z-index:1;"," "," "," "," "," "," "," "," ",""],m.R,(function(n){return"\n &:hover,\n &:focus {\n outline: none;\n }\n ".concat((0,x.Kl)(n),"\n\n background-color: ").concat((n.theme.background||f.Z.background).table,";\n\n &:hover {\n background-color: ").concat((n.theme||f.Z).background.page,";\n }\n\n &:active {\n background-color: ").concat((n.theme||f.Z).background.page,";\n }\n ")}),(function(n){return n.visible&&"\n border-bottom: 1px solid ".concat((n.theme||f.Z).borders.medium2,";\n ")}),(function(n){return!n.first&&n.visible&&"\n border-top: 1px solid ".concat((n.theme||f.Z).borders.medium2,";\n ")}),(function(n){return!n.noBorderRadius&&n.first&&"\n border-top-left-radius: ".concat(h.n_,"px;\n border-top-right-radius: ").concat(h.n_,"px;\n ")}),(function(n){return!n.noBorderRadius&&(n.last||n.singlePanel)&&!n.visible&&"\n border-bottom-left-radius: ".concat(h.n_,"px;\n border-bottom-right-radius: ").concat(h.n_,"px;\n ")}),(function(n){return"undefined"!==typeof n.titleXPadding&&"\n padding-left: ".concat(n.titleXPadding,"px;\n padding-right: ").concat(n.titleXPadding,"px;\n ")}),(function(n){return"undefined"===typeof n.titleXPadding&&"\n padding-left: ".concat(2*b.iI,"px;\n padding-right: ").concat(2*b.iI,"px;\n ")}),(function(n){return"undefined"!==typeof n.titleYPadding&&"\n padding-bottom: ".concat(n.titleYPadding,"px;\n padding-top: ").concat(n.titleYPadding,"px;\n ")}),(function(n){return"undefined"===typeof n.titleYPadding&&"\n padding-bottom: ".concat(2*b.iI,"px;\n padding-top: ").concat(2*b.iI,"px;\n ")})),C=c.default.div.withConfig({displayName:"AccordionPanel__ContentStyle",componentId:"sc-sf242a-2"})(["padding-left:","px;padding-right:","px;"," "," "," "," "," "," ",""],2*b.iI,2*b.iI,g.w5,(function(n){return n.hideScrollbar&&"\n ::-webkit-scrollbar {\n display: none;\n }\n "}),(function(n){return!n.visible&&"\n display: none;\n "}),(function(n){return!n.contentOverflowVisible&&"\n overflow-y: auto;\n "}),(function(n){return n.contentOverflowVisible&&"\n overflow-y: visible;\n "}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,"px;\n ")}),(function(n){return n.noPaddingContent&&"\n padding: 0;\n "})),Z=c.default.div.withConfig({displayName:"AccordionPanel__ContentInnerStyle",componentId:"sc-sf242a-3"})(["padding-bottom:","px;padding-top:","px;",""],2*b.iI,2*b.iI,(function(n){return n.noPaddingContent&&"\n padding: 0;\n "})),_=function(n,e){var t=n.beforeTitleElement,i=n.children,r=n.contentOverflowVisible,c=n.first,f=n.hideScrollbar,h=n.highlighted,g=n.last,m=n.maxHeight,x=n.noBackground,w=n.noBorderRadius,_=n.noPaddingContent,S=n.onClick,k=n.onEntered,N=n.onExited,H=n.singlePanel,z=n.smallTitle,D=n.title,E=n.titleXPadding,B=n.titleYPadding,A=n.visible,M=n.visibleCount,X=n.visibleHighlightDisabled,Y=(0,o.Z)(n,v);return(0,y.jsxs)(O,j(j({},Y),{},{maxHeight:m,children:[(0,y.jsx)(I,{first:c,href:"#",last:g,noBorderRadius:w,noHoverUnderline:!0,onClick:function(n){n.preventDefault(),S&&S(n)},onKeyPress:function(n){" "===n.key&&S&&S(n)},singlePanel:H,titleXPadding:E,titleYPadding:B,visible:A&&!X,children:(0,y.jsxs)(d.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,y.jsxs)(d.ZP,{alignItems:"center",children:[t,t&&(0,y.jsx)(s.Z,{ml:1}),"string"!==typeof D&&D,"string"===typeof D&&(0,y.jsx)(u.ZP,{bold:!0,default:!A,large:!z,wind:h,children:D})]}),(0,y.jsx)(s.Z,{mr:1}),(0,y.jsx)(a.Z,{classNames:"accordion-panel-chevron-down",in:A,timeout:400,children:(0,y.jsx)(l.Z,{className:A&&0===M&&"accordion-panel-chevron-down-enter-done-visible",children:(0,y.jsx)(p._M,{default:!0,size:2*b.iI})})})]})}),(0,y.jsx)(a.Z,{classNames:"accordion-panel-content",in:A,onEntered:function(n){return k&&k(n)},onExited:function(n){return N&&N(n)},timeout:P,children:(0,y.jsx)(C,{contentOverflowVisible:r,hideScrollbar:f,maxHeight:m,noBackground:x,noPaddingContent:_,visible:A,children:(0,y.jsx)(Z,{noPaddingContent:_,ref:e,children:i})})})]}))};e.Z=r.forwardRef(_)},32013:function(n,e,t){var i=t(82394),o=t(26304),r=t(82684),c=t(38626),a=(t(98777),t(15338)),l=t(44897),d=t(42631),s=t(28598),u=["activeItemIndex","children","onClick","showDividers","visibleMapping","visibleMappingForced"];function f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function p(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var h=c.default.div.withConfig({displayName:"Accordion__AccordionStyle",componentId:"sc-1xr4nou-0"})(["overflow:hidden;"," "," "," "," ",""],(function(n){return!n.noBoxShadow&&"\n box-shadow: ".concat((n.theme||l.Z).shadow.frame,";\n ")}),(function(n){return!n.noBackground&&"\n background-color: ".concat((n.theme.background||l.Z.background).content,";\n ")}),(function(n){return!n.highlighted&&"\n border-color: ".concat((n.theme||l.Z).background.panel,";\n ")}),(function(n){return n.highlighted&&"\n border-color: ".concat((n.theme||l.Z).brand.wind400,";\n ")}),(function(n){return!n.noBorder&&"\n border-radius: ".concat(d.n_,"px;\n border-width: ").concat(d.YF,"px;\n border-style: ").concat(d.M8,";\n ")})),g=c.default.div.withConfig({displayName:"Accordion__AccordionPanelContainerStyle",componentId:"sc-1xr4nou-1"})([""]);e.Z=function(n){var e=n.activeItemIndex,t=n.children,c=n.onClick,l=n.showDividers,d=n.visibleMapping,f=n.visibleMappingForced,m=(0,o.Z)(n,u),b=(0,r.useState)(d||{}),x=b[0],y=b[1],v=(0,r.useState)({}),w=v[0],j=v[1];return(0,r.useEffect)((function(){f&&y((function(n){return p(p({},n),f)}))}),[f]),(0,s.jsx)(h,p(p({},m),{},{children:r.Children.map(t,(function(n,o){var d=r.Children.count(t),u=o===d-1,f=x[o];return n&&(0,s.jsxs)("div",{children:[(0,s.jsx)(g,{index:o,showDividers:l,children:r.cloneElement(n,p(p({},m),{},{first:0===o,last:u,onClick:function(){var n;j(p(p({},w),{},(0,i.Z)({},o,w[o]?w[o]+1:1))),n=p(p({},x),{},(0,i.Z)({},o,!f)),y(n),c&&c(n)},singlePanel:1===d,visible:f,visibleCount:w[o]||0,visibleHighlightDisabled:"undefined"!==typeof e&&o!==e}))}),l&&(0,s.jsx)(a.Z,{})]},o)}))}))}},85854:function(n,e,t){var i,o,r,c,a,l,d,s,u=t(82394),f=t(26304),p=t(26653),h=t(38626),g=t(33591),m=t(44897),b=t(95363),x=t(61896),y=t(30160),v=t(70515),w=t(38276),j=t(28598),P=["children","condensed","inline","level","marketing","spacingBelow"];function O(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function I(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?O(Object(t),!0).forEach((function(e){(0,u.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var C=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," "," ",""],y.IH,(function(n){return n.color&&"\n color: ".concat(n.color,"\n ")}),(function(n){return n.yellow&&"\n color: ".concat((n.theme.accent||m.Z.accent).yellow,";\n ")}),(function(n){return n.center&&"\n text-align: center;\n "}),(function(n){return!n.monospace&&0===Number(n.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(n){return!n.monospace&&1===Number(n.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(n){return!n.monospace&&2===Number(n.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(n){return!n.monospace&&3===Number(n.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(n){return!n.monospace&&4===Number(n.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(n){return!n.monospace&&5===Number(n.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return!n.monospace&&(6===Number(n.weightStyle)||n.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return!n.monospace&&7===Number(n.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return!n.monospace&&8===Number(n.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return n.lineHeightAuto&&"\n line-height: normal !important;\n "}),(function(n){return n.strikethrough&&"\n text-decoration: line-through;\n "})),Z=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(n){return"\n color: ".concat((n.theme.content||m.Z.content).active,";\n ")})),_=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],C,g.media.md(i||(i=(0,p.Z)(["\n ","\n "])),x.aQ),g.media.lg(o||(o=(0,p.Z)(["\n ","\n "])),x.aQ),g.media.xl(r||(r=(0,p.Z)(["\n ","\n "])),x.aQ)),S=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],C,x.MJ),k=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],C,g.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),g.media.sm(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),g.media.md(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),g.media.lg(d||(d=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),g.media.xl(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI)),N=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],C,x.BL),H=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],C),z=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],C),D=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],C),E=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],C,(function(n){return 1===n.level&&"\n ".concat(x.MJ,"\n ")}),(function(n){return 2===n.level&&"\n ".concat(x.BL,"\n ")}),(function(n){return 3===n.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(n){return 4===n.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),B=function(n){var e,t=n.children,i=n.condensed,o=n.inline,r=n.level,c=n.marketing,a=n.spacingBelow,l=(0,f.Z)(n,P);o?e=E:0===Number(r)?e=_:1===Number(r)?e=c?k:S:2===Number(r)?e=N:3===Number(r)?e=H:4===Number(r)?e=z:5===Number(r)&&(e=D);var d=(0,j.jsxs)(e,I(I({},l),{},{level:r,children:[a&&(0,j.jsx)(w.Z,{mb:i?2:3,children:t}),!a&&t]}));return o?d:(0,j.jsx)(Z,{children:d})};B.defaultProps={level:3,weightStyle:6},e.Z=B}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8146],{58146:function(e,n,t){var i=t(21831),r=t(75582),s=t(82394),l=t(21764),c=t(82684),o=t(69864),d=t(34376),a=t(71180),u=t(70652),h=t(15338),f=t(97618),m=t(55485),x=t(85854),E=t(65956),Z=t(36288),p=t(44085),j=t(28274),_=t(38276),I=t(75499),g=t(30160),v=t(35576),A=t(17488),L=t(69650),S=t(35686),b=t(8193),D=t(72473),P=t(70515),T=t(24755),R=t(48277),O=t(81728),C=t(3917),N=t(76417),y=t(86735),B=t(42122),k=t(72619),w=t(3314),W=t(28598);function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var U,Y=2*P.iI;!function(e){e.ROLES="Roles",e.USERS="Users"}(U||(U={})),n.Z=function(e){var n,t=e.contained,s=e.onCancel,H=e.slug,V=(0,d.useRouter)(),Q=(0,c.useState)(!0),F=Q[0],K=Q[1],G=(0,c.useState)(null),z=G[0],q=G[1],$=(0,c.useState)({}),J=$[0],X=$[1],ee=(0,c.useState)(null),ne=ee[0],te=ee[1],ie=(0,c.useCallback)((function(e,n,t){te(M(M({},e),{},{rolesMapping:(0,y.HK)(n||[],(function(e){return e.id})),usersMapping:(0,y.HK)(t||[],(function(e){return e.id}))}))}),[te]),re=(0,c.useCallback)((function(e){X((function(n){return M(M({},n),e)})),te((function(n){return M(M({},n),e)}))}),[X,te]),se=S.ZP.permissions.detail(H,{},{revalidateOnFocus:!1}).data,le=(0,c.useMemo)((function(){return null===se||void 0===se?void 0:se.permission}),[se]);(0,c.useEffect)((function(){le&&ie(le,null===le||void 0===le?void 0:le.roles,null===le||void 0===le?void 0:le.users)}),[ie,le]);var ce=S.ZP.permissions.list({_format:"with_only_entity_options",only_entity_options:!0},{},{pauseFetch:!!le}).data,oe=(0,c.useMemo)((function(){var e;return null===ce||void 0===ce||null===(e=ce.permissions)||void 0===e?void 0:e[0]}),[ce]),de=(0,c.useMemo)((function(){var e;return(null===(e=le||oe)||void 0===e?void 0:e.entity_names)||[]}),[le,oe]),ae=(0,c.useMemo)((function(){var e;return(null===(e=le||oe)||void 0===e?void 0:e.entity_types)||[]}),[le,oe]),ue=(0,o.Db)(le?S.ZP.permissions.useUpdate(null===le||void 0===le?void 0:le.id):S.ZP.permissions.useCreate(),{onSuccess:function(e){return(0,k.wD)(e,{callback:function(e){var n=e.permission;X({}),ie(n,null===n||void 0===n?void 0:n.roles,null===n||void 0===n?void 0:n.users),le||V.push("/settings/workspace/permissions/".concat(null===n||void 0===n?void 0:n.id)),l.Am.success(le?"Permission successfully updated.":"New permission created successfully.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"permission-mutate-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,t=n.errors,i=n.exception,r=n.message,s=n.type;l.Am.error((null===t||void 0===t?void 0:t.error)||i||r,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),he=(0,r.Z)(ue,2),fe=he[0],me=he[1].isLoading,xe=(0,o.Db)(S.ZP.permissions.useDelete(null===le||void 0===le?void 0:le.id),{onSuccess:function(e){return(0,k.wD)(e,{callback:function(){V.push("/settings/workspace/permissions"),l.Am.success("Permission successfully delete.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"permission-delete-success-".concat(null===le||void 0===le?void 0:le.id)})},onErrorCallback:function(e){var n=e.error,t=n.errors,i=n.exception,r=n.message,s=n.type;l.Am.error((null===t||void 0===t?void 0:t.error)||i||r,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),Ee=(0,r.Z)(xe,2),Ze=Ee[0],pe=Ee[1].isLoading,je=(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.access)||0}),[ne]),_e=(0,c.useCallback)((function(e){return e.map((function(e,n){var t=Z.K4[e],i=Boolean(je&Number(e)),r=(0,R.fD)(je),s=(0,R.fD)(e);return(0,W.jsx)(_.Z,{mt:n>=1?1:0,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(L.Z,{checked:i,compact:!0,onCheck:function(e){return re({access:(0,R.$P)(e(i)?(0,R.vN)(r,s):(0,R.VJ)(r,s))})}}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(g.ZP,{default:!i,children:t})]})},t)}))}),[je,re]),Ie=(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.conditions)||[]}),[ne]),ge=(0,c.useMemo)((function(){var e=Z.WG.DISABLE_UNLESS_CONDITIONS,n=(0,R.fD)(je),t=(0,R.fD)(e),r=Boolean(je&Number(e)),s=new Set((0,i.Z)(Ie)),l=s.has(Z.m_.HAS_NOTEBOOK_EDIT_ACCESS),c=s.has(Z.m_.HAS_PIPELINE_EDIT_ACCESS),o=s.has(Z.m_.USER_OWNS_ENTITY),d=r&&l,a=r&&c,u=r&&o;return(0,W.jsxs)(m.ZP,{flexDirection:"column",children:[(0,W.jsx)(_.Z,{mt:1,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(L.Z,{checked:d,compact:!0,onCheck:function(e){var l=n;e(d)?(r||(l=(0,R.vN)(n,t)),s.add(Z.m_.HAS_NOTEBOOK_EDIT_ACCESS)):(c||o||(l=(0,R.VJ)(n,t)),s.delete(Z.m_.HAS_NOTEBOOK_EDIT_ACCESS)),re({access:(0,R.$P)(l),conditions:(0,i.Z)(s)})}}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(g.ZP,{default:!d,children:Z.ND[Z.m_.HAS_NOTEBOOK_EDIT_ACCESS]})]})}),(0,W.jsx)(_.Z,{mt:1,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(L.Z,{checked:a,compact:!0,onCheck:function(e){var c=n;e(a)?(r||(c=(0,R.vN)(n,t)),s.add(Z.m_.HAS_PIPELINE_EDIT_ACCESS)):(l||o||(c=(0,R.VJ)(n,t)),s.delete(Z.m_.HAS_PIPELINE_EDIT_ACCESS)),re({access:(0,R.$P)(c),conditions:(0,i.Z)(s)})}}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(g.ZP,{default:!a,children:Z.ND[Z.m_.HAS_PIPELINE_EDIT_ACCESS]})]})}),(0,W.jsx)(_.Z,{mt:1,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(L.Z,{checked:u,compact:!0,onCheck:function(e){var c=n;e(u)?(r||(c=(0,R.vN)(n,t)),s.add(Z.m_.USER_OWNS_ENTITY)):(l||l||(c=(0,R.VJ)(n,t)),s.delete(Z.m_.USER_OWNS_ENTITY)),re({access:(0,R.$P)(c),conditions:(0,i.Z)(s)})}}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(g.ZP,{default:!u,children:Z.ND[Z.m_.USER_OWNS_ENTITY]})]})})]})}),[je,Ie,re]),ve=S.ZP.roles.list({},{},{pauseFetch:!le}).data,Ae=(0,c.useMemo)((function(){return(0,y.YC)((null===ve||void 0===ve?void 0:ve.roles)||[],"name")}),[ve]),Le=(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.rolesMapping)||{}}),[ne]),Se=(0,c.useMemo)((function(){return(0,y.YC)(Object.values(Le),"name")}),[Le]),be=S.ZP.users.list({},{},{pauseFetch:!le}).data,De=((0,c.useMemo)((function(){return(0,y.YC)((null===be||void 0===be?void 0:be.users)||[],(function(e){return(0,N.s)(e)}))}),[be]),(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.usersMapping)||{}}),[ne])),Pe=(0,c.useMemo)((function(){return(0,y.YC)(Object.values(De),(function(e){return(0,N.s)(e)}))}),[De]),Te=(0,c.useMemo)((function(){return(null===Se||void 0===Se?void 0:Se.length)>=1}),[Se]),Re=(0,c.useMemo)((function(){return(0,W.jsx)(a.ZP,{beforeIcon:(0,W.jsx)(D.mm,{}),compact:!0,onClick:function(){q(U.ROLES),K(!1)},primary:!Te,secondary:Te,small:!0,children:"Add roles"})}),[Te,q,K]),Oe=(0,c.useMemo)((function(){return(null===Pe||void 0===Pe?void 0:Pe.length)>=1}),[Pe]),Ce=(0,c.useCallback)((function(e,n){return(0,W.jsx)(I.Z,{columnFlex:[null,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===Le||void 0===Le?void 0:Le[n]}));return(0,W.jsx)(u.Z,{checked:n,onClick:function(t){(0,w.j)(t),re(n?{rolesMapping:{}}:{rolesMapping:(0,y.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Role"}],onClickRow:n?function(n){var t=e[n];t&&window.open("/settings/workspace/roles/".concat(null===t||void 0===t?void 0:t.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.name,t=e.id,i=!(null===Le||void 0===Le||!Le[t]);return[(0,W.jsx)(u.Z,{checked:i,onClick:function(n){(0,w.j)(n);var r=M({},Le);i?null===r||void 0===r||delete r[t]:r[t]=e,re({rolesMapping:r})}},"checkbox"),(0,W.jsx)(g.ZP,{monospace:!0,children:n},"name")]})),uuid:"roles"})}),[Le,re]),Ne=(0,c.useCallback)((function(e,n){return(0,W.jsx)(I.Z,{columnFlex:[1,1,1],columns:[{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"}],onClickRow:n?function(n){var t=e[n];t&&window.open("/settings/workspace/users/".concat(null===t||void 0===t?void 0:t.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.first_name,t=e.last_name,i=e.username;return[(0,W.jsx)(g.ZP,{children:i},"username"),(0,W.jsx)(g.ZP,{default:!0,children:n},"firstName"),(0,W.jsx)(g.ZP,{default:!0,children:t},"lastName")]})),uuid:"users"})}),[De,re]),ye=(0,c.useMemo)((function(){return Ce(Ae)}),[Ce,Ae]),Be=(0,c.useMemo)((function(){return Ce(Se,!0)}),[Ce,Se]),ke=(0,c.useMemo)((function(){return Ne(Pe,!0)}),[Ne,Pe]),we=(0,W.jsxs)(b.N,{children:[(0,W.jsxs)(E.Z,{noPadding:!0,children:[(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsx)(x.Z,{level:4,children:le?"Permission ".concat(null===le||void 0===le?void 0:le.id):"New permission"})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsxs)(g.ZP,{danger:"entity_name"in J&&!(null!==ne&&void 0!==ne&&ne.entity_name),default:!0,large:!0,children:["Entity ","entity_name"in J&&!(null!==ne&&void 0!==ne&&ne.entity_name)&&(0,W.jsx)(g.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(f.Z,{flex:1,justifyContent:"flex-end",children:(0,W.jsx)(p.Z,{afterIconSize:Y,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,onChange:function(e){return re({entity_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Select an entity",value:(null===ne||void 0===ne?void 0:ne.entity_name)||"",children:de.map((function(e){return(0,W.jsx)("option",{value:e,children:(0,O.j3)(e)},e)}))})})]})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Entity subtype"}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(f.Z,{flex:1,justifyContent:"flex-end",children:(0,W.jsxs)(p.Z,{afterIconSize:Y,alignRight:!0,autoComplete:"off",large:!0,monospace:!0,noBackground:!0,noBorder:!0,onChange:function(e){return re({entity_type:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Select an entity subtype",value:(null===ne||void 0===ne?void 0:ne.entity_type)||"",children:[(0,W.jsx)("option",{value:""}),ae.map((function(e){return(0,W.jsx)("option",{value:e,children:e},e)}))]})})]})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Enity UUID"}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsx)(A.Z,{afterIcon:(0,W.jsx)(D.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:Y,alignRight:!0,autoComplete:"off",large:!0,monospace:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({entity_id:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. pipeline_uuid",value:(null===ne||void 0===ne?void 0:ne.entity_id)||""})})]})})]}),(0,W.jsx)(_.Z,{mb:P.HN}),(0,W.jsxs)(E.Z,{noPadding:!0,children:[(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsx)(x.Z,{level:4,children:"Access"})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Groups"})}),_e(Z.G9)]})}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Special conditions"})}),ge]})})]}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Operations"})}),_e(Z.Pt)]})}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Disable operations"})}),_e(Z.oO)]})})]}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsxs)(m.ZP,{alignItems:"flex-start",children:[(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Read attributes"})}),_e(Z.Fy)]})}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{fullWidth:!0,p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Readable attributes (comma separated)"})}),(0,W.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return re({read_attributes:e.target.value})},placeholder:"e.g. email",value:(null===ne||void 0===ne?void 0:ne.read_attributes)||""})]})})]}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsxs)(m.ZP,{alignItems:"flex-start",children:[(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Write attributes"})}),_e(Z.H1)]})}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{fullWidth:!0,p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Writable attributes (comma separated)"})}),(0,W.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return re({write_attributes:e.target.value})},placeholder:"e.g. password",value:(null===ne||void 0===ne?void 0:ne.write_attributes)||""})]})})]}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsxs)(m.ZP,{alignItems:"flex-start",children:[(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Query parameters"})}),_e(Z.hl)]})}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{fullWidth:!0,p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Parameters that can be queried (comma separated)"})}),(0,W.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return re({query_attributes:e.target.value})},placeholder:"e.g. include_outputs",value:(null===ne||void 0===ne?void 0:ne.query_attributes)||""})]})})]})]}),(0,W.jsx)(_.Z,{mb:P.HN}),le&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(E.Z,{noPadding:!0,children:[(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,W.jsx)(x.Z,{level:4,children:"Roles"}),(0,W.jsx)(_.Z,{mr:P.cd}),Te&&(0,W.jsx)(m.ZP,{alignItems:"center",children:Re})]})}),(0,W.jsx)(h.Z,{light:!0}),!Te&&(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,children:"This permission is currently not attached to any role."})}),(0,W.jsx)(m.ZP,{alignItems:"center",children:Re})]}),Te&&(0,W.jsx)(_.Z,{pb:P.Mq,children:Be})]}),(0,W.jsx)(_.Z,{mb:P.HN}),(0,W.jsxs)(E.Z,{noPadding:!0,children:[(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsx)(m.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,W.jsx)(x.Z,{level:4,children:"Users"})})}),(0,W.jsx)(h.Z,{light:!0}),!Oe&&(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,children:"There are currently no users with this permission."})}),Oe&&(0,W.jsx)(_.Z,{pb:P.Mq,children:ke})]}),(0,W.jsx)(_.Z,{mb:P.HN}),(0,W.jsxs)(E.Z,{noPadding:!0,children:[(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsx)(x.Z,{level:4,children:"Metadata"})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Last updated"}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,W.jsx)(g.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ne||void 0===ne?void 0:ne.updated_at)&&(0,C.d$)(null===ne||void 0===ne?void 0:ne.updated_at,{includeSeconds:!0})}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(D.Pf,{muted:!0,size:Y}),(0,W.jsx)(_.Z,{mr:1})]})]})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Created at"}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,W.jsx)(g.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ne||void 0===ne?void 0:ne.created_at)&&(0,C.d$)(null===ne||void 0===ne?void 0:ne.created_at,{includeSeconds:!0})}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(D.Pf,{muted:!0,size:Y}),(0,W.jsx)(_.Z,{mr:1})]})]})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Created by"}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,W.jsx)(g.ZP,{large:!0,monospace:!0,muted:!0,children:(0,N.s)(null===le||void 0===le?void 0:le.user)}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(D.Pf,{muted:!0,size:Y}),(0,W.jsx)(_.Z,{mr:1})]})]})})]}),(0,W.jsx)(_.Z,{mb:P.HN})]}),(0,W.jsxs)(m.ZP,{children:[(0,W.jsx)(a.ZP,{beforeIcon:(0,W.jsx)(D.vc,{}),disabled:!J||!(null!==(n=Object.keys(J))&&void 0!==n&&n.length),loading:me,onClick:function(){return fe({permission:M(M({},(0,B.GL)(ne,["access","conditions","entity_id","entity_name","entity_type","query_attributes","read_attributes","write_attributes"],{include_blanks:!0})),le?{role_ids:Object.keys((null===ne||void 0===ne?void 0:ne.rolesMapping)||{}).map((function(e){return Number(e)}))}:{})})},primary:!0,children:le?"Save changes":"Create new permission"}),s&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(a.ZP,{onClick:function(){return null===s||void 0===s?void 0:s()},secondary:!0,children:"Cancel and go back"})]}),le&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(a.ZP,{beforeIcon:(0,W.jsx)(D.rF,{}),danger:!0,loading:pe,onClick:function(){return Ze()},children:"Delete permission"})]})]})]});return t?we:(0,W.jsx)(j.Z,{after:U.ROLES===z?ye:null,afterHeader:(0,W.jsx)(_.Z,{px:P.cd,children:(0,W.jsx)(g.ZP,{bold:!0,children:z})}),afterHidden:F,afterWidth:60*P.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Permissions"},linkProps:{href:"/settings/workspace/permissions"}},{bold:!0,label:function(){return"Permission ".concat(null===le||void 0===le?void 0:le.id)}}],hideAfterCompletely:!0,setAfterHidden:K,title:null!==le&&void 0!==le&&le.id?"Permission ".concat(null===le||void 0===le?void 0:le.id):"New permission",uuidItemSelected:T.B2.PERMISSIONS,uuidWorkspaceSelected:T.Pl.USER_MANAGEMENT,children:le&&we})}},8193:function(e,n,t){t.d(n,{N:function(){return o},Z:function(){return c}});var i=t(38626),r=t(44897),s=t(42631),l=t(70515),c=2*l.iI,o=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],s.n_,l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))},36288:function(e,n,t){t.d(n,{Fy:function(){return m},G9:function(){return a},H1:function(){return x},K4:function(){return o},ND:function(){return d},Pt:function(){return u},WG:function(){return s},hl:function(){return f},m_:function(){return l},oO:function(){return h}});var i,r,s,l,c=t(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(s||(s={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(l||(l={}));var o=(i={},(0,c.Z)(i,s.OWNER,"Owner"),(0,c.Z)(i,s.ADMIN,"Admin"),(0,c.Z)(i,s.EDITOR,"Editor"),(0,c.Z)(i,s.VIEWER,"Viewer"),(0,c.Z)(i,s.LIST,"List"),(0,c.Z)(i,s.DETAIL,"Detail"),(0,c.Z)(i,s.CREATE,"Create"),(0,c.Z)(i,s.UPDATE,"Update"),(0,c.Z)(i,s.DELETE,"Delete"),(0,c.Z)(i,s.OPERATION_ALL,"All operations"),(0,c.Z)(i,s.QUERY,"Query"),(0,c.Z)(i,s.QUERY_ALL,"Query all attributes"),(0,c.Z)(i,s.READ,"Read"),(0,c.Z)(i,s.READ_ALL,"Read all attributes"),(0,c.Z)(i,s.WRITE,"Write"),(0,c.Z)(i,s.WRITE_ALL,"Write all attributes"),(0,c.Z)(i,s.ALL,"All"),(0,c.Z)(i,s.DISABLE_LIST,"Disable list"),(0,c.Z)(i,s.DISABLE_DETAIL,"Disable detail"),(0,c.Z)(i,s.DISABLE_CREATE,"Disable create"),(0,c.Z)(i,s.DISABLE_UPDATE,"Disable update"),(0,c.Z)(i,s.DISABLE_DELETE,"Disable delete"),(0,c.Z)(i,s.DISABLE_OPERATION_ALL,"Disable all operations"),(0,c.Z)(i,s.DISABLE_QUERY,"Disable query"),(0,c.Z)(i,s.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,c.Z)(i,s.DISABLE_READ,"Disable read"),(0,c.Z)(i,s.DISABLE_READ_ALL,"Disable all read attributes"),(0,c.Z)(i,s.DISABLE_WRITE,"Disable write"),(0,c.Z)(i,s.DISABLE_WRITE_ALL,"Disable all write attributes"),i),d=(r={},(0,c.Z)(r,l.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,c.Z)(r,l.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,c.Z)(r,l.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),r),a=[s.OWNER,s.ADMIN,s.EDITOR,s.VIEWER,s.ALL],u=[s.LIST,s.DETAIL,s.CREATE,s.UPDATE,s.DELETE,s.OPERATION_ALL],h=[s.DISABLE_LIST,s.DISABLE_DETAIL,s.DISABLE_CREATE,s.DISABLE_UPDATE,s.DISABLE_DELETE,s.DISABLE_OPERATION_ALL],f=[s.QUERY,s.QUERY_ALL,s.DISABLE_QUERY,s.DISABLE_QUERY_ALL],m=[s.READ,s.READ_ALL,s.DISABLE_READ,s.DISABLE_READ_ALL],x=[s.WRITE,s.WRITE_ALL,s.DISABLE_WRITE,s.DISABLE_WRITE_ALL]},65956:function(e,n,t){var i=t(38626),r=t(55485),s=t(38276),l=t(30160),c=t(44897),o=t(42631),d=t(47041),a=t(70515),u=t(28598),h=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*a.iI,1.5*a.iI,1.5*a.iI),f=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],o.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=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],o.n_,o.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 ")})),x=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*a.iI,d.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*a.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),E=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],o.M8,o.YF,1.75*a.iI);n.Z=function(e){var n=e.borderless,t=e.children,i=e.containerRef,c=e.contentContainerRef,o=e.dark,d=e.footer,a=e.fullHeight,h=void 0===a||a,Z=e.fullWidth,p=void 0===Z||Z,j=e.header,_=e.headerHeight,I=e.headerIcon,g=e.headerPaddingVertical,v=e.headerTitle,A=e.maxHeight,L=e.maxWidth,S=e.minWidth,b=e.noPadding,D=e.overflowVisible,P=e.subtitle,T=e.success;return(0,u.jsxs)(f,{borderless:n,dark:o,fullHeight:h,fullWidth:p,maxHeight:A,maxWidth:L,minWidth:S,overflowVisible:D,ref:i,success:T,children:[(j||v)&&(0,u.jsxs)(m,{headerPaddingVertical:g,height:_,children:[j&&j,v&&(0,u.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,u.jsxs)(r.ZP,{alignItems:"center",children:[I&&I,(0,u.jsx)(s.Z,{ml:I?1:0,children:(0,u.jsx)(l.ZP,{bold:!0,default:!0,children:v})})]})})]}),(0,u.jsxs)(x,{maxHeight:A,noPadding:b,overflowVisible:D,ref:c,children:[P&&(0,u.jsx)(s.Z,{mb:2,children:(0,u.jsx)(l.ZP,{default:!0,children:P})}),t]}),d&&(0,u.jsx)(E,{children:d})]})}},76417:function(e,n,t){function i(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}t.d(n,{s:function(){return i}})},48277:function(e,n,t){t.d(n,{$P:function(){return d},JI:function(){return s},VJ:function(){return o},fD:function(){return l},uf:function(){return r},vN:function(){return c}});var i=t(75582),r=function(e){var n=String(e).split("."),t=(0,i.Z)(n,2),r=t[0],s=t[1];return"".concat(r.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(s?".".concat(s):"")};function s(e){var n=Math.floor(Date.now()/1e3);return e>0?n-e:n}function l(e){return(e>>>0).toString(2)}function c(e,n){return String(BigInt(e)+BigInt(n))}function o(e,n){return String(BigInt(e)-BigInt(n))}function d(e){return parseInt(e,2)}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8146],{58146:function(e,n,t){var i=t(21831),r=t(75582),s=t(82394),l=t(21764),c=t(82684),o=t(69864),d=t(34376),a=t(71180),u=t(70652),h=t(15338),f=t(97618),m=t(55485),x=t(85854),E=t(65956),Z=t(36288),p=t(44085),j=t(28274),_=t(38276),I=t(75499),g=t(30160),v=t(35576),A=t(17488),L=t(69650),S=t(35686),b=t(8193),D=t(72473),P=t(70515),T=t(24755),R=t(48277),O=t(81728),C=t(3917),y=t(76417),N=t(86735),B=t(42122),k=t(72619),w=t(3314),W=t(28598);function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var U,Y=2*P.iI;!function(e){e.ROLES="Roles",e.USERS="Users"}(U||(U={})),n.Z=function(e){var n,t=e.contained,s=e.onCancel,H=e.slug,V=(0,d.useRouter)(),Q=(0,c.useState)(!0),F=Q[0],K=Q[1],G=(0,c.useState)(null),z=G[0],q=G[1],$=(0,c.useState)({}),J=$[0],X=$[1],ee=(0,c.useState)(null),ne=ee[0],te=ee[1],ie=(0,c.useCallback)((function(e,n,t){te(M(M({},e),{},{rolesMapping:(0,N.HK)(n||[],(function(e){return e.id})),usersMapping:(0,N.HK)(t||[],(function(e){return e.id}))}))}),[te]),re=(0,c.useCallback)((function(e){X((function(n){return M(M({},n),e)})),te((function(n){return M(M({},n),e)}))}),[X,te]),se=S.ZP.permissions.detail(H,{},{revalidateOnFocus:!1}).data,le=(0,c.useMemo)((function(){return null===se||void 0===se?void 0:se.permission}),[se]);(0,c.useEffect)((function(){le&&ie(le,null===le||void 0===le?void 0:le.roles,null===le||void 0===le?void 0:le.users)}),[ie,le]);var ce=S.ZP.permissions.list({_format:"with_only_entity_options",only_entity_options:!0},{},{pauseFetch:!!le}).data,oe=(0,c.useMemo)((function(){var e;return null===ce||void 0===ce||null===(e=ce.permissions)||void 0===e?void 0:e[0]}),[ce]),de=(0,c.useMemo)((function(){var e;return(null===(e=le||oe)||void 0===e?void 0:e.entity_names)||[]}),[le,oe]),ae=(0,c.useMemo)((function(){var e;return(null===(e=le||oe)||void 0===e?void 0:e.entity_types)||[]}),[le,oe]),ue=(0,o.Db)(le?S.ZP.permissions.useUpdate(null===le||void 0===le?void 0:le.id):S.ZP.permissions.useCreate(),{onSuccess:function(e){return(0,k.wD)(e,{callback:function(e){var n=e.permission;X({}),ie(n,null===n||void 0===n?void 0:n.roles,null===n||void 0===n?void 0:n.users),le||V.push("/settings/workspace/permissions/".concat(null===n||void 0===n?void 0:n.id)),l.Am.success(le?"Permission successfully updated.":"New permission created successfully.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"permission-mutate-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,t=n.errors,i=n.exception,r=n.message,s=n.type;l.Am.error((null===t||void 0===t?void 0:t.error)||i||r,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),he=(0,r.Z)(ue,2),fe=he[0],me=he[1].isLoading,xe=(0,o.Db)(S.ZP.permissions.useDelete(null===le||void 0===le?void 0:le.id),{onSuccess:function(e){return(0,k.wD)(e,{callback:function(){V.push("/settings/workspace/permissions"),l.Am.success("Permission successfully delete.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"permission-delete-success-".concat(null===le||void 0===le?void 0:le.id)})},onErrorCallback:function(e){var n=e.error,t=n.errors,i=n.exception,r=n.message,s=n.type;l.Am.error((null===t||void 0===t?void 0:t.error)||i||r,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),Ee=(0,r.Z)(xe,2),Ze=Ee[0],pe=Ee[1].isLoading,je=(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.access)||0}),[ne]),_e=(0,c.useCallback)((function(e){return e.map((function(e,n){var t=Z.K4[e],i=Boolean(je&Number(e)),r=(0,R.fD)(je),s=(0,R.fD)(e);return(0,W.jsx)(_.Z,{mt:n>=1?1:0,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(L.Z,{checked:i,compact:!0,onCheck:function(e){return re({access:(0,R.$P)(e(i)?(0,R.vN)(r,s):(0,R.VJ)(r,s))})}}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(g.ZP,{default:!i,children:t})]})},t)}))}),[je,re]),Ie=(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.conditions)||[]}),[ne]),ge=(0,c.useMemo)((function(){var e=Z.WG.DISABLE_UNLESS_CONDITIONS,n=(0,R.fD)(je),t=(0,R.fD)(e),r=Boolean(je&Number(e)),s=new Set((0,i.Z)(Ie)),l=s.has(Z.m_.HAS_NOTEBOOK_EDIT_ACCESS),c=s.has(Z.m_.HAS_PIPELINE_EDIT_ACCESS),o=s.has(Z.m_.USER_OWNS_ENTITY),d=r&&l,a=r&&c,u=r&&o;return(0,W.jsxs)(m.ZP,{flexDirection:"column",children:[(0,W.jsx)(_.Z,{mt:1,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(L.Z,{checked:d,compact:!0,onCheck:function(e){var l=n;e(d)?(r||(l=(0,R.vN)(n,t)),s.add(Z.m_.HAS_NOTEBOOK_EDIT_ACCESS)):(c||o||(l=(0,R.VJ)(n,t)),s.delete(Z.m_.HAS_NOTEBOOK_EDIT_ACCESS)),re({access:(0,R.$P)(l),conditions:(0,i.Z)(s)})}}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(g.ZP,{default:!d,children:Z.ND[Z.m_.HAS_NOTEBOOK_EDIT_ACCESS]})]})}),(0,W.jsx)(_.Z,{mt:1,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(L.Z,{checked:a,compact:!0,onCheck:function(e){var c=n;e(a)?(r||(c=(0,R.vN)(n,t)),s.add(Z.m_.HAS_PIPELINE_EDIT_ACCESS)):(l||o||(c=(0,R.VJ)(n,t)),s.delete(Z.m_.HAS_PIPELINE_EDIT_ACCESS)),re({access:(0,R.$P)(c),conditions:(0,i.Z)(s)})}}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(g.ZP,{default:!a,children:Z.ND[Z.m_.HAS_PIPELINE_EDIT_ACCESS]})]})}),(0,W.jsx)(_.Z,{mt:1,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(L.Z,{checked:u,compact:!0,onCheck:function(e){var c=n;e(u)?(r||(c=(0,R.vN)(n,t)),s.add(Z.m_.USER_OWNS_ENTITY)):(l||l||(c=(0,R.VJ)(n,t)),s.delete(Z.m_.USER_OWNS_ENTITY)),re({access:(0,R.$P)(c),conditions:(0,i.Z)(s)})}}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(g.ZP,{default:!u,children:Z.ND[Z.m_.USER_OWNS_ENTITY]})]})})]})}),[je,Ie,re]),ve=S.ZP.roles.list({},{},{pauseFetch:!le}).data,Ae=(0,c.useMemo)((function(){return(0,N.YC)((null===ve||void 0===ve?void 0:ve.roles)||[],"name")}),[ve]),Le=(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.rolesMapping)||{}}),[ne]),Se=(0,c.useMemo)((function(){return(0,N.YC)(Object.values(Le),"name")}),[Le]),be=S.ZP.users.list({},{},{pauseFetch:!le}).data,De=((0,c.useMemo)((function(){return(0,N.YC)((null===be||void 0===be?void 0:be.users)||[],(function(e){return(0,y.s)(e)}))}),[be]),(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.usersMapping)||{}}),[ne])),Pe=(0,c.useMemo)((function(){return(0,N.YC)(Object.values(De),(function(e){return(0,y.s)(e)}))}),[De]),Te=(0,c.useMemo)((function(){return(null===Se||void 0===Se?void 0:Se.length)>=1}),[Se]),Re=(0,c.useMemo)((function(){return(0,W.jsx)(a.ZP,{beforeIcon:(0,W.jsx)(D.mm,{}),compact:!0,onClick:function(){q(U.ROLES),K(!1)},primary:!Te,secondary:Te,small:!0,children:"Add roles"})}),[Te,q,K]),Oe=(0,c.useMemo)((function(){return(null===Pe||void 0===Pe?void 0:Pe.length)>=1}),[Pe]),Ce=(0,c.useCallback)((function(e,n){return(0,W.jsx)(I.Z,{columnFlex:[null,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===Le||void 0===Le?void 0:Le[n]}));return(0,W.jsx)(u.Z,{checked:n,onClick:function(t){(0,w.j)(t),re(n?{rolesMapping:{}}:{rolesMapping:(0,N.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Role"}],onClickRow:n?function(n){var t=e[n];t&&window.open("/settings/workspace/roles/".concat(null===t||void 0===t?void 0:t.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.name,t=e.id,i=!(null===Le||void 0===Le||!Le[t]);return[(0,W.jsx)(u.Z,{checked:i,onClick:function(n){(0,w.j)(n);var r=M({},Le);i?null===r||void 0===r||delete r[t]:r[t]=e,re({rolesMapping:r})}},"checkbox"),(0,W.jsx)(g.ZP,{monospace:!0,children:n},"name")]})),uuid:"roles"})}),[Le,re]),ye=(0,c.useCallback)((function(e,n){return(0,W.jsx)(I.Z,{columnFlex:[1,1,1],columns:[{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"}],onClickRow:n?function(n){var t=e[n];t&&window.open("/settings/workspace/users/".concat(null===t||void 0===t?void 0:t.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.first_name,t=e.last_name,i=e.username;return[(0,W.jsx)(g.ZP,{children:i},"username"),(0,W.jsx)(g.ZP,{default:!0,children:n},"firstName"),(0,W.jsx)(g.ZP,{default:!0,children:t},"lastName")]})),uuid:"users"})}),[De,re]),Ne=(0,c.useMemo)((function(){return Ce(Ae)}),[Ce,Ae]),Be=(0,c.useMemo)((function(){return Ce(Se,!0)}),[Ce,Se]),ke=(0,c.useMemo)((function(){return ye(Pe,!0)}),[ye,Pe]),we=(0,W.jsxs)(b.N,{children:[(0,W.jsxs)(E.Z,{noPadding:!0,children:[(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsx)(x.Z,{level:4,children:le?"Permission ".concat(null===le||void 0===le?void 0:le.id):"New permission"})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsxs)(g.ZP,{danger:"entity_name"in J&&!(null!==ne&&void 0!==ne&&ne.entity_name),default:!0,large:!0,children:["Entity ","entity_name"in J&&!(null!==ne&&void 0!==ne&&ne.entity_name)&&(0,W.jsx)(g.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(f.Z,{flex:1,justifyContent:"flex-end",children:(0,W.jsx)(p.Z,{afterIconSize:Y,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,onChange:function(e){return re({entity_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Select an entity",value:(null===ne||void 0===ne?void 0:ne.entity_name)||"",children:de.map((function(e){return(0,W.jsx)("option",{value:e,children:(0,O.j3)(e)},e)}))})})]})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Entity subtype"}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(f.Z,{flex:1,justifyContent:"flex-end",children:(0,W.jsxs)(p.Z,{afterIconSize:Y,alignRight:!0,autoComplete:"off",large:!0,monospace:!0,noBackground:!0,noBorder:!0,onChange:function(e){return re({entity_type:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Select an entity subtype",value:(null===ne||void 0===ne?void 0:ne.entity_type)||"",children:[(0,W.jsx)("option",{value:""}),ae.map((function(e){return(0,W.jsx)("option",{value:e,children:e},e)}))]})})]})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Enity UUID"}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsx)(A.Z,{afterIcon:(0,W.jsx)(D.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:Y,alignRight:!0,autoComplete:"off",large:!0,monospace:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({entity_id:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. pipeline_uuid",value:(null===ne||void 0===ne?void 0:ne.entity_id)||""})})]})})]}),(0,W.jsx)(_.Z,{mb:P.HN}),(0,W.jsxs)(E.Z,{noPadding:!0,children:[(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsx)(x.Z,{level:4,children:"Access"})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Groups"})}),_e(Z.G9)]})}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Special conditions"})}),ge]})})]}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Operations"})}),_e(Z.Pt)]})}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Disable operations"})}),_e(Z.oO)]})})]}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsxs)(m.ZP,{alignItems:"flex-start",children:[(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Read attributes"})}),_e(Z.Fy)]})}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{fullWidth:!0,p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Readable attributes (comma separated)"})}),(0,W.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return re({read_attributes:e.target.value})},placeholder:"e.g. email",value:(null===ne||void 0===ne?void 0:ne.read_attributes)||""})]})})]}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsxs)(m.ZP,{alignItems:"flex-start",children:[(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Write attributes"})}),_e(Z.H1)]})}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{fullWidth:!0,p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Writable attributes (comma separated)"})}),(0,W.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return re({write_attributes:e.target.value})},placeholder:"e.g. password",value:(null===ne||void 0===ne?void 0:ne.write_attributes)||""})]})})]}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsxs)(m.ZP,{alignItems:"flex-start",children:[(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Query parameters"})}),_e(Z.hl)]})}),(0,W.jsx)(f.Z,{flex:1,children:(0,W.jsxs)(_.Z,{fullWidth:!0,p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Parameters that can be queried (comma separated)"})}),(0,W.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return re({query_attributes:e.target.value})},placeholder:"e.g. include_outputs",value:(null===ne||void 0===ne?void 0:ne.query_attributes)||""})]})})]})]}),(0,W.jsx)(_.Z,{mb:P.HN}),le&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(E.Z,{noPadding:!0,children:[(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,W.jsx)(x.Z,{level:4,children:"Roles"}),(0,W.jsx)(_.Z,{mr:P.cd}),Te&&(0,W.jsx)(m.ZP,{alignItems:"center",children:Re})]})}),(0,W.jsx)(h.Z,{light:!0}),!Te&&(0,W.jsxs)(_.Z,{p:P.cd,children:[(0,W.jsx)(_.Z,{mb:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,children:"This permission is currently not attached to any role."})}),(0,W.jsx)(m.ZP,{alignItems:"center",children:Re})]}),Te&&(0,W.jsx)(_.Z,{pb:P.Mq,children:Be})]}),(0,W.jsx)(_.Z,{mb:P.HN}),(0,W.jsxs)(E.Z,{noPadding:!0,children:[(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsx)(m.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,W.jsx)(x.Z,{level:4,children:"Users"})})}),(0,W.jsx)(h.Z,{light:!0}),!Oe&&(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsx)(g.ZP,{default:!0,children:"There are currently no users with this permission."})}),Oe&&(0,W.jsx)(_.Z,{pb:P.Mq,children:ke})]}),(0,W.jsx)(_.Z,{mb:P.HN}),(0,W.jsxs)(E.Z,{noPadding:!0,children:[(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsx)(x.Z,{level:4,children:"Metadata"})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Last updated"}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,W.jsx)(g.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ne||void 0===ne?void 0:ne.updated_at)&&(0,C.d$)(null===ne||void 0===ne?void 0:ne.updated_at,{includeSeconds:!0})}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(D.Pf,{muted:!0,size:Y}),(0,W.jsx)(_.Z,{mr:1})]})]})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Created at"}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,W.jsx)(g.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ne||void 0===ne?void 0:ne.created_at)&&(0,C.d$)(null===ne||void 0===ne?void 0:ne.created_at,{includeSeconds:!0})}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(D.Pf,{muted:!0,size:Y}),(0,W.jsx)(_.Z,{mr:1})]})]})}),(0,W.jsx)(h.Z,{light:!0}),(0,W.jsx)(_.Z,{p:P.cd,children:(0,W.jsxs)(m.ZP,{alignItems:"center",children:[(0,W.jsx)(g.ZP,{default:!0,large:!0,children:"Created by"}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,W.jsx)(g.ZP,{large:!0,monospace:!0,muted:!0,children:(0,y.s)(null===le||void 0===le?void 0:le.user)}),(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(D.Pf,{muted:!0,size:Y}),(0,W.jsx)(_.Z,{mr:1})]})]})})]}),(0,W.jsx)(_.Z,{mb:P.HN})]}),(0,W.jsxs)(m.ZP,{children:[(0,W.jsx)(a.ZP,{beforeIcon:(0,W.jsx)(D.vc,{}),disabled:!J||!(null!==(n=Object.keys(J))&&void 0!==n&&n.length),loading:me,onClick:function(){return fe({permission:M(M({},(0,B.GL)(ne,["access","conditions","entity_id","entity_name","entity_type","query_attributes","read_attributes","write_attributes"],{include_blanks:!0})),le?{role_ids:Object.keys((null===ne||void 0===ne?void 0:ne.rolesMapping)||{}).map((function(e){return Number(e)}))}:{})})},primary:!0,children:le?"Save changes":"Create new permission"}),s&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(a.ZP,{onClick:function(){return null===s||void 0===s?void 0:s()},secondary:!0,children:"Cancel and go back"})]}),le&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(_.Z,{mr:P.cd}),(0,W.jsx)(a.ZP,{beforeIcon:(0,W.jsx)(D.rF,{}),danger:!0,loading:pe,onClick:function(){return Ze()},children:"Delete permission"})]})]})]});return t?we:(0,W.jsx)(j.Z,{after:U.ROLES===z?Ne:null,afterHeader:(0,W.jsx)(_.Z,{px:P.cd,children:(0,W.jsx)(g.ZP,{bold:!0,children:z})}),afterHidden:F,afterWidth:60*P.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Permissions"},linkProps:{href:"/settings/workspace/permissions"}},{bold:!0,label:function(){return"Permission ".concat(null===le||void 0===le?void 0:le.id)}}],hideAfterCompletely:!0,setAfterHidden:K,title:null!==le&&void 0!==le&&le.id?"Permission ".concat(null===le||void 0===le?void 0:le.id):"New permission",uuidItemSelected:T.B2.PERMISSIONS,uuidWorkspaceSelected:T.Pl.USER_MANAGEMENT,children:le&&we})}},8193:function(e,n,t){t.d(n,{N:function(){return o},Z:function(){return c}});var i=t(38626),r=t(44897),s=t(42631),l=t(70515),c=2*l.iI,o=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],s.n_,l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))},36288:function(e,n,t){t.d(n,{Fy:function(){return m},G9:function(){return a},H1:function(){return x},K4:function(){return o},ND:function(){return d},Pt:function(){return u},WG:function(){return s},hl:function(){return f},m_:function(){return l},oO:function(){return h}});var i,r,s,l,c=t(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(s||(s={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(l||(l={}));var o=(i={},(0,c.Z)(i,s.OWNER,"Owner"),(0,c.Z)(i,s.ADMIN,"Admin"),(0,c.Z)(i,s.EDITOR,"Editor"),(0,c.Z)(i,s.VIEWER,"Viewer"),(0,c.Z)(i,s.LIST,"List"),(0,c.Z)(i,s.DETAIL,"Detail"),(0,c.Z)(i,s.CREATE,"Create"),(0,c.Z)(i,s.UPDATE,"Update"),(0,c.Z)(i,s.DELETE,"Delete"),(0,c.Z)(i,s.OPERATION_ALL,"All operations"),(0,c.Z)(i,s.QUERY,"Query"),(0,c.Z)(i,s.QUERY_ALL,"Query all attributes"),(0,c.Z)(i,s.READ,"Read"),(0,c.Z)(i,s.READ_ALL,"Read all attributes"),(0,c.Z)(i,s.WRITE,"Write"),(0,c.Z)(i,s.WRITE_ALL,"Write all attributes"),(0,c.Z)(i,s.ALL,"All"),(0,c.Z)(i,s.DISABLE_LIST,"Disable list"),(0,c.Z)(i,s.DISABLE_DETAIL,"Disable detail"),(0,c.Z)(i,s.DISABLE_CREATE,"Disable create"),(0,c.Z)(i,s.DISABLE_UPDATE,"Disable update"),(0,c.Z)(i,s.DISABLE_DELETE,"Disable delete"),(0,c.Z)(i,s.DISABLE_OPERATION_ALL,"Disable all operations"),(0,c.Z)(i,s.DISABLE_QUERY,"Disable query"),(0,c.Z)(i,s.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,c.Z)(i,s.DISABLE_READ,"Disable read"),(0,c.Z)(i,s.DISABLE_READ_ALL,"Disable all read attributes"),(0,c.Z)(i,s.DISABLE_WRITE,"Disable write"),(0,c.Z)(i,s.DISABLE_WRITE_ALL,"Disable all write attributes"),i),d=(r={},(0,c.Z)(r,l.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,c.Z)(r,l.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,c.Z)(r,l.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),r),a=[s.OWNER,s.ADMIN,s.EDITOR,s.VIEWER,s.ALL],u=[s.LIST,s.DETAIL,s.CREATE,s.UPDATE,s.DELETE,s.OPERATION_ALL],h=[s.DISABLE_LIST,s.DISABLE_DETAIL,s.DISABLE_CREATE,s.DISABLE_UPDATE,s.DISABLE_DELETE,s.DISABLE_OPERATION_ALL],f=[s.QUERY,s.QUERY_ALL,s.DISABLE_QUERY,s.DISABLE_QUERY_ALL],m=[s.READ,s.READ_ALL,s.DISABLE_READ,s.DISABLE_READ_ALL],x=[s.WRITE,s.WRITE_ALL,s.DISABLE_WRITE,s.DISABLE_WRITE_ALL]},65956:function(e,n,t){var i=t(38626),r=t(55485),s=t(38276),l=t(30160),c=t(44897),o=t(42631),d=t(47041),a=t(70515),u=t(28598),h=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*a.iI,1.5*a.iI,1.5*a.iI),f=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],o.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=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],o.n_,o.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 ")})),x=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*a.iI,d.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*a.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),E=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],o.M8,o.YF,1.75*a.iI);n.Z=function(e){var n=e.borderless,t=e.children,i=e.containerRef,c=e.contentContainerRef,o=e.dark,d=e.footer,a=e.fullHeight,h=void 0===a||a,Z=e.fullWidth,p=void 0===Z||Z,j=e.header,_=e.headerHeight,I=e.headerIcon,g=e.headerPaddingVertical,v=e.headerTitle,A=e.maxHeight,L=e.maxWidth,S=e.minWidth,b=e.noPadding,D=e.overflowVisible,P=e.subtitle,T=e.success;return(0,u.jsxs)(f,{borderless:n,dark:o,fullHeight:h,fullWidth:p,maxHeight:A,maxWidth:L,minWidth:S,overflowVisible:D,ref:i,success:T,children:[(j||v)&&(0,u.jsxs)(m,{headerPaddingVertical:g,height:_,children:[j&&j,v&&(0,u.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,u.jsxs)(r.ZP,{alignItems:"center",children:[I&&I,(0,u.jsx)(s.Z,{ml:I?1:0,children:(0,u.jsx)(l.ZP,{bold:!0,default:!0,children:v})})]})})]}),(0,u.jsxs)(x,{maxHeight:A,noPadding:b,overflowVisible:D,ref:c,children:[P&&"string"===typeof P&&(0,u.jsx)(s.Z,{mb:2,children:(0,u.jsx)(l.ZP,{default:!0,children:P})}),P&&"string"!==typeof P&&P,t]}),d&&(0,u.jsx)(E,{children:d})]})}},76417:function(e,n,t){function i(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}t.d(n,{s:function(){return i}})},48277:function(e,n,t){t.d(n,{$P:function(){return d},JI:function(){return s},VJ:function(){return o},fD:function(){return l},uf:function(){return r},vN:function(){return c}});var i=t(75582),r=function(e){var n=String(e).split("."),t=(0,i.Z)(n,2),r=t[0],s=t[1];return"".concat(r.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(s?".".concat(s):"")};function s(e){var n=Math.floor(Date.now()/1e3);return e>0?n-e:n}function l(e){return(e>>>0).toString(2)}function c(e,n){return String(BigInt(e)+BigInt(n))}function o(e,n){return String(BigInt(e)-BigInt(n))}function d(e){return parseInt(e,2)}}}]);