mage-ai 0.9.68__py3-none-any.whl → 0.9.69__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.
- mage_ai/api/resources/SeedResource.py +2 -1
- mage_ai/api/resources/SessionResource.py +13 -1
- mage_ai/authentication/permissions/constants.py +2 -0
- mage_ai/authentication/permissions/seed.py +32 -21
- mage_ai/authentication/providers/active_directory.py +4 -3
- mage_ai/authentication/providers/okta.py +22 -83
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +77 -7
- mage_ai/data_preparation/models/block/__init__.py +7 -3
- mage_ai/data_preparation/models/block/data_integration/mixins.py +16 -5
- mage_ai/data_preparation/models/block/dynamic/child.py +3 -0
- mage_ai/data_preparation/models/block/dynamic/variables.py +2 -2
- mage_ai/data_preparation/models/block/extension/utils.py +1 -0
- mage_ai/data_preparation/models/block/integration/__init__.py +1 -1
- mage_ai/data_preparation/models/block/sql/__init__.py +1 -1
- mage_ai/data_preparation/models/pipeline.py +22 -6
- mage_ai/data_preparation/models/utils.py +6 -0
- mage_ai/data_preparation/models/variable.py +18 -4
- mage_ai/data_preparation/repo_manager.py +3 -2
- mage_ai/data_preparation/shared/utils.py +1 -1
- mage_ai/data_preparation/templates/data_exporters/mysql.py +2 -2
- mage_ai/data_preparation/templates/data_exporters/oracledb.py +27 -0
- mage_ai/data_preparation/templates/repo/metadata.yaml +1 -0
- mage_ai/io/bigquery.py +131 -58
- mage_ai/io/mysql.py +38 -6
- mage_ai/io/snowflake.py +152 -29
- mage_ai/orchestration/db/models/oauth.py +4 -4
- mage_ai/orchestration/db/models/schedules.py +9 -2
- mage_ai/orchestration/job_manager.py +6 -0
- mage_ai/orchestration/pipeline_scheduler_original.py +16 -6
- mage_ai/orchestration/queue/celery_queue.py +8 -1
- mage_ai/orchestration/queue/process_queue.py +67 -4
- mage_ai/orchestration/queue/queue.py +8 -0
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/{i8pymuJDTVHdWjUP1QSh1 → _krrrgup_C-dPOpX36S8I}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3548-fa0792ddb88f4646.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-a66b4c7641ae03eb.js → pipeline-runs-3edc6270c5b0e962.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-cb88fd075a357fcf.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-1bdfda8edc9cf4a8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-79a4cf66a623e667.js → sync-data-8b793b3b696a2cd3.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js +1 -0
- mage_ai/server/frontend_dist/block-layout.html +2 -2
- mage_ai/server/frontend_dist/compute.html +2 -2
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-data-products.html +2 -2
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/files.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/oauth.html +2 -2
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +2 -2
- mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist/templates.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +2 -2
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/{CKCvjsYCf2imD2X8zAOBf → KLL5mirre9d7_ZeEpaw3s}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-fa0792ddb88f4646.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-a66b4c7641ae03eb.js → pipeline-runs-3edc6270c5b0e962.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-cb88fd075a357fcf.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-1bdfda8edc9cf4a8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-79a4cf66a623e667.js → sync-data-8b793b3b696a2cd3.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/oauth.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
- mage_ai/server/scheduler_manager.py +7 -0
- mage_ai/server/server.py +12 -5
- mage_ai/server/websocket_server.py +1 -0
- mage_ai/settings/keys/auth.py +2 -0
- mage_ai/settings/server.py +1 -1
- mage_ai/streaming/sources/influxdb.py +2 -0
- mage_ai/streaming/sources/kafka.py +1 -1
- mage_ai/tests/api/endpoints/mixins.py +10 -9
- mage_ai/tests/api/endpoints/test_seeds.py +24 -0
- mage_ai/tests/api/operations/test_sessions.py +53 -2
- mage_ai/tests/authentication/providers/test_okta.py +43 -0
- mage_ai/tests/orchestration/db/models/test_oauth.py +3 -3
- mage_ai/tests/orchestration/queue/test_process_queue.py +1 -0
- mage_ai/tests/server/test_server.py +8 -4
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.69.dist-info}/METADATA +4 -4
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.69.dist-info}/RECORD +203 -200
- mage_ai/server/frontend_dist/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3548-961ff79ca70038c7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-08790743315de36a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-13760bb72d823b69.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-bd0aff5a5ed8888c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-d1ee961387c58b7f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-ceb06e1616ee9610.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-8ff16ef9566e911a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-d7a8bc51bb7a1082.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-f59d34429fe022ee.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-961ff79ca70038c7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-08790743315de36a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-13760bb72d823b69.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-bd0aff5a5ed8888c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-d1ee961387c58b7f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-ceb06e1616ee9610.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-8ff16ef9566e911a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-d7a8bc51bb7a1082.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-f59d34429fe022ee.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{i8pymuJDTVHdWjUP1QSh1 → _krrrgup_C-dPOpX36S8I}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{CKCvjsYCf2imD2X8zAOBf → KLL5mirre9d7_ZeEpaw3s}/_ssgManifest.js +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.69.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.69.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.69.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.69.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1557],{54750:function(e,n,t){var i=t(82394),r=t(12691),l=t.n(r),o=t(55485),c=t(48670),a=t(44085),s=t(38276),d=t(4190),u=t(30160),h=t(72473),f=t(70515),v=t(28598),p=t(82684);function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.breadcrumbs,t=e.noMarginLeft,i=n.length,r=[];return n.forEach((function(e,n){var x=e.bold,m=e.danger,g=e.label,b=e.linkProps,Z=e.loading,y=e.monospace,C=void 0===y||y,M=e.onClick,F=e.options,O=g();i>=2&&n>=1&&r.push((0,v.jsx)(s.Z,{mx:1,children:(0,v.jsx)(h.ChevronRight,{muted:!0})},"divider-".concat(O)));var H=(0,v.jsx)(u.ZP,{bold:x,danger:m,default:!x,monospace:C,noWrapping:!0,children:O});if((null===F||void 0===F?void 0:F.length)>=1){var w,P,k=null===F||void 0===F?void 0:F.find((function(e){return!!e.selected}));if(k)(w=((null===k||void 0===k||null===(P=k.uuid)||void 0===P?void 0:P.length)||0)*f.ro)&&(w+=3*f.iI,Z&&(w+=2*f.iI));H=(0,v.jsx)(o.ZP,{alignItems:"center",children:(0,v.jsx)(a.Z,{afterIcon:Z?(0,v.jsx)(d.Z,{inverted:!0,small:!0}):null,danger:m,defaultTextColor:!x,maxWidth:w||null,monospace:C,noBackground:!0,noBorder:!0,onChange:function(e){var n,t=e.target.value,i=null===F||void 0===F?void 0:F.find((function(e){return e.uuid===t}));i&&null!==i&&void 0!==i&&i.onClick&&(null===i||void 0===i||null===(n=i.onClick)||void 0===n||n.call(i,t))},paddingHorizontal:0,paddingVertical:0,value:(null===k||void 0===k?void 0:k.uuid)||"",children:null===F||void 0===F?void 0:F.map((function(e){var n=e.label,t=e.selected,i=e.uuid,r=n?null===n||void 0===n?void 0:n():i;return(0,v.jsx)("option",{value:i,children:t?i:r},i)}))})})}var z=(0,v.jsx)(s.Z,{ml:t||0!==n?0:2,children:H},"breadcrumb-".concat(O));b?z=(0,p.createElement)(l(),j(j({},b),{},{key:"breadcrumb-link-".concat(O),passHref:!0}),(0,v.jsx)(c.Z,{block:!0,default:!x,noOutline:!0,sameColorAsText:x,children:z})):M&&(z=(0,v.jsx)(c.Z,{block:!0,default:!x,noOutline:!0,onClick:M,preventDefault:!0,sameColorAsText:x,children:z})),r.push(z)})),(0,v.jsx)(o.ZP,{alignItems:"center",children:r})}},31557:function(e,n,t){t.d(n,{Z:function(){return Ve}});var i=t(21831),r=t(82394),l=t(75582),o=t(12691),c=t.n(o),a=t(25976),s=t(82684),d=t(34376),u=t(40761),h=t(54750),f=t(71180),v=t(39867),p=t(50724),x=t(58036),j=t(97618),m=t(55485),g=t(70374),b=t(56085),Z=t(69864),y=t(70652),C=t(44085),M=t(38276),F=t(4190),O=t(28026),H=t(30160),w=t(35576),P=t(17488),k=t(69650),z=t(35686),_=t(72473),D=t(44897),S=t(42631),I=t(31353),E=t(47041),A=t(70515),L=a.default.div.withConfig({displayName:"GitActionsstyle__HeaderStyle",componentId:"sc-ynrhio-0"})(["border-bottom:1px solid #1B1C20;height:","px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;"],I.Mz),N=a.default.div.withConfig({displayName:"GitActionsstyle__TerminalStyle",componentId:"sc-ynrhio-1"})(["height:calc(75vh - ","px);position:relative;"],I.Mz),B=a.default.div.withConfig({displayName:"GitActionsstyle__PanelStyle",componentId:"sc-ynrhio-2"})(["height:75vh;min-height:300px;width:75vw;backgroundColor:#232429;border-radius:","px;",""],S.n_,(function(e){return"\n background-color: ".concat((e.theme.background||D.Z.background).panel,";\n ")})),T=a.default.div.withConfig({displayName:"GitActionsstyle__OutputStyle",componentId:"sc-ynrhio-3"})([""," padding:","px;height:calc(75vh - ","px);overflow-y:auto;"],E.w5,2*A.iI,I.Mz),U=t(4383),W=t(72619),R=t(86735),G=t(50178),Y=t(28598);function q(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 J(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var V={clone:"Clone repository",new_branch:"Create new branch",commit:"Commit & push",pull:"Pull",reset_hard:"Hard reset"};var Q=function(e){var n,t=e.branch,i=(e.fetchBranch,(0,s.useState)()),r=i[0],o=i[1],c=(0,s.useState)(),a=c[0],d=c[1],u=(0,s.useState)(),h=u[0],v=u[1],p=(0,s.useState)(),x=p[0],j=p[1],g=(0,s.useState)(),D=g[0],S=g[1],I=(0,s.useState)(),E=I[0],A=I[1],q=z.ZP.git_custom_branches.list(),Q=q.data,$=q.mutate,K=(0,s.useMemo)((function(){return null===Q||void 0===Q?void 0:Q.git_custom_branches}),[Q]),X=z.ZP.syncs.list().data,ee=(0,s.useMemo)((function(){var e;if(X)return null===(e=X.syncs)||void 0===e?void 0:e[0]}),[X]),ne=(0,Z.Db)(z.ZP.git_branches.useCreate(),{onSuccess:function(e){return(0,W.wD)(e,{callback:function(){$(),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),te=(0,l.Z)(ne,2),ie=te[0],re=te[1].isLoading,le=(0,Z.Db)((function(){return z.ZP.git_branches.useUpdate(t)({git_branch:{action_type:"status"}})}),{onSuccess:function(e){return(0,W.wD)(e,{onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),oe=(0,l.Z)(le,1)[0],ce=(0,Z.Db)(z.ZP.git_branches.useUpdate(t),{onSuccess:function(e){return(0,W.wD)(e,{callback:function(){S(null),j("DONE")},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),ae=(0,l.Z)(ce,2),se=ae[0],de=ae[1].isLoading,ue=(0,Z.Db)(z.ZP.git_branches.useUpdate(t),{onSuccess:function(e){return(0,W.wD)(e,{callback:function(){S(null),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),he=(0,l.Z)(ue,2),fe=he[0],ve=he[1].isLoading,pe=(0,s.useState)(),xe=pe[0],je=pe[1],me=(0,s.useState)([]),ge=me[0],be=me[1],Ze=(0,s.useState)([]),ye=Ze[0],Ce=Ze[1],Me=(0,s.useCallback)((function(){oe().then((function(e){var n=e.data,t=null===n||void 0===n?void 0:n.git_branch,i=null===t||void 0===t?void 0:t.status,r=null===t||void 0===t?void 0:t.modified_files,l=null===t||void 0===t?void 0:t.untracked_files;je(i),be(l),Ce(r)}))}),[oe]),Fe=(0,s.useMemo)((function(){return re||de||ve}),[re,de,ve]);(0,s.useEffect)((function(){return Me()}),[h,Me]);var Oe=(0,s.useMemo)((function(){return(0,G.PR)()||{}}),[]),He=(0,s.useMemo)((function(){var e={term_name:null!==Oe&&void 0!==Oe&&Oe.id?"git_".concat(null===Oe||void 0===Oe?void 0:Oe.id):"git"};return null!==ee&&void 0!==ee&&ee.repo_path&&(e.cwd=null===ee||void 0===ee?void 0:ee.repo_path),e}),[null===ee||void 0===ee?void 0:ee.repo_path,Oe]),we=(0,b.ZP)((0,U.Ib)("terminal"),{shouldReconnect:function(){return!0}},"cwd"in He),Pe=we.lastMessage,ke=we.sendMessage,ze=(0,s.useCallback)((function(e){return(0,Y.jsx)(y.Z,{checked:((null===r||void 0===r?void 0:r.files)||[]).includes(e),label:(0,Y.jsx)(H.ZP,{small:!0,children:e}),onClick:function(){o((function(n){var t=(null===n||void 0===n?void 0:n.files)||[];return t=t.includes(e)?(0,R.Od)(t,(function(n){return n===e})):[e].concat(t),J(J({},n),{},{files:t})}))},small:!0},e)}),[r]),_e=(0,s.useMemo)((function(){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(f.ZP,{onClick:function(){return o((function(e){return J(J({},e),{},{files:ye.concat(ge)})}))},children:"Include all changes"}),ye&&ye.length>0&&(0,Y.jsxs)(M.Z,{mb:1,children:[(0,Y.jsx)(M.Z,{my:1,children:(0,Y.jsx)(H.ZP,{children:"Modified files"})}),ye.map(ze)]}),ge&&ge.length>0&&(0,Y.jsxs)(M.Z,{mb:1,children:[(0,Y.jsx)(M.Z,{my:1,children:(0,Y.jsx)(H.ZP,{children:"Untracked files"})}),ge.map(ze)]})]})}),[ze,ye,ge]),De=(0,s.useMemo)((function(){return(0,Y.jsx)(M.Z,{p:2,children:Fe?(0,Y.jsx)(F.Z,{color:"white"}):(0,Y.jsxs)(Y.Fragment,{children:["commit"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(w.Z,{compact:!0,fullWidth:!0,label:"Commit message",monospace:!0,onChange:function(e){return o((function(n){return J(J({},n),{},{message:e.target.value})}))},required:!0,value:null===r||void 0===r?void 0:r.message}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsxs)(m.ZP,{children:[(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){se({git_branch:J({action_type:"commit"},r)}).then((function(){Me(),o(null)}))},success:!0,children:"Commit"}),(0,Y.jsx)(M.Z,{mr:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){se({git_branch:{action_type:"push"}})},primary:!0,children:"Push"})]})]}),"new_branch"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(P.Z,{compact:!0,fullWidth:!0,label:"Branch name",monospace:!0,onChange:function(e){return o({name:e.target.value})},value:null===r||void 0===r?void 0:r.name}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){ie({git_branch:r})},primary:!0,children:"Create"})]}),"clone"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(H.ZP,{children:["Clone from ",(0,Y.jsx)(H.ZP,{default:!0,inline:!0,children:null===ee||void 0===ee?void 0:ee.remote_repo_link})," to ",(0,Y.jsx)(H.ZP,{default:!0,inline:!0,children:null===ee||void 0===ee?void 0:ee.repo_path}),". This ",(0,Y.jsx)(H.ZP,{danger:!0,inline:!0,children:"will overwrite"})," any existing data in the local repository."]}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){fe({git_branch:{action_type:"clone"}})},primary:!0,children:"Clone"})]}),"pull"===h&&(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){fe({git_branch:{action_type:"pull"}})},primary:!0,children:"Pull"}),"reset_hard"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{mb:1,children:(0,Y.jsx)(H.ZP,{children:a||"This will reset your local branch to match the remote branch."})}),a?(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){d(null),fe({git_branch:{action_type:"reset"}})},warning:!0,children:"Confirm"}):(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){return d("Are you sure you want to reset your branch? Your local changes may be erased.")},primary:!0,children:"Reset branch"})]}),(0,Y.jsx)(M.Z,{mt:1,children:!Fe&&(0,Y.jsxs)(Y.Fragment,{children:[!D&&x&&(0,Y.jsx)(H.ZP,{children:x}),D&&(0,Y.jsx)(H.ZP,{preWrap:!0,danger:!0,children:D})]})})]})})}),[Fe,h,D,ee,x,r,a,xe]),Se=(0,s.useMemo)((function(){return(0,Y.jsx)(O.Z,{lastMessage:Pe,sendMessage:ke})}),[Pe,ke]);return(0,Y.jsxs)(B,{children:[(0,Y.jsxs)(L,{children:[(0,Y.jsx)(M.Z,{m:2,children:(0,Y.jsxs)(m.ZP,{children:[(0,Y.jsx)(C.Z,{beforeIcon:(0,Y.jsx)(_.Branch,{}),compact:!0,onChange:function(e){e.preventDefault(),ie({git_branch:{name:e.target.value}})},placeholder:"Select a branch",value:t,children:null===K||void 0===K?void 0:K.map((function(e){var n=e.name;return(0,Y.jsx)("option",{value:n,children:n},n)}))},"select_branch"),(0,Y.jsx)(M.Z,{ml:2}),(0,Y.jsxs)(C.Z,{compact:!0,onChange:function(e){e.preventDefault(),v(e.target.value),A(!1),j(null),o(null)},value:h,children:[(0,Y.jsx)("option",{value:"",children:"Select an action"}),Object.entries(V).map((function(e){var n=(0,l.Z)(e,2),t=n[0],i=n[1];return(0,Y.jsx)("option",{value:t,children:i},t)}))]},"select_git_action")]})}),(0,Y.jsx)(M.Z,{m:2,children:(0,Y.jsxs)(m.ZP,{alignItems:"center",children:[(0,Y.jsx)(H.ZP,{children:"UI"}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(k.Z,{checked:!!E,monotone:!0,onCheck:function(){return A((function(e){return!e}))}}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(H.ZP,{children:"Terminal"})]})})]}),(0,Y.jsxs)(m.ZP,{children:[(0,Y.jsx)("div",{style:{width:"50%"},children:(0,Y.jsx)(T,{children:"commit"===h?_e:(0,Y.jsx)(Y.Fragment,{children:null===xe||void 0===xe||null===(n=xe.split("\\n"))||void 0===n?void 0:n.map((function(e){return(0,Y.jsx)(H.ZP,{monospace:!0,preWrap:!0,small:!0,children:e},e)}))})})}),(0,Y.jsx)("div",{style:{width:"50%"},children:E?(0,Y.jsx)(N,{children:Se}):De})]})]})},$=t(65186),K=t(68562),X=t(81106),ee=t(65927),ne=t(48670),te=t(63637),ie=t(89515),re=t(82359),le=t(26304),oe="12px 20px",ce="1px",ae=(0,a.default)(f.ZP).withConfig({displayName:"indexstyle__ButtonStyle",componentId:"sc-hssntx-0"})(["",";"],(function(e){return e.active&&"\n background-color: ".concat((e.theme.background||D.Z.background).dashboard,";\n ")})),se=a.default.div.withConfig({displayName:"indexstyle__DropdownContainerStyle",componentId:"sc-hssntx-1"})(["position:absolute;top:",";right:0;width:","px;display:flex;flex-direction:column;gap:",";overflow:hidden;background-color:",";border-radius:","px;border:1px solid ",";"],(function(e){return e.top||0}),45*A.iI,ce,(function(e){return(e.theme.borders||D.Z.borders).darkLight}),S.n_,(function(e){return(e.theme.borders||D.Z.borders).darkLight})),de=a.default.div.withConfig({displayName:"indexstyle__DropdownHeaderStyle",componentId:"sc-hssntx-2"})(["padding:",";background-color:",";"],oe,(function(e){return(e.theme.background||D.Z.background).panel})),ue=a.default.div.withConfig({displayName:"indexstyle__TimeListContainerStyle",componentId:"sc-hssntx-3"})(["height:","px;display:flex;gap:",";"],20*A.iI,ce),he=a.default.div.withConfig({displayName:"indexstyle__TimeColumnStyle",componentId:"sc-hssntx-4"})(["display:flex;flex-direction:column;align-items:center;flex:1;gap:",";"],ce),fe=a.default.div.withConfig({displayName:"indexstyle__DropdownCellStyle",componentId:"sc-hssntx-5"})(["width:100%;padding:",";display:flex;flex-direction:",";flex-grow:",";justify-content:center;align-items:center;background-color:",";"],oe,(function(e){return e.flexDirection||"unset"}),(function(e){return e.flexGrow||"unset"}),(function(e){return(e.theme.background||D.Z.background).dashboard})),ve=a.default.div.withConfig({displayName:"indexstyle__ToggleGroupStyle",componentId:"sc-hssntx-6"})(["display:flex;flex-direction:column;"]),pe=(0,a.default)(fe).withConfig({displayName:"indexstyle__ToggleDropdownCellStyle",componentId:"sc-hssntx-7"})(["justify-content:flex-start;gap:12px;padding-right:","px;"],1.25*A.iI),xe=["active","mountedCallback","time","timeZone"];function je(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 me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?je(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):je(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ge(e){var n=e.active,t=e.mountedCallback,i=e.time,r=e.timeZone,l=(0,le.Z)(e,xe),o=(0,s.useRef)(null);return(0,s.useEffect)((function(){null!==o&&void 0!==o&&o.current&&t(o.current.offsetHeight)}),[t]),(0,Y.jsx)(ae,me(me({},l),{},{active:n,borderLess:!0,borderRadius:"".concat(S.BG,"px"),compact:!0,highlightOnHoverAlt:!0,ref:o,transparent:!0,children:(0,Y.jsx)(H.ZP,{inline:!0,monospace:!0,noWrapping:!0,small:!0,children:"".concat(i," ").concat(r)})}))}var be=(0,s.memo)(ge),Ze=t(12468),ye=t(63055),Ce=t(72191),Me=t(70320),Fe=t(79633),Oe=t(3917),He=t(78419),we=t(53808);var Pe=t(23780);function ke(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 ze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ke(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ke(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _e=[Oe.Oh.UTC,Oe.Oh.LOCAL];var De=function(e){var n=e.projectName,t=(0,s.useState)((0,Me.qB)()),i=t[0],o=t[1],c=(0,s.useState)((0,we.U2)(He.kL,!1)),a=c[0],d=c[1],u=(0,s.useState)(!1),h=u[0],f=u[1],v=(0,s.useState)((0,Oe.e)({includeSeconds:!0,timeZones:_e})),x=v[0],j=v[1],m=(0,s.useState)(0),g=m[0],b=m[1],y=i?Oe.Oh.LOCAL:Oe.Oh.UTC,C=window.innerWidth<ye.nc,M=(0,Pe.VI)(null,{},[],{uuid:"components/ServerTimeDropdown"}),F=(0,l.Z)(M,1)[0],O=(0,Z.Db)(z.ZP.projects.useUpdate(n),{onSuccess:function(e){return(0,W.wD)(e,{onErrorCallback:function(e,n){return F({errors:n,response:e})}})}}),w=(0,l.Z)(O,1)[0],P=(0,s.useCallback)((function(){f((function(e){return!e}))}),[]),_=(0,s.useCallback)((function(e){b(e)}),[]),D=(0,s.useCallback)((function(){var e=(0,Oe.e)({includeSeconds:a,timeZones:_e});j((function(n){return n.size===e.size&&n.get(Oe.Oh.UTC)===e.get(Oe.Oh.UTC)?n:e}))}),[a]),S=[{checked:i,label:"Display local timezone (requires refresh)",onCheck:function(){var e=!i;o((0,Me.hY)(e)),w({project:{features:(0,r.Z)({},re.d.LOCAL_TIMEZONE,e)}})},uuid:re.d.LOCAL_TIMEZONE},{checked:a,label:"Include seconds in current time",onCheck:function(){var e;d((e=!a,!!(0,we.uN)(He.kL,e)))},uuid:"current_time_seconds"}];return(0,s.useEffect)((function(){var e=setInterval((function(){D()}),1e3);return function(){return clearInterval(e)}}),[D]),(0,s.useEffect)((function(){D()}),[a,D]),x?(0,Y.jsx)(p.Z,{onClickOutside:function(){return f(!1)},open:!0,children:(0,Y.jsxs)("div",{style:{position:"relative"},children:[(0,Y.jsx)(be,{active:h,disabled:C,mountedCallback:_,onClick:P,time:x.get(y),timeZone:(0,Oe.WT)(y)}),!C&&h&&(0,Y.jsxs)(se,{top:g,children:[(0,Y.jsx)(de,{children:(0,Y.jsx)(H.ZP,{bold:!0,muted:!0,uppercase:!0,children:"Current Time"})}),(0,Y.jsx)(ue,{children:_e.map((function(e){return(0,Y.jsxs)(he,{children:[(0,Y.jsx)(fe,{children:(0,Y.jsx)(H.ZP,{bold:!0,center:!0,muted:!0,uppercase:!0,children:"".concat(e).concat(e===Oe.Oh.LOCAL?" - ".concat((0,Oe.WT)(e)):"")})}),(0,Y.jsxs)(fe,{flexDirection:"column",flexGrow:3,children:[(0,Y.jsx)(H.ZP,{bold:!0,center:!0,color:Fe.J$,largeLg:!0,children:x.get(e)}),(0,Y.jsx)(H.ZP,{center:!0,muted:!0,small:!0,children:e===Oe.Oh.UTC?"Universal Time":Oe.mi[e]})]})]},e)}))}),(0,Y.jsx)(ve,{children:S.map((function(e){return(0,Y.jsxs)(pe,{children:[(0,Y.jsx)(k.Z,{checked:e.checked,compact:!0,onCheck:e.onCheck,purpleBackground:!0}),(0,Y.jsx)(H.ZP,{children:e.label}),e.uuid===re.d.LOCAL_TIMEZONE&&(0,Y.jsx)(Ze.Z,ze(ze({},Me.EB),{},{appearAbove:!0,appearBefore:!0,size:Ce.bL}))]},e.label)}))})]})]})}):null},Se=t(58401),Ie=t(59457),Ee=t(77417),Ae=t(46684),Le=t(16682),Ne=t(68804),Be=a.default.div.withConfig({displayName:"indexstyle__LinkStyle",componentId:"sc-y3uzxv-0"})(["padding:","px ","px;&:hover{cursor:pointer;","}",""],.5*A.iI,1.5*A.iI,(function(e){return"\n background-color: ".concat((e.theme.interactive||D.Z.interactive).hoverBackground,";\n ")}),(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||D.Z.interactive).hoverBackground,";\n ")})),Te=t(95363),Ue=t(74445),We=t(66472),Re=t(95924),Ge=t(69419),Ye=t(89538);function qe(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 Je(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qe(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ve=function(e){var n,t,o=e.breadcrumbs,b=e.menuItems,Z=e.project,y=e.version,C=(0,Pe.VI)(null,{},[],{uuid:"shared/Header"}),F=(0,l.Z)(C,1)[0],O=(0,s.useContext)(a.ThemeContext),w=(0,G.PR)(),P=(0,s.useState)(null),k=P[0],D=P[1],S=(0,s.useState)(!1),I=S[0],E=S[1],L=(0,s.useState)(!1),N=L[0],B=L[1],T=(0,s.useState)(null),U=T[0],W=T[1],R=(0,s.useState)(!1),q=R[0],J=R[1],V=(0,s.useState)(null),le=V[0],oe=V[1],ce=(0,s.useRef)(null),ae=(0,s.useRef)(null),se=(0,s.useRef)(null),de=(0,d.useRouter)(),ue=u.Z.isLoggedIn(),he=(0,Ie.Z)(z.ZP.git_branches.detail,"test",{_format:"with_basic_details"},{revalidateOnFocus:!1},{pauseFetch:(0,G.YB)()&&!ue},{delay:11e3}),fe=he.data,ve=he.mutate,pe=(0,s.useMemo)((function(){return(null===fe||void 0===fe?void 0:fe.git_branch)||{}}),[fe]),xe=pe.is_git_integration_enabled,je=pe.name,me=(0,Se.Z)().design,ge=(0,Ee.Z)(),be=ge.featureEnabled,Ze=ge.featureUUIDs,ye=ge.isLoadingUpdate,Ce=ge.project,Me=ge.rootProject,Oe=ge.updateProject,He=(0,s.useMemo)((function(){return Z||Ce}),[Ce,Z]),we=(0,s.useMemo)((function(){return y||(null===He||void 0===He?void 0:He.version)}),[He,y]),ke=(0,s.useMemo)((function(){return Le.WH.CLOSED===k||Le.WH.OPEN===k||(null===be||void 0===be?void 0:be(null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER))}),[k,be,Ze]);ae.current=He;var ze=(0,s.useCallback)((function(){ke?(0,We.WJ)():(E(!0),Oe({features:Je(Je({},(null===He||void 0===He?void 0:He.features)||{}),{},(0,r.Z)({},null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER,!0))}).then((function(e){var n;if(null!==e&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&n.error){var t;E(!1),F({errors:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error,response:e})}else{var i=new CustomEvent(Ne.YS.COMMAND_CENTER_ENABLED);window.dispatchEvent(i)}})))}),[ke,null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER,null===He||void 0===He?void 0:He.features,F,Oe]),_e=[];if(Me&&_e.push({label:function(){return null===Me||void 0===Me?void 0:Me.name},linkProps:{href:"/"}}),He){var qe={label:function(){return null===He||void 0===He?void 0:He.name}};Me?(qe.loading=ye&&!I,qe.options=Object.keys((null===Me||void 0===Me?void 0:Me.projects)||{}).map((function(e){return{onClick:function(){Oe({activate_project:e}).then((function(e){var n,t;null!==e&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&n.error?F({errors:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error,response:e}):window.location.reload()}))},selected:e===(null===He||void 0===He?void 0:He.name),uuid:e}}))):qe.linkProps={href:"/"},_e.push(qe)}var Ve=(0,s.useMemo)((function(){return[].concat(_e,(0,i.Z)(o||[]))}),[_e,o,He]),Qe=de.query.pipeline,$e=(He||{}).latest_version,Ke=(0,s.useState)(null),Xe=Ke[0],en=Ke[1],nn=((0,s.useMemo)((function(){var e,n,t=null===me||void 0===me||null===(e=me.components)||void 0===e||null===(n=e.header)||void 0===n?void 0:n.media;if(t){var i=new Image,r=(null===t||void 0===t?void 0:t.url)||(null===t||void 0===t?void 0:t.file_path);if("undefined"!==typeof r&&null!==r)return i.src=r,i.onload=function(){en(i)},i}}),[me,en]),(0,s.useMemo)((function(){var e,n,t=Ae.y7,i=(0,Y.jsx)($.Z,{height:Ae.y7});if(null!==me&&void 0!==me&&null!==(e=me.components)&&void 0!==e&&null!==(n=e.header)&&void 0!==n&&n.media){var r,l,o=null===me||void 0===me||null===(r=me.components)||void 0===r||null===(l=r.header)||void 0===l?void 0:l.media;if(null!==Xe){var a=((null===Xe||void 0===Xe?void 0:Xe.width)||1)/((null===Xe||void 0===Xe?void 0:Xe.height)||1);t=Ae.sQ,i=(0,Y.jsx)(Ae.XD,{height:Ae.sQ,width:Ae.sQ*a,url:(null===o||void 0===o?void 0:o.url)||(null===o||void 0===o?void 0:o.file_path)})}}return(0,Y.jsx)(c(),{as:"/",href:"/",passHref:!0,children:(0,Y.jsx)(ne.Z,{block:!0,height:t,noHoverUnderline:!0,noOutline:!0,children:i})})}),[Xe,me])),tn=[{label:function(){return"Settings"},linkProps:{href:"/settings/workspace/preferences"},uuid:"user_settings"},{label:function(){return"Launch command center"},onClick:function(e){(0,Re.j)(e),ze()},uuid:"Launch command center"}];(0,G.YB)()&&tn.push({label:function(){return"Sign out"},onClick:function(){u.Z.logout((function(){z.ZP.sessions.updateAsyncServer(null,1).then((function(){(0,Ge.nL)("/sign-in")})).catch((function(){(0,Ge.nL)("/")}))}))},uuid:"sign_out"});var rn=(0,Ye.dd)((function(){return(0,Y.jsx)(Q,{branch:je,fetchBranch:ve})}),{},[je,ve],{background:!0,uuid:"git_actions"}),ln=(0,l.Z)(rn,2),on=ln[0],cn=(ln[1],(0,s.useMemo)((function(){return(null===je||void 0===je?void 0:je.length)>=21?"".concat(je.slice(0,21),"..."):je}),[je])),an=(0,s.useMemo)((function(){return!(!w||null===w||void 0===w||!w.avatar)&&!/[A-Za-z0-9]+/.exec((null===w||void 0===w?void 0:w.avatar)||"")}),[w]),sn=(0,s.useMemo)((function(){return!(!w||null===w||void 0===w||!w.avatar)&&!!/[A-Za-z0-9]+/.exec((null===w||void 0===w?void 0:w.avatar)||"")}),[w]),dn=(0,s.useMemo)((function(){var e;if(!w||null===w||void 0===w||!w.avatar)return(0,Y.jsx)(te.Z,{});var n={color:null===O||void 0===O||null===(e=O.content)||void 0===e?void 0:e.active,fontFamily:Te.v$};return sn?(n.fontSize=2*A.iI,n.lineHeight="".concat(2*A.iI,"px"),n.position="relative",n.top=1):n.fontSize=3*A.iI,(0,Y.jsx)("div",{style:n,children:null===w||void 0===w?void 0:w.avatar})}),[sn,w]);return(0,s.useEffect)((function(){var e=function(e){var n,t,i=e.detail;null!==i&&void 0!==i&&i.state&&(D(null===i||void 0===i?void 0:i.state),Le.WH.MOUNTED===(null===i||void 0===i?void 0:i.state)&&(null!==ae&&void 0!==ae&&null!==(n=ae.current)&&void 0!==n&&null!==(t=n.features)&&void 0!==t&&t[re.d.COMMAND_CENTER]||setTimeout((function(){(0,We.WJ)(),E(!1)}),1)))};return window.addEventListener(Ne.Mt,e),function(){window.removeEventListener(Ne.Mt,e)}}),[]),(0,Y.jsx)(Ae.I5,{children:(0,Y.jsx)(x.Z,{children:(0,Y.jsxs)(m.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"space-between",children:[(0,Y.jsxs)(j.Z,{alignItems:"center",children:[nn,(0,Y.jsx)(h.Z,{breadcrumbs:Ve})]}),!!He&&(0,Y.jsxs)(j.Z,{flex:1,alignItems:"center",justifyContent:"center",children:[(0,Y.jsx)(M.Z,{ml:A.cd}),(0,Y.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){(0,Re.j)(e),ze()},children:(0,Y.jsx)(Ae._m,{active:Le.WH.OPEN===k,children:(0,Y.jsxs)(m.ZP,{alignItems:"center",children:[(0,Y.jsx)(Y.Fragment,{children:Le.WH.OPEN===k?(0,Y.jsx)(_.UFO,{muted:!0,size:2*A.iI}):(0,Y.jsx)(_.Planet,{size:2*A.iI,success:!I&&!ke,warning:I})}),(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),Le.WH.OPEN!==k&&(0,Y.jsx)(H.ZP,{default:!0,noWrapping:!0,weightStyle:4,children:ke?"Command Center":I?"Launching Command Center":"Launch Command Center"}),Le.WH.OPEN===k&&(0,Y.jsx)(H.ZP,{muted:!0,noWrapping:!0,children:"Command Center launched"}),I&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),(0,Y.jsx)(ee.Z,{color:null===O||void 0===O||null===(n=O.accent)||void 0===n?void 0:n.warning,loadingStyle:ee.F.BLOCKS,width:1.5*A.iI})]}),ke&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),(0,Y.jsx)(X.Z,{compact:!0,settings:(0,Ue.MK)(),small:!0})]})]})})}),(0,Y.jsx)(M.Z,{mr:A.cd})]}),(0,Y.jsxs)(j.Z,{alignItems:"center",children:[xe&&je&&(0,Y.jsx)(M.Z,{mr:1,children:(0,Y.jsx)(K.ZP,{compact:!0,highlightOnHoverAlt:!0,noBackground:!0,noHoverUnderline:!0,onClick:on,sameColorAsText:!0,title:je,uuid:"Header/GitActions",children:(0,Y.jsxs)(m.ZP,{alignItems:"center",children:[(0,Y.jsx)(_.BranchAlt,{size:1.5*A.iI}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(H.ZP,{monospace:!0,noWrapping:!0,small:!0,children:cn})]})})}),$e&&we&&$e!==we&&(0,Y.jsx)(f.ZP,{backgroundColor:Fe.$R,borderLess:!0,compact:!0,linkProps:{href:"https://docs.mage.ai/about/releases"},noHoverUnderline:!0,pill:!0,sameColorAsText:!0,target:"_blank",title:"Update to version ".concat($e),children:(0,Y.jsx)(H.ZP,{black:!0,bold:!0,children:"Update"})}),we&&"undefined"!==typeof we&&(0,Y.jsx)(M.Z,{px:1,children:(0,Y.jsx)(ne.Z,{href:"https://www.mage.ai/changelog",monospace:!0,noWrapping:!0,openNewWindow:!0,sameColorAsText:!0,small:!0,children:"v".concat(we)})}),(0,Y.jsx)(M.Z,{ml:1,children:(0,Y.jsx)(De,{projectName:null===He||void 0===He?void 0:He.name})}),(0,Y.jsx)(M.Z,{ml:1,children:(0,Y.jsx)(K.ZP,{beforeElement:(0,Y.jsx)(_.Slack,{}),compact:!0,highlightOnHoverAlt:!0,inline:!0,linkProps:{as:"https://www.mage.ai/chat",href:"https://www.mage.ai/chat"},noBackground:!0,noHoverUnderline:!0,openNewTab:!0,sameColorAsText:!0,uuid:"Header/live_chat",children:"Live help"})}),b&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{ml:2}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return W(null)},open:!0,style:{position:"relative"},children:(0,Y.jsxs)(m.ZP,{children:[(0,Y.jsx)(Be,{highlighted:0===U,onClick:function(){return W((function(e){return 0===e?null:0}))},onMouseEnter:function(){return W((function(e){return null!==e?0:null}))},ref:ce,children:(0,Y.jsx)(H.ZP,{children:"Menu"})}),(0,Y.jsx)(g.Z,{alternateBackground:!0,items:b,onClickCallback:function(){return W(null)},open:0===U,parentRef:ce,rightOffset:0,setConfirmationAction:oe,setConfirmationDialogueOpen:J,uuid:"PipelineDetail/Header/menu"})]})}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return J(!1)},open:q,children:(0,Y.jsx)(ie.Z,{danger:!0,onCancel:function(){return J(!1)},onClick:le,right:16*A.iI,subtitle:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",title:"Are you sure you want to delete the pipeline ".concat(Qe,"?"),width:40*A.iI})})]}),(ue||!(0,G.YB)())&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return B(!1)},open:!0,style:{position:"relative"},children:(0,Y.jsxs)(m.ZP,{alignItems:"flex-end",flexDirection:"column",children:[(0,Y.jsx)(K.ZP,{compact:!0,highlightOnHoverAlt:!0,inline:!0,noBackground:!0,noHoverUnderline:!0,onClick:function(){return B(!0)},ref:se,uuid:"Header/menu",children:an&&(null===w||void 0===w||null===(t=w.avatar)||void 0===t?void 0:t.length)>=2?dn:(0,Y.jsx)(v.Z,{color:Fe.Jm,size:4*A.iI,children:dn})}),(0,Y.jsx)(g.Z,{alternateBackground:!0,items:tn,onClickCallback:function(){return B(!1)},open:N,parentRef:se,rightOffset:0,uuid:"shared/Header/user_menu"})]})})]})]})]})})})}},63637:function(e,n,t){var i=t(25976),r=t(28598),l=i.default.svg.withConfig({displayName:"Mage8Bit__SVGStyle",componentId:"sc-cj6ltf-0"})([""]);n.Z=function(e){var n=e.size,t=void 0===n?20:n,i=e.viewBox,o=void 0===i?"0 0 20 20":i;return(0,r.jsxs)(l,{height:t,viewBox:o,width:t,children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_297_42814)",children:[(0,r.jsx)("path",{d:"M13.334 0h1.66667v1.66667H13.334zM11.666 1.6665h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 1.6665h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M8.33398 1.6665h1.66667v1.66667H8.33398z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M8.33398 3.3335h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 3.3335h1.66667v1.66667H6.66602z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M3.33398 5h1.66667v1.66667H3.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M5 5h1.66667v1.66667H5z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 5h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 5h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 8.3335h1.66667v1.66667H6.66602z",fill:"#000"}),(0,r.jsx)("path",{d:"M6.66602 6.6665h1.66667v1.66667H6.66602z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M6.66602 10h1.66667v1.66667H6.66602z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M8.33398 6.6665h1.66667v1.66667H8.33398z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M1.66602 13.3335h1.66667v1.66667H1.66602z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M1.66602 11.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 10h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 8.3335h1.66667v1.66667H1.66602zM1.66602 6.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 6.6665h1.66667v1.66667H1.66602zM0 0h1.66667v1.66667H0zM3.33398 1.6665h1.66667v1.66667H3.33398zM0 3.3335h1.66667v1.66667H0z",fill:"#2ECDF7"}),(0,r.jsx)("path",{d:"M1.66602 16.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 16.6665h1.66667v1.66667H1.66602zM1.66602 18.3335h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 15h1.66667v1.66667H1.66602zM3.33398 15h1.66667v1.66667H3.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M3.33398 16.6665h1.66667v1.66667H3.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M3.33398 13.3335h1.66667v1.66667H3.33398z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M8.33398 8.3335h1.66667v1.66667H8.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M10 6.6665h1.66667v1.66667H10z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M10 10h1.66667v1.66667H10z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M11.666 6.6665h1.66667v1.66667H11.666z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M11.666 8.3335h1.66667v1.66667H11.666z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M8.33398 10h1.66667v1.66667H8.33398z",fill:"#FF8DA9"}),(0,r.jsx)("path",{d:"M8.33398 11.6665h1.66667v1.66667H8.33398z",fill:"#FF8DA9"}),(0,r.jsx)("path",{d:"M6.66602 11.6665h1.66667v1.66667H6.66602z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M6.66602 11.6665h1.66667v1.66667H6.66602z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M5 10h1.66667v1.66667H5z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M5 8.3335h1.66667v1.66667H5z",fill:"#232429"}),(0,r.jsx)("path",{d:"M8.33398 11.6665h1.66667v1.66667H8.33398zM8.33398 13.3335h1.66667v1.66667H8.33398z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M10 11.6665h1.66667v1.66667H10z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M11.666 10h1.66667v1.66667H11.666zM13.334 6.6665h1.66667v1.66667H13.334zM13.334 8.3335h1.66667v1.66667H13.334z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M15 8.3335h1.66667v1.66667H15z",fill:"#757575"}),(0,r.jsx)("path",{d:"M15 10h1.66667v1.66667H15z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M10 8.3335h1.66667v1.66667H10z",fill:"#000"}),(0,r.jsx)("path",{d:"M8.33398 5h1.66667v1.66667H8.33398zM11.666 5h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 10h1.66667v1.66667H13.334zM11.666 11.6665h1.66667v1.66667H11.666zM10 13.3335h1.66667v1.66667H10z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M8.33398 15h1.66667v1.66667H8.33398zM6.66602 13.3335h1.66667v1.66667H6.66602zM15 11.6665h1.66667v1.66667H15z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M16.666 11.6665h1.66667v1.66667H16.666zM16.666 13.3335h1.66667v1.66667H16.666z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M15 13.3335h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 13.3335h1.66667v1.66667H13.334zM13.334 11.6665h1.66667v1.66667H13.334zM11.666 13.3335h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 15h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 15h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M8.33398 16.6665h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 15h1.66667v1.66667H6.66602z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M6.66602 16.6665h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M5 16.6665h1.66667v1.66667H5z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M5 18.3335h1.66667v1.66667H5z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 18.3335h1.66667v1.66667H6.66602zM8.33398 18.3335h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 18.3335h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 18.3335h1.66667v1.66667H11.666zM13.334 18.3335h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 18.3335h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M16.666 18.3335h1.66667v1.66667H16.666z",fill:"#652EFF"}),(0,r.jsx)("path",{d:"M3.33398 18.3335h1.66667v1.66667H3.33398zM10 16.6665h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 16.6665h1.66667v1.66667H11.666zM13.334 15h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 16.6665h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 16.6665h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 15h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M16.666 15h1.66667v1.66667H16.666zM18.334 16.6665h1.66667v1.66667H18.334zM18.334 18.3335h1.66667v1.66667H18.334z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M16.666 16.6665h1.66667v1.66667H16.666z",fill:"#652EFF"}),(0,r.jsx)("path",{d:"M13.334 5h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 5h1.66667v1.66667H15zM10 5h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 3.3335h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 3.3335h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 0h1.66667v1.66667H11.666z",fill:"#AF93FF"})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_297_42814",children:(0,r.jsx)("path",{d:"M0 0h20v20H0z",fill:"#fff"})})})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2717],{8916:function(e,n,t){t.d(n,{FS:function(){return s},JZ:function(){return v},Tt:function(){return d},e7:function(){return h},wx:function(){return a}});var i=t(75582),r=t(82394),l=t(83784),o=t(30229);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){return"string"===typeof e?e:JSON.stringify(e)}function a(e,n){var t,i;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(i=t.variables)||void 0===i?void 0:i.map((function(e){var n=e.value;return c(c({},e),{},{value:s(n)})}))}function d(e){var n;return null===(n=a(e,(function(e){return e.uuid===l.C})))||void 0===n?void 0:n.reduce((function(e,n){var t=n.uuid,i=n.value;return c(c({},e),{},(0,r.Z)({},t,i))}),{})}function v(e,n){return n===o.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===o.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function h(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,i.Z)(n,2),l=t[0],o=t[1],u=o;try{u=JSON.parse(o)}catch(s){}return c(c({},e),{},(0,r.Z)({},l,u))}),{}):e}},81334:function(e,n,t){t.d(n,{Z:function(){return _}});var i=t(82394),r=t(82684),l=t(27277),o=t(31882),u=t(38276),c=t(48381),s=t(30160),a=t(17488),d=t(25976),v=t(44897),h=t(42631),p=t(47041),f=t(70515),m=d.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-suwkha-0"})([""," border-radius:","px;max-height:","px;overflow:auto;position:absolute;width:100%;z-index:1;"," ",""],p.w5,h.BG,40*f.iI,(function(e){return"\n background-color: ".concat((e.theme.background||v.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||v.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset-.5*f.iI,"px;\n ")})),j=d.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-suwkha-1"})(["padding:","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],.5*f.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||v.Z.interactive).hoverBackground,";\n ")})),x=t(39643),g=t(95924),Z=t(86735),b=t(44688),y=t(28598);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=function(e){var n,t=e.removeTag,i=e.selectTag,d=e.selectedTags,v=void 0===d?[]:d,h=e.tags,p=void 0===h?[]:h,f=e.uuid,P=(0,r.useRef)(null),_=(0,r.useState)(!1),k=_[0],S=_[1],w=(0,r.useState)(null),C=w[0],I=w[1],T=(0,r.useMemo)((function(){return(0,Z.YC)(p||[],"uuid")}),[p]),E=(0,r.useMemo)((function(){return null===T||void 0===T?void 0:T.map((function(e){return{itemObject:e,searchQueries:[e.uuid],value:e.uuid}}))}),[T]),M=(0,r.useMemo)((function(){return(null===C||void 0===C?void 0:C.length)>=1?E.concat({itemObject:{uuid:C},searchQueries:[C],value:"Add tag: ".concat(C)}):E}),[E,C]),D=(0,b.y)(),N=D.registerOnKeyDown,A=D.unregisterOnKeyDown;return(0,r.useEffect)((function(){return function(){return A(f)}}),[A,f]),null===N||void 0===N||N(f,(function(e,n){var t;k&&n[x.vP]&&(S(!1),null===P||void 0===P||null===(t=P.current)||void 0===t||t.blur())}),[k,P]),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(c.Z,{onClickTag:t,tags:v}),(0,y.jsxs)(u.Z,{mt:1,style:{position:"relative"},children:[(0,y.jsx)(a.Z,{onBlur:function(){return setTimeout((function(){return S(!1)}),150)},onChange:function(e){return I(e.target.value)},onFocus:function(){return S(!0)},ref:P,value:C||""}),(0,y.jsx)(m,{topOffset:null===P||void 0===P||null===(n=P.current)||void 0===n?void 0:n.getBoundingClientRect().height,children:(0,y.jsx)(l.Z,{itemGroups:[{items:k?M:[],renderItem:function(e,n){var t=e.value;return(0,y.jsx)(j,O(O({},n),{},{onClick:function(e){var t;(0,g.j)(e),null===n||void 0===n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:(0,y.jsx)(o.Z,{small:!0,children:(0,y.jsx)(s.ZP,{children:t})})}))}}],onSelectItem:function(e){var n=e.itemObject;null===i||void 0===i||i(n),I(null)},searchQuery:C,uuid:f})})]})]})}},71610:function(e,n,t){var i=t(82394),r=t(75582),l=t(12691),o=t.n(l),u=t(25976),c=t(82684),s=t(32013),a=t(98777),d=t(15338),v=t(48670),h=t(88543),p=t(38276),f=t(4190),m=t(75499),j=t(30160),x=t(35686),g=t(70515),Z=t(30229),b=t(32080),y=t(81728),P=t(3917),O=t(55283),_=t(70320),k=t(28598);function S(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 w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?S(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):S(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var C={large:!1};n.Z=function(e){var n=e.bookmarkValues,t=e.originalBookmarkValues,l=e.setBookmarkValues,S=e.pipeline,I=(0,c.useContext)(u.ThemeContext),T=(0,_.qB)(),E=(0,c.useState)(null),M=E[0],D=E[1],N=(0,c.useMemo)((function(){return null!==S&&void 0!==S&&S.blocks?(0,b.n)(S):null}),[S]),A=(0,c.useMemo)((function(){return Object.keys(N||{})||[]}),[N]),L=x.ZP.integration_sources.pipelines.list(null===S||void 0===S?void 0:S.uuid,{block_uuid:A},{},{pauseFetch:!(null!==A&&void 0!==A&&A.length)}).data,H=(0,c.useMemo)((function(){return null===L||void 0===L?void 0:L.integration_sources}),[L]);return(0,c.useEffect)((function(){if((null===H||void 0===H?void 0:H.length)>=1&&(!n||!M)){var e={};null===H||void 0===H||H.map((function(n){var t,i=n.block,l=n.streams,o=null===i||void 0===i?void 0:i.uuid;e[o]={},null===(t=Object.entries(l||{}))||void 0===t||t.forEach((function(n){var t,i,l=(0,r.Z)(n,2),u=l[0],c=l[1];e[o][u]=null===c||void 0===c||null===(t=c.state)||void 0===t||null===(i=t.bookmarks)||void 0===i?void 0:i[u]}))})),n||l(e),M||D(e)}}),[n,M,l,D,H]),(0,k.jsxs)(p.Z,{p:g.cd,children:[!L&&(0,k.jsx)(f.Z,{inverted:!0,small:!0}),null===H||void 0===H?void 0:H.map((function(e){var u=e.block,f=e.pipeline_run,x=e.pipeline_schedule,b=e.streams,_=null===u||void 0===u?void 0:u.uuid;return(0,k.jsx)(h.Z,{title:(0,k.jsx)(j.ZP,{color:(0,O.qn)(null===u||void 0===u?void 0:u.type,{blockColor:null===u||void 0===u?void 0:u.color,theme:I}).accent,monospace:!0,children:_}),children:(0,k.jsx)(s.Z,{noBorder:!0,noBoxShadow:!0,children:Object.entries(b||{}).map((function(e){var u,s,b,O,I=(0,r.Z)(e,2),E=I[0],D=I[1],N=D.record,A=D.state,L=(null===A||void 0===A||null===(u=A.bookmarks)||void 0===u?void 0:u[E])||{};return(0,k.jsxs)(a.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:E}),titleXPadding:g.cd*g.iI,titleYPadding:g.cd*g.iI,children:[(0,k.jsx)(h.S,w(w({},C),{},{title:"Last pipeline run started at",children:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:(null===f||void 0===f?void 0:f.started_at)&&(0,P.XG)(null===f||void 0===f?void 0:f.started_at,T)})})),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsx)(h.S,w(w({},C),{},{title:"Last pipeline run completed at",children:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:(null===f||void 0===f?void 0:f.completed_at)&&(0,P.XG)(null===f||void 0===f?void 0:f.completed_at,T)})})),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsx)(h.S,w(w({},C),{},{title:"Trigger",children:(0,k.jsx)(o(),{as:"/pipelines/".concat(null===S||void 0===S?void 0:S.uuid,"/triggers/").concat(null===x||void 0===x?void 0:x.id),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,k.jsx)(v.Z,{block:!0,default:!0,openNewWindow:!0,children:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:null===x||void 0===x?void 0:x.name})})})})),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsx)(h.S,w(w({},C),{},{title:"Type",children:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:(0,y.kC)((null===(s=Z.Z4[null===x||void 0===x?void 0:x.schedule_type])||void 0===s?void 0:s.call(Z.Z4))||"")})})),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsx)(h.S,w(w({},C),{},{title:"Frequency",children:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:null===x||void 0===x?void 0:x.schedule_interval})})),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsxs)(p.Z,{p:g.cd,children:[(0,k.jsx)(j.ZP,{bold:!0,large:!0,children:"Bookmark values"}),(0,k.jsx)(p.Z,{mt:1,children:(0,k.jsxs)(j.ZP,{muted:!0,small:!0,children:["Overriding the bookmark values will be applied to all pipeline runs",(0,k.jsx)("br",{}),"for this trigger until there is at least 1 successful pipeline run in this trigger."]})})]}),(0,k.jsx)(d.Z,{light:!0,short:!0}),!(null!==(b=Object.values(L||{}))&&void 0!==b&&b.length)&&(0,k.jsx)(p.Z,{p:g.cd,children:(0,k.jsx)(j.ZP,{muted:!0,children:"There are currently no bookmark values for this stream."})}),Object.entries(L||{}).map((function(e){var o,u,s,a,d,v,p=(0,r.Z)(e,2),f=p[0],m=(p[1],null===n||void 0===n||null===(o=n[_])||void 0===o||null===(u=o[E])||void 0===u?void 0:u[f]),x=(null===t||void 0===t||null===(s=t[_])||void 0===s||null===(a=s[E])||void 0===a||a[f],null===M||void 0===M||null===(d=M[_])||void 0===d||null===(v=d[E])||void 0===v?void 0:v[f]);return(0,c.createElement)(h.S,w(w({},C),{},{title:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:f}),description:x&&x!==m&&(0,k.jsxs)(j.ZP,{muted:!0,small:!0,children:["Original bookmark value from the last pipeline run: ",(0,k.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:x})]}),key:"".concat(_,"-bookmark-values-").concat(f),textInput:{monospace:!0,onChange:function(e){return l((function(t){var r;return w(w({},t),{},(0,i.Z)({},_,w(w({},null===n||void 0===n?void 0:n[_]),{},(0,i.Z)({},E,w(w({},null===n||void 0===n||null===(r=n[_])||void 0===r?void 0:r[E]),{},(0,i.Z)({},f,e.target.value))))))}))},value:String(m||"")}}))})),(0,k.jsx)(d.Z,{light:!0}),(0,c.createElement)(h.S,w(w({},C),{},{title:"Record",description:"The most recently synced record.",key:"block-uuid-".concat(_,"-").concat(E)}),(0,k.jsx)(m.Z,{columnFlex:[1,null],columns:[{uuid:"Column"},{uuid:"Value"}],rows:null===(O=Object.entries(N||{}))||void 0===O?void 0:O.map((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];return[(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:t},t),(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:String(i)},"".concat(t,"-").concat(i))]}))}))]})}))})})}))]})}},88785:function(e,n,t){t.d(n,{J:function(){return c},U:function(){return u}});var i=t(25976),r=t(44897),l=t(42631),o=t(70515),u=i.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*o.iI,o.cd*o.iI,o.cd*o.iI,40*o.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||r.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||r.Z.interactive).linkPrimary,";\n ")})),c=i.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,o.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||r.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*o.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*o.iI,"px;\n ")}))},12717:function(e,n,t){t.d(n,{Z:function(){return ze}});var i=t(21831),r=t(82394),l=t(75582),o=t(12691),u=t.n(o),c=t(82684),s=t(20026),a=t.n(s),d=t(92083),v=t.n(d),h=t(21764),p=t(69864),f=t(34376),m=t(71610),j=t(71180),x=t(90299),g=t(14805),Z=t(70652),b=t(50724),y=t(9134),P=t(39457),O=t(25976),_=t(39867),k=t(55485),S=t(85854),w=t(38276),C=t(75499),I=t(30160),T=t(17488),E=t(12468),M=t(44375),D=t(70515),N=t(55283),A=t(86735),L=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 q(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,r.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 z=function(e){var n=e.blocks,t=e.updateVariables,i=e.variables,l=(0,c.useContext)(O.ThemeContext),o=(0,c.useCallback)((function(e,n){return t((function(){var t=(null===i||void 0===i?void 0:i.__mage_variables)||{},l=(null===t||void 0===t?void 0:t.blocks)||{},o=l[e]||{},u=(null===o||void 0===o?void 0:o.configuration)||{};return q(q({},i),{},{__mage_variables:q(q({},t),{},{blocks:q(q({},l),{},(0,r.Z)({},e,q(q({},o),{},{configuration:q(q({},u),n)})))})})}))}),[t,i]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(S.Z,{children:"dbt runtime settings"}),(0,L.jsx)(w.Z,{mt:D.Mq,children:(0,L.jsx)(C.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,r,u=e.type,c=e.uuid,s=(0,M.IU)(e).name,a=(0,N.qn)(u,{blockColor:e.color,theme:l}).accent,d=null===i||void 0===i||null===(n=i.__mage_variables)||void 0===n||null===(t=n.blocks)||void 0===t||null===(r=t[c])||void 0===r?void 0:r.configuration,v=d||{},h=v.prefix,p=v.suffix,f=(null===d||void 0===d?void 0:d.flags)||[],m=!(null===f||void 0===f||!f.includes(M.Dy));return[(0,L.jsx)(E.Z,{block:!0,label:(0,L.jsx)(I.ZP,{monospace:!0,small:!0,children:c}),size:null,widthFitContent:!0,children:(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(_.Z,{color:a,size:1.5*D.iI,square:!0}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsxs)(I.ZP,{monospace:!0,small:!0,children:[h&&(0,L.jsx)(I.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:h}),s,p&&(0,L.jsx)(I.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:p})]})]})},"uuid-".concat(c)),(0,L.jsx)(k.ZP,{alignItems:"center",children:(0,L.jsx)(Z.Z,{checked:m,label:M.Dy,monospace:!0,onClick:function(){return o(c,{flags:m?(0,A.Od)(f,(function(e){return M.Dy===e})):f.concat(M.Dy)})},small:!0})},"flags-".concat(c)),(0,L.jsx)(T.Z,{compact:!0,monospace:!0,onChange:function(e){return o(c,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:h,width:10*D.iI},"prefix-".concat(c)),(0,L.jsx)(T.Z,{compact:!0,monospace:!0,onChange:function(e){return o(c,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:p,width:10*D.iI},"suffix-".concat(c))]}))})})]})},U=t(97196),F=t(15338),R=t(97618),V=t(48670),W=t(26304),B=t(44897),Y=t(95363),X=t(61896),J=["children","large","lineHeight","ordered"];function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?G(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Q=(0,O.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||B.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||B.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||B.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(Y.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(Y.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(X.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(X.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(X.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),$=O.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],Q),ee=O.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],Q),ne=O.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*D.iI,"px;\n ")}));var te,ie=function(e){var n=e.children,t=e.large,i=e.lineHeight,r=e.ordered,l=(0,W.Z)(e,J),o=r?ee:$;return(0,L.jsx)(o,K(K({large:t,lineHeight:i},l),{},{children:c.Children.map(n,(function(e,n){var i;return(0,L.jsx)(ne,K(K({large:t,marginTop:n>=1},l),{},{children:c.cloneElement(e)}),(null===(i=e.props)||void 0===i?void 0:i.key)||n)}))}))},re=t(37899),le=t(75457),oe=t(30229),ue=t(57653),ce=t(83784),se=t(44085),ae=t(81334),de=t(69650),ve=t(81769),he=t(54193),pe=t(72473),fe=t(81728),me=t(16488),je=t(70320),xe=(te={},(0,r.Z)(te,he.zj.DATE,pe.CalendarDate),(0,r.Z)(te,he.zj.DATETIME,pe.Schedule),(0,r.Z)(te,he.zj.DICTIONARY,pe.DocumentIcon),(0,r.Z)(te,he.zj.FLOAT,pe.NumberWithDecimalHash),(0,r.Z)(te,he.zj.INTEGER,pe.NumberHash),(0,r.Z)(te,he.zj.LIST,pe.TodoList),(0,r.Z)(te,he.zj.STRING,pe.Alphabet),te);var ge=function(e){var n,t,i,r=e.containerRef,o=e.date,u=e.interactions,s=e.pipeline,a=e.pipelineInteraction,d=e.pipelineSchedule,v=e.setVariables,h=e.showSummary,p=e.time,f=e.triggerTypes,m=e.variables,j=(0,c.useMemo)((function(){return(0,A.HK)(u||[],(function(e){return e.uuid}))}),[u]),x=(0,c.useMemo)((function(){return(null===s||void 0===s?void 0:s.blocks)||[]}),[s]),g=(0,c.useMemo)((function(){return(null===a||void 0===a?void 0:a.blocks)||{}}),[a]),Z=(0,c.useMemo)((function(){var e=[];null===x||void 0===x||x.length;return null===x||void 0===x||x.map((function(n,t){var i=(n||{uuid:null}).uuid,l=(null===g||void 0===g?void 0:g[i])||[];null===l||void 0===l||l.length;e.push((0,L.jsx)(w.Z,{p:D.cd,children:null===l||void 0===l?void 0:l.map((function(e,n){return(0,L.jsx)(w.Z,{mt:n>=1?2*D.cd:0,children:(0,L.jsx)(ve.Z,{blockInteraction:e,containerRef:r,interaction:null===j||void 0===j?void 0:j[null===e||void 0===e?void 0:e.uuid],setVariables:v,variables:m})},"".concat(null===e||void 0===e?void 0:e.uuid,"-").concat(n))}))}))})),e}),[x,r,j,v,m]),b=(0,je.qB)(),y=(0,c.useMemo)((function(){return o&&null!==p&&void 0!==p&&p.hour&&null!==p&&void 0!==p&&p.minute?(0,me.XM)(o,p,{convertToUtc:b,includeSeconds:!0,localTimezone:b}):null}),[o,b,p]),P=(0,c.useMemo)((function(){var e=[];null===x||void 0===x||x.length;return null===x||void 0===x||x.map((function(n,t){var i=(n||{uuid:null}).uuid,r=(null===g||void 0===g?void 0:g[i])||[];null===r||void 0===r||r.forEach((function(n,r){var o=null===j||void 0===j?void 0:j[null===n||void 0===n?void 0:n.uuid];Object.entries((null===o||void 0===o?void 0:o.variables)||{}).forEach((function(n,o){var u,c=(0,l.Z)(n,2),s=c[0],a=c[1],d=a.name,v=a.required,h=a.types,p=null===m||void 0===m?void 0:m[s],f="undefined"===typeof p,j=v&&f,x=(null===xe||void 0===xe?void 0:xe[h[0]])||pe.Alphabet,g=[];"undefined"!==typeof p?p&&Array.isArray(p||[])?null===p||void 0===p||p.forEach((function(e){g.push(e&&"object"===typeof e?g.push(JSON.stringify(e)):g.push(String(e)))})):p&&"object"===typeof p?Object.entries(p||{}).forEach((function(e){var n=(0,l.Z)(e,2),t=n[0];n[1]&&g.push(String(t))})):g.push(String(p)):g.push(p||""),e.push([(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(x,{default:!0,size:1.5*D.iI}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,monospace:!0,children:s})]},"".concat(i,"-").concat(s,"-label-").concat(d,"-").concat(t,"-").concat(r,"-").concat(o)),(0,L.jsx)(w.Z,{py:D.cd,children:(0,L.jsxs)(I.ZP,{danger:j,monospace:!j,muted:f,children:[f&&!j&&"-",j&&"This is required",!f&&!j&&(null===g||void 0===g||null===(u=g.map((function(e){return String(e)})))||void 0===u?void 0:u.join(", "))]})},"".concat(i,"-").concat(s,"-value-").concat(d,"-").concat(p,"-").concat(t,"-").concat(r,"-").concat(o))])}))}))})),(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:e})}),[x,j,m]);return(0,L.jsxs)(L.Fragment,{children:[!h&&Z,h&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(w.Z,{p:D.cd,children:(0,L.jsx)(S.Z,{children:"Settings"})}),(0,L.jsx)(F.Z,{light:!0,short:!0}),(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.Lightning,{default:!0}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Trigger type"})]},"trigger_type"),(0,L.jsx)(w.Z,{py:D.cd,children:(0,L.jsx)(I.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_type),monospace:!0,children:null!==d&&void 0!==d&&d.schedule_type?null===f||void 0===f||null===(n=f.find((function(e){return e.uuid===(null===d||void 0===d?void 0:d.schedule_type)})))||void 0===n||null===(t=n.label)||void 0===t?void 0:t.call(n):"This is required"})},"trigger_type_input")],[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.Alphabet,{default:!0}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,L.jsx)(w.Z,{py:D.cd,children:(0,L.jsx)(I.ZP,{danger:!(null!==d&&void 0!==d&&d.name),monospace:!0,children:(null===d||void 0===d?void 0:d.name)||"This is required"})},"trigger_name_input")],[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.Alphabet,{default:!0}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,L.jsx)(w.Z,{py:D.cd,children:(0,L.jsx)(I.ZP,{monospace:!0,muted:!(null!==d&&void 0!==d&&d.description),children:(null===d||void 0===d?void 0:d.description)||"-"})},"trigger_description_input")],[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.Schedule,{default:!0,size:1.5*D.iI}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,L.jsx)(w.Z,{py:D.cd,children:(0,L.jsxs)(I.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_interval),monospace:!0,muted:!(null!==d&&void 0!==d&&d.schedule_interval),children:[(null===d||void 0===d?void 0:d.schedule_interval)&&(0,fe.vg)((null===d||void 0===d||null===(i=d.schedule_interval)||void 0===i?void 0:i.substring(1))||""),!(null!==d&&void 0!==d&&d.schedule_interval)&&"This is required"]})},"frequency_input")],[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.CalendarDate,{default:!0,size:1.5*D.iI}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,L.jsx)(w.Z,{py:D.cd,children:(0,L.jsx)(I.ZP,{danger:!y,monospace:!!y,muted:!y,children:y||"This is required"})},"start_time_input")]]}),(0,L.jsx)(w.Z,{p:D.cd,children:(0,L.jsx)(S.Z,{children:"Customize"})}),(0,L.jsx)(F.Z,{light:!0,short:!0}),P]})]})},Ze=t(35686),be=t(77417),ye=t(44425),Pe=t(88785),Oe=t(3917),_e=t(82359),ke=t(28795),Se=t(41143),we={label:function(){return"CUSTOMIZE"},uuid:"customize"},Ce={label:function(){return"SETTINGS"},uuid:"settings"},Ie={label:function(){return"REVIEW"},uuid:"review"},Te=[Ce,we,Ie],Ee=t(32080),Me=t(22286),De=t(79500),Ne=t(8916),Ae=t(42122),Le=t(72619);function He(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 qe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?He(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):He(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ze=function(e){var n=e.creatingWithLimitation,t=e.errors,o=e.fetchPipelineSchedule,s=e.onCancel,d=e.pipeline,O=e.pipelineSchedule,_=e.setErrors,E=e.variables,M=e.useCreateScheduleMutation,H=(0,be.Z)().project,q=(0,c.useRef)(null),W=(0,f.useRouter)(),B=(0,je.qB)(),Y=null===d||void 0===d?void 0:d.uuid,X=(0,c.useMemo)((function(){return null===O||void 0===O?void 0:O.id}),[O]),J=(null===d||void 0===d?void 0:d.type)===ue.qL.STREAMING,G=(0,c.useMemo)((function(){var e;return null===O||void 0===O||null===(e=O.variables)||void 0===e?void 0:e[oe.PN]}),[O]),K=(0,c.useState)(G?"string"===typeof G&&(0,fe.Pb)(G)?JSON.stringify(G):G:null),Q=K[0],$=K[1],ee=(0,c.useState)([]),ne=ee[0],te=ee[1],ve=(0,c.useState)(!0),he=ve[0],xe=ve[1],He=(0,c.useState)(!1),ze=He[0],Ue=He[1],Fe=(0,c.useState)(!1),Re=Fe[0],Ve=Fe[1],We=(0,c.useState)(null),Be=We[0],Ye=We[1],Xe=(0,c.useState)({}),Je=Xe[0],Ge=Xe[1],Ke=(0,c.useState)(null),Qe=Ke[0],$e=Ke[1],en=(0,c.useState)(null),nn=en[0],tn=en[1],rn=(0,c.useState)(!1),ln=rn[0],on=rn[1],un=(0,c.useState)(null),cn=un[0],sn=un[1],an=(0,c.useState)(Te[0].uuid),dn=an[0],vn=an[1],hn=(0,c.useMemo)((function(){var e;return!(null===H||void 0===H||null===(e=H.features)||void 0===e||!e[_e.d.INTERACTIONS])}),[null===H||void 0===H?void 0:H.features]),pn=(0,c.useMemo)((function(){return!X&&n}),[n,X]),fn=Ze.ZP.pipeline_interactions.detail(hn&&Y,{filter_for_permissions:1}).data,mn=Ze.ZP.interactions.pipeline_interactions.list(hn&&Y).data,jn=(0,c.useMemo)((function(){return(null===fn||void 0===fn?void 0:fn.pipeline_interaction)||{}}),[fn]),xn=(0,c.useMemo)((function(){return(null===mn||void 0===mn?void 0:mn.interactions)||[]}),[mn]),gn=(0,c.useMemo)((function(){var e;return hn&&(null===(e=Object.keys((null===jn||void 0===jn?void 0:jn.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[hn,jn]),Zn=(0,c.useMemo)((function(){return!!X&&gn}),[gn,X]),bn=(0,c.useMemo)((function(){var e,n={};return null===jn||void 0===jn||null===(e=jn.permissions)||void 0===e||e.forEach((function(e){var t=e.triggers;null===t||void 0===t||t.forEach((function(e){var t=e.schedule_interval,i=e.schedule_type;null!==n&&void 0!==n&&n[i]||(n[i]={}),t&&(n[i][t]=!0)}))})),n}),[jn]),yn=(0,c.useMemo)((function(){return(0,Ne.wx)(E,(function(e){return e.uuid===ce.C}))}),[E]),Pn=(0,c.useMemo)((function(){return Qe||{}}),[Qe]),On=Pn.description,_n=Pn.name,kn=Pn.schedule_interval,Sn=Pn.schedule_type,wn=Pn.settings,Cn=Pn.start_time,In=Pn.tags,Tn=Pn.variables,En=void 0===Tn?{}:Tn;(0,c.useEffect)((function(){!Be&&wn&&Ye(wn)}),[Be,wn]);var Mn=(0,c.useState)(null),Dn=Mn[0],Nn=Mn[1],An=(0,c.useState)({hour:"00",minute:"00"}),Ln=An[0],Hn=An[1],qn=(0,c.useState)({dayOfMonth:null,dayOfWeek:null,hour:null,minute:null,second:null}),zn=qn[0],Un=qn[1],Fn=Ze.ZP.event_rules.detail(oe.Xm.EVENT===Sn?"aws":null).data,Rn=(0,c.useMemo)((function(){var e;return(null===Fn||void 0===Fn||null===(e=Fn.event_rule)||void 0===e?void 0:e.rules)||[]}),[Fn]),Vn=(0,c.useMemo)((function(){return(0,A.HK)(Rn,(function(e){return e.name}))}),[Rn]),Wn=(0,p.Db)(Ze.ZP.pipeline_schedules.useUpdate(X),{onSuccess:function(e){return(0,Le.wD)(e,{callback:function(){null===o||void 0===o||o(),W.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(Y,"/triggers/").concat(X))},onErrorCallback:function(e,n){return _({errors:n,response:e})}})}}),Bn=(0,l.Z)(Wn,2),Yn=Bn[0],Xn=Bn[1].isLoading,Jn=(0,c.useMemo)((function(){return En||{}}),[En]);(0,c.useEffect)((function(){var e=v().utc().format(Oe.TD),n=(0,De.a)(Cn||e,{localTimezone:B});if(Nn(null===n||void 0===n?void 0:n.date),Hn(null===n||void 0===n?void 0:n.time),Cn){var t=v()(Cn).utc();Un({dayOfMonth:t.date(),dayOfWeek:t.day(),hour:t.hours(),minute:t.minutes(),second:t.seconds()})}}),[B,Cn]),(0,c.useEffect)((function(){Jn&&Object.keys(Jn).length>0&&xe(!0)}),[Jn]),(0,c.useEffect)((function(){Ge(he?null===yn||void 0===yn?void 0:yn.reduce((function(e,n){var t=n.uuid,i=n.value;return qe(qe({},e),{},(0,r.Z)({},t,Jn[t]||i))}),{}):null)}),[yn,he,Jn]);var Gn=(0,c.useMemo)((function(){return(0,me._U)(kn)}),[kn]),Kn=(0,c.useMemo)((function(){return Gn&&cn?a().toString(cn,{throwExceptionOnParseError:!1}):""}),[cn,Gn]),Qn=(0,c.useMemo)((function(){return null===Kn||void 0===Kn?void 0:Kn.toLowerCase().includes("error")}),[Kn]);(0,c.useEffect)((function(){if(O&&!Qe){if(te(O.event_matchers),(0,me._U)(null===O||void 0===O?void 0:O.schedule_interval)){var e=B?(0,me.lO)(null===O||void 0===O?void 0:O.schedule_interval):null===O||void 0===O?void 0:O.schedule_interval;sn(e),$e(qe(qe({},O),{},{schedule_interval:"custom"}))}else $e(J?qe(qe({},O),{},{schedule_interval:oe.U5.ONCE}):O);var n=O.sla;if(n){Ue(!0);var t=(0,me.gU)(n),i=t.time,r=t.unit;$e((function(e){return qe(qe({},e),{},{slaAmount:i,slaUnit:r})}))}}}),[B,J,O,Qe,kn]);var $n=(0,c.useMemo)((function(){return!(null===Be||void 0===Be||!Be.landing_time_enabled)}),[Be]),et=(0,c.useMemo)((function(){return oe.Xm.TIME!==Sn||![oe.U5.DAILY,oe.U5.HOURLY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(kn)}),[kn,Sn]),nt=(0,c.useMemo)((function(){return $n&&!et}),[et,$n]),tt=(0,c.useCallback)((function(){var e=qe(qe({},(0,Ae.GL)(Qe,["name","description","schedule_type","tags"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,Ne.e7)(qe(qe({},Je),Q?(0,r.Z)({},oe.PN,Q):{}))});if(nt){var n=zn.dayOfMonth,t=zn.dayOfWeek,i=zn.hour,l=zn.minute,o=zn.second,u=v()("2023-07-01").utc();(0,fe.HW)(n)&&(u=u.date(n)),(0,fe.HW)(t)&&(u=u.day(t)),(0,fe.HW)(i)&&(u=u.hours(i)),(0,fe.HW)(l)&&(u=u.minutes(l)),(0,fe.HW)(o)&&(u=u.seconds(o)),e.schedule_interval=Gn?cn:Qe.schedule_interval,e.start_time=u.toISOString()}else oe.Xm.EVENT===Qe.schedule_type?e.event_matchers=ne:(e.schedule_interval=Gn?B&&!Qn&&cn?(0,me.lO)(cn,!0):cn:Qe.schedule_interval,e.start_time=Dn&&null!==Ln&&void 0!==Ln&&Ln.hour&&null!==Ln&&void 0!==Ln&&Ln.minute?(0,me.XM)(Dn,Ln,{convertToUtc:B,includeSeconds:!0,localTimezone:B}):null);if(ze){var c=null===Qe||void 0===Qe?void 0:Qe.slaAmount,s=null===Qe||void 0===Qe?void 0:Qe.slaUnit;if(!c||isNaN(c)||!s)return void h.Am.error("Please enter a valid SLA",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,me.vJ)(c,s)}else null!==O&&void 0!==O&&O.sla&&(e.sla=0);e.settings=Be,Yn({pipeline_schedule:qe(qe({},e),{},{variables:nn||(null===e||void 0===e?void 0:e.variables)})})}),[Q,Qn,cn,Dn,B,ze,ne,Gn,zn,O,Je,Qe,Be,nt,Ln,Yn,nn]),it=(0,c.useMemo)((function(){if(null===O||void 0===O||!O.runtime_average)return"Trigger doesn\u2019t have enough history to estimate runtime.";var e=Number(null===O||void 0===O?void 0:O.runtime_average),n=Math.max(Math.floor(e/3600),0),t=Math.max(Math.floor((e-60*n*60)/60),0),i=Math.max(Math.floor(e-(60*n*60+60*t)),0),r=[];return n>=1&&r.push((0,fe._6)("hour",n,!0)),t>=1&&r.push((0,fe._6)("minute",t,!0)),i>=1&&r.push((0,fe._6)("second",i,!0)),r.join(" ")}),[O]),rt=(0,c.useMemo)((function(){if(!nt)return null;var e=[(0,L.jsxs)(w.Z,{mr:1,children:[(0,L.jsx)(w.Z,{mb:1,children:(0,L.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Minute"})}),(0,L.jsxs)(se.Z,{compact:!0,monospace:!0,onChange:function(e){Un((function(n){return qe(qe({},n),{},{minute:e.target.value})}))},value:(null===zn||void 0===zn?void 0:zn.minute)||"",children:[(0,L.jsx)("option",{value:""}),(0,A.w6)(60).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Minute"),(0,L.jsxs)(w.Z,{mr:1,children:[(0,L.jsx)(w.Z,{mb:1,children:(0,L.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Second"})}),(0,L.jsxs)(se.Z,{compact:!0,monospace:!0,onChange:function(e){Un((function(n){return qe(qe({},n),{},{second:e.target.value})}))},value:(null===zn||void 0===zn?void 0:zn.second)||"",children:[(0,L.jsx)("option",{value:""}),(0,A.w6)(60).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Second")];return[oe.U5.DAILY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(kn)&&e.unshift((0,L.jsxs)(w.Z,{mr:1,children:[(0,L.jsx)(w.Z,{mb:1,children:(0,L.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Hour"})}),(0,L.jsxs)(se.Z,{compact:!0,monospace:!0,onChange:function(e){Un((function(n){return qe(qe({},n),{},{hour:e.target.value})}))},value:(null===zn||void 0===zn?void 0:zn.hour)||"",children:[(0,L.jsx)("option",{value:""}),(0,A.w6)(24).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Hour")),oe.U5.WEEKLY===kn?e.unshift((0,L.jsxs)(w.Z,{mr:1,children:[(0,L.jsx)(w.Z,{mb:1,children:(0,L.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Day of the week"})}),(0,L.jsxs)(se.Z,{compact:!0,monospace:!0,onChange:function(e){Un((function(n){return qe(qe({},n),{},{dayOfWeek:e.target.value})}))},value:(null===zn||void 0===zn?void 0:zn.dayOfWeek)||"",children:[(0,L.jsx)("option",{value:""}),(0,L.jsx)("option",{value:6,children:"Sunday"}),(0,L.jsx)("option",{value:0,children:"Monday"}),(0,L.jsx)("option",{value:1,children:"Tuesday"}),(0,L.jsx)("option",{value:2,children:"Wednesday"}),(0,L.jsx)("option",{value:3,children:"Thursday"}),(0,L.jsx)("option",{value:4,children:"Friday"}),(0,L.jsx)("option",{value:5,children:"Saturday"})]})]},"Day of the week")):oe.U5.MONTHLY===kn&&e.unshift((0,L.jsxs)(w.Z,{mr:1,children:[(0,L.jsx)(w.Z,{mb:1,children:(0,L.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Day of the month"})}),(0,L.jsxs)(se.Z,{compact:!0,monospace:!0,onChange:function(e){Un((function(n){return qe(qe({},n),{},{dayOfMonth:e.target.value})}))},value:(null===zn||void 0===zn?void 0:zn.dayOfMonth)||"",children:[(0,L.jsx)("option",{value:""}),(0,A.w6)(31).map((function(e,n){return(0,L.jsx)("option",{value:n+1,children:n+1>=10?String(n+1):"0".concat(n+1)},n+1)}))]})]},"Day of the month")),(0,L.jsx)(k.ZP,{children:e})}),[zn,kn,nt]),lt=(0,c.useMemo)((function(){return[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.Alphabet,{default:!0}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,L.jsx)(T.Z,{monospace:!0,onChange:function(e){e.preventDefault(),$e((function(n){return qe(qe({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_n},"trigger_name_input")]}),[_n]),ot=(0,c.useMemo)((function(){return[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.Alphabet,{default:!0}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,L.jsx)(T.Z,{monospace:!0,onChange:function(e){e.preventDefault(),$e((function(n){return qe(qe({},n),{},{description:e.target.value})}))},placeholder:"Description",value:On},"trigger_description_input")]}),[On]),ut=(0,c.useMemo)((function(){var e=[lt,ot,[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.Schedule,{default:!0,size:1.5*D.iI}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,L.jsxs)("div",{children:[(0,L.jsxs)(se.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;$e((function(e){return qe(qe({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:kn,children:[Object.values(oe.U5).reduce((function(e,n){var t;return!pn||null!==bn&&void 0!==bn&&null!==(t=bn[oe.Xm.TIME])&&void 0!==t&&t[n]?e.concat((0,L.jsx)("option",{value:n,children:n.substring(1)},n)):e}),[]),!pn&&(0,L.jsx)("option",{value:"custom",children:"custom"},"custom")]}),!pn&&(0,L.jsx)(w.Z,{mt:1,p:1,children:(0,L.jsxs)(I.ZP,{muted:!0,small:!0,children:["If you don't see the frequency option you need, select ",(0,L.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")]];return pn||e.push([(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.Switch,{default:!0,size:1.5*D.iI}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Enable landing time"})]},"frequency"),(0,L.jsxs)("div",{children:[(0,L.jsx)(de.Z,{checked:$n,disabled:et,onCheck:function(){Ye((function(e){return qe(qe({},e),{},{landing_time_enabled:!$n})}))}}),(0,L.jsxs)(w.Z,{mt:1,p:1,children:[et&&(0,L.jsxs)(I.ZP,{muted:!0,small:!0,children:["In order to enable landing time, the trigger\u2019s frequency must be ",(0,L.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.HOURLY}),", ",(0,L.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.DAILY}),", ",(0,L.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.WEEKLY}),", or ",(0,L.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.MONTHLY}),"."]}),!et&&(0,L.jsx)(I.ZP,{muted:!0,small:!0,children:"Instead of starting at a specific time, this trigger will schedule pipeline runs at a time where it will finish by the specified time below."})]})]},"frequency_input")]),nt&&e.push([(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.Schedule,{default:!0,size:1.5*D.iI}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Average runtime"})]},"runtime_average"),(0,L.jsx)(k.ZP,{alignItems:"center",style:{minHeight:"".concat(5.75*D.iI,"px")},children:(0,L.jsx)(I.ZP,{monospace:!0,children:it})},"runtime_average_value")]),e.push([(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.CalendarDate,{default:!0,size:1.5*D.iI}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsxs)(I.ZP,{default:!0,children:[nt&&"Pipeline complete by",!nt&&"Start date and time"]})]},"start_time"),nt?rt:(0,L.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!ln&&(0,L.jsx)(T.Z,{monospace:!0,onClick:function(){return on((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Dn?(0,me.XM)(Dn,Ln,{localTimezone:B}):""}),(0,L.jsx)("div",{style:{width:"400px"},children:(0,L.jsx)(b.Z,{disableEscape:!0,onClickOutside:function(){return on(!1)},open:ln,style:{position:"relative"},children:(0,L.jsx)(g.Z,{localTime:B,selectedDate:Dn,selectedTime:Ln,setSelectedDate:Nn,setSelectedTime:Hn,topPosition:!0})})})]},"start_time_input")]),J&&e.splice(2,2),Gn&&e.splice(2,0,[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.Code,{default:!0,size:1.5*D.iI}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,L.jsxs)("div",{children:[(0,L.jsx)(T.Z,{monospace:!0,onChange:function(e){e.preventDefault(),sn(e.target.value)},placeholder:"* * * * *",value:cn}),(0,L.jsxs)(w.Z,{mt:1,p:1,children:[(0,L.jsx)(I.ZP,{monospace:!0,xsmall:!0,children:"[minute] [hour] [day(month)] [month] [day(week)]"}),(0,L.jsx)(w.Z,{mb:"2px"}),cn?(0,L.jsx)(I.ZP,{danger:Qn,muted:!0,small:!0,children:Qn?"Invalid cron expression. Please check the cron syntax.":(0,L.jsxs)(L.Fragment,{children:['"',Kn,'"']})}):null,B&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(I.ZP,{bold:!0,inline:!0,small:!0,warning:!0,children:"Note:\xa0"}),(0,L.jsxs)(I.ZP,{inline:!0,small:!0,children:["If you have the display_local_timezone setting enabled, the local cron expression above will match your local timezone only",(0,L.jsx)("br",{}),"if the minute and hour values are single values without any special characters, such as the comma, hyphen, or slash.",(0,L.jsx)("br",{}),"You can still use cron expressions with special characters for the minute/hour values, but it will be based in UTC time."]})]})]})]},"cron_expression_input")]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(w.Z,{mb:2,px:D.cd,children:(0,L.jsx)(S.Z,{children:"Settings"})}),(0,L.jsx)(F.Z,{light:!0,short:!0}),(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:e})]})}),[Qn,cn,Dn,B,pn,Gn,J,et,$n,rt,bn,Kn,it,kn,ln,nt,Ln,lt,ot]),ct=(0,c.useCallback)((function(e,n){te((function(t){return Object.entries(n).forEach((function(n){var i=(0,l.Z)(n,2),r=i[0],o=i[1];t[e][r]=o})),(0,i.Z)(t)}))}),[te]),st=(0,c.useMemo)((function(){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(w.Z,{mb:D.cd,px:D.cd,children:(0,L.jsx)(S.Z,{children:"Settings"})}),(0,L.jsx)(F.Z,{light:!0,short:!0}),(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:[lt,ot]}),(0,L.jsxs)(w.Z,{mb:2,mt:5,px:D.cd,children:[(0,L.jsx)(S.Z,{children:"Events"}),(0,L.jsxs)(I.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,L.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,L.jsxs)(w.Z,{mt:D.Mq,children:[(0,L.jsx)(I.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,L.jsxs)(I.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,L.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,L.jsx)(V.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,L.jsx)(w.Z,{mt:1,children:(0,L.jsxs)(ie,{monospace:!0,ordered:!0,children:[(0,L.jsx)(I.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,L.jsx)(I.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,L.jsx)(I.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,L.jsx)(F.Z,{light:!0,short:!0}),(null===ne||void 0===ne?void 0:ne.length)>=1&&(0,L.jsx)(C.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===ne||void 0===ne?void 0:ne.map((function(e,n){var t=e.event_type,i=e.name,r=e.pattern,l=e.id||"".concat(t,"-").concat(i,"-").concat(n,"-").concat(JSON.stringify(r)),o=[];return r&&JSON.stringify(r,null,2).split("\n").forEach((function(e){o.push(" ".concat(e))})),[(0,L.jsx)(se.Z,{monospace:!0,onChange:function(e){return ct(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:U.S5.map((function(e){var n=e.label,t=e.uuid;return(0,L.jsx)("option",{value:t,children:n()},t)}))},"event-provider-".concat(l)),(0,L.jsx)(se.Z,{monospace:!0,onChange:function(e){var t,i=e.target.value,r=null===(t=Vn[i])||void 0===t?void 0:t.event_pattern;ct(n,{name:i,pattern:r?JSON.parse(r):null})},placeholder:"Event name",value:i,children:Rn.map((function(e){var n=e.name;return(0,L.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(l)),r&&(0,L.jsx)(y.Z,{language:"json",small:!0,source:o.join("\n")}),(0,L.jsx)(j.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return te((function(e){return(0,A.oM)(e,n)}))},children:(0,L.jsx)(pe.Trash,{default:!0,size:2*D.iI})},"remove_event")]}))}),(0,L.jsx)(w.Z,{p:D.cd,children:(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(pe.Add,{size:2*D.iI}),onClick:function(){return te((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[ne,Rn,Vn,lt,ot,ct]),at=(0,c.useMemo)((function(){var e=(0,me.M8)(O,Re);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(w.Z,{mb:D.cd,px:D.cd,children:(0,L.jsx)(S.Z,{children:"Settings"})}),(0,L.jsx)(F.Z,{light:!0,short:!0}),(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:[lt,ot]}),(0,L.jsxs)(w.Z,{mb:2,mt:5,px:D.cd,children:[(0,L.jsx)(S.Z,{children:"Endpoint"}),(0,L.jsxs)(I.ZP,{muted:!0,children:["Make a ",(0,L.jsx)(I.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,L.jsx)(w.Z,{mt:D.Mq,children:(0,L.jsx)(P.Z,{copiedText:e,linkText:e,monospace:!0,withCopyIcon:!0})}),(0,L.jsx)(w.Z,{mt:D.Mq,children:(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(w.Z,{mr:1,children:(0,L.jsx)(de.Z,{checked:Re,onCheck:function(){return Ve(!Re)}})}),(0,L.jsx)(I.ZP,{muted:!0,children:"Show alternative endpoint to pass token in headers"})]})})]}),Re&&(0,L.jsxs)(w.Z,{mb:2,mt:5,px:D.cd,children:[(0,L.jsx)(S.Z,{children:"Headers"}),(0,L.jsx)(I.ZP,{muted:!0,children:"You will need to include the following headers in your request to authenticate with the server."}),(0,L.jsx)(w.Z,{mt:D.Mq,children:(0,L.jsx)(P.Z,{copiedText:"Content-Type: application/json\n Authorization: Bearer ".concat(null===O||void 0===O?void 0:O.token,"\n "),withCopyIcon:!0,children:(0,L.jsx)(y.Z,{language:"json",small:!0,source:"\n Content-Type: application/json\n Authorization: Bearer ".concat(null===O||void 0===O?void 0:O.token,"\n ")})})})]}),(0,L.jsxs)(w.Z,{mb:2,mt:5,px:D.cd,children:[(0,L.jsx)(S.Z,{children:"Payload"}),(0,L.jsx)(I.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,L.jsx)(w.Z,{mt:D.Mq,children:(0,L.jsx)(P.Z,{copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',withCopyIcon:!0,children:(0,L.jsx)(y.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,L.jsxs)(w.Z,{mb:2,mt:5,px:D.cd,children:[(0,L.jsx)(S.Z,{children:"Sample cURL command"}),(0,L.jsx)(w.Z,{mt:D.Mq,children:(0,L.jsx)(y.Z,{language:"bash",small:!0,source:Re?"\n curl -X POST ".concat(e," \\\n --header 'Content-Type: application/json' \\\n --header 'Authorization: Bearer ").concat(null===O||void 0===O?void 0:O.token,'\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n '):"\n curl -X POST ".concat(e,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[O,Ve,ot,lt,Re]),dt=!Sn||oe.Xm.TIME===Sn&&!(J&&Dn||!J&&Dn&&kn)||oe.Xm.EVENT===Sn&&(!(null!==ne&&void 0!==ne&&ne.length)||!ne.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),vt=(0,c.useMemo)((function(){var e;return(null===d||void 0===d||null===(e=d.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return ye.tf.DBT===n})))||[]}),[d]),ht=(0,c.useMemo)((function(){return null!==d&&void 0!==d&&d.blocks?(0,Ee.n)(d):null}),[d]),pt=(0,c.useMemo)((function(){var e,n;return(0,L.jsxs)(w.Z,{py:D.cd,children:[(0,L.jsxs)(w.Z,{mb:D.HN,px:D.cd,children:[(0,L.jsx)(S.Z,{children:"Run settings"}),(0,L.jsxs)(w.Z,{mt:D.Mq,children:[!J&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(w.Z,{mb:D.Mq,children:[(0,L.jsx)(I.ZP,{children:"Set a timeout for each run of this trigger (optional)"}),(0,L.jsx)(w.Z,{mb:1}),(0,L.jsx)(T.Z,{label:"Timeout (in seconds)",onChange:function(e){return Ye((function(n){return qe(qe({},n),{},{timeout:e.target.value})}))},primary:!0,setContentOnMount:!0,type:"number",value:null===Be||void 0===Be?void 0:Be.timeout})]}),(0,L.jsxs)(w.Z,{mb:D.Mq,children:[(0,L.jsx)(I.ZP,{children:"Status for runs that exceed the timeout (default: failed)"}),(0,L.jsx)(w.Z,{mb:1}),(0,L.jsxs)(se.Z,{fullWidth:!0,monospace:!0,onChange:function(e){e.preventDefault(),Ye((function(n){return qe(qe({},n),{},{timeout_status:e.target.value})}))},placeholder:"Timeout status",value:null===Be||void 0===Be?void 0:Be.timeout_status,children:[(0,L.jsx)("option",{value:Se.V.FAILED,children:"Failed"}),(0,L.jsx)("option",{value:Se.V.CANCELLED,children:"Cancelled"})]})]})]}),(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(w.Z,{mr:2,children:(0,L.jsx)(de.Z,{checked:ze,onCheck:function(e){Ue(e),e||$e((function(e){return qe(qe({},e),{},{slaAmount:0})}))}})}),(0,L.jsx)(I.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),ze&&(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(pe.CalendarDate,{default:!0,size:1.5*D.iI}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,L.jsxs)(k.ZP,{children:[(0,L.jsx)(R.Z,{flex:1,children:(0,L.jsx)(T.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),$e((function(n){return qe(qe({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===Qe||void 0===Qe?void 0:Qe.slaAmount})}),(0,L.jsx)(R.Z,{flex:1,children:(0,L.jsx)(se.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),$e((function(n){return qe(qe({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===Qe||void 0===Qe?void 0:Qe.slaUnit,children:Object.keys(me.tL).map((function(e){return(0,L.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]}),(0,L.jsx)(w.Z,{mt:D.Mq,children:(0,L.jsx)(k.ZP,{alignItems:"center",children:(0,L.jsx)(Z.Z,{checked:null===Be||void 0===Be?void 0:Be.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return Ye((function(e){return qe(qe({},e),{},{allow_blocks_to_fail:!(null!==Be&&void 0!==Be&&Be.allow_blocks_to_fail)})}))}})})}),oe.Xm.TIME===Sn&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(w.Z,{mt:D.cd,children:(0,L.jsx)(k.ZP,{alignItems:"center",children:(0,L.jsx)(Z.Z,{checked:null===Be||void 0===Be?void 0:Be.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return Ye((function(e){return qe(qe({},e),{},{skip_if_previous_running:!(null!==Be&&void 0!==Be&&Be.skip_if_previous_running)})}))}})})}),(0,L.jsx)(w.Z,{mt:D.cd,children:(0,L.jsx)(k.ZP,{alignItems:"center",children:(0,L.jsx)(Z.Z,{checked:null===Be||void 0===Be?void 0:Be.create_initial_pipeline_run,label:"Create initial pipeline run if start date is before current execution period",onClick:function(){return Ye((function(e){return qe(qe({},e),{},{create_initial_pipeline_run:!(null!==Be&&void 0!==Be&&Be.create_initial_pipeline_run)})}))}})})})]})]}),(0,L.jsxs)(w.Z,{mb:D.HN,children:[(0,L.jsxs)(w.Z,{px:D.cd,children:[(0,L.jsx)(S.Z,{children:"Runtime variables"}),(0,Ae.Qr)(yn)&&(0,L.jsxs)(w.Z,{mt:1,children:[(0,L.jsx)(I.ZP,{default:!0,children:"This pipeline has no runtime variables."}),(0,L.jsx)(u(),{as:"/pipelines/".concat(Y,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,L.jsx)(V.Z,{primary:!0,children:"Click here"})})," ",(0,L.jsx)(I.ZP,{default:!0,inline:!0,children:"to add variables to this pipeline."})]})]}),(0,L.jsx)(w.Z,{mt:D.Mq,children:(0,L.jsx)(re.Z,{enableVariablesOverwrite:!0,originalVariables:null===O||void 0===O?void 0:O.variables,runtimeVariables:Je,setRuntimeVariables:Ge})})]}),ht&&(null===(e=Object.keys(ht||{}))||void 0===e?void 0:e.length)>=1&&(0,L.jsxs)(w.Z,{mb:D.HN,children:[(0,L.jsx)(w.Z,{px:D.cd,children:(0,L.jsx)(S.Z,{children:"Override bookmark values"})}),(0,L.jsx)(m.Z,{bookmarkValues:Q,originalBookmarkValues:null===O||void 0===O||null===(n=O.variables)||void 0===n?void 0:n[oe.PN],pipeline:d,setBookmarkValues:$})]}),(null===vt||void 0===vt?void 0:vt.length)>=1&&(0,L.jsx)(w.Z,{mb:D.HN,children:(0,L.jsx)(z,{blocks:vt,updateVariables:Ge,variables:qe(qe({},Jn),Je)})})]})}),[ht,Q,vt,ze,yn,J,d,null===O||void 0===O?void 0:O.variables,Y,Je,Qe,Sn,Jn,$,Ue,Ge,Be]),ft=Ze.ZP.tags.list().data,mt=(0,c.useMemo)((function(){return((null===ft||void 0===ft?void 0:ft.tags)||[]).filter((function(e){var n=e.uuid;return!(null!==In&&void 0!==In&&In.includes(n))}))}),[ft,In]),jt=(0,c.useMemo)((function(){return(0,me.ri)(J)}),[J]),xt=(0,c.useMemo)((function(){return(0,L.jsx)(ge,{containerRef:q,date:Dn,interactions:xn,pipeline:d,pipelineInteraction:jn,pipelineSchedule:Qe,setVariables:function(e){$e((function(n){var t=qe({},e((null===n||void 0===n?void 0:n.variables)||{})),i=qe({},t);return null===xn||void 0===xn||xn.forEach((function(e){Object.entries((null===e||void 0===e?void 0:e.variables)||{}).forEach((function(e){var n=(0,l.Z)(e,2),t=n[0],r=n[1].types;i&&t in i&&(i[t]=(0,Me.M)(i[t],r))}))})),tn(i),qe(qe({},n),{},{variables:t})}))},showSummary:Ie.uuid===dn,time:Ln,triggerTypes:jt,variables:null===Qe||void 0===Qe?void 0:Qe.variables})}),[q,Dn,xn,d,jn,Qe,dn,$e,tn,Ln,jt]),gt=(0,c.useMemo)((function(){return oe.fq.ACTIVE===(null===Qe||void 0===Qe?void 0:Qe.status)}),[Qe]),Zt=M?null===M||void 0===M?void 0:M((function(e){return W.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===d||void 0===d?void 0:d.uuid,"/triggers/").concat(e))})):[null,{isLoading:!1}],bt=(0,l.Z)(Zt,2),yt=bt[0],Pt=bt[1].isLoading,Ot=(0,c.useCallback)((function(){null===yt||void 0===yt||yt({pipeline_schedule:qe(qe({},Qe),{},{variables:nn||(null===Qe||void 0===Qe?void 0:Qe.variables)})})}),[yt,nn,Qe]),_t=(0,c.useMemo)((function(){var e,n;return X?(e=(0,L.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(Y,"/triggers/").concat(X),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel and go back"}),n=(0,L.jsx)(j.ZP,{onClick:tt,primary:!0,children:"Save trigger"})):Ce.uuid===dn?(e=(0,L.jsx)(j.ZP,{onClick:function(){return null===s||void 0===s?void 0:s()},secondary:!0,children:"Cancel and go back"}),n=(0,L.jsx)(j.ZP,{afterIcon:(0,L.jsx)(pe.PaginateArrowRight,{}),onClick:function(){return vn(we.uuid)},primary:!0,children:"Next: Customize"})):we.uuid===dn?(e=(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(pe.PaginateArrowLeft,{}),onClick:function(){return vn(Ce.uuid)},secondary:!0,children:"Back: Settings"}),n=(0,L.jsx)(j.ZP,{afterIcon:(0,L.jsx)(pe.PaginateArrowRight,{}),onClick:function(){return vn(Ie.uuid)},primary:!0,children:"Next: Review"})):Ie.uuid===dn&&(e=(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(pe.PaginateArrowLeft,{}),onClick:function(){return vn(we.uuid)},secondary:!0,children:"Back: Customize"}),n=(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(pe.Lightning,{}),loading:Pt,onClick:function(){return Ot()},primary:!0,children:X?"Save trigger":"Create trigger"}),!X&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(w.Z,{mr:D.cd}),(0,L.jsx)(de.Z,{checked:gt,compact:!0,onCheck:function(e){return $e((function(n){return qe(qe({},n),{},{status:e(gt)?oe.fq.ACTIVE:oe.fq.INACTIVE})}))}}),(0,L.jsx)(w.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:gt,muted:!gt,small:!0,children:"Set trigger to be active immediately after creating"})]})]})),(0,L.jsx)(w.Z,{p:D.cd,children:(0,L.jsxs)(k.ZP,{alignItems:"center",children:[e,e&&n&&(0,L.jsx)(w.Z,{mr:D.cd}),n]})})}),[Ot,Pt,gt,s,tt,X,Y,dn,vn]),kt=(0,c.useMemo)((function(){var e,n,t,i,r,l,o;return"undefined"===typeof(null===d||void 0===d||null===(e=d.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null===H||void 0===H||null===(t=H.pipelines)||void 0===t||null===(i=t.settings)||void 0===i||null===(r=i.triggers)||void 0===r?void 0:r.save_in_code_automatically:null===d||void 0===d||null===(l=d.settings)||void 0===l||null===(o=l.triggers)||void 0===o?void 0:o.save_in_code_automatically}),[d,H]);return(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(le.Z,{after:!pn&&pt,afterHidden:pn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(Y,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===O||void 0===O?void 0:O.name},linkProps:{as:"/pipelines/".concat(Y,"/triggers/").concat(X),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:t,pageName:ke.M.TRIGGERS,pipeline:d,setErrors:_,subheader:pn||Zn?(0,L.jsx)(w.Z,{px:D.cd,children:(0,L.jsx)(x.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return vn(n)},regularSizeText:!0,selectedTabUUID:dn,tabs:Te,underlineColor:(0,N.qn)(ye.tf.DATA_LOADER).accent,underlineStyle:!0})}):(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(j.ZP,{disabled:dt,loading:Xn,onClick:tt,outline:!0,primary:!0,children:"Save changes"}),(0,L.jsx)(w.Z,{mr:D.cd}),(0,L.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(Y,"/triggers/").concat(X),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"}),kt&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(w.Z,{mr:D.cd}),(0,L.jsxs)(I.ZP,{default:!0,xsmall:!0,children:["This trigger will automatically be persisted in code.",(0,L.jsx)("br",{}),"To change this behavior, update the ",(0,L.jsx)(u(),{as:"/pipelines/".concat(Y,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,L.jsx)(V.Z,{openNewWindow:!0,xsmall:!0,children:"pipeline\u2019s settings"})})," or ",(0,L.jsx)(u(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,L.jsx)(V.Z,{openNewWindow:!0,xsmall:!0,children:"project settings"})}),"."]})]})]}),subheaderNoPadding:pn||Zn,title:function(){return null!==O&&void 0!==O&&O.name?"Edit ".concat(null===O||void 0===O?void 0:O.name):"New trigger"},uuid:"triggers/edit",children:(0,L.jsxs)("div",{ref:q,children:[(pn||Zn)&&(0,L.jsx)(F.Z,{light:!0}),(pn||Zn)&&(we.uuid===dn||Ie.uuid===dn)&&xt,(!pn||Ce.uuid===dn)&&(!Zn||Ce.uuid===dn)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(w.Z,{p:D.cd,children:[(0,L.jsxs)(w.Z,{mb:2,children:[(0,L.jsx)(S.Z,{children:"Trigger type"}),(0,L.jsx)(I.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,L.jsx)(k.ZP,{children:jt.reduce((function(e,n){var t=n.label,i=n.description,r=n.uuid,l=Sn===r,o=Sn&&!l;return!pn||null!==bn&&void 0!==bn&&bn[r]?e.concat((0,L.jsx)(j.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){oe.Xm.EVENT!==r||null!==ne&&void 0!==ne&&ne.length||te([{}]),$e((function(e){return qe(qe({},e),{},{schedule_type:r})}))},children:(0,L.jsx)(Pe.U,{selected:l,children:(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(R.Z,{children:(0,L.jsx)("input",{checked:l,type:"radio"})}),(0,L.jsx)(w.Z,{mr:D.cd}),(0,L.jsxs)(R.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,L.jsx)(S.Z,{bold:!0,default:!l&&!o,level:5,muted:!l&&o,children:t()}),(0,L.jsx)(I.ZP,{default:!l&&!o,leftAligned:!0,muted:o,children:i()})]})]})})},r)):e}),[])})]}),(0,L.jsxs)(w.Z,{mt:D.HN,children:[oe.Xm.TIME===Sn&&ut,oe.Xm.EVENT===Sn&&st,oe.Xm.API===Sn&&at]}),!pn&&(0,L.jsxs)(w.Z,{mt:D.HN,px:D.cd,children:[(0,L.jsxs)(w.Z,{mb:2,children:[(0,L.jsx)(S.Z,{children:"Tags"}),(0,L.jsx)(I.ZP,{muted:!0,children:"Add or remove tags from this trigger."})]}),(0,L.jsx)(ae.Z,{removeTag:function(e){$e((function(n){return qe(qe({},n),{},{tags:null===In||void 0===In?void 0:In.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){$e((function(n){return qe(qe({},n),{},{tags:(0,A.$C)(e.uuid,In,(function(n){return n===e.uuid}))})}))},selectedTags:null===In||void 0===In?void 0:In.map((function(e){return{uuid:e}})),tags:mt,uuid:"TagsAutocompleteInputField-trigger-".concat(X)})]})]}),(pn||Zn)&&_t]})})})}},37899:function(e,n,t){var i=t(82394),r=t(75582),l=t(82684),o=t(71180),u=t(15338),c=t(97618),s=t(55485),a=t(38276),d=t(75499),v=t(30160),h=t(35576),p=t(17488),f=t(72473),m=t(70515),j=t(42122),x=t(81728),g=t(28598);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){e.borderless,e.compact;var n=e.enableVariablesOverwrite,t=e.originalVariables,Z=e.runtimeVariables,y=(e.setEnableVariablesOverwrite,e.setRuntimeVariables),P=(0,l.useState)({}),O=P[0],_=P[1],k=(0,l.useState)(null),S=k[0],w=k[1],C=(0,l.useState)(null),I=C[0],T=C[1];(0,l.useEffect)((function(){var e=Object.entries(Z||{}).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],o=t[1],u=(0,x.Pb)(o)&&"object"===typeof JSON.parse(o)&&!Array.isArray(JSON.parse(o))&&null!==JSON.parse(o);return b(b({},e),{},(0,i.Z)({},l,u))}),{});_(e)}),[]);var E=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),y((function(t){return b(b({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return O[e]?(0,g.jsx)(h.Z,b(b({},t),{},{rows:1,value:n})):(0,g.jsx)(p.Z,b({},t))};return(0,g.jsxs)(g.Fragment,{children:[n&&Z&&Object.entries(Z).length>0&&(0,g.jsx)(d.Z,{columnFlex:[null,1,null],columns:[{uuid:"Variable"},{uuid:"Value"},{label:function(){return""},uuid:"Action"}],rows:Object.entries(Z).map((function(e){var n=(0,r.Z)(e,2),i=n[0],l=n[1];return[(0,g.jsx)(v.ZP,{default:!0,monospace:!0,children:i},"variable_".concat(i)),E(i,l),!(null!==t&&void 0!==t&&t[i])&&(0,g.jsx)(o.ZP,{iconOnly:!0,onClick:function(){y((function(e){return(0,j.gR)(e,[i])}))},children:(0,g.jsx)(f.Trash,{default:!0})})]}))}),(0,g.jsx)(a.Z,{p:m.cd,children:(0,g.jsxs)(s.ZP,{alignItems:"center",children:[(0,g.jsx)(c.Z,{flex:1,children:(0,g.jsx)(p.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return w(e.target.value)},placeholder:"New variable UUID",value:S||""})}),(0,g.jsx)(a.Z,{mr:1}),(0,g.jsx)(c.Z,{flex:1,children:(0,g.jsx)(p.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return T(e.target.value)},placeholder:"Variable value",value:I||""})}),(0,g.jsx)(a.Z,{mr:1}),(0,g.jsx)(o.ZP,{beforeIcon:(0,g.jsx)(f.Add,{}),disabled:!S||!I,onClick:function(){y((function(e){return b(b({},e),{},(0,i.Z)({},S,I))})),w(null),T(null)},children:"Add runtime variable"})]})}),(0,g.jsx)(u.Z,{light:!0})]})}},97196:function(e,n,t){t.d(n,{S5:function(){return l},_P:function(){return o}});var i,r=t(86735);!function(e){e.AWS="aws_event"}(i||(i={}));var l=[{label:function(){return"AWS"},uuid:i.AWS}],o=(0,r.HK)(l,(function(e){return e.uuid}))},83784:function(e,n,t){t.d(n,{C:function(){return i}});var i="global"},14805:function(e,n,t){var i=t(82394),r=t(44495),l=t(55485),o=t(44085),u=t(38276),c=t(30160),s=t(88785),a=t(70515),d=t(86735),v=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 p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.localTime,t=e.selectedDate,i=e.selectedTime,h=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,v.jsxs)(s.J,{absolute:!0,topPosition:m,children:[(0,v.jsx)(r.ZP,{onChange:h,value:t}),(0,v.jsx)(u.Z,{mb:2}),(0,v.jsxs)(l.ZP,{alignItems:"center",children:[(0,v.jsxs)(c.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,v.jsx)(u.Z,{pr:2}),(0,v.jsx)(o.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return p(p({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===i||void 0===i?void 0:i.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,v.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,v.jsx)(u.Z,{px:1,children:(0,v.jsx)(c.ZP,{bold:!0,large:!0,children:":"})}),(0,v.jsx)(o.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return p(p({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===i||void 0===i?void 0:i.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,v.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},79500:function(e,n,t){t.d(n,{a:function(){return l}});var i=t(16488),r=t(3917);function l(e,n){var t,l;if(null!==n&&void 0!==n&&n.localTimezone)t=(0,r.n$)(e),l={hour:(0,r.lJ)(String(t.getHours())),minute:(0,r.lJ)(String(t.getMinutes()))};else{var o=e.split(" ")[1];t=(0,i.eI)(e),l={hour:o.substring(0,2),minute:o.substring(3,5)}}return{date:t,time:l}}},9134:function(e,n,t){var i=t(82684),r=t(21124),l=t(68432),o=t(25976),u=t(65292),c=t(44897),s=t(95363),a=t(70515),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,v=e.showLineNumbers,h=e.small,p=e.source,f=e.wrapLines,m=(0,i.useContext)(o.ThemeContext);function j(e){var i=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(m.background||c.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:s.Vp,fontSize:h?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:n,lineNumberStyle:{color:(m.content||c.Z.content).muted},showLineNumbers:v,style:u._4,useInlineStyles:!0,wrapLines:f,children:i})}return(0,d.jsx)(r.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(j,{value:n})}},children:p})}},32080:function(e,n,t){t.d(n,{n:function(){return l}});var i=t(44425),r=t(61599);function l(e){var n,t={};return null===e||void 0===e||null===(n=e.blocks)||void 0===n||n.forEach((function(e){var n=e.catalog,l=e.type,o=e.uuid;if(i.tf.DATA_LOADER===l&&null!==n&&void 0!==n&&n.streams){var u,c=null===n||void 0===n||null===(u=n.streams)||void 0===u?void 0:u.filter((function(e){var n=e.replication_method;return r._B.INCREMENTAL===n}));(null===c||void 0===c?void 0:c.length)>=1&&(o in t||(t[o]={block:e,streams:[]}),t[o].streams.push(c))}})),t}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3548],{4015:function(e,n,t){t.d(n,{$b:function(){return s},I5:function(){return l},Nk:function(){return d},gI:function(){return a}});var i=t(25976),r=t(44897),o=t(42631),c=t(70515),d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-h093u4-0"})([""," ",""],(function(e){return!e.width&&"\n width: ".concat(40*c.iI,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),l=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-h093u4-1"})(["padding:","px;"," ",""],2.5*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top-left-radius: ").concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.lightBackground&&"\n background-color: ".concat((e.theme.background||r.Z.background).panel,"\n ")})),a=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-h093u4-2"})(["align-items:center;justify-content:space-between;"," ",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n display: ").concat((null===e||void 0===e?void 0:e.display)||"flex",";\n padding-bottom: ").concat(1*c.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n padding-left: ").concat(c.cd*c.iI,"px;\n padding-top: ").concat(1*c.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n ")}),(function(e){return e.lightBackground&&"\n background-color: ".concat((e.theme.background||r.Z.background).panel,"\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-h093u4-3"})(["padding:","px ","px;"," ",""],2.5*c.iI,2*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom-left-radius: ").concat(o.n_,"px;\n border-bottom-right-radius: ").concat(o.n_,"px;\n border-bottom: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.topBorder&&"\n border-top: 1px solid ".concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}))},55729:function(e,n,t){t.d(n,{Z:function(){return M}});var i=t(82394),r=t(75582),o=t(82684),c=t(69864),d=t(71180),l=t(15338),a=t(97618),s=t(55485),u=t(85854),p=t(48670),v=t(65956),h=t(82359),f=t(88543),g=t(38276),m=t(30160),x=t(17488),j=t(69650),b=t(12468),Z=t(35686),_=t(77417),y=t(25976),k=t(44897),P=t(42631),w=t(70515),O=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],P.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||k.Z.background).codeArea,";\n ")})),C=t(72473),I=t(72191),B=t(70320),E=t(81728),N=t(42122),S=t(72619),A=t(23780),D=t(28598);function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function H(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var M=function(e){var n,t,y,k=e.cancelButtonText,P=e.contained,L=e.header,M=e.onCancel,V=e.onSaveSuccess,F=e.rootProject,T=(0,A.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),U=(0,r.Z)(T,1)[0],R=(0,o.useState)(null),q=R[0],z=R[1],G=(0,o.useState)(!1),K=G[0],W=G[1],Y=(0,_.Z)(),$=Y.fetchProjects,J=Y.project,Q=Y.projectPlatformActivated,X=Y.rootProject,ee=(0,o.useMemo)((function(){return F?X:J}),[J,X,F]),ne=ee||{},te=ne.name,ie=ne.openai_api_key,re=ne.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){q||z(ee)}),[ee,q]);var ce=(0,c.Db)(Z.ZP.projects.useUpdate(te),{onSuccess:function(e){return(0,S.wD)(e,{callback:function(e){var n,t=e.project;$(),z(t),W(!1),(0,B.hY)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[h.d.LOCAL_TIMEZONE]),V&&(null===V||void 0===V||V(t))},onErrorCallback:function(e,n){return U({errors:n,response:e})}})}}),de=(0,r.Z)(ce,2),le=de[0],ae=de[1].isLoading,se=(0,o.useCallback)((function(e){return le({project:H(H({},e),{},{root_project:F})})}),[F,le]),ue=(0,D.jsxs)(D.Fragment,{children:[L,(0,D.jsxs)(v.Z,{noPadding:!0,children:[(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Project name"})}),(0,D.jsx)(m.ZP,{default:!0,monospace:!0,children:te})]}),(0,D.jsx)(l.Z,{light:!0}),(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Project UUID"})}),(0,D.jsx)(m.ZP,{default:!!re,monospace:!0,muted:!re,children:re||"Not required"})]}),(0,D.jsx)(l.Z,{light:!0}),(0,D.jsx)(g.Z,{p:w.cd,children:(0,D.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,D.jsxs)(a.Z,{flexDirection:"column",children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Help improve Mage"})}),(0,D.jsxs)(m.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,D.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,D.jsx)(g.Z,{mr:w.cd}),(0,D.jsx)(j.Z,{compact:!0,checked:null===q||void 0===q?void 0:q.help_improve_mage,onCheck:function(){return z((function(e){return H(H({},e),{},{help_improve_mage:!(null!==q&&void 0!==q&&q.help_improve_mage)})}))}})]})})]}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsx)(f.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,D.jsx)(f.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===q||void 0===q||null===(n=q.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(y=t.triggers)||void 0===y||!y.save_in_code_automatically),onCheck:function(e){return z((function(n){var t,i,r,o,c,d;return H(H({},n),{},{pipelines:H(H({},null===n||void 0===n?void 0:n.pipelines),{},{settings:H(H({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:H(H({},null===n||void 0===n||null===(i=n.pipelines)||void 0===i||null===(r=i.settings)||void 0===r?void 0:r.triggers),{},{save_in_code_automatically:e(null===n||void 0===n||null===(o=n.pipelines)||void 0===o||null===(c=o.settings)||void 0===c||null===(d=c.triggers)||void 0===d?void 0:d.save_in_code_automatically)})})})})}))}}})}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsx)(v.Z,{noPadding:!0,overflowVisible:!0,children:(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Features"})}),Object.entries((0,N.gR)(null===q||void 0===q?void 0:q.features,[h.d.CODE_BLOCK_V2])||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],c=t[1],d=Q&&!F&&(null===ee||void 0===ee?void 0:ee.features_override)&&o in(null===ee||void 0===ee?void 0:ee.features_override);return(0,D.jsx)(g.Z,{mt:0===n?0:1,children:(0,D.jsxs)(s.ZP,{alignItems:"center",children:[(0,D.jsxs)(a.Z,{flex:1,children:[(0,D.jsx)(j.Z,{disabled:d,checked:!!c,compact:!0,onCheck:function(){return z((function(e){return H(H({},e),{},{features:H(H({},null===q||void 0===q?void 0:q.features),{},(0,i.Z)({},o,!c))})}))}}),(0,D.jsx)(g.Z,{mr:w.cd}),(0,D.jsxs)(a.Z,{children:[(0,D.jsx)(m.ZP,{default:!c,monospace:!0,children:(0,E.vg)(o)}),o===h.d.LOCAL_TIMEZONE&&(0,D.jsx)(g.Z,{ml:1,children:(0,D.jsx)(b.Z,H({},B.EB))})]})]}),d&&(0,D.jsx)(m.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsx)(v.Z,{noPadding:!0,children:(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"OpenAI"})}),ie&&!K?(0,D.jsxs)(s.ZP,H(H({},s.A0),{},{children:[(0,D.jsx)(m.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,D.jsx)(d.ZP,{iconOnly:!0,onClick:function(){return W(!0)},secondary:!0,title:"Edit",children:(0,D.jsx)(C.Edit,{size:I.bL})})]})):(0,D.jsx)(x.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return z((function(n){return H(H({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===q||void 0===q?void 0:q.openai_api_key)||""})]})}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsxs)(s.ZP,{alignItems:"center",children:[(0,D.jsx)(d.ZP,{id:"save-project-settings",loading:ae,onClick:function(){se({features:null===q||void 0===q?void 0:q.features,help_improve_mage:null===q||void 0===q?void 0:q.help_improve_mage,openai_api_key:null===q||void 0===q?void 0:q.openai_api_key,pipelines:null===q||void 0===q?void 0:q.pipelines})},primary:!0,children:"Save project settings"}),M&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(g.Z,{mr:w.cd}),(0,D.jsx)(d.ZP,{onClick:M,secondary:!0,children:k||"Cancel"})]})]})]});return P?(0,D.jsx)(O,{children:ue}):ue}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5699],{94629:function(e,t,r){r.d(t,{Z:function(){return w}});var n=r(82394),o=r(21831),i=r(82684),c=r(50724),u=r(1402),s=r(97618),a=r(70613),f=r(31557),d=r(68899),l=r(28598);function p(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(d.HS,{noPadding:n,ref:t,children:r})}var h=i.forwardRef(p),b=r(62547),v=r(82571),m=r(77417),O=r(46684),y=r(75375);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,i=e.afterHidden,p=e.afterWidth,g=e.afterWidthOverride,P=e.appendBreadcrumbs,w=e.before,k=e.beforeHeader,x=e.beforeWidth,A=e.breadcrumbs,S=e.children,Z=e.contained,I=e.errors,E=e.headerMenuItems,R=e.headerOffset,C=e.hideAfterCompletely,W=e.mainContainerHeader,M=e.navigationItems,H=e.setAfterHidden,B=e.setAfterWidth,_=e.setBeforeWidth,N=e.setErrors,D=e.subheaderChildren,T=e.subheaderNoPadding,U=e.title,G=e.uuid,F=(0,y.Z)(G,{beforeResizeOffset:y.H,setWidthAfter:B,setWidthBefore:_,widthAfter:p,widthBefore:x,widthOverrideAfter:g}),L=F.mainContainerRef,z=F.mousedownActiveAfter,Y=F.mousedownActiveBefore,q=F.setMousedownActiveAfter,J=F.setMousedownActiveBefore,K=F.setWidthAfter,Q=F.setWidthBefore,V=F.widthAfter,X=F.widthBefore,$=(0,m.Z)().project,ee=[];return A&&ee.push.apply(ee,(0,o.Z)(A)),null!==A&&void 0!==A&&A.length&&!P||!$||null!==A&&void 0!==A&&A.length||ee.unshift({bold:!P,label:function(){return U}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.Z,{title:U}),(0,l.jsx)(f.Z,{breadcrumbs:ee,menuItems:E}),(0,l.jsxs)(d.Nk,{ref:t,children:[0!==(null===M||void 0===M?void 0:M.length)&&(0,l.jsx)(d.lm,{showMore:!0,children:(0,l.jsx)(v.Z,{navigationItems:M,showMore:!0})}),(0,l.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:O.Mz,afterHidden:i,afterMousedownActive:z,afterWidth:V,before:w,beforeHeader:k,beforeHeightOffset:O.Mz,beforeMousedownActive:Y,beforeWidth:w?X:d.k1,contained:Z,headerOffset:R,hideAfterCompletely:!r||C,leftOffset:w?d.k1:null,mainContainerHeader:W,mainContainerRef:L,setAfterHidden:H,setAfterMousedownActive:q,setAfterWidth:K,setBeforeMousedownActive:J,setBeforeWidth:Q,children:[D&&(0,l.jsx)(h,{noPadding:T,children:D}),S]})})]}),I&&(0,l.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===N||void 0===N?void 0:N(null)},children:(0,l.jsx)(u.Z,j(j({},I),{},{onClose:function(){return null===N||void 0===N?void 0:N(null)}}))})]})}var w=i.forwardRef(P)},74395:function(e,t,r){r.d(t,{M:function(){return c},W:function(){return i}});var n=r(25976),o=r(46684),i=34*r(70515).iI,c=n.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],o.Mz)},24755:function(e,t,r){r.d(t,{B2:function(){return o},DQ:function(){return l},HY:function(){return a},Pl:function(){return n},SA:function(){return p},WH:function(){return f},fF:function(){return s},tC:function(){return d}});var n,o,i=r(19452),c=r(50178),u=r(72473),s="Git settings",a="Preferences",f="Workspace";!function(e){e.PROJECT_PLATFORM="Platform",e.WORKSPACE="Workspace",e.USER_MANAGEMENT="User management"}(n||(n={})),function(e){e.PERMISSIONS="Permissions",e.PREFERENCES="Preferences",e.ROLES="Roles",e.SETTINGS="Settings",e.USERS="Users"}(o||(o={}));var d="Account",l="Profile",p=function(e,t){var r=e.owner,p=e.roles,h=e.project_access,b=(t||{projectPlatformActivated:!1}).projectPlatformActivated,v=[{items:[{Icon:u.WorkspacesIcon,linkProps:{href:"/settings/workspace/preferences"},uuid:a},{Icon:u.Settings,linkProps:{href:"/settings/workspace/sync-data"},uuid:s}],uuid:f}];if(!(0,c.YB)())return v;if(r||p===i.No.ADMIN||0!==(3&h)){var m=[{Icon:u.WorkspacesUsersIcon,linkProps:{href:"/settings/workspace/users"},uuid:o.USERS}];(0,c.Bw)()&&m.push.apply(m,[{Icon:u.VisibleEye,linkProps:{href:"/settings/workspace/roles"},uuid:o.ROLES},{Icon:u.Locked,linkProps:{href:"/settings/workspace/permissions"},uuid:o.PERMISSIONS}]),v.push({items:m,uuid:n.USER_MANAGEMENT})}return b&&v.push({items:[{Icon:u.BlocksSeparated,linkProps:{href:"/settings/platform/preferences"},uuid:o.PREFERENCES},{Icon:u.SettingsWithKnobs,linkProps:{href:"/settings/platform/settings"},uuid:o.SETTINGS}],uuid:n.PROJECT_PLATFORM}),v.concat([{items:[{Icon:u.Sun,linkProps:{href:"/settings/account/profile"},uuid:l}],uuid:d}])}},28274:function(e,t,r){r.d(t,{Z:function(){return A}});var n=r(94629),o=r(82394),i=r(12691),c=r.n(i),u=r(55485),s=r(48670),a=r(38276),f=r(30160),d=r(25976),l=r(44897),p=r(70515),h=r(91437),b=(p.iI,d.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*p.iI,2.5*p.iI)),v=d.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,h.eR)(),1.5*p.iI,2.5*p.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||l.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||l.Z.background).codeTextarea,";\n ")})),m=r(28598),O=r(82684);function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var j=function(e){var t=e.isItemSelected,r=e.sections;return(0,m.jsx)(a.Z,{py:p.Gg,children:null===r||void 0===r?void 0:r.map((function(e){var r=e.items,n=e.title,o=e.uuid;return(0,m.jsxs)(a.Z,{children:[(0,m.jsx)(b,{children:(0,m.jsx)(f.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:n?n():o})}),null===r||void 0===r?void 0:r.map((function(e){var r=e.Icon,n=e.label,i=e.linkProps,f=e.onClick,d=e.uuid,l=null===t||void 0===t?void 0:t(g(g({},e),{},{uuidWorkspace:o})),h=n?n():d,b=(0,m.jsx)(v,{selected:l,children:(0,m.jsxs)(u.ZP,{alignItems:"center",children:[r&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(r,{default:!l,size:1.75*p.iI}),(0,m.jsx)(a.Z,{mr:1})]}),h]})});return i?(0,O.createElement)(c(),g(g({},i),{},{key:d,passHref:!0}),(0,m.jsx)(s.Z,{block:!0,default:!l,noHoverUnderline:!0,noOutline:!0,sameColorAsText:l,children:b})):(0,m.jsx)(s.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:f,preventDefault:!0,sameColorAsText:!0,children:b},d)}))]},o)}))})},P=r(77417),w=r(74395),k=r(24755),x=r(50178);var A=function(e){var t=e.after,r=e.afterHeader,o=e.afterHidden,i=e.afterWidth,c=e.appendBreadcrumbs,u=e.breadcrumbs,s=e.children,a=e.hideAfterCompletely,f=e.setAfterHidden,d=e.title,l=e.uuidItemSelected,h=e.uuidWorkspaceSelected,b=(0,x.PR)()||{},v=(0,P.Z)().projectPlatformActivated;return(0,m.jsx)(n.Z,{after:t,afterHeader:r,afterHidden:!t||o,afterWidth:t?i||50*p.iI:0,afterWidthOverride:!0,appendBreadcrumbs:c,before:(0,m.jsx)(w.M,{children:(0,m.jsx)(j,{isItemSelected:function(e){var t=e.uuid,r=e.uuidWorkspace;return h===r&&l===t},sections:(0,k.SA)(b,{projectPlatformActivated:v})})}),beforeWidth:w.W,breadcrumbs:u,hideAfterCompletely:a,setAfterHidden:f,title:d||"Settings",uuid:"".concat(d||"settings","/index"),children:s})}},93808:function(e,t,r){r.d(t,{Z:function(){return S}});var n=r(77837),o=r(26304),i=r(62243),c=r(29385),u=r(80022),s=r(13692),a=r(93189),f=r(15544),d=r(82394),l=r(38860),p=r.n(l),h=r(82684),b=r(56663),v=r.n(b),m=r(40761),O=r(34661),y=r(36105),g=r(50178),j=r(69419),P=r(28598),w=["auth"];function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){(0,d.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.Z)(e);if(t){var o=(0,f.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.Z)(this,r)}}function S(e){return function(t){(0,s.Z)(a,t);var r=A(a);function a(){var e;(0,i.Z)(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=r.call.apply(r,[this].concat(n)),(0,d.Z)((0,u.Z)(e),"state",{auth:new m.Z(e.props.token)}),e}return(0,c.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new m.Z(this.props.token)})}},{key:"render",value:function(){var t=this.props,r=(t.auth,(0,o.Z)(t,w));return(0,P.jsx)(e,x({auth:this.state.auth},r))}}],[{key:"getInitialProps",value:function(){var t=(0,n.Z)(p().mark((function t(r){var n,o,i,c,u,s,a,f,d;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=v()(r),o=(0,g.ex)(r),i=o.id,c=n[O.Mv],u=n[y.qt],s=new m.Z(c),a=x(x({},r),{},{auth:s,currentGroupId:i,theme:u}),(0,g.YB)(r)&&s.isExpired&&(console.log("OAuth token has expired."),f=x(x({},r.query),{},{redirect_url:r.asPath}),(0,j.nL)("/sign-in?".concat((0,j.uM)(f)),r.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(a);case 10:return d=t.sent,t.abrupt("return",x(x({},d),{},{auth:s,currentGroupId:i,theme:u}));case 12:return t.abrupt("return",a);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),a}(h.Component)}},80022:function(e,t,r){function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7361],{37361:function(e,n,r){r.d(n,{X:function(){return k}});var i=r(21831),l=r(75582),s=r(82394),t=r(21764),o=r(82684),d=r(69864),a=r(34376),c=r(71180),u=r(70652),E=r(15338),f=r(97618),v=r(55485),I=r(85854),j=r(65956),m=r(28274),p=r(38276),Z=r(75499),x=r(30160),h=r(17488),g=r(35686),A=r(8193),L=r(72473),_=r(70515),S=r(24755),D=r(3917),R=r(76417),P=r(36717),T=r(50178),O=r(86735),b=r(42122),C=r(72619),B=r(95924),w=r(28598);function N(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 y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?N(Object(r),!0).forEach((function(n){(0,s.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var k,W=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.ROLES="Roles"}(k||(k={})),n.Z=function(e){var n,r,s,N=e.contained,M=e.disableFields,U=e.onCancel,H=e.slug,Y=(0,T.PR)()||{},z=Y.id,Q=Y.owner,V=(0,a.useRouter)(),q=(0,o.useState)(!0),F=q[0],G=q[1],K=(0,o.useState)(null),$=K[0],X=K[1],J=(0,o.useState)({}),ee=J[0],ne=J[1],re=(0,o.useState)(null),ie=re[0],le=re[1],se=(0,o.useCallback)((function(e,n,r){le(y(y({},e),{},{rolesMapping:(0,O.HK)(n||[],(function(e){return e.id})),permissionsMapping:(0,O.HK)(r||[],(function(e){return e.id}))}))}),[le]),te=(0,o.useCallback)((function(e){ne((function(n){return y(y({},n),e)})),le((function(n){return y(y({},n),e)}))}),[ne,le]),oe=g.ZP.users.detail(H,{},{revalidateOnFocus:!1}).data,de=(0,o.useMemo)((function(){return null===oe||void 0===oe?void 0:oe.user}),[oe]);(0,o.useEffect)((function(){de&&se(de,null===de||void 0===de?void 0:de.roles_new,null===de||void 0===de?void 0:de.permissions)}),[se,de]);var ae=(0,d.Db)(de?g.ZP.users.useUpdate(H):g.ZP.users.useCreate(),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(e){var n=e.user;ne({}),se(n,null===n||void 0===n?void 0:n.roles_new,null===n||void 0===n?void 0:n.permissions),de||V.push("/settings/workspace/users/".concat(null===n||void 0===n?void 0:n.id)),String(null===n||void 0===n?void 0:n.id)===String(z)&&(0,T.av)(y(y({},(0,T.PR)()),{},{avatar:null===n||void 0===n?void 0:n.avatar,first_name:null===n||void 0===n?void 0:n.first_name,last_name:null===n||void 0===n?void 0:n.last_name,username:null===n||void 0===n?void 0:n.username})),t.Am.success(de?"User profile successfully updated.":"New user created successfully.",{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,l=n.message,s=n.type;t.Am.error((null===r||void 0===r?void 0:r.error)||i||l,{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ce=(0,l.Z)(ae,2),ue=ce[0],Ee=ce[1].isLoading,fe=(0,d.Db)(g.ZP.users.useDelete(null===de||void 0===de?void 0:de.id),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){V.push("/settings/workspace/users"),t.Am.success("User successfully delete.",{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:"user-delete-success-".concat(null===de||void 0===de?void 0:de.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,l=n.message,s=n.type;t.Am.error((null===r||void 0===r?void 0:r.error)||i||l,{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ve=(0,l.Z)(fe,2),Ie=ve[0],je=ve[1].isLoading,me=g.ZP.roles.list().data,pe=(0,o.useMemo)((function(){return(0,O.YC)((null===me||void 0===me?void 0:me.roles)||[],"name")}),[me]),Ze=(0,o.useMemo)((function(){return(null===ie||void 0===ie?void 0:ie.rolesMapping)||{}}),[ie]),xe=(0,o.useMemo)((function(){return(0,O.YC)(Object.values(Ze),"name")}),[Ze]),he=g.ZP.permissions.list({_limit:1e3}).data,ge=((0,o.useMemo)((function(){return(0,O.YC)((null===he||void 0===he?void 0:he.permissions)||[],"entity_name")}),[he]),(0,o.useMemo)((function(){return(null===ie||void 0===ie?void 0:ie.permissionsMapping)||{}}),[ie])),Ae=(0,o.useMemo)((function(){return(0,O.YC)(Object.values(ge),"entity_name")}),[ge]),Le=(0,o.useMemo)((function(){return(null===xe||void 0===xe?void 0:xe.length)>=1}),[xe]),_e=(0,o.useMemo)((function(){return(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Add,{}),compact:!0,onClick:function(){X(k.ROLES),G(!1)},primary:!Le,secondary:Le,small:!0,children:"Add roles"})}),[Le,X,G]),Se=(0,o.useMemo)((function(){return(null===Ae||void 0===Ae?void 0:Ae.length)>=1}),[Ae]),De=((0,o.useMemo)((function(){return(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Add,{}),compact:!0,onClick:function(){X(k.PERMISSIONS),G(!1)},primary:!Se,secondary:Se,small:!0,children:"Add permission"})}),[Se,X,G]),(0,o.useCallback)((function(e,n,r){return(0,w.jsx)(Z.Z,{columnFlex:[].concat((0,i.Z)(r?[]:[null]),[1]),columns:[].concat((0,i.Z)(r?[]:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===Ze||void 0===Ze?void 0:Ze[n]}));return(0,w.jsx)(u.Z,{checked:n,onClick:function(r){(0,B.j)(r),te(n?{rolesMapping:{}}:{rolesMapping:(0,O.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"}]),[{uuid:"Role"}]),onClickRow:n&&!r?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,l=e.id,s=!(null===Ze||void 0===Ze||!Ze[l]);return[].concat((0,i.Z)(r?[]:[(0,w.jsx)(u.Z,{checked:s,onClick:function(n){(0,B.j)(n);var r=y({},Ze);s?null===r||void 0===r||delete r[l]:r[l]=e,te({rolesMapping:r})}},"checkbox")]),[(0,w.jsx)(x.ZP,{monospace:!0,children:n},"name")])})),uuid:"roles"})}),[Ze,te])),Re=(0,o.useCallback)((function(e,n,r){return(0,w.jsx)(Z.Z,{columnFlex:[null,2,1,1,6],columns:[{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n&&!r?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,l=e.entity_name,s=e.entity_type,t=e.id,o=n?(0,P.q)(n):[],d=(null===o||void 0===o?void 0:o.length)||0;return[(0,w.jsx)(x.ZP,{default:!0,monospace:!0,children:t},"id"),(0,w.jsx)(x.ZP,{monospace:!0,children:l||r},"entityName"),(0,w.jsx)(x.ZP,{default:!0,monospace:!!s,children:s||"-"},"entityType"),(0,w.jsx)(x.ZP,{default:!0,monospace:!!i,children:i||"-"},"entityID"),(0,w.jsx)("div",{children:d>=1&&(0,w.jsx)(v.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===o||void 0===o?void 0:o.map((function(e,n){return(0,w.jsx)("div",{children:(0,w.jsxs)(x.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,w.jsx)(x.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[]),Pe=(0,o.useMemo)((function(){return De(pe)}),[De,pe]),Te=(0,o.useMemo)((function(){var e;return De(xe,!0,null===(e=M||[])||void 0===e?void 0:e.includes(k.ROLES))}),[De,M,xe]),Oe=(0,o.useMemo)((function(){var e;return Re(Ae,!0,null===(e=M||[])||void 0===e?void 0:e.includes(k.PERMISSIONS))}),[Re,Ae]),be=(0,w.jsxs)(A.N,{children:[(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Profile"})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Avatar"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({avatar:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Add initials or an emoji",value:(null===ie||void 0===ie?void 0:ie.avatar)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"username"in ee&&!(null!==ie&&void 0!==ie&&ie.username),default:!0,large:!0,children:["Username ","username"in ee&&!(null!==ie&&void 0!==ie&&ie.username)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({username:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Mage Supreme",value:(null===ie||void 0===ie?void 0:ie.username)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"First name"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({first_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Urza",value:(null===ie||void 0===ie?void 0:ie.first_name)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Last name"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({last_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Andromeda",value:(null===ie||void 0===ie?void 0:ie.last_name)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[de&&(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Email"}),!de&&(0,w.jsxs)(x.ZP,{danger:"email"in ee&&!(null!==ie&&void 0!==ie&&ie.email),default:!0,large:!0,children:["Email ","email"in ee&&!(null!==ie&&void 0!==ie&&ie.email)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),de&&(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,muted:!0,children:null===ie||void 0===ie?void 0:ie.email}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Alphabet,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]}),!de&&(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Alphabet,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({email:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. mage@power.com",type:"email",value:(null===ie||void 0===ie?void 0:ie.email)||""})})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Authentication"})}),(0,w.jsx)(E.Z,{light:!0}),de&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password_current"in ee&&!(null!==ie&&void 0!==ie&&ie.password_current),default:!0,large:!0,children:["Current password ","password_current"in ee&&!(null!==ie&&void 0!==ie&&ie.password_current)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password_current:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password_current)||""})})]})}),(0,w.jsx)(E.Z,{light:!0})]}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password"in ee&&!(null!==ie&&void 0!==ie&&ie.password),default:!0,large:!0,children:[de?"New password":"Password"," ","password"in ee&&!(null!==ie&&void 0!==ie&&ie.password)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password_confirmation"in ee&&!(null!==ie&&void 0!==ie&&ie.password_confirmation),default:!0,large:!0,children:["Confirm ",de?"new password":"password"," ","password_confirmation"in ee&&!(null!==ie&&void 0!==ie&&ie.password_confirmation)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password_confirmation:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password_confirmation)||""})})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN}),de&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,w.jsx)(I.Z,{level:4,children:"Roles"}),(0,w.jsx)(p.Z,{mr:_.cd}),Le&&!(null!==(n=M||[])&&void 0!==n&&n.includes(k.ROLES))&&(0,w.jsx)(v.ZP,{alignItems:"center",children:_e})]})}),(0,w.jsx)(E.Z,{light:!0}),!Le&&!(null!==(r=M||[])&&void 0!==r&&r.includes(k.ROLES))&&(0,w.jsxs)(p.Z,{p:_.cd,children:[(0,w.jsx)(p.Z,{mb:_.cd,children:(0,w.jsx)(x.ZP,{default:!0,children:"This user currently has no roles attached."})}),(0,w.jsx)(v.ZP,{alignItems:"center",children:_e})]}),Le&&(0,w.jsx)(p.Z,{pb:_.Mq,children:Te})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,w.jsx)(I.Z,{level:4,children:"Permissions"})})}),(0,w.jsx)(E.Z,{light:!0}),!Se&&(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(x.ZP,{default:!0,children:"This user currently has no permissions."})}),Se&&(0,w.jsx)(p.Z,{pb:_.Mq,children:Oe})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Metadata"})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Last updated"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ie||void 0===ie?void 0:ie.updated_at)&&(0,D.d$)(null===ie||void 0===ie?void 0:ie.updated_at,{includeSeconds:!0})}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Schedule,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Created at"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ie||void 0===ie?void 0:ie.created_at)&&(0,D.d$)(null===ie||void 0===ie?void 0:ie.created_at,{includeSeconds:!0})}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Schedule,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN})]}),(0,w.jsxs)(v.ZP,{children:[(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Save,{}),disabled:!ee||!(null!==(s=Object.keys(ee))&&void 0!==s&&s.length),loading:Ee,onClick:function(){return ue({user:y(y({},(0,b.GL)(ie,["avatar","first_name","last_name","password","password_confirmation","password_current","username"].concat(de?[]:"email"),{include_blanks:!0})),null!==M&&void 0!==M&&M.includes(k.ROLES)?{}:{role_ids:Object.keys((null===ie||void 0===ie?void 0:ie.rolesMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:de?"Save changes":"Create new user"}),U&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(c.ZP,{onClick:function(){return null===U||void 0===U?void 0:U()},secondary:!0,children:"Cancel and go back"})]}),de&&String(z)!==String(H)&&Q&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Trash,{}),danger:!0,loading:je,onClick:function(){return Ie()},children:"Delete user"})]})]})]});return N?be:(0,w.jsx)(m.Z,{after:Pe,afterHeader:(0,w.jsx)(p.Z,{px:_.cd,children:(0,w.jsx)(x.ZP,{bold:!0,children:$})}),afterHidden:F,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Users"},linkProps:{href:"/settings/workspace/users"}},{bold:!0,label:function(){return(0,R.s)(ie)}}],setAfterHidden:G,title:de?(0,R.s)(de):"New user",uuidItemSelected:S.B2.USERS,uuidWorkspaceSelected:S.Pl.USER_MANAGEMENT,children:de&&be})}},36288:function(e,n,r){r.d(n,{Fy:function(){return v},G9:function(){return c},H1:function(){return I},K4:function(){return d},ND:function(){return a},Pt:function(){return u},WG:function(){return s},hl:function(){return f},m_:function(){return t},oO:function(){return E}});var i,l,s,t,o=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"}(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"}(t||(t={}));var d=(i={},(0,o.Z)(i,s.OWNER,"Owner"),(0,o.Z)(i,s.ADMIN,"Admin"),(0,o.Z)(i,s.EDITOR,"Editor"),(0,o.Z)(i,s.VIEWER,"Viewer"),(0,o.Z)(i,s.LIST,"List"),(0,o.Z)(i,s.DETAIL,"Detail"),(0,o.Z)(i,s.CREATE,"Create"),(0,o.Z)(i,s.UPDATE,"Update"),(0,o.Z)(i,s.DELETE,"Delete"),(0,o.Z)(i,s.OPERATION_ALL,"All operations"),(0,o.Z)(i,s.QUERY,"Query"),(0,o.Z)(i,s.QUERY_ALL,"Query all attributes"),(0,o.Z)(i,s.READ,"Read"),(0,o.Z)(i,s.READ_ALL,"Read all attributes"),(0,o.Z)(i,s.WRITE,"Write"),(0,o.Z)(i,s.WRITE_ALL,"Write all attributes"),(0,o.Z)(i,s.ALL,"All"),(0,o.Z)(i,s.DISABLE_LIST,"Disable list"),(0,o.Z)(i,s.DISABLE_DETAIL,"Disable detail"),(0,o.Z)(i,s.DISABLE_CREATE,"Disable create"),(0,o.Z)(i,s.DISABLE_UPDATE,"Disable update"),(0,o.Z)(i,s.DISABLE_DELETE,"Disable delete"),(0,o.Z)(i,s.DISABLE_OPERATION_ALL,"Disable all operations"),(0,o.Z)(i,s.DISABLE_QUERY,"Disable query"),(0,o.Z)(i,s.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,o.Z)(i,s.DISABLE_READ,"Disable read"),(0,o.Z)(i,s.DISABLE_READ_ALL,"Disable all read attributes"),(0,o.Z)(i,s.DISABLE_WRITE,"Disable write"),(0,o.Z)(i,s.DISABLE_WRITE_ALL,"Disable all write attributes"),i),a=(l={},(0,o.Z)(l,t.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,o.Z)(l,t.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,o.Z)(l,t.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),l),c=[s.OWNER,s.ADMIN,s.EDITOR,s.VIEWER,s.ALL],u=[s.LIST,s.DETAIL,s.CREATE,s.UPDATE,s.DELETE,s.OPERATION_ALL],E=[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],v=[s.READ,s.READ_ALL,s.DISABLE_READ,s.DISABLE_READ_ALL],I=[s.WRITE,s.WRITE_ALL,s.DISABLE_WRITE,s.DISABLE_WRITE_ALL]},36717:function(e,n,r){r.d(n,{q:function(){return s}});var i=r(75582),l=r(36288);function s(e){return Object.entries(l.K4).reduce((function(n,r){var l=(0,i.Z)(r,2),s=l[0],t=l[1];return e&Number(s)?n.concat(t):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}})}}]);
|