mage-ai 0.9.65__py3-none-any.whl → 0.9.67__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/monitors/BaseMonitor.py +38 -16
- mage_ai/api/policies/BackfillPolicy.py +1 -0
- mage_ai/api/resources/OauthResource.py +13 -5
- mage_ai/api/resources/SessionResource.py +6 -4
- mage_ai/authentication/ldap.py +19 -9
- mage_ai/authentication/oauth/constants.py +8 -14
- mage_ai/authentication/oauth/utils.py +18 -6
- mage_ai/authentication/providers/active_directory.py +21 -16
- mage_ai/authentication/providers/azure_devops.py +18 -0
- mage_ai/authentication/providers/bitbucket.py +10 -9
- mage_ai/authentication/providers/constants.py +2 -0
- mage_ai/authentication/providers/ghe.py +5 -9
- mage_ai/authentication/providers/gitlab.py +6 -9
- mage_ai/authentication/providers/google.py +9 -6
- mage_ai/authentication/providers/oidc.py +6 -4
- mage_ai/authentication/providers/okta.py +9 -6
- mage_ai/cluster_manager/kubernetes/workload_manager.py +10 -0
- mage_ai/cluster_manager/workspace/base.py +6 -1
- mage_ai/cluster_manager/workspace/kubernetes.py +3 -0
- mage_ai/data_preparation/decorators.py +15 -0
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +22 -12
- mage_ai/data_preparation/git/__init__.py +10 -1
- mage_ai/data_preparation/git/api.py +3 -0
- mage_ai/data_preparation/git/clients/azure_devops.py +106 -0
- mage_ai/data_preparation/git/clients/base.py +6 -0
- mage_ai/data_preparation/git/clients/gitlab.py +3 -2
- mage_ai/data_preparation/git/utils.py +31 -29
- mage_ai/data_preparation/models/block/__init__.py +27 -18
- mage_ai/data_preparation/models/block/dbt/block_sql.py +164 -0
- mage_ai/data_preparation/models/block/dynamic/variables.py +1 -2
- mage_ai/data_preparation/models/pipeline.py +3 -3
- mage_ai/data_preparation/models/triggers/__init__.py +6 -1
- mage_ai/data_preparation/preferences.py +42 -37
- mage_ai/data_preparation/repo_manager.py +21 -0
- mage_ai/data_preparation/storage/gcs_storage.py +27 -2
- mage_ai/data_preparation/storage/local_storage.py +18 -3
- mage_ai/data_preparation/storage/s3_storage.py +7 -2
- mage_ai/data_preparation/templates/data_loaders/streaming/generic_python.py +23 -0
- mage_ai/data_preparation/templates/main/metadata.yaml +6 -0
- mage_ai/data_preparation/templates/template.py +6 -2
- mage_ai/data_preparation/variable_manager.py +2 -1
- mage_ai/io/base.py +3 -0
- mage_ai/io/bigquery.py +2 -0
- mage_ai/io/export_utils.py +14 -9
- mage_ai/io/mssql.py +104 -25
- mage_ai/io/mysql.py +10 -9
- mage_ai/io/oracledb.py +14 -2
- mage_ai/io/postgres.py +3 -0
- mage_ai/io/sql.py +14 -6
- mage_ai/io/trino.py +10 -8
- mage_ai/orchestration/db/migrations/versions/90d978a8aef8_update_unique_constraint_for_secret.py +11 -5
- mage_ai/orchestration/db/models/schedules.py +25 -1
- mage_ai/orchestration/db/models/schedules_project_platform.py +24 -1
- mage_ai/orchestration/job_manager.py +6 -1
- mage_ai/orchestration/pipeline_scheduler_original.py +16 -10
- mage_ai/server/constants.py +1 -1
- mage_ai/server/file_observer.py +10 -0
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/chunks/{1557-a754b04510d50b80.js → 1557-01f0843dc6ac4971.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9440-4069842b90d4b801.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-1c1ffd928f5a00f7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/oauth-30e34ee15d410331.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{edit-8d32ac7e8f023779.js → edit-36377e679da2cd91.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-3f5c14076ddde20e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-fe08120d9a6fb1b0.js → triggers-f508c2f261297724.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-bcdb4ad41dd4c7d5.js → frontend_dist/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{sign-in-19b36600d908b711.js → sign-in-7d38b2f7c3e918a1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-ac7fdc472bedf682.js → webpack-d079359c241db804.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/{ZMrJfDouIX5AMb_RteRbL → vPsMu6Fi2zrHaf2fRXKRO}/_buildManifest.js +1 -1
- 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/chunks/{1557-a754b04510d50b80.js → 1557-01f0843dc6ac4971.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-4069842b90d4b801.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-1c1ffd928f5a00f7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/oauth-30e34ee15d410331.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{edit-8d32ac7e8f023779.js → edit-36377e679da2cd91.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-3f5c14076ddde20e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-fe08120d9a6fb1b0.js → triggers-f508c2f261297724.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines-bcdb4ad41dd4c7d5.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{sign-in-19b36600d908b711.js → sign-in-7d38b2f7c3e918a1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-481689d9989710cd.js → webpack-68c003fb6a175cd7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/{QYwFH4sievaq5XyUjRriy → khKiaJtwrslgMmp4YSa1f}/_buildManifest.js +1 -1
- 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/server.py +117 -87
- mage_ai/server/utils/output_display.py +6 -1
- mage_ai/services/aws/s3/s3.py +8 -2
- mage_ai/services/slack/slack.py +8 -8
- mage_ai/settings/__init__.py +36 -186
- mage_ai/settings/backends.py +95 -0
- mage_ai/settings/keys/__init__.py +1 -0
- mage_ai/settings/keys/auth.py +76 -0
- mage_ai/settings/server.py +187 -0
- mage_ai/shared/io.py +2 -2
- mage_ai/shared/logger.py +12 -6
- mage_ai/streaming/sources/base_python.py +30 -0
- mage_ai/streaming/sources/source_factory.py +25 -0
- mage_ai/tests/api/endpoints/test_oauths.py +13 -5
- mage_ai/tests/api/operations/test_operations.py +2 -2
- mage_ai/tests/api/operations/test_sessions.py +83 -48
- mage_ai/tests/authentication/oauth/test_utils.py +56 -6
- mage_ai/tests/authentication/providers/test_active_directory.py +9 -15
- mage_ai/tests/data_preparation/models/test_block.py +39 -2
- mage_ai/tests/orchestration/db/models/test_schedules.py +33 -1
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/METADATA +2 -1
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/RECORD +225 -217
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/WHEEL +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9440-2bcbdc765ed82062.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-2ae1d919333f01fe.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-64851458dde54ad9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/oauth-abe5ba687cb93509.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-22e49726eeed16ae.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c74507dce89b41a2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-cf656cbe37ecaacc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-690206d30d8b412b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-2bcbdc765ed82062.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-2ae1d919333f01fe.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-64851458dde54ad9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/oauth-abe5ba687cb93509.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-22e49726eeed16ae.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c74507dce89b41a2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-cf656cbe37ecaacc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-690206d30d8b412b.js +0 -1
- mage_ai/settings/sso.py +0 -27
- /mage_ai/server/frontend_dist/_next/static/{ZMrJfDouIX5AMb_RteRbL → vPsMu6Fi2zrHaf2fRXKRO}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{QYwFH4sievaq5XyUjRriy → khKiaJtwrslgMmp4YSa1f}/_ssgManifest.js +0 -0
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/top_level.txt +0 -0
mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-64851458dde54ad9.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{55006:function(n,i,e){"use strict";e.r(i);var u=e(82684),t=e(34376),o=e(35686),a=e(87432),l=e(66916);i.default=function(){var n,i=(0,t.useRouter)(),e=i.asPath,s=e.split("?")[0],r=o.ZP.statuses.list().data,v=(0,u.useMemo)((function(){var n;return null===r||void 0===r||null===(n=r.statuses)||void 0===n?void 0:n[0]}),[r]),d=o.ZP.pipeline_runs.list({_limit:0}).data,c=0===(0,u.useMemo)((function(){var n;return(null===d||void 0===d||null===(n=d.metadata)||void 0===n?void 0:n.count)||0}),[null===d||void 0===d||null===(n=d.metadata)||void 0===n?void 0:n.count])?"/pipelines":"/overview";(0,u.useEffect)((function(){(0,a.xf)()&&(0,l.a3)()}),[]),(0,u.useEffect)((function(){var n;if(403===(null===d||void 0===d||null===(n=d.error)||void 0===n?void 0:n.code))i.replace("/sign-in");else if(v){var u=null===v||void 0===v?void 0:v.is_instance_manager,t=e;"/"===s&&(t=u?"/manage":c),d&&i.replace(t)}}),[s,e,d,v,c,i])}},48312:function(n,i,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return e(55006)}])}},function(n){n.O(0,[9774,2888,179],(function(){return i=48312,n(n.s=i);var i}));var i=n.O();_N_E=i}]);
|
mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/oauth-abe5ba687cb93509.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4688],{66316:function(t,e,r){"use strict";r.d(e,{Z:function(){return j}});var n=r(82394),o=r(70613),i=r(31557),c=r(33591),u=r(38276),a=r(70515),s=r(28598);var l=function(t){var e=t.children,r=t.width,n=void 0===r?12:r;return(0,s.jsx)(u.Z,{px:a.zC,children:(0,s.jsx)(c.Row,{children:(0,s.jsx)(c.Col,{lg:n,md:Math.min(12,Math.round(1.5*(12-n))),sm:Math.min(12,Math.round(1.75*(12-n))),xs:12,children:e})})})},f=r(25976),p=r(46684),d=f.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-jcgu5l-0"})(["padding-top:","px;",""],p.Mz,(function(t){return t.fullHeight&&"\n height: calc(100vh);\n "}));function O(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?O(Object(r),!0).forEach((function(e){(0,n.Z)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var j=function(t){var e=t.children,r=t.headerProps,n=t.title;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Z,{title:n}),(0,s.jsx)(i.Z,h({},r)),(0,s.jsx)(l,{children:(0,s.jsx)(d,{fullHeight:!0,children:e})})]})}},77429:function(t,e,r){"use strict";r.r(e);var n=r(77837),o=r(82394),i=r(38860),c=r.n(i),u=r(21764),a=r(82684),s=r(34376),l=r(66316),f=r(35686),p=r(53808),d=r(69419),O=r(28598);function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function j(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){(0,o.Z)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function b(){var t=(0,s.useRouter)(),e=(0,d.iV)(),r=null===e||void 0===e?void 0:e.state,n=(0,p.U2)(r),o=null===n||void 0===n?void 0:n.provider,i=e;n&&(i=j(j({},e),n));var c=f.ZP.oauths.detail(o,i).data,h=(0,a.useMemo)((function(){var t;return null===c||void 0===c||null===(t=c.oauth)||void 0===t?void 0:t.url}),[c]);return(0,a.useEffect)((function(){h&&(n?((0,p.Od)(r),t.push(h)):n||u.Am.error("Oauth failed due to state not matching!",{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:"oauth-state-error"}))}),[n,h,t,e,r]),(0,O.jsx)(l.Z,{title:"Oauth",children:(0,O.jsx)(O.Fragment,{})})}b.getInitialProps=(0,n.Z)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{});case 1:case"end":return t.stop()}}),t)}))),e.default=b},39341:function(t,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oauth",function(){return r(77429)}])}},function(t){t.O(0,[1557,9774,2888,179],(function(){return e=39341,t(t.s=e);var e}));var e=t.O();_N_E=e}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{74395:function(e,n,t){"use strict";t.d(n,{M:function(){return a},W:function(){return l}});var r=t(25976),i=t(46684),l=34*t(70515).iI,a=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},8955:function(e,n,t){"use strict";t.d(n,{G7:function(){return P},ZP:function(){return O},u$:function(){return x}});var r=t(75582),i=t(82394),l=t(26304),a=t(90299),c=t(9134),u=t(24138),s=t(38276),o=t(30160),d=t(75499),p=t(70515),f=t(16488),v=t(42122),b=t(28598),h=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=44,g={uuid:"Run details"},Z={uuid:"Dependency tree"},P=[Z,g];function O(e){var n=e.height,t=e.heightOffset,i=e.pipeline,m=e.selectedRun,O=e.selectedTab,y=e.setSelectedTab,k=j({},(0,l.Z)(e,h));m?k.blockStatus=(0,f.IJ)(null===m||void 0===m?void 0:m.block_runs):k.noStatus=!0;var _=(0,v.Kn)(null===m||void 0===m?void 0:m.variables)?j({},null===m||void 0===m?void 0:m.variables):(null===m||void 0===m?void 0:m.variables)||{},w=null===m||void 0===m?void 0:m.event_variables;if(w&&(0,v.Kn)(w)&&!(0,v.Qr)(w))if((0,v.Kn)(_)&&_.hasOwnProperty("event")){var S=(0,v.Kn)(_.event)?_.event:{};_.event=j(j({},S),w)}else _.event=j({},w);var I=[];_&&JSON.stringify(_,null,2).split("\n").forEach((function(e){I.push(" ".concat(e))}));var D=m&&[["Run ID",null===m||void 0===m?void 0:m.id],["Variables",(0,b.jsx)(c.Z,{language:"json",small:!0,source:I.join("\n")},"variable_value")]],C=m&&(0,b.jsx)(s.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:D.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],l=t[1];return[(0,b.jsx)(o.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,b.jsx)(o.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),E=O&&y;return(0,b.jsxs)(b.Fragment,{children:[E&&(0,b.jsx)(a.Z,{onClickTab:y,selectedTabUUID:null===O||void 0===O?void 0:O.uuid,tabs:P,underlineStyle:!0}),(!E||Z.uuid===(null===O||void 0===O?void 0:O.uuid))&&(0,b.jsx)(u.ZP,j(j({},k),{},{height:n,heightOffset:(t||0)+(E?x:0),pipeline:i})),g.uuid===(null===O||void 0===O?void 0:O.uuid)&&C]})}},8916:function(e,n,t){"use strict";t.d(n,{FS:function(){return s},JZ:function(){return p},Tt:function(){return d},e7:function(){return f},wx:function(){return o}});var r=t(75582),i=t(82394),l=t(83784),a=t(30229);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(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 o(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return u(u({},e),{},{value:s(n)})}))}function d(e){var n;return null===(n=o(e,(function(e){return e.uuid===l.C})))||void 0===n?void 0:n.reduce((function(e,n){var t=n.uuid,r=n.value;return u(u({},e),{},(0,i.Z)({},t,r))}),{})}function p(e,n){return n===a.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===a.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function f(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],a=t[1],c=a;try{c=JSON.parse(a)}catch(s){}return u(u({},e),{},(0,i.Z)({},l,c))}),{}):e}},88785:function(e,n,t){"use strict";t.d(n,{J:function(){return u},U:function(){return c}});var r=t(25976),i=t(44897),l=t(42631),a=t(70515),c=r.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*a.iI,a.cd*a.iI,a.cd*a.iI,40*a.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),u=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,a.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*a.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*a.iI,"px;\n ")}))},37899:function(e,n,t){"use strict";var r=t(82394),i=t(75582),l=t(82684),a=t(71180),c=t(15338),u=t(97618),s=t(55485),o=t(38276),d=t(75499),p=t(30160),f=t(35576),v=t(17488),b=t(72473),h=t(70515),m=t(42122),j=t(81728),x=t(28598);function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?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}n.Z=function(e){e.borderless,e.compact;var n=e.enableVariablesOverwrite,t=e.originalVariables,g=e.runtimeVariables,P=(e.setEnableVariablesOverwrite,e.setRuntimeVariables),O=(0,l.useState)({}),y=O[0],k=O[1],_=(0,l.useState)(null),w=_[0],S=_[1],I=(0,l.useState)(null),D=I[0],C=I[1];(0,l.useEffect)((function(){var e=Object.entries(g||{}).reduce((function(e,n){var t=(0,i.Z)(n,2),l=t[0],a=t[1],c=(0,j.Pb)(a)&&"object"===typeof JSON.parse(a)&&!Array.isArray(JSON.parse(a))&&null!==JSON.parse(a);return Z(Z({},e),{},(0,r.Z)({},l,c))}),{});k(e)}),[]);var E=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),P((function(t){return Z(Z({},t),{},(0,r.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return y[e]?(0,x.jsx)(f.Z,Z(Z({},t),{},{rows:1,value:n})):(0,x.jsx)(v.Z,Z({},t))};return(0,x.jsxs)(x.Fragment,{children:[n&&g&&Object.entries(g).length>0&&(0,x.jsx)(d.Z,{columnFlex:[null,1,null],columns:[{uuid:"Variable"},{uuid:"Value"},{label:function(){return""},uuid:"Action"}],rows:Object.entries(g).map((function(e){var n=(0,i.Z)(e,2),r=n[0],l=n[1];return[(0,x.jsx)(p.ZP,{default:!0,monospace:!0,children:r},"variable_".concat(r)),E(r,l),!(null!==t&&void 0!==t&&t[r])&&(0,x.jsx)(a.ZP,{iconOnly:!0,onClick:function(){P((function(e){return(0,m.gR)(e,[r])}))},children:(0,x.jsx)(b.Trash,{default:!0})})]}))}),(0,x.jsx)(o.Z,{p:h.cd,children:(0,x.jsxs)(s.ZP,{alignItems:"center",children:[(0,x.jsx)(u.Z,{flex:1,children:(0,x.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return S(e.target.value)},placeholder:"New variable UUID",value:w||""})}),(0,x.jsx)(o.Z,{mr:1}),(0,x.jsx)(u.Z,{flex:1,children:(0,x.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return C(e.target.value)},placeholder:"Variable value",value:D||""})}),(0,x.jsx)(o.Z,{mr:1}),(0,x.jsx)(a.ZP,{beforeIcon:(0,x.jsx)(b.Add,{}),disabled:!w||!D,onClick:function(){P((function(e){return Z(Z({},e),{},(0,r.Z)({},w,D))})),S(null),C(null)},children:"Add runtime variable"})]})}),(0,x.jsx)(c.Z,{light:!0})]})}},55072:function(e,n,t){"use strict";t.d(n,{Et:function(){return p},Q:function(){return d}});t(82684);var r=t(71180),i=t(55485),l=t(38276),a=t(31748),c=t(72473),u=t(79633),s=t(70515),o=t(28598),d=30,p=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,p=e.totalPages,f=[],v=t;if(v>p)f=Array.from({length:p},(function(e,n){return n}));else{var b=Math.floor(v/2),h=n-b;n+b>=p?(h=p-v+2,v-=2):n-b<=0?(h=0,v-=2):(v-=4,h=n-Math.floor(v/2)),f=Array.from({length:v},(function(e,n){return n+h}))}return(0,o.jsx)(o.Fragment,{children:p>0&&(0,o.jsxs)(i.ZP,{alignItems:"center",children:[(0,o.jsx)(r.ZP,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,o.jsx)(c.PaginateArrowLeft,{size:1.5*s.iI,stroke:a.Av})}),!f.includes(0)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!f.includes(1)&&(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),f.map((function(e){return(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{backgroundColor:e===n&&u.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!f.includes(p-1)&&(0,o.jsxs)(o.Fragment,{children:[!f.includes(p-2)&&(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,o.jsx)(l.Z,{ml:1}),(0,o.jsx)(r.ZP,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,o.jsx)(c.PaginateArrowRight,{size:1.5*s.iI,stroke:a.Av})})]})})}},83641:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return u},VV:function(){return l},_7:function(){return a},rn:function(){return c}});var r,i=t(41143),l="datetime",a="code",c=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var u=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR,r.CUSTOM]},83784:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},14805:function(e,n,t){"use strict";var r=t(82394),i=t(44495),l=t(55485),a=t(44085),c=t(38276),u=t(30160),s=t(88785),o=t(70515),d=t(86735),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.localTime,t=e.selectedDate,r=e.selectedTime,f=e.setSelectedDate,b=e.setSelectedTime,h=e.topPosition;return(0,p.jsxs)(s.J,{absolute:!0,topPosition:h,children:[(0,p.jsx)(i.ZP,{onChange:f,value:t}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(l.ZP,{alignItems:"center",children:[(0,p.jsxs)(u.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(a.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),b((function(n){return v(v({},n),{},{hour:e.target.value})}))},paddingRight:5*o.iI,placeholder:"HH",value:null===r||void 0===r?void 0:r.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(u.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(a.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),b((function(n){return v(v({},n),{},{minute:e.target.value})}))},paddingRight:5*o.iI,placeholder:"MM",value:null===r||void 0===r?void 0:r.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},79500:function(e,n,t){"use strict";t.d(n,{a:function(){return l}});var r=t(16488),i=t(3917);function l(e,n){var t,l;if(null!==n&&void 0!==n&&n.localTimezone)t=(0,i.n$)(e),l={hour:(0,i.lJ)(String(t.getHours())),minute:(0,i.lJ)(String(t.getMinutes()))};else{var a=e.split(" ")[1];t=(0,r.eI)(e),l={hour:a.substring(0,2),minute:a.substring(3,5)}}return{date:t,time:l}}},9134:function(e,n,t){"use strict";var r=t(82684),i=t(21124),l=t(68432),a=t(25976),c=t(65292),u=t(44897),s=t(95363),o=t(70515),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,v=e.source,b=e.wrapLines,h=(0,r.useContext)(a.ThemeContext);function m(e){var r=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(h.background||u.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:s.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*o.iI,paddingTop:2*o.iI},language:n,lineNumberStyle:{color:(h.content||u.Z.content).muted},showLineNumbers:p,style:c._4,useInlineStyles:!0,wrapLines:b,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(m,{value:n})}},children:v})}},51532:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return se}});var r=t(75582),i=t(77837),l=t(82394),a=t(38860),c=t.n(a),u=t(82684),s=t(69864),o=t(34376),d=t(83641),p=t(71180),f=t(15338),v=t(55485),b=t(85854),h=t(55072),m=t(75457),j=t(27966),x=t(44265),g=t(83784),Z=t(44085),P=t(38276),O=t(4190),y=t(75499),k=t(30160),_=t(35686),w=t(8955),S=t(72473),I=t(74395),D=t(70515),C=t(28795),E=t(81728),T=t(16488),M=t(8916),N=t(81655),A=t(15610),L=t(42122),F=t(50178),R=t(72619),U=t(95924),V=t(69419),B=t(70320),H=t(28598);function z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function J(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,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Y=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,a=e.setErrors,c=e.variables,z=(0,F.Ct)(),Y=(0,B.qB)(),K=(0,o.useRouter)(),W=n||{},X=W.block_uuid,Q=W.end_datetime,q=W.id,G=W.interval_type,$=W.interval_units,ee=W.name,ne=W.pipeline_run_dates,te=W.start_datetime,re=W.status,ie=W.total_run_count,le=W.variables,ae=void 0===le?{}:le,ce=l.uuid,ue=(0,V.iV)(),se={_limit:40,_offset:40*(null!==ue&&void 0!==ue&&ue.page?ue.page:0)};null!==ue&&void 0!==ue&&ue.status&&(se.status=ue.status);var oe=_.ZP.pipeline_runs.list(J(J({},se),{},{backfill_id:q}),{refreshInterval:3e3,revalidateOnFocus:!0},{pauseFetch:!q}),de=oe.data,pe=oe.mutate,fe=!(te&&Q&&G&&$),ve=!re,be=(0,u.useMemo)((function(){return(ve?ne:null===de||void 0===de?void 0:de.pipeline_runs)||[]}),[de,ne,ve]),he=(0,u.useMemo)((function(){var e;return ve?ie:null===de||void 0===de||null===(e=de.metadata)||void 0===e?void 0:e.count}),[de,ve,ie]),me=(0,u.useState)(null),je=me[0],xe=me[1],ge=(0,u.useMemo)((function(){var e=null!==ue&&void 0!==ue&&ue.page?ue.page:0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(j.Z,{disableRowSelect:ve,emptyMessage:null!==ue&&void 0!==ue&&ue.status?"No runs available":'No runs available. Please complete backfill configuration by clicking "Edit backfill" above.',fetchPipelineRuns:pe,onClickRow:function(e){return xe((function(n){var t=be[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:be,selectedRun:je,setErrors:a,setSelectedRun:xe}),(0,H.jsx)(P.Z,{p:2,children:(0,H.jsx)(h.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),t=J(J({},ue),{},{page:n>=0?n:0});K.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(ce,"/backfills/").concat(q,"?").concat((0,V.uM)(t)))},page:Number(e),totalPages:Math.ceil(he/40)})})]})}),[pe,q,be,ce,ue,K,je,a,ve,he]),Ze=(0,u.useState)(w.G7[0]),Pe=Ze[0],Oe=Ze[1],ye=(0,s.Db)(_.ZP.backfills.useUpdate(q),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){i(),pe()},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),ke=(0,r.Z)(ye,2),_e=ke[0],we=ke[1].isLoading,Se=(0,u.useMemo)((function(){return!!re&&(d.rn.CANCELLED!==re&&d.rn.FAILED!==re)}),[re]),Ie=(0,u.useMemo)((function(){return re&&d.rn.CANCELLED!==re&&d.rn.FAILED!==re&&d.rn.INITIAL!==re&&d.rn.RUNNING!==re}),[re]),De=(0,u.useMemo)((function(){var e={default:!0,size:1.5*D.iI},n=[[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.MultiShare,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Backfill type"})]},"backfill_type_label"),(0,H.jsx)(k.ZP,{monospace:!0,children:X?d._7:d.VV},"backfill_type")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Switch,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Status"})]},"backfill_status_label"),(0,u.createElement)(k.ZP,J(J({},(0,N.NC)(re)),{},{key:"backfill_status"}),re||"inactive")]];return X||n.push.apply(n,[[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.CalendarDate,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Start date and time"})]},"backfill_start_date_label"),(0,H.jsx)(k.ZP,{monospace:!0,small:!0,children:(0,T.Uc)(te,Y)},"backfill_start_date")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.CalendarDate,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"End date and time"})]},"backfill_end_date_label"),(0,H.jsx)(k.ZP,{monospace:!0,small:!0,children:(0,T.Uc)(Q,Y)},"backfill_end_date")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Schedule,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Interval type"})]},"interval_type_label"),(0,H.jsx)(k.ZP,{monospace:!0,children:G&&(0,E.kC)(G)},"interval_type")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Schedule,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Interval units"})]},"interval_units_label"),(0,H.jsx)(k.ZP,{monospace:!0,children:$},"interval_units")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.NumberHash,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Total runs"})]},"total_runs_label"),(0,H.jsx)(k.ZP,{monospace:!0,children:ie},"total_runs")]]),(0,H.jsx)(y.Z,{columnFlex:[null,1],rows:n})}),[X,Y,Q,G,$,te,re,ie]),Ce=(0,u.useMemo)((function(){return ae||{}}),[ae]),Ee=(0,u.useMemo)((function(){var e=(0,M.wx)(c,(function(e){return e.uuid===g.C}))||[];return(0,L.Qr)(Ce)||Object.entries(Ce).forEach((function(n){var t=(0,r.Z)(n,2),i=t[0],l=t[1],a=e.findIndex((function(e){return(null===e||void 0===e?void 0:e.uuid)===i}));-1!==a?e.splice(a,1,{uuid:i,value:(0,M.FS)(l)}):e.push({uuid:i,value:(0,M.FS)(l)})})),"undefined"!==typeof e&&null!==e&&void 0!==e&&e.length?(0,H.jsx)(y.Z,{columnFlex:[null,1],rows:e.map((function(e){var n=e.uuid,t=e.value;return[(0,H.jsx)(k.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,H.jsx)(k.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[Ce,c]);return(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(m.Z,{afterHidden:!je,before:(0,H.jsxs)(I.M,{children:[(0,H.jsxs)(P.Z,{mb:D.HN,pt:D.cd,px:D.cd,children:[(0,H.jsx)(P.Z,{mb:D.cd,children:(0,H.jsx)(S.Backfill,{size:5*D.iI})}),(0,H.jsx)(b.Z,{children:ee})]}),(0,H.jsx)(P.Z,{px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),De,Ee&&(0,H.jsxs)(P.Z,{my:D.HN,children:[(0,H.jsx)(P.Z,{px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Runtime variables"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ee]})]}),beforeWidth:34*D.iI,breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(ce,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return ee},linkProps:{as:"/pipelines/".concat(ce,"/backfills/").concat(q),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],buildSidekick:function(e){return(0,w.ZP)(J(J({},e),{},{selectedRun:je,selectedTab:Pe,setSelectedTab:Oe}))},errors:t,pageName:C.M.BACKFILLS,pipeline:l,setErrors:a,subheader:(0,H.jsxs)(v.ZP,{alignItems:"center",children:[!Ie&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(p.ZP,{beforeIcon:Se?(0,H.jsx)(S.Pause,{size:2*D.iI}):(0,H.jsx)(S.PlayButtonFilled,{inverted:!(d.rn.CANCELLED===re||d.rn.FAILED===re),size:2*D.iI}),danger:Se,disabled:fe,loading:we,onClick:function(e){(0,U.j)(e),_e({backfill:{status:Se?d.rn.CANCELLED:d.rn.INITIAL}})},outline:!0,success:!Se&&!(d.rn.CANCELLED===re||d.rn.FAILED===re)&&!fe,children:Se?"Cancel backfill":d.rn.CANCELLED===re||d.rn.FAILED===re?"Retry backfill":"Start backfill"}),(0,H.jsx)(P.Z,{mr:D.cd})]}),!z&&(0,H.jsxs)(H.Fragment,{children:[re===x.VO.COMPLETED?(0,H.jsx)(k.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}):(0,H.jsx)(p.ZP,{linkProps:{as:"/pipelines/".concat(ce,"/backfills/").concat(q,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit backfill"}),(0,H.jsx)(P.Z,{mr:D.cd})]}),!ve&&(0,H.jsxs)(Z.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?K.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(ce,"/backfills/").concat(q)):(0,A.u)({page:0,status:e.target.value})},paddingRight:4*D.iI,placeholder:"Select run status",value:(null===ue||void 0===ue?void 0:ue.status)||"all",children:[(0,H.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),x.IK.map((function(e){return(0,H.jsx)("option",{value:e,children:x.Do[e]},e)}))]})]}),title:function(){return ee},uuid:"backfill/detail",children:[(0,H.jsx)(P.Z,{mt:D.cd,px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Runs for this backfill"})}),(0,H.jsx)(f.Z,{light:!0,mt:D.cd,short:!0}),de?ge:(0,H.jsx)(P.Z,{m:2,children:(0,H.jsx)(O.Z,{inverted:!0})})]})})},K=t(14805),W=t(50724),X=t(97618),Q=t(37899),q=t(17488),G=[{label:function(){return"Date and time window"},description:function(){return"Backfill between a date and time range."},uuid:d.VV}],$=t(88785),ee=t(79500);function ne(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function te(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ne(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ne(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var re=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,a=e.setErrors,c=e.variables,h=(0,o.useRouter)(),j=(0,B.qB)(),x=(0,u.useState)(),g=x[0],O=x[1],w=(0,u.useState)(),I=w[0],N=w[1],A=g||{},F=A.block_uuid,U=A.id,V=A.interval_type,z=A.interval_units,J=A.name,Y=l.uuid,ne=(0,u.useMemo)((function(){return(0,L.Qr)((null===n||void 0===n?void 0:n.variables)||{})?(0,M.Tt)(c)||{}:(0,L.Xc)(n.variables,(function(e){return(0,M.FS)(e)}))}),[null===n||void 0===n?void 0:n.variables,c]),re=(0,u.useState)(!0),ie=re[0],le=re[1],ae=(0,u.useState)(ne),ce=ae[0],ue=ae[1],se=(0,u.useState)(F?d._7:d.VV),oe=se[0],de=se[1],pe=(0,u.useState)(!1),fe=pe[0],ve=pe[1],be=(0,u.useState)(!1),he=be[0],me=be[1],je=(0,u.useState)(null),xe=je[0],ge=je[1],Ze=(0,u.useState)(null),Pe=Ze[0],Oe=Ze[1],ye=(0,u.useState)({hour:"00",minute:"00"}),ke=ye[0],_e=ye[1],we=(0,u.useState)({hour:"00",minute:"00"}),Se=we[0],Ie=we[1];(0,u.useEffect)((function(){if(n){O(n);var e=n.start_datetime;if(e){var t=(0,ee.a)(e,{localTimezone:j});Oe(null===t||void 0===t?void 0:t.date),Ie(t.time)}var r=n.end_datetime;if(r){var i=(0,ee.a)(r,{localTimezone:j});ge(null===i||void 0===i?void 0:i.date),_e(null===i||void 0===i?void 0:i.time)}}}),[j,n]),(0,u.useEffect)((function(){!I&&null!==g&&void 0!==g&&g.settings&&N(g.settings)}),[I,null===g||void 0===g?void 0:g.settings]);var De=(0,u.useMemo)((function(){var e=[[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Alphabet,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Backfill name"})]},"model_name_detail"),(0,H.jsx)(q.Z,{monospace:!0,onChange:function(e){e.preventDefault(),O((function(n){return te(te({},n),{},{name:e.target.value})}))},placeholder:"Name this backfill",value:J},"model_name_input_detail")]];return d.VV===oe&&e.push.apply(e,[[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.CalendarDate,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!fe&&(0,H.jsx)(q.Z,{monospace:!0,onClick:function(){return ve((function(e){return!e}))},onFocus:function(){return ve(!0)},placeholder:"YYYY-MM-DD HH:MM",value:Pe?(0,T.XM)(Pe,Se,{localTimezone:j}):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(W.Z,{disableEscape:!0,onClickOutside:function(){return ve(!1)},open:fe,style:{position:"relative"},children:(0,H.jsx)(K.Z,{localTime:j,selectedDate:Pe,selectedTime:Se,setSelectedDate:Oe,setSelectedTime:Ie,topPosition:!0})})})]},"start_time_input")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.CalendarDate,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"End date and time"})]},"end_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!he&&(0,H.jsx)(q.Z,{monospace:!0,onClick:function(){return me((function(e){return!e}))},onFocus:function(){return me(!0)},placeholder:"YYYY-MM-DD HH:MM",value:xe?(0,T.XM)(xe,ke,{localTimezone:j}):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(W.Z,{disableEscape:!0,onClickOutside:function(){return me(!1)},open:he,style:{position:"relative"},children:(0,H.jsx)(K.Z,{localTime:j,selectedDate:xe,selectedTime:ke,setSelectedDate:ge,setSelectedTime:_e,topPosition:!0})})})]},"end_time_input")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Schedule,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Interval type"})]},"interval_type"),(0,H.jsx)(Z.Z,{monospace:!0,onChange:function(e){e.preventDefault(),O((function(n){return te(te({},n),{},{interval_type:e.target.value})}))},placeholder:"Time spacing between each backfill",value:V,children:d.IB.map((function(e){return(0,H.jsx)("option",{value:e,children:(0,E.kC)(e)},e)}))},"interval_type_input")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Schedule,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Interval units"})]},"interval_units"),(0,H.jsx)(q.Z,{disabled:!V,monospace:!0,onChange:function(e){e.preventDefault(),O((function(n){return te(te({},n),{},{interval_units:e.target.value})}))},placeholder:V?"Number of ".concat(V).concat(V!==d.I7.CUSTOM?"s":""," between each backfill"):"Interval type is required",type:"number",value:z},"interval_unit_input")]]),(0,L.Qr)(ne)||e.push([(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Variables,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Runtime variables"})]},"overwrite_runtime_variables"),(0,H.jsx)(Q.Z,{borderless:!0,compact:!0,enableVariablesOverwrite:ie,runtimeVariables:ce,setEnableVariablesOverwrite:le,setRuntimeVariables:ue},"overwrite_runtime_variables_table")]),e.push([(0,H.jsx)(v.ZP,{alignItems:"center",children:(0,H.jsx)(k.ZP,{default:!0,children:"Max concurrent runs"})},"concurrency"),(0,H.jsx)(q.Z,{monospace:!0,onChange:function(e){e.preventDefault(),N((function(n){return te(te({},n),{},{pipeline_run_limit:e.target.value})}))},type:"number",value:null===I||void 0===I?void 0:I.pipeline_run_limit},"concurrency_input")]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(P.Z,{mb:2,px:D.cd,children:(0,H.jsx)(b.Z,{children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,short:!0}),(0,H.jsx)(y.Z,{columnFlex:[null,1],rows:e})]})}),[xe,Pe,j,ie,V,z,J,ce,ne,null===I||void 0===I?void 0:I.pipeline_run_limit,oe,fe,he,ke,Se]),Ce=(0,s.Db)(_.ZP.backfills.useUpdate(U),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){i(),h.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(Y,"/backfills/").concat(U))},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),Ee=(0,r.Z)(Ce,2),Te=Ee[0],Me=Ee[1].isLoading,Ne=(0,u.useCallback)((function(){var e=te(te({},(0,L.GL)(g,["name"])),{},{end_datetime:null,interval_type:null,interval_units:null,settings:I,start_datetime:null,variables:ie?(0,M.e7)(ce):{}});return d._7===oe||(e.interval_type=V,e.interval_units=z,e.end_datetime=xe&&null!==ke&&void 0!==ke&&ke.hour&&null!==ke&&void 0!==ke&&ke.minute?(0,T.XM)(xe,ke,{convertToUtc:j,includeSeconds:!0,localTimezone:j}):null,e.start_datetime=Pe&&null!==Se&&void 0!==Se&&Se.hour&&null!==Se&&void 0!==Se&&Se.minute?(0,T.XM)(Pe,Se,{convertToUtc:j,includeSeconds:!0,localTimezone:j}):null),Te({backfill:e})}),[xe,Pe,j,ie,V,z,g,ce,I,oe,ke,Se,Te]),Ae=(0,u.useMemo)((function(){return d._7===oe?!F:!(xe&&Pe&&V&&z)}),[F,xe,Pe,V,z,oe]);return(0,H.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(Y,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return null===g||void 0===g?void 0:g.name},linkProps:{as:"/pipelines/".concat(Y,"/backfills/").concat(U),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],errors:t,pageName:C.M.BACKFILLS,pipeline:l,setErrors:a,subheader:(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(p.ZP,{disabled:Ae,loading:Me,onClick:Ne,outline:!0,primary:!0,children:"Save changes"}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(p.ZP,{linkProps:{href:"/pipelines/[pipeline]/backfills/[...slug]",as:"/pipelines/".concat(Y,"/backfills/").concat(U)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===g||void 0===g?void 0:g.name)},uuid:"backfill/edit",children:[(0,H.jsxs)(P.Z,{p:D.cd,children:[(0,H.jsxs)(P.Z,{mb:2,children:[(0,H.jsx)(b.Z,{children:"Backfill type"}),(0,H.jsx)(k.ZP,{muted:!0,children:"How would you like this pipeline to be backfilled?"})]}),(0,H.jsx)(v.ZP,{children:G.map((function(e){var n=e.label,t=e.description,r=e.uuid,i=oe===r,l=oe&&!i;return(0,H.jsx)(p.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){de(r)},children:(0,H.jsx)($.U,{selected:i,children:(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(X.Z,{children:(0,H.jsx)("input",{checked:i,type:"radio"})}),(0,H.jsx)(P.Z,{mr:D.cd}),(0,H.jsxs)(X.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,H.jsx)(b.Z,{bold:!0,default:!i&&!l,level:5,muted:!i&&l,children:n()}),(0,H.jsx)(k.ZP,{default:!i&&!l,leftAligned:!0,muted:l,children:t()})]})]})})},r)}))})]}),(0,H.jsx)(P.Z,{mt:5,children:De})]})},ie=t(93808),le=t(98464);function ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ce(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ue(e){var n=e.backfillId,t=e.pipelineUUID,r=e.subpath,i=(0,u.useState)(null),l=i[0],a=i[1],c=_.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,s=(0,u.useMemo)((function(){return null===c||void 0===c?void 0:c.variables}),[c]),o=_.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=(0,u.useMemo)((function(){return ce(ce({},null===o||void 0===o?void 0:o.pipeline),{},{uuid:t})}),[o,t]),p=(0,V.iV)(),f={_limit:40,_offset:40*(null!==p&&void 0!==p&&p.page?p.page:0),include_preview_runs:!0},v=_.ZP.backfills.detail(n,ce({},f),{revalidateOnFocus:!0}),b=v.data,h=v.mutate,m=(0,u.useMemo)((function(){return null===b||void 0===b?void 0:b.backfill}),[b]),j=(0,le.Z)(p);return(0,u.useEffect)((function(){(null===j||void 0===j?void 0:j.page)!==(null===p||void 0===p?void 0:p.page)&&h()}),[h,p,j]),"edit"===r?(0,H.jsx)(re,{backfill:m,errors:l,fetchBackfill:h,pipeline:d,setErrors:a,variables:s}):(0,H.jsx)(Y,{backfill:m,errors:l,fetchBackfill:h,pipeline:d,setErrors:a,variables:s})}ue.getInitialProps=function(){var e=(0,i.Z)(c().mark((function e(n){var t,i,l,a,u,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,i=t.pipeline,l=t.slug,!Array.isArray(l)){e.next=4;break}return a=(0,r.Z)(l,2),u=a[0],s=a[1],e.abrupt("return",{backfillId:u,pipelineUUID:i,subpath:s});case 4:return e.abrupt("return",{pipelineUUID:i});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var se=(0,ie.Z)(ue)},53664:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills/[...slug]",function(){return t(51532)}])}},function(e){e.O(0,[9161,7674,1557,3782,7966,9774,2888,179],(function(){return n=53664,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8450],{16488:function(n,e,t){"use strict";t.d(e,{IJ:function(){return b},M8:function(){return E},Uc:function(){return _},XM:function(){return y},_U:function(){return v},eI:function(){return j},gU:function(){return w},lO:function(){return N},ri:function(){return O},tL:function(){return k},vJ:function(){return g},xH:function(){return h}});var r,i=t(82394),u=t(92083),o=t.n(u),c=t(3917),l=t(4383),a=t(30229),s=t(42122),f=t(86735);function d(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function p(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?d(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var v=function(n){return!!n&&!Object.values(a.U5).includes(n)};function b(n){return null===n||void 0===n?void 0:n.reduce((function(n,e){var t=e.block_uuid,r=e.completed_at,u=e.started_at,c=e.status,l=null;u&&r&&(l=o()(r).valueOf()-o()(u).valueOf());return p(p({},n),{},(0,i.Z)({},t,{runtime:l,status:c}))}),{})}var m,O=function(n){var e=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return n?e.slice(0,1):e};function h(n){var e=(0,s.gR)(n,[a.gm.INTERVAL,a.gm.TYPE]),t=n[a.gm.INTERVAL];t&&(e["schedule_interval[]"]=encodeURIComponent(t));var r=n[a.gm.TYPE];return r&&(e["schedule_type[]"]=r),e}function j(n){return n?new Date(o()(n).valueOf()):null}function _(n,e){return e?(0,c.XG)(n,e):function(n){if("string"!==typeof n)return n;var e=n.split("+")[0];return o()(j(e)).format(c.Nx)}(n)}!function(n){n.DAY="day",n.HOUR="hour",n.MINUTE="minute",n.SECOND="second"}(m||(m={}));var k=(r={},(0,i.Z)(r,m.DAY,86400),(0,i.Z)(r,m.HOUR,3600),(0,i.Z)(r,m.MINUTE,60),(0,i.Z)(r,m.SECOND,1),r);function w(n){var e=m.SECOND,t=n;return n%86400===0?(t/=86400,e=m.DAY):n%3600===0?(t/=3600,e=m.HOUR):n%60===0&&(t/=60,e=m.MINUTE),{time:t,unit:e}}function g(n,e){return n*k[e]}function y(n,e,t){var r,i=o()(n);return i.set("hour",+(null===e||void 0===e?void 0:e.hour)||0),i.set("minute",+(null===e||void 0===e?void 0:e.minute)||0),i.set("second",0),r=i.format(c.TD),null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(r=i.format(c.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,c.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),r}function E(n){var e,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",i=!0;return i&&(t?r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===n||void 0===n?void 0:n.id,"/api_trigger"):(r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===n||void 0===n?void 0:n.id,"/pipeline_runs"),null!==n&&void 0!==n&&n.token&&(r="".concat(r,"/").concat(n.token)))),i&&(e=window.location.port)&&(r=r.replace(e,l.QT)),r}function P(n,e,t){return n.match(/[*,-/]/)?{additionalOffset:0,cronValue:n}:function(n,e,t){var r=t.indexOf(n),i=0;if(e<0)for(var u=0;u>e;u--)0===r?(r=t.length-1,i-=1):r-=1;else if(e>0)for(var o=0;o<e;o++)r===t.length-1?(r=0,i+=1):r+=1;var c="number"===typeof t[r]?t[r]:n;return{additionalOffset:i,cronValue:String(c)}}(+n,e,t)}var Z=(0,f.m5)(60),x=(0,f.m5)(24),T=(0,c.Cs)();function N(n,e){if(!n)return n;var t=o()().local().format("Z"),r=t.split(":"),i="-"===t[0],u=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),c=Number(r[1]);(i&&!e||!i&&e)&&(u=-u,c=-c);var l=n.split(" "),a=l[0],s=l[1],f=l[2],d=P(a,c,Z),p=P(s,u+d.additionalOffset,x);if(l[0]=d.cronValue,l[1]=p.cronValue,0!==(null===p||void 0===p?void 0:p.additionalOffset)){var v=P(f,p.additionalOffset,T);l[2]=v.cronValue}return l.join(" ")}},83641:function(n,e,t){"use strict";t.d(e,{I7:function(){return r},IB:function(){return l},VV:function(){return u},_7:function(){return o},rn:function(){return c}});var r,i=t(41143),u="datetime",o="code",c=i.V;!function(n){n.SECOND="second",n.MINUTE="minute",n.HOUR="hour",n.DAY="day",n.WEEK="week",n.MONTH="month",n.YEAR="year",n.CUSTOM="custom"}(r||(r={}));var l=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR,r.CUSTOM]},11650:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return Y}});var r=t(77837),i=t(75582),u=t(38860),o=t.n(u),c=t(82684),l=t(69864),a=t(34376),s=t(82394),f=t(12691),d=t.n(f),p=t(83641),v=t(71180),b=t(48670),m=t(75499),O=t(30160),h=t(72473),j=t(44265),_=t(81655),k=t(70515),w=t(16488),g=t(50178),y=t(70320),E=t(3917),P=t(28598);function Z(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function x(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?Z(Object(t),!0).forEach((function(e){(0,s.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var T=function(n){var e=n.models,t=n.onClickRow,r=n.pipeline,i=n.selectedRow,u=(0,g.Ct)(),o=(0,y.qB)(),l=null===r||void 0===r?void 0:r.uuid,a=o?_.O$:{},s=[{uuid:"Status"},{uuid:"Name"},{uuid:"Type"},{uuid:"Runs"},x(x({},a),{},{uuid:"Backfill"}),x(x({},a),{},{uuid:"Started at"}),x(x({},a),{},{uuid:"Completed at"})];return u||s.push({label:function(){return""},uuid:"edit"}),(0,P.jsx)(m.Z,{columnFlex:[null,1,null,null,null,1,1,null],columns:s,isSelectedRow:function(n){return e[n].id===(null===i||void 0===i?void 0:i.id)},onClickRow:function(n){return t(e[n])},rows:e.map((function(n,e){var t=n.block_uuid,r=n.completed_at,i=n.end_datetime,a=n.id,s=n.name,f=n.start_datetime,m=n.started_at,g=n.status,y=n.total_run_count,Z=[(0,c.createElement)(O.ZP,x(x({},(0,_.NC)(g)),{},{key:"status"}),g||"inactive"),(0,P.jsx)(d(),{as:"/pipelines/".concat(l,"/backfills/").concat(a),href:"/pipelines/[pipeline]/backfills/[...slug]",passHref:!0,children:(0,P.jsx)(b.Z,{bold:!0,sameColorAsText:!0,children:s})},"name"),(0,P.jsx)(O.ZP,{default:!0,monospace:!0,children:t?p._7:p.VV},"type"),(0,P.jsx)(O.ZP,{default:!0,monospace:!0,children:y||0},"runs"),(0,P.jsxs)(O.ZP,{default:!0,monospace:!0,small:!0,children:[f&&i&&(0,P.jsxs)(P.Fragment,{children:[(0,w.Uc)(f,o),"\xa0-\xa0",(0,w.Uc)(i,o)]}),!(f&&i)&&(0,P.jsx)(P.Fragment,{children:"\u2014"})]},"backfill"),(0,P.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,title:m?(0,E._6)(m):null,children:m?(0,w.Uc)(m,o):(0,P.jsx)(P.Fragment,{children:"\u2014"})},"started_at"),(0,P.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,title:r?(0,E._6)(r):null,children:r?(0,w.Uc)(r,o):(0,P.jsx)(P.Fragment,{children:"\u2014"})},"completed_at")];return u||Z.push((0,P.jsx)(v.ZP,{default:!0,disabled:g===j.VO.COMPLETED,iconOnly:!0,linkProps:{as:"/pipelines/".concat(l,"/backfills/").concat(a,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noBackground:!0,title:"Edit",children:(0,P.jsx)(h.Edit,{default:!0,size:2*k.iI})},"".concat(e,"_edit_button"))),Z})),uuid:"pipeline-runs"})},N=t(68562),C=t(75457),D=t(93808),S=t(38276),U=t(35686),I=t(28795),R=t(15610),A=t(72619),M=t(69419),V=t(81728);function H(n){var e=n.pipeline,t=(0,a.useRouter)(),r=e.uuid,u=U.ZP.backfills.list({_limit:20,_offset:0,include_run_count:!0,pipeline_uuid:r},{refreshInterval:6e4}).data,o=(0,c.useMemo)((function(){return(null===u||void 0===u?void 0:u.backfills)||[]}),[u]),s=(0,M.iV)(),f=(0,c.useState)(null),d=f[0],p=f[1],v=(0,c.useState)(null),b=v[0],m=v[1];(0,c.useEffect)((function(){null!==s&&void 0!==s&&s.backfill_id?p(null===o||void 0===o?void 0:o.find((function(n){return n.id===Number(s.backfill_id)}))):d&&p(null)}),[o,s,d]);var j=(0,c.useMemo)((function(){var n="/pipelines/".concat(r,"/backfills"),e=[{label:function(){return"Backfills"},linkProps:d?{as:n,href:"/pipelines/[pipeline]/backfills"}:null}];return d&&e.push({label:function(){return d.name}}),e}),[r,d]),_=(0,l.Db)(U.ZP.backfills.pipelines.useCreate(r),{onSuccess:function(n){return(0,A.wD)(n,{callback:function(n){var e=n.backfill.id;t.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(r,"/backfills/").concat(e,"/edit"))},onErrorCallback:function(n,e){return m({errors:e,response:n})}})}}),w=(0,i.Z)(_,2),g=w[0],y=w[1].isLoading;return(0,P.jsxs)(C.Z,{breadcrumbs:j,errors:b,pageName:I.M.BACKFILLS,pipeline:e,setErrors:m,title:function(n){var e=n.name;return"".concat(e," backfills")},uuid:"".concat(I.M.BACKFILLS,"_").concat(r),children:[(0,P.jsx)(S.Z,{p:k.cd,children:(0,P.jsx)(N.ZP,{beforeElement:(0,P.jsx)(h.Add,{size:2.5*k.iI}),blackBorder:!0,inline:!0,loading:y,noHoverUnderline:!0,onClick:function(){return g({backfill:{name:(0,V.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/Backfills/add_new_backfill",children:"Create new backfill"})}),o&&0===o.length&&(0,P.jsx)(S.Z,{p:k.cd,children:(0,P.jsx)(O.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No backfills available"})}),(null===o||void 0===o?void 0:o.length)>=1&&(0,P.jsx)(T,{models:o,onClickRow:function(n){var e=n.id;return(0,R.u)({backfill_id:e})},pipeline:e,selectedRow:d})]})}H.getInitialProps=function(){var n=(0,r.Z)(o().mark((function n(e){var t;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var Y=(0,D.Z)(H)},37459:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills",function(){return t(11650)}])},80022:function(n,e,t){"use strict";function r(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}t.d(e,{Z:function(){return r}})},15544:function(n,e,t){"use strict";function r(n){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},r(n)}t.d(e,{Z:function(){return r}})},13692:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(61049);function i(n,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&(0,r.Z)(n,e)}},93189:function(n,e,t){"use strict";t.d(e,{Z:function(){return u}});var r=t(12539),i=t(80022);function u(n,e){if(e&&("object"===r(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(n)}}},function(n){n.O(0,[1557,3782,9774,2888,179],(function(){return e=37459,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4794],{74395:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return o}});var r=t(25976),i=t(46684),o=34*t(70515).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},88785:function(e,n,t){"use strict";t.d(n,{J:function(){return u},U:function(){return c}});var r=t(25976),i=t(44897),o=t(42631),l=t(70515),c=r.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;"," ",""],o.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),u=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],o.n_,l.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*l.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*l.iI,"px;\n ")}))},14805:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(55485),l=t(44085),c=t(38276),u=t(30160),s=t(88785),a=t(70515),d=t(86735),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.localTime,t=e.selectedDate,r=e.selectedTime,f=e.setSelectedDate,v=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(s.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:f,value:t}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.ZP,{alignItems:"center",children:[(0,p.jsxs)(u.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),v((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===r||void 0===r?void 0:r.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(u.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),v((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===r||void 0===r?void 0:r.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},59860:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return sn}});var r,i=t(77837),o=t(82394),l=t(38860),c=t.n(l),u=t(25976),s=t(4804),a=t(82684),d=t(44425),p=t(15338),f=t(71180),h=t(70652),v=t(39867),m=t(55485),g=t(38276),j=t(30160),b=t(74395),x=t(70515),y=u.default.div.withConfig({displayName:"indexstyle__FilterRowStyle",componentId:"sc-kvapsi-0"})(["padding-bottom:","px;padding-top:","px;"],x.iI/2,x.iI/2);!function(e){e.CRITICAL="CRITICAL",e.DEBUG="DEBUG",e.ERROR="ERROR",e.EXCEPTION="EXCEPTION",e.INFO="INFO",e.LOG="LOG",e.WARNING="WARNING"}(r||(r={}));var Z,_=[r.CRITICAL,r.DEBUG,r.ERROR,r.EXCEPTION,r.INFO,r.LOG,r.WARNING];!function(e){e.LAST_HOUR="Last hour",e.LAST_DAY="Last day",e.LAST_WEEK="Last week",e.LAST_30_DAYS="Last 30 days",e.CUSTOM_RANGE="Custom range"}(Z||(Z={}));var O=t(42631),P=t(79633);var I,S=(0,u.css)(["",""],(function(e){return"\n background-color: ".concat(function(e){var n=e.critical,t=e.debug,r=e.error,i=e.exception,o=e.info,l=e.log,c=e.warning;return n?P.Zl:t?P.EG:r?P.hl:i?P.hM:o?P.gN:l?P.Wd:c?P.$R:"transparent"}(e),";\n ")})),k=u.default.div.withConfig({displayName:"indexstyle__LogLevelIndicatorStyle",componentId:"sc-1e2zh7m-0"})([""," border-radius:","px;height:12px;width:5px;"],S,O.n_),w=t(81728),C=t(55283),L=t(15610),E=t(28598);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.BLOCK_RUN_ID="block_run_id[]",e.BLOCK_TYPE="block_type[]",e.BLOCK_UUID="block_uuid[]",e.LEVEL="level[]",e.PIPELINE_RUN_ID="pipeline_run_id[]",e.PIPELINE_SCHEDULE_ID="pipeline_schedule_id[]"}(I||(I={}));var A=function(e){var n=e.blocks,t=e.query,r=(0,a.useContext)(u.ThemeContext),i=(0,a.useMemo)((function(){return t[I.LEVEL]}),[t]),l=(0,a.useMemo)((function(){return t[I.BLOCK_TYPE]}),[t]),c=(0,a.useMemo)((function(){return t[I.BLOCK_UUID]}),[t]),s=(0,a.useMemo)((function(){return t[I.PIPELINE_SCHEDULE_ID]}),[t]),p=(0,a.useMemo)((function(){return t[I.PIPELINE_RUN_ID]}),[t]),Z=(0,a.useMemo)((function(){return t[I.BLOCK_RUN_ID]}),[t]);return(0,E.jsx)(b.M,{children:(0,E.jsxs)(g.Z,{p:x.cd,children:[(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Log level"})}),_.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{level:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(i)&&(null===i||void 0===i?void 0:i.includes(String(e)))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(k,T({},(0,o.Z)({},e.toLowerCase(),!0))),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,children:(0,w.kC)(e.toLowerCase())})]})})},e)}))]}),(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Block type"})}),[d.tf.DATA_LOADER,d.tf.TRANSFORMER,d.tf.DATA_EXPORTER].map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{block_type:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(l)&&(null===l||void 0===l?void 0:l.includes(String(e)))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(v.Z,{color:(0,C.qn)(e,{theme:r}).accent,size:1.5*x.iI,square:!0}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,muted:!0,monospace:!0,children:e})]})})},e)}))]}),(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Block"})}),n.filter((function(e){var n=e.type;return d.tf.SCRATCHPAD!==n})).map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{block_uuid:e.uuid},{isList:!0,resetLimitParams:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(c)&&(null===c||void 0===c?void 0:c.includes(String(e.uuid)))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(v.Z,{color:(0,C.qn)(e.type,{blockColor:e.color,theme:r}).accent,size:1.5*x.iI,square:!0}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,muted:!0,children:e.uuid})]})})},e.uuid)}))]}),(null===s||void 0===s?void 0:s.length)&&(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Trigger"})}),s.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{pipeline_schedule_id:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(s)&&(null===s||void 0===s?void 0:s.includes(e))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-schedule-".concat(e))}))]}),(null===p||void 0===p?void 0:p.length)&&(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline run"})}),p.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{pipeline_run_id:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(p)&&(null===p||void 0===p?void 0:p.includes(e))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-run-".concat(e))}))]}),(null===Z||void 0===Z?void 0:Z.length)&&(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Block run"})}),Z.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{block_run_id:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(Z)&&(null===Z||void 0===Z?void 0:Z.includes(e))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"block-run-".concat(e))}))]})]})})},R=t(97618),N=t(68562),B=t(75582),M=t(90299),U=t(48670),W=t(75499),J=u.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1r43sbu-0"})([""," height:","px;width:100%;"],S,.5*x.iI),Y=u.default.div.withConfig({displayName:"indexstyle__BadgeStyle",componentId:"sc-1r43sbu-1"})([""," border-radius:","px;display:inline-block;padding:","px ","px;"],S,O.BG,.25*x.iI,.5*x.iI),F=t(72473),H=t(92083),G=t.n(H);function q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function z(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,o.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 K=/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/,$=/([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}) (.+)/;function V(e){var n=e.content.trim().split($),t=[],r=[];return n.forEach((function(e){var n=e.trim();K.test(e)?(r.length>=1&&t.push(r.join(" ").trim()),r=[e]):r.filter((function(e){return e})).length<=1&&n&&r.push(n)})),t.push(r.join(" ").trim()),t.map((function(n){return function(e){var n=e.content.trim().match($),t=null===n||void 0===n?void 0:n[1],r=null===n||void 0===n?void 0:n[2],i={};return r&&(0,w.Pb)(r)&&(i=JSON.parse(r)),z(z({},e),{},{createdAt:t,data:i})}(z(z({},e),{},{content:n}))}))}function X(e,n){return e?null!==n&&void 0!==n&&n.localTimezone?G().unix(e).local().format():G().unix(e).utc().format("YYYY-MM-DD HH:mm:ss.SSS"):""}var Q=t(86735);function ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var te=["error","error_stack","error_stacktrace"],re={uuid:"Details"},ie={uuid:"Errors"};var oe=function(e){var n=e.log,t=e.onClose,r=e.selectedTab,i=e.setSelectedTab,l=(0,a.useState)(!1),c=l[0],u=l[1],s=n.data,d=n.name,h=n.path,v=s||{},b=v.error,y=v.error_stack,Z=v.error_stacktrace,_=v.level,O=v.timestamp,P=(0,o.Z)({},_.toLowerCase(),!0),I=(0,a.useMemo)((function(){var e=[["file name",d],["file path",h]];return Object.entries(s).forEach((function(n){var t=(0,B.Z)(n,2),r=t[0],i=t[1];te.includes(r)||e.push([r,i])})),Z&&e.push(["error",Z]),(0,Q.YC)(e,(function(e){var n=(0,B.Z)(e,2),t=n[0];n[1];return t}))}),[s,Z,d,h]),S=(0,a.useMemo)((function(){var e=[re];return b&&e.push(ie),(0,E.jsx)(M.Z,{onClickTab:i,selectedTabUUID:null===r||void 0===r?void 0:r.uuid,tabs:e})}),[b,r,i]);return(0,E.jsxs)("div",{children:[(0,E.jsx)(J,ne({},P)),(0,E.jsx)(g.Z,{p:x.cd,children:(0,E.jsxs)(m.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,E.jsxs)(R.Z,{alignItems:"center",children:[(0,E.jsx)(Y,ne(ne({},P),{},{children:(0,E.jsx)(j.ZP,{bold:!0,inverted:!0,monospace:!0,small:!0,children:_})})),(0,E.jsx)(g.Z,{mr:x.cd}),(0,E.jsx)(j.ZP,{monospace:!0,children:X(O)})]}),(0,E.jsx)(f.ZP,{iconOnly:!0,noBackground:!0,onClick:function(){return t()},children:(0,E.jsx)(F.Close,{size:1.5*x.iI})})]})}),(0,E.jsx)(p.Z,{medium:!0}),(0,E.jsx)(g.Z,{py:x.cd,children:S}),re.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,E.jsx)(W.Z,{columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:null===I||void 0===I?void 0:I.map((function(e,n){var t=(0,B.Z)(e,2),r=t[0],i=t[1],o="message"===r,l="tags"===r,s=i,a=i;if(l?a=s=(0,w.Pb)(i)?JSON.parse(JSON.stringify(i,null,2)):JSON.stringify(i,null,2):o&&c&&(0,w.Pb)(i)&&(a=JSON.stringify(JSON.parse(i),null,2),s=(0,E.jsx)("pre",{children:a})),"object"===typeof s)try{s=JSON.stringify(s,null,2),s=(0,E.jsx)("pre",{children:s})}catch(d){}return"object"===typeof a&&(a=JSON.stringify(a)),[(0,E.jsx)(j.ZP,{monospace:!0,muted:!0,children:r},"".concat(r,"_").concat(n,"_key")),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(j.ZP,{monospace:!0,textOverflow:!0,title:a,whiteSpaceNormal:o&&c||l,wordBreak:o&&c||l,children:[!l&&s,l&&(0,E.jsx)("pre",{children:s})]},"".concat(r,"_").concat(n,"_val")),o&&(0,E.jsx)(U.Z,{muted:!0,onClick:function(){return u((function(e){return!e}))},children:c?"Click to hide log":"Click to show full log message"})]})]})),uuid:"LogDetail"}),ie.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,E.jsxs)(g.Z,{mb:5,px:x.cd,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,children:"Error"})}),null===b||void 0===b?void 0:b.map((function(e){return e.split("\n").map((function(e){return e.split("\\n").map((function(e){return(0,E.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))})),y&&(0,E.jsxs)(g.Z,{mt:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,children:"Stack trace"})}),null===y||void 0===y?void 0:y.map((function(e){return null===e||void 0===e?void 0:e.map((function(e){return(0,E.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))]})]})]})},le=t(21831),ce=t(89565),ue=t.n(ce),se=t(12691),ae=t.n(se),de=t(80017),pe=t(57653),fe=t(98464),he=t(46684),ve=t(44897),me=t(47041),ge=u.default.div.withConfig({displayName:"indexstyle__TableContainer",componentId:"sc-16j4vp6-0"})([".table_row > div{margin:","px ","px;}div{","}"],.5*x.iI,x.iI,me.w5),je=u.default.div.withConfig({displayName:"indexstyle__TableHeadStyle",componentId:"sc-16j4vp6-1"})(["display:flex;align-items:center;overflow:hidden;",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme||ve.Z).borders.medium2,";\n ")})),be=u.default.div.withConfig({displayName:"indexstyle__TableRowStyle",componentId:"sc-16j4vp6-2"})(["display:flex;align-items:center;"," "," ",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme||ve.Z).borders.light,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return!e.selected&&"\n &:hover {\n background: ".concat((e.theme.interactive||ve.Z.interactive).rowHoverBackground,";\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||ve.Z.interactive).activeBorder,";\n ")})),xe=t(93859),ye=t(53808),Ze=t(69419),_e=function(e){var n=(0,Ze.iV)(),t=((null===n||void 0===n?void 0:n[I.PIPELINE_SCHEDULE_ID])||[]).join(",");return"".concat(e,"/logs/triggers/").concat(t)},Oe=t(70320),Pe=t(19183);function Ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ie(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke="log_uuid";var we,Ce,Le,Ee=function(e){var n=e.autoScrollLogs,t=e.blocksByUUID,r=e.tableInnerRef,i=e.logs,l=e.onRowClick,c=e.pipeline,u=e.query,s=e.saveScrollPosition,d=e.setSelectedLog,p=e.themeContext,f=(0,Oe.qB)(),h=(0,Pe.i)().height,b=(0,a.useRef)(null),y=(0,a.useMemo)((function(){return pe.qL.INTEGRATION===(null===c||void 0===c?void 0:c.type)}),[c.type]),Z=(0,fe.Z)(i);(0,a.useEffect)((function(){var e;n&&(Z||[]).length!==(i||[]).length&&(null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView(!1))}),[n,i,Z,r]);var _=(0,a.useMemo)((function(){return _e(null===c||void 0===c?void 0:c.uuid)}),[null===c||void 0===c?void 0:c.uuid]);(0,a.useEffect)((function(){var e;s&&(null===b||void 0===b||null===(e=b.current)||void 0===e||e.scrollTo((0,ye.U2)(_,0)))}),[s,_]);var O=Object.keys(t||{});if(y){var P,I,S=((null===c||void 0===c||null===(P=c.data_integration)||void 0===P||null===(I=P.catalog)||void 0===I?void 0:I.streams)||[]).map((function(e){return e.tap_stream_id})),w=new Set;O.forEach((function(e){S.forEach((function(n){return w.add("".concat(e,":").concat(n,":0"))}))})),O=Array.from(w)}var D=(0,a.useMemo)((function(){var e=null===i||void 0===i?void 0:i.map((function(e){var n;return null===(n=e.name.split(".log")[0])||void 0===n?void 0:n.length})),n=Math.max.apply(Math,(0,le.Z)(e));return Math.min(n*xe.r+12+8,50*x.iI)}),[i]),T=[{uuid:"_",width:28},{uuid:"Date",width:f?202:214},{uuid:"Block",width:D+16},{uuid:"Message"},{uuid:"_"}],A=(0,a.useCallback)((function(e){var n,t=e.data,r=e.index,i=e.style,c=t.blocksByUUID,s=t.logs,a=t.themeContext,p=s[r],h=p.content,b=p.data,Z=p.name,_=b||{},O=_.block_uuid,P=_.level,I=_.message,S=_.pipeline_uuid,w=_.timestamp,T=_.uuid,A=null==I?h:I;Array.isArray(A)?A=A.join(" "):"object"===typeof A&&(A=JSON.stringify(A));var N,B,M=O||Z.split(".log")[0],W=M,J=W.split(":");y&&(W=J[0],N=J[1],B=J[2]);var Y=c[W];if(Y||(Y=c[J[0]]),Y){var H=(0,C.qn)(Y.type,{blockColor:Y.color,theme:a}).accent;n=(0,E.jsx)(m.ZP,{alignItems:"center",children:(0,E.jsx)(ae(),{as:"/pipelines/".concat(S,"/edit?block_uuid=").concat(W),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,E.jsxs)(U.Z,{block:!0,fullWidth:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,E.jsx)(v.Z,{color:H,size:1.5*x.iI,square:!0}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsxs)(j.ZP,{disableWordBreak:!0,monospace:!0,noWrapping:!0,title:O,width:D-16,children:[M,N&&":",N&&(0,E.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:N}),B>=0&&":",B>=0&&(0,E.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:B})]})]})})})}return(0,E.jsxs)(be,{className:"table_row",onClick:function(){var e,n,t=s[r],i=null===(e=t.data)||void 0===e?void 0:e.uuid;u.log_uuid===i&&(i=null),null!==(n=t.data)&&void 0!==n&&n.error?null===l||void 0===l||l(ie):null===l||void 0===l||l(re),(0,L.u)((0,o.Z)({},ke,i)),d(i?t:null)},selected:(null===u||void 0===u?void 0:u.log_uuid)&&(null===u||void 0===u?void 0:u.log_uuid)===T,style:Se({},i),children:[(0,E.jsx)(R.Z,{alignItems:"center",justifyContent:"center",children:(0,E.jsx)(k,Se({},(0,o.Z)({},null===P||void 0===P?void 0:P.toLowerCase(),!0)))},"log_type"),(0,E.jsx)(R.Z,{children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,noWrapping:!0,small:f,children:X(w,{localTimezone:f})},"log_timestamp")}),(0,E.jsx)(R.Z,{style:{minWidth:D,width:D},children:n}),(0,E.jsx)(R.Z,{style:{overflow:"auto"},children:(0,E.jsx)(j.ZP,{monospace:!0,textOverflow:!0,title:A,children:(0,E.jsx)(ue(),{children:A})},"log_message")}),(0,E.jsx)(R.Z,{flex:"1",justifyContent:"flex-end",children:(0,E.jsx)(F.ChevronRight,{default:!0,size:2*x.iI})},"chevron_right_icon")]})}),[D,f,y,l,u,d]);return(0,E.jsxs)(ge,{children:[(0,E.jsx)(je,{children:T.map((function(e,n){return(0,E.jsx)(R.Z,{alignItems:"center",style:{height:4*x.iI,minWidth:e.width||null,width:e.width||null},children:"_"!==e.uuid&&(0,E.jsx)(j.ZP,{bold:!0,leftAligned:!0,monospace:!0,muted:!0,children:e.uuid})},"".concat(e,"_").concat(n))}))}),(0,E.jsx)(de.t7,{height:h-he.Mz-86-34-58,innerRef:r,itemCount:i.length,itemData:{blocksByUUID:t,logs:i,pipeline:c,themeContext:p},itemSize:3.75*x.iI,onScroll:function(e){var n=e.scrollOffset,t=e.scrollDirection;!s||"forward"===t&&0===n||(0,ye.t8)(_,n)},ref:b,width:"100%",children:A})]})},De=t(34376),Te=t(14805),Ae=t(50724),Re=t(44085),Ne=t(17488),Be=20,Me=[Z.LAST_HOUR,Z.LAST_DAY,Z.LAST_WEEK,Z.LAST_30_DAYS],Ue=(we={},(0,o.Z)(we,Z.LAST_HOUR,3600),(0,o.Z)(we,Z.LAST_DAY,86400),(0,o.Z)(we,Z.LAST_WEEK,604800),(0,o.Z)(we,Z.LAST_30_DAYS,2592e3),we),We=t(11498),Je=t(48277),Ye=t(3917),Fe=t(42122);function He(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ge(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,o.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}!function(e){e.START="start_timestamp",e.END="end_timestamp"}(Le||(Le={}));var qe=(Ce={},(0,o.Z)(Ce,We.$D.LIMIT,Be),(0,o.Z)(Ce,We.$D.OFFSET,0),Ce),ze={blackBorder:!0,inline:!0,paddingBottom:.75*x.iI,paddingTop:.75*x.iI};var Ke=function(e){var n=e.allPastLogsLoaded,t=e.loadNewerLogInterval,r=e.loadPastLogInterval,i=e.saveScrollPosition,l=e.selectedRange,c=e.setSelectedRange,u=(0,a.useState)(null),s=u[0],d=u[1],p=(0,a.useState)(null),h=p[0],v=p[1],b=(0,a.useState)({hour:"00",minute:"00"}),y=b[0],_=b[1],O=(0,a.useState)(new Date),P=O[0],I=O[1],S=(0,a.useState)({hour:(0,Ye.lJ)(String((new Date).getUTCHours())),minute:(0,Ye.lJ)(String((new Date).getUTCMinutes()))}),k=S[0],w=S[1],C=(0,De.useRouter)().query.pipeline,D=(0,Ze.iV)(),T=(0,fe.Z)(D);(0,a.useEffect)((function(){if(!(0,Fe.Xy)(D,T)){var e=D.start_timestamp,n=D.end_timestamp;if(e){var t=(0,Ye.Pc)(e),r=t.date,i=t.hour,o=t.minute;v(r),_({hour:(0,Ye.lJ)(i),minute:(0,Ye.lJ)(o)});var l=Math.ceil(Date.now()/1e3)-e;Math.abs(l-Ue[Z.LAST_DAY])<=60&&c(Z.LAST_DAY)}if(n){var u=(0,Ye.Pc)(n),s=u.date,a=u.hour,d=u.minute;I(s),w({hour:(0,Ye.lJ)(a),minute:(0,Ye.lJ)(d)})}}}),[D,T]);var A=(0,a.useCallback)((function(){if(i){var e=_e(C);(0,ye.t8)(e,0)}}),[C,i]);return(0,E.jsx)(g.Z,{py:1,children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(N.ZP,Ge(Ge({},ze),{},{disabled:n,onClick:function(){A(),r()},uuid:"logs/load_older_logs",children:n?"All past logs within range loaded":"Load older logs"})),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(N.ZP,Ge(Ge({},ze),{},{disabled:(null===D||void 0===D?void 0:D._offset)<=0,onClick:function(){A(),t()},uuid:"logs/load_newer_logs",children:"Load newer logs"})),(0,E.jsx)(g.Z,{mr:2}),(0,E.jsx)(Re.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault();var n=e.target.value;if(A(),c(n),Me.includes(n)){var t,r=(0,Je.JI)(Ue[n]);(0,L.u)(Ge((t={},(0,o.Z)(t,Le.START,r),(0,o.Z)(t,Le.END,null),t),qe))}},paddingRight:4*x.iI,placeholder:"Select time range",value:l,children:Object.values(Z).map((function(e){return(0,E.jsx)("option",{value:e,children:e},e)}))}),(0,E.jsx)(g.Z,{mr:1}),l===Z.CUSTOM_RANGE&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Ne.Z,{compact:!0,defaultColor:!0,onClick:function(){return d(0)},paddingRight:0,placeholder:"Start",value:h?(0,Ye.AY)(h,null===y||void 0===y?void 0:y.hour,null===y||void 0===y?void 0:y.minute):""}),(0,E.jsx)(Ae.Z,{onClickOutside:function(){return d(null)},open:0===s,style:{position:"relative"},children:(0,E.jsx)(Te.Z,{selectedDate:h,selectedTime:y,setSelectedDate:v,setSelectedTime:_})}),(0,E.jsx)(g.Z,{px:1,children:(0,E.jsx)(j.ZP,{children:"to"})}),(0,E.jsx)(Ne.Z,{compact:!0,defaultColor:!0,onClick:function(){return d(1)},paddingRight:0,placeholder:"End",value:P?(0,Ye.AY)(P,null===k||void 0===k?void 0:k.hour,null===k||void 0===k?void 0:k.minute):""}),(0,E.jsx)(Ae.Z,{onClickOutside:function(){return d(null)},open:1===s,style:{position:"relative"},children:(0,E.jsx)(Te.Z,{selectedDate:P,selectedTime:k,setSelectedDate:I,setSelectedTime:w})}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(f.ZP,{borderRadius:"".concat(x.iI/2,"px"),onClick:function(){var e;A();var n=(0,Ye.BP)(h,y.hour,y.minute),t=(0,Ye.BP)(P,k.hour,k.minute);(0,L.u)(Ge((e={},(0,o.Z)(e,Le.START,(0,Ye.A5)(n)),(0,o.Z)(e,Le.END,(0,Ye.A5)(t)),e),qe))},padding:"".concat(x.iI/2,"px"),primary:!0,children:"Search"})]})]})})},$e=t(75457),Ve=t(93808),Xe=t(4190),Qe=t(69650),en=t(35686),nn=t(78419),tn=t(28795);function rn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function on(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rn(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ln="pipeline_run_id[]",cn="block_run_id[]";function un(e){var n=e.pipeline,t=(0,a.useContext)(u.ThemeContext),r=(0,a.useRef)(null),i=n.uuid,l=(0,a.useState)(null),c=l[0],f=l[1],h=(0,a.useState)(null),v=h[0],b=h[1],y=(0,a.useState)(null),_=y[0],O=y[1],P=(0,a.useState)(null),S=P[0],k=P[1],C=(0,a.useState)(re),D=C[0],T=C[1],B=(0,a.useState)((0,ye.U2)(nn.Tz,!0)),M=B[0],U=B[1],W=en.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,J=(0,a.useMemo)((function(){return on(on({},null===W||void 0===W?void 0:W.pipeline),{},{uuid:i})}),[W,i]),Y=(null===J||void 0===J?void 0:J.type)===pe.qL.INTEGRATION,F=(0,a.useMemo)((function(){return J.blocks||[]}),[J]),H=(0,a.useMemo)((function(){var e=(0,Q.HK)(F,(function(e){return e.uuid}));if(Y){var n,t=(0,Q.sE)(F,(function(e){var n=e.type;return d.tf.DATA_LOADER===n})),r=t?(0,s.Qc)(t.content):{},i=((null===r||void 0===r||null===(n=r.catalog)||void 0===n?void 0:n.streams)||[]).reduce((function(e,n){var t=n.tap_stream_id,r={};return F.forEach((function(e){var n=e.uuid,i=e.type,o="".concat(n,":").concat(t);r[o]={type:i}})),on(on({},e),r)}),{});e=on(on({},i),e)}return e}),[F,Y]),G=(0,Ze.iV)(),q=(0,a.useMemo)((function(){return(null===G||void 0===G?void 0:G.hasOwnProperty(I.PIPELINE_SCHEDULE_ID))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(I.LEVEL))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(I.BLOCK_TYPE))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(I.BLOCK_UUID))}),[G]),z=!(null!==G&&void 0!==G&&G.start_timestamp)&&!(null!==G&&void 0!==G&&G.hasOwnProperty(ln)||null!==G&&void 0!==G&&G.hasOwnProperty(cn)),K=(0,Je.JI)(Ue[Z.LAST_DAY]),$=en.ZP.logs.pipelines.list(c?i:null,(0,Fe.gR)(z?on(on({},c),{},{start_timestamp:K}):c,[ke]),{refreshInterval:5e3}),X=$.data,ee=$.mutate,ne=!X,te=(0,a.useMemo)((function(){var e;if(null!==X&&void 0!==X&&null!==(e=X.logs)&&void 0!==e&&e[0]){var n,t=(null===(n=X.logs)||void 0===n?void 0:n[0])||{};return{blockRunLogs:t.block_run_logs,pipelineRunLogs:t.pipeline_run_logs,totalBlockRunLogCount:t.total_block_run_log_count,totalPipelineRunLogCount:t.total_pipeline_run_log_count}}return{blockRunLogs:[],pipelineRunLogs:[],totalBlockRunLogCount:0,totalPipelineRunLogCount:0}}),[X]),ie=te.blockRunLogs,le=te.pipelineRunLogs,ce=te.totalBlockRunLogCount,ue=te.totalPipelineRunLogCount,se=+(null===G||void 0===G?void 0:G._limit)>=ce&&+(null===G||void 0===G?void 0:G._limit)>=ue,ae=(0,a.useMemo)((function(){return(0,Q.YC)(ie.concat(le).reduce((function(e,n){return e.concat(V(n))}),[]),(function(e){var n=e.data;return(null===n||void 0===n?void 0:n.timestamp)||0}))}),[ie,le]),de=(0,a.useMemo)((function(){return ae.filter((function(e){var n=e.data,t=[];if(!c)return!0;if(t.push(!(0,Fe.Qr)(n)),c["level[]"]&&t.push(c["level[]"].includes(null===n||void 0===n?void 0:n.level)),c["block_type[]"]){var r,i,o=null===n||void 0===n?void 0:n.block_uuid;if(Y)o=null===n||void 0===n||null===(i=n.block_uuid)||void 0===i?void 0:i.split(":").slice(0,2).join(":");t.push(c["block_type[]"].includes(null===(r=H[o])||void 0===r?void 0:r.type))}if(c["pipeline_run_id[]"]){var l=null===n||void 0===n?void 0:n.pipeline_run_id;t.push(c["pipeline_run_id[]"].includes(String(l)))}if(c["block_run_id[]"]){var u=null===n||void 0===n?void 0:n.block_run_id;t.push(c["block_run_id[]"].includes(String(u)))}return t.every((function(e){return e}))}))}),[H,Y,ae,c]),he=de.length,me=(0,fe.Z)(G);(0,a.useEffect)((function(){var e;z&&(0,L.u)((e={},(0,o.Z)(e,We.$D.LIMIT,Be),(0,o.Z)(e,We.$D.OFFSET,0),(0,o.Z)(e,"start_timestamp",K),e))}),[z]),(0,a.useEffect)((function(){(0,Fe.Xy)(G,me)||f(G)}),[G,me]);var ge=(0,fe.Z)(v);(0,a.useEffect)((function(){var e=G.log_uuid;!e||v||ge||b(ae.find((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.uuid)===e})))}),[ae,G,v,ge]);var je=G._limit,be=G._offset,xe=+(je||0),_e=+(be||0),Oe=Math.max(ce,ue),Pe=(0,a.useCallback)((function(){var e,n=xe,t=_e;(ce>xe||ue>xe)&&(n=Math.min(Oe,xe+Be),t=Math.min(_e+Be,Oe-Oe%Be),(0,L.u)(on(on({},G),{},(e={},(0,o.Z)(e,We.$D.LIMIT,n),(0,o.Z)(e,We.$D.OFFSET,t),e))))}),[Oe,xe,_e,G,ce,ue]),Ie=(0,a.useCallback)((function(){var e,n=xe,t=_e;xe>=Be&&(n=Math.max(Be,xe-Be),xe>=Oe&&Oe%Be!==0&&(n=Oe-Oe%Be),t=Math.max(0,_e-Be),(0,L.u)(on(on({},G),{},(e={},(0,o.Z)(e,We.$D.LIMIT,n),(0,o.Z)(e,We.$D.OFFSET,t),e))))}),[Oe,xe,_e,G]),Se=(0,a.useCallback)((function(){var e=!M;U(e),(0,ye.t8)(nn.Tz,e)}),[M]),we=(0,a.useMemo)((function(){return(0,E.jsx)(Ee,{autoScrollLogs:M,blocksByUUID:H,logs:de,onRowClick:T,pipeline:J,query:c,saveScrollPosition:q,setSelectedLog:b,tableInnerRef:r,themeContext:t})}),[M,H,de,J,c,q,t]);return(0,E.jsxs)($e.Z,{after:v&&(0,E.jsx)(oe,{log:v,onClose:function(){(0,L.u)((0,o.Z)({},ke,null)),b(null)},selectedTab:D,setSelectedTab:T}),afterHidden:!v,afterWidth:80*x.iI,before:(0,E.jsx)(A,{blocks:F,query:c}),beforeWidth:20*x.iI,breadcrumbs:[{label:function(){return"Logs"}}],errors:S,pageName:tn.M.PIPELINE_LOGS,pipeline:J,setErrors:k,subheader:null,title:function(e){var n=e.name;return"".concat(n," logs")},uuid:"pipeline/logs",children:[(0,E.jsx)(g.Z,{px:x.cd,py:1,children:(0,E.jsxs)(j.ZP,{children:[!ne&&(0,E.jsxs)(E.Fragment,{children:[(0,w.x6)(he)," logs found",(0,E.jsx)(Ke,{allPastLogsLoaded:se,loadNewerLogInterval:Ie,loadPastLogInterval:Pe,saveScrollPosition:q,selectedRange:_,setSelectedRange:O})]}),ne&&"Searching..."]})}),(0,E.jsx)(p.Z,{light:!0}),ne&&(0,E.jsx)(g.Z,{p:x.cd,children:(0,E.jsx)(Xe.Z,{})}),!ne&&de.length>=1&&we,(0,E.jsx)(g.Z,{p:"".concat(1.5*x.iI,"px"),children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(N.ZP,on(on({},ze),{},{onClick:function(){"0"===(null===G||void 0===G?void 0:G._offset)&&(null===G||void 0===G?void 0:G._limit)===String(Be)?ee(null):(0,L.u)({_limit:Be,_offset:0})},uuid:"logs/toolbar/load_newest",children:"Load latest logs"})),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(N.ZP,on(on({},ze),{},{backgroundColor:ve.Z.background.page,onClick:function(){var e;null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},uuid:"logs/toolbar/scroll_to_bottomt",children:"Scroll to bottom"})),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsxs)(R.Z,{children:[(0,E.jsx)(j.ZP,{noWrapping:!0,children:"Auto-scroll to new logs"}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(Qe.Z,{checked:M,compact:!0,onCheck:Se})]})]})})]})}un.getInitialProps=function(){var e=(0,i.Z)(c().mark((function e(n){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var sn=(0,Ve.Z)(un)},48277:function(e,n,t){"use strict";t.d(n,{$P:function(){return s},JI:function(){return o},VJ:function(){return u},fD:function(){return l},uf:function(){return i},vN:function(){return c}});var r=t(75582),i=function(e){var n=String(e).split("."),t=(0,r.Z)(n,2),i=t[0],o=t[1];return"".concat(i.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(o?".".concat(o):"")};function o(e){var n=Math.floor(Date.now()/1e3);return e>0?n-e:n}function l(e){return(e>>>0).toString(2)}function c(e,n){return String(BigInt(e)+BigInt(n))}function u(e,n){return String(BigInt(e)-BigInt(n))}function s(e){return parseInt(e,2)}},62453:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/logs",function(){return t(59860)}])}},function(e){e.O(0,[7674,1557,3782,9774,2888,179],(function(){return n=62453,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2858],{94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return C}});var r=t(82394),o=t(21831),i=t(82684),l=t(50724),s=t(1402),c=t(97618),u=t(70613),a=t(31557),d=t(68899),h=t(28598);function f(e,n){var t=e.children,r=e.noPadding;return(0,h.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var m=i.forwardRef(f),v=t(62547),j=t(82571),p=t(77417),x=t(46684),b=t(75375);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function g(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,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function y(e,n){e.addProjectBreadcrumbToCustomBreadcrumbs;var t=e.after,r=e.afterHeader,i=e.afterHidden,f=e.afterWidth,Z=e.afterWidthOverride,y=e.appendBreadcrumbs,C=e.before,P=e.beforeHeader,_=e.beforeWidth,w=e.breadcrumbs,O=e.children,k=e.contained,M=e.errors,I=e.headerMenuItems,S=e.headerOffset,H=e.hideAfterCompletely,A=e.mainContainerHeader,E=e.navigationItems,D=e.setAfterHidden,R=e.setAfterWidth,F=e.setBeforeWidth,B=e.setErrors,N=e.subheaderChildren,V=e.subheaderNoPadding,T=e.title,L=e.uuid,U=(0,b.Z)(L,{beforeResizeOffset:b.H,setWidthAfter:R,setWidthBefore:F,widthAfter:f,widthBefore:_,widthOverrideAfter:Z}),q=U.mainContainerRef,G=U.mousedownActiveAfter,z=U.mousedownActiveBefore,W=U.setMousedownActiveAfter,Q=U.setMousedownActiveBefore,K=U.setWidthAfter,Y=U.setWidthBefore,X=U.widthAfter,J=U.widthBefore,$=(0,p.Z)().project,ee=[];return w&&ee.push.apply(ee,(0,o.Z)(w)),null!==w&&void 0!==w&&w.length&&!y||!$||null!==w&&void 0!==w&&w.length||ee.unshift({bold:!y,label:function(){return T}}),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u.Z,{title:T}),(0,h.jsx)(a.Z,{breadcrumbs:ee,menuItems:I}),(0,h.jsxs)(d.Nk,{ref:n,children:[0!==(null===E||void 0===E?void 0:E.length)&&(0,h.jsx)(d.lm,{showMore:!0,children:(0,h.jsx)(j.Z,{navigationItems:E,showMore:!0})}),(0,h.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,h.jsxs)(v.Z,{after:t,afterHeader:r,afterHeightOffset:x.Mz,afterHidden:i,afterMousedownActive:G,afterWidth:X,before:C,beforeHeader:P,beforeHeightOffset:x.Mz,beforeMousedownActive:z,beforeWidth:C?J:d.k1,contained:k,headerOffset:S,hideAfterCompletely:!t||H,leftOffset:C?d.k1:null,mainContainerHeader:A,mainContainerRef:q,setAfterHidden:D,setAfterMousedownActive:W,setAfterWidth:K,setBeforeMousedownActive:Q,setBeforeWidth:Y,children:[N&&(0,h.jsx)(m,{noPadding:V,children:N}),O]})})]}),M&&(0,h.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===B||void 0===B?void 0:B(null)},children:(0,h.jsx)(s.Z,g(g({},M),{},{onClose:function(){return null===B||void 0===B?void 0:B(null)}}))})]})}var C=i.forwardRef(y)},93808:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var r=t(77837),o=t(26304),i=t(62243),l=t(29385),s=t(80022),c=t(13692),u=t(93189),a=t(15544),d=t(82394),h=t(38860),f=t.n(h),m=t(82684),v=t(56663),j=t.n(v),p=t(40761),x=t(34661),b=t(36105),Z=t(50178),g=t(69419),y=t(28598),C=["auth"];function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function _(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,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function w(e){var n=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 t,r=(0,a.Z)(e);if(n){var o=(0,a.Z)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)}}function O(e){return function(n){(0,c.Z)(u,n);var t=w(u);function u(){var e;(0,i.Z)(this,u);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e=t.call.apply(t,[this].concat(r)),(0,d.Z)((0,s.Z)(e),"state",{auth:new p.Z(e.props.token)}),e}return(0,l.Z)(u,[{key:"componentDidMount",value:function(){this.setState({auth:new p.Z(this.props.token)})}},{key:"render",value:function(){var n=this.props,t=(n.auth,(0,o.Z)(n,C));return(0,y.jsx)(e,_({auth:this.state.auth},t))}}],[{key:"getInitialProps",value:function(){var n=(0,r.Z)(f().mark((function n(t){var r,o,i,l,s,c,u,a,d;return f().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=j()(t),o=(0,Z.ex)(t),i=o.id,l=r[x.Mv],s=r[b.qt],c=new p.Z(l),u=_(_({},t),{},{auth:c,currentGroupId:i,theme:s}),(0,Z.YB)(t)&&c.isExpired&&(console.log("OAuth token has expired."),a=_(_({},t.query),{},{redirect_url:t.asPath}),(0,g.nL)("/sign-in?".concat((0,g.uM)(a)),t.res)),!e.getInitialProps){n.next=12;break}return n.next=10,e.getInitialProps(u);case 10:return d=n.sent,n.abrupt("return",_(_({},d),{},{auth:c,currentGroupId:i,theme:s}));case 12:return n.abrupt("return",u);case 13:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}]),u}(m.Component)}},91769:function(e,n,t){"use strict";t.d(n,{f:function(){return x},h:function(){return j}});var r=t(82394),o=t(82684),i=t(34376),l=t(68562),s=t(72473),c=t(70515),u=t(69419),a=t(53808),d=t(28598);var h=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),h=r.url,f=r.redirect_query_params,m=void 0===f?{}:f;return(0,d.jsx)(d.Fragment,{children:h&&(0,d.jsx)(l.ZP,{beforeElement:(0,d.jsx)(s.GoogleIcon,{size:2*c.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(h).state;(0,a.t8)(e,m),t.push(h)},uuid:"SignForm/google",children:"Sign in with Google"})})};var f=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),h=r.url,f=r.redirect_query_params,m=void 0===f?{}:f;return(0,d.jsx)(d.Fragment,{children:h&&(0,d.jsx)(l.ZP,{beforeElement:(0,d.jsx)(s.MicrosoftIcon,{size:2*c.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(h).state;m&&(0,a.t8)(e,m),t.push(h)},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})};var m=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),s=r.url,c=r.redirect_query_params,h=void 0===c?{}:c;return(0,d.jsx)(d.Fragment,{children:s&&(0,d.jsx)(l.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(s).state;(0,a.t8)(e,h),t.push(s)},uuid:"SignForm/oidc_generic",children:"Sign in with OIDC"})})};var v,j,p=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),s=r.url,c=r.redirect_query_params,h=void 0===c?{}:c;return(0,d.jsx)(d.Fragment,{children:s&&(0,d.jsx)(l.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(s).state;(0,a.t8)(e,h),t.push(s)},uuid:"SignForm/okta",children:"Sign in with Okta"})})};!function(e){e.ACTIVE_DIRECTORY="active_directory",e.BITBUCKET="bitbucket",e.GITHUB="github",e.GITLAB="gitlab",e.GOOGLE="google",e.OIDC_GENERIC="oidc_generic",e.OKTA="okta"}(j||(j={}));var x=(v={},(0,r.Z)(v,j.ACTIVE_DIRECTORY,f),(0,r.Z)(v,j.GOOGLE,h),(0,r.Z)(v,j.OIDC_GENERIC,m),(0,r.Z)(v,j.OKTA,p),v)},37520:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ne}});var r=t(77837),o=t(38860),i=t.n(o),l=t(93808),s=t(82394),c=t(75582),u=t(82684),a=t(69864),d=t(71180),h=t(15338),f=t(55485),m=t(85854),v=t(44085),j=t(38276),p=t(4190),x=t(30160),b=t(35576),Z=t(17488),g=t(12468),y=t(35686),C=t(72473),P="clone",_="delete",w="fetch",O="merge",k="pull",M="push",I="rebase",S="git_remote_name",H="git_repository_name",A={uuid:"Branches"},E={uuid:"Commit"},D={uuid:"Push & Pull Requests"},R={uuid:"Remote & Auth"},F=[R,A,E,D],B=t(70515),N=t(81728),V=t(72619),T=t(28598);var L=function(e){var n=e.actionRemoteName,t=e.branch,r=e.branches,o=e.fetchBranch,i=e.fetchBranches,l=e.remotes,s=e.setActionRemoteName,P=e.showError,w=(0,u.useState)(""),k=w[0],M=w[1],S=(0,u.useState)(null),H=S[0],A=S[1],D=(0,u.useState)(null),F=D[0],L=D[1],U=(0,u.useState)(null),q=U[0],G=U[1],z=(0,u.useState)(""),W=z[0],Q=z[1],K=(0,u.useMemo)((function(){return null===l||void 0===l?void 0:l.find((function(e){return e.name===n}))}),[n,l]),Y=(0,u.useMemo)((function(){return(null===r||void 0===r?void 0:r.concat((null===K||void 0===K?void 0:K.refs)||[]))||[]}),[r,K]),X=(0,a.Db)(y.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){o(),i(),Q("")},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}}),J=(0,c.Z)(X,2),$=J[0],ee=J[1].isLoading,ne=(0,a.Db)(y.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){o(),window.location.reload()},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}}),te=(0,c.Z)(ne,2),re=te[0],oe=te[1].isLoading,ie=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===t||void 0===t?void 0:t.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(e){var n=e.git_custom_branch.progress;o(),M(""),A(""),L(n),G("")},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}}),le=(0,c.Z)(ie,2),se=le[0],ce=le[1].isLoading;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsxs)(m.Z,{children:["Branches",r?" (".concat(null===r||void 0===r?void 0:r.length,")"):""]}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Remote"})}),(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.MultiShare,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return s(e.target.value)},placeholder:"Choose a remote",value:n||"",children:null===l||void 0===l?void 0:l.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(g.Z,{fullSize:!0,label:"Choose a different branch to switch branches",widthFitContent:!0,children:(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{muted:!1}),beforeIconSize:2*B.iI,monospace:!0,onChange:function(e){return re({git_custom_branch:{name:e.target.value,remote:n}})},value:null===t||void 0===t?void 0:t.name,children:(null===t||void 0===t?void 0:t.name)&&(null===Y||void 0===Y?void 0:Y.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)})))})}),(0,T.jsx)(j.Z,{mr:B.cd}),oe&&(0,T.jsx)(p.Z,{inverted:!0})]})]})]})}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(Z.Z,{label:"New branch name",monospace:!0,onChange:function(e){var n;return Q(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:W||""}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Add,{size:2*B.iI}),disabled:!W,loading:ee,onClick:function(){$({git_custom_branch:{name:W}})},primary:!0,children:"Create new branch"})]})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(m.Z,{children:"Actions"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(j.Z,{mb:B.Mq,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),(null===t||void 0===t?void 0:t.name)&&(0,T.jsx)(x.ZP,{monospace:!0,children:null===t||void 0===t?void 0:t.name})]}),(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Base branch"})}),(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return G(e.target.value)},placeholder:"Choose a branch",value:q,children:null===Y||void 0===Y?void 0:Y.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Action"})}),(0,T.jsxs)(v.Z,{onChange:function(e){return A(e.target.value)},placeholder:"Choose action",value:H||"",children:[(0,T.jsx)("option",{value:O,children:(0,N.vg)(O)}),(0,T.jsx)("option",{value:I,children:(0,N.vg)(I)}),(0,T.jsx)("option",{value:_,children:(0,N.vg)(_)})]})]})]}),H&&[O,I].includes(H)&&(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsxs)(x.ZP,{bold:!0,muted:!0,children:["Message for ",H]})}),(0,T.jsx)(b.Z,{monospace:!0,onChange:function(e){return M(e.target.value)},value:k||""})]}),(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!H||!q,loading:ce,onClick:function(){(_!==H||"undefined"!==typeof location&&window.confirm("Are you sure you want to delete branch ".concat(q,"?")))&&se({git_custom_branch:{action_payload:{base_branch:q},action_type:H,message:k}})},primary:!0,children:H?(0,N.vg)(H):"Execute action"}),F&&(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(x.ZP,{default:!0,monospace:!0,preWrap:!0,children:F})})]})]})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsxs)(f.ZP,{children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.PaginateArrowLeft,{}),linkProps:{href:"/version-control?tab=".concat(encodeURIComponent(R.uuid))},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:R.uuid}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)(d.ZP,{afterIcon:(0,T.jsx)(C.PaginateArrowRight,{}),linkProps:{href:"/version-control?tab=".concat(E.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",E.uuid]})]})]})]})},U=t(90299),q=t(32013),G=t(98777),z=t(48670),W=t(75499);function Q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function K(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,s.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 Y={base_branch:null,body:null,compare_branch:null,repository:null,title:null};var X=function(e){var n=e.actionRemoteName,t=e.branch,r=e.branches,o=e.fetchBranch,i=e.loading,l=e.remotes,s=e.repositories,g=e.repositoryName,P=e.setActionRemoteName,_=e.setRepositoryName,w=e.showError,O=(0,u.useState)((null===t||void 0===t?void 0:t.name)||""),k=O[0],I=O[1],S=(0,u.useState)(null),H=S[0],A=S[1],D=(0,u.useState)(null),R=D[0],F=D[1],L=(0,u.useState)(Y),U=L[0],Q=L[1],X=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===t||void 0===t?void 0:t.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(e){var n=e.git_custom_branch,t=n.error,r=n.progress;t?(A(t),F(null)):(o(),A(null),F(r))},onErrorCallback:function(e,n){return w({errors:n,response:e})}})}}),J=(0,c.Z)(X,2),$=J[0],ee=J[1].isLoading,ne=(0,u.useMemo)((function(){var e;return null===s||void 0===s||null===(e=s.find((function(e){return e.name===g})))||void 0===e?void 0:e.url}),[s,g]),te=y.ZP.pull_requests.list({remote_url:ne,repository:g},{},{pauseFetch:!g}),re=te.data,oe=te.mutate,ie=(0,u.useMemo)((function(){return(null===re||void 0===re?void 0:re.pull_requests)||[]}),[re]),le=(0,u.useMemo)((function(){return(0,T.jsx)(W.Z,{columnFlex:[null,null,null,null],columns:[{uuid:"Title"},{uuid:"Author"},{uuid:"Created"},{uuid:"Last modified"}],onClickRow:function(e){var n,t=null===ie||void 0===ie||null===(n=ie[e])||void 0===n?void 0:n.url;t&&window.open(t,"_blank")},rows:null===ie||void 0===ie?void 0:ie.map((function(e){var n=e.created_at,t=e.last_modified,r=e.title,o=e.url,i=e.user;return[(0,T.jsx)(z.Z,{default:!0,href:o,monospace:!0,openNewWindow:!0,small:!0,children:r},"title"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:i},"user"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:n},"createdAt"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:t||"-"},"lastModified")]})),uuid:"pull-requests"})}),[ie]),se=y.ZP.git_custom_branches.list({remote_url:ne,repository:g},{},{pauseFetch:!g}).data,ce=(0,u.useMemo)((function(){return(null===se||void 0===se?void 0:se.git_custom_branches)||[]}),[se]);(0,u.useEffect)((function(){null!==U&&void 0!==U&&U.compare_branch||null===ce||void 0===ce||!ce.find((function(e){return e.name===(null===t||void 0===t?void 0:t.name)}))||Q((function(e){return K(K({},e),{},{compare_branch:null===t||void 0===t?void 0:t.name})}))}),[t,ce,U]);var ue=(0,a.Db)(y.ZP.pull_requests.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){oe(),Q(Y)},onErrorCallback:function(e,n){return w({errors:n,response:e})}})}}),ae=(0,c.Z)(ue,2),de=ae[0],he=ae[1].isLoading;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(m.Z,{children:(0,N.vg)(M)})}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Remote"})}),i&&(0,T.jsx)(p.Z,{inverted:!0}),!i&&(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.MultiShare,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return P(e.target.value)},placeholder:"Choose remote",value:n||"",children:null===l||void 0===l?void 0:l.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Branch"})}),(0,T.jsxs)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return I(e.target.value)},placeholder:"Choose branch",value:k||"",children:[(0,T.jsx)("option",{value:""}),null===r||void 0===r?void 0:r.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsxs)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!n||!k,loading:ee,onClick:function(){F(null),$({git_custom_branch:{action_payload:{branch:k,remote:n},action_type:M}})},primary:!0,children:[(0,N.vg)(M)," ",n," ",n&&k]})}),(R||H)&&(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(x.ZP,{danger:!!H,default:!!R,monospace:!0,preWrap:!0,children:R||H})})]})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(m.Z,{children:"Create pull request"})}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[i&&(0,T.jsx)(p.Z,{inverted:!0}),!i&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Repository"})}),(0,T.jsx)(v.Z,{monospace:!0,onChange:function(e){return _(e.target.value)},placeholder:"Choose repository",value:g||"",children:null===s||void 0===s?void 0:s.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Base branch"})}),g&&!se&&(0,T.jsx)(p.Z,{inverted:!0}),(!g||se)&&(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,disabled:!g,monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{base_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===U||void 0===U?void 0:U.base_branch)||"",children:null===ce||void 0===ce?void 0:ce.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),g&&!se&&(0,T.jsx)(p.Z,{inverted:!0}),(!g||se||(null===U||void 0===U?void 0:U.compare_branch))&&(0,T.jsxs)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,disabled:!g,monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{compare_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===U||void 0===U?void 0:U.compare_branch)||"",children:[!(null!==ce&&void 0!==ce&&ce.length)&&(null===U||void 0===U?void 0:U.compare_branch)&&(0,T.jsx)("option",{value:null===U||void 0===U?void 0:U.compare_branch,children:null===U||void 0===U?void 0:U.compare_branch}),null===ce||void 0===ce?void 0:ce.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(Z.Z,{label:"Title",monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{title:e.target.value})}))},value:(null===U||void 0===U?void 0:U.title)||""})}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(b.Z,{label:"Description",monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{body:e.target.value})}))},value:(null===U||void 0===U?void 0:U.body)||""})}),(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!g||!(null!==U&&void 0!==U&&U.title)||!(null!==U&&void 0!==U&&U.base_branch)||!(null!==U&&void 0!==U&&U.compare_branch),loading:he,onClick:function(){de({pull_request:K(K({},U),{},{remote_url:ne,repository:g})})},primary:!0,children:"Create new pull request"})})]})]}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsx)(q.Z,{visibleMapping:{0:!g},children:(0,T.jsxs)(G.Z,{noPaddingContent:!0,title:re?"Pull requests (".concat(null===ie||void 0===ie?void 0:ie.length,")"):"Pull requests",children:[!g&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(x.ZP,{muted:!0,children:"Please select a repository to view open pull requests."})}),g&&(0,T.jsxs)(T.Fragment,{children:[!re&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(p.Z,{inverted:!0})}),re&&le]})]})})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(f.ZP,{children:(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.PaginateArrowLeft,{}),linkProps:{href:"/version-control?tab=".concat(E.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:E.uuid})})]})]})},J=t(94629),$=t(78650),ee=t(70652),ne=t(97618),te=t(25976),re=te.default.div.withConfig({displayName:"indexstyle__SpacingStyle",componentId:"sc-el09vr-0"})(["margin-top:","px;"],.5*B.iI),oe=t(42122);function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var se,ce=function(e){var n=e.branch,t=e.fetchBranch,r=e.modifiedFiles,o=e.setSelectedFilePath,i=e.showError,l=e.stagedFiles,s=e.untrackedFiles,v=(0,u.useRef)(null),Z=(0,u.useState)(""),g=Z[0],P=Z[1],_=(0,u.useState)({}),w=_[0],O=_[1],k=(0,u.useState)({}),M=k[0],I=k[1],S=(0,u.useMemo)((function(){return Object.keys(r).concat(Object.keys(s)).sort()}),[r,s]),H=(0,u.useMemo)((function(){return Object.keys(l||{})}),[l]),E=(0,u.useMemo)((function(){return H.length}),[H]),R=(0,u.useMemo)((function(){return Object.keys(w).length===(null===S||void 0===S?void 0:S.length)}),[w,S]),F=(0,u.useMemo)((function(){return Object.keys(M).length===(null===H||void 0===H?void 0:H.length)}),[M,H]),L=(0,u.useMemo)((function(){return{onErrorCallback:function(e,n){return i({errors:n,response:e})}}}),[i]),U=(0,u.useMemo)((function(){return{onSuccess:function(e){return(0,V.wD)(e,le({callback:function(){t(),O({})}},L))}}}),[t,L]),Q=(0,u.useMemo)((function(){return y.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name)}),[n]),K=(0,a.Db)(Q,U),Y=(0,c.Z)(K,2),X=Y[0],J=Y[1].isLoading,$=(0,a.Db)(Q,U),te=(0,c.Z)($,2),ie=te[0],se=te[1].isLoading,ce=(0,a.Db)(Q,{onSuccess:function(e){return(0,V.wD)(e,le({callback:function(){t(),I({})}},L))}}),ue=(0,c.Z)(ce,2),ae=ue[0],de=ue[1].isLoading,he=(0,u.useCallback)((function(e,n,t,r,o){var i=(null===e||void 0===e?void 0:e.length)>=1;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(z.Z,{block:!0,noHoverUnderline:!0,onClick:function(){t(o?{}:r)},preventDefault:!0,children:(0,T.jsxs)(f.ZP,{alignItems:"center",flexDirection:"row",children:[(0,T.jsx)(ee.Z,{checked:i&&o,disabled:!i}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(x.ZP,{bold:!0,children:i&&o?"Unselect all":"Select all"})]})}),e.map((function(e){return(0,T.jsx)(re,{children:(0,T.jsx)(z.Z,{block:!0,noHoverUnderline:!0,onClick:function(){return t((function(n){var t=le({},n);return!(null!==t&&void 0!==t&&t[e])?t[e]=!0:delete t[e],t}))},preventDefault:!0,children:(0,T.jsxs)(f.ZP,{alignItems:"center",flexDirection:"row",children:[(0,T.jsx)(ee.Z,{checked:!(null===n||void 0===n||!n[e])}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,children:e})]})})},e)}))]})}),[]),fe=(0,u.useMemo)((function(){return(0,oe.Qr)(w)}),[w]),me=y.ZP.git_custom_branches.detail("with_logs",{_format:"with_logs"}),ve=me.data,je=me.mutate,pe=(0,u.useMemo)((function(){var e;return(null===ve||void 0===ve||null===(e=ve.git_custom_branch)||void 0===e?void 0:e.logs)||[]}),[ve]),xe=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){je(),t(),P("")},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),be=(0,c.Z)(xe,2),Ze=be[0],ge=be[1].isLoading,ye=(0,u.useMemo)((function(){return(0,T.jsx)(W.Z,{columnFlex:[1,1,1],columns:[{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:pe.map((function(e){var n=e.author,t=e.date,r=e.message;return[(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===n||void 0===n?void 0:n.name},"author"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:t},"date"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:r},"message")]})),uuid:"git-branch-logs"})}),[pe]);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)(ne.Z,{flex:1,flexDirection:"column",children:[(0,T.jsxs)(m.Z,{children:["Not staged ",(null===S||void 0===S?void 0:S.length)>=1&&"(".concat(null===S||void 0===S?void 0:S.length,")")]}),(0,T.jsx)(j.Z,{my:B.cd,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(j.Z,{mb:B.cd,children:(0,T.jsxs)(f.ZP,{flexDirection:"row",children:[(0,T.jsx)(d.ZP,{compact:!0,disabled:fe||de||se,loading:J,onClick:function(){X({git_custom_branch:{action_type:"add",files:Object.keys(w)}}).then((function(e){var n,t=e.data;null!==t&&void 0!==t&&t.git_custom_branch&&(null===v||void 0===v||null===(n=v.current)||void 0===n||n.focus())}))},primary:!0,children:"Add files"}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{compact:!0,disabled:fe||J||de,loading:se,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to undo all changes in the selected files?")&&ie({git_custom_branch:{action_type:"checkout",files:Object.keys(w)}})},children:"Checkout files"})]})}),he(S,w,O,le(le({},r),s),R)]}),(0,T.jsx)(j.Z,{mr:B.cd}),(0,T.jsxs)(ne.Z,{flex:1,flexDirection:"column",children:[(0,T.jsxs)(m.Z,{children:["Staged files ",(null===H||void 0===H?void 0:H.length)>=1&&"(".concat(null===H||void 0===H?void 0:H.length,")")]}),(0,T.jsx)(j.Z,{my:B.cd,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(j.Z,{mb:B.cd,children:(0,T.jsx)(f.ZP,{flexDirection:"row",children:(0,T.jsx)(d.ZP,{compact:!0,disabled:(0,oe.Qr)(M)||J||se,loading:de,onClick:function(){ae({git_custom_branch:{action_type:"reset",files:Object.keys(M)}})},secondary:!0,children:"Reset files"})})}),he(H,M,I,l,F)]})]})}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(m.Z,{children:"Commit"})}),(0,T.jsx)(j.Z,{mb:B.cd,children:(0,T.jsx)(q.Z,{children:(0,T.jsx)(G.Z,{noPaddingContent:!0,title:E>=1?"Staged files (".concat(E,")"):"No staged files",children:null===H||void 0===H?void 0:H.map((function(e){return(0,T.jsx)(j.Z,{my:1,px:B.cd,children:(0,T.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,T.jsx)(z.Z,{default:!0,monospace:!0,onClick:function(){return o((function(n){return n===e?null:e}))},warning:null===r||void 0===r?void 0:r[e],children:e}),(0,T.jsx)(j.Z,{mr:1}),(null===r||void 0===r?void 0:r[e])&&(0,T.jsx)(x.ZP,{warning:!0,children:"Modified after staging"})]})},e)}))})})}),(0,T.jsx)(b.Z,{label:"Commit message",monospace:!0,onChange:function(e){return P(e.target.value)},ref:v,value:g||""}),(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsxs)(d.ZP,{disabled:0===E||!((null===g||void 0===g?void 0:g.length)>=1),loading:ge,onClick:function(){Ze({git_custom_branch:{action_type:"commit",message:g}})},primary:!0,children:["Commit ",(0,N._6)("file",E,!0)," with message"]}),0===E&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(x.ZP,{danger:!0,small:!0,children:"Please stage at least 1 file before committing."})]})]})})]}),(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(q.Z,{children:(0,T.jsxs)(G.Z,{noPaddingContent:!0,title:"Logs",children:[!ve&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(p.Z,{inverted:!0})}),ve&&ye]})})}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsxs)(f.ZP,{children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.PaginateArrowLeft,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:A.uuid}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)(d.ZP,{afterIcon:(0,T.jsx)(C.PaginateArrowRight,{}),linkProps:fe?{href:"/version-control?tab=".concat(encodeURIComponent(D.uuid))}:null,noHoverUnderline:!0,primary:fe,sameColorAsText:!0,secondary:!fe,children:["Next: ",D.uuid]})]})]})]})},ue=t(23531),ae=t(12691),de=t.n(ae),he=t(34376),fe=t(63403),me=te.default.svg.withConfig({displayName:"BitbucketWithText__SVGStyle",componentId:"sc-wdje9z-0"})([""]),ve=function(e){var n=e.fill,t=e.opacity,r=e.size,o=void 0===r?fe.C:r,i=e.style,l=e.viewBox,s=void 0===l?"0 0 299 42":l;return(0,T.jsxs)(me,{fill:n,height:o,opacity:t,style:i,viewBox:s,width:o,children:[(0,T.jsx)("path",{d:"M63.3372 2.9978H79.5353C87.4335 2.9978 91.2488 6.77741 91.2488 12.8379C91.2488 17.3994 89.1068 20.2016 84.756 21.179C90.4455 22.0914 93.3237 25.1542 93.3237 30.4978C93.3237 36.4931 89.1737 40.6637 80.4724 40.6637H63.3372V2.9978ZM68.625 19.0939H78.799C83.8191 19.0939 85.894 16.8782 85.894 13.2289C85.894 9.57954 83.6852 7.82008 78.799 7.82008H68.625V19.0939ZM68.625 23.7206V35.4504H80.673C85.7601 35.4504 88.036 33.6909 88.036 29.9113C88.036 25.871 85.827 23.7206 80.5393 23.7206H68.625Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M101.958 0.977783C104.033 0.977783 105.506 2.21592 105.506 4.43157C105.506 6.58205 104.033 7.88536 101.958 7.88536C99.8833 7.88536 98.4106 6.6472 98.4106 4.43157C98.4106 2.21592 99.8833 0.977783 101.958 0.977783ZM99.3478 11.9907H104.435V40.6638H99.3478V11.9907Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M123.779 36.0376C124.984 36.0376 126.055 35.7769 126.992 35.6466V40.4037C126.121 40.6643 125.117 40.8599 123.578 40.8599C117.286 40.8599 114.207 37.2756 114.207 31.9321V16.5529H109.455V11.9912H114.207V5.93091H119.16V11.9912H126.992V16.5529H119.16V31.7367C119.093 34.2781 120.633 36.0376 123.779 36.0376Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M138.504 35.5806V40.5982H133.417V0H138.504V17.1386C140.378 13.359 143.926 11.4039 148.477 11.4039C156.309 11.4039 160.258 17.8554 160.258 26.3271C160.258 34.4076 156.108 41.25 147.875 41.25C143.524 41.25 140.244 39.3602 138.504 35.5806ZM147.072 16.0309C142.52 16.0309 138.504 18.8329 138.504 25.2191V27.5001C138.504 33.8863 142.186 36.6883 146.536 36.6883C152.226 36.6883 155.171 33.0392 155.171 26.3921C155.171 19.4194 152.36 16.0309 147.072 16.0309Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M165.546 11.991H170.633V29.3252C170.633 34.4733 172.775 36.7541 177.594 36.7541C182.279 36.7541 185.559 33.6913 185.559 27.8915V11.991H190.647V40.664H185.559V35.972C183.685 39.3607 180.204 41.2505 176.255 41.2505C169.495 41.2505 165.613 36.6888 165.613 28.8039V11.991H165.546Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M219.027 39.8814C217.287 40.7938 214.542 41.1847 211.864 41.1847C201.355 41.1847 196.469 34.9941 196.469 26.1967C196.469 17.5296 201.355 11.3389 211.864 11.3389C214.542 11.3389 216.55 11.6647 218.892 12.7072V17.2689C217.019 16.4218 215.011 15.9006 212.266 15.9006C204.636 15.9006 201.49 20.5924 201.49 26.1967C201.49 31.8009 204.702 36.4929 212.401 36.4929C215.412 36.4929 217.287 36.1018 219.092 35.4502V39.8814H219.027Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M224.783 40.6635V0H229.87V25.4147L242.52 11.9904H249.147L235.29 26.0664L249.681 40.6635H242.789L229.802 27.2392V40.6635H224.783Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M266.483 41.2506C255.437 41.2506 250.619 35.0599 250.619 26.2624C250.619 17.5954 255.572 11.4045 264.541 11.4045C273.644 11.4045 277.259 17.5302 277.259 26.2624V28.4781H255.773C256.51 33.3655 259.722 36.4935 266.684 36.4935C270.096 36.4935 272.974 35.8418 275.652 34.9296V39.4911C273.175 40.7944 269.494 41.2506 266.483 41.2506ZM255.706 24.2423H272.172C271.904 18.8987 269.427 15.9012 264.34 15.9012C258.919 15.9012 256.242 19.2897 255.706 24.2423Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M294.929 36.0376C296.134 36.0376 297.205 35.7769 298.142 35.6466V40.4037C297.272 40.6643 296.267 40.8599 294.728 40.8599C288.437 40.8599 285.359 37.2756 285.359 31.9321V16.5529H280.606V11.9912H285.359V5.93091H290.311V11.9912H298.142V16.5529H290.311V31.7367C290.245 34.2781 291.784 36.0376 294.929 36.0376Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M1.36497 4.1062C0.556341 4.1062 -0.117513 4.82301 0.0172582 5.605L5.74501 39.1654C5.87979 40.0127 6.62103 40.6642 7.56442 40.6642H34.9903C35.6641 40.6642 36.2032 40.208 36.338 39.5565L42.0658 5.605C42.2006 4.82301 41.594 4.1062 40.718 4.1062H1.36497ZM25.4889 28.3479H16.7288L14.3704 16.3573H27.6453L25.4889 28.3479Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M40.2462 16.3572H27.5775L25.4886 28.3478H16.7286L6.3512 40.2079C6.3512 40.2079 6.82289 40.6641 7.56413 40.6641H34.99C35.6639 40.6641 36.2029 40.2079 36.3377 39.5562L40.2462 16.3572Z",fill:"url(#paint0_linear_13549_1163)"}),(0,T.jsx)("defs",{children:(0,T.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"paint0_linear_13549_1163",x1:"43.1513",x2:"22.7826",y1:"19.7256",y2:"36.1667",children:[(0,T.jsx)("stop",{offset:"0.176",stopColor:"#0052CC"}),(0,T.jsx)("stop",{offset:"1",stopColor:"#2684FF"})]})})]})},je=t(91769),pe=t(69419),xe=t(53808),be=(se={},(0,s.Z)(se,je.h.GITHUB,C.GitHubWithTextIcon),(0,s.Z)(se,je.h.GITLAB,C.GitLabWithTextIcon),(0,s.Z)(se,je.h.BITBUCKET,ve),se);function Ze(e){var n=e.isLoadingCreateOauth,t=e.oauth,r=e.provider,o=e.showError,i=(0,he.useRouter)(),l=(0,a.Db)(y.ZP.oauths.useUpdate(r),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){return window.location.href=window.location.href.split("?")[0]},onErrorCallback:function(e,n){return o({errors:n,response:e})}})}}),s=(0,c.Z)(l,2),u=s[0],h=s[1].isLoading,m=be[r];return(0,T.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,T.jsx)(ne.Z,{children:(0,T.jsx)(m,{size:12*B.iI})}),(0,T.jsx)(ne.Z,{alignItems:"center",children:null!==t&&void 0!==t&&t.authenticated?(0,T.jsx)(d.ZP,{loading:h,onClick:function(){return u({oauth:{action_type:"reset"}})},warning:!0,children:"Reset"}):(0,T.jsx)(d.ZP,{loading:n,onClick:function(){var e=null===t||void 0===t?void 0:t.url,n=(0,pe.iV)(e).state;(0,xe.t8)(n,(null===t||void 0===t?void 0:t.redirect_query_params)||{}),i.push(e)},primary:!0,children:"Authenticate"})})]})}var ge=function(e){var n=e.branch,t=e.isLoadingCreateOauth,r=e.showError,o=y.ZP.oauths.list({type:"git",redirect_uri:encodeURIComponent(window.location.href)}),i=o.data,l=(o.mutate,y.ZP.oauths.detail(je.h.GITHUB,{redirect_uri:encodeURIComponent(window.location.href)})),s=l.data,a=(l.mutate,(0,u.useMemo)((function(){return(null===s||void 0===s?void 0:s.oauth)||{}}),[s])),f=(0,u.useMemo)((function(){return null===n||void 0===n?void 0:n.access_token_exists}),[n]),v=(0,u.useMemo)((function(){var e,n=(null===i||void 0===i||null===(e=i.oauths)||void 0===e?void 0:e.reduce((function(e,n){return e[n.provider]=n,e}),{}))||{};return a&&(n[je.h.GITHUB]=a),n}),[i,a]),p=(0,u.useMemo)((function(){return Object.values(v).some((function(e){return null===e||void 0===e?void 0:e.authenticated}))}),[v]);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(m.Z,{children:"Authentication"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[f&&!p&&(0,T.jsxs)(j.Z,{mb:2,children:[(0,T.jsx)(d.ZP,{disabled:!0,children:"Using access token from Git Settings"}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(x.ZP,{muted:!0,children:"Some features may not work unless you authenticate with a Git client."})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.Mq,children:(0,T.jsx)(x.ZP,{muted:!0,children:"Authenticating with the apps below will allow you to easily pull, push, and create pull requests."})}),(0,T.jsxs)(j.Z,{mb:B.Mq,style:{maxWidth:"600px"},children:[(0,T.jsx)(h.Z,{muted:!0}),Object.entries(v||{}).map((function(e){var n=(0,c.Z)(e,2),o=n[0],i=n[1];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Ze,{isLoadingCreateOauth:t,oauth:i,provider:o,showError:r},o),(0,T.jsx)(h.Z,{muted:!0})]})}))]})]})]})]})},ye=t(77417);var Ce=function(e){var n,t,r,o,i=e.actionRemoteName,l=e.branch,s=e.fetchBranch,b=e.loading,g=e.remotes,_=e.setActionRemoteName,O=e.showError,M=(0,he.useRouter)(),I=(0,ye.Z)().project,S=(0,u.useRef)(null),H=(0,u.useState)(null),E=H[0],D=H[1],R=(0,u.useState)(null),F=R[0],L=R[1],U=(0,u.useState)(null),Q=U[0],K=U[1],Y=(0,u.useState)(null),X=Y[0],J=Y[1],$=(0,u.useState)(!1),ee=$[0],te=$[1],re=(0,u.useState)(null),oe=re[0],ie=re[1],le=(0,u.useState)(""),se=le[0],ce=le[1],ue=(0,u.useState)(""),ae=ue[0],fe=ue[1],me=(0,u.useState)(null),ve=me[0],xe=me[1],be=(0,u.useMemo)((function(){return!(null===l||void 0===l||!l.name)}),[l]);(0,u.useEffect)((function(){var e,n;!ve&&(null!==l&&void 0!==l&&null!==(e=l.sync_config)&&void 0!==e&&e.repo_path||null!==I&&void 0!==I&&I.repo_path)&&xe((null===l||void 0===l||null===(n=l.sync_config)||void 0===n?void 0:n.repo_path)||(null===I||void 0===I?void 0:I.repo_path))}),[l,I,ve]);var Ze=(0,u.useMemo)((function(){var e,n;return null===g||void 0===g||null===(e=g.find((function(e){return e.name===i})))||void 0===e||null===(n=e.refs)||void 0===n?void 0:n.map((function(e){var n=e.name.split("/");return{name:n[n.length-1]}}))}),[i,g]),Ce=(0,a.Db)(y.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){s(),te(!1)},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}}),Pe=(0,c.Z)(Ce,2),_e=Pe[0],we=Pe[1].isLoading,Oe=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===l||void 0===l?void 0:l.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(e){var n=e.git_custom_branch,t=n.error,r=n.progress;t?(L(t),J(null)):(s(),D(null),L(null),K(null),J(r))},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}}),ke=(0,c.Z)(Oe,2),Me=ke[0],Ie=ke[1].isLoading,Se=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===l||void 0===l?void 0:l.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){s(),ce(""),fe("")},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}}),He=(0,c.Z)(Se,2),Ae=He[0],Ee=He[1].isLoading,De=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===l||void 0===l?void 0:l.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){s(),ie(null)},onErrorCallback:function(e,n){ie(null),O({errors:n,response:e})}})}}),Re=(0,c.Z)(De,2),Fe=Re[0],Be=Re[1].isLoading,Ne=(0,a.Db)(y.ZP.oauths.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){return window.location.href="".concat(M.basePath,"/version-control")},onErrorCallback:function(e,n){O({errors:n,response:e})}})}}),Ve=(0,c.Z)(Ne,2),Te=Ve[0],Le=Ve[1].isLoading,Ue=(0,pe.iV)()||{},qe=Ue.access_token,Ge=Ue.provider,ze=Ue.refresh_token,We=Ue.expires_in;(0,u.useEffect)((function(){qe&&Te({oauth:{expires_in:We,provider:Ge||je.h.GITHUB,refresh_token:ze,token:qe}})}),[qe,Te,We,Ge,ze]);var Qe=(0,u.useMemo)((function(){return null===g||void 0===g?void 0:g.map((function(e){var n=e.name,t=e.refs,r=e.urls;return(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,T.jsxs)(ne.Z,{alignItems:"center",children:[(0,T.jsx)(x.ZP,{bold:!0,children:n}),(0,T.jsx)(j.Z,{mx:1,children:(0,T.jsx)(C.ChevronRight,{muted:!0})}),null===r||void 0===r?void 0:r.map((function(e){return(0,T.jsx)(j.Z,{mr:1,children:(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:e})},e)}))]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{compact:!0,disabled:Be&&oe!==n,iconOnly:!0,loading:Be&&oe===n,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to remove remote ".concat(n,"?"))&&(ie(n),Fe({git_custom_branch:{action_type:"remove_remote",action_payload:{name:n}}}).then((function(){i===n&&_(null)})))},small:!0,title:"Remote remote ".concat(n),children:(0,T.jsx)(C.Trash,{})})]})}),(0,T.jsx)(q.Z,{children:(0,T.jsxs)(G.Z,{noPaddingContent:!0,smallTitle:!0,title:"Refs (".concat(null===t||void 0===t?void 0:t.length,")"),children:[0===(null===t||void 0===t?void 0:t.length)&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(x.ZP,{muted:!0,children:"This remote has no refs."})}),(null===t||void 0===t?void 0:t.length)>=1&&(0,T.jsx)(W.Z,{columnFlex:[1,1,1],columns:[{uuid:"Ref"},{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:t.map((function(e){var n,t=e.commit,r=e.name;return[(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:r},"ref-name"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===t||void 0===t||null===(n=t.author)||void 0===n?void 0:n.name},"author"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===t||void 0===t?void 0:t.date},"date"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===t||void 0===t?void 0:t.message},"message")]})),uuid:"git-branch-remotes-refs"})]})}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsx)(h.Z,{light:!0})})]},n)}))}),[Be,oe,g,Fe]);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(m.Z,{children:"Setup"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(j.Z,{mb:1,children:[(0,T.jsx)(x.ZP,{bold:!0,large:!0,children:be?"Git init directory":"Initialize Git directory"}),!be&&(0,T.jsxs)(x.ZP,{muted:!0,children:["Enter the directory you want to initialize git in.",(0,T.jsx)("br",{}),"The current project directoy is filled in for you. If you want to use that, click the save button."]}),be&&(0,T.jsxs)(x.ZP,{muted:!0,children:["If the directory below is blank, then the current working directory will be used to initialize git.",(0,T.jsx)("br",{}),"If git hasn\u2019t been initialized in the directory below, Mage will automatically run git init for you."]})]}),(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(Z.Z,{disabled:be&&!ee,fullWidth:!0,label:"Git directory",maxWidth:400,monospace:!0,onChange:function(e){return xe(e.target.value)},ref:S,value:ve||""}),(0,T.jsx)(j.Z,{mr:1}),(!be||ee)&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(d.ZP,{compact:!0,disabled:!be&&!ve,loading:we,onClick:function(){_e({sync:{repo_path:ve}})},primary:!0,small:!0,children:"Save"}),be&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(z.Z,{onClick:function(){return te(!1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Cancel"})]})]}),be&&!ee&&(0,T.jsx)(z.Z,{onClick:function(){te(!0),setTimeout((function(){var e;return null===S||void 0===S||null===(e=S.current)||void 0===e?void 0:e.focus()}),1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Edit"})]})]})]}),(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(ge,{branch:l,isLoadingCreateOauth:Le,showError:O})}),be&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsxs)(m.Z,{children:["Remotes",!b&&g?" (".concat(null===g||void 0===g?void 0:g.length,")"):""]}),b&&(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsx)(p.Z,{inverted:!0})}),!b&&Qe,(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsxs)(f.ZP,{alignItems:"flex-start",children:[(0,T.jsx)(Z.Z,{label:"New remote name",monospace:!0,onChange:function(e){var n;return ce(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:se||""}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)(f.ZP,{flexDirection:"column",children:[(0,T.jsx)(Z.Z,{label:"Remote URL",monospace:!0,onChange:function(e){var n;return fe(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:ae||""}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["Use the https URL if you",(0,T.jsx)("br",{}),"authenticated with GitHub above."]})})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Add,{size:2*B.iI}),disabled:!se||!ae,loading:Ee,onClick:function(){Ae({git_custom_branch:{action_type:"add_remote",action_payload:{name:se,url:ae}}})},primary:!0,children:"Create new remote"})]})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(m.Z,{children:"Actions"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(j.Z,{mb:B.Mq,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(null===l||void 0===l?void 0:l.name)&&(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(x.ZP,{monospace:!0,children:null===l||void 0===l?void 0:l.name}),(0,T.jsx)(j.Z,{mr:B.cd}),(0,T.jsx)(de(),{href:"/version-control?tab=".concat(A.uuid),passHref:!0,children:(0,T.jsx)(z.Z,{small:!0,children:"Switch branch"})})]})]}),(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)(v.Z,{onChange:function(e){return K(e.target.value)},placeholder:"Action",value:Q||"",children:[(0,T.jsx)("option",{value:w,children:(0,N.vg)(w)}),(0,T.jsx)("option",{value:k,children:(0,N.vg)(k)}),(0,T.jsx)("option",{value:"reset",children:(0,N.vg)("reset --hard")}),(0,T.jsx)("option",{value:P,children:(0,N.vg)(P)})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.MultiShare,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return _(e.target.value)},placeholder:"Remote",value:i||"",children:null===g||void 0===g?void 0:g.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))}),![w,P].includes(Q)&&(0,T.jsx)(j.Z,{ml:1,children:(0,T.jsxs)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return D(e.target.value)},value:E||"",children:[(0,T.jsx)("option",{value:"",children:"All branches"}),null===Ze||void 0===Ze?void 0:Ze.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))]})})]}),P===Q&&(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["Cloning a branch will copy all the files and folders from the remote repository and put them into the Git directory configured above:",(0,T.jsx)("br",{}),(0,T.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null===l||void 0===l||null===(n=l.sync_config)||void 0===n?void 0:n.repo_path}),"."]}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(x.ZP,{muted:!0,small:!0,children:"Cloning won\u2019t automatically create a folder that is named after the remote repository."})}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["For example, if you have a file named ",(0,T.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"magic.py"})," in a remote repository named ",(0,T.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"project_romeo"}),(0,T.jsx)("br",{}),"then that file will be cloned here ",(0,T.jsxs)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:[null===l||void 0===l||null===(t=l.sync_config)||void 0===t?void 0:t.repo_path,"/magic.py"]}),(0,T.jsx)("br",{}),"as opposed to ",(0,T.jsxs)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:[null===l||void 0===l||null===(r=l.sync_config)||void 0===r?void 0:r.repo_path,"/project_romeo/magic.py"]}),"."]})}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["If you want to clone the content of a remote repository into a folder named after the remote repository, then change the Git init directoy above to",(0,T.jsx)("br",{}),(0,T.jsxs)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:[null===l||void 0===l||null===(o=l.sync_config)||void 0===o?void 0:o.repo_path,"/",(0,T.jsx)(x.ZP,{inline:!0,monospace:!0,small:!0,children:"[remote repository name]"})]})]})})]}),(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!Q||!i,loading:Ie,onClick:function(){J(null),(Q!==P||"undefined"!==typeof location&&window.confirm("Are you sure you want to clone remote ".concat(i,"? This will ")+"overwrite all your local changes and may reset any settings you may have configured for your local Git repo. This action cannot be undone."))&&Me({git_custom_branch:{action_payload:{branch:E,remote:i},action_type:Q}})},primary:!0,children:Q?(0,N.vg)(Q):"Execute action"}),(X||F)&&(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(x.ZP,{danger:!!F,default:!!X,monospace:!0,preWrap:!0,children:X||F})})]})]})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(f.ZP,{children:(0,T.jsxs)(d.ZP,{afterIcon:(0,T.jsx)(C.PaginateArrowRight,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",A.uuid]})})]})]})]})},Pe=t(93528),_e=t(98464),we=t(46684),Oe=t(53005),ke=t(15610),Me=(t(17717),t(74401)),Ie=t(86735);function Se(e,n){var t=(0,Me.a9)(e),r=Object.keys(n)||[];return null===r||void 0===r?void 0:r.find((function(e){return null===t||void 0===t?void 0:t.endsWith(e)}))}var He=t(23780);function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ee(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ae(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var De="version_control/index",Re=30*B.iI;var Fe=function(){var e=(0,u.useRef)(null),n=(0,u.useRef)(null),t=(0,He.VI)(null,{},[],{uuid:"VersionControlPage"}),r=(0,c.Z)(t,1)[0],o=(0,u.useState)(!0),i=o[0],l=o[1],d=(0,u.useState)(Re),f=d[0],m=d[1],b="layout_before_".concat(De,"_width"),Z=(0,xe.U2)(b,Re),C=(0,u.useState)(Z),P=C[0],_=C[1],w=(0,u.useState)({}),O=w[0],k=w[1],M=(0,u.useState)(null),I=M[0],N=M[1],V=(0,u.useState)(null),q=V[0],G=V[1],z=(0,u.useState)(F[0]),W=z[0],Q=z[1],K=(0,u.useState)({"All projects":{uuid:"All projects"},"Git directory":{uuid:"Git directory"}}),Y=K[0],ee=K[1],ne=(0,pe.iV)();(0,u.useEffect)((function(){null!==ne&&void 0!==ne&&ne.tab&&Q(F.find((function(e){return e.uuid===(null===ne||void 0===ne?void 0:ne.tab)})))}),[ne]);var te=y.ZP.git_custom_branches.list({include_remote_branches:1}),re=te.data,ie=te.mutate,le=(0,u.useMemo)((function(){return null===re||void 0===re?void 0:re.git_custom_branches}),[re]);(0,u.useEffect)((function(){var e,n;!I&&(null===le||void 0===le?void 0:le.length)>=1&&null!==(e=le[0])&&void 0!==e&&e.name&&N(null===(n=le[0])||void 0===n?void 0:n.name)}),[I,le]);var se=y.ZP.git_custom_branches.detail("current",{_format:"with_files"}),ae=se.data,de=se.mutate,he=(0,u.useMemo)((function(){return(null===ae||void 0===ae?void 0:ae.git_custom_branch)||{}}),[ae]),fe=(0,u.useMemo)((function(){return(null===he||void 0===he?void 0:he.files)||[]}),[he]),me=y.ZP.git_custom_branches.detail("with_remotes",{_format:"with_remotes"}),ve=me.data,je=me.mutate,be=(0,u.useMemo)((function(){return null===ve||void 0===ve?void 0:ve.git_custom_branch}),[ve]),Ze=(0,u.useMemo)((function(){return(null===be||void 0===be?void 0:be.remotes)||[]}),[be]),ge=(0,u.useState)(null),ye=ge[0],Me=ge[1],Ae=(0,u.useCallback)((function(e){(0,xe.t8)(S,e),Me(e)}),[]);(0,u.useEffect)((function(){var e=(0,xe.U2)(S,null);if(ve&&e){var n=null===Ze||void 0===Ze?void 0:Ze.find((function(n){return n.name===e}));Ae(n?null===n||void 0===n?void 0:n.name:null)}}),[ve,Ze,Ae]);var Fe=(0,u.useState)((0,xe.U2)(H,"")),Be=Fe[0],Ne=Fe[1],Ve=(0,u.useCallback)((function(e){(0,xe.t8)(H,e),Ne(e)}),[]),Te=(0,u.useMemo)((function(){return(0,Ie.Tw)(Ze.reduce((function(e,n){var t;return e.concat((null===n||void 0===n||null===(t=n.repository_names)||void 0===t?void 0:t.map((function(e){var t;return{name:e,url:null===n||void 0===n||null===(t=n.urls)||void 0===t?void 0:t[0]}})))||[])}),[]),(function(e){return e.name}))}),[Ze]);(0,u.useEffect)((function(){var e=(0,xe.U2)(H,null);if(ve&&e){var n=null===Te||void 0===Te?void 0:Te.find((function(n){return n.name===e}));Ve(n?null===n||void 0===n?void 0:n.name:null)}}),[ve,Te,Ve]);var Le=y.ZP.git_files.detail(q?encodeURIComponent(q):null,{base_branch:I}),Ue=Le.data,qe=Le.mutate,Ge=(0,u.useMemo)((function(){return null===Ue||void 0===Ue?void 0:Ue.git_file}),[Ue]),ze=(0,_e.Z)(Ge);(0,u.useEffect)((function(){if(Ge!==ze){var e,n=null===he||void 0===he||null===(e=he.files_absolute_path)||void 0===e?void 0:e[q];k((function(e){var t;return Ee(Ee({},e),{},(0,s.Z)({},n,Ee(Ee({},Ge),{},{fullPath:n,relativePath:q,repoPath:null===he||void 0===he||null===(t=he.sync_config)||void 0===t?void 0:t.repo_path})))}))}}),[he,Ge,ze]),(0,u.useEffect)((function(){I&&qe()}),[I,qe]),(0,u.useEffect)((function(){null!==Ue&&void 0!==Ue&&Ue.error&&r({errors:null===Ue||void 0===Ue?void 0:Ue.error,response:Ue})}),[Ue,r]);var We=(0,u.useMemo)((function(){var e,n,t;return{modifiedFiles:null===he||void 0===he||null===(e=he.modified_files)||void 0===e?void 0:e.reduce((function(e,n){return Ee(Ee({},e),{},(0,s.Z)({},n,!0))}),{}),stagedFiles:null===he||void 0===he||null===(n=he.staged_files)||void 0===n?void 0:n.reduce((function(e,n){return Ee(Ee({},e),{},(0,s.Z)({},n,!0))}),{}),untrackedFiles:null===he||void 0===he||null===(t=he.untracked_files)||void 0===t?void 0:t.reduce((function(e,n){return Ee(Ee({},e),{},(0,s.Z)({},n,!0))}),{})}}),[he]),Qe=We.modifiedFiles,Ke=void 0===Qe?{}:Qe,Ye=We.stagedFiles,Xe=void 0===Ye?{}:Ye,Je=We.untrackedFiles,$e=void 0===Je?{}:Je;(0,u.useEffect)((function(){q&&(0,oe.Qr)(Ke)&&(0,oe.Qr)(Xe)&&(0,oe.Qr)($e)&&G(null)}),[Ke,q,Xe,$e]);var en=(0,u.useMemo)((function(){return(null===fe||void 0===fe?void 0:fe.length)>=1?(0,T.jsx)($.Z,{allowEmptyFolders:!0,disableContextMenu:!0,fetchFiles:de,files:fe,isFileDisabled:function(){return!1},onClickFile:function(e,t){G((function(t){if(!t||t!==e){var r;if(!I)null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus();return e}return null})),qe()},ref:e,renderAfterContent:function(e){var n,t,r=e.children,o=(null===r||void 0===r?void 0:r.length)>=1,i=(0,Oe.a9)(e);o&&(i="".concat(i,"/"));var l={};return Se(e,Ke)?(n="M",t="Modified",l.warning=!0):Se(e,$e)?(n="U",t="Untracked",l.danger=!0):Se(e,Xe)&&(n="S",t="Staged",l.success=!0),o&&!n?null:(0,T.jsx)(j.Z,{mx:1,children:(0,T.jsx)(g.Z,{appearBefore:!0,label:t,widthFitContent:!0,children:(0,T.jsx)(x.ZP,Ee(Ee({},l),{},{monospace:!0,rightAligned:!0,small:!0,children:n}))})})},useRootFolder:!0,uuid:"pages/VersionControl"}):(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(x.ZP,{monospace:!0,muted:!0,children:"No files modified"})})}),[I,de,qe,e,fe,Ke,n,G,Xe,$e]),nn=((0,u.useMemo)((function(){return!Ue||!Ge||q&&(null===Ge||void 0===Ge?void 0:Ge.filename)!==q}),[Ue,Ge,q]),(0,u.useMemo)((function(){return ae&&null!==he&&void 0!==he&&he.name?F:F.slice(0,1)}),[he,ae])),tn=(0,u.useMemo)((function(){return(0,T.jsxs)("div",{style:{marginTop:5},children:[(0,T.jsx)(U.Z,{onClickTab:function(e){var n=e.uuid;(0,ke.u)({tab:n})},selectedTabUUID:null===W||void 0===W?void 0:W.uuid,tabs:nn,underlineStyle:!0}),(0,T.jsx)(h.Z,{light:!0})]})}),[W,nn]),rn=(0,u.useMemo)((function(){return(0,T.jsx)(Ce,{actionRemoteName:ye,branch:he,fetchBranch:function(){de(),je()},loading:!ve,remotes:Ze,setActionRemoteName:Ae,showError:r})}),[ye,he,ve,de,je,Ze,Ae,r]),on=(0,u.useMemo)((function(){return(0,T.jsx)(L,{actionRemoteName:ye,branch:he,branches:le,fetchBranch:de,fetchBranches:ie,remotes:Ze,setActionRemoteName:Ae,showError:r})}),[ye,he,le,de,ie,Ze,Ae,r]),ln=(0,u.useMemo)((function(){return(0,T.jsx)(ce,{branch:he,fetchBranch:de,modifiedFiles:Ke,setSelectedFilePath:G,showError:r,stagedFiles:Xe,untrackedFiles:$e})}),[he,de,Ke,G,r,Xe,$e]),sn=(0,u.useMemo)((function(){return(0,T.jsx)(X,{actionRemoteName:ye,branch:he,branches:le,fetchBranch:de,loading:!ve,modifiedFiles:Ke,remotes:Ze,repositories:Te,repositoryName:Be,setActionRemoteName:Ae,setRepositoryName:Ve,showError:r,stagedFiles:Xe})}),[ye,he,le,ve,de,Ke,Ze,Te,Be,Ae,Ve,r,Xe]),cn=(0,u.useMemo)((function(){return(0,T.jsx)(U.Z,{allowScroll:!0,onClickTab:function(e){ee((function(n){return Ee(Ee({},(0,oe.gR)(n,[null===e||void 0===e?void 0:e.uuid])),null!==n&&void 0!==n&&n[null===e||void 0===e?void 0:e.uuid]?{}:(0,s.Z)({},null===e||void 0===e?void 0:e.uuid,e))}))},selectedTabUUIDs:Y,tabs:[{uuid:"All projects"},{uuid:"Git directory"}],underlineStyle:!0})}),[Y]),un=(0,u.useCallback)((function(){qe()}),[qe]),an=(0,u.useCallback)((function(){de()}),[de]),dn=(0,u.useMemo)((function(){var e;if(q)return null===he||void 0===he||null===(e=he.files_absolute_path)||void 0===e?void 0:e[q]}),[he,q]),hn=(0,u.useCallback)((function(e){k((function(n){return(0,oe.gR)(n,[e])}))}),[]),fn=(0,Pe.ZP)({codeEditorMaximumHeightOffset:2*we.Mz+10,onClickTabClose:hn,onCreateFile:an,onUpdateFileSuccess:un,originalContent:O,selectedFilePath:dn,showHiddenFilesSetting:!0,uuid:"pages/VersionControlPage"}),mn=fn.browser,vn=fn.controller,jn=fn.filePaths,pn=(fn.menu,fn.selectedFilePath),xn=fn.tabs,bn=(0,a.Db)((function(e){var n=e.filePath,t=e.query;return y.ZP.git_files.detailAsync(encodeURIComponent(n),t)})),Zn=(0,c.Z)(bn,2),gn=Zn[0];Zn[1].isLoading,(0,u.useEffect)((function(){pn&&gn({filePath:pn,query:{base_branch:I,derive:!0}}).then((function(e){return k((function(n){var t;return Ee(Ee({},n),{},(0,s.Z)({},pn,null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.git_file))}))}))}),[pn]),(0,u.useEffect)((function(){(null===jn||void 0===jn?void 0:jn.length)>=1&&l(!1)}),[jn]);var yn=(0,u.useMemo)((function(){var e=[];return"All projects"in Y&&e.push([{render:function(e){var n=e.columnWidth;return(0,T.jsx)("div",{style:{width:"".concat(n,"px")},children:mn})}}]),"Git directory"in Y&&e.push([{render:function(){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{p:1,children:(0,T.jsx)(v.Z,{compact:!0,label:"Base branch",onChange:function(e){return N(e.target.value)},ref:n,small:!0,value:I||"",children:null===le||void 0===le?void 0:le.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})}),en]})}}]),(0,T.jsx)(ue.Z,{columnsOfItems:e,fullHeight:!0,heightOffset:2*we.Mz,uuid:"version-control-all-modified-files",width:P})}),[I,le,mn,P,en,Y]);return(0,T.jsx)(J.Z,{after:vn,afterHeader:xn,afterHidden:i,afterWidth:f,before:yn,beforeHeader:cn,beforeWidth:P,mainContainerHeader:tn,setAfterHidden:l,setAfterWidth:m,setBeforeWidth:_,title:"Version control",uuid:De,children:(0,T.jsxs)(j.Z,{p:B.cd,children:[!ae&&(0,T.jsx)(p.Z,{inverted:!0}),ae&&(0,T.jsxs)(T.Fragment,{children:[R.uuid===(null===W||void 0===W?void 0:W.uuid)&&rn,A.uuid===(null===W||void 0===W?void 0:W.uuid)&&on,E.uuid===(null===W||void 0===W?void 0:W.uuid)&&ln,D.uuid===(null===W||void 0===W?void 0:W.uuid)&&sn]})]})})};function Be(){return(0,T.jsx)(Fe,{})}Be.getInitialProps=(0,r.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var Ne=(0,l.Z)(Be)},75302:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/version-control",function(){return t(37520)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},13692:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(61049);function o(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,r.Z)(e,n)}},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(12539),o=t(80022);function i(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[1557,9774,2888,179],(function(){return n=75302,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
mage_ai/settings/sso.py
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
|
|
3
|
-
# Environment variable settings used to set up authentication for single
|
|
4
|
-
# sign on.
|
|
5
|
-
|
|
6
|
-
# Okta settings
|
|
7
|
-
|
|
8
|
-
OKTA_DOMAIN_URL = os.getenv('OKTA_DOMAIN_URL')
|
|
9
|
-
OKTA_CLIENT_ID = os.getenv('OKTA_CLIENT_ID')
|
|
10
|
-
OKTA_CLIENT_SECRET = os.getenv('OKTA_CLIENT_SECRET')
|
|
11
|
-
|
|
12
|
-
# Google settings
|
|
13
|
-
|
|
14
|
-
GOOGLE_CLIENT_ID = os.getenv('GOOGLE_CLIENT_ID')
|
|
15
|
-
GOOGLE_CLIENT_SECRET = os.getenv('GOOGLE_CLIENT_SECRET')
|
|
16
|
-
|
|
17
|
-
# Active directory settings
|
|
18
|
-
|
|
19
|
-
ACTIVE_DIRECTORY_CLIENT_ID = os.getenv('ACTIVE_DIRECTORY_CLIENT_ID')
|
|
20
|
-
ACTIVE_DIRECTORY_CLIENT_SECRET = os.getenv('ACTIVE_DIRECTORY_CLIENT_SECRET')
|
|
21
|
-
ACTIVE_DIRECTORY_ROLES_MAPPING = os.getenv('ACTIVE_DIRECTORY_ROLES_MAPPING')
|
|
22
|
-
|
|
23
|
-
# OIDC
|
|
24
|
-
|
|
25
|
-
OIDC_CLIENT_ID = os.getenv('OIDC_CLIENT_ID')
|
|
26
|
-
OIDC_CLIENT_SECRET = os.getenv('OIDC_CLIENT_SECRET')
|
|
27
|
-
OIDC_DISCOVERY_URL = os.getenv('OIDC_DISCOVERY_URL')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|