mage-ai 0.9.13__py3-none-any.whl → 0.9.15__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/ai/generator.py +1 -1
- mage_ai/ai/generator_cmds.py +1 -1
- mage_ai/ai/llm_pipeline_wizard.py +31 -17
- mage_ai/api/policies/PipelineRunPolicy.py +1 -0
- mage_ai/api/presenters/BlockRunPresenter.py +4 -1
- mage_ai/api/presenters/PipelineRunPresenter.py +2 -0
- mage_ai/api/resources/BlockRunResource.py +18 -12
- mage_ai/api/resources/GitBranchResource.py +8 -1
- mage_ai/api/resources/PipelineResource.py +30 -14
- mage_ai/api/resources/PipelineRunResource.py +8 -5
- mage_ai/data_integrations/sources/constants.py +1 -0
- mage_ai/data_preparation/executors/block_executor.py +5 -7
- mage_ai/data_preparation/git/__init__.py +18 -0
- mage_ai/data_preparation/models/block/__init__.py +13 -1
- mage_ai/data_preparation/models/block/dbt/utils/__init__.py +5 -2
- mage_ai/data_preparation/models/block/integration/__init__.py +1 -1
- mage_ai/data_preparation/models/custom_templates/utils.py +14 -4
- mage_ai/data_preparation/models/variable.py +5 -2
- mage_ai/data_preparation/templates/constants.py +16 -0
- mage_ai/data_preparation/templates/data_exporters/mssql.py +32 -0
- mage_ai/data_preparation/templates/data_loaders/mssql.py +27 -0
- mage_ai/io/base.py +5 -0
- mage_ai/io/mssql.py +1 -0
- mage_ai/orchestration/db/models/base.py +15 -15
- mage_ai/orchestration/db/models/oauth.py +35 -4
- mage_ai/orchestration/db/models/schedules.py +4 -0
- mage_ai/orchestration/pipeline_scheduler.py +12 -6
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/404.html.html +2 -2
- mage_ai/server/frontend_dist/_next/static/chunks/{1005-ee665ba499795660.js → 1005-a2f0e3ee378ef02b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2786-756b3834d10b8711.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3391-e1578fe1bdb5a557.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/6299-9b785c07dacf22b3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8952-050e60a8b1eaa32a.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/9605-e40d076d9fc36d83.js → frontend_dist/_next/static/chunks/9605-9332e1686c46da7d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-ccc78f4c29a2a431.js → _app-9dae6fa5126cf001.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-03841b6dd7d240f6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6e2c0e3f818fd4de.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-6e59dc4e57dd2680.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-02295848c811e26a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-ddaca2c267def72a.js → syncs-484581ae34a1c596.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ce11db27e4af7869.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-91889109af36a793.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-ff1faac7a72b1af1.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-624a2d7cbe6303b4.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/triggers-eee16a91f281f92d.js → frontend_dist/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/gJQ7p6K0VGDZzX1HXtRED → frontend_dist/_next/static/h5mR3pjfn_EQy348CZ_ok}/_buildManifest.js +1 -1
- 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/index.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/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]/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/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.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 +11 -11
- 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 +3 -3
- 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/404.html.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1005-ee665ba499795660.js → 1005-a2f0e3ee378ef02b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-756b3834d10b8711.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-e1578fe1bdb5a557.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-9b785c07dacf22b3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-050e60a8b1eaa32a.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/9605-e40d076d9fc36d83.js → frontend_dist_base_path_template/_next/static/chunks/9605-9332e1686c46da7d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-ccc78f4c29a2a431.js → _app-9dae6fa5126cf001.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-03841b6dd7d240f6.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6e2c0e3f818fd4de.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-6e59dc4e57dd2680.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-02295848c811e26a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-ddaca2c267def72a.js → syncs-484581ae34a1c596.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ce11db27e4af7869.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-91889109af36a793.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-ff1faac7a72b1af1.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-624a2d7cbe6303b4.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/triggers-eee16a91f281f92d.js → frontend_dist_base_path_template/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/O4HzlRY2U3Q47jF8s3D-E → frontend_dist_base_path_template/_next/static/xykYLW_ARw5SevdiponLI}/_buildManifest.js +1 -1
- 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/index.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/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]/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/settings/account/profile.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/sync-data.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 +11 -11
- 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 +3 -3
- 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 +12 -1
- mage_ai/services/spark/spark.py +75 -2
- mage_ai/shared/retry.py +1 -1
- mage_ai/tests/data_preparation/models/custom_templates/__init__.py +0 -0
- mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +36 -0
- mage_ai/tests/data_preparation/models/test_block.py +48 -0
- mage_ai/tests/services/spark/__init__.py +0 -0
- mage_ai/tests/services/spark/test_spark.py +52 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/METADATA +1 -1
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/RECORD +164 -159
- mage_ai/server/frontend_dist/_next/static/chunks/1424-846b754e84e6eac1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2786-ba6f486fcaf52ba0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6299-fcb702d0f3d3291b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7496-7d0f9adf0b333801.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8952-9d6fa18fa9378989.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-615ab9e61f0f39ed.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-df014ddb14ebcef4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-846b754e84e6eac1.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-ba6f486fcaf52ba0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-fcb702d0f3d3291b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-7d0f9adf0b333801.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-9d6fa18fa9378989.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-615ab9e61f0f39ed.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-df014ddb14ebcef4.js +0 -1
- mage_ai/tests/orchestration/db/test_models.py +0 -710
- /mage_ai/server/frontend_dist/_next/static/{O4HzlRY2U3Q47jF8s3D-E → h5mR3pjfn_EQy348CZ_ok}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/{O4HzlRY2U3Q47jF8s3D-E → h5mR3pjfn_EQy348CZ_ok}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{gJQ7p6K0VGDZzX1HXtRED → xykYLW_ARw5SevdiponLI}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{gJQ7p6K0VGDZzX1HXtRED → xykYLW_ARw5SevdiponLI}/_ssgManifest.js +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{90659:function(e,n,t){"use strict";var r=t(67403),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,o,l,c,s,u,a=!1;n||(n={}),t=n.debug||!1;try{if(l=r(),c=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),n.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[n.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(n.format,e);n.onCopy&&(r.preventDefault(),n.onCopy(r.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),s.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");a=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),a=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),o=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),u&&document.body.removeChild(u),l()}return a}},11984:function(e,n,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=c(t(82684)),o=c(t(90659)),l=["text","onCopy","options","children"];function c(e){return e&&e.__esModule?e:{default:e}}function s(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?s(Object(t),!0).forEach((function(n){j(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function p(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,n){return f=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},f(e,n)}function h(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=g(e);if(n){var i=g(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)}}function m(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 v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var x=function(e){!function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&f(e,n)}(s,e);var n,t,r,c=h(s);function s(){var e;d(this,s);for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return j(v(e=c.call.apply(c,[this].concat(t))),"onClick",(function(n){var t=e.props,r=t.text,l=t.onCopy,c=t.children,s=t.options,u=i.default.Children.only(c),a=(0,o.default)(r,s);l&&l(r,a),u&&u.props&&"function"===typeof u.props.onClick&&u.props.onClick(n)})),e}return n=s,(t=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=a(e,l),r=i.default.Children.only(n);return i.default.cloneElement(r,u(u({},t),{},{onClick:this.onClick}))}}])&&p(n.prototype,t),r&&p(n,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(i.default.PureComponent);n.CopyToClipboard=x,j(x,"defaultProps",{onCopy:void 0,options:void 0})},64866:function(e,n,t){"use strict";var r=t(11984).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},67403:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<e.rangeCount;r++)t.push(e.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach((function(n){e.addRange(n)})),n&&n.focus()}}},70543:function(e,n,t){"use strict";t.d(n,{IY:function(){return l},Jf:function(){return o},LR:function(){return i},NR:function(){return c},b7:function(){return r}});var r="edit",i="[ERR_BLOCK_EXISTS]",o={uuid:"All files"},l={uuid:"Files in pipeline"},c=[o,l]},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return o}});var r=t(38626),i=t(3055),o=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},56681:function(e,n,t){"use strict";t.d(n,{G7:function(){return y},ZP:function(){return P},u$:function(){return x}});var r=t(75582),i=t(82394),o=t(26304),l=t(32316),c=t(22673),s=t(48952),u=t(86673),a=t(19711),d=t(87815),p=t(49125),f=t(19395),h=t(7715),m=t(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];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 j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=76,b={uuid:"Run details"},Z={uuid:"Dependency tree"},y=[Z,b];function P(e){var n=e.height,t=e.heightOffset,i=e.pipeline,g=e.selectedRun,P=e.selectedTab,_=e.setSelectedTab,O=j({},(0,o.Z)(e,v));g?O.blockStatus=(0,f.IJ)(null===g||void 0===g?void 0:g.block_runs):O.noStatus=!0;var w=(0,h.Kn)(null===g||void 0===g?void 0:g.variables)?j({},null===g||void 0===g?void 0:g.variables):(null===g||void 0===g?void 0:g.variables)||{},S=null===g||void 0===g?void 0:g.event_variables;if(S&&(0,h.Kn)(S)&&!(0,h.Qr)(S))if((0,h.Kn)(w)&&w.hasOwnProperty("event")){var I=(0,h.Kn)(w.event)?w.event:{};w.event=j(j({},I),S)}else w.event=j({},S);var k=[];w&&JSON.stringify(w,null,2).split("\n").forEach((function(e){k.push(" ".concat(e))}));var C=g&&[["Run ID",null===g||void 0===g?void 0:g.id],["Variables",(0,m.jsx)(c.Z,{language:"json",small:!0,source:k.join("\n")},"variable_value")]],E=g&&(0,m.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,m.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:C.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],o=t[1];return[(0,m.jsx)(a.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,m.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:o},"val_".concat(n))]})),uuid:"LogDetail"})}),T=P&&_;return(0,m.jsxs)(m.Fragment,{children:[T&&(0,m.jsx)(u.Z,{py:p.cd,children:(0,m.jsx)(l.Z,{onClickTab:_,selectedTabUUID:null===P||void 0===P?void 0:P.uuid,tabs:y})}),(!T||Z.uuid===(null===P||void 0===P?void 0:P.uuid))&&(0,m.jsx)(s.Z,j(j({},O),{},{height:n,heightOffset:(t||0)+(T?x:0),pipeline:i})),b.uuid===(null===P||void 0===P?void 0:P.uuid)&&E]})}},58122:function(e,n,t){"use strict";t.d(n,{FS:function(){return s},JZ:function(){return a},e7:function(){return d},wx:function(){return u}});var r=t(75582),i=t(82394),o=t(93348);function l(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 c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){return"string"===typeof e?e:JSON.stringify(e)}function u(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 c(c({},e),{},{value:s(n)})}))}function a(e,n){return n===o.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===o.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function d(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),o=t[0],l=t[1],s=l;try{s=JSON.parse(l)}catch(u){}return c(c({},e),{},(0,i.Z)({},o,s))}),{}):e}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return c}});var r=t(38626),i=t(23831),o=t(73942),l=t(49125),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 ")})),s=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 ")}))},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return a}});t(82684);var r=t(60328),i=t(67971),o=t(86673),l=t(22341),c=t(73899),s=t(49125),u=t(28598),a=22;n.Z=function(e){var n=e.page,t=e.maxPages,a=e.onUpdate,d=e.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(f/2),m=n-h;n+h>=d?(m=d-f+2,f-=2):n-h<=0?(m=0,f-=2):(f-=4,m=n-Math.floor(f/2)),p=Array.from({length:f},(function(e,n){return n+m}))}return(0,u.jsx)(u.Fragment,{children:d>0&&(0,u.jsxs)(i.ZP,{alignItems:"center",children:[(0,u.jsx)(r.Z,{disabled:0===n,onClick:function(){return a(n-1)},children:(0,u.jsx)(l.Hd,{size:1.5*s.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.Z,{ml:1,children:(0,u.jsx)(r.Z,{onClick:function(){return a(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,u.jsx)(o.Z,{ml:1,children:(0,u.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(e){return(0,u.jsx)(o.Z,{ml:1,children:(0,u.jsx)(r.Z,{onClick:function(){e!==n&&a(e)},notClickable:e===n,backgroundColor:e===n&&c.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!p.includes(d-1)&&(0,u.jsxs)(u.Fragment,{children:[!p.includes(d-2)&&(0,u.jsx)(o.Z,{ml:1,children:(0,u.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,u.jsx)(o.Z,{ml:1,children:(0,u.jsx)(r.Z,{onClick:function(){return a(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,u.jsx)(o.Z,{ml:1}),(0,u.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return a(n+1)},children:(0,u.jsx)(l.Kw,{size:1.5*s.iI,stroke:"#AEAEAE"})})]})})}},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(67971),l=t(55378),c=t(86673),s=t(19711),u=t(18025),a=t(49125),d=t(24224),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.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(u.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.ZP,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.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)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.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))}))})]})]})}},22673:function(e,n,t){"use strict";var r=t(82684),i=t(68792),o=t(31811),l=t(38626),c=t(65292),s=t(23831),u=t(2005),a=t(49125),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,h=e.source,m=e.wrapLines,v=(0,r.useContext)(l.ThemeContext);function g(e){var r=e.value;return(0,d.jsx)(o.Z,{customStyle:{backgroundColor:(v.background||s.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:u.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:n,lineNumberStyle:{color:(v.content||s.Z.content).muted},showLineNumbers:p,style:c._4,useInlineStyles:!0,wrapLines:m,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(g,{value:n})}},children:h})}},65730:function(e,n,t){"use strict";var r,i=t(82394),o=(t(82684),t(64866)),l=t(21764),c=t(67971),s=t(10919),u=t(86673),a=t(19711),d=t(46261),p=t(22341),f=t(49125),h=t(28598);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 v(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}!function(e){e.LEFT="left",e.RIGHT="right"}(r||(r={})),n.Z=function(e){var n,t=e.children,i=e.copiedText,m=e.iconPosition,g=void 0===m?r.LEFT:m,j=e.inverted,x=e.linkProps,b=e.linkText,Z=e.monospace,y=e.muted,P=e.small,_=e.toastMessage,O=e.withCopyIcon;return t?n=(0,h.jsx)("span",{children:t}):O&&(n=(0,h.jsx)(s.Z,v(v({href:"#",inline:!0,muted:y,preventDefault:!0,sameColorAsText:!0,small:P},x),{},{children:(0,h.jsxs)(c.ZP,{alignItems:"center",children:[g===r.LEFT&&(0,h.jsx)(u.Z,{mr:b?1:0,children:(0,h.jsx)(c.ZP,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:y,size:2*f.iI})})}),b&&(0,h.jsx)(a.ZP,{inverted:j,monospace:Z,muted:y,small:P,children:b}),g===r.RIGHT&&(0,h.jsx)(u.Z,{ml:b?1:0,children:(0,h.jsx)(c.ZP,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:y})})})]})}))),(0,h.jsx)(d.Z,{block:!0,label:"Copy",size:null,widthFitContent:!0,children:(0,h.jsx)(o.CopyToClipboard,{onCopy:function(){return l.Am.success(_||"Successfully copied to clipboard.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:i})},text:i,children:n})})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var r=t(82684),i=t(60328),o=t(67971),l=t(882),c=t(86673),s=t(19711),u=t(99994),a=t(38626),d=t(49125),p=t(37391),f=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],d.cd*d.iI,d.cd*d.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),p.w5),h=t(66653),m=t(28598);var v=function(e){var n=e.allowScroll,t=e.compact,a=e.contained,p=e.noPadding,v=e.onClickTab,g=e.regularSizeText,j=e.selectedTabUUID,x=e.small,b=e.tabs,Z=(0,r.useMemo)((function(){var e=b.length,n=[];return b.forEach((function(r,a){var p=r.Icon,f=r.IconSelected,b=r.label,Z=r.uuid,y=Z===j,P=y&&f||p,_=b?b():Z,O=(0,m.jsxs)(o.ZP,{alignItems:"center",children:[P&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(P,{default:!y,size:2*d.iI}),(0,m.jsx)(c.Z,{mr:1})]}),(0,m.jsx)(s.ZP,{bold:!0,default:!y,noWrapping:!0,small:!g,children:_})]});a>=1&&e>=2&&n.push((0,m.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(Z))),y?n.push((0,m.jsx)(l.Z,{backgroundGradient:u.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||x,onClick:function(e){(0,h.j)(e),v(r)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:x,children:O},Z)):n.push((0,m.jsx)("div",{style:{padding:2},children:(0,m.jsx)(i.Z,{borderLess:!0,compact:t||x,default:!0,onClick:function(e){(0,h.j)(e),v(r)},outline:!0,small:x,children:O})},"button-tab-".concat(Z)))})),n}),[t,v,j,x,b]),y=(0,m.jsx)(o.ZP,{alignItems:"center",children:Z});return a?y:(0,m.jsx)(f,{allowScroll:n,noPadding:p,children:y})}},70422:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return We}});var r,i=t(75582),o=t(77837),l=t(82394),c=t(38860),s=t.n(c),u=t(82684),a=t(83455),d=t(34376),p=t(60328),f=t(65730),h=t(34744),m=t(67971),v=t(87372),g=t(10919),j=t(51099),x=t(60547),b=t(97496),Z=t(47409),y=t(93348),P=t(52769),_=t(55378),O=t(86673),w=t(54283),S=t(87815),I=t(55264),k=t(19711),C=t(46261),E=t(82531),T=t(56681),D=t(2850),M=t(86422),N=t(22341),A=t(49125),U=t(59920),R=t(24224);!function(e){e.AWS="aws_event"}(r||(r={}));var H=[{label:function(){return"AWS"},uuid:r.AWS}],L=(0,R.HK)(H,(function(e){return e.uuid})),F=t(58122),W=t(19395),z=t(25958),q=t(33766),X=t(7715),B=t(9736),K=t(96510),V=t(66653),Y=t(59e3),J=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 Q(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,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var $=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,l=e.setErrors,c=e.variables,s=(0,d.useRouter)(),H=(0,B.Ct)(),G=(r||{}).uuid,$=o||{},ee=$.id,ne=$.event_matchers,te=$.name,re=$.schedule_interval,ie=$.schedule_type,oe=$.settings,le=$.sla,ce=$.start_time,se=$.status,ue=$.tags,ae=$.variables,de=void 0===ae?{}:ae,pe=(0,Y.iV)(),fe={_limit:30,_offset:30*(null!==pe&&void 0!==pe&&pe.page?pe.page:0)};null!==pe&&void 0!==pe&&pe.status&&(fe.status=pe.status),null!==o&&void 0!==o&&o.global_data_product_uuid&&(fe.global_data_product_uuid=null===o||void 0===o?void 0:o.global_data_product_uuid);var he=E.ZP.pipeline_runs.pipeline_schedules.list(ee,fe,{refreshInterval:3e3,revalidateOnFocus:!0}),me=he.data,ve=he.mutate,ge=(0,u.useMemo)((function(){return(null===me||void 0===me?void 0:me.pipeline_runs)||[]}),[me]),je=(0,u.useMemo)((function(){var e;return(null===me||void 0===me||null===(e=me.metadata)||void 0===e?void 0:e.count)||[]}),[me]),xe=(0,u.useState)(null),be=xe[0],Ze=xe[1],ye=(0,u.useMemo)((function(){var e=null!==pe&&void 0!==pe&&pe.page?pe.page:0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(b.Z,{fetchPipelineRuns:ve,onClickRow:function(e){return Ze((function(n){var t=ge[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:ge,selectedRun:be,setErrors:l}),(0,J.jsx)(O.Z,{p:2,children:(0,J.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),t=Q(Q({},pe),{},{page:n>=0?n:0});s.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(G,"/triggers/").concat(ee,"?").concat((0,Y.uM)(t)))},page:Number(e),totalPages:Math.ceil(je/30)})})]})}),[ve,ge,ee,G,pe,s,be,l,je]),Pe=(0,u.useState)(T.G7[0]),_e=Pe[0],Oe=Pe[1],we=(0,a.Db)((function(e){return E.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,X.gR)(e,["id"])})}),{onSuccess:function(e){return(0,K.wD)(e,{callback:function(){t()},onErrorCallback:function(e,n){return l({errors:n,response:e})}})}}),Se=(0,i.Z)(we,2),Ie=Se[0],ke=Se[1].isLoading,Ce=E.ZP.pipeline_triggers.pipelines.list(G),Ee=Ce.data,Te=Ce.mutate,De=(0,u.useMemo)((function(){return(0,R.HK)((null===Ee||void 0===Ee?void 0:Ee.pipeline_triggers)||[],(function(e){return e.name}))}),[Ee]),Me=(0,u.useMemo)((function(){return!(null===De||void 0===De||!De[null===o||void 0===o?void 0:o.name])}),[o,De]),Ne=(0,a.Db)(E.ZP.pipeline_triggers.pipelines.useCreate(G),{onSuccess:function(e){return(0,K.wD)(e,{callback:function(){Te()},onErrorCallback:function(e,n){return l({errors:n,response:e})}})}}),Ae=(0,i.Z)(Ne,2),Ue=Ae[0],Re=Ae[1].isLoading,He=(0,u.useMemo)((function(){return y.fq.ACTIVE===se}),[se]),Le=(0,u.useMemo)((function(){var e,n,t={default:!0,size:1.5*A.iI},r=[[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.VW,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:null===(e=y.Z4[ie])||void 0===e?void 0:e.call(y.Z4)},"trigger_type")],[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.rs,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,J.jsx)(k.ZP,{danger:!He,monospace:!0,success:He,children:se},"trigger_status")]];if(le){var i=(0,W.gU)(le),l=i.time,c=i.unit,s=1===l?c:"".concat(c,"s");r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.kI,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:"".concat(l," ").concat(s)},"trigger_sla")])}if(re&&r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.Pf,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:re.replace("@","")},"trigger_frequency")]),ce&&r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.aw,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:ce},"trigger_start_date")]),y.Xm.API===ie){var u=(0,W.M8)(o);r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.Ae,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"API endpoint"})]},"trigger_api_endpoint_label"),(0,J.jsx)(f.Z,{copiedText:u,children:(0,J.jsx)(k.ZP,{monospace:!0,small:!0,children:u})},"trigger_api_endpoint")])}null!==oe&&void 0!==oe&&oe.skip_if_previous_running&&r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(C.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:1.5*A.iI,widthFitContent:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,J.jsx)(k.ZP,{monospace:!0,children:null===(n=oe.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);return null!==oe&&void 0!==oe&&oe.allow_blocks_to_fail&&r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(C.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:1.5*A.iI,widthFitContent:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,J.jsx)(k.ZP,{monospace:!0,children:oe.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:r})}),[He,o,re,ie,oe,le,ce,se]),Fe=(0,u.useMemo)((function(){return de||{}}),[de]),We=(0,u.useMemo)((function(){var e,n=[];return(0,X.Qr)(Fe)?n=(0,F.wx)(c,(function(e){return e.uuid===P.C})):Object.entries(Fe).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],o=t[1];Z.sZ!==r&&n.push({uuid:r,value:(0,F.FS)(o)})})),"undefined"!==typeof(n=(0,F.JZ)(n||[],ie))&&null!==(e=n)&&void 0!==e&&e.length?(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:n},"settings_variable_label_".concat(n)),(0,J.jsx)(k.ZP,{monospace:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[ie,Fe,c]),ze=(0,u.useMemo)((function(){var e,n,t=[],i=null===Fe||void 0===Fe||null===(e=Fe[Z.sZ])||void 0===e?void 0:e.blocks;return null===r||void 0===r||null===(n=r.blocks)||void 0===n||n.forEach((function(e){var n=e.type,r=e.uuid;if(M.tf.DBT===n){var o,l=(null===i||void 0===i||null===(o=i[r])||void 0===o?void 0:o.configuration)||{},c=l.flags,s=l.prefix,u=l.suffix,a=(0,z.IU)(e).name;(c||s||u)&&t.push({flags:c,prefix:s,suffix:u,uuid:a})}})),"undefined"!==typeof t&&null!==t&&void 0!==t&&t.length?(0,J.jsx)(S.Z,{columnFlex:[1,null],rows:t.map((function(e){var n=e.flags,t=e.prefix,r=e.suffix,i=e.uuid;return[(0,J.jsxs)(k.ZP,{monospace:!0,small:!0,children:[t&&(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:t}),i,r&&(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:r})]},"settings_variable_label_".concat(i)),(0,J.jsx)(k.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(i))]}))}):null}),[r,Fe]),qe=(0,u.useMemo)((function(){return(0,J.jsx)(S.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===ne||void 0===ne?void 0:ne.map((function(e,n){var t=e.event_type,r=e.name;return[(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:L[t].label()},"".concat(t,"_").concat(n,"_label")),(0,J.jsx)(k.ZP,{monospace:!0,children:r},"".concat(t,"_").concat(n,"_name"))]}))})}),[ne]);return(0,J.jsxs)(x.Z,{afterHidden:!be,before:(0,J.jsxs)(D.M,{children:[(0,J.jsxs)(O.Z,{mb:A.HN,pt:A.cd,px:A.cd,children:[(0,J.jsxs)(O.Z,{mb:A.cd,children:[y.Xm.TIME===ie&&(0,J.jsx)(N.kO,{size:5*A.iI}),y.Xm.EVENT===ie&&(0,J.jsx)(N.Jp,{size:5*A.iI}),y.Xm.API===ie&&(0,J.jsx)(N.Bf,{size:5*A.iI}),!ie&&(0,J.jsx)(N.VW,{size:5*A.iI})]}),(0,J.jsx)(v.Z,{children:te})]}),(0,J.jsx)(O.Z,{px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"Settings"})}),(0,J.jsx)(h.Z,{light:!0,mt:1,short:!0}),Le,(null===ne||void 0===ne?void 0:ne.length)>=1&&(0,J.jsxs)(O.Z,{my:A.HN,children:[(0,J.jsx)(O.Z,{px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"Events"})}),(0,J.jsx)(h.Z,{light:!0,mt:1,short:!0}),qe]}),We&&(0,J.jsxs)(O.Z,{my:A.HN,children:[(0,J.jsx)(O.Z,{px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"Runtime variables"})}),(0,J.jsx)(h.Z,{light:!0,mt:1,short:!0}),We]}),ze&&(0,J.jsxs)(O.Z,{my:A.HN,children:[(0,J.jsx)(O.Z,{px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"dbt runtime settings"})}),(0,J.jsx)(h.Z,{light:!0,mt:1,short:!0}),ze]}),(null===ue||void 0===ue?void 0:ue.length)>=1&&(0,J.jsxs)(O.Z,{my:A.HN,children:[(0,J.jsx)(O.Z,{px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"Tags"})}),(0,J.jsx)(h.Z,{light:!0,mt:1,short:!0}),(0,J.jsx)(O.Z,{mt:A.cd,px:A.cd,children:(0,J.jsx)(I.Z,{tags:null===ue||void 0===ue?void 0:ue.map((function(e){return{uuid:e}}))})})]}),(0,J.jsx)(O.Z,{my:A.HN,children:(0,J.jsxs)(O.Z,{px:A.cd,children:[(0,J.jsxs)(v.Z,{level:5,children:[Me&&"Trigger exists in code",!Me&&"Store trigger in code"]}),(0,J.jsx)(O.Z,{mt:1,children:(0,J.jsxs)(k.ZP,{default:!0,children:["Save or update the trigger and its settings in the pipeline\u2019s metadata and version control the trigger using Git. For more information, please read the ",(0,J.jsx)(g.Z,{href:"https://docs.mage.ai/guides/triggers/configure-triggers-in-code",openNewWindow:!0,children:"documentation"}),"."]})}),(0,J.jsxs)(O.Z,{mt:A.cd,children:[!Ee&&(0,J.jsx)(w.Z,{inverted:!0}),Ee&&(0,J.jsxs)(p.Z,{disabled:!(null!==o&&void 0!==o&&o.id),loading:Re,onClick:function(){Ue({pipeline_trigger:{pipeline_schedule_id:null===o||void 0===o?void 0:o.id}})},secondary:!0,children:[Me&&"Update trigger in code",!Me&&"Save trigger in code"]})]})]})})]}),beforeWidth:D.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(G,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return te},linkProps:{as:"/pipelines/".concat(G,"/triggers/").concat(ee),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,T.ZP)(Q(Q({},e),{},{selectedRun:be,selectedTab:_e,setSelectedTab:Oe}))},errors:n,pageName:U.M.TRIGGERS,pipeline:r,setErrors:l,subheader:(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(p.Z,{beforeIcon:He?(0,J.jsx)(N.dz,{size:2*A.iI}):(0,J.jsx)(N.Py,{inverted:!H,size:2*A.iI}),danger:He&&!H,loading:ke,onClick:function(e){(0,V.j)(e),Ie({id:ee,status:He?y.fq.INACTIVE:y.fq.ACTIVE})},outline:!0,success:!He&&!H,children:He?"Pause trigger":"Start trigger"}),(0,J.jsx)(O.Z,{mr:A.cd}),!H&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(G,"/triggers/").concat(ee,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,J.jsx)(O.Z,{mr:A.cd})]}),(0,J.jsxs)(_.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?s.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(G,"/triggers/").concat(ee)):(0,q.u7)({page:0,status:e.target.value})},paddingRight:4*A.iI,placeholder:"Select run status",value:(null===pe||void 0===pe?void 0:pe.status)||"all",children:[(0,J.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Z.IK.map((function(e){return(0,J.jsx)("option",{value:e,children:Z.Do[e]},e)}))]})]}),title:function(){return te},uuid:"triggers/detail",children:[(0,J.jsx)(O.Z,{mt:A.cd,px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"Runs for this trigger"})}),(0,J.jsx)(h.Z,{light:!0,mt:A.cd,short:!0}),ye]})},ee=t(21831),ne=t(92083),te=t.n(ne),re=t(21764),ie=t(2713),oe=t(38341),le=t(47999),ce=t(22673),se=t(38626),ue=t(16634),ae=t(82944),de=t(44162);function pe(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 fe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pe(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var he=function(e){var n=e.blocks,t=e.updateVariables,r=e.variables,i=(0,u.useContext)(se.ThemeContext),o=(0,u.useCallback)((function(e,n){return t((function(){var t=(null===r||void 0===r?void 0:r.__mage_variables)||{},i=(null===t||void 0===t?void 0:t.blocks)||{},o=i[e]||{},c=(null===o||void 0===o?void 0:o.configuration)||{};return fe(fe({},r),{},{__mage_variables:fe(fe({},t),{},{blocks:fe(fe({},i),{},(0,l.Z)({},e,fe(fe({},o),{},{configuration:fe(fe({},c),n)})))})})}))}),[t,r]);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(v.Z,{children:"dbt runtime settings"}),(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(S.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,l,c=e.type,s=e.uuid,u=(0,z.IU)(e).name,a=(0,de.qn)(c,{blockColor:e.color,theme:i}).accent,d=null===r||void 0===r||null===(n=r.__mage_variables)||void 0===n||null===(t=n.blocks)||void 0===t||null===(l=t[s])||void 0===l?void 0:l.configuration,p=d||{},f=p.prefix,h=p.suffix,v=(null===d||void 0===d?void 0:d.flags)||[],g=!(null===v||void 0===v||!v.includes(z.Dy));return[(0,J.jsx)(C.Z,{block:!0,label:(0,J.jsx)(k.ZP,{monospace:!0,small:!0,children:s}),size:null,widthFitContent:!0,children:(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(ue.Z,{color:a,size:1.5*A.iI,square:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsxs)(k.ZP,{monospace:!0,small:!0,children:[f&&(0,J.jsx)(k.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:f}),u,h&&(0,J.jsx)(k.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:h})]})]})},"uuid-".concat(s)),(0,J.jsx)(m.ZP,{alignItems:"center",children:(0,J.jsx)(oe.Z,{checked:g,label:z.Dy,monospace:!0,onClick:function(){return o(s,{flags:g?(0,R.Od)(v,(function(e){return z.Dy===e})):v.concat(z.Dy)})},small:!0})},"flags-".concat(s)),(0,J.jsx)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){return o(s,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:f,width:10*A.iI},"prefix-".concat(s)),(0,J.jsx)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){return o(s,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:h,width:10*A.iI},"suffix-".concat(s))]}))})})]})},me=t(93461),ve=t(26304),ge=t(23831),je=t(2005),xe=t(31012),be=["children","large","lineHeight","ordered"];function Ze(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 ye(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ze(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ze(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Pe=(0,se.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||ge.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||ge.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||ge.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(je.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(je.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(xe.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(xe.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(xe.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),_e=se.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],Pe),Oe=se.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],Pe),we=se.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*A.iI,"px;\n ")}));var Se=function(e){var n=e.children,t=e.large,r=e.lineHeight,i=e.ordered,o=(0,ve.Z)(e,be),l=i?Oe:_e;return(0,J.jsx)(l,ye(ye({large:t,lineHeight:r},o),{},{children:u.Children.map(n,(function(e,n){var r;return(0,J.jsx)(we,ye(ye({large:t,marginTop:n>=1},o),{},{children:u.cloneElement(e)}),(null===(r=e.props)||void 0===r?void 0:r.key)||n)}))}))},Ie=t(98781),ke=t(18190),Ce=t(70902),Ee=t(18025),Te=t(90211);function De(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 Me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?De(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):De(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ne=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:y.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:y.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:y.Xm.API}];return e?n.slice(0,1):n};var Ae=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,c=e.setErrors,s=e.variables,j=(0,d.useRouter)(),b=null===r||void 0===r?void 0:r.uuid,w=null===o||void 0===o?void 0:o.id,I=(null===r||void 0===r?void 0:r.type)===Ie.qL.STREAMING,C=(0,u.useState)([]),T=C[0],D=C[1],L=(0,u.useState)(!1),z=L[0],q=L[1],B=(0,u.useState)(!1),V=B[0],Y=B[1],G=(0,u.useState)(),Q=G[0],$=G[1],ne=(0,u.useState)({}),se=ne[0],ue=ne[1],de=(0,u.useState)(null),pe=de[0],fe=de[1],ve=(0,u.useState)(!1),ge=ve[0],je=ve[1],xe=(0,u.useState)(null),be=xe[0],Ze=xe[1],ye=(0,u.useMemo)((function(){return(0,F.wx)(s,(function(e){return e.uuid===P.C}))}),[s]),Pe=pe||{},_e=Pe.name,Oe=Pe.schedule_interval,we=Pe.schedule_type,De=Pe.settings,Ae=void 0===De?{}:De,Ue=(Pe.sla,Pe.start_time),Re=Pe.tags,He=Pe.variables,Le=void 0===He?{}:He;(0,u.useEffect)((function(){Ae&&$(Ae)}),[Ae]);var Fe=(0,u.useState)(null),We=Fe[0],ze=Fe[1],qe=(0,u.useState)({hour:"00",minute:"00"}),Xe=qe[0],Be=qe[1],Ke=(0,u.useState)({dayOfMonth:null,dayOfWeek:null,hour:null,minute:null,second:null}),Ve=Ke[0],Ye=Ke[1],Je=E.ZP.event_rules.detail(y.Xm.EVENT===we?"aws":null).data,Ge=(0,u.useMemo)((function(){var e;return(null===Je||void 0===Je||null===(e=Je.event_rule)||void 0===e?void 0:e.rules)||[]}),[Je]),Qe=(0,u.useMemo)((function(){return(0,R.HK)(Ge,(function(e){return e.name}))}),[Ge]),$e=(0,a.Db)(E.ZP.pipeline_schedules.useUpdate(w),{onSuccess:function(e){return(0,K.wD)(e,{callback:function(){t(),j.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(b,"/triggers/").concat(w))},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),en=(0,i.Z)($e,2),nn=en[0],tn=en[1].isLoading,rn=(0,u.useMemo)((function(){return Le||{}}),[Le]);(0,u.useEffect)((function(){if(Ue){var e=Ue.split(" ")[1];ze((0,W.eI)(Ue)),Be({hour:e.substring(0,2),minute:e.substring(3,5)});var n=te()(Ue).utc();Ye({dayOfMonth:n.date(),dayOfWeek:n.day(),hour:n.hours(),minute:n.minutes(),second:n.seconds()})}else{var t=new Date;ze(t),Be({hour:String(t.getUTCHours()).padStart(2,"0"),minute:String(t.getUTCMinutes()).padStart(2,"0")})}}),[Ue]),(0,u.useEffect)((function(){rn&&Object.keys(rn).length>0&&q(!0)}),[rn]),(0,u.useEffect)((function(){ue(z?null===ye||void 0===ye?void 0:ye.reduce((function(e,n){var t=n.uuid,r=n.value;return Me(Me({},e),{},(0,l.Z)({},t,rn[t]||r))}),{}):null)}),[ye,z,rn]);var on=(0,u.useMemo)((function(){return Oe&&!Object.values(y.U5).includes(Oe)}),[Oe]);(0,u.useEffect)((function(){if(o&&!pe){D(o.event_matchers),(null===o||void 0===o?void 0:o.schedule_interval)&&!Object.values(y.U5).includes(null===o||void 0===o?void 0:o.schedule_interval)?(Ze(null===o||void 0===o?void 0:o.schedule_interval),fe(Me(Me({},o),{},{schedule_interval:"custom"}))):fe(I?Me(Me({},o),{},{schedule_interval:y.U5.ONCE}):o);var e=o.sla;if(e){Y(!0);var n=(0,W.gU)(e),t=n.time,r=n.unit;fe((function(e){return Me(Me({},e),{},{slaAmount:t,slaUnit:r})}))}}}),[I,o,pe,Oe]);var ln=(0,u.useMemo)((function(){return!(null===Q||void 0===Q||!Q.landing_time_enabled)}),[Q]),cn=(0,u.useMemo)((function(){return y.Xm.TIME!==we||![y.U5.DAILY,y.U5.HOURLY,y.U5.MONTHLY,y.U5.WEEKLY].includes(Oe)}),[Oe,we]),sn=(0,u.useMemo)((function(){return ln&&!cn}),[cn,ln]),un=(0,u.useCallback)((function(){var e=Me(Me({},(0,X.GL)(pe,["name","schedule_type","tags"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,F.e7)(se)});if(sn){var n=Ve.dayOfMonth,t=Ve.dayOfWeek,r=Ve.hour,i=Ve.minute,l=Ve.second,c=te()("2023-07-01").utc();(0,Te.HW)(n)&&(c=c.date(n)),(0,Te.HW)(t)&&(c=c.day(t)),(0,Te.HW)(r)&&(c=c.hours(r)),(0,Te.HW)(i)&&(c=c.minutes(i)),(0,Te.HW)(l)&&(c=c.seconds(l)),e.schedule_interval=on?be:pe.schedule_interval,e.start_time=c.toISOString()}else y.Xm.EVENT===pe.schedule_type?e.event_matchers=T:(e.schedule_interval=on?be:pe.schedule_interval,e.start_time=We&&null!==Xe&&void 0!==Xe&&Xe.hour&&null!==Xe&&void 0!==Xe&&Xe.minute?"".concat(We.toISOString().split("T")[0]," ").concat(null===Xe||void 0===Xe?void 0:Xe.hour,":").concat(null===Xe||void 0===Xe?void 0:Xe.minute,":00"):null);if(V){var s=null===pe||void 0===pe?void 0:pe.slaAmount,u=null===pe||void 0===pe?void 0:pe.slaUnit;if(!s||isNaN(s)||!u)return void re.Am.error("Please enter a valid SLA",{position:re.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,W.vJ)(s,u)}else null!==o&&void 0!==o&&o.sla&&(e.sla=0);e.settings=Q,nn({pipeline_schedule:e})}),[be,We,V,T,on,Ve,o,se,pe,Q,sn,Xe,nn]),an=(0,u.useMemo)((function(){if(null===o||void 0===o||!o.runtime_average)return"Trigger doesn\u2019t have enough history to estimate runtime.";var e=Number(null===o||void 0===o?void 0:o.runtime_average),n=Math.max(Math.floor(e/3600),0),t=Math.max(Math.floor((e-60*n*60)/60),0),r=Math.max(Math.floor(e-(60*n*60+60*t)),0),i=[];return n>=1&&i.push((0,Te._6)("hour",n,!0)),t>=1&&i.push((0,Te._6)("minute",t,!0)),r>=1&&i.push((0,Te._6)("second",r,!0)),i.join(" ")}),[o]),dn=(0,u.useMemo)((function(){if(!sn)return null;var e=[(0,J.jsxs)(O.Z,{mr:1,children:[(0,J.jsx)(O.Z,{mb:1,children:(0,J.jsx)(k.ZP,{bold:!0,default:!0,small:!0,children:"Minute"})}),(0,J.jsxs)(_.Z,{compact:!0,monospace:!0,onChange:function(e){Ye((function(n){return Me(Me({},n),{},{minute:e.target.value})}))},value:(null===Ve||void 0===Ve?void 0:Ve.minute)||"",children:[(0,J.jsx)("option",{value:""}),(0,R.w6)(60).map((function(e,n){return(0,J.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Minute"),(0,J.jsxs)(O.Z,{mr:1,children:[(0,J.jsx)(O.Z,{mb:1,children:(0,J.jsx)(k.ZP,{bold:!0,default:!0,small:!0,children:"Second"})}),(0,J.jsxs)(_.Z,{compact:!0,monospace:!0,onChange:function(e){Ye((function(n){return Me(Me({},n),{},{second:e.target.value})}))},value:(null===Ve||void 0===Ve?void 0:Ve.second)||"",children:[(0,J.jsx)("option",{value:""}),(0,R.w6)(60).map((function(e,n){return(0,J.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Second")];return[y.U5.DAILY,y.U5.MONTHLY,y.U5.WEEKLY].includes(Oe)&&e.unshift((0,J.jsxs)(O.Z,{mr:1,children:[(0,J.jsx)(O.Z,{mb:1,children:(0,J.jsx)(k.ZP,{bold:!0,default:!0,small:!0,children:"Hour"})}),(0,J.jsxs)(_.Z,{compact:!0,monospace:!0,onChange:function(e){Ye((function(n){return Me(Me({},n),{},{hour:e.target.value})}))},value:(null===Ve||void 0===Ve?void 0:Ve.hour)||"",children:[(0,J.jsx)("option",{value:""}),(0,R.w6)(24).map((function(e,n){return(0,J.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Hour")),y.U5.WEEKLY===Oe?e.unshift((0,J.jsxs)(O.Z,{mr:1,children:[(0,J.jsx)(O.Z,{mb:1,children:(0,J.jsx)(k.ZP,{bold:!0,default:!0,small:!0,children:"Day of the week"})}),(0,J.jsxs)(_.Z,{compact:!0,monospace:!0,onChange:function(e){Ye((function(n){return Me(Me({},n),{},{dayOfWeek:e.target.value})}))},value:(null===Ve||void 0===Ve?void 0:Ve.dayOfWeek)||"",children:[(0,J.jsx)("option",{value:""}),(0,J.jsx)("option",{value:6,children:"Sunday"}),(0,J.jsx)("option",{value:0,children:"Monday"}),(0,J.jsx)("option",{value:1,children:"Tuesday"}),(0,J.jsx)("option",{value:2,children:"Wednesday"}),(0,J.jsx)("option",{value:3,children:"Thursday"}),(0,J.jsx)("option",{value:4,children:"Friday"}),(0,J.jsx)("option",{value:5,children:"Saturday"})]})]},"Day of the week")):y.U5.MONTHLY===Oe&&e.unshift((0,J.jsxs)(O.Z,{mr:1,children:[(0,J.jsx)(O.Z,{mb:1,children:(0,J.jsx)(k.ZP,{bold:!0,default:!0,small:!0,children:"Day of the month"})}),(0,J.jsxs)(_.Z,{compact:!0,monospace:!0,onChange:function(e){Ye((function(n){return Me(Me({},n),{},{dayOfMonth:e.target.value})}))},value:(null===Ve||void 0===Ve?void 0:Ve.dayOfMonth)||"",children:[(0,J.jsx)("option",{value:""}),(0,R.w6)(31).map((function(e,n){return(0,J.jsx)("option",{value:n+1,children:n+1>=10?String(n+1):"0".concat(n+1)},n+1)}))]})]},"Day of the month")),(0,J.jsx)(m.ZP,{children:e})}),[Ve,Oe,sn]),pn=(0,u.useMemo)((function(){var e=[[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.KJ,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_detail"),(0,J.jsx)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault(),fe((function(n){return Me(Me({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_e},"trigger_name_input_detail")],[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.Pf,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,J.jsxs)("div",{children:[(0,J.jsxs)(_.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;fe((function(e){return Me(Me({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:Oe,children:[Object.values(y.U5).map((function(e){return(0,J.jsx)("option",{value:e,children:e.substring(1)},e)})),(0,J.jsx)("option",{value:"custom",children:"custom"},"custom")]}),(0,J.jsx)(O.Z,{mt:1,p:1,children:(0,J.jsxs)(k.ZP,{muted:!0,small:!0,children:["If you don\u2019t see the frequency option you need, select ",(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")]];return sn&&(e.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.rs,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Enable landing time"})]},"frequency"),(0,J.jsxs)("div",{children:[(0,J.jsx)(Ce.Z,{checked:ln,disabled:cn,onCheck:function(){$((function(e){return Me(Me({},e),{},{landing_time_enabled:!ln})}))}}),(0,J.jsxs)(O.Z,{mt:1,p:1,children:[cn&&(0,J.jsxs)(k.ZP,{muted:!0,small:!0,children:["In order to enable landing time, the trigger\u2019s frequency must be ",y.U5.HOURLY,", ",y.U5.DAILY,", ",y.U5.WEEKLY,", or ",y.U5.MONTHLY,"."]}),!cn&&(0,J.jsx)(k.ZP,{muted:!0,small:!0,children:"Instead of starting at a specific time, this trigger will schedule pipeline runs at a time where it will finish by the specified time below."})]})]},"frequency_input")]),e.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.Pf,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Average runtime"})]},"runtime_average"),(0,J.jsx)(m.ZP,{alignItems:"center",style:{minHeight:"".concat(5.75*A.iI,"px")},children:(0,J.jsx)(k.ZP,{monospace:!0,children:an})},"runtime_average_value")])),e.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.aw,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsxs)(k.ZP,{default:!0,children:[sn&&"Pipeline complete by",!sn&&"Start date and time"]})]},"start_time"),sn?dn:(0,J.jsxs)("div",{style:{minHeight:"".concat(5.75*A.iI,"px")},children:[!ge&&(0,J.jsx)(ae.Z,{monospace:!0,onClick:function(){return je((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:We?"".concat(We.toISOString().split("T")[0]," ").concat(null===Xe||void 0===Xe?void 0:Xe.hour,":").concat(null===Xe||void 0===Xe?void 0:Xe.minute):""}),(0,J.jsx)("div",{style:{width:"400px"},children:(0,J.jsx)(le.Z,{disableEscape:!0,onClickOutside:function(){return je(!1)},open:ge,style:{position:"relative"},children:(0,J.jsx)(ie.Z,{selectedDate:We,selectedTime:Xe,setSelectedDate:ze,setSelectedTime:Be,topPosition:!0})})})]},"start_time_input")]),I&&e.splice(1,1),on&&e.splice(2,0,[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.EK,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,J.jsxs)("div",{children:[(0,J.jsx)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Ze(e.target.value)},placeholder:"* * * * *",value:be}),(0,J.jsxs)(O.Z,{mt:1,p:1,children:[(0,J.jsxs)(k.ZP,{muted:!0,small:!0,children:["If you want this pipeline to trigger every 1 minute, the CRON syntax is ",(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,small:!0,children:"*/1 * * * *"}),"."]}),(0,J.jsxs)(k.ZP,{muted:!0,small:!0,children:["For more CRON syntax examples, check out this ",(0,J.jsx)(g.Z,{href:"https://crontab.guru/",openNewWindow:!0,small:!0,children:"resource"}),"."]})]})]},"cron_expression_input")]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:2,px:A.cd,children:(0,J.jsx)(v.Z,{children:"Settings"})}),(0,J.jsx)(h.Z,{light:!0,short:!0}),(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:e})]})}),[be,We,on,I,cn,ln,dn,_e,an,Oe,ge,sn,Xe]),fn=(0,u.useCallback)((function(e,n){D((function(t){return Object.entries(n).forEach((function(n){var r=(0,i.Z)(n,2),o=r[0],l=r[1];t[e][o]=l})),(0,ee.Z)(t)}))}),[D]),hn=(0,u.useMemo)((function(){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:A.cd,px:A.cd,children:(0,J.jsx)(v.Z,{children:"Settings"})}),(0,J.jsx)(h.Z,{light:!0,short:!0}),(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.KJ,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_event"),(0,J.jsx)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault(),fe((function(n){return Me(Me({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_e},"trigger_name_input_event")]]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:A.cd,children:[(0,J.jsx)(v.Z,{children:"Events"}),(0,J.jsxs)(k.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,J.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,J.jsxs)(O.Z,{mt:A.Mq,children:[(0,J.jsx)(k.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,J.jsxs)(k.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,J.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,J.jsx)(g.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,J.jsx)(O.Z,{mt:1,children:(0,J.jsxs)(Se,{monospace:!0,ordered:!0,children:[(0,J.jsx)(k.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,J.jsx)(k.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,J.jsx)(k.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,J.jsx)(h.Z,{light:!0,short:!0}),(null===T||void 0===T?void 0:T.length)>=1&&(0,J.jsx)(S.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===T||void 0===T?void 0:T.map((function(e,n){var t=e.event_type,r=e.name,i=e.pattern,o=e.id||"".concat(t,"-").concat(r,"-").concat(n,"-").concat(JSON.stringify(i)),l=[];return i&&JSON.stringify(i,null,2).split("\n").forEach((function(e){l.push(" ".concat(e))})),[(0,J.jsx)(_.Z,{monospace:!0,onChange:function(e){return fn(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:H.map((function(e){var n=e.label,t=e.uuid;return(0,J.jsx)("option",{value:t,children:n()},t)}))},"event-provider-".concat(o)),(0,J.jsx)(_.Z,{monospace:!0,onChange:function(e){var t,r=e.target.value,i=null===(t=Qe[r])||void 0===t?void 0:t.event_pattern;fn(n,{name:r,pattern:i?JSON.parse(i):null})},placeholder:"Event name",value:r,children:Ge.map((function(e){var n=e.name;return(0,J.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(o)),i&&(0,J.jsx)(ce.Z,{language:"json",small:!0,source:l.join("\n")}),(0,J.jsx)(p.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return D((function(e){return(0,R.oM)(e,n)}))},children:(0,J.jsx)(N.rF,{default:!0,size:2*A.iI})},"remove_event")]}))}),(0,J.jsx)(O.Z,{p:A.cd,children:(0,J.jsx)(p.Z,{beforeIcon:(0,J.jsx)(N.mm,{size:2*A.iI}),onClick:function(){return D((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[T,Ge,Qe,_e,fn]),mn=(0,u.useMemo)((function(){var e=(0,W.M8)(o);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:A.cd,px:A.cd,children:(0,J.jsx)(v.Z,{children:"Settings"})}),(0,J.jsx)(h.Z,{light:!0,short:!0}),(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.KJ,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_api"),(0,J.jsx)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault(),fe((function(n){return Me(Me({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_e},"trigger_name_input_api")]]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:A.cd,children:[(0,J.jsx)(v.Z,{children:"Endpoint"}),(0,J.jsxs)(k.ZP,{muted:!0,children:["Make a ",(0,J.jsx)(k.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(f.Z,{copiedText:e,linkText:e,monospace:!0,withCopyIcon:!0})})]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:A.cd,children:[(0,J.jsx)(v.Z,{children:"Payload"}),(0,J.jsx)(k.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(f.Z,{copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',withCopyIcon:!0,children:(0,J.jsx)(ce.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:A.cd,children:[(0,J.jsx)(v.Z,{children:"Sample cURL command"}),(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(ce.Z,{language:"bash",small:!0,source:"\n curl -X POST ".concat(e,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[_e,o]),vn=!we||y.Xm.TIME===we&&!(I&&We||!I&&We&&Oe)||y.Xm.EVENT===we&&(!(null!==T&&void 0!==T&&T.length)||!T.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),gn=(0,u.useMemo)((function(){var e;return(null===r||void 0===r||null===(e=r.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return M.tf.DBT===n})))||[]}),[r]),jn=(0,u.useMemo)((function(){return(0,J.jsxs)(O.Z,{p:A.cd,children:[(0,J.jsxs)(O.Z,{mb:A.HN,children:[(0,J.jsx)(v.Z,{children:"Pipeline run settings"}),(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(m.ZP,{alignItems:"center",children:(0,J.jsx)(oe.Z,{checked:null===Q||void 0===Q?void 0:Q.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return $((function(e){return Me(Me({},e),{},{allow_blocks_to_fail:!(null!==Q&&void 0!==Q&&Q.allow_blocks_to_fail)})}))}})})}),y.Xm.TIME===we&&(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(m.ZP,{alignItems:"center",children:(0,J.jsx)(oe.Z,{checked:null===Q||void 0===Q?void 0:Q.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return $((function(e){return Me(Me({},e),{},{skip_if_previous_running:!(null!==Q&&void 0!==Q&&Q.skip_if_previous_running)})}))}})})}),(0,J.jsxs)(O.Z,{mt:A.Mq,children:[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(O.Z,{mr:2,children:(0,J.jsx)(Ce.Z,{checked:V,onCheck:function(e){Y(e),e||fe((function(e){return Me(Me({},e),{},{slaAmount:0})}))}})}),(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),V&&(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.aw,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,J.jsxs)(m.ZP,{children:[(0,J.jsx)(me.Z,{flex:1,children:(0,J.jsx)(ae.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),fe((function(n){return Me(Me({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===pe||void 0===pe?void 0:pe.slaAmount})}),(0,J.jsx)(me.Z,{flex:1,children:(0,J.jsx)(_.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),fe((function(n){return Me(Me({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===pe||void 0===pe?void 0:pe.slaUnit,children:Object.keys(W.tL).map((function(e){return(0,J.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]})]}),(0,J.jsxs)(O.Z,{mb:A.HN,children:[(0,J.jsx)(v.Z,{children:"Runtime variables"}),!(0,X.Qr)(ye)&&(0,J.jsxs)(O.Z,{mt:A.Mq,children:[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(O.Z,{mr:2,children:(0,J.jsx)(Ce.Z,{checked:z,onCheck:q})}),(0,J.jsx)(k.ZP,{monospace:!0,muted:!0,children:"Overwrite global variables"})]}),z&&se&&Object.entries(se).length>0&&(0,J.jsx)(O.Z,{mt:1,children:(0,J.jsx)(S.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(se).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return Z.sZ===r?e:e.concat([[(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:r},"variable_".concat(r)),(0,J.jsx)(ae.Z,{borderless:!0,monospace:!0,onChange:function(e){e.preventDefault(),ue((function(n){return Me(Me({},n),{},(0,l.Z)({},r,e.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:o},"variable_uuid_input_".concat(r))]])}),[])})})]})]}),(null===gn||void 0===gn?void 0:gn.length)>=1&&(0,J.jsx)(O.Z,{mb:A.HN,children:(0,J.jsx)(he,{blocks:gn,updateVariables:ue,variables:Me(Me({},rn),se)})})]})}),[gn,V,ye,z,se,pe,we,rn,Y,q,ue,Q]),xn=E.ZP.tags.list().data,bn=(0,u.useMemo)((function(){return((null===xn||void 0===xn?void 0:xn.tags)||[]).filter((function(e){var n=e.uuid;return!(null!==Re&&void 0!==Re&&Re.includes(n))}))}),[xn,Re]);return(0,J.jsx)(J.Fragment,{children:(0,J.jsxs)(x.Z,{after:jn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(b,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===o||void 0===o?void 0:o.name},linkProps:{as:"/pipelines/".concat(b,"/triggers/").concat(w),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:n,pageName:U.M.TRIGGERS,pipeline:r,setErrors:c,subheader:(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(p.Z,{disabled:vn,loading:tn,onClick:un,outline:!0,primary:!0,children:"Save changes"}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(b,"/triggers/").concat(w),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===o||void 0===o?void 0:o.name)},uuid:"triggers/edit",children:[(0,J.jsxs)(O.Z,{p:A.cd,children:[(0,J.jsxs)(O.Z,{mb:2,children:[(0,J.jsx)(v.Z,{children:"Trigger type"}),(0,J.jsx)(k.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,J.jsx)(m.ZP,{children:Ne(I).map((function(e){var n=e.label,t=e.description,r=e.uuid,i=we===r,o=we&&!i;return(0,J.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){y.Xm.EVENT!==r||null!==T&&void 0!==T&&T.length||D([{}]),fe((function(e){return Me(Me({},e),{},{schedule_type:r})}))},children:(0,J.jsx)(Ee.U,{selected:i,children:(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(me.Z,{children:(0,J.jsx)("input",{checked:i,type:"radio"})}),(0,J.jsx)(O.Z,{mr:A.cd}),(0,J.jsxs)(me.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,J.jsx)(v.Z,{bold:!0,default:!i&&!o,level:5,muted:!i&&o,children:n()}),(0,J.jsx)(k.ZP,{default:!i&&!o,leftAligned:!0,muted:o,children:t()})]})]})})},r)}))})]}),(0,J.jsxs)(O.Z,{mt:A.HN,children:[y.Xm.TIME===we&&pn,y.Xm.EVENT===we&&hn,y.Xm.API===we&&mn]}),(0,J.jsxs)(O.Z,{mt:A.HN,px:A.cd,children:[(0,J.jsxs)(O.Z,{mb:2,children:[(0,J.jsx)(v.Z,{children:"Tags"}),(0,J.jsx)(k.ZP,{muted:!0,children:"Add or remove tags from this trigger."})]}),(0,J.jsx)(ke.Z,{removeTag:function(e){fe((function(n){return Me(Me({},n),{},{tags:null===Re||void 0===Re?void 0:Re.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){fe((function(n){return Me(Me({},n),{},{tags:(0,R.$C)(e.uuid,Re,(function(n){return n===e.uuid}))})}))},selectedTags:null===Re||void 0===Re?void 0:Re.map((function(e){return{uuid:e}})),tags:bn,uuid:"TagsAutocompleteInputField-trigger-".concat(w)})]})]})})},Ue=t(41788),Re=t(70543);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 Le(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,l.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 Fe(e){var n=e.pipelineScheduleId,t=e.pipelineUUID,r=e.subpath,i=Re.b7===r,o=(0,u.useState)(null),l=o[0],c=o[1],s=E.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,a=null===s||void 0===s?void 0:s.variables,d={};i&&(d._format="with_runtime_average");var p=E.ZP.pipeline_schedules.detail(n,d),f=p.data,h=p.mutate,m=null===f||void 0===f?void 0:f.pipeline_schedule,v=E.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,g=Le(Le({},null===v||void 0===v?void 0:v.pipeline),{},{uuid:t});return i?(0,J.jsx)(Ae,{errors:l,fetchPipelineSchedule:h,pipeline:g,pipelineSchedule:m,setErrors:c,variables:a}):(0,J.jsx)($,{errors:l,fetchPipelineSchedule:h,pipeline:g,pipelineSchedule:m,setErrors:c,variables:a})}Fe.getInitialProps=function(){var e=(0,o.Z)(s().mark((function e(n){var t,r,o,l,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,o=t.slug,!Array.isArray(o)){e.next=4;break}return l=(0,i.Z)(o,2),c=l[0],u=l[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var We=(0,Ue.Z)(Fe)},95488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return t(70422)}])}},function(e){e.O(0,[844,9902,426,1774,8792,7849,4495,1424,1005,7815,6422,547,8952,7496,8190,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{90659:function(e,n,t){"use strict";var r=t(67403),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,o,l,s,c,u,a=!1;n||(n={}),t=n.debug||!1;try{if(l=r(),s=document.createRange(),c=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),n.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[n.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(n.format,e);n.onCopy&&(r.preventDefault(),n.onCopy(r.clipboardData))})),document.body.appendChild(u),s.selectNodeContents(u),c.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");a=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),a=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),o=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(s):c.removeAllRanges()),u&&document.body.removeChild(u),l()}return a}},11984:function(e,n,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=s(t(82684)),o=s(t(90659)),l=["text","onCopy","options","children"];function s(e){return e&&e.__esModule?e:{default:e}}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){j(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 a(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function p(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,n){return f=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},f(e,n)}function h(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=g(e);if(n){var i=g(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)}}function m(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 v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var x=function(e){!function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&f(e,n)}(c,e);var n,t,r,s=h(c);function c(){var e;d(this,c);for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return j(v(e=s.call.apply(s,[this].concat(t))),"onClick",(function(n){var t=e.props,r=t.text,l=t.onCopy,s=t.children,c=t.options,u=i.default.Children.only(s),a=(0,o.default)(r,c);l&&l(r,a),u&&u.props&&"function"===typeof u.props.onClick&&u.props.onClick(n)})),e}return n=c,(t=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=a(e,l),r=i.default.Children.only(n);return i.default.cloneElement(r,u(u({},t),{},{onClick:this.onClick}))}}])&&p(n.prototype,t),r&&p(n,r),Object.defineProperty(n,"prototype",{writable:!1}),c}(i.default.PureComponent);n.CopyToClipboard=x,j(x,"defaultProps",{onCopy:void 0,options:void 0})},64866:function(e,n,t){"use strict";var r=t(11984).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},67403:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<e.rangeCount;r++)t.push(e.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach((function(n){e.addRange(n)})),n&&n.focus()}}},70543:function(e,n,t){"use strict";t.d(n,{IY:function(){return l},Jf:function(){return o},LR:function(){return i},NR:function(){return s},b7:function(){return r}});var r="edit",i="[ERR_BLOCK_EXISTS]",o={uuid:"All files"},l={uuid:"Files in pipeline"},s=[o,l]},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return o}});var r=t(38626),i=t(3055),o=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},56681:function(e,n,t){"use strict";t.d(n,{G7:function(){return y},ZP:function(){return P},u$:function(){return x}});var r=t(75582),i=t(82394),o=t(26304),l=t(32316),s=t(22673),c=t(48952),u=t(86673),a=t(19711),d=t(87815),p=t(49125),f=t(19395),h=t(7715),m=t(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];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 j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=76,b={uuid:"Run details"},Z={uuid:"Dependency tree"},y=[Z,b];function P(e){var n=e.height,t=e.heightOffset,i=e.pipeline,g=e.selectedRun,P=e.selectedTab,_=e.setSelectedTab,O=j({},(0,o.Z)(e,v));g?O.blockStatus=(0,f.IJ)(null===g||void 0===g?void 0:g.block_runs):O.noStatus=!0;var w=(0,h.Kn)(null===g||void 0===g?void 0:g.variables)?j({},null===g||void 0===g?void 0:g.variables):(null===g||void 0===g?void 0:g.variables)||{},S=null===g||void 0===g?void 0:g.event_variables;if(S&&(0,h.Kn)(S)&&!(0,h.Qr)(S))if((0,h.Kn)(w)&&w.hasOwnProperty("event")){var I=(0,h.Kn)(w.event)?w.event:{};w.event=j(j({},I),S)}else w.event=j({},S);var k=[];w&&JSON.stringify(w,null,2).split("\n").forEach((function(e){k.push(" ".concat(e))}));var C=g&&[["Run ID",null===g||void 0===g?void 0:g.id],["Variables",(0,m.jsx)(s.Z,{language:"json",small:!0,source:k.join("\n")},"variable_value")]],E=g&&(0,m.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,m.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:C.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],o=t[1];return[(0,m.jsx)(a.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,m.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:o},"val_".concat(n))]})),uuid:"LogDetail"})}),T=P&&_;return(0,m.jsxs)(m.Fragment,{children:[T&&(0,m.jsx)(u.Z,{py:p.cd,children:(0,m.jsx)(l.Z,{onClickTab:_,selectedTabUUID:null===P||void 0===P?void 0:P.uuid,tabs:y})}),(!T||Z.uuid===(null===P||void 0===P?void 0:P.uuid))&&(0,m.jsx)(c.Z,j(j({},O),{},{height:n,heightOffset:(t||0)+(T?x:0),pipeline:i})),b.uuid===(null===P||void 0===P?void 0:P.uuid)&&E]})}},58122:function(e,n,t){"use strict";t.d(n,{FS:function(){return c},JZ:function(){return a},e7:function(){return d},wx:function(){return u}});var r=t(75582),i=t(82394),o=t(93348);function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function c(e){return"string"===typeof e?e:JSON.stringify(e)}function u(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 s(s({},e),{},{value:c(n)})}))}function a(e,n){return n===o.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===o.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function d(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),o=t[0],l=t[1],c=l;try{c=JSON.parse(l)}catch(u){}return s(s({},e),{},(0,i.Z)({},o,c))}),{}):e}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return c},U:function(){return s}});var r=t(38626),i=t(23831),o=t(73942),l=t(49125),s=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 ")})),c=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 ")}))},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return a}});t(82684);var r=t(60328),i=t(67971),o=t(86673),l=t(22341),s=t(73899),c=t(49125),u=t(28598),a=22;n.Z=function(e){var n=e.page,t=e.maxPages,a=e.onUpdate,d=e.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(f/2),m=n-h;n+h>=d?(m=d-f+2,f-=2):n-h<=0?(m=0,f-=2):(f-=4,m=n-Math.floor(f/2)),p=Array.from({length:f},(function(e,n){return n+m}))}return(0,u.jsx)(u.Fragment,{children:d>0&&(0,u.jsxs)(i.ZP,{alignItems:"center",children:[(0,u.jsx)(r.Z,{disabled:0===n,onClick:function(){return a(n-1)},children:(0,u.jsx)(l.Hd,{size:1.5*c.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.Z,{ml:1,children:(0,u.jsx)(r.Z,{onClick:function(){return a(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,u.jsx)(o.Z,{ml:1,children:(0,u.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(e){return(0,u.jsx)(o.Z,{ml:1,children:(0,u.jsx)(r.Z,{onClick:function(){e!==n&&a(e)},notClickable:e===n,backgroundColor:e===n&&s.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!p.includes(d-1)&&(0,u.jsxs)(u.Fragment,{children:[!p.includes(d-2)&&(0,u.jsx)(o.Z,{ml:1,children:(0,u.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,u.jsx)(o.Z,{ml:1,children:(0,u.jsx)(r.Z,{onClick:function(){return a(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,u.jsx)(o.Z,{ml:1}),(0,u.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return a(n+1)},children:(0,u.jsx)(l.Kw,{size:1.5*c.iI,stroke:"#AEAEAE"})})]})})}},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(67971),l=t(55378),s=t(86673),c=t(19711),u=t(18025),a=t(49125),d=t(24224),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.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(u.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(s.Z,{mb:2}),(0,p.jsxs)(o.ZP,{alignItems:"center",children:[(0,p.jsx)(c.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(s.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.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)(s.Z,{px:1,children:(0,p.jsx)(c.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.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))}))})]})]})}},22673:function(e,n,t){"use strict";var r=t(82684),i=t(68792),o=t(31811),l=t(38626),s=t(65292),c=t(23831),u=t(2005),a=t(49125),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,h=e.source,m=e.wrapLines,v=(0,r.useContext)(l.ThemeContext);function g(e){var r=e.value;return(0,d.jsx)(o.Z,{customStyle:{backgroundColor:(v.background||c.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:u.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:n,lineNumberStyle:{color:(v.content||c.Z.content).muted},showLineNumbers:p,style:s._4,useInlineStyles:!0,wrapLines:m,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(g,{value:n})}},children:h})}},65730:function(e,n,t){"use strict";var r,i=t(82394),o=(t(82684),t(64866)),l=t(21764),s=t(67971),c=t(10919),u=t(86673),a=t(19711),d=t(46261),p=t(22341),f=t(49125),h=t(28598);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 v(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}!function(e){e.LEFT="left",e.RIGHT="right"}(r||(r={})),n.Z=function(e){var n,t=e.children,i=e.copiedText,m=e.iconPosition,g=void 0===m?r.LEFT:m,j=e.inverted,x=e.linkProps,b=e.linkText,Z=e.monospace,y=e.muted,P=e.small,_=e.toastMessage,O=e.withCopyIcon;return t?n=(0,h.jsx)("span",{children:t}):O&&(n=(0,h.jsx)(c.Z,v(v({href:"#",inline:!0,muted:y,preventDefault:!0,sameColorAsText:!0,small:P},x),{},{children:(0,h.jsxs)(s.ZP,{alignItems:"center",children:[g===r.LEFT&&(0,h.jsx)(u.Z,{mr:b?1:0,children:(0,h.jsx)(s.ZP,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:y,size:2*f.iI})})}),b&&(0,h.jsx)(a.ZP,{inverted:j,monospace:Z,muted:y,small:P,children:b}),g===r.RIGHT&&(0,h.jsx)(u.Z,{ml:b?1:0,children:(0,h.jsx)(s.ZP,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:y})})})]})}))),(0,h.jsx)(d.Z,{block:!0,label:"Copy",size:null,widthFitContent:!0,children:(0,h.jsx)(o.CopyToClipboard,{onCopy:function(){return l.Am.success(_||"Successfully copied to clipboard.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:i})},text:i,children:n})})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var r=t(82684),i=t(60328),o=t(67971),l=t(882),s=t(86673),c=t(19711),u=t(99994),a=t(38626),d=t(49125),p=t(37391),f=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],d.cd*d.iI,d.cd*d.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),p.w5),h=t(66653),m=t(28598);var v=function(e){var n=e.allowScroll,t=e.compact,a=e.contained,p=e.noPadding,v=e.onClickTab,g=e.regularSizeText,j=e.selectedTabUUID,x=e.small,b=e.tabs,Z=(0,r.useMemo)((function(){var e=b.length,n=[];return b.forEach((function(r,a){var p=r.Icon,f=r.IconSelected,b=r.label,Z=r.uuid,y=Z===j,P=y&&f||p,_=b?b():Z,O=(0,m.jsxs)(o.ZP,{alignItems:"center",children:[P&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(P,{default:!y,size:2*d.iI}),(0,m.jsx)(s.Z,{mr:1})]}),(0,m.jsx)(c.ZP,{bold:!0,default:!y,noWrapping:!0,small:!g,children:_})]});a>=1&&e>=2&&n.push((0,m.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(Z))),y?n.push((0,m.jsx)(l.Z,{backgroundGradient:u.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||x,onClick:function(e){(0,h.j)(e),v(r)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:x,children:O},Z)):n.push((0,m.jsx)("div",{style:{padding:2},children:(0,m.jsx)(i.Z,{borderLess:!0,compact:t||x,default:!0,onClick:function(e){(0,h.j)(e),v(r)},outline:!0,small:x,children:O})},"button-tab-".concat(Z)))})),n}),[t,v,j,x,b]),y=(0,m.jsx)(o.ZP,{alignItems:"center",children:Z});return a?y:(0,m.jsx)(f,{allowScroll:n,noPadding:p,children:y})}},70422:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return We}});var r,i=t(75582),o=t(77837),l=t(82394),s=t(38860),c=t.n(s),u=t(82684),a=t(83455),d=t(34376),p=t(60328),f=t(65730),h=t(34744),m=t(67971),v=t(87372),g=t(10919),j=t(51099),x=t(60547),b=t(97496),Z=t(47409),y=t(93348),P=t(52769),_=t(55378),O=t(86673),w=t(54283),S=t(87815),I=t(55264),k=t(19711),C=t(46261),E=t(82531),T=t(56681),D=t(2850),M=t(86422),N=t(22341),A=t(49125),U=t(59920),R=t(24224);!function(e){e.AWS="aws_event"}(r||(r={}));var H=[{label:function(){return"AWS"},uuid:r.AWS}],L=(0,R.HK)(H,(function(e){return e.uuid})),F=t(58122),W=t(19395),z=t(25958),q=t(33766),X=t(7715),B=t(9736),K=t(96510),V=t(66653),Y=t(59e3),J=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 Q(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,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var $=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,l=e.setErrors,s=e.variables,c=(0,d.useRouter)(),H=(0,B.Ct)(),G=(r||{}).uuid,$=o||{},ee=$.id,ne=$.event_matchers,te=$.name,re=$.schedule_interval,ie=$.schedule_type,oe=$.settings,le=$.sla,se=$.start_time,ce=$.status,ue=$.tags,ae=$.variables,de=void 0===ae?{}:ae,pe=(0,Y.iV)(),fe={_limit:30,_offset:30*(null!==pe&&void 0!==pe&&pe.page?pe.page:0)};null!==pe&&void 0!==pe&&pe.status&&(fe.status=pe.status),null!==o&&void 0!==o&&o.global_data_product_uuid&&(fe.global_data_product_uuid=null===o||void 0===o?void 0:o.global_data_product_uuid);var he=E.ZP.pipeline_runs.pipeline_schedules.list(ee,fe,{refreshInterval:3e3,revalidateOnFocus:!0}),me=he.data,ve=he.mutate,ge=(0,u.useMemo)((function(){return(null===me||void 0===me?void 0:me.pipeline_runs)||[]}),[me]),je=(0,u.useMemo)((function(){var e;return(null===me||void 0===me||null===(e=me.metadata)||void 0===e?void 0:e.count)||[]}),[me]),xe=(0,u.useState)(null),be=xe[0],Ze=xe[1],ye=(0,u.useMemo)((function(){var e=null!==pe&&void 0!==pe&&pe.page?pe.page:0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(b.Z,{fetchPipelineRuns:ve,onClickRow:function(e){return Ze((function(n){var t=ge[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:ge,selectedRun:be,setErrors:l}),(0,J.jsx)(O.Z,{p:2,children:(0,J.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),t=Q(Q({},pe),{},{page:n>=0?n:0});c.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(G,"/triggers/").concat(ee,"?").concat((0,Y.uM)(t)))},page:Number(e),totalPages:Math.ceil(je/30)})})]})}),[ve,ge,ee,G,pe,c,be,l,je]),Pe=(0,u.useState)(T.G7[0]),_e=Pe[0],Oe=Pe[1],we=(0,a.Db)((function(e){return E.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,X.gR)(e,["id"])})}),{onSuccess:function(e){return(0,K.wD)(e,{callback:function(){t()},onErrorCallback:function(e,n){return l({errors:n,response:e})}})}}),Se=(0,i.Z)(we,2),Ie=Se[0],ke=Se[1].isLoading,Ce=E.ZP.pipeline_triggers.pipelines.list(G),Ee=Ce.data,Te=Ce.mutate,De=(0,u.useMemo)((function(){return(0,R.HK)((null===Ee||void 0===Ee?void 0:Ee.pipeline_triggers)||[],(function(e){return e.name}))}),[Ee]),Me=(0,u.useMemo)((function(){return!(null===De||void 0===De||!De[null===o||void 0===o?void 0:o.name])}),[o,De]),Ne=(0,a.Db)(E.ZP.pipeline_triggers.pipelines.useCreate(G),{onSuccess:function(e){return(0,K.wD)(e,{callback:function(){Te()},onErrorCallback:function(e,n){return l({errors:n,response:e})}})}}),Ae=(0,i.Z)(Ne,2),Ue=Ae[0],Re=Ae[1].isLoading,He=(0,u.useMemo)((function(){return y.fq.ACTIVE===ce}),[ce]),Le=(0,u.useMemo)((function(){var e,n,t={default:!0,size:1.5*A.iI},r=[[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.VW,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:null===(e=y.Z4[ie])||void 0===e?void 0:e.call(y.Z4)},"trigger_type")],[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.rs,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,J.jsx)(k.ZP,{danger:!He,monospace:!0,success:He,children:ce},"trigger_status")]];if(le){var i=(0,W.gU)(le),l=i.time,s=i.unit,c=1===l?s:"".concat(s,"s");r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.kI,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:"".concat(l," ").concat(c)},"trigger_sla")])}if(re&&r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.Pf,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:re.replace("@","")},"trigger_frequency")]),se&&r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.aw,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:se},"trigger_start_date")]),y.Xm.API===ie){var u=(0,W.M8)(o);r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.Ae,Q({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"API endpoint"})]},"trigger_api_endpoint_label"),(0,J.jsx)(f.Z,{copiedText:u,children:(0,J.jsx)(k.ZP,{monospace:!0,small:!0,children:u})},"trigger_api_endpoint")])}null!==oe&&void 0!==oe&&oe.skip_if_previous_running&&r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(C.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:1.5*A.iI,widthFitContent:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,J.jsx)(k.ZP,{monospace:!0,children:null===(n=oe.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);return null!==oe&&void 0!==oe&&oe.allow_blocks_to_fail&&r.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(C.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:1.5*A.iI,widthFitContent:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,J.jsx)(k.ZP,{monospace:!0,children:oe.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:r})}),[He,o,re,ie,oe,le,se,ce]),Fe=(0,u.useMemo)((function(){return de||{}}),[de]),We=(0,u.useMemo)((function(){var e,n=[];return(0,X.Qr)(Fe)?n=(0,F.wx)(s,(function(e){return e.uuid===P.C})):Object.entries(Fe).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],o=t[1];Z.sZ!==r&&n.push({uuid:r,value:(0,F.FS)(o)})})),"undefined"!==typeof(n=(0,F.JZ)(n||[],ie))&&null!==(e=n)&&void 0!==e&&e.length?(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:n},"settings_variable_label_".concat(n)),(0,J.jsx)(k.ZP,{monospace:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[ie,Fe,s]),ze=(0,u.useMemo)((function(){var e,n,t=[],i=null===Fe||void 0===Fe||null===(e=Fe[Z.sZ])||void 0===e?void 0:e.blocks;return null===r||void 0===r||null===(n=r.blocks)||void 0===n||n.forEach((function(e){var n=e.type,r=e.uuid;if(M.tf.DBT===n){var o,l=(null===i||void 0===i||null===(o=i[r])||void 0===o?void 0:o.configuration)||{},s=l.flags,c=l.prefix,u=l.suffix,a=(0,z.IU)(e).name;(s||c||u)&&t.push({flags:s,prefix:c,suffix:u,uuid:a})}})),"undefined"!==typeof t&&null!==t&&void 0!==t&&t.length?(0,J.jsx)(S.Z,{columnFlex:[1,null],rows:t.map((function(e){var n=e.flags,t=e.prefix,r=e.suffix,i=e.uuid;return[(0,J.jsxs)(k.ZP,{monospace:!0,small:!0,children:[t&&(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:t}),i,r&&(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:r})]},"settings_variable_label_".concat(i)),(0,J.jsx)(k.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(i))]}))}):null}),[r,Fe]),qe=(0,u.useMemo)((function(){return(0,J.jsx)(S.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===ne||void 0===ne?void 0:ne.map((function(e,n){var t=e.event_type,r=e.name;return[(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:L[t].label()},"".concat(t,"_").concat(n,"_label")),(0,J.jsx)(k.ZP,{monospace:!0,children:r},"".concat(t,"_").concat(n,"_name"))]}))})}),[ne]);return(0,J.jsxs)(x.Z,{afterHidden:!be,before:(0,J.jsxs)(D.M,{children:[(0,J.jsxs)(O.Z,{mb:A.HN,pt:A.cd,px:A.cd,children:[(0,J.jsxs)(O.Z,{mb:A.cd,children:[y.Xm.TIME===ie&&(0,J.jsx)(N.kO,{size:5*A.iI}),y.Xm.EVENT===ie&&(0,J.jsx)(N.Jp,{size:5*A.iI}),y.Xm.API===ie&&(0,J.jsx)(N.Bf,{size:5*A.iI}),!ie&&(0,J.jsx)(N.VW,{size:5*A.iI})]}),(0,J.jsx)(v.Z,{children:te})]}),(0,J.jsx)(O.Z,{px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"Settings"})}),(0,J.jsx)(h.Z,{light:!0,mt:1,short:!0}),Le,(null===ne||void 0===ne?void 0:ne.length)>=1&&(0,J.jsxs)(O.Z,{my:A.HN,children:[(0,J.jsx)(O.Z,{px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"Events"})}),(0,J.jsx)(h.Z,{light:!0,mt:1,short:!0}),qe]}),We&&(0,J.jsxs)(O.Z,{my:A.HN,children:[(0,J.jsx)(O.Z,{px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"Runtime variables"})}),(0,J.jsx)(h.Z,{light:!0,mt:1,short:!0}),We]}),ze&&(0,J.jsxs)(O.Z,{my:A.HN,children:[(0,J.jsx)(O.Z,{px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"dbt runtime settings"})}),(0,J.jsx)(h.Z,{light:!0,mt:1,short:!0}),ze]}),(null===ue||void 0===ue?void 0:ue.length)>=1&&(0,J.jsxs)(O.Z,{my:A.HN,children:[(0,J.jsx)(O.Z,{px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"Tags"})}),(0,J.jsx)(h.Z,{light:!0,mt:1,short:!0}),(0,J.jsx)(O.Z,{mt:A.cd,px:A.cd,children:(0,J.jsx)(I.Z,{tags:null===ue||void 0===ue?void 0:ue.map((function(e){return{uuid:e}}))})})]}),(0,J.jsx)(O.Z,{my:A.HN,children:(0,J.jsxs)(O.Z,{px:A.cd,children:[(0,J.jsxs)(v.Z,{level:5,children:[Me&&"Trigger exists in code",!Me&&"Store trigger in code"]}),(0,J.jsx)(O.Z,{mt:1,children:(0,J.jsxs)(k.ZP,{default:!0,children:["Save or update the trigger and its settings in the pipeline\u2019s metadata and version control the trigger using Git. For more information, please read the ",(0,J.jsx)(g.Z,{href:"https://docs.mage.ai/guides/triggers/configure-triggers-in-code",openNewWindow:!0,children:"documentation"}),"."]})}),(0,J.jsxs)(O.Z,{mt:A.cd,children:[!Ee&&(0,J.jsx)(w.Z,{inverted:!0}),Ee&&(0,J.jsxs)(p.Z,{disabled:!(null!==o&&void 0!==o&&o.id),loading:Re,onClick:function(){Ue({pipeline_trigger:{pipeline_schedule_id:null===o||void 0===o?void 0:o.id}})},secondary:!0,children:[Me&&"Update trigger in code",!Me&&"Save trigger in code"]})]})]})})]}),beforeWidth:D.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(G,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return te},linkProps:{as:"/pipelines/".concat(G,"/triggers/").concat(ee),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,T.ZP)(Q(Q({},e),{},{selectedRun:be,selectedTab:_e,setSelectedTab:Oe}))},errors:n,pageName:U.M.TRIGGERS,pipeline:r,setErrors:l,subheader:(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(p.Z,{beforeIcon:He?(0,J.jsx)(N.dz,{size:2*A.iI}):(0,J.jsx)(N.Py,{inverted:!H,size:2*A.iI}),danger:He&&!H,loading:ke,onClick:function(e){(0,V.j)(e),Ie({id:ee,status:He?y.fq.INACTIVE:y.fq.ACTIVE})},outline:!0,success:!He&&!H,children:He?"Pause trigger":"Start trigger"}),(0,J.jsx)(O.Z,{mr:A.cd}),!H&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(G,"/triggers/").concat(ee,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,J.jsx)(O.Z,{mr:A.cd})]}),(0,J.jsxs)(_.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?c.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(G,"/triggers/").concat(ee)):(0,q.u7)({page:0,status:e.target.value})},paddingRight:4*A.iI,placeholder:"Select run status",value:(null===pe||void 0===pe?void 0:pe.status)||"all",children:[(0,J.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Z.IK.map((function(e){return(0,J.jsx)("option",{value:e,children:Z.Do[e]},e)}))]})]}),title:function(){return te},uuid:"triggers/detail",children:[(0,J.jsx)(O.Z,{mt:A.cd,px:A.cd,children:(0,J.jsx)(v.Z,{level:5,children:"Runs for this trigger"})}),(0,J.jsx)(h.Z,{light:!0,mt:A.cd,short:!0}),ye]})},ee=t(21831),ne=t(92083),te=t.n(ne),re=t(21764),ie=t(2713),oe=t(38341),le=t(47999),se=t(22673),ce=t(38626),ue=t(16634),ae=t(82944),de=t(44162);function pe(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 fe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pe(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var he=function(e){var n=e.blocks,t=e.updateVariables,r=e.variables,i=(0,u.useContext)(ce.ThemeContext),o=(0,u.useCallback)((function(e,n){return t((function(){var t=(null===r||void 0===r?void 0:r.__mage_variables)||{},i=(null===t||void 0===t?void 0:t.blocks)||{},o=i[e]||{},s=(null===o||void 0===o?void 0:o.configuration)||{};return fe(fe({},r),{},{__mage_variables:fe(fe({},t),{},{blocks:fe(fe({},i),{},(0,l.Z)({},e,fe(fe({},o),{},{configuration:fe(fe({},s),n)})))})})}))}),[t,r]);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(v.Z,{children:"dbt runtime settings"}),(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(S.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,l,s=e.type,c=e.uuid,u=(0,z.IU)(e).name,a=(0,de.qn)(s,{blockColor:e.color,theme:i}).accent,d=null===r||void 0===r||null===(n=r.__mage_variables)||void 0===n||null===(t=n.blocks)||void 0===t||null===(l=t[c])||void 0===l?void 0:l.configuration,p=d||{},f=p.prefix,h=p.suffix,v=(null===d||void 0===d?void 0:d.flags)||[],g=!(null===v||void 0===v||!v.includes(z.Dy));return[(0,J.jsx)(C.Z,{block:!0,label:(0,J.jsx)(k.ZP,{monospace:!0,small:!0,children:c}),size:null,widthFitContent:!0,children:(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(ue.Z,{color:a,size:1.5*A.iI,square:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsxs)(k.ZP,{monospace:!0,small:!0,children:[f&&(0,J.jsx)(k.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:f}),u,h&&(0,J.jsx)(k.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:h})]})]})},"uuid-".concat(c)),(0,J.jsx)(m.ZP,{alignItems:"center",children:(0,J.jsx)(oe.Z,{checked:g,label:z.Dy,monospace:!0,onClick:function(){return o(c,{flags:g?(0,R.Od)(v,(function(e){return z.Dy===e})):v.concat(z.Dy)})},small:!0})},"flags-".concat(c)),(0,J.jsx)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){return o(c,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:f,width:10*A.iI},"prefix-".concat(c)),(0,J.jsx)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){return o(c,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:h,width:10*A.iI},"suffix-".concat(c))]}))})})]})},me=t(93461),ve=t(26304),ge=t(23831),je=t(2005),xe=t(31012),be=["children","large","lineHeight","ordered"];function Ze(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 ye(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ze(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ze(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Pe=(0,ce.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||ge.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||ge.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||ge.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(je.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(je.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(xe.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(xe.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(xe.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),_e=ce.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],Pe),Oe=ce.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],Pe),we=ce.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*A.iI,"px;\n ")}));var Se=function(e){var n=e.children,t=e.large,r=e.lineHeight,i=e.ordered,o=(0,ve.Z)(e,be),l=i?Oe:_e;return(0,J.jsx)(l,ye(ye({large:t,lineHeight:r},o),{},{children:u.Children.map(n,(function(e,n){var r;return(0,J.jsx)(we,ye(ye({large:t,marginTop:n>=1},o),{},{children:u.cloneElement(e)}),(null===(r=e.props)||void 0===r?void 0:r.key)||n)}))}))},Ie=t(98781),ke=t(18190),Ce=t(70902),Ee=t(18025),Te=t(90211);function De(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 Me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?De(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):De(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ne=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:y.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:y.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:y.Xm.API}];return e?n.slice(0,1):n};var Ae=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,s=e.setErrors,c=e.variables,j=(0,d.useRouter)(),b=null===r||void 0===r?void 0:r.uuid,w=null===o||void 0===o?void 0:o.id,I=(null===r||void 0===r?void 0:r.type)===Ie.qL.STREAMING,C=(0,u.useState)([]),T=C[0],D=C[1],L=(0,u.useState)(!1),z=L[0],q=L[1],B=(0,u.useState)(!1),V=B[0],Y=B[1],G=(0,u.useState)(),Q=G[0],$=G[1],ne=(0,u.useState)({}),ce=ne[0],ue=ne[1],de=(0,u.useState)(null),pe=de[0],fe=de[1],ve=(0,u.useState)(!1),ge=ve[0],je=ve[1],xe=(0,u.useState)(null),be=xe[0],Ze=xe[1],ye=(0,u.useMemo)((function(){return(0,F.wx)(c,(function(e){return e.uuid===P.C}))}),[c]),Pe=pe||{},_e=Pe.name,Oe=Pe.schedule_interval,we=Pe.schedule_type,De=Pe.settings,Ae=void 0===De?{}:De,Ue=(Pe.sla,Pe.start_time),Re=Pe.tags,He=Pe.variables,Le=void 0===He?{}:He;(0,u.useEffect)((function(){Ae&&$(Ae)}),[Ae]);var Fe=(0,u.useState)(null),We=Fe[0],ze=Fe[1],qe=(0,u.useState)({hour:"00",minute:"00"}),Xe=qe[0],Be=qe[1],Ke=(0,u.useState)({dayOfMonth:null,dayOfWeek:null,hour:null,minute:null,second:null}),Ve=Ke[0],Ye=Ke[1],Je=E.ZP.event_rules.detail(y.Xm.EVENT===we?"aws":null).data,Ge=(0,u.useMemo)((function(){var e;return(null===Je||void 0===Je||null===(e=Je.event_rule)||void 0===e?void 0:e.rules)||[]}),[Je]),Qe=(0,u.useMemo)((function(){return(0,R.HK)(Ge,(function(e){return e.name}))}),[Ge]),$e=(0,a.Db)(E.ZP.pipeline_schedules.useUpdate(w),{onSuccess:function(e){return(0,K.wD)(e,{callback:function(){t(),j.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(b,"/triggers/").concat(w))},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),en=(0,i.Z)($e,2),nn=en[0],tn=en[1].isLoading,rn=(0,u.useMemo)((function(){return Le||{}}),[Le]);(0,u.useEffect)((function(){if(Ue){var e=Ue.split(" ")[1];ze((0,W.eI)(Ue)),Be({hour:e.substring(0,2),minute:e.substring(3,5)});var n=te()(Ue).utc();Ye({dayOfMonth:n.date(),dayOfWeek:n.day(),hour:n.hours(),minute:n.minutes(),second:n.seconds()})}else{var t=new Date;ze(t),Be({hour:String(t.getUTCHours()).padStart(2,"0"),minute:String(t.getUTCMinutes()).padStart(2,"0")})}}),[Ue]),(0,u.useEffect)((function(){rn&&Object.keys(rn).length>0&&q(!0)}),[rn]),(0,u.useEffect)((function(){ue(z?null===ye||void 0===ye?void 0:ye.reduce((function(e,n){var t=n.uuid,r=n.value;return Me(Me({},e),{},(0,l.Z)({},t,rn[t]||r))}),{}):null)}),[ye,z,rn]);var on=(0,u.useMemo)((function(){return Oe&&!Object.values(y.U5).includes(Oe)}),[Oe]);(0,u.useEffect)((function(){if(o&&!pe){D(o.event_matchers),(null===o||void 0===o?void 0:o.schedule_interval)&&!Object.values(y.U5).includes(null===o||void 0===o?void 0:o.schedule_interval)?(Ze(null===o||void 0===o?void 0:o.schedule_interval),fe(Me(Me({},o),{},{schedule_interval:"custom"}))):fe(I?Me(Me({},o),{},{schedule_interval:y.U5.ONCE}):o);var e=o.sla;if(e){Y(!0);var n=(0,W.gU)(e),t=n.time,r=n.unit;fe((function(e){return Me(Me({},e),{},{slaAmount:t,slaUnit:r})}))}}}),[I,o,pe,Oe]);var ln=(0,u.useMemo)((function(){return!(null===Q||void 0===Q||!Q.landing_time_enabled)}),[Q]),sn=(0,u.useMemo)((function(){return y.Xm.TIME!==we||![y.U5.DAILY,y.U5.HOURLY,y.U5.MONTHLY,y.U5.WEEKLY].includes(Oe)}),[Oe,we]),cn=(0,u.useMemo)((function(){return ln&&!sn}),[sn,ln]),un=(0,u.useCallback)((function(){var e=Me(Me({},(0,X.GL)(pe,["name","schedule_type","tags"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,F.e7)(ce)});if(cn){var n=Ve.dayOfMonth,t=Ve.dayOfWeek,r=Ve.hour,i=Ve.minute,l=Ve.second,s=te()("2023-07-01").utc();(0,Te.HW)(n)&&(s=s.date(n)),(0,Te.HW)(t)&&(s=s.day(t)),(0,Te.HW)(r)&&(s=s.hours(r)),(0,Te.HW)(i)&&(s=s.minutes(i)),(0,Te.HW)(l)&&(s=s.seconds(l)),e.schedule_interval=on?be:pe.schedule_interval,e.start_time=s.toISOString()}else y.Xm.EVENT===pe.schedule_type?e.event_matchers=T:(e.schedule_interval=on?be:pe.schedule_interval,e.start_time=We&&null!==Xe&&void 0!==Xe&&Xe.hour&&null!==Xe&&void 0!==Xe&&Xe.minute?"".concat(We.toISOString().split("T")[0]," ").concat(null===Xe||void 0===Xe?void 0:Xe.hour,":").concat(null===Xe||void 0===Xe?void 0:Xe.minute,":00"):null);if(V){var c=null===pe||void 0===pe?void 0:pe.slaAmount,u=null===pe||void 0===pe?void 0:pe.slaUnit;if(!c||isNaN(c)||!u)return void re.Am.error("Please enter a valid SLA",{position:re.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,W.vJ)(c,u)}else null!==o&&void 0!==o&&o.sla&&(e.sla=0);e.settings=Q,nn({pipeline_schedule:e})}),[be,We,V,T,on,Ve,o,ce,pe,Q,cn,Xe,nn]),an=(0,u.useMemo)((function(){if(null===o||void 0===o||!o.runtime_average)return"Trigger doesn\u2019t have enough history to estimate runtime.";var e=Number(null===o||void 0===o?void 0:o.runtime_average),n=Math.max(Math.floor(e/3600),0),t=Math.max(Math.floor((e-60*n*60)/60),0),r=Math.max(Math.floor(e-(60*n*60+60*t)),0),i=[];return n>=1&&i.push((0,Te._6)("hour",n,!0)),t>=1&&i.push((0,Te._6)("minute",t,!0)),r>=1&&i.push((0,Te._6)("second",r,!0)),i.join(" ")}),[o]),dn=(0,u.useMemo)((function(){if(!cn)return null;var e=[(0,J.jsxs)(O.Z,{mr:1,children:[(0,J.jsx)(O.Z,{mb:1,children:(0,J.jsx)(k.ZP,{bold:!0,default:!0,small:!0,children:"Minute"})}),(0,J.jsxs)(_.Z,{compact:!0,monospace:!0,onChange:function(e){Ye((function(n){return Me(Me({},n),{},{minute:e.target.value})}))},value:(null===Ve||void 0===Ve?void 0:Ve.minute)||"",children:[(0,J.jsx)("option",{value:""}),(0,R.w6)(60).map((function(e,n){return(0,J.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Minute"),(0,J.jsxs)(O.Z,{mr:1,children:[(0,J.jsx)(O.Z,{mb:1,children:(0,J.jsx)(k.ZP,{bold:!0,default:!0,small:!0,children:"Second"})}),(0,J.jsxs)(_.Z,{compact:!0,monospace:!0,onChange:function(e){Ye((function(n){return Me(Me({},n),{},{second:e.target.value})}))},value:(null===Ve||void 0===Ve?void 0:Ve.second)||"",children:[(0,J.jsx)("option",{value:""}),(0,R.w6)(60).map((function(e,n){return(0,J.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Second")];return[y.U5.DAILY,y.U5.MONTHLY,y.U5.WEEKLY].includes(Oe)&&e.unshift((0,J.jsxs)(O.Z,{mr:1,children:[(0,J.jsx)(O.Z,{mb:1,children:(0,J.jsx)(k.ZP,{bold:!0,default:!0,small:!0,children:"Hour"})}),(0,J.jsxs)(_.Z,{compact:!0,monospace:!0,onChange:function(e){Ye((function(n){return Me(Me({},n),{},{hour:e.target.value})}))},value:(null===Ve||void 0===Ve?void 0:Ve.hour)||"",children:[(0,J.jsx)("option",{value:""}),(0,R.w6)(24).map((function(e,n){return(0,J.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Hour")),y.U5.WEEKLY===Oe?e.unshift((0,J.jsxs)(O.Z,{mr:1,children:[(0,J.jsx)(O.Z,{mb:1,children:(0,J.jsx)(k.ZP,{bold:!0,default:!0,small:!0,children:"Day of the week"})}),(0,J.jsxs)(_.Z,{compact:!0,monospace:!0,onChange:function(e){Ye((function(n){return Me(Me({},n),{},{dayOfWeek:e.target.value})}))},value:(null===Ve||void 0===Ve?void 0:Ve.dayOfWeek)||"",children:[(0,J.jsx)("option",{value:""}),(0,J.jsx)("option",{value:6,children:"Sunday"}),(0,J.jsx)("option",{value:0,children:"Monday"}),(0,J.jsx)("option",{value:1,children:"Tuesday"}),(0,J.jsx)("option",{value:2,children:"Wednesday"}),(0,J.jsx)("option",{value:3,children:"Thursday"}),(0,J.jsx)("option",{value:4,children:"Friday"}),(0,J.jsx)("option",{value:5,children:"Saturday"})]})]},"Day of the week")):y.U5.MONTHLY===Oe&&e.unshift((0,J.jsxs)(O.Z,{mr:1,children:[(0,J.jsx)(O.Z,{mb:1,children:(0,J.jsx)(k.ZP,{bold:!0,default:!0,small:!0,children:"Day of the month"})}),(0,J.jsxs)(_.Z,{compact:!0,monospace:!0,onChange:function(e){Ye((function(n){return Me(Me({},n),{},{dayOfMonth:e.target.value})}))},value:(null===Ve||void 0===Ve?void 0:Ve.dayOfMonth)||"",children:[(0,J.jsx)("option",{value:""}),(0,R.w6)(31).map((function(e,n){return(0,J.jsx)("option",{value:n+1,children:n+1>=10?String(n+1):"0".concat(n+1)},n+1)}))]})]},"Day of the month")),(0,J.jsx)(m.ZP,{children:e})}),[Ve,Oe,cn]),pn=(0,u.useMemo)((function(){var e=[[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.KJ,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_detail"),(0,J.jsx)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault(),fe((function(n){return Me(Me({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_e},"trigger_name_input_detail")],[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.Pf,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,J.jsxs)("div",{children:[(0,J.jsxs)(_.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;fe((function(e){return Me(Me({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:Oe,children:[Object.values(y.U5).map((function(e){return(0,J.jsx)("option",{value:e,children:e.substring(1)},e)})),(0,J.jsx)("option",{value:"custom",children:"custom"},"custom")]}),(0,J.jsx)(O.Z,{mt:1,p:1,children:(0,J.jsxs)(k.ZP,{muted:!0,small:!0,children:["If you don\u2019t see the frequency option you need, select ",(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")]];return e.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.rs,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Enable landing time"})]},"frequency"),(0,J.jsxs)("div",{children:[(0,J.jsx)(Ce.Z,{checked:ln,disabled:sn,onCheck:function(){$((function(e){return Me(Me({},e),{},{landing_time_enabled:!ln})}))}}),(0,J.jsxs)(O.Z,{mt:1,p:1,children:[sn&&(0,J.jsxs)(k.ZP,{muted:!0,small:!0,children:["In order to enable landing time, the trigger\u2019s frequency must be ",(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,small:!0,children:y.U5.HOURLY}),", ",(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,small:!0,children:y.U5.DAILY}),", ",(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,small:!0,children:y.U5.WEEKLY}),", or ",(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,small:!0,children:y.U5.MONTHLY}),"."]}),!sn&&(0,J.jsx)(k.ZP,{muted:!0,small:!0,children:"Instead of starting at a specific time, this trigger will schedule pipeline runs at a time where it will finish by the specified time below."})]})]},"frequency_input")]),cn&&e.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.Pf,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Average runtime"})]},"runtime_average"),(0,J.jsx)(m.ZP,{alignItems:"center",style:{minHeight:"".concat(5.75*A.iI,"px")},children:(0,J.jsx)(k.ZP,{monospace:!0,children:an})},"runtime_average_value")]),e.push([(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.aw,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsxs)(k.ZP,{default:!0,children:[cn&&"Pipeline complete by",!cn&&"Start date and time"]})]},"start_time"),cn?dn:(0,J.jsxs)("div",{style:{minHeight:"".concat(5.75*A.iI,"px")},children:[!ge&&(0,J.jsx)(ae.Z,{monospace:!0,onClick:function(){return je((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:We?"".concat(We.toISOString().split("T")[0]," ").concat(null===Xe||void 0===Xe?void 0:Xe.hour,":").concat(null===Xe||void 0===Xe?void 0:Xe.minute):""}),(0,J.jsx)("div",{style:{width:"400px"},children:(0,J.jsx)(le.Z,{disableEscape:!0,onClickOutside:function(){return je(!1)},open:ge,style:{position:"relative"},children:(0,J.jsx)(ie.Z,{selectedDate:We,selectedTime:Xe,setSelectedDate:ze,setSelectedTime:Be,topPosition:!0})})})]},"start_time_input")]),I&&e.splice(1,1),on&&e.splice(2,0,[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.EK,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,J.jsxs)("div",{children:[(0,J.jsx)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Ze(e.target.value)},placeholder:"* * * * *",value:be}),(0,J.jsxs)(O.Z,{mt:1,p:1,children:[(0,J.jsxs)(k.ZP,{muted:!0,small:!0,children:["If you want this pipeline to trigger every 1 minute, the CRON syntax is ",(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,small:!0,children:"*/1 * * * *"}),"."]}),(0,J.jsxs)(k.ZP,{muted:!0,small:!0,children:["For more CRON syntax examples, check out this ",(0,J.jsx)(g.Z,{href:"https://crontab.guru/",openNewWindow:!0,small:!0,children:"resource"}),"."]})]})]},"cron_expression_input")]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:2,px:A.cd,children:(0,J.jsx)(v.Z,{children:"Settings"})}),(0,J.jsx)(h.Z,{light:!0,short:!0}),(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:e})]})}),[be,We,on,I,sn,ln,dn,_e,an,Oe,ge,cn,Xe]),fn=(0,u.useCallback)((function(e,n){D((function(t){return Object.entries(n).forEach((function(n){var r=(0,i.Z)(n,2),o=r[0],l=r[1];t[e][o]=l})),(0,ee.Z)(t)}))}),[D]),hn=(0,u.useMemo)((function(){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:A.cd,px:A.cd,children:(0,J.jsx)(v.Z,{children:"Settings"})}),(0,J.jsx)(h.Z,{light:!0,short:!0}),(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.KJ,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_event"),(0,J.jsx)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault(),fe((function(n){return Me(Me({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_e},"trigger_name_input_event")]]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:A.cd,children:[(0,J.jsx)(v.Z,{children:"Events"}),(0,J.jsxs)(k.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,J.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,J.jsxs)(O.Z,{mt:A.Mq,children:[(0,J.jsx)(k.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,J.jsxs)(k.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,J.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,J.jsx)(g.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,J.jsx)(O.Z,{mt:1,children:(0,J.jsxs)(Se,{monospace:!0,ordered:!0,children:[(0,J.jsx)(k.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,J.jsx)(k.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,J.jsx)(k.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,J.jsx)(h.Z,{light:!0,short:!0}),(null===T||void 0===T?void 0:T.length)>=1&&(0,J.jsx)(S.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===T||void 0===T?void 0:T.map((function(e,n){var t=e.event_type,r=e.name,i=e.pattern,o=e.id||"".concat(t,"-").concat(r,"-").concat(n,"-").concat(JSON.stringify(i)),l=[];return i&&JSON.stringify(i,null,2).split("\n").forEach((function(e){l.push(" ".concat(e))})),[(0,J.jsx)(_.Z,{monospace:!0,onChange:function(e){return fn(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:H.map((function(e){var n=e.label,t=e.uuid;return(0,J.jsx)("option",{value:t,children:n()},t)}))},"event-provider-".concat(o)),(0,J.jsx)(_.Z,{monospace:!0,onChange:function(e){var t,r=e.target.value,i=null===(t=Qe[r])||void 0===t?void 0:t.event_pattern;fn(n,{name:r,pattern:i?JSON.parse(i):null})},placeholder:"Event name",value:r,children:Ge.map((function(e){var n=e.name;return(0,J.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(o)),i&&(0,J.jsx)(se.Z,{language:"json",small:!0,source:l.join("\n")}),(0,J.jsx)(p.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return D((function(e){return(0,R.oM)(e,n)}))},children:(0,J.jsx)(N.rF,{default:!0,size:2*A.iI})},"remove_event")]}))}),(0,J.jsx)(O.Z,{p:A.cd,children:(0,J.jsx)(p.Z,{beforeIcon:(0,J.jsx)(N.mm,{size:2*A.iI}),onClick:function(){return D((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[T,Ge,Qe,_e,fn]),mn=(0,u.useMemo)((function(){var e=(0,W.M8)(o);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:A.cd,px:A.cd,children:(0,J.jsx)(v.Z,{children:"Settings"})}),(0,J.jsx)(h.Z,{light:!0,short:!0}),(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.KJ,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_api"),(0,J.jsx)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault(),fe((function(n){return Me(Me({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_e},"trigger_name_input_api")]]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:A.cd,children:[(0,J.jsx)(v.Z,{children:"Endpoint"}),(0,J.jsxs)(k.ZP,{muted:!0,children:["Make a ",(0,J.jsx)(k.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(f.Z,{copiedText:e,linkText:e,monospace:!0,withCopyIcon:!0})})]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:A.cd,children:[(0,J.jsx)(v.Z,{children:"Payload"}),(0,J.jsx)(k.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(f.Z,{copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',withCopyIcon:!0,children:(0,J.jsx)(se.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:A.cd,children:[(0,J.jsx)(v.Z,{children:"Sample cURL command"}),(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(se.Z,{language:"bash",small:!0,source:"\n curl -X POST ".concat(e,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[_e,o]),vn=!we||y.Xm.TIME===we&&!(I&&We||!I&&We&&Oe)||y.Xm.EVENT===we&&(!(null!==T&&void 0!==T&&T.length)||!T.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),gn=(0,u.useMemo)((function(){var e;return(null===r||void 0===r||null===(e=r.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return M.tf.DBT===n})))||[]}),[r]),jn=(0,u.useMemo)((function(){return(0,J.jsxs)(O.Z,{p:A.cd,children:[(0,J.jsxs)(O.Z,{mb:A.HN,children:[(0,J.jsx)(v.Z,{children:"Pipeline run settings"}),(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(m.ZP,{alignItems:"center",children:(0,J.jsx)(oe.Z,{checked:null===Q||void 0===Q?void 0:Q.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return $((function(e){return Me(Me({},e),{},{allow_blocks_to_fail:!(null!==Q&&void 0!==Q&&Q.allow_blocks_to_fail)})}))}})})}),y.Xm.TIME===we&&(0,J.jsx)(O.Z,{mt:A.Mq,children:(0,J.jsx)(m.ZP,{alignItems:"center",children:(0,J.jsx)(oe.Z,{checked:null===Q||void 0===Q?void 0:Q.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return $((function(e){return Me(Me({},e),{},{skip_if_previous_running:!(null!==Q&&void 0!==Q&&Q.skip_if_previous_running)})}))}})})}),(0,J.jsxs)(O.Z,{mt:A.Mq,children:[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(O.Z,{mr:2,children:(0,J.jsx)(Ce.Z,{checked:V,onCheck:function(e){Y(e),e||fe((function(e){return Me(Me({},e),{},{slaAmount:0})}))}})}),(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),V&&(0,J.jsx)(S.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(N.aw,{default:!0,size:1.5*A.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,J.jsxs)(m.ZP,{children:[(0,J.jsx)(me.Z,{flex:1,children:(0,J.jsx)(ae.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),fe((function(n){return Me(Me({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===pe||void 0===pe?void 0:pe.slaAmount})}),(0,J.jsx)(me.Z,{flex:1,children:(0,J.jsx)(_.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),fe((function(n){return Me(Me({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===pe||void 0===pe?void 0:pe.slaUnit,children:Object.keys(W.tL).map((function(e){return(0,J.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]})]}),(0,J.jsxs)(O.Z,{mb:A.HN,children:[(0,J.jsx)(v.Z,{children:"Runtime variables"}),!(0,X.Qr)(ye)&&(0,J.jsxs)(O.Z,{mt:A.Mq,children:[(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(O.Z,{mr:2,children:(0,J.jsx)(Ce.Z,{checked:z,onCheck:q})}),(0,J.jsx)(k.ZP,{monospace:!0,muted:!0,children:"Overwrite global variables"})]}),z&&ce&&Object.entries(ce).length>0&&(0,J.jsx)(O.Z,{mt:1,children:(0,J.jsx)(S.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(ce).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return Z.sZ===r?e:e.concat([[(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:r},"variable_".concat(r)),(0,J.jsx)(ae.Z,{borderless:!0,monospace:!0,onChange:function(e){e.preventDefault(),ue((function(n){return Me(Me({},n),{},(0,l.Z)({},r,e.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:o},"variable_uuid_input_".concat(r))]])}),[])})})]})]}),(null===gn||void 0===gn?void 0:gn.length)>=1&&(0,J.jsx)(O.Z,{mb:A.HN,children:(0,J.jsx)(he,{blocks:gn,updateVariables:ue,variables:Me(Me({},rn),ce)})})]})}),[gn,V,ye,z,ce,pe,we,rn,Y,q,ue,Q]),xn=E.ZP.tags.list().data,bn=(0,u.useMemo)((function(){return((null===xn||void 0===xn?void 0:xn.tags)||[]).filter((function(e){var n=e.uuid;return!(null!==Re&&void 0!==Re&&Re.includes(n))}))}),[xn,Re]);return(0,J.jsx)(J.Fragment,{children:(0,J.jsxs)(x.Z,{after:jn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(b,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===o||void 0===o?void 0:o.name},linkProps:{as:"/pipelines/".concat(b,"/triggers/").concat(w),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:n,pageName:U.M.TRIGGERS,pipeline:r,setErrors:s,subheader:(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(p.Z,{disabled:vn,loading:tn,onClick:un,outline:!0,primary:!0,children:"Save changes"}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(b,"/triggers/").concat(w),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===o||void 0===o?void 0:o.name)},uuid:"triggers/edit",children:[(0,J.jsxs)(O.Z,{p:A.cd,children:[(0,J.jsxs)(O.Z,{mb:2,children:[(0,J.jsx)(v.Z,{children:"Trigger type"}),(0,J.jsx)(k.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,J.jsx)(m.ZP,{children:Ne(I).map((function(e){var n=e.label,t=e.description,r=e.uuid,i=we===r,o=we&&!i;return(0,J.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){y.Xm.EVENT!==r||null!==T&&void 0!==T&&T.length||D([{}]),fe((function(e){return Me(Me({},e),{},{schedule_type:r})}))},children:(0,J.jsx)(Ee.U,{selected:i,children:(0,J.jsxs)(m.ZP,{alignItems:"center",children:[(0,J.jsx)(me.Z,{children:(0,J.jsx)("input",{checked:i,type:"radio"})}),(0,J.jsx)(O.Z,{mr:A.cd}),(0,J.jsxs)(me.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,J.jsx)(v.Z,{bold:!0,default:!i&&!o,level:5,muted:!i&&o,children:n()}),(0,J.jsx)(k.ZP,{default:!i&&!o,leftAligned:!0,muted:o,children:t()})]})]})})},r)}))})]}),(0,J.jsxs)(O.Z,{mt:A.HN,children:[y.Xm.TIME===we&&pn,y.Xm.EVENT===we&&hn,y.Xm.API===we&&mn]}),(0,J.jsxs)(O.Z,{mt:A.HN,px:A.cd,children:[(0,J.jsxs)(O.Z,{mb:2,children:[(0,J.jsx)(v.Z,{children:"Tags"}),(0,J.jsx)(k.ZP,{muted:!0,children:"Add or remove tags from this trigger."})]}),(0,J.jsx)(ke.Z,{removeTag:function(e){fe((function(n){return Me(Me({},n),{},{tags:null===Re||void 0===Re?void 0:Re.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){fe((function(n){return Me(Me({},n),{},{tags:(0,R.$C)(e.uuid,Re,(function(n){return n===e.uuid}))})}))},selectedTags:null===Re||void 0===Re?void 0:Re.map((function(e){return{uuid:e}})),tags:bn,uuid:"TagsAutocompleteInputField-trigger-".concat(w)})]})]})})},Ue=t(41788),Re=t(70543);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 Le(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,l.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 Fe(e){var n=e.pipelineScheduleId,t=e.pipelineUUID,r=e.subpath,i=Re.b7===r,o=(0,u.useState)(null),l=o[0],s=o[1],c=E.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,a=null===c||void 0===c?void 0:c.variables,d={};i&&(d._format="with_runtime_average");var p=E.ZP.pipeline_schedules.detail(n,d),f=p.data,h=p.mutate,m=null===f||void 0===f?void 0:f.pipeline_schedule,v=E.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,g=Le(Le({},null===v||void 0===v?void 0:v.pipeline),{},{uuid:t});return i?(0,J.jsx)(Ae,{errors:l,fetchPipelineSchedule:h,pipeline:g,pipelineSchedule:m,setErrors:s,variables:a}):(0,J.jsx)($,{errors:l,fetchPipelineSchedule:h,pipeline:g,pipelineSchedule:m,setErrors:s,variables:a})}Fe.getInitialProps=function(){var e=(0,o.Z)(c().mark((function e(n){var t,r,o,l,s,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,o=t.slug,!Array.isArray(o)){e.next=4;break}return l=(0,i.Z)(o,2),s=l[0],u=l[1],e.abrupt("return",{pipelineScheduleId:s,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var We=(0,Ue.Z)(Fe)},95488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return t(70422)}])}},function(e){e.O(0,[844,9902,426,1774,8792,7849,4495,1424,1005,7815,6422,547,8952,7496,8190,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{58122:function(e,n,t){"use strict";t.d(n,{FS:function(){return l},JZ:function(){return s},e7:function(){return d},wx:function(){return a}});var r=t(75582),i=t(82394),c=t(93348);function o(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?o(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e){return"string"===typeof e?e:JSON.stringify(e)}function a(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:l(n)})}))}function s(e,n){return n===c.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===c.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function d(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),c=t[0],o=t[1],l=o;try{l=JSON.parse(o)}catch(a){}return u(u({},e),{},(0,i.Z)({},c,l))}),{}):e}},55264:function(e,n,t){"use strict";var r=t(82684),i=t(79891),c=t(67971),o=t(19711),u=t(24224),l=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,a=void 0===t?[]:t,s=(0,r.useMemo)((function(){return(null===a||void 0===a?void 0:a.length)||0}),[a]),d=(0,r.useMemo)((function(){return(0,u.YC)(a||[],"uuid")}),[a]);return(0,l.jsx)(c.ZP,{alignItems:"center",flexWrap:"wrap",children:null===d||void 0===d?void 0:d.reduce((function(e,t){return e.push((0,l.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,l.jsx)(i.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,l.jsx)(o.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},97225:function(e,n,t){"use strict";var r=t(75582),i=t(12691),c=t.n(i),o=t(82684),u=t(83455),l=t(34376),a=t(60328),s=t(16634),d=t(47999),p=t(67971),f=t(10919),h=t(93348),g=t(62609),v=t(86673),m=t(87815),x=t(55264),b=t(19711),j=t(46261),Z=t(82531),y=t(22341),P=t(66050),_=t(49125),k=t(45838),O=t(9736),w=t(96510),C=t(66653),I=t(28598),E=1.5*_.iI;n.Z=function(e){var n=e.disableActions,t=e.fetchPipelineSchedules,i=e.highlightRowOnHover,S=e.includeCreatedAtColumn,T=e.includePipelineColumn,A=e.pipeline,D=e.pipelineSchedules,N=e.pipelineTriggersByName,M=e.selectedSchedule,H=e.setErrors,V=e.setSelectedSchedule,Y=e.stickyHeader,R=null===A||void 0===A?void 0:A.uuid,B=(0,l.useRouter)(),F=(0,o.useRef)({}),W=(0,o.useState)(null),z=W[0],L=W[1],q=(0,o.useState)(0),J=q[0],K=q[1],U=(0,o.useState)(0),Q=U[0],X=U[1],G=(0,u.Db)((function(e){return Z.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){null===t||void 0===t||t()},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),$=(0,r.Z)(G,1)[0],ee=(0,u.Db)((function(e){return Z.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){null===t||void 0===t||t(),R?B.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(R,"/triggers")):null===t||void 0===t||t()},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),ne=(0,r.Z)(ee,1)[0],te=[],re=[];return n||(te.push.apply(te,[null,null,null]),re.push.apply(re,[{label:function(){return""},uuid:"action"},{uuid:"Info"},{uuid:"Type"}])),te.push.apply(te,[1]),re.push.apply(re,[{uuid:"Name"}]),n||(te.push.apply(te,[null,2]),re.push.apply(re,[{uuid:"Frequency"},{uuid:"Tags"}])),te.push.apply(te,[null,null,null]),re.push.apply(re,[{uuid:"Runs"},{uuid:"Latest status"},{uuid:"Logs"}]),n||(0,O.Ct)()||(te.push.apply(te,[null]),re.push({label:function(){return""},uuid:"edit/delete"})),!n&&T&&(re.splice(2,0,{uuid:"Pipeline"}),te.splice(2,0,2)),!n&&S&&(re.splice(3,0,{uuid:"Created at"}),te.splice(3,0,null)),(0,I.jsx)(k.cl,{overflowVisible:!0,children:0===D.length?(0,I.jsx)(v.Z,{px:3,py:1,children:(0,I.jsx)(b.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,I.jsx)(m.Z,{columnFlex:te,columns:re,highlightRowOnHover:i,isSelectedRow:function(e){return D[e].id===(null===M||void 0===M?void 0:M.id)},onClickRow:V?function(e){return null===V||void 0===V?void 0:V(D[e])}:null,rowVerticalPadding:6,rows:D.map((function(e,t){var r,i=e.id,u=e.created_at,l=e.pipeline_runs_count,m=e.pipeline_uuid,Z=e.last_pipeline_run_status,k=e.name,w=e.schedule_interval,A=e.status,D=e.tags,M=R||m;F.current[i]=(0,o.createRef)(),h.fq.ACTIVE===A?r=(0,I.jsx)(s.Z,{size:E,success:!0}):h.fq.INACTIVE===A&&(r=(0,I.jsx)(s.Z,{borderSize:1,size:E,square:!0,warning:!0}));var H,V=[];n?V.push.apply(V,[(0,I.jsx)(b.ZP,{bold:!0,children:k},"trigger_name_".concat(t))]):V.push.apply(V,[(0,I.jsx)(a.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,C.j)(n),$({id:e.id,status:h.fq.ACTIVE===A?h.fq.INACTIVE:h.fq.ACTIVE})},children:h.fq.ACTIVE===A?(0,I.jsx)(y.dz,{muted:!0,size:2*_.iI}):(0,I.jsx)(y.Py,{default:!0,size:2*_.iI})},"toggle_trigger_".concat(t)),(0,I.jsxs)(p.ZP,{alignItems:"center",flexDirection:"row",children:[(0,I.jsx)(j.Z,{block:!0,label:A,size:E,widthFitContent:!0,children:r}),(null===N||void 0===N?void 0:N[k])&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(v.Z,{mr:1}),(0,I.jsx)(j.Z,{block:!0,label:"This trigger is saved in code.",size:E,widthFitContent:!0,children:(0,I.jsx)(y.EK,{default:!0,size:E})})]})]},"trigger_status_".concat(t)),(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:null===(H=h.Z4[e.schedule_type])||void 0===H?void 0:H.call(h.Z4)},"trigger_type_".concat(t)),(0,I.jsx)(c(),{as:"/pipelines/".concat(M,"/triggers/").concat(i),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,I.jsx)(f.Z,{bold:!0,onClick:function(e){(0,C.j)(e),B.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(M,"/triggers/").concat(i))},sameColorAsText:!0,children:k})},"trigger_name_".concat(t))]);return n||V.push.apply(V,[(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:w},"trigger_frequency_".concat(t)),(0,I.jsx)("div",{children:(0,I.jsx)(x.Z,{tags:null===D||void 0===D?void 0:D.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(t))]),V.push.apply(V,[(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:l},"trigger_run_count_".concat(t)),(0,I.jsx)(b.ZP,{danger:P.V.FAILED===Z,default:!Z,monospace:!0,success:P.V.COMPLETED===Z,warning:P.V.CANCELLED===Z,children:Z||"N/A"},"latest_run_status_".concat(t)),(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return B.push("/pipelines/".concat(M,"/logs?pipeline_schedule_id[]=").concat(i))},children:(0,I.jsx)(y.B4,{default:!0,size:2*_.iI})},"logs_button_".concat(t))]),n||(0,O.Ct)()||V.push((0,I.jsxs)(p.ZP,{children:[(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return B.push("/pipelines/".concat(M,"/triggers/").concat(i,"/edit"))},title:"Edit",children:(0,I.jsx)(y.I8,{default:!0,size:2*_.iI})}),(0,I.jsx)(v.Z,{mr:1}),(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,r;L(i),K((null===(e=F.current[i])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),X((null===(t=F.current[i])||void 0===t||null===(r=t.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:F.current[i],title:"Delete",children:(0,I.jsx)(y.rF,{default:!0,size:2*_.iI})}),(0,I.jsx)(d.Z,{onClickOutside:function(){return L(null)},open:z===i,children:(0,I.jsx)(g.Z,{danger:!0,left:(Q||0)-286,onCancel:function(){return L(null)},onClick:function(){L(null),ne(i)},title:"Are you sure you want to delete the trigger ".concat(k,"?"),top:(J||0)-(t<=1?40:96),width:40*_.iI})})]},"edit_delete_buttons_".concat(t))),!n&&T&&V.splice(2,0,(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:M},"pipeline_name_".concat(t))),!n&&S&&V.splice(3,0,(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:u},"created_at_".concat(t))),V})),stickyHeader:Y,uuid:"pipeline-triggers"})})}},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return s}});t(82684);var r=t(60328),i=t(67971),c=t(86673),o=t(22341),u=t(73899),l=t(49125),a=t(28598),s=22;n.Z=function(e){var n=e.page,t=e.maxPages,s=e.onUpdate,d=e.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(f/2),g=n-h;n+h>=d?(g=d-f+2,f-=2):n-h<=0?(g=0,f-=2):(f-=4,g=n-Math.floor(f/2)),p=Array.from({length:f},(function(e,n){return n+g}))}return(0,a.jsx)(a.Fragment,{children:d>0&&(0,a.jsxs)(i.ZP,{alignItems:"center",children:[(0,a.jsx)(r.Z,{disabled:0===n,onClick:function(){return s(n-1)},children:(0,a.jsx)(o.Hd,{size:1.5*l.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(e){return(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){e!==n&&s(e)},notClickable:e===n,backgroundColor:e===n&&u.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!p.includes(d-1)&&(0,a.jsxs)(a.Fragment,{children:[!p.includes(d-2)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,a.jsx)(c.Z,{ml:1}),(0,a.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return s(n+1)},children:(0,a.jsx)(o.Kw,{size:1.5*l.iI,stroke:"#AEAEAE"})})]})})}},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return l},Xm:function(){return c},Z4:function(){return s},fq:function(){return u},kJ:function(){return a}});var r,i,c,o=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(c||(c={}));var u,l,a,s=(r={},(0,o.Z)(r,c.API,(function(){return"API"})),(0,o.Z)(r,c.EVENT,(function(){return"event"})),(0,o.Z)(r,c.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(u||(u={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var d=(i={},(0,o.Z)(i,a.CREATED_AT,"Created at"),(0,o.Z)(i,a.NAME,"Name"),(0,o.Z)(i,a.PIPELINE,"Pipeline"),(0,o.Z)(i,a.STATUS,"Status"),(0,o.Z)(i,a.TYPE,"Type"),i)},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},79891:function(e,n,t){"use strict";var r=t(38626),i=t(60328),c=t(67971),o=t(86673),u=t(19711),l=t(23831),a=t(22341),s=t(49125),d=t(31012),p=t(28598),f=r.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+d.Al)/2,"px;\n height: ").concat(1.5*s.iI+d.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,r=e.disabled,l=e.label,d=e.onClick,h=e.primary,g=e.small;return(0,p.jsx)(f,{border:n,primary:h,small:g,children:(0,p.jsx)(i.Z,{basic:!0,disabled:r,noBackground:!0,noPadding:!0,onClick:d,transparent:!0,children:(0,p.jsxs)(c.ZP,{alignItems:"center",children:[t,l&&(0,p.jsx)(u.ZP,{small:g,children:l}),!r&&d&&(0,p.jsx)(o.Z,{ml:1,children:(0,p.jsx)(a.x8,{default:h,muted:!h,size:g?s.iI:1.25*s.iI})})]})})})}},29237:function(e,n,t){"use strict";var r=t(38626),i=t(67971),c=t(86673),o=t(19711),u=t(23831),l=t(73942),a=t(37391),s=t(49125),d=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||u.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),g=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),v=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,l=e.dark,a=e.footer,s=e.fullHeight,p=void 0===s||s,m=e.fullWidth,x=void 0===m||m,b=e.header,j=e.headerHeight,Z=e.headerIcon,y=e.headerPaddingVertical,P=e.headerTitle,_=e.maxHeight,k=e.maxWidth,O=e.minWidth,w=e.noPadding,C=e.overflowVisible,I=e.subtitle,E=e.success;return(0,d.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:x,maxHeight:_,maxWidth:k,minWidth:O,overflowVisible:C,ref:r,success:E,children:[(b||P)&&(0,d.jsxs)(h,{headerPaddingVertical:y,height:j,children:[b&&b,P&&(0,d.jsx)(i.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(i.ZP,{alignItems:"center",children:[Z&&Z,(0,d.jsx)(c.Z,{ml:Z?1:0,children:(0,d.jsx)(o.ZP,{bold:!0,default:!0,children:P})})]})})]}),(0,d.jsxs)(g,{maxHeight:_,noPadding:w,overflowVisible:C,ref:u,children:[I&&(0,d.jsx)(c.Z,{mb:2,children:(0,d.jsx)(o.ZP,{default:!0,children:I})}),t]}),a&&(0,d.jsx)(v,{children:a})]})}},6087:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return pe}});var r=t(77837),i=t(82394),c=t(75582),o=t(38860),u=t.n(o),l=t(12691),a=t.n(l),s=t(82684),d=t(83455),p=t(34376),f=t(60328),h=t(48952),g=t(34744),v=t(67971),m=t(87372),x=t(11135),b=t(10919),j=t(51099),Z=t(60547),y=t(93348),P=t(41788),_=t(29237),k=t(86673),O=t(87815),w=t(19711),C=t(38435),I=t(82944),E=t(70902),S=t(23831),T=t(38626),A=t(73942),D=t(49125),N=T.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*D.iI,2*D.iI,A.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||S.Z).borders.light,";\n background-color: ").concat((e.theme||S.Z).background.popup,";\n ")})),M=t(90211),H=t(58122),V=t(28598);function Y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function R(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Y(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var B="".concat(D.iI,"px ").concat(3*D.iI,"px");var F=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,r=e.onSuccess,o=e.variables,u=(0,s.useState)(!1),l=u[0],a=u[1],d=(0,s.useState)({}),p=d[0],h=d[1],g=(0,s.useState)(o||{}),x=g[0],b=g[1],j=(0,s.useMemo)((function(){return R(R({},n),{},{name:(0,M.Y6)(),variables:l?(0,H.e7)(x):null})}),[n,l,x]),Z=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),b((function(t){return R(R({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,V.jsx)(C.Z,R(R({},t),{},{rows:1,value:n})):(0,V.jsx)(I.Z,R({},t))};return(0,s.useEffect)((function(){var e=Object.entries(x).reduce((function(e,n){var t=(0,c.Z)(n,2),r=t[0],o=t[1],u=(0,M.Pb)(o)&&"object"===typeof JSON.parse(o)&&!Array.isArray(JSON.parse(o))&&null!==JSON.parse(o);return R(R({},e),{},(0,i.Z)({},r,u))}),{});h(e)}),[]),(0,V.jsxs)(_.Z,{footer:(0,V.jsxs)(v.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,V.jsx)(f.Z,{onClick:function(){r({pipeline_schedule:j}),t()},padding:B,primaryAlternate:!0,children:"Run now"}),(0,V.jsx)(k.Z,{mr:1}),(0,V.jsx)(f.Z,{borderColor:S.Z.background.page,onClick:t,padding:B,secondary:!0,children:"Cancel"})]}),header:(0,V.jsx)(m.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*D.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,V.jsx)(N,{children:(0,V.jsxs)(v.ZP,{alignItems:"center",children:[(0,V.jsx)(k.Z,{mr:2,children:(0,V.jsx)(E.Z,{checked:l,onCheck:a})}),(0,V.jsx)(w.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),l&&x&&Object.entries(x).length>0&&(0,V.jsx)(k.Z,{mt:2,children:(0,V.jsx)(O.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(x).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,V.jsx)(w.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),Z(t,r)]}))})})]})},W=t(37391),z=T.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],S.Z.borders.medium,D.tr),L=T.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],W.w5),q=T.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],S.Z.background.output,A.n_,D.iI,D.tr),J=t(73899);var K=function(e){var n=e.hasOverride,t=e.scheduleType,r=e.variables,i=e.variablesOverride,o=[];return Object.entries(r).forEach((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1],u=null===i||void 0===i?void 0:i[t];o.push({uuid:t,value:(0,H.FS)(u||r)})})),(0,H.JZ)(o,t),(0,V.jsxs)(z,{children:[(0,V.jsx)(k.Z,{mb:2,children:(0,V.jsxs)(w.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,V.jsx)(L,{noScrollbarTrackBackground:!0,children:r&&o.map((function(e){var n=e.uuid,t=e.value;return(0,V.jsxs)(q,{children:[(0,V.jsx)(w.ZP,{monospace:!0,small:!0,children:n}),(0,V.jsx)(w.ZP,{color:J.Or,monospace:!0,small:!0,children:(0,H.FS)(t)})]})}))})]})},U=t(54283),Q=t(46261),X=t(97225),G=t(82531),$=t(22341),ee=t(52769),ne=t(59920),te=t(42305),re=t(24224),ie=t(7715),ce=t(9736),oe=t(96510),ue=t(59e3),le=t(99497);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 se(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,i.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 de(e){var n=e.pipeline,t=(0,p.useRouter)(),r=(0,ce.Ct)(),o=n.uuid,u=(0,s.useState)(null),l=u[0],P=u[1],_=G.ZP.variables.pipelines.list(o,{global_only:!0},{revalidateOnFocus:!1}).data,O=null===_||void 0===_?void 0:_.variables,C=(0,ue.iV)(),I=null!==C&&void 0!==C&&C.page?C.page:0,E=G.ZP.pipeline_schedules.pipelines.list(o,{_limit:j.Q,_offset:(null!==C&&void 0!==C&&C.page?C.page:0)*j.Q},{refreshInterval:7500}),S=E.data,T=E.mutate,A=(0,s.useMemo)((function(){return(null===S||void 0===S?void 0:S.pipeline_schedules)||[]}),[S]),N=function(e){return(0,d.Db)(G.ZP.pipeline_schedules.pipelines.useCreate(o),{onSuccess:function(n){return(0,oe.wD)(n,{callback:function(n){var t=n.pipeline_schedule.id;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}})},Y=N((function(e){return t.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),R=(0,c.Z)(Y,2),B=R[0],W=R[1].isLoading,z=N(T),L=(0,c.Z)(z,2),q=L[0],J=L[1].isLoading,ae=(0,s.useMemo)((function(){var e;return null===(e=(0,H.wx)(O,(function(e){return e.uuid===ee.C})))||void 0===e?void 0:e.reduce((function(e,n){var t=n.uuid,r=n.value;return se(se({},e),{},(0,i.Z)({},t,r))}),{})}),[O]),de={name:(0,M.Y6)(),schedule_interval:y.U5.ONCE,schedule_type:y.Xm.TIME,start_time:(0,te.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:y.fq.ACTIVE},pe=(0,le.dd)((function(){return(0,V.jsx)(F,{initialPipelineSchedulePayload:de,onCancel:ge,onSuccess:q,variables:ae})}),{},[O,ae],{background:!0,uuid:"run_pipeline_now_popup"}),fe=(0,c.Z)(pe,2),he=fe[0],ge=fe[1],ve=(0,s.useState)(),me=ve[0],xe=ve[1],be=(0,s.useMemo)((function(){var e=null===me||void 0===me?void 0:me.variables,n=!(0,ie.Qr)(e),t=n?null===me||void 0===me?void 0:me.variables:(0,ie.Qr)(ae)?null:ae;return function(i){var c=i.height-(t?151:80);return(0,V.jsxs)(V.Fragment,{children:[t&&(0,V.jsx)(K,{hasOverride:n,scheduleType:null===me||void 0===me?void 0:me.schedule_type,variables:ae,variablesOverride:e}),!t&&(0,V.jsxs)(k.Z,{p:D.cd,children:[(0,V.jsx)(w.ZP,{children:"This pipeline has no runtime variables."}),!r&&(0,V.jsxs)(k.Z,{mt:1,children:[(0,V.jsx)(a(),{as:"/pipelines/".concat(o,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,V.jsx)(b.Z,{primary:!0,children:"Click here"})})," ",(0,V.jsx)(w.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,V.jsx)(h.Z,se(se({},i),{},{height:c,noStatus:!0}))]})}}),[r,o,null===me||void 0===me?void 0:me.schedule_type,null===me||void 0===me?void 0:me.variables,ae]),je=(0,s.useMemo)((function(){var e;return(null===S||void 0===S||null===(e=S.metadata)||void 0===e?void 0:e.count)||[]}),[S]),Ze=G.ZP.pipeline_triggers.pipelines.list(o),ye=Ze.data,Pe=(Ze.mutate,(0,s.useMemo)((function(){return(0,re.HK)((null===ye||void 0===ye?void 0:ye.pipeline_triggers)||[],(function(e){return e.name}))}),[ye]));return(0,V.jsxs)(Z.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:be,errors:l,pageName:ne.M.TRIGGERS,pipeline:n,setErrors:P,subheaderBackgroundImage:"".concat(t.basePath,"/images/banner-shape-purple-peach.jpg"),subheaderButton:(0,V.jsx)(x.ZP,{beforeElement:(0,V.jsx)($.mm,{size:2.5*D.iI}),blackBorder:!0,inline:!0,loading:W,noHoverUnderline:!0,onClick:function(){return B({pipeline_schedule:{name:(0,M.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,V.jsx)(w.ZP,{bold:!0,large:!0,children:"Run this pipeline using a schedule, event, or API."}),title:function(e){var n=e.name;return"".concat(n," triggers")},uuid:"".concat(ne.M.TRIGGERS,"_").concat(o),children:[(0,V.jsx)(k.Z,{mt:D.cd,px:D.cd,children:(0,V.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,V.jsx)(m.Z,{level:5,children:"Pipeline triggers"}),(0,V.jsx)(Q.Z,{appearBefore:!0,default:!0,fullSize:!0,label:"Creates an @once trigger and runs pipeline immediately",widthFitContent:!0,children:(0,V.jsx)(f.Z,{beforeIcon:(0,V.jsx)($.JM,{inverted:!0,size:2*D.iI}),disabled:r,loading:J,onClick:(0,ie.Qr)(ae)?function(){return q({pipeline_schedule:de})}:he,outline:!0,success:!r,children:"Run pipeline now"})})]})}),(0,V.jsx)(g.Z,{light:!0,mt:D.cd,short:!0}),S?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(X.Z,{fetchPipelineSchedules:T,pipeline:n,pipelineSchedules:A,pipelineTriggersByName:Pe,selectedSchedule:me,setErrors:P,setSelectedSchedule:xe}),(0,V.jsx)(k.Z,{p:2,children:(0,V.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),r=se(se({},C),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(o,"/triggers?").concat((0,ue.uM)(r)))},page:Number(I),totalPages:Math.ceil(je/j.Q)})})]}):(0,V.jsx)(k.Z,{m:2,children:(0,V.jsx)(U.Z,{inverted:!0})})]})}de.getInitialProps=function(){var e=(0,r.Z)(u().mark((function e(n){var t;return u().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 pe=(0,P.Z)(de)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return b},AY:function(){return j},BP:function(){return x},JX:function(){return m},OC:function(){return d},Pc:function(){return Z},Ro:function(){return y},Tz:function(){return v},Y_:function(){return _},d$:function(){return g},jV:function(){return P},lJ:function(){return k},n1:function(){return f},s8:function(){return a},vk:function(){return c},yD:function(){return s}});var r,i,c,o=t(82394),u=t(92083),l=t.n(u);!function(e){e.TODAY="today",e.WEEK="week",e.MONTH="month"}(c||(c={}));var a=(r={},(0,o.Z)(r,c.TODAY,"today"),(0,o.Z)(r,c.WEEK,"last 7 days"),(0,o.Z)(r,c.MONTH,"last 30 days"),r),s=(i={},(0,o.Z)(i,c.TODAY,0),(0,o.Z)(i,c.WEEK,6),(0,o.Z)(i,c.MONTH,29),i),d="YYYY-MM-DD HH:mm:ss",p="YYYY-MM-DD HH:mm",f="YYYY-MM-DD",h="MMMM D, YYYY";function g(e,n){var t=n.dayAgo,r=n.includeSeconds,i=n.utcFormat,c=l()(e),o=p;return i&&(c=c.utc()),t&&(c=c.subtract(1,"days")),r&&(o=d),c.format(o)}function v(e){var n=g((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function m(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?d:p)}function x(e,n,t){return l()(e).utc().hours(+n).minutes(+t).format()}function b(e){return l()(e).unix()}function j(e,n,t,r){var i="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return r?"".concat(i,":").concat(r):i}function Z(e){var n=l().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function y(e,n){var t=l().utc(),r=l().utc();null!==n&&void 0!==n&&n.localTime&&(t=l()().local(),r=l()().local());var i=(t=t.subtract(e,"days")).format(h),c=r.format(h);return null!==n&&void 0!==n&&n.endDateOnly?c:"".concat(i," - ").concat(c)}function P(e,n){var t=null!==n&&void 0!==n&&n.localTime?l()().local():l().utc();if(e===c.WEEK){var r=s[c.WEEK];t=t.subtract(r,"days")}else if(e===c.MONTH){var i=s[c.MONTH];t=t.subtract(i,"days")}return null!==n&&void 0!==n&&n.isoString?t.startOf("day").toISOString():t.startOf("day").format(d)}function _(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90,n=new Date,t=[],r=0;r<e;r++)t.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return t}function k(e){return e.padStart(2,"0")}},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(6087)}])}},function(e){e.O(0,[844,9902,426,1774,1424,1005,7815,6422,547,8952,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{58122:function(e,n,t){"use strict";t.d(n,{FS:function(){return l},JZ:function(){return s},e7:function(){return d},wx:function(){return a}});var r=t(75582),i=t(82394),c=t(93348);function o(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?o(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e){return"string"===typeof e?e:JSON.stringify(e)}function a(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:l(n)})}))}function s(e,n){return n===c.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===c.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function d(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),c=t[0],o=t[1],l=o;try{l=JSON.parse(o)}catch(a){}return u(u({},e),{},(0,i.Z)({},c,l))}),{}):e}},55264:function(e,n,t){"use strict";var r=t(82684),i=t(79891),c=t(67971),o=t(19711),u=t(24224),l=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,a=void 0===t?[]:t,s=(0,r.useMemo)((function(){return(null===a||void 0===a?void 0:a.length)||0}),[a]),d=(0,r.useMemo)((function(){return(0,u.YC)(a||[],"uuid")}),[a]);return(0,l.jsx)(c.ZP,{alignItems:"center",flexWrap:"wrap",children:null===d||void 0===d?void 0:d.reduce((function(e,t){return e.push((0,l.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,l.jsx)(i.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,l.jsx)(o.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},97225:function(e,n,t){"use strict";var r=t(75582),i=t(12691),c=t.n(i),o=t(82684),u=t(83455),l=t(34376),a=t(60328),s=t(16634),d=t(47999),p=t(67971),f=t(10919),h=t(93348),g=t(62609),v=t(86673),m=t(87815),x=t(55264),b=t(19711),j=t(46261),Z=t(82531),y=t(22341),P=t(66050),_=t(49125),k=t(45838),O=t(9736),w=t(96510),C=t(66653),I=t(28598),E=1.5*_.iI;n.Z=function(e){var n=e.disableActions,t=e.fetchPipelineSchedules,i=e.highlightRowOnHover,S=e.includeCreatedAtColumn,T=e.includePipelineColumn,A=e.pipeline,D=e.pipelineSchedules,N=e.pipelineTriggersByName,M=e.selectedSchedule,H=e.setErrors,V=e.setSelectedSchedule,Y=e.stickyHeader,R=null===A||void 0===A?void 0:A.uuid,B=(0,l.useRouter)(),F=(0,o.useRef)({}),W=(0,o.useState)(null),z=W[0],L=W[1],q=(0,o.useState)(0),J=q[0],U=q[1],K=(0,o.useState)(0),Q=K[0],X=K[1],G=(0,u.Db)((function(e){return Z.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){null===t||void 0===t||t()},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),$=(0,r.Z)(G,1)[0],ee=(0,u.Db)((function(e){return Z.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){null===t||void 0===t||t(),R?B.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(R,"/triggers")):null===t||void 0===t||t()},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),ne=(0,r.Z)(ee,1)[0],te=[],re=[];return n||(te.push.apply(te,[null,null,null]),re.push.apply(re,[{label:function(){return""},uuid:"action"},{uuid:"Info"},{uuid:"Type"}])),te.push.apply(te,[1]),re.push.apply(re,[{uuid:"Name"}]),n||(te.push.apply(te,[null,2]),re.push.apply(re,[{uuid:"Frequency"},{uuid:"Tags"}])),te.push.apply(te,[null,null,null]),re.push.apply(re,[{uuid:"Runs"},{uuid:"Latest status"},{uuid:"Logs"}]),n||(0,O.Ct)()||(te.push.apply(te,[null]),re.push({label:function(){return""},uuid:"edit/delete"})),!n&&T&&(re.splice(2,0,{uuid:"Pipeline"}),te.splice(2,0,2)),!n&&S&&(re.splice(3,0,{uuid:"Created at"}),te.splice(3,0,null)),(0,I.jsx)(k.cl,{overflowVisible:!0,children:0===D.length?(0,I.jsx)(v.Z,{px:3,py:1,children:(0,I.jsx)(b.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,I.jsx)(m.Z,{columnFlex:te,columns:re,highlightRowOnHover:i,isSelectedRow:function(e){return D[e].id===(null===M||void 0===M?void 0:M.id)},onClickRow:V?function(e){return null===V||void 0===V?void 0:V(D[e])}:null,rowVerticalPadding:6,rows:D.map((function(e,t){var r,i=e.id,u=e.created_at,l=e.pipeline_runs_count,m=e.pipeline_uuid,Z=e.last_pipeline_run_status,k=e.name,w=e.schedule_interval,A=e.status,D=e.tags,M=R||m;F.current[i]=(0,o.createRef)(),h.fq.ACTIVE===A?r=(0,I.jsx)(s.Z,{size:E,success:!0}):h.fq.INACTIVE===A&&(r=(0,I.jsx)(s.Z,{borderSize:1,size:E,square:!0,warning:!0}));var H,V=[];n?V.push.apply(V,[(0,I.jsx)(b.ZP,{bold:!0,children:k},"trigger_name_".concat(t))]):V.push.apply(V,[(0,I.jsx)(a.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,C.j)(n),$({id:e.id,status:h.fq.ACTIVE===A?h.fq.INACTIVE:h.fq.ACTIVE})},children:h.fq.ACTIVE===A?(0,I.jsx)(y.dz,{muted:!0,size:2*_.iI}):(0,I.jsx)(y.Py,{default:!0,size:2*_.iI})},"toggle_trigger_".concat(t)),(0,I.jsxs)(p.ZP,{alignItems:"center",flexDirection:"row",children:[(0,I.jsx)(j.Z,{block:!0,label:A,size:E,widthFitContent:!0,children:r}),(null===N||void 0===N?void 0:N[k])&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(v.Z,{mr:1}),(0,I.jsx)(j.Z,{block:!0,label:"This trigger is saved in code.",size:E,widthFitContent:!0,children:(0,I.jsx)(y.EK,{default:!0,size:E})})]})]},"trigger_status_".concat(t)),(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:null===(H=h.Z4[e.schedule_type])||void 0===H?void 0:H.call(h.Z4)},"trigger_type_".concat(t)),(0,I.jsx)(c(),{as:"/pipelines/".concat(M,"/triggers/").concat(i),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,I.jsx)(f.Z,{bold:!0,onClick:function(e){(0,C.j)(e),B.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(M,"/triggers/").concat(i))},sameColorAsText:!0,children:k})},"trigger_name_".concat(t))]);return n||V.push.apply(V,[(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:w},"trigger_frequency_".concat(t)),(0,I.jsx)("div",{children:(0,I.jsx)(x.Z,{tags:null===D||void 0===D?void 0:D.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(t))]),V.push.apply(V,[(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:l},"trigger_run_count_".concat(t)),(0,I.jsx)(b.ZP,{danger:P.V.FAILED===Z,default:!Z,monospace:!0,success:P.V.COMPLETED===Z,warning:P.V.CANCELLED===Z,children:Z||"N/A"},"latest_run_status_".concat(t)),(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return B.push("/pipelines/".concat(M,"/logs?pipeline_schedule_id[]=").concat(i))},children:(0,I.jsx)(y.UL,{default:!0,size:2*_.iI})},"logs_button_".concat(t))]),n||(0,O.Ct)()||V.push((0,I.jsxs)(p.ZP,{children:[(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return B.push("/pipelines/".concat(M,"/triggers/").concat(i,"/edit"))},title:"Edit",children:(0,I.jsx)(y.I8,{default:!0,size:2*_.iI})}),(0,I.jsx)(v.Z,{mr:1}),(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,r;L(i),U((null===(e=F.current[i])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),X((null===(t=F.current[i])||void 0===t||null===(r=t.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:F.current[i],title:"Delete",children:(0,I.jsx)(y.rF,{default:!0,size:2*_.iI})}),(0,I.jsx)(d.Z,{onClickOutside:function(){return L(null)},open:z===i,children:(0,I.jsx)(g.Z,{danger:!0,left:(Q||0)-286,onCancel:function(){return L(null)},onClick:function(){L(null),ne(i)},title:"Are you sure you want to delete the trigger ".concat(k,"?"),top:(J||0)-(t<=1?40:96),width:40*_.iI})})]},"edit_delete_buttons_".concat(t))),!n&&T&&V.splice(2,0,(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:M},"pipeline_name_".concat(t))),!n&&S&&V.splice(3,0,(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:u},"created_at_".concat(t))),V})),stickyHeader:Y,uuid:"pipeline-triggers"})})}},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return s}});t(82684);var r=t(60328),i=t(67971),c=t(86673),o=t(22341),u=t(73899),l=t(49125),a=t(28598),s=22;n.Z=function(e){var n=e.page,t=e.maxPages,s=e.onUpdate,d=e.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(f/2),g=n-h;n+h>=d?(g=d-f+2,f-=2):n-h<=0?(g=0,f-=2):(f-=4,g=n-Math.floor(f/2)),p=Array.from({length:f},(function(e,n){return n+g}))}return(0,a.jsx)(a.Fragment,{children:d>0&&(0,a.jsxs)(i.ZP,{alignItems:"center",children:[(0,a.jsx)(r.Z,{disabled:0===n,onClick:function(){return s(n-1)},children:(0,a.jsx)(o.Hd,{size:1.5*l.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(e){return(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){e!==n&&s(e)},notClickable:e===n,backgroundColor:e===n&&u.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!p.includes(d-1)&&(0,a.jsxs)(a.Fragment,{children:[!p.includes(d-2)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,a.jsx)(c.Z,{ml:1}),(0,a.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return s(n+1)},children:(0,a.jsx)(o.Kw,{size:1.5*l.iI,stroke:"#AEAEAE"})})]})})}},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return l},Xm:function(){return c},Z4:function(){return s},fq:function(){return u},kJ:function(){return a}});var r,i,c,o=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(c||(c={}));var u,l,a,s=(r={},(0,o.Z)(r,c.API,(function(){return"API"})),(0,o.Z)(r,c.EVENT,(function(){return"event"})),(0,o.Z)(r,c.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(u||(u={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var d=(i={},(0,o.Z)(i,a.CREATED_AT,"Created at"),(0,o.Z)(i,a.NAME,"Name"),(0,o.Z)(i,a.PIPELINE,"Pipeline"),(0,o.Z)(i,a.STATUS,"Status"),(0,o.Z)(i,a.TYPE,"Type"),i)},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},79891:function(e,n,t){"use strict";var r=t(38626),i=t(60328),c=t(67971),o=t(86673),u=t(19711),l=t(23831),a=t(22341),s=t(49125),d=t(31012),p=t(28598),f=r.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+d.Al)/2,"px;\n height: ").concat(1.5*s.iI+d.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,r=e.disabled,l=e.label,d=e.onClick,h=e.primary,g=e.small;return(0,p.jsx)(f,{border:n,primary:h,small:g,children:(0,p.jsx)(i.Z,{basic:!0,disabled:r,noBackground:!0,noPadding:!0,onClick:d,transparent:!0,children:(0,p.jsxs)(c.ZP,{alignItems:"center",children:[t,l&&(0,p.jsx)(u.ZP,{small:g,children:l}),!r&&d&&(0,p.jsx)(o.Z,{ml:1,children:(0,p.jsx)(a.x8,{default:h,muted:!h,size:g?s.iI:1.25*s.iI})})]})})})}},29237:function(e,n,t){"use strict";var r=t(38626),i=t(67971),c=t(86673),o=t(19711),u=t(23831),l=t(73942),a=t(37391),s=t(49125),d=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||u.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),g=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),v=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,l=e.dark,a=e.footer,s=e.fullHeight,p=void 0===s||s,m=e.fullWidth,x=void 0===m||m,b=e.header,j=e.headerHeight,Z=e.headerIcon,y=e.headerPaddingVertical,P=e.headerTitle,_=e.maxHeight,k=e.maxWidth,O=e.minWidth,w=e.noPadding,C=e.overflowVisible,I=e.subtitle,E=e.success;return(0,d.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:x,maxHeight:_,maxWidth:k,minWidth:O,overflowVisible:C,ref:r,success:E,children:[(b||P)&&(0,d.jsxs)(h,{headerPaddingVertical:y,height:j,children:[b&&b,P&&(0,d.jsx)(i.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(i.ZP,{alignItems:"center",children:[Z&&Z,(0,d.jsx)(c.Z,{ml:Z?1:0,children:(0,d.jsx)(o.ZP,{bold:!0,default:!0,children:P})})]})})]}),(0,d.jsxs)(g,{maxHeight:_,noPadding:w,overflowVisible:C,ref:u,children:[I&&(0,d.jsx)(c.Z,{mb:2,children:(0,d.jsx)(o.ZP,{default:!0,children:I})}),t]}),a&&(0,d.jsx)(v,{children:a})]})}},6087:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return pe}});var r=t(77837),i=t(82394),c=t(75582),o=t(38860),u=t.n(o),l=t(12691),a=t.n(l),s=t(82684),d=t(83455),p=t(34376),f=t(60328),h=t(48952),g=t(34744),v=t(67971),m=t(87372),x=t(11135),b=t(10919),j=t(51099),Z=t(60547),y=t(93348),P=t(41788),_=t(29237),k=t(86673),O=t(87815),w=t(19711),C=t(38435),I=t(82944),E=t(70902),S=t(23831),T=t(38626),A=t(73942),D=t(49125),N=T.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*D.iI,2*D.iI,A.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||S.Z).borders.light,";\n background-color: ").concat((e.theme||S.Z).background.popup,";\n ")})),M=t(90211),H=t(58122),V=t(28598);function Y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function R(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Y(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var B="".concat(D.iI,"px ").concat(3*D.iI,"px");var F=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,r=e.onSuccess,o=e.variables,u=(0,s.useState)(!1),l=u[0],a=u[1],d=(0,s.useState)({}),p=d[0],h=d[1],g=(0,s.useState)(o||{}),x=g[0],b=g[1],j=(0,s.useMemo)((function(){return R(R({},n),{},{name:(0,M.Y6)(),variables:l?(0,H.e7)(x):null})}),[n,l,x]),Z=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),b((function(t){return R(R({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,V.jsx)(C.Z,R(R({},t),{},{rows:1,value:n})):(0,V.jsx)(I.Z,R({},t))};return(0,s.useEffect)((function(){var e=Object.entries(x).reduce((function(e,n){var t=(0,c.Z)(n,2),r=t[0],o=t[1],u=(0,M.Pb)(o)&&"object"===typeof JSON.parse(o)&&!Array.isArray(JSON.parse(o))&&null!==JSON.parse(o);return R(R({},e),{},(0,i.Z)({},r,u))}),{});h(e)}),[]),(0,V.jsxs)(_.Z,{footer:(0,V.jsxs)(v.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,V.jsx)(f.Z,{onClick:function(){r({pipeline_schedule:j}),t()},padding:B,primaryAlternate:!0,children:"Run now"}),(0,V.jsx)(k.Z,{mr:1}),(0,V.jsx)(f.Z,{borderColor:S.Z.background.page,onClick:t,padding:B,secondary:!0,children:"Cancel"})]}),header:(0,V.jsx)(m.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*D.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,V.jsx)(N,{children:(0,V.jsxs)(v.ZP,{alignItems:"center",children:[(0,V.jsx)(k.Z,{mr:2,children:(0,V.jsx)(E.Z,{checked:l,onCheck:a})}),(0,V.jsx)(w.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),l&&x&&Object.entries(x).length>0&&(0,V.jsx)(k.Z,{mt:2,children:(0,V.jsx)(O.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(x).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,V.jsx)(w.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),Z(t,r)]}))})})]})},W=t(37391),z=T.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],S.Z.borders.medium,D.tr),L=T.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],W.w5),q=T.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],S.Z.background.output,A.n_,D.iI,D.tr),J=t(73899);var U=function(e){var n=e.hasOverride,t=e.scheduleType,r=e.variables,i=e.variablesOverride,o=[];return Object.entries(r).forEach((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1],u=null===i||void 0===i?void 0:i[t];o.push({uuid:t,value:(0,H.FS)(u||r)})})),(0,H.JZ)(o,t),(0,V.jsxs)(z,{children:[(0,V.jsx)(k.Z,{mb:2,children:(0,V.jsxs)(w.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,V.jsx)(L,{noScrollbarTrackBackground:!0,children:r&&o.map((function(e){var n=e.uuid,t=e.value;return(0,V.jsxs)(q,{children:[(0,V.jsx)(w.ZP,{monospace:!0,small:!0,children:n}),(0,V.jsx)(w.ZP,{color:J.Or,monospace:!0,small:!0,children:(0,H.FS)(t)})]})}))})]})},K=t(54283),Q=t(46261),X=t(97225),G=t(82531),$=t(22341),ee=t(52769),ne=t(59920),te=t(42305),re=t(24224),ie=t(7715),ce=t(9736),oe=t(96510),ue=t(59e3),le=t(99497);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 se(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,i.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 de(e){var n=e.pipeline,t=(0,p.useRouter)(),r=(0,ce.Ct)(),o=n.uuid,u=(0,s.useState)(null),l=u[0],P=u[1],_=G.ZP.variables.pipelines.list(o,{global_only:!0},{revalidateOnFocus:!1}).data,O=null===_||void 0===_?void 0:_.variables,C=(0,ue.iV)(),I=null!==C&&void 0!==C&&C.page?C.page:0,E=G.ZP.pipeline_schedules.pipelines.list(o,{_limit:j.Q,_offset:(null!==C&&void 0!==C&&C.page?C.page:0)*j.Q},{refreshInterval:7500}),S=E.data,T=E.mutate,A=(0,s.useMemo)((function(){return(null===S||void 0===S?void 0:S.pipeline_schedules)||[]}),[S]),N=function(e){return(0,d.Db)(G.ZP.pipeline_schedules.pipelines.useCreate(o),{onSuccess:function(n){return(0,oe.wD)(n,{callback:function(n){var t=n.pipeline_schedule.id;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}})},Y=N((function(e){return t.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),R=(0,c.Z)(Y,2),B=R[0],W=R[1].isLoading,z=N(T),L=(0,c.Z)(z,2),q=L[0],J=L[1].isLoading,ae=(0,s.useMemo)((function(){var e;return null===(e=(0,H.wx)(O,(function(e){return e.uuid===ee.C})))||void 0===e?void 0:e.reduce((function(e,n){var t=n.uuid,r=n.value;return se(se({},e),{},(0,i.Z)({},t,r))}),{})}),[O]),de={name:(0,M.Y6)(),schedule_interval:y.U5.ONCE,schedule_type:y.Xm.TIME,start_time:(0,te.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:y.fq.ACTIVE},pe=(0,le.dd)((function(){return(0,V.jsx)(F,{initialPipelineSchedulePayload:de,onCancel:ge,onSuccess:q,variables:ae})}),{},[O,ae],{background:!0,uuid:"run_pipeline_now_popup"}),fe=(0,c.Z)(pe,2),he=fe[0],ge=fe[1],ve=(0,s.useState)(),me=ve[0],xe=ve[1],be=(0,s.useMemo)((function(){var e=null===me||void 0===me?void 0:me.variables,n=!(0,ie.Qr)(e),t=n?null===me||void 0===me?void 0:me.variables:(0,ie.Qr)(ae)?null:ae;return function(i){var c=i.height-(t?151:80);return(0,V.jsxs)(V.Fragment,{children:[t&&(0,V.jsx)(U,{hasOverride:n,scheduleType:null===me||void 0===me?void 0:me.schedule_type,variables:ae,variablesOverride:e}),!t&&(0,V.jsxs)(k.Z,{p:D.cd,children:[(0,V.jsx)(w.ZP,{children:"This pipeline has no runtime variables."}),!r&&(0,V.jsxs)(k.Z,{mt:1,children:[(0,V.jsx)(a(),{as:"/pipelines/".concat(o,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,V.jsx)(b.Z,{primary:!0,children:"Click here"})})," ",(0,V.jsx)(w.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,V.jsx)(h.Z,se(se({},i),{},{height:c,noStatus:!0}))]})}}),[r,o,null===me||void 0===me?void 0:me.schedule_type,null===me||void 0===me?void 0:me.variables,ae]),je=(0,s.useMemo)((function(){var e;return(null===S||void 0===S||null===(e=S.metadata)||void 0===e?void 0:e.count)||[]}),[S]),Ze=G.ZP.pipeline_triggers.pipelines.list(o),ye=Ze.data,Pe=(Ze.mutate,(0,s.useMemo)((function(){return(0,re.HK)((null===ye||void 0===ye?void 0:ye.pipeline_triggers)||[],(function(e){return e.name}))}),[ye]));return(0,V.jsxs)(Z.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:be,errors:l,pageName:ne.M.TRIGGERS,pipeline:n,setErrors:P,subheaderBackgroundImage:"".concat(t.basePath,"/images/banner-shape-purple-peach.jpg"),subheaderButton:(0,V.jsx)(x.ZP,{beforeElement:(0,V.jsx)($.mm,{size:2.5*D.iI}),blackBorder:!0,inline:!0,loading:W,noHoverUnderline:!0,onClick:function(){return B({pipeline_schedule:{name:(0,M.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,V.jsx)(w.ZP,{bold:!0,large:!0,children:"Run this pipeline using a schedule, event, or API."}),title:function(e){var n=e.name;return"".concat(n," triggers")},uuid:"".concat(ne.M.TRIGGERS,"_").concat(o),children:[(0,V.jsx)(k.Z,{mt:D.cd,px:D.cd,children:(0,V.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,V.jsx)(m.Z,{level:5,children:"Pipeline triggers"}),(0,V.jsx)(Q.Z,{appearBefore:!0,default:!0,fullSize:!0,label:"Creates an @once trigger and runs pipeline immediately",widthFitContent:!0,children:(0,V.jsx)(f.Z,{beforeIcon:(0,V.jsx)($.JM,{inverted:!0,size:2*D.iI}),disabled:r,loading:J,onClick:(0,ie.Qr)(ae)?function(){return q({pipeline_schedule:de})}:he,outline:!0,success:!r,children:"Run pipeline now"})})]})}),(0,V.jsx)(g.Z,{light:!0,mt:D.cd,short:!0}),S?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(X.Z,{fetchPipelineSchedules:T,pipeline:n,pipelineSchedules:A,pipelineTriggersByName:Pe,selectedSchedule:me,setErrors:P,setSelectedSchedule:xe}),(0,V.jsx)(k.Z,{p:2,children:(0,V.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),r=se(se({},C),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(o,"/triggers?").concat((0,ue.uM)(r)))},page:Number(I),totalPages:Math.ceil(je/j.Q)})})]}):(0,V.jsx)(k.Z,{m:2,children:(0,V.jsx)(K.Z,{inverted:!0})})]})}de.getInitialProps=function(){var e=(0,r.Z)(u().mark((function e(n){var t;return u().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 pe=(0,P.Z)(de)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return b},AY:function(){return j},BP:function(){return x},JX:function(){return m},OC:function(){return d},Pc:function(){return Z},Ro:function(){return y},Tz:function(){return v},Y_:function(){return _},d$:function(){return g},jV:function(){return P},lJ:function(){return k},n1:function(){return f},s8:function(){return a},vk:function(){return c},yD:function(){return s}});var r,i,c,o=t(82394),u=t(92083),l=t.n(u);!function(e){e.TODAY="today",e.WEEK="week",e.MONTH="month"}(c||(c={}));var a=(r={},(0,o.Z)(r,c.TODAY,"today"),(0,o.Z)(r,c.WEEK,"last 7 days"),(0,o.Z)(r,c.MONTH,"last 30 days"),r),s=(i={},(0,o.Z)(i,c.TODAY,0),(0,o.Z)(i,c.WEEK,6),(0,o.Z)(i,c.MONTH,29),i),d="YYYY-MM-DD HH:mm:ss",p="YYYY-MM-DD HH:mm",f="YYYY-MM-DD",h="MMMM D, YYYY";function g(e,n){var t=n.dayAgo,r=n.includeSeconds,i=n.utcFormat,c=l()(e),o=p;return i&&(c=c.utc()),t&&(c=c.subtract(1,"days")),r&&(o=d),c.format(o)}function v(e){var n=g((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function m(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?d:p)}function x(e,n,t){return l()(e).utc().hours(+n).minutes(+t).format()}function b(e){return l()(e).unix()}function j(e,n,t,r){var i="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return r?"".concat(i,":").concat(r):i}function Z(e){var n=l().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function y(e,n){var t=l().utc(),r=l().utc();null!==n&&void 0!==n&&n.localTime&&(t=l()().local(),r=l()().local());var i=(t=t.subtract(e,"days")).format(h),c=r.format(h);return null!==n&&void 0!==n&&n.endDateOnly?c:"".concat(i," - ").concat(c)}function P(e,n){var t=null!==n&&void 0!==n&&n.localTime?l()().local():l().utc();if(e===c.WEEK){var r=s[c.WEEK];t=t.subtract(r,"days")}else if(e===c.MONTH){var i=s[c.MONTH];t=t.subtract(i,"days")}return null!==n&&void 0!==n&&n.isoString?t.startOf("day").toISOString():t.startOf("day").format(d)}function _(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90,n=new Date,t=[],r=0;r<e;r++)t.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return t}function k(e){return e.padStart(2,"0")}},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(6087)}])}},function(e){e.O(0,[844,9902,426,1774,1424,1005,7815,6422,547,8952,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|