mage-ai 0.8.11__py3-none-any.whl → 0.8.13__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (120) hide show
  1. mage_ai/api/policies/BackfillPolicy.py +4 -1
  2. mage_ai/api/policies/BlockPolicy.py +13 -0
  3. mage_ai/api/policies/SyncPolicy.py +30 -0
  4. mage_ai/api/presenters/BlockPresenter.py +12 -1
  5. mage_ai/api/presenters/SyncPresenter.py +11 -0
  6. mage_ai/api/resources/BlockResource.py +8 -1
  7. mage_ai/api/resources/SyncResource.py +43 -0
  8. mage_ai/data_preparation/executors/pipeline_executor.py +9 -0
  9. mage_ai/data_preparation/executors/streaming_pipeline_executor.py +3 -1
  10. mage_ai/data_preparation/models/block/__init__.py +5 -3
  11. mage_ai/data_preparation/models/block/integration/__init__.py +59 -0
  12. mage_ai/data_preparation/models/constants.py +1 -0
  13. mage_ai/data_preparation/preferences.py +43 -0
  14. mage_ai/data_preparation/sync/__init__.py +17 -0
  15. mage_ai/data_preparation/sync/base_sync.py +7 -0
  16. mage_ai/data_preparation/sync/git_sync.py +26 -0
  17. mage_ai/data_preparation/templates/data_loaders/streaming/kafka.yaml +5 -0
  18. mage_ai/io/export_utils.py +1 -0
  19. mage_ai/io/postgres.py +46 -4
  20. mage_ai/orchestration/db/models.py +14 -0
  21. mage_ai/orchestration/pipeline_scheduler.py +12 -4
  22. mage_ai/server/constants.py +1 -1
  23. mage_ai/server/frontend_dist/404.html +2 -2
  24. mage_ai/server/frontend_dist/404.html.html +2 -2
  25. mage_ai/server/frontend_dist/_next/static/UuQKenirO2LDcepWvj6S9/_buildManifest.js +1 -0
  26. mage_ai/server/frontend_dist/_next/static/chunks/{1830-c3f709c7ca7f32ab.js → 1830-fbc03130dc8507d5.js} +1 -1
  27. mage_ai/server/frontend_dist/_next/static/chunks/2626-74904ade5b462127.js +1 -0
  28. mage_ai/server/frontend_dist/_next/static/chunks/3573-9b7b57411a327efa.js +1 -0
  29. mage_ai/server/frontend_dist/_next/static/chunks/434-b1cbc39e987f22cd.js +1 -0
  30. mage_ai/server/frontend_dist/_next/static/chunks/4846-688b5f0a015a543a.js +1 -0
  31. mage_ai/server/frontend_dist/_next/static/chunks/5477-4d9bab807c386355.js +1 -0
  32. mage_ai/server/frontend_dist/_next/static/chunks/7281-99f836e410857a68.js +1 -0
  33. mage_ai/server/frontend_dist/_next/static/chunks/7400-26ce25ec46728ef7.js +1 -0
  34. mage_ai/server/frontend_dist/_next/static/chunks/9767-30e239ed26aa848a.js +1 -0
  35. mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-44766f29c8c5b4ce.js → _app-169f9cc923ae39a5.js} +1 -1
  36. mage_ai/server/frontend_dist/_next/static/chunks/pages/{manage-14c743a0e2549486.js → manage-91c4fd203b4ac0e2.js} +1 -1
  37. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-21fe37061bdaaaea.js → pipeline-runs-10d54d54bfd9b39c.js} +1 -1
  38. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-971ea5bb26d66155.js +1 -0
  39. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-393cec015b843dd8.js +1 -0
  40. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-2963c971fdefd159.js +1 -0
  41. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-d1490dc3ea4f2e61.js +1 -0
  42. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8f23f7ca9efcb069.js → block-runs-f513df1d43ba48f0.js} +1 -1
  43. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-393fa626a8873f74.js +1 -0
  44. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-8b08ec1aef4af4f2.js → monitors-d45f982e19978552.js} +1 -1
  45. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-463347405cafa133.js +1 -0
  46. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-a33f6fd5d91cd123.js +1 -0
  47. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-d4df695d51e01232.js +1 -0
  48. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-d83cf90749c8cd56.js +1 -0
  49. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-f6ee40bebf427cfa.js +1 -0
  50. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipelines-1c0627627c21667f.js → pipelines-db2903bdeeeae791.js} +1 -1
  51. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-19a5aa2de681b54a.js +1 -0
  52. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-e1b34b9a44fc4688.js +1 -0
  53. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync_data-4ae244876881cfe1.js +1 -0
  54. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-c128672e053a4c30.js → users-b8aeca222449e041.js} +1 -1
  55. mage_ai/server/frontend_dist/_next/static/chunks/pages/{terminal-6feb9848233a6c6e.js → terminal-482bd79cb26b8f73.js} +1 -1
  56. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-81b7327ed8e015a4.js +1 -0
  57. mage_ai/server/frontend_dist/index.html +2 -2
  58. mage_ai/server/frontend_dist/manage.html +4 -4
  59. mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
  60. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  61. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
  62. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  63. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
  64. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  65. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  66. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
  67. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
  68. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
  69. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
  70. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  71. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
  72. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  73. mage_ai/server/frontend_dist/pipelines.html +5 -5
  74. mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
  75. mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
  76. mage_ai/server/frontend_dist/settings/workspace/sync_data.html +20 -0
  77. mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
  78. mage_ai/server/frontend_dist/settings.html +2 -2
  79. mage_ai/server/frontend_dist/sign-in.html +4 -4
  80. mage_ai/server/frontend_dist/terminal.html +5 -5
  81. mage_ai/server/frontend_dist/test.html +3 -3
  82. mage_ai/server/frontend_dist/triggers.html +5 -5
  83. mage_ai/server/server.py +1 -0
  84. mage_ai/server/websocket_server.py +1 -1
  85. mage_ai/shared/config.py +4 -1
  86. mage_ai/streaming/sources/kafka.py +49 -3
  87. mage_ai/tests/data_preparation/test_templates.py +5 -0
  88. mage_ai/tests/streaming/sources/test_kafka.py +17 -0
  89. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.dist-info}/METADATA +3 -1
  90. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.dist-info}/RECORD +96 -89
  91. mage_ai/server/frontend_dist/_next/static/Bmwp0WdXRDJpCFVPOVdc9/_buildManifest.js +0 -1
  92. mage_ai/server/frontend_dist/_next/static/chunks/2249-70929b8c547bbc18.js +0 -1
  93. mage_ai/server/frontend_dist/_next/static/chunks/2426-115f8871a2e28f8c.js +0 -1
  94. mage_ai/server/frontend_dist/_next/static/chunks/434-69ddfacd3e93f2db.js +0 -1
  95. mage_ai/server/frontend_dist/_next/static/chunks/4846-b4ced91dc0e9fba9.js +0 -1
  96. mage_ai/server/frontend_dist/_next/static/chunks/5944-757b7898608a65e1.js +0 -1
  97. mage_ai/server/frontend_dist/_next/static/chunks/6579-2b5d8d39472d85c0.js +0 -1
  98. mage_ai/server/frontend_dist/_next/static/chunks/7400-1430ec3874c1fdee.js +0 -1
  99. mage_ai/server/frontend_dist/_next/static/chunks/8961-697fe5d4db44d909.js +0 -1
  100. mage_ai/server/frontend_dist/_next/static/chunks/9140-6f67e0879394373d.js +0 -1
  101. mage_ai/server/frontend_dist/_next/static/chunks/9767-3f852fd90cf7857f.js +0 -1
  102. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-678569cf24a2e10d.js +0 -1
  103. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0ed0d70bc659c236.js +0 -1
  104. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-f96da0174abb54b5.js +0 -1
  105. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-5ccc75887776efb0.js +0 -1
  106. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f83ab9de4094e1b0.js +0 -1
  107. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-73ced07cc98a4968.js +0 -1
  108. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-67d23509a0c9a1b8.js +0 -1
  109. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-4084a44baf91f30e.js +0 -1
  110. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ae970171cfe98c51.js +0 -1
  111. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-b0b91245d3299bdf.js +0 -1
  112. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-acd7ee47219fee3d.js +0 -1
  113. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-07bda506f68974fb.js +0 -1
  114. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-e0172c422c95eda9.js +0 -1
  115. /mage_ai/server/frontend_dist/_next/static/{Bmwp0WdXRDJpCFVPOVdc9 → UuQKenirO2LDcepWvj6S9}/_middlewareManifest.js +0 -0
  116. /mage_ai/server/frontend_dist/_next/static/{Bmwp0WdXRDJpCFVPOVdc9 → UuQKenirO2LDcepWvj6S9}/_ssgManifest.js +0 -0
  117. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.dist-info}/LICENSE +0 -0
  118. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.dist-info}/WHEEL +0 -0
  119. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.dist-info}/entry_points.txt +0 -0
  120. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4794],{59739:function(e,n,t){"use strict";var r=t(56669);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,n,t,o,i,c){if(c!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:i,resetWarningCache:o};return t.PropTypes=t,t}},47329:function(e,n,t){e.exports=t(59739)()},56669:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},38341:function(e,n,t){"use strict";var r=t(21831),o=t(82394),i=t(26304),c=(t(82684),t(9518)),l=t(67971),u=t(86673),a=t(19711),s=t(23831),d=t(10503),p=t(73942),f=t(49125),h=t(28598),m=["beforeIcon","checked","disabled","errorMessage","label","labelDescription","large","meta","monospace","onClick","required","small","warning","xsmall"];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 b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,o.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 v=c.default.div.withConfig({displayName:"Checkbox__CheckboxContainer",componentId:"sc-ujqx42-0"})(["display:inline-block;vertical-align:middle;cursor:pointer;"]),j=c.default.div.withConfig({displayName:"Checkbox__ErrorContainer",componentId:"sc-ujqx42-1"})(["margin-top:4px;"]),x=c.default.input.withConfig({displayName:"Checkbox__HiddenCheckbox",componentId:"sc-ujqx42-2"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;",""],(function(e){return e.notClickable&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,"\n border-color: ").concat((e.theme.content||s.Z.content).disabled,"\n\n &:hover {\n cursor: not-allowed;\n }\n ")})),O=c.default.div.withConfig({displayName:"Checkbox__StyledCheckbox",componentId:"sc-ujqx42-3"})(["border-radius:","px;height:","px;transition:all 150ms;width:","px;svg{position:relative;visibility:",";}"," "," "," "," input[disabled]{cursor:default;}"," ",""],.5*f.iI,2*f.iI,2*f.iI,(function(e){return e.checked||e.required?"visible":"hidden"}),(function(e){return e.large&&"\n svg {\n left: -4px;\n top: -8px;\n }\n "}),(function(e){return!e.checked&&"\n background-color: ".concat((e.theme.background||s.Z.background).popup,";\n border: ").concat(p.PV,"px ").concat(p.M8," ").concat((e.theme.content||s.Z.content).muted,";\n ")}),(function(e){return e.checked&&"\n background-color: ".concat((e.theme.interactive||s.Z.interactive).checked,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.required&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,";\n border-color: ").concat((e.theme.content||s.Z.content).disabled,";\n\n &:hover {\n cursor: not-allowed;\n }\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||s.Z.accent).warning,";\n border-color: ").concat((e.theme.interactive||s.Z.interactive).defaultBorder,"\n ")})),y=c.default.label.withConfig({displayName:"Checkbox__LabelStyle",componentId:"sc-ujqx42-4"})(["-ms-flex-direction:column;align-items:center;display:flex;flex-direction:column;flex-direction:row;&:hover{cursor:pointer;}"]);n.Z=function(e){var n=e.beforeIcon,t=e.checked,o=e.disabled,c=e.errorMessage,s=e.label,p=e.labelDescription,g=e.large,Z=e.meta,_=e.monospace,k=void 0!==_&&_,P=e.onClick,w=e.required,C=e.small,S=void 0!==C&&C,I=e.warning,D=e.xsmall,L=void 0!==D&&D,A=(0,i.Z)(e,m),E=I||!!(c||Z&&Z.touched&&Z.error);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(y,{onClick:function(e){e.preventDefault(),P&&P(e)},children:[(0,h.jsxs)(v,{children:[(0,h.jsx)(x,b(b({},A),{},{disabled:o?"disabled":void 0,notClickable:o})),(0,h.jsx)(O,{checked:t,disabled:o,large:g,required:w,warning:E,children:(0,h.jsx)(d.Jr,{size:f.iI*(g?3:2)})})]}),n&&(0,h.jsx)(u.Z,{ml:1,children:(0,h.jsx)(l.Z,{children:n})}),s&&(0,h.jsxs)(u.Z,{pl:1,children:["string"===typeof s&&(0,h.jsx)(a.ZP,{disabled:o,lineThrough:o,monospace:k,small:S,xsmall:L,children:s}),"string"!==typeof s&&s,p&&(0,h.jsx)(a.ZP,{muted:!0,small:!0,children:p})]})]}),(c||Z&&Z.touched&&Z.error)&&(0,h.jsx)(j,{children:(0,h.jsx)(a.ZP,{small:!0,warning:!0,children:c?(0,r.Z)(c):Z.error})})]})}},55378:function(e,n,t){"use strict";var r=t(82394),o=t(26304),i=t(82684),c=t(9518),l=t(69898),u=t(31969),a=t(49125),s=t(28598),d=["beforeIcon","children","label","multiple","placeholder"];function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var h=c.default.select.withConfig({displayName:"Select__SelectStyle",componentId:"sc-q6ezu2-0"})(["",' background-image:url("data:image/svg+xml;utf8,','");background-repeat:no-repeat;background-position:-webkit-calc(100% - ',"px) center;background-position:calc(100% - ","px) center;padding-right:","px;&:hover{cursor:pointer;}"," "," "," ",""],l.p,"\n <svg width='12' height='12' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'>\n <path\n clip-rule='evenodd'\n d='M8.0015 11.7109L14.0022 5.71017L12.588 4.29597L7.99485 8.88914L3.40754 4.34482L2 5.76567L8.0015 11.7109Z'\n fill='%23B4B8C0'\n fill-rule='evenodd'\n />\n </svg>",a.iI,a.iI,2.5*a.iI,(function(e){return!e.hasContent&&!e.showPlaceholder&&"\n color: ".concat((e.theme.content||u.Z.content).muted,";\n ")}),(function(e){return e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return e.showPlaceholder&&"\n color: ".concat((e.theme.content||u.Z.content).inverted,";\n ")})),m=function(e,n){var t=e.beforeIcon,r=e.children,i=e.label,c=e.multiple,u=e.placeholder,a=(0,o.Z)(e,d);return(0,s.jsx)(l.Z,f(f({},a),{},{beforeIcon:t,input:(0,s.jsxs)(h,f(f({multiple:c},a),{},{children:[(i||u)&&(0,s.jsx)("option",{disabled:!0,selected:!0,value:"",children:i||u}),r]})),label:i,placeholder:u,ref:n,setContentOnMount:!0,showLabelRequirement:function(e){return!!e.content}}))};n.Z=i.forwardRef(m)},44613:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return qe}});var r,o=t(77837),i=t(82394),c=t(38860),l=t.n(c),u=t(89565),a=t.n(u),s=t(12691),d=t.n(s),p=t(9518),f=t(4804),h=t(82684),m=t(86422),g=t(16634),b=t(34744),v=t(75582),j=t(60328),x=t(38341),O=t(67971),y=t(86673),Z=t(19711),_=t(2850),k=t(49125),P=p.default.div.withConfig({displayName:"indexstyle__FilterRowStyle",componentId:"sc-kvapsi-0"})(["padding-bottom:","px;padding-top:","px;"],k.iI/2,k.iI/2);!function(e){e.CRITICAL="CRITICAL",e.DEBUG="DEBUG",e.ERROR="ERROR",e.EXCEPTION="EXCEPTION",e.INFO="INFO",e.LOG="LOG",e.WARNING="WARNING"}(r||(r={}));var w,C,S=[r.CRITICAL,r.DEBUG,r.ERROR,r.EXCEPTION,r.INFO,r.LOG,r.WARNING];!function(e){e.LAST_HOUR="Last hour",e.LAST_DAY="Last day",e.LAST_WEEK="Last week",e.LAST_30_DAYS="Last 30 days",e.CUSTOM_RANGE="Custom range"}(w||(w={}));var I="_limit",D="_offset",L=20,A=[w.LAST_HOUR,w.LAST_DAY,w.LAST_WEEK,w.LAST_30_DAYS],E=(C={},(0,i.Z)(C,w.LAST_HOUR,3600),(0,i.Z)(C,w.LAST_DAY,86400),(0,i.Z)(C,w.LAST_WEEK,604800),(0,i.Z)(C,w.LAST_30_DAYS,2592e3),C),T=t(73942),R=t(73899);var N=(0,p.css)(["",""],(function(e){return"\n background-color: ".concat(function(e){var n=e.critical,t=e.debug,r=e.error,o=e.exception,i=e.info,c=e.log,l=e.warning;return n?R.Zl:t?R.EG:r?R.hl:o?R.hM:i?R.gN:c?R.Wd:l?R.$R:"transparent"}(e),";\n ")})),B=p.default.div.withConfig({displayName:"indexstyle__LogLevelIndicatorStyle",componentId:"sc-1e2zh7m-0"})([""," border-radius:","px;height:12px;width:5px;"],N,T.n_),M=t(90211),Y=t(44162),q=t(33766),W=t(24224),F=t(28598);function J(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?J(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):J(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var G=function(e){var n=e.blocks,t=e.query,r=(0,h.useContext)(p.ThemeContext),o=(0,h.useCallback)((function(e,n){var r=n.isList,o=n.resetLimitParams,i=H({},t);r?Object.entries(e).forEach((function(e){var n=(0,v.Z)(e,2),t=n[0],r=n[1],o=String(r),c="".concat(t,"[]"),l=i[c];l&&Array.isArray(l)?(l=l.map(String)).includes(o)?i[c]=(0,W.Od)(l,(function(e){return e===o})):i[c]=l.concat(o):i[c]=[o]})):i=H(H({},i),e),o&&(i._limit=L,i._offset=0),(0,q.u)(i)}),[t]),c=(0,h.useMemo)((function(){return t["level[]"]}),[t]),l=(0,h.useMemo)((function(){return t["block_type[]"]}),[t]),u=(0,h.useMemo)((function(){return t["block_uuid[]"]}),[t]),a=(0,h.useMemo)((function(){return t["pipeline_schedule_id[]"]}),[t]),s=(0,h.useMemo)((function(){return t["pipeline_run_id[]"]}),[t]),d=(0,h.useMemo)((function(){return t["block_run_id[]"]}),[t]);return(0,F.jsx)(_.M,{children:(0,F.jsxs)(y.Z,{p:k.cd,children:[(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Log level"})}),S.map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({level:e},{isList:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(c)&&(null===c||void 0===c?void 0:c.includes(String(e)))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(B,H({},(0,i.Z)({},e.toLowerCase(),!0))),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,children:(0,M.kC)(e.toLowerCase())})]})})},e)}))]}),(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Block type"})}),[m.tf.DATA_LOADER,m.tf.TRANSFORMER,m.tf.DATA_EXPORTER].map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({block_type:e},{isList:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(l)&&(null===l||void 0===l?void 0:l.includes(String(e)))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(g.Z,{color:(0,Y.qn)(e,{theme:r}).accent,size:1.5*k.iI,square:!0}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,muted:!0,monospace:!0,children:e})]})})},e)}))]}),(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Block"})}),n.filter((function(e){var n=e.type;return m.tf.SCRATCHPAD!==n})).map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({block_uuid:e.uuid},{isList:!0,resetLimitParams:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(u)&&(null===u||void 0===u?void 0:u.includes(String(e.uuid)))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(g.Z,{color:(0,Y.qn)(e.type,{blockColor:e.color,theme:r}).accent,size:1.5*k.iI,square:!0}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,monospace:!0,muted:!0,children:e.uuid})]})})},e.uuid)}))]}),(null===a||void 0===a?void 0:a.length)&&(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Trigger"})}),a.map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({pipeline_schedule_id:e},{isList:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(a)&&(null===a||void 0===a?void 0:a.includes(e))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-schedule-".concat(e))}))]}),(null===s||void 0===s?void 0:s.length)&&(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline run"})}),s.map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({pipeline_run_id:e},{isList:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(s)&&(null===s||void 0===s?void 0:s.includes(e))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-run-".concat(e))}))]}),(null===d||void 0===d?void 0:d.length)&&(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Block run"})}),d.map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({block_run_id:e},{isList:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(d)&&(null===d||void 0===d?void 0:d.includes(e))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"block-run-".concat(e))}))]})]})})},U=t(93461),X=t(11135),z=t(10919),V=t(32316),K=t(87815),Q=p.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1r43sbu-0"})([""," height:","px;width:100%;"],N,.5*k.iI),$=p.default.div.withConfig({displayName:"indexstyle__BadgeStyle",componentId:"sc-1r43sbu-1"})([""," border-radius:","px;display:inline-block;padding:","px ","px;"],N,T.BG,.25*k.iI,.5*k.iI),ee=t(10503),ne=t(92083),te=t.n(ne);function re(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 oe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?re(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):re(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ie=/([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}) (.+)/;function ce(e){var n=e.content.trim().split(ie),t=[],r=[];return n.forEach((function(e){"\n"===e?(r.length>=1&&t.push(r.join(" ").trim()),r=[]):r.filter((function(e){return e})).length<=1&&r.push(e.trim())})),t.push(r.join(" ").trim()),t.map((function(n){return function(e){var n=e.content.trim().match(ie),t=null===n||void 0===n?void 0:n[1],r=null===n||void 0===n?void 0:n[2],o={};return r&&(0,M.Pb)(r)&&(o=JSON.parse(r)),oe(oe({},e),{},{createdAt:t,data:o})}(oe(oe({},e),{},{content:n}))}))}function le(e){return e&&te().unix(e).utc().format("YYYY-MM-DD HH:mm:ss.SSS")}function ue(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 ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ue(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var se=["error","error_stack","error_stacktrace"],de={uuid:"Details"},pe={uuid:"Errors"};var fe,he,me=function(e){var n=e.log,t=e.onClose,r=(0,h.useState)(de),o=r[0],c=r[1],l=(0,h.useState)(!1),u=l[0],a=l[1],s=n.data,d=n.name,p=n.path,f=s||{},m=f.error,g=f.error_stack,x=f.error_stacktrace,_=f.level,P=f.timestamp,w=(0,i.Z)({},_.toLowerCase(),!0),C=(0,h.useMemo)((function(){var e=[["file name",d],["file path",p]];return Object.entries(s).forEach((function(n){var t=(0,v.Z)(n,2),r=t[0],o=t[1];se.includes(r)||e.push([r,o])})),x&&e.push(["error",x]),(0,W.YC)(e,(function(e){var n=(0,v.Z)(e,2),t=n[0];n[1];return t}))}),[s,x,d,p]),S=(0,h.useMemo)((function(){var e=[de];return m&&e.push(pe),(0,F.jsx)(V.Z,{onClickTab:c,selectedTabUUID:null===o||void 0===o?void 0:o.uuid,tabs:e})}),[m,g,x,o,c]);return(0,F.jsxs)("div",{children:[(0,F.jsx)(Q,ae({},w)),(0,F.jsx)(y.Z,{p:k.cd,children:(0,F.jsxs)(O.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,F.jsxs)(U.Z,{alignItems:"center",children:[(0,F.jsx)($,ae(ae({},w),{},{children:(0,F.jsx)(Z.ZP,{bold:!0,inverted:!0,monospace:!0,small:!0,children:_})})),(0,F.jsx)(y.Z,{mr:k.cd}),(0,F.jsx)(Z.ZP,{monospace:!0,children:le(P)})]}),(0,F.jsx)(j.Z,{iconOnly:!0,noBackground:!0,onClick:function(){return t()},children:(0,F.jsx)(ee.x8,{size:1.5*k.iI})})]})}),(0,F.jsx)(b.Z,{medium:!0}),(0,F.jsx)(y.Z,{py:k.cd,children:S}),de.uuid===(null===o||void 0===o?void 0:o.uuid)&&(0,F.jsx)(K.Z,{columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:null===C||void 0===C?void 0:C.map((function(e,n){var t=(0,v.Z)(e,2),r=t[0],o=t[1],i="message"===r,c="tags"===r,l=o,s=o;return c?s=l=(0,M.Pb)(o)?JSON.parse(JSON.stringify(o,null,2)):JSON.stringify(o,null,2):i&&u&&(0,M.Pb)(o)&&(s=JSON.stringify(JSON.parse(o),null,2),l=(0,F.jsx)("pre",{children:s})),[(0,F.jsx)(Z.ZP,{monospace:!0,muted:!0,children:r},"".concat(r,"_").concat(n,"_key")),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(Z.ZP,{monospace:!0,textOverflow:!0,title:s,whiteSpaceNormal:i&&u||c,wordBreak:i&&u||c,children:[!c&&l,c&&(0,F.jsx)("pre",{children:l})]},"".concat(r,"_").concat(n,"_val")),i&&(0,F.jsx)(z.Z,{muted:!0,onClick:function(){return a((function(e){return!e}))},children:u?"Click to hide log":"Click to show full log message"})]})]})),uuid:"LogDetail"}),pe.uuid===(null===o||void 0===o?void 0:o.uuid)&&(0,F.jsxs)(y.Z,{mb:5,px:k.cd,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,children:"Error"})}),null===m||void 0===m?void 0:m.map((function(e){return e.split("\n").map((function(e){return e.split("\\n").map((function(e){return(0,F.jsx)(Z.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))})),g&&(0,F.jsxs)(y.Z,{mt:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,children:"Stack trace"})}),null===g||void 0===g?void 0:g.map((function(e){return null===e||void 0===e?void 0:e.map((function(e){return(0,F.jsx)(Z.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))]})]})]})},ge=t(2626),be=t(98781),ve=t(41788),je=t(54283),xe=t(2713),Oe=t(47999),ye=t(55378),Ze=t(82944),_e=t(66166),ke=t(84779),Pe=t(42305),we=t(7715),Ce=t(59e3);function Se(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 Ie(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Se(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Se(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.START="start_timestamp",e.END="end_timestamp"}(he||(he={}));var De=(fe={},(0,i.Z)(fe,I,L),(0,i.Z)(fe,D,0),fe);var Le=function(e){var n=e.allPastLogsLoaded,t=e.loadNewerLogInterval,r=e.loadPastLogInterval,o=e.selectedRange,c=e.setSelectedRange,l=(0,h.useState)(null),u=l[0],a=l[1],s=(0,h.useState)(null),d=s[0],p=s[1],f=(0,h.useState)({hour:"00",minute:"00"}),m=f[0],g=f[1],b=(0,h.useState)(new Date),v=b[0],x=b[1],_=(0,h.useState)({hour:(0,Pe.lJ)(String((new Date).getUTCHours())),minute:(0,Pe.lJ)(String((new Date).getUTCMinutes()))}),P=_[0],C=_[1],S=(0,Ce.iV)(),I=(0,_e.Z)(S);return(0,h.useEffect)((function(){if(!(0,we.Xy)(S,I)){var e=S.start_timestamp,n=S.end_timestamp;if(e){var t=(0,Pe.Pc)(e),r=t.date,o=t.hour,i=t.minute;p(r),g({hour:(0,Pe.lJ)(o),minute:(0,Pe.lJ)(i)});var l=Math.ceil(Date.now()/1e3)-e;Math.abs(l-E[w.LAST_DAY])<=60&&c(w.LAST_DAY)}if(n){var u=(0,Pe.Pc)(n),a=u.date,s=u.hour,d=u.minute;x(a),C({hour:(0,Pe.lJ)(s),minute:(0,Pe.lJ)(d)})}}}),[S,I]),(0,F.jsx)(y.Z,{py:1,children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(X.ZP,{blackBorder:!0,disabled:n,inline:!0,onClick:r,paddingBottom:.75*k.iI,paddingTop:.75*k.iI,uuid:"logs/load_older_logs",children:n?"All past logs within range loaded":"Load older logs"}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(X.ZP,{blackBorder:!0,disabled:(null===S||void 0===S?void 0:S._offset)<=0,inline:!0,onClick:t,paddingBottom:.75*k.iI,paddingTop:.75*k.iI,uuid:"logs/load_newer_logs",children:"Load newer logs"}),(0,F.jsx)(y.Z,{mr:2}),(0,F.jsx)(ye.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault();var n=e.target.value;if(c(n),A.includes(n)){var t,r=(0,ke.JI)(E[n]);(0,q.u)(Ie((t={},(0,i.Z)(t,he.START,r),(0,i.Z)(t,he.END,null),t),De))}},paddingRight:4*k.iI,placeholder:"Select time range",value:o,children:Object.values(w).map((function(e){return(0,F.jsx)("option",{value:e,children:e},e)}))}),(0,F.jsx)(y.Z,{mr:1}),o===w.CUSTOM_RANGE&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Ze.Z,{compact:!0,defaultColor:!0,onClick:function(){return a(0)},paddingRight:0,placeholder:"Start",value:d?(0,Pe.AY)(d,null===m||void 0===m?void 0:m.hour,null===m||void 0===m?void 0:m.minute):""}),(0,F.jsx)(Oe.Z,{onClickOutside:function(){return a(null)},open:0===u,style:{position:"relative"},children:(0,F.jsx)(xe.Z,{selectedDate:d,selectedTime:m,setSelectedDate:p,setSelectedTime:g})}),(0,F.jsx)(y.Z,{px:1,children:(0,F.jsx)(Z.ZP,{children:"to"})}),(0,F.jsx)(Ze.Z,{compact:!0,defaultColor:!0,onClick:function(){return a(1)},paddingRight:0,placeholder:"End",value:v?(0,Pe.AY)(v,null===P||void 0===P?void 0:P.hour,null===P||void 0===P?void 0:P.minute):""}),(0,F.jsx)(Oe.Z,{onClickOutside:function(){return a(null)},open:1===u,style:{position:"relative"},children:(0,F.jsx)(xe.Z,{selectedDate:v,selectedTime:P,setSelectedDate:x,setSelectedTime:C})}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(j.Z,{borderRadius:k.iI/2,onClick:function(){var e,n=(0,Pe.BP)(d,m.hour,m.minute),t=(0,Pe.BP)(v,P.hour,P.minute);(0,q.u)(Ie((e={},(0,i.Z)(e,he.START,(0,Pe.A5)(n)),(0,i.Z)(e,he.END,(0,Pe.A5)(t)),e),De))},padding:"".concat(k.iI/2,"px"),primary:!0,children:"Search"})]})]})})},Ae=t(82531),Ee=t(59920);function Te(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 Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Te(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Te(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ne="log_uuid",Be="pipeline_run_id[]",Me="block_run_id[]";function Ye(e){var n=e.pipeline,t=(0,h.useContext)(p.ThemeContext),r=(0,h.useRef)(null),o=n.uuid,c=(0,h.useState)(null),l=c[0],u=c[1],s=(0,h.useState)(null),v=s[0],j=s[1],x=(0,h.useState)(null),_=x[0],P=x[1],C=(0,h.useState)(!1),S=C[0],A=C[1],T=Ae.ZP.pipelines.detail(o,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,R=(0,h.useMemo)((function(){return Re(Re({},null===T||void 0===T?void 0:T.pipeline),{},{uuid:o})}),[T,o]),N=(null===R||void 0===R?void 0:R.type)===be.q.INTEGRATION,J=(0,h.useMemo)((function(){return R.blocks||[]}),[R]),H=(0,h.useMemo)((function(){var e=(0,W.HK)(J,(function(e){return e.uuid}));if(N){var n,t=(0,W.sE)(J,(function(e){var n=e.type;return m.tf.DATA_LOADER===n})),r=t?(0,f.Qc)(t.content):{},o=((null===r||void 0===r||null===(n=r.catalog)||void 0===n?void 0:n.streams)||[]).reduce((function(e,n){var t=n.tap_stream_id,r={};return J.forEach((function(e){var n=e.uuid,o=e.type,i="".concat(n,":").concat(t);r[i]={type:o}})),Re(Re({},e),r)}),{});e=Re(Re({},o),e)}return e}),[J,N]),V=(0,Ce.iV)(),Q=!(null!==V&&void 0!==V&&V.start_timestamp)&&!(null!==V&&void 0!==V&&V.hasOwnProperty(Be)||null!==V&&void 0!==V&&V.hasOwnProperty(Me)),$=(0,ke.JI)(E[w.LAST_DAY]),ne=Ae.ZP.logs.pipelines.list(l?o:null,(0,we.gR)(Q?Re(Re({},l),{},{start_timestamp:$}):l,[Ne]),{refreshInterval:5e3}),te=ne.data,re=ne.mutate,oe=!te,ie=(0,h.useMemo)((function(){var e;if(null!==te&&void 0!==te&&null!==(e=te.logs)&&void 0!==e&&e[0]){var n,t=(null===(n=te.logs)||void 0===n?void 0:n[0])||{};return{blockRunLogs:t.block_run_logs,pipelineRunLogs:t.pipeline_run_logs,totalBlockRunLogCount:t.total_block_run_log_count,totalPipelineRunLogCount:t.total_pipeline_run_log_count}}return{blockRunLogs:[],pipelineRunLogs:[],totalBlockRunLogCount:0,totalPipelineRunLogCount:0}}),[te]),ue=ie.blockRunLogs,ae=ie.pipelineRunLogs,se=ie.totalBlockRunLogCount,de=ie.totalPipelineRunLogCount,pe=+(null===V||void 0===V?void 0:V._limit)>=se&&+(null===V||void 0===V?void 0:V._limit)>=de,fe=(0,h.useMemo)((function(){return(0,W.YC)(ue.concat(ae).reduce((function(e,n){return e.concat(ce(n))}),[]),(function(e){var n=e.data;return(null===n||void 0===n?void 0:n.timestamp)||0}))}),[ue,ae]),he=(0,h.useMemo)((function(){return fe.filter((function(e){var n=e.data,t=[];if(!l)return!0;if(l["level[]"]&&t.push(l["level[]"].includes(null===n||void 0===n?void 0:n.level)),l["block_type[]"]){var r,o,i=null===n||void 0===n?void 0:n.block_uuid;if(N)i=null===n||void 0===n||null===(o=n.block_uuid)||void 0===o?void 0:o.split(":").slice(0,2).join(":");t.push(l["block_type[]"].includes(null===(r=H[i])||void 0===r?void 0:r.type))}if(l["pipeline_run_id[]"]){var c=null===n||void 0===n?void 0:n.pipeline_run_id;t.push(l["pipeline_run_id[]"].includes(String(c)))}if(l["block_run_id[]"]){var u=null===n||void 0===n?void 0:n.block_run_id;t.push(l["block_run_id[]"].includes(String(u)))}return t.every((function(e){return e}))}))}),[H,N,fe,l]),ve=he.length,xe=(0,_e.Z)(V);(0,h.useEffect)((function(){var e;Q&&(0,q.u)((e={},(0,i.Z)(e,I,L),(0,i.Z)(e,D,0),(0,i.Z)(e,"start_timestamp",$),e))}),[Q]),(0,h.useEffect)((function(){(0,we.Xy)(V,xe)||u(V)}),[V,xe]);var Oe=(0,_e.Z)(v);(0,h.useEffect)((function(){var e=V.log_uuid;!e||v||Oe||j(fe.find((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.uuid)===e})))}),[fe,V,v,Oe]),(0,h.useEffect)((function(){var e;S&&!oe&&(null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView(),A(!1))}),[S,oe]);var ye=V._limit,Ze=V._offset,Pe=+(ye||0),Se=+(Ze||0),Ie=Math.max(se,de),De=(0,h.useCallback)((function(){var e,n=Pe,t=Se;(se>Pe||de>Pe)&&(n=Math.min(Ie,Pe+L),t=Math.min(Se+L,Ie-Ie%L),(0,q.u)(Re(Re({},V),{},(e={},(0,i.Z)(e,I,n),(0,i.Z)(e,D,t),e))))}),[Ie,Pe,Se,V,se,de]),Te=(0,h.useCallback)((function(){var e,n=Pe,t=Se;Pe>=L&&(n=Math.max(L,Pe-L),Pe>=Ie&&Ie%L!==0&&(n=Ie-Ie%L),t=Math.max(0,Se-L),(0,q.u)(Re(Re({},V),{},(e={},(0,i.Z)(e,I,n),(0,i.Z)(e,D,t),e))))}),[Ie,Pe,Se,V]);return(0,F.jsxs)(ge.Z,{after:v&&(0,F.jsx)(me,{log:v,onClose:function(){(0,q.u)((0,i.Z)({},Ne,null)),j(null)}}),afterHidden:!v,afterWidth:80*k.iI,before:(0,F.jsx)(G,{blocks:J,query:l}),beforeWidth:20*k.iI,breadcrumbs:[{label:function(){return"Logs"}}],pageName:Ee.M.PIPELINE_LOGS,pipeline:R,subheader:null,title:function(e){var n=e.name;return"".concat(n," logs")},uuid:"pipeline/logs",children:[(0,F.jsx)(y.Z,{px:k.cd,py:1,children:(0,F.jsxs)(Z.ZP,{children:[!oe&&(0,F.jsxs)(F.Fragment,{children:[(0,M.x6)(ve)," logs found",(0,F.jsx)(Le,{allPastLogsLoaded:pe,loadNewerLogInterval:Te,loadPastLogInterval:De,selectedRange:_,setSelectedRange:P})]}),oe&&"Searching..."]})}),(0,F.jsx)(b.Z,{light:!0}),oe&&(0,F.jsx)(y.Z,{p:k.cd,children:(0,F.jsx)(je.Z,{})}),!oe&&he.length>=1&&(0,F.jsx)(K.Z,{columnFlex:[null,null,1,9,null],columnMaxWidth:function(e){return 3===e?"100px":null},columns:[{label:function(){return""},uuid:"!"},{uuid:"Date"},{uuid:"Block"},{uuid:"Message"},{label:function(){return""},uuid:">"}],compact:!0,onClickRow:function(e){var n,t=he[e],r=null===(n=t.data)||void 0===n?void 0:n.uuid;l.log_uuid===r&&(r=null),(0,q.u)((0,i.Z)({},Ne,r)),j(r?t:null)},rows:null===he||void 0===he?void 0:he.map((function(e){var n,r,c,l=e.content,u=(e.createdAt,e.data),s=e.name,p=u||{},f=p.block_uuid,h=p.level,m=p.message,b=(p.pipeline_uuid,p.timestamp),v=f||s.split(".log")[0],j=v.split(":");be.q.INTEGRATION===R.type&&(v=j[0],r=j[1],c=j[2]);var x=H[v];if(x||(x=H[j[0]]),x){var _=(0,Y.qn)(x.type,{blockColor:x.color,theme:t}).accent;n=(0,F.jsx)(O.Z,{alignItems:"center",children:(0,F.jsx)(d(),{as:"/pipelines/".concat(o,"/edit?block_uuid=").concat(v),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,F.jsxs)(z.Z,{block:!0,fullWidth:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,F.jsx)(g.Z,{color:_,size:1.5*k.iI,square:!0}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsxs)(Z.ZP,{monospace:!0,children:[v,r&&": ",r&&(0,F.jsx)(Z.ZP,{default:!0,inline:!0,monospace:!0,children:r}),c>=0&&": ",c>=0&&(0,F.jsx)(Z.ZP,{default:!0,inline:!0,monospace:!0,children:c})]})]})})})}return[(0,F.jsx)(U.Z,{alignItems:"center",justifyContent:"center",children:(0,F.jsx)(B,Re({},(0,i.Z)({},null===h||void 0===h?void 0:h.toLowerCase(),!0)))},"log_type"),(0,F.jsx)(Z.ZP,{default:!0,monospace:!0,children:le(b)},"log_timestamp"),n,(0,F.jsx)(Z.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,title:m||l,children:(0,F.jsx)(a(),{children:m||l})},"log_message"),(0,F.jsx)(U.Z,{flex:1,justifyContent:"flex-end",children:(0,F.jsx)(ee._Q,{default:!0,size:2*k.iI})},"chevron_right_icon")]})),uuid:"logs"}),(0,F.jsx)(y.Z,{p:k.cd,ref:r,children:(0,F.jsx)(X.ZP,{blackBorder:!0,inline:!0,onClick:function(){A(!0),"0"===(null===V||void 0===V?void 0:V._offset)&&(null===V||void 0===V?void 0:V._limit)===String(L)?re(null):(0,q.u)({_limit:L,_offset:0})},paddingBottom:.75*k.iI,paddingTop:.75*k.iI,uuid:"logs/toolbar/load_newest",children:"Load latest logs"})})]})}Ye.getInitialProps=function(){var e=(0,o.Z)(l().mark((function e(n){var t;return l().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 qe=(0,ve.Z)(Ye)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return d},AY:function(){return p},BP:function(){return s},JX:function(){return a},OC:function(){return i},Pc:function(){return f},d$:function(){return u},lJ:function(){return h},n1:function(){return l}});var r=t(92083),o=t.n(r),i="YYYY-MM-DD HH:mm:SS",c="YYYY-MM-DD HH:mm",l="YYYY-MM-DD";function u(e,n){var t=n.utcFormat,r=n.dayAgo,i=o()(e);return t&&(i=i.utc()),r&&(i=i.subtract(1,"days")),i.format(c)}function a(e){return o().unix(e).format(c)}function s(e,n,t){return o()(e).utc().hours(+n).minutes(+t).format()}function d(e){return o()(e).unix()}function p(e,n,t){return"".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t)}function f(e){var n=o().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function h(e){return e.padStart(2,"0")}},84779:function(e,n,t){"use strict";t.d(n,{DU:function(){return c},JI:function(){return l},Jw:function(){return i}});var r=t(75582),o=function(e){var n=String(e).split("."),t=(0,r.Z)(n,2),o=t[0],i=t[1];return"".concat(o.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(i?".".concat(i):"")},i=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,t=parseFloat(e).toFixed(n);return 0===e&&(t=parseFloat(e).toFixed(0)),o(t)};function c(e){if(void 0===e)return"";var n=1===e||0===e?100*e:(100*e).toFixed(2);return"".concat(n,"%")}function l(e){var n=Math.floor(Date.now()/1e3);return e>0?n-e:n}},33766:function(e,n,t){"use strict";t.d(n,{u:function(){return s}});var r=t(75582),o=t(82394),i=t(34376),c=t.n(i),l=t(59e3);function u(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 a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.replaceParams,i=t.pushHistory,u=o?{}:(0,l.iV)();n=window.location.pathname;var s=i?c().push:c().replace,d=a(a({},u),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],o=n[1];"undefined"!==typeof o&&null!==o||delete d[t]}));var p=(0,l.uM)(d);p.length>=1&&(p="?".concat(p));var f="".concat(n.split("?")[0]).concat(p);return s(c().router.pathname,f,{shallow:!0})}},62453:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/logs",function(){return t(44613)}])}},function(e){e.O(0,[3850,2083,4804,9565,4495,9767,6579,434,9898,1830,4463,8961,9774,2888,179],(function(){return n=62453,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4947],{44162:function(n,t,e){"use strict";e.d(t,{HC:function(){return R},Kf:function(){return s},Nk:function(){return p},gE:function(){return b},jv:function(){return v},nz:function(){return f},oh:function(){return d},qn:function(){return l},t1:function(){return h},y9:function(){return m}});var r=e(9518),o=e(23831),i=e(86422),c=e(73942),u=e(49125),a=e(90880),d=68;function l(n,t){var e,r,c=((null===t||void 0===t||null===(e=t.theme)||void 0===e?void 0:e.borders)||o.Z.borders).light,u=((null===t||void 0===t||null===(r=t.theme)||void 0===r?void 0:r.monotone)||o.Z.monotone).grey500,a=t||{},d=a.blockColor,l=a.isSelected,s=a.theme;return l?c=((null===s||void 0===s?void 0:s.content)||o.Z.content).active:i.tf.TRANSFORMER===n||d===i.Lq.PURPLE?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).purple,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).purpleLight):i.tf.DATA_EXPORTER===n||d===i.Lq.YELLOW?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).yellow,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).yellowLight):i.tf.DATA_LOADER===n||d===i.Lq.BLUE?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).blue,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).blueLight):i.tf.SENSOR===n||d===i.Lq.PINK?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).pink,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).pinkLight):i.tf.DBT===n?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).dbt,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).dbtLight):d===i.Lq.TEAL?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).teal,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).tealLight):(i.tf.SCRATCHPAD===n||d===i.Lq.GREY||i.tf.CUSTOM===n&&!d)&&(c=((null===s||void 0===s?void 0:s.content)||o.Z.content).default,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).contentDefaultTransparent),{accent:c,accentLight:u}}var s=(0,r.css)([""," "," "," "," "," "," ",""],(0,a.eR)(),(function(n){return!n.selected&&!n.hasError&&"\n border-color: ".concat(l(n.blockType,n).accentLight,";\n ")}),(function(n){return n.selected&&!n.hasError&&"\n border-color: ".concat(l(n.blockType,n).accent,";\n ")}),(function(n){return!n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.accent||o.Z.accent).negativeTransparent,";\n ")}),(function(n){return n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.borders||o.Z.borders).danger,";\n ")}),(function(n){return n.dynamicBlock&&"\n border-style: dashed !important;\n "}),(function(n){return n.dynamicChildBlock&&"\n border-style: dotted !important;\n "})),p=r.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-s5rj34-0"})(["border-radius:","px;position:relative;"],c.n_),f=r.default.div.withConfig({displayName:"indexstyle__BlockHeaderStyle",componentId:"sc-s5rj34-1"})([""," border-top-left-radius:","px;border-top-right-radius:","px;border-top-style:",";border-top-width:","px;border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding:","px;position:sticky;top:-5px;"," ",""],s,c.n_,c.n_,c.M8,c.mP,c.M8,c.mP,c.M8,c.mP,u.iI,(function(n){return"\n background-color: ".concat((n.theme||o.Z).background.content,";\n ")}),(function(n){return n.zIndex&&"\n z-index: ".concat(6+(n.zIndex||0),";\n ")})),v=r.default.div.withConfig({displayName:"indexstyle__CodeContainerStyle",componentId:"sc-s5rj34-2"})([""," border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding-bottom:","px;padding-top:","px;position:relative;"," "," .line-numbers{opacity:0;}&.selected{.line-numbers{opacity:1 !important;}}"],s,c.M8,c.mP,c.M8,c.mP,u.iI,u.iI,(function(n){return"\n background-color: ".concat((n.theme.background||o.Z.background).codeTextarea,";\n ")}),(function(n){return!n.hasOutput&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom-style: ").concat(c.M8,";\n border-bottom-width: ").concat(c.mP,"px;\n ")})),b=r.default.div.withConfig({displayName:"indexstyle__BlockDivider",componentId:"sc-s5rj34-3"})(["align-items:center;display:flex;height:","px;justify-content:center;position:relative;z-index:8;bottom:","px;&:hover{"," .block-divider-inner{","}}"],2*u.iI,.5*u.iI,(function(n){return n.additionalZIndex>0&&"\n z-index: ".concat(8+n.additionalZIndex,";\n ")}),(function(n){return"\n background-color: ".concat((n.theme.text||o.Z.text).fileBrowser,";\n ")})),h=r.default.div.withConfig({displayName:"indexstyle__BlockDividerInner",componentId:"sc-s5rj34-4"})(["height 1px;width:100%;position:absolute;z-index:-1;top:","px;"],1.5*u.iI),m=r.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-s5rj34-5"})(["margin-bottom:","px;padding-bottom:","px;",""],u.cd*u.iI,u.iI,(function(n){return"\n border-bottom: 1px solid ".concat((n.theme.borders||o.Z.borders).medium,";\n padding-left: ").concat(n.normalPadding?u.iI:d,"px;\n ")})),R=r.default.div.withConfig({displayName:"indexstyle__TimeTrackerStyle",componentId:"sc-s5rj34-6"})(["bottom:","px;left:","px;position:absolute;"],1*u.iI,d)},45739:function(n,t,e){"use strict";e.d(t,{K:function(){return o}});var r=e(31969),o=function(n){var t=n||r.Z,e=t.brand,o=e.earth200,i=e.earth300,c=e.earth400,u=e.energy200,a=e.energy300,d=e.energy400,l=e.fire200,s=e.fire300,p=e.fire400,f=e.water200,v=e.water300,b=e.water400,h=e.wind200,m=e.wind300,R=e.wind400,T=t.chart;return[T.backgroundPrimary,T.backgroundSecondary,T.backgroundTertiary].concat([R,b,p,d,c,m,v,s,a,i,h,f,l,u,o])}},86422:function(n,t,e){"use strict";e.d(t,{$W:function(){return p},DA:function(){return s},HX:function(){return b},J8:function(){return v},Lq:function(){return d},Qj:function(){return h},Ut:function(){return A},V4:function(){return T},VZ:function(){return f},dO:function(){return l},f2:function(){return R},iZ:function(){return m},t6:function(){return c},tf:function(){return a}});var r,o,i,c,u=e(82394);!function(n){n.PYTHON="python",n.R="r",n.SQL="sql",n.YAML="yaml"}(c||(c={}));var a,d,l=(r={},(0,u.Z)(r,c.PYTHON,"PY"),(0,u.Z)(r,c.R,"R"),(0,u.Z)(r,c.SQL,"SQL"),(0,u.Z)(r,c.YAML,"YAML"),r);!function(n){n.CHART="chart",n.CUSTOM="custom",n.DATA_EXPORTER="data_exporter",n.DATA_LOADER="data_loader",n.DBT="dbt",n.SCRATCHPAD="scratchpad",n.SENSOR="sensor",n.TRANSFORMER="transformer"}(a||(a={})),function(n){n.BLUE="blue",n.GREY="grey",n.PINK="pink",n.PURPLE="purple",n.TEAL="teal",n.YELLOW="yellow"}(d||(d={}));var s,p=[a.CHART,a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.SCRATCHPAD,a.SENSOR,a.TRANSFORMER],f=[a.DATA_EXPORTER,a.DATA_LOADER],v=[a.DATA_EXPORTER,a.DATA_LOADER,a.TRANSFORMER],b=[a.DATA_EXPORTER,a.DATA_LOADER,a.DBT,a.TRANSFORMER],h=[a.CHART,a.SCRATCHPAD,a.SENSOR],m=[a.SCRATCHPAD];!function(n){n.EXECUTED="executed",n.FAILED="failed",n.NOT_EXECUTED="not_executed",n.UPDATED="updated"}(s||(s={}));var R=[a.DATA_EXPORTER,a.TRANSFORMER],T=(o={},(0,u.Z)(o,a.CUSTOM,"Custom"),(0,u.Z)(o,a.DATA_EXPORTER,"Data exporter"),(0,u.Z)(o,a.DATA_LOADER,"Data loader"),(0,u.Z)(o,a.SCRATCHPAD,"Scratchpad"),(0,u.Z)(o,a.SENSOR,"Sensor"),(0,u.Z)(o,a.TRANSFORMER,"Transformer"),o),A=[a.DATA_LOADER,a.TRANSFORMER,a.DATA_EXPORTER];i={},(0,u.Z)(i,a.DATA_EXPORTER,"DE"),(0,u.Z)(i,a.DATA_LOADER,"DL"),(0,u.Z)(i,a.SCRATCHPAD,"SP"),(0,u.Z)(i,a.SENSOR,"SR"),(0,u.Z)(i,a.TRANSFORMER,"TF")},68805:function(n,t,e){"use strict";e.r(t);var r=e(77837),o=e(75582),i=e(82394),c=e(38860),u=e.n(c),a=e(82684),d=e(92083),l=e.n(d),s=e(16634),p=e(67971),f=e(87372),v=e(68735),b=e(87465),h=e(41788),m=e(86673),R=e(55378),T=e(19711),A=e(82531),x=e(23831),E=e(73942),g=e(43032),O=e(92953),y=e(9518),Z=e(44162),_=e(24224),D=e(28598);function P(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function S(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?P(Object(e),!0).forEach((function(t){(0,i.Z)(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):P(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function C(n){var t=n.pipeline,e=(0,a.useContext)(y.ThemeContext),r=(0,a.useState)(null),c=r[0],u=r[1],d=t.uuid,h=A.ZP.pipelines.detail(d,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,P=(0,a.useMemo)((function(){return S(S({},null===h||void 0===h?void 0:h.pipeline),{},{uuid:d})}),[h,d]),C=A.ZP.pipeline_schedules.pipelines.list(d).data,k=(0,a.useMemo)((function(){return null===C||void 0===C?void 0:C.pipeline_schedules}),[C]),L=(0,a.useMemo)((function(){return(0,_.HK)(null===P||void 0===P?void 0:P.blocks,(function(n){return n.uuid}))||{}}),[P]),w={pipeline_uuid:d};(c||0===c)&&(w.pipeline_schedule_id=Number(c));var j=A.ZP.monitor_stats.detail("block_run_time",w),M=j.data,N=j.mutate;(0,a.useEffect)((function(){N(c)}),[N,c]);var I=((null===M||void 0===M?void 0:M.monitor_stat)||{}).stats,X=(0,a.useMemo)((function(){for(var n=new Date,t=[],e=0;e<90;e++)t.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return t}),[]),H=(0,a.useMemo)((function(){if(I)return Object.entries(I).reduce((function(n,t){var e=(0,o.Z)(t,2),r=e[0],c=e[1].data;return S(S({},n),{},(0,i.Z)({},r,X.map((function(n){return{x:n,y:n in c?[c[n]]:null}}))))}),{})}),[I]),F=(0,a.useMemo)((function(){var n=[];return n.push({bold:!0,label:function(){return"Monitors"}}),n}),[P]);return(0,D.jsx)(b.Z,{breadcrumbs:F,monitorType:O.a.BLOCK_RUNTIME,pipeline:P,subheader:(0,D.jsx)(p.Z,{children:(0,D.jsxs)(R.Z,{backgroundColor:x.Z.interactive.defaultBackground,label:"Trigger:",onChange:function(n){var t=n.target.value;"initial"!==t?(u(t),N(t)):(N(),u(null))},value:c||"initial",children:[(0,D.jsx)("option",{value:"initial",children:"All"}),k&&k.map((function(n){return(0,D.jsx)("option",{value:n.id,children:n.name},n.id)}))]})}),children:(0,D.jsx)(m.Z,{mx:2,children:H&&Object.entries(H).map((function(n,t){var r,i,c=(0,o.Z)(n,2),u=c[0],a=c[1];return(0,D.jsxs)(m.Z,{mt:2,children:[(0,D.jsxs)(p.Z,{alignItems:"center",children:[(0,D.jsx)(m.Z,{mx:1,children:(0,D.jsx)(s.Z,{color:(0,Z.qn)(null===(r=L[u])||void 0===r?void 0:r.type,{blockColor:null===(i=L[u])||void 0===i?void 0:i.color,theme:e}).accent,size:g.ZG,square:!0})}),(0,D.jsx)(f.Z,{level:4,children:u})]}),(0,D.jsx)("div",{style:{backgroundColor:x.Z.background.chartBlock,borderRadius:"".concat(E.TR,"px"),marginTop:"8px"},children:(0,D.jsx)(v.Z,{data:a,getX:function(n){return l()(n.x).valueOf()},gridProps:{stroke:"black",strokeDasharray:null,strokeOpacity:.2},height:200,hideGridX:!0,margin:{top:10,bottom:30,left:35,right:-1},noCurve:!0,renderXTooltipContent:function(n){return(0,D.jsx)(T.ZP,{center:!0,inverted:!0,small:!0,children:l()(n.x).format("MMM DD")})},renderYTooltipContent:function(n){var t,e=null===n||void 0===n||null===(t=n.y)||void 0===t?void 0:t[0];return void 0!==e&&(0,D.jsxs)(T.ZP,{center:!0,inverted:!0,small:!0,children:[e.toFixed?e.toFixed(3):e,"s"]})},thickStroke:!0,xLabelFormat:function(n){return l()(n).format("MMM DD")},xLabelRotate:!1})})]},"".concat(u,"_").concat(t))}))})})}C.getInitialProps=function(){var n=(0,r.Z)(u().mark((function n(t){var e;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=t.query.pipeline,n.abrupt("return",{pipeline:{uuid:e}});case 2:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}(),t.default=(0,h.Z)(C)},76017:function(n,t,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/monitors/block-runtime",function(){return e(68805)}])}},function(n){n.O(0,[3662,3850,2083,5896,2714,9832,9767,6579,434,9898,1830,2249,6641,9774,2888,179],(function(){return t=76017,n(n.s=t);var t}));var t=n.O();_N_E=t}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8662],{62976:function(e,n,t){"use strict";t.d(n,{Z:function(){return H}});var r=t(82394),i=t(21831),o=t(82684),u=t(10919),c=t(12691),l=t.n(c),a=t(34376),d=t.n(a),s=t(9518),p=t(63068),f=t(44628),h=t(6508),m=t(67971),v=t(19711),g=t(23831),b=t(31969),y=function(){var e=document.createElement("div");e.setAttribute("style","width: 100px; height: 100px; overflow: scroll; position:absolute; top:-9999px;"),document.body.appendChild(e);var n=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),n},O=t(2005),x=t(31012),w=t(37391),j=t(6753),P=t(49125),Z=t(20567),E=t(24224),S=t(28598);function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function _(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var D=2*P.iI+x.dN,I=20*P.iI,N=s.default.div.withConfig({displayName:"DataTable__Styles",componentId:"sc-1arr863-0"})([""," "," "," .body > div{","}.table{border-spacing:0;display:inline-block;"," "," "," "," .tr{.td.td-index-column{","}}.th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;","}.th,.td{"," font-family:",";margin:0;","}.td{padding:","px;}&.sticky{overflow:auto;}.header{overflow:hidden;}}"],(function(e){return e.disableScrolling&&"\n overflow: hidden;\n "}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,"px;\n ")}),w.w5,(function(e){return!e.noBorderBottom&&"\n border-bottom: 1px solid ".concat((e.theme.borders||b.Z.borders).medium,";\n ")}),(function(e){return!e.noBorderLeft&&"\n border-left: 1px solid ".concat((e.theme.borders||b.Z.borders).medium,";\n ")}),(function(e){return!e.noBorderRight&&"\n border-right: 1px solid ".concat((e.theme.borders||b.Z.borders).medium,";\n ")}),(function(e){return!e.noBorderTop&&"\n border-top: 1px solid ".concat((e.theme.borders||b.Z.borders).medium,";\n ")}),(function(e){return"\n color: ".concat((e.theme.content||b.Z.content).default,";\n ")}),(function(e){return"\n height: ".concat(e.columnHeaderHeight||D,"px;\n ")}),x.iD,O.ry,(function(e){return"\n background-color: ".concat((e.theme.background||b.Z.background).table,";\n border-bottom: 1px solid ").concat((e.theme.borders||b.Z.borders).medium,";\n border-right: 1px solid ").concat((e.theme.borders||b.Z.borders).medium,";\n ")}),1*P.iI);function T(e){var n=e.original,t=8.5*Math.max.apply(Math,(0,i.Z)(n.map((function(e){return(null===e||void 0===e?void 0:e.length)||0})))),r=Math.ceil(t/(I-2*P.iI));return Math.max(r,1)*x.dN+2*P.iI}function C(e){var n=e.columnHeaderHeight,t=e.columns,r=e.data,c=e.disableScrolling,a=e.height,w=e.index,k=e.invalidValues,N=e.maxHeight,C=e.numberOfIndexes,H=e.previewIndexes,R=e.renderColumnHeader,M=e.width,B=(0,o.useContext)(s.ThemeContext),A=(0,o.useRef)(null),L=(0,o.useRef)(null);(0,o.useEffect)((function(){var e=function(e){var n;null===A||void 0===A||null===(n=A.current)||void 0===n||n.scroll(e.target.scrollLeft,0)};return L&&L.current.addEventListener("scroll",e),function(){var n;null===L||void 0===L||null===(n=L.current)||void 0===n||n.removeEventListener("scroll",e)}}),[A,L]);var U=(0,o.useMemo)((function(){return w&&r&&w.length===r.length}),[r,w]),F=(0,o.useMemo)((function(){var e=[];return(0,E.w6)(C).forEach((function(n,t){var o=8.7*String(null===r||void 0===r?void 0:r.length).length;if(U){var u=w.map((function(e){return C>=2?String(e[t]).length:String(e).length}));o=8.7*Math.max.apply(Math,(0,i.Z)(u))}e.push(o+2*P.iI)})),e}),[r,w,C,U]),V=t.map((function(e){return null===e||void 0===e?void 0:e.Header})).slice(1),G=(0,o.useMemo)((function(){return y()}),[]),X=(0,o.useMemo)((function(){var e=M-(Math.max.apply(Math,(0,i.Z)(F))+1.5*P.iI+G),n=t.length-1,r=I;return r*n<e&&(r=e/n),{width:r}}),[t,F,G,M]),W=(0,f.useTable)({columns:t,data:r,defaultColumn:X},f.useBlockLayout,h.useSticky),J=W.getTableBodyProps,Y=W.getTableProps,q=W.headerGroups,z=W.prepareRow,Q=W.rows,$=d().query.slug,K=void 0===$?[]:$,ee=new Set((null===H||void 0===H?void 0:H.removedRows)||[]),ne=(0,o.useCallback)((function(e){var n=e.index,t=e.style,r=Q[n];z(r);var i=r.original,c=ee.has(n);return(0,S.jsx)("div",_(_({},r.getRowProps({style:_(_({},t),{},{width:"auto"})})),{},{className:"tr",children:r.cells.map((function(e,t){var r,a=t<=C-1,d=e.getCellProps(),s=e.column.id,p=null===k||void 0===k||null===(r=k[s])||void 0===r?void 0:r.includes(n),f=_({},d.style);a&&(f.fontFamily=O.Vp,f.left=0,f.position="sticky",f.textAlign=w?"right":"center",f.width=F[t]);var h,g=i[t-C],y=V.indexOf(s);if(p&&(f.color=b.Z.interactive.dangerBorder),c&&(f.backgroundColor=b.Z.background.danger),Array.isArray(g)||"object"===typeof g)try{g=JSON.stringify(g)}catch(x){g="Error: cannot display value"}return a&&(U?(h=w[n],Array.isArray(h)&&(h=h[t])):h=e.render("Cell")),(0,o.createElement)("div",_(_({},d),{},{className:"td ".concat(a?"td-index-column":""),key:"".concat(t,"-").concat(g),style:f}),h,!a&&(0,S.jsxs)(m.Z,{justifyContent:"space-between",children:[(0,S.jsxs)(v.ZP,{danger:p,default:!0,wordBreak:!0,children:[!0===g&&"true",!1===g&&"false",(null===g||"null"===g)&&"null",!0!==g&&!1!==g&&null!==g&&"null"!==g&&g]}),p&&(0,S.jsx)(l(),{as:(0,Z.o_)(j.mW,y),href:"/datasets/[...slug]",passHref:!0,children:(0,S.jsx)(u.Z,{danger:!0,children:"View all"})})]}))}))}))}),[w,k,F,C,z,Q,K]),te=(0,o.useMemo)((function(){var e;return N?(e=(0,E.Sm)(Q.map(T)),e+=n||D-x.dN):(e=a,e-=n||D),e}),[n,T,a,N,Q]),re=(0,o.useMemo)((function(){return(0,S.jsx)(p.S_,{estimatedItemSize:D,height:te,itemCount:null===Q||void 0===Q?void 0:Q.length,itemSize:function(e){return T(Q[e])},outerRef:L,style:{maxHeight:N,pointerEvents:c?"none":null},children:ne})}),[te,L,ne,Q]);return(0,S.jsx)("div",_(_({},Y()),{},{className:"table sticky",style:{width:M},children:(0,S.jsxs)("div",_(_({},J()),{},{className:"body",children:[(0,S.jsx)("div",{className:"header",ref:A,children:q.map((function(e,n){return(0,o.createElement)("div",_(_({},e.getHeaderGroupProps()),{},{className:"tr",key:"".concat(e.id,"_").concat(n)}),e.headers.map((function(e,n){var t,r=n<=C-1,i=e.getHeaderProps(),u=_({},i.style);return r?(u.fontFamily=O.Vp,u.left=0,u.position="sticky",u.textAlign="center",u.width=F[n],u.minWidth=F[n]):R?t=R(e,n-C,{width:X.width}):(t=e.render("Header"),u.color=(B||g.Z).content.default,u.padding=1*P.iI,u.minWidth=X.width),(0,o.createElement)("div",_(_({},i),{},{className:"th",key:e.id,style:u,title:r?"Row number":void 0}),t)})))}))}),re]}))}))}var H=function(e){var n=e.columnHeaderHeight,t=e.columns,i=e.disableScrolling,u=e.height,c=e.index,l=e.invalidValues,a=e.maxHeight,d=e.noBorderBottom,s=e.noBorderLeft,p=e.noBorderRight,f=e.noBorderTop,h=e.previewIndexes,m=e.renderColumnHeader,v=e.rows,g=e.width,b=(0,o.useMemo)((function(){return null!==c&&void 0!==c&&c.length&&Array.isArray(c[0])?c[0].length:1}),[c]),y=(0,o.useMemo)((function(){return(0,E.w6)(b).map((function(e,n){return{Header:(0,E.w6)(n+1).map((function(){return" "})).join(" "),accessor:function(e,n){return n},sticky:"left"}})).concat(null===t||void 0===t?void 0:t.map((function(e){return{Header:String(e),accessor:String(e)}})))}),[t,b]);return(0,o.useMemo)((function(){return null===v||void 0===v?void 0:v.map((function(e){return e.reduce((function(e,n,i){return _(_({},e),{},(0,r.Z)({},t[i],n))}),{})}))}),[t,v]),(0,S.jsx)(N,{columnHeaderHeight:n,disableScrolling:i,height:u,maxHeight:(a||0)+37,noBorderBottom:d,noBorderLeft:s,noBorderRight:p,noBorderTop:f,children:(0,S.jsx)(C,{columnHeaderHeight:n,columns:y,data:v,disableScrolling:i,height:u,index:c,invalidValues:l,maxHeight:a,numberOfIndexes:b,previewIndexes:h,renderColumnHeader:m,width:g})})}},64155:function(e,n,t){"use strict";t.d(n,{Eh:function(){return l},ht:function(){return d},t0:function(){return a}});var r=t(9518),i=t(82386),o=t(1286),u=t(31012),c=t(49125),l=(c.iI,o.O$+3*c.iI+u.dN),a=r.default.div.withConfig({displayName:"indexstyle__SidekickContainerStyle",componentId:"sc-15ofupc-0"})(["position:relative;width:fit-content;"," ",""],(function(e){return"\n height: calc(100vh - ".concat(i.uX,"px - ").concat(e.heightOffset,"px);\n ")}),(function(e){return e.fullWidth&&"\n width: 100%;\n "})),d=r.default.div.withConfig({displayName:"indexstyle__PaddingContainerStyle",componentId:"sc-15ofupc-1"})(["padding:","px;",""],2*c.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}))},19395:function(e,n,t){"use strict";t.d(n,{IJ:function(){return d},Vx:function(){return p},eI:function(){return s},gU:function(){return h},tL:function(){return f},vJ:function(){return m}});var r,i,o=t(82394),u=t(92083),c=t.n(u);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 a(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,o.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 d(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,i=n.started_at,u=n.status,l=null;i&&r&&(l=c()(r).valueOf()-c()(i).valueOf());return a(a({},e),{},(0,o.Z)({},t,{runtime:l,status:u}))}),{})}function s(e){if(!e)return null;var n=new Date(c()(e).valueOf()),t=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(t)}function p(e){return s(e).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(i||(i={}));var f=(r={},(0,o.Z)(r,i.DAY,86400),(0,o.Z)(r,i.HOUR,3600),(0,o.Z)(r,i.MINUTE,60),(0,o.Z)(r,i.SECOND,1),r);function h(e){var n=i.SECOND,t=e;return e%86400===0?(t/=86400,n=i.DAY):e%3600===0?(t/=3600,n=i.HOUR):e%60===0&&(t/=60,n=i.MINUTE),{time:t,unit:n}}function m(e,n){return e*f[n]}},82635:function(e,n,t){"use strict";var r,i;t.d(n,{Gi:function(){return i},jU:function(){return u},uF:function(){return r}}),function(e){e.BUSY="busy",e.IDLE="idle",e.QUEUED="queued"}(r||(r={})),function(e){e.IMAGE_PNG="image/png",e.PROGRESS="progress",e.TABLE="table",e.TEXT="text",e.TEXT_HTML="text/html",e.TEXT_PLAIN="text/plain"}(i||(i={}));var o,u=[i.TEXT,i.TEXT_PLAIN];!function(e){e.DISPLAY_DATA="display_data",e.STATUS="status",e.STREAM="stream",e.STREAM_PIPELINE="stream_pipeline"}(o||(o={}))},47409:function(e,n,t){"use strict";t.d(n,{D:function(){return u},V:function(){return o}});var r,i=t(82394),o=t(66050).V,u=(r={},(0,i.Z)(r,o.CANCELLED,"Cancelled"),(0,i.Z)(r,o.COMPLETED,"Done"),(0,i.Z)(r,o.FAILED,"Failed"),(0,i.Z)(r,o.INITIAL,"Ready"),(0,i.Z)(r,o.RUNNING,"Running"),r)},23588:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return L}});var r=t(77837),i=t(75582),o=t(82394),u=t(38860),c=t.n(u),l=t(82684),a=t(83455),d=t(27125),s=t(60328),p=t(34744),f=t(87372),h=t(2626),m=t(47409),v=t(41788),g=t(86673),b=t(82531),y=t(26304),O=t(62976),x=t(86532),w=t(67971),j=t(54283),P=t(19711),Z=t(82635),E=t(64155),S=t(19395),k=t(90211),_=t(28598),D=["blockRuns","columns","dataType","height","heightOffset","loadingData","pipeline","renderColumnHeader","rows","selectedRun","textData"];function I(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 N(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var T=t(59920),C=t(49125),H=t(96510),R=t(66653);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 B(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,o.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 A(e){var n,t=e.pipeline,r=e.pipelineRun,o=(0,l.useState)(),u=o[0],c=o[1],v=t.uuid,I=b.ZP.pipelines.detail(v,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,M=(0,l.useMemo)((function(){return B(B({},null===I||void 0===I?void 0:I.pipeline),{},{uuid:v})}),[I,v]),A=b.ZP.pipeline_runs.detail(r.id,{},{refreshInterval:3e3,revalidateOnFocus:!0}).data,L=(0,l.useMemo)((function(){return null===A||void 0===A?void 0:A.pipeline_run}),[A]),U=(0,a.Db)(b.ZP.pipeline_runs.useUpdate(null===L||void 0===L?void 0:L.id),{onSuccess:function(e){return(0,H.wD)(e,{onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),F=(0,i.Z)(U,2),V=F[0],G=F[1].isLoading,X=b.ZP.outputs.block_runs.list(null===u||void 0===u?void 0:u.id),W=X.data,J=X.loading,Y=(null===W||void 0===W||null===(n=W.outputs)||void 0===n?void 0:n[0])||{},q=Y.sample_data,z=Y.text_data,Q=Y.type,$=(0,l.useMemo)((function(){return null===L||void 0===L?void 0:L.block_runs}),[L]),K=((null===q||void 0===q?void 0:q.columns)||[]).slice(0,40),ee=(null===q||void 0===q?void 0:q.rows)||[],ne=(0,l.useMemo)((function(){return(0,_.jsx)(d.Z,{blockRuns:$,onClickRow:function(e){return c((function(n){var t=$[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipeline:M,selectedRun:u})}),[$,M,u]);return(0,_.jsxs)(h.Z,{breadcrumbs:[{label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(v,"/runs"),href:"/pipelines/[pipeline]/runs"}},{label:function(){return null===L||void 0===L?void 0:L.execution_date}}],buildSidekick:function(e){return function(e){var n=e.blockRuns,t=e.columns,r=e.dataType,i=e.height,o=e.heightOffset,u=e.loadingData,c=e.pipeline,l=e.renderColumnHeader,a=e.rows,d=e.selectedRun,s=e.textData,p=N({},(0,y.Z)(e,D));p.blockStatus=(0,S.IJ)(n);var h=(0,_.jsx)(g.Z,{ml:2,children:(0,_.jsx)(P.ZP,{children:"This block run has no output."})}),m=a&&a.length>0?(0,_.jsx)(O.Z,{columnHeaderHeight:l?E.Eh:0,columns:t,height:i-o-90,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,renderColumnHeader:l,rows:a}):h,v=(0,k.Pb)(s)?JSON.stringify(JSON.parse(s),null,2):s,b=s?(0,_.jsx)(g.Z,{ml:2,children:(0,_.jsx)(P.ZP,{monospace:!0,children:(0,_.jsx)("pre",{children:v})})}):h;return(0,_.jsxs)(_.Fragment,{children:[!d&&(0,_.jsx)(x.Z,N(N({},p),{},{height:i,heightOffset:o||0,pipeline:c})),d&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(g.Z,{pl:2,py:3,style:{position:"fixed"},children:(0,_.jsx)(f.Z,{level:4,muted:!0,children:"Block Output"})}),(0,_.jsxs)("div",{style:{position:"relative",top:"75px"},children:[u&&(0,_.jsx)(g.Z,{mt:2,children:(0,_.jsx)(w.Z,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,_.jsx)(j.Z,{color:"white",large:!0})})}),!u&&r===Z.Gi.TABLE&&m,!u&&r!==Z.Gi.TABLE&&b]})]})]})}(B(B({},e),{},{blockRuns:$,columns:K,dataType:Q,loadingData:J,rows:ee,selectedRun:u,showDynamicBlocks:!0,textData:z}))},pageName:T.M.RUNS,pipeline:M,subheader:(null===L||void 0===L?void 0:L.status)&&L.status!==m.V.COMPLETED&&(0,_.jsx)(s.Z,{danger:!0,loading:G,onClick:function(e){(0,R.j)(e),V({pipeline_run:{pipeline_run_action:"retry_blocks"}})},outline:!0,children:"Retry incomplete blocks"}),title:function(e){var n=e.name;return"".concat(n," runs")},uuid:"".concat(T.M.RUNS,"_").concat(v,"_").concat(null===L||void 0===L?void 0:L.id),children:[(0,_.jsx)(g.Z,{mt:C.cd,px:C.cd,children:(0,_.jsx)(f.Z,{level:5,children:"Block runs"})}),(0,_.jsx)(p.Z,{light:!0,mt:C.cd,short:!0}),ne]})}A.getInitialProps=function(){var e=(0,r.Z)(c().mark((function e(n){var t,r,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query,r=t.pipeline,i=t.run,e.abrupt("return",{pipeline:{uuid:r},pipelineRun:{id:i}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var L=(0,v.Z)(A)},39525:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs/[run]",function(){return t(23588)}])}},function(e){e.O(0,[3850,2083,5896,4804,1774,5872,2125,9767,6579,434,1830,4463,6532,1286,5944,9774,2888,179],(function(){return n=39525,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[244],{59739:function(e,n,t){"use strict";var i=t(56669);function r(){}function u(){}u.resetWarningCache=r,e.exports=function(){function e(e,n,t,r,u,o){if(o!==i){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:u,resetWarningCache:r};return t.PropTypes=t,t}},47329:function(e,n,t){e.exports=t(59739)()},56669:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},56681:function(e,n,t){"use strict";t.d(n,{G:function(){return x},Z:function(){return y}});var i=t(75582),r=t(82394),u=t(26304),o=t(32316),l=t(22673),c=t(86532),a=t(86673),s=t(19711),d=t(87815),p=t(49125),f=t(19395),v=t(28598),h=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var m={uuid:"Run details"},j={uuid:"Dependency tree"},x=[j,m];function y(e){var n=e.height,t=e.heightOffset,r=e.pipeline,b=e.selectedRun,y=e.selectedTab,_=e.setSelectedTab,O=g({},(0,u.Z)(e,h));b?O.blockStatus=(0,f.IJ)(null===b||void 0===b?void 0:b.block_runs):O.noStatus=!0;var w=(null===b||void 0===b?void 0:b.variables)||{};null!==b&&void 0!==b&&b.event_variables&&(w.event=b.event_variables);var Z=[];w&&JSON.stringify(w,null,2).split("\n").forEach((function(e){Z.push(" ".concat(e))}));var P=b&&[["Run ID",null===b||void 0===b?void 0:b.id],["Variables",(0,v.jsx)(l.Z,{language:"json",small:!0,source:Z.join("\n")})]],k=b&&(0,v.jsx)(a.Z,{pb:p.cd,px:p.cd,children:(0,v.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:P.map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return[(0,v.jsx)(s.ZP,{monospace:!0,muted:!0,children:t}),(0,v.jsx)(s.ZP,{monospace:!0,textOverflow:!0,children:r})]})),uuid:"LogDetail"})}),S=y&&_;return(0,v.jsxs)(v.Fragment,{children:[S&&(0,v.jsx)(a.Z,{py:p.cd,children:(0,v.jsx)(o.Z,{onClickTab:_,selectedTabUUID:null===y||void 0===y?void 0:y.uuid,tabs:x})}),(!S||j.uuid===(null===y||void 0===y?void 0:y.uuid))&&(0,v.jsx)(c.Z,g(g({},O),{},{height:n,heightOffset:(t||0)+(S?76:0),pipeline:r})),m.uuid===(null===y||void 0===y?void 0:y.uuid)&&k]})}},22673:function(e,n,t){"use strict";var i=t(82684),r=t(73199),u=t.n(r),o=t(71593),l=t(9518),c=t(65292),a=t(23831),s=t(2005),d=t(49125),p=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,r=e.showLineNumbers,f=e.small,v=e.source,h=e.wrapLines,b=(0,i.useContext)(l.ThemeContext);return(0,p.jsx)(u(),{source:v,renderers:{code:function(e){var i=e.value;return(0,p.jsx)(o.Z,{customStyle:{backgroundColor:(b.background||a.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:s.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,paddingBottom:2*d.iI,paddingTop:2*d.iI,maxWidth:t},lineNumberStyle:{color:(b.content||a.Z.content).muted},language:n,showLineNumbers:r,style:c._4,useInlineStyles:!0,wrapLines:h,children:i})}}})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return h}});var i=t(82684),r=t(60328),u=t(67971),o=t(882),l=t(86673),c=t(99994),a=t(9518),s=t(49125),d=t(37391),p=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],s.cd*s.iI,s.cd*s.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),d.w5),f=t(66653),v=t(28598);var h=function(e){var n=e.allowScroll,t=e.contained,a=e.noPadding,d=e.onClickTab,h=e.selectedTabUUID,b=e.small,g=e.tabs,m=(0,i.useMemo)((function(){var e=g.length,n=[];return g.forEach((function(t,i){var a=t.Icon,p=t.IconSelected,g=t.label,m=t.uuid,j=m===h,x=j&&p||a,y=g?g():m,_=(0,v.jsxs)(u.Z,{alignItems:"center",children:[x&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(x,{default:!j,size:2*s.iI}),(0,v.jsx)(l.Z,{mr:1})]}),y]});i>=1&&e>=2&&n.push((0,v.jsx)("div",{style:{marginLeft:1.5*s.iI}},"spacing-".concat(m))),j?n.push((0,v.jsx)(o.Z,{backgroundGradient:c.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:b,onClick:function(e){(0,f.j)(e),d(t)},paddingUnitsHorizontal:2,paddingUnitsVertical:1.25,small:b,children:_},m)):n.push((0,v.jsx)("div",{style:{padding:4},children:(0,v.jsx)(r.Z,{borderLess:!0,compact:b,default:!0,onClick:function(e){(0,f.j)(e),d(t)},outline:!0,small:b,children:_},"button-tab-".concat(m))}))})),n}),[d,h,g]),j=(0,v.jsx)(u.Z,{alignItems:"center",children:m});return t?j:(0,v.jsx)(p,{allowScroll:n,noPadding:a,children:j})}},77980:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return F}});var i=t(77837),r=t(82394),u=t(38860),o=t.n(u),l=t(82684),c=t(34376),a=t(16953),s=t(27125),d=t(32316),p=t(67971),f=t(9518),v=t(23831),h=f.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:2;",""],(function(e){return"\n background-color: ".concat(e.backgroundColor||(e.theme.background||v.Z.background).page,";\n border-bottom: 1px solid ").concat((e.theme.borders||v.Z.borders).medium,";\n ")})),b=t(51099),g=t(2626),m=t(28598);var j=function(e){var n=e.size;return(0,m.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,m.jsx)("g",{"clip-path":"url(#clip0_3007_70027)",children:(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75 6.6859C1.75 3.95988 3.95988 1.75 6.6859 1.75h.98788c-.23022.41608-.36128.89466-.36128 1.40385s.13106.98777.36128 1.40384h-.71224c-1.32761 0-2.40385 1.07624-2.40385 2.40385 0 1.32761 1.07624 2.40385 2.40385 2.40385H15.609c3.3916 0 6.141 2.74941 6.141 6.14101 0 3.3916-2.7494 6.141-6.141 6.141H9.55584c.23019-.416.36123-.8946.36123-1.4037 0-.5092-.13108-.9879-.36134-1.404H15.609c1.8409 0 3.3333-1.4923 3.3333-3.3333 0-1.8409-1.4924-3.3333-3.3333-3.3333H6.96154C4.08329 12.1731 1.75 9.83979 1.75 6.96154V6.6859zM10.2163.25H6.6859C3.13145.25.25 3.13145.25 6.6859v.27564c0 3.70666 3.00486 6.71156 6.71154 6.71156H15.609c1.0125 0 1.8333.8208 1.8333 1.8333s-.8208 1.8333-1.8333 1.8333H7.01282c-1.60375 0-2.90385 1.3001-2.90385 2.9039 0 1.3248.88713 2.4423 2.09974 2.7911.06039.0173.12158.0328.18352.0463.20007.0436.40785.0665.62099.0665l.02449-.0001H15.609c4.22 0 7.641-3.421 7.641-7.641 0-4.22-3.421-7.64101-7.641-7.64101H6.96154c-.49918 0-.90385-.40467-.90385-.90385 0-.49918.40467-.90385.90385-.90385h3.25636c1.6038 0 2.9039-1.30009 2.9039-2.90384 0-1.60375-1.3001-2.903849-2.9039-2.90385h-.0016zm0 4.30769c-.77528 0-1.4038-.62852-1.4038-1.40384 0-.77505.62808-1.4034 1.403-1.40385h.0017c.7749.00045 1.403.6288 1.403 1.40385 0 .77532-.6285 1.40384-1.4039 1.40384zM7.01282 21.6474c-.10108 0-.19967-.0106-.29469-.0309-.03025-.0065-.06014-.0139-.08963-.0223-.58829-.1673-1.01912-.7086-1.01912-1.3505 0-.7753.62852-1.4039 1.40384-1.4039s1.40385.6286 1.40385 1.4039c0 .7696-.61935 1.3946-1.38683 1.4037h-.01742z",fill:"url(#paint0_linear_3007_70027)"})}),(0,m.jsxs)("defs",{children:[(0,m.jsxs)("linearGradient",{id:"paint0_linear_3007_70027",x1:"11.75",y1:".250001",x2:"11.75",y2:"23.1475",gradientUnits:"userSpaceOnUse",children:[(0,m.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,m.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]}),(0,m.jsx)("clipPath",{id:"clip0_3007_70027",children:(0,m.jsx)("path",{fill:"#fff",transform:"matrix(0 1 1 0 0 0)",d:"M0 0h24v24H0z"})})]})]})},x=t(47409),y=t(97496),_=t(41788),O=t(55378),w=t(86673),Z=t(82531),P=t(56681),k=t(66166),S=t(10503),I=t(59920),T=t(66050),C=t(49125),R=t(33766),E=t(7715),D=t(59e3);function N(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?N(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var U={Icon:S.mR,IconSelected:j,label:function(){return"Pipeline runs"},uuid:"pipeline_runs"},H={Icon:S.Re,IconSelected:a.Z,label:function(){return"Block runs"},uuid:"block_runs"},z=[U,H];function L(e){var n=e.pipeline,t=(0,c.useRouter)(),i=(0,l.useState)(U),r=i[0],u=i[1],o=(0,l.useState)(P.G[0]),a=o[0],f=o[1],v=(0,l.useState)(null),j=v[0],_=v[1],S=n.uuid,N=Z.ZP.pipelines.detail(S,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,L=(0,l.useMemo)((function(){return M(M({},null===N||void 0===N?void 0:N.pipeline),{},{uuid:S})}),[N,S]),F=Z.ZP.block_runs.list((0,E.gR)(j,["tab"]),{},{pauseFetch:!j}).data,V=(0,l.useMemo)((function(){return(null===F||void 0===F?void 0:F.block_runs)||[]}),[F]),W=(0,l.useState)(),B=W[0],G=W[1],A=(0,D.iV)(),X=(0,k.Z)(A);(0,l.useEffect)((function(){var e=A.pipeline_run_id,n=A.status;if(!(0,E.Xy)(A,X)){var t=M(M({},X),A);e?t.pipeline_run_id=e:t.pipeline_uuid=S,n?t.status=n:delete t.status,_(t)}}),[S,A,X]);var q={_limit:25,_offset:25*(null!==A&&void 0!==A&&A.page?A.page:0),pipeline_uuid:S};null!==A&&void 0!==A&&A.status&&(q.status=A.status);var J=Z.ZP.pipeline_runs.list(q,{refreshInterval:5e3}),Y=J.data,K=J.mutate,Q=(0,l.useMemo)((function(){return(null===Y||void 0===Y?void 0:Y.pipeline_runs)||[]}),[Y]),$=(0,l.useMemo)((function(){var e;return(null===Y||void 0===Y||null===(e=Y.metadata)||void 0===e?void 0:e.count)||[]}),[Y]),ee=(0,k.Z)(r);(0,l.useEffect)((function(){var e=A.tab;e&&u(z.find((function(n){return n.uuid===e})))}),[A,r,ee]);var ne=(0,l.useMemo)((function(){var e=null!==A&&void 0!==A&&A.page?A.page:0;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(y.Z,{fetchPipelineRuns:K,onClickRow:function(e){return G((function(n){var t=Q[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:Q,selectedRun:B}),(0,m.jsx)(w.Z,{p:2,children:(0,m.jsx)(b.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),i=M(M({},A),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/runs","/pipelines/".concat(S,"/runs?").concat((0,D.uM)(i)))},page:Number(e),totalPages:Math.ceil($/25)})})]})}),[K,L,Q,A,B,$]),te=(0,l.useMemo)((function(){return(0,m.jsx)(s.Z,{blockRuns:V,pipeline:L})}),[V,L]);return(0,m.jsxs)(g.Z,{afterHidden:U.uuid===(null===r||void 0===r?void 0:r.uuid)&&!B,breadcrumbs:[{label:function(){return"Runs"}}],buildSidekick:U.uuid===(null===r||void 0===r?void 0:r.uuid)?function(e){return(0,P.Z)(M(M({},e),{},{selectedRun:B,selectedTab:a,setSelectedTab:f}))}:function(e){return(0,P.Z)(e)},pageName:I.M.RUNS,pipeline:L,title:function(e){var n=e.name;return"".concat(n," runs")},uuid:"".concat(I.M.RUNS,"_").concat(S),children:[(0,m.jsx)(h,{children:(0,m.jsx)(w.Z,{py:1,children:(0,m.jsxs)(p.Z,{alignItems:"center",children:[(0,m.jsx)(d.Z,{onClickTab:function(e){var n=e.uuid;_(null),(0,R.u)({tab:n},{replaceParams:!0})},selectedTabUUID:null===r||void 0===r?void 0:r.uuid,tabs:z}),U.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,m.jsxs)(O.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?(_(null),(0,R.u)({tab:U.uuid},{replaceParams:!0})):(0,R.u)({page:0,status:e.target.value})},paddingRight:4*C.iI,placeholder:"Select run status",value:null===j||void 0===j?void 0:j.status,children:[(0,m.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(T.V).map((function(e){return(0,m.jsx)("option",{value:e,children:x.D[e]},e)}))]})]})})}),U.uuid===(null===r||void 0===r?void 0:r.uuid)&&ne,H.uuid===(null===r||void 0===r?void 0:r.uuid)&&te]})}L.getInitialProps=function(){var e=(0,i.Z)(o().mark((function e(n){var t;return o().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 F=(0,_.Z)(L)},79897:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs",function(){return t(77980)}])}},function(e){e.O(0,[3850,2083,4804,1774,2524,9767,6579,434,9898,1830,4463,6532,4846,5944,9774,2888,179],(function(){return n=79897,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{59920:function(e,n,t){"use strict";var r;t.d(n,{M:function(){return r}}),function(e){e.BACKFILLS="backfills",e.BLOCK_RUNS="block_runs",e.EDIT="edit",e.MONITOR="monitor",e.PIPELINE_LOGS="pipeline_logs",e.PIPELINE_RUNS="pipeline_runs",e.RUNS="runs",e.SYNCS="syncs",e.TRIGGERS="triggers"}(r||(r={}))},2626:function(e,n,t){"use strict";t.d(n,{Z:function(){return E}});var r=t(21831),i=t(75582),o=t(82684),l=t(83455),c=t(34376),u=t(28598);var s=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("g",{clipPath:"url(#clip0_7525_68660)",children:(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.67625 7.82429C8.48671 8.13404 8.61933 8.53116 8.9436 8.69464C9.26787 8.85812 9.6606 8.72561 9.85513 8.41896C10.5416 7.33682 11.5276 6.47056 12.6997 5.92987C14.0715 5.29701 15.6173 5.14749 17.085 5.50568C18.5526 5.86388 19.8557 6.70866 20.7818 7.90233C21.7079 9.096 22.2023 10.5682 22.1845 12.0788C22.1667 13.5895 21.6377 15.0496 20.6837 16.2211C19.7298 17.3926 18.4071 18.2064 16.9314 18.5299C15.4557 18.8534 13.9139 18.6675 12.5573 18.0024C11.3984 17.4343 10.433 16.545 9.77227 15.447C9.58502 15.1358 9.19553 14.9941 8.86749 15.1499C8.53946 15.3057 8.39751 15.6995 8.5797 16.0137C9.37152 17.379 10.5525 18.4842 11.9785 19.1832C13.6018 19.9791 15.4469 20.2016 17.213 19.8145C18.979 19.4273 20.5619 18.4534 21.7035 17.0514C22.8451 15.6495 23.4781 13.9022 23.4994 12.0943C23.5208 10.2865 22.9291 8.52472 21.8208 7.09623C20.7126 5.66774 19.1532 4.65677 17.3968 4.22811C15.6403 3.79945 13.7905 3.97839 12.1488 4.73574C10.7068 5.40099 9.50004 6.47805 8.67625 7.82429ZM0.219185 12.5303C-0.0737079 12.2375 -0.0737079 11.7626 0.219185 11.4697L4.71918 6.96968C5.01208 6.67679 5.48695 6.67679 5.77985 6.96968C6.07274 7.26258 6.07274 7.73745 5.77985 8.03034L2.56017 11.25L15.7495 11.25C16.1637 11.25 16.4995 11.5858 16.4995 12C16.4995 12.4142 16.1637 12.75 15.7495 12.75L2.56017 12.75L5.77985 15.9697C6.07274 16.2626 6.07274 16.7375 5.77985 17.0303C5.48695 17.3232 5.01208 17.3232 4.71918 17.0303L0.219185 12.5303Z",fill:"url(#paint0_linear_7525_68660)"})}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_7525_68660",x1:"11.7498",y1:"4",x2:"11.7498",y2:"20",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},d=t(16953),a=t(61519);var p=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.25 1C23.25 0.585786 22.9142 0.25 22.5 0.25C22.0858 0.25 21.75 0.585786 21.75 1V15.5C21.75 15.9142 22.0858 16.25 22.5 16.25C22.9142 16.25 23.25 15.9142 23.25 15.5V1ZM5 4.25C5.41421 4.25 5.75 4.58579 5.75 5V15.5C5.75 15.9142 5.41421 16.25 5 16.25C4.58579 16.25 4.25 15.9142 4.25 15.5V5C4.25 4.58579 4.58579 4.25 5 4.25ZM1.5 7.25C1.91421 7.25 2.25 7.58579 2.25 8V15.5C2.25 15.9142 1.91421 16.25 1.5 16.25C1.08579 16.25 0.75 15.9142 0.75 15.5V8C0.75 7.58579 1.08579 7.25 1.5 7.25ZM9.25 7C9.25 6.58579 8.91421 6.25 8.5 6.25C8.08579 6.25 7.75 6.58579 7.75 7V15.5C7.75 15.9142 8.08579 16.25 8.5 16.25C8.91421 16.25 9.25 15.9142 9.25 15.5V7ZM12 8.75C12.4142 8.75 12.75 9.08579 12.75 9.5V15.5C12.75 15.9142 12.4142 16.25 12 16.25C11.5858 16.25 11.25 15.9142 11.25 15.5V9.5C11.25 9.08579 11.5858 8.75 12 8.75ZM16.25 11.5C16.25 11.0858 15.9142 10.75 15.5 10.75C15.0858 10.75 14.75 11.0858 14.75 11.5V15.5C14.75 15.9142 15.0858 16.25 15.5 16.25C15.9142 16.25 16.25 15.9142 16.25 15.5V11.5ZM19 9.25C19.4142 9.25 19.75 9.58579 19.75 10V15.5C19.75 15.9142 19.4142 16.25 19 16.25C18.5858 16.25 18.25 15.9142 18.25 15.5V10C18.25 9.58579 18.5858 9.25 19 9.25Z",fill:"url(#paint0_linear_2919_69883)"}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_2919_69883",x1:"1.5",y1:"11.875",x2:"22.75",y2:"11.875",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},f=t(70434),m=t(34744),v=t(67971),h=t(87372),b=t(98781),g=t(29664),x=t(86673);var j=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 17c0 1.1046-.89543 2-2 2s-2-.8954-2-2 .89543-2 2-2 2 .8954 2 2zm1.5 0c0 1.933-1.567 3.5-3.5 3.5S1.5 18.933 1.5 17s1.567-3.5 3.5-3.5 3.5 1.567 3.5 3.5zm2.25-.5c0-.4142.3358-.75.75-.75H22c.4142 0 .75.3358.75.75s-.3358.75-.75.75H11.5c-.4142 0-.75-.3358-.75-.75zM8.68946 4.29563c.16317-.38072-.0132-.82163-.39392-.9848-.38072-.16316-.82163.0132-.9848.39392L5.06418 8.94674c-.07952.18554-.3348.2052-.44179.03402L3.1361 6.60269c-.21953-.35125-.68225-.45803-1.0335-.2385-.35125.21954-.45803.68225-.2385 1.0335l1.48629 2.37807c.74892 1.19824 2.53587 1.06064 3.0925-.23814l2.24657-5.24199zM11.5 6.75c-.4142 0-.75.33579-.75.75s.3358.75.75.75H22c.4142 0 .75-.33579.75-.75s-.3358-.75-.75-.75H11.5z",fill:"url(#paint0_linear_2919_69883)"}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_2919_69883",x1:"1.5",y1:"11.875",x2:"22.75",y2:"11.875",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},Z=t(82531),C=t(10503),y=t(9518),k=t(23831),w=t(73942),I=t(49125),_=y.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],w.n_,3*I.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||k.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),P=t(3055),N=t(59920),O=t(96510),M=t(90211),S=t(24141);var E=function(e){var n=e.after,t=e.afterHidden,y=e.afterWidth,k=e.before,w=e.beforeWidth,E=e.breadcrumbs,V=e.buildSidekick,L=e.children,D=e.headline,R=e.pageName,T=e.pipeline,A=e.subheader,B=e.subheaderBackground,H=e.subheaderBackgroundImage,z=e.subheaderButton,U=e.subheaderText,G=e.title,F=e.uuid,W=(0,c.useRouter)(),Y=(0,S.i)().height,q=T.uuid,K=Z.ZP.pipelines.detail(q,{includes_outputs:!1},{revalidateOnFocus:!1}).data,J=null===K||void 0===K?void 0:K.pipeline,X=(0,l.Db)(Z.ZP.pipelines.useCreate(),{onSuccess:function(e){return(0,O.wD)(e,{callback:function(e){var n=e.pipeline.uuid;W.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n,"/edit"))}})}}),Q=(0,i.Z)(X,1)[0],$=(0,l.Db)((function(e){return Z.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,O.wD)(e,{callback:function(){W.push("/pipelines")}})}}),ee=(0,i.Z)($,1)[0],ne=[{label:function(){return"New standard pipeline"},onClick:function(){return Q({pipeline:{name:(0,M.Y6)()}})},uuid:"PipelineDetail/Header/new_standard_pipeline"},{label:function(){return"New streaming pipeline"},onClick:function(){return Q({pipeline:{name:(0,M.Y6)(),type:b.q.STREAMING}})},uuid:"PipelineDetail/Header/new_streaming_pipeline"},{label:function(){return"Delete current pipeline"},onClick:function(){return ee(q)},openConfirmationDialogue:!0,uuid:"PipelineDetail/Header/delete_pipeline"}],te=(0,o.useMemo)((function(){return n||(V?V({height:Y,heightOffset:P.Mz,pipeline:J}):null)}),[n,V,Y,J]),re=y||(te?50*I.iI:null),ie=(0,o.useMemo)((function(){var e=[];return J&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),E?(e.push({label:function(){return J.uuid},linkProps:{as:"/pipelines/".concat(q,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,r.Z)(E)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return J.name}})),e}),[E,J,q]),oe=[{Icon:C.Pf,IconSelected:g.Z,id:N.M.TRIGGERS,isSelected:function(){return N.M.TRIGGERS===R},label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(q,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{Icon:C.pd,IconSelected:a.Z,id:N.M.RUNS,isSelected:function(){return N.M.RUNS===R},label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(q,"/runs"),href:"/pipelines/[pipeline]/runs"}},{Icon:C.yg,IconSelected:s,id:N.M.BACKFILLS,isSelected:function(){return N.M.BACKFILLS===R},label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(q,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{Icon:C.B4,IconSelected:j,id:N.M.PIPELINE_LOGS,isSelected:function(){return N.M.PIPELINE_LOGS===R},label:function(){return"Logs"},linkProps:{as:"/pipelines/".concat(q,"/logs"),href:"/pipelines/[pipeline]/logs"}},{Icon:C.kL,IconSelected:p,id:N.M.MONITOR,isSelected:function(){return N.M.MONITOR===R},label:function(){return"Monitor"},linkProps:{as:"/pipelines/".concat(q,"/monitors"),href:"/pipelines/[pipeline]/monitors"}}];return b.q.INTEGRATION===(null===J||void 0===J?void 0:J.type)&&oe.unshift({Icon:C.Re,IconSelected:d.Z,id:N.M.SYNCS,isSelected:function(){return N.M.SYNCS===R},label:function(){return"Syncs"},linkProps:{as:"/pipelines/".concat(q,"/syncs"),href:"/pipelines/[pipeline]/syncs"}}),oe.unshift({Icon:null,IconSelected:null,id:N.M.EDIT,label:function(){return"Edit pipeline"},linkProps:{as:"/pipelines/".concat(q,"/edit"),href:"/pipelines/[pipeline]/edit"}}),(0,u.jsxs)(f.Z,{after:te,afterHidden:t,afterWidth:re,before:k,beforeWidth:w,breadcrumbs:ie,headerMenuItems:ne,navigationItems:oe,subheaderChildren:"undefined"!==typeof A&&A,title:J?G?G(J):J.name:null,uuid:F,children:[(z||U)&&(0,u.jsx)(x.Z,{mb:I.Mq,mt:I.cd,mx:I.cd,children:(0,u.jsx)(_,{background:B,backgroundImage:H,children:(0,u.jsxs)(v.Z,{alignItems:"center",children:[z,U&&(0,u.jsx)(x.Z,{ml:3}),U]})})}),D&&(0,u.jsx)(x.Z,{p:I.cd,children:(0,u.jsxs)(x.Z,{mt:I.cd,px:I.cd,children:[(0,u.jsx)(h.Z,{level:5,children:D}),(0,u.jsx)(m.Z,{light:!0,mt:I.cd,short:!0})]})}),L]})}},45838:function(e,n,t){"use strict";t.d(n,{GZ:function(){return a},Vq:function(){return s},cE:function(){return p},cl:function(){return c},kA:function(){return u}});var r=t(9518),i=t(23831),o=t(37391),l=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__TableContainerStyle",componentId:"sc-1wzfyed-0"})(["position:relative;overflow:auto;"," "," ",""],o.w5,(function(e){return e.minHeight&&"\n min-height: ".concat(e.minHeight,"px;\n ")}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),u=r.default.table.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-1wzfyed-1"})(["contain:size;width:100%;",""],(function(e){return(e.columnBorders||e.borderCollapseSeparate)&&"\n border-collapse: separate;\n "})),s=r.default.tr.withConfig({displayName:"indexstyle__TableRowStyle",componentId:"sc-1wzfyed-2"})([""," ",""],(function(e){return e.highlightOnHover&&"\n &:hover {\n background: ".concat((e.theme.interactive||i.Z.interactive).rowHoverBackground,";\n }\n ")}),(function(e){return!e.noHover&&"\n &:hover {\n background: ".concat((e.theme.interactive||i.Z.interactive).rowHoverBackground,";\n cursor: pointer;\n }\n ")})),d=(0,r.css)(["text-overflow:ellipsis;white-space:nowrap;"," "," "," "," "," ",""],(function(e){return!e.alignTop&&"\n vertical-align: middle;\n "}),(function(e){return e.alignTop&&"\n vertical-align: top;\n "}),(function(e){return!e.noBorder&&"\n border-bottom: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.compact&&"\n padding: ".concat(l.iI/2,"px ").concat(l.iI,"px;\n ")}),(function(e){return!e.compact&&"\n padding: ".concat(l.iI,"px ").concat(2*l.iI,"px;\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,";\n ")})),a=r.default.th.withConfig({displayName:"indexstyle__TableHeadStyle",componentId:"sc-1wzfyed-3"})([""," "," "," ",""],d,(function(e){return e.columnBorders&&"\n border: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n border-right: none;\n ")}),(function(e){return e.columnBorders&&e.last&&"\n border-right: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.sticky&&"\n background-color: ".concat((e.theme||i.Z).background.panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||i.Z.borders).medium,";\n z-index: 2;\n position: sticky;\n top: 0;\n\n &:first-child {\n left: 0;\n z-index: 2;\n }\n ")})),p=r.default.td.withConfig({displayName:"indexstyle__TableDataStyle",componentId:"sc-1wzfyed-4"})([""," "," "," "," "," "," ",""],d,(function(e){return e.rowVerticalPadding&&"\n padding-top: ".concat(e.rowVerticalPadding,"px;\n padding-bottom: ").concat(e.rowVerticalPadding,"px;\n ")}),(function(e){return e.columnBorders&&"\n border-left: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.columnBorders&&e.last&&"\n border-right: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.stickyFirstColumn&&"\n background-color: ".concat((e.theme||i.Z).background.panel,";\n z-index: 1;\n position: sticky;\n left: 0;\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).activeBorder,";\n ")}),(function(e){return e.wrapColumns&&"\n white-space: break-spaces;\n "}))},87815:function(e,n,t){"use strict";var r=t(82394),i=t(12691),o=t.n(i),l=t(82684),c=t(67971),u=t(10919),s=t(86673),d=t(19711),a=t(46261),p=t(45838),f=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,r.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}n.Z=function(e){var n=e.alignTop,t=e.borderCollapseSeparate,r=e.buildLinkProps,i=e.columnBorders,m=e.columnFlex,h=e.columnMaxWidth,b=e.columns,g=void 0===b?[]:b,x=e.compact,j=e.highlightRowOnHover,Z=e.isSelectedRow,C=e.noBorder,y=e.noHeader,k=e.onClickRow,w=e.rows,I=e.rowVerticalPadding,_=e.stickyFirstColumn,P=e.stickyHeader,N=e.uuid,O=e.wrapColumns,M=(0,l.useMemo)((function(){return m.reduce((function(e,n){return e+(n||0)}),0)}),m),S=(0,l.useCallback)((function(e){if(m[e]){var n=Math.round(m[e]/M*100);return"".concat(n,"%")}return null}),[]),E=(0,l.useMemo)((function(){return null===w||void 0===w?void 0:w.map((function(e,t){var c=null===r||void 0===r?void 0:r(t),s=e.map((function(r,o){return(0,f.jsx)(p.cE,{alignTop:n,columnBorders:i,compact:x,last:o===e.length-1,maxWidth:null===h||void 0===h?void 0:h(o),noBorder:C,rowVerticalPadding:I,selected:null===Z||void 0===Z?void 0:Z(t),stickyFirstColumn:_&&0===o,width:S(o),wrapColumns:O,children:r},"".concat(N,"-row-").concat(t,"-cell-").concat(o))})),d=(0,f.jsx)(p.Vq,{highlightOnHover:j,noHover:!(c||k),onClick:k?function(){return k(t)}:null,children:s},"".concat(N,"-row-").concat(t));return c?(0,l.createElement)(o(),v(v({},c),{},{key:"".concat(N,"-row-link-").concat(t),passHref:!0}),(0,f.jsx)(u.Z,{fullWidth:!0,noHoverUnderline:!0,noOutline:!0,style:{display:"table-row-group"},verticalAlignContent:!0,children:d})):d}))}),[n,r,S,h,g,x,Z,C,k,w]);return(0,f.jsxs)(p.kA,{borderCollapseSeparate:t,columnBorders:i,children:[(null===g||void 0===g?void 0:g.length)>=1&&!y&&(0,f.jsx)(p.Vq,{noHover:!0,children:g.map((function(e,n){return(0,f.jsx)(p.GZ,{columnBorders:i,compact:x,last:n===g.length-1,noBorder:C,sticky:P,children:(0,f.jsxs)(c.Z,{alignItems:"center",children:[(0,f.jsx)(d.ZP,{bold:!0,leftAligned:!0,monospace:!0,muted:!0,children:e.label?e.label():e.uuid}),e.tooltipMessage&&(0,f.jsx)(s.Z,{ml:"4px",children:(0,f.jsx)(a.Z,{appearBefore:!0,label:(0,f.jsx)(d.ZP,{leftAligned:!0,children:e.tooltipMessage}),lightBackground:!0,primary:!0})})]})},"".concat(N,"-col-").concat(e.uuid,"-").concat(n))}))}),E]})}},66050:function(e,n,t){"use strict";var r;t.d(n,{V:function(){return r}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running"}(r||(r={}))},47409:function(e,n,t){"use strict";t.d(n,{D:function(){return l},V:function(){return o}});var r,i=t(82394),o=t(66050).V,l=(r={},(0,i.Z)(r,o.CANCELLED,"Cancelled"),(0,i.Z)(r,o.COMPLETED,"Done"),(0,i.Z)(r,o.FAILED,"Failed"),(0,i.Z)(r,o.INITIAL,"Ready"),(0,i.Z)(r,o.RUNNING,"Running"),r)},16953:function(e,n,t){"use strict";var r=t(28598);n.Z=function(e){var n=e.size;return(0,r.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 8.5H15.5V3.5H20.5V8.5ZM14 9V3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55229 21.5523 10 21 10H15C14.4477 10 14 9.55229 14 9ZM2 5V12.5V14V21.5C2 22.0523 2.44772 22.5 3 22.5H10.5H12H19.5C20.0523 22.5 20.5 22.0523 20.5 21.5V13.5C20.5 12.9477 20.0523 12.5 19.5 12.5H12V5C12 4.44772 11.5523 4 11 4H3C2.44772 4 2 4.44772 2 5ZM10.5 14V21H3.5V14H10.5ZM19 14V21H12V14H19ZM10.5 5.5V12.5H3.5V5.5H10.5Z",fill:"url(#paint0_linear_2842_55048)"}),(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:"paint0_linear_2842_55048",x1:"2",y1:"12.25",x2:"22",y2:"12.25",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,r.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})}},89745:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return oe}});var r=t(77837),i=t(38860),o=t.n(i),l=t(82684),c=t(2626),u=t(41788),s=t(75582),d=t(82394),a=t(93461),p=t(67971),f=t(87372),m=t(47409),v=t(86673),h=t(54283),b=t(19711),g=t(23831),x=t(10503),j=t(9518),Z=t(73942),C=t(2005),y=t(49125),k=t(31012),w=j.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,y.cd*y.iI,(function(e){return"\n background-color: ".concat((e.theme.background||g.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||g.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||g.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||g.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||g.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||g.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||g.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||g.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||g.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||g.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||g.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||g.Z.accent).warning,";\n ")})),I=(0,j.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||g.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||g.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||g.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||g.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||g.Z.accent).warning,";\n ")})),_=j.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],I,k.iD,Z.D7,C.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||g.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||g.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||g.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||g.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||g.Z.content).inverted,";\n ")})),P=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],I,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||g.Z.interactive).focusBackground,";\n ")})),N=t(90211),O=t(92083),M=t.n(O),S=t(66050),E=t(24224);function V(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function L(e){var n,t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null,o=null,l=null,c=null,u={},d=(null===e||void 0===e?void 0:e.block_runs)||[],a=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},p=(null===e||void 0===e||null===(t=e.metrics)||void 0===t?void 0:t.pipeline)||{},f=D(e);return Object.entries(a).forEach((function(e){var n,t=(0,s.Z)(e,2),d=t[0],a=t[1];if(!r||r===d){var m,v=a||{},h=v.destinations,b=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,g=v.sources,x=void 0===g?{records:null}:g,j=f[d]||[];if(r&&r===d&&j.every((function(e){var n=e.status;return S.V.COMPLETED===n}))&&null===i&&(i=0),null!==p&&void 0!==p&&null!==(n=p[d])&&void 0!==n&&n.record_counts)null===i&&(i=0),i+=Number(null===p||void 0===p||null===(m=p[d])||void 0===m?void 0:m.record_counts);else null!==x&&void 0!==x&&x.records&&(null===i&&(i=0),i+=Number(x.records));null!==b&&void 0!==b&&b.records_updated?(null===l&&(l=0),l+=Number(b.records_updated),null===c&&(c=0),c+=Number(b.records_updated)):null!==b&&void 0!==b&&b.records_inserted?(null===l&&(l=0),l+=Number(b.records_inserted),null===o&&(o=0),o+=Number(b.records_inserted)):null!==b&&void 0!==b&&b.records_affected&&(null===l&&(l=0),l+=Number(b.records_affected)),["destinations","sources"].forEach((function(e){var n=a[e]||{};null!==n&&void 0!==n&&n.error&&(u[d]||(u[d]={}),u[d][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===d||void 0===d||d.forEach((function(e){var n=e.block_uuid,t=e.metrics,r=e.status;if(S.V.FAILED===r&&null!==t&&void 0!==t&&t.error&&n){var i=n.split(":"),o=(0,s.Z)(i,3),l=(o[0],o[1]);o[2];u[l]||(u[l]={}),u[l][""]=t.error}})),{errors:u,records:i,recordsInserted:o,recordsProcessed:l,recordsUpdated:c}}function D(e){var n=e.block_runs,t={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),r=(0,s.Z)(n,3),i=(r[0],r[1]);r[2];t[i]||(t[i]=[]),t[i].push(e)})),t}function R(e){var n=D(e),t={};return Object.entries(n).forEach((function(e){var n=(0,s.Z)(e,2),r=n[0],i=n[1],o=i.filter((function(e){var n=e.status;return S.V.COMPLETED===n})),l=o.map((function(e){var n=e.completed_at,t=e.started_at,r=M().utc(n),i=M().utc(t);return r.diff(i,"second")})),c=o.length,u=i.length;t[r]={completed:c,runtime:l.length>=1?(0,E.Sm)(l)/l.length:null,total:u}})),t}function T(e){var n=e.block_runs,t=(null===n||void 0===n?void 0:n.length)||1,r=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return S.V.COMPLETED===n}))}(e).length||0;return r/t}function A(e){var n=e.completed_at,t=e.block_runs,r=void 0===t?[]:t,i=e.status;if(null===r||void 0===r||!r.length)return 0;var o=M().utc();if(n)o=M().utc(n);else if([m.V.CANCELLED,m.V.FAILED].includes(i)){var l=(0,E.YC)(r,(function(e){return e.started_at}),{ascending:!1})[0];o=M().utc(l.updated_at)}var c=M().utc(e.created_at);return o.diff(c,"second")}function B(e,n){var t,r,i,o,l,c=D(e),u=R(e),s=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},d=s.blocks||{},a=s.pipeline||{},p=(d[n],a[n],u[n]||{completed:null,total:null}),f=p.completed,m=p.total,v=f&&m?f/m:0,h=c[n]||[],b=h.every((function(e){var n=e.status;return S.V.COMPLETED===n})),g=(0,E.YC)(h,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(t=(0,E.YC)(h,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===t?void 0:t.started_at;b?r=null===(l=(0,E.YC)(h,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:g&&(o=null===g||void 0===g?void 0:g.updated_at);var j=b?M().utc(r||o):M().utc(),Z=M().utc(x);return{completed:f,completedAt:r,done:b,progress:v,runtime:i=j.diff(Z,"second"),startedAt:x,status:null===g||void 0===g?void 0:g.status,timeText:(0,N.zf)(i),total:m,updatedAt:o}}var H=t(28598);function z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function U(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?z(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var G=function(e){var n=e.onSelect,t=e.pipelineRun,r=e.selected,i=(t.block_runs,t.created_at),o=t.status,c=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[t]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),d=c.destination,j=c.source,Z=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),C=(0,l.useMemo)((function(){return L(t)}),[t]),k=C.errors,I=C.records,O=C.recordsProcessed,M=(0,l.useMemo)((function(){return T(t)}),[t]),S=(0,l.useMemo)((function(){return[m.V.COMPLETED].includes(o)}),[o]),E=(0,l.useMemo)((function(){return{danger:m.V.FAILED===o,default:m.V.INITIAL===o,primary:m.V.RUNNING===o,success:S,warning:m.V.CANCELLED===o}}),[S,o]),V=(0,l.useMemo)((function(){if(t){var e=A(t);return(0,N.zf)(e)}}),[t]);return(0,H.jsx)(w,U(U({},E),{},{onClick:function(){return n(r?null:t.id)},selected:r,children:(0,H.jsxs)(p.Z,{fullHeight:!0,justifyContent:"space-between",children:[(0,H.jsx)(P,U({},E)),(0,H.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsx)(f.Z,{bold:!0,level:5,monospace:!0,children:i}),(0,H.jsx)(v.Z,{fullWidth:!1,mt:2,children:(0,H.jsx)(_,U(U({},E),{},{children:(0,H.jsxs)(p.Z,{alignItems:"center",children:[S&&(0,H.jsx)(x.Jr,{inverted:!0,size:2*y.iI}),[m.V.INITIAL,m.V.RUNNING].includes(o)&&(0,H.jsx)(h.Z,{color:m.V.INITIAL!==o?g.Z.monotone.white:null,inverted:m.V.INITIAL===o,small:!0}),"\xa0",m.V.RUNNING===o&&(0,H.jsxs)(H.Fragment,{children:["\xa0",Math.round(100*M),"%"]}),![m.V.INITIAL,m.V.RUNNING].includes(o)&&m.D[o],m.V.INITIAL===o&&"Starting"]})}))}),Object.values(k).length>=1&&(0,H.jsx)(v.Z,{mt:1,children:Object.entries(k).map((function(e,n){var t=(0,s.Z)(e,2),r=t[0];t[1];return(0,H.jsxs)(b.ZP,{monospace:!0,muted:!0,small:!0,children:[r," stream failed"]},r)}))})]})}),(0,H.jsxs)(a.Z,{flex:1,children:[(0,H.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,H.jsx)(b.ZP,{monospace:!0,children:O>=1?(0,N.x6)(O):"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,H.jsx)(b.ZP,{monospace:!0,children:I>=1&&I>=O?(0,N.x6)(I-O):"-"})]}),m.V.RUNNING!==o&&(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,H.jsx)(b.ZP,{monospace:!0,children:V})]})]})}),(0,H.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,H.jsx)(b.ZP,{monospace:!0,children:j||"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,H.jsx)(b.ZP,{monospace:!0,children:d||"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,H.jsx)(b.ZP,{monospace:!0,children:Z>=1?(0,N.x6)(Z):"-"})]})]})})]})]})}))},F=t(89565),W=t.n(F),Y=t(34376),q=t(60328),K=t(10919),J=t(87815),X=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||g.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||g.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*y.iI,"px;\n ")})),Q=t(66653);var $=function(e){var n=e.onClickRow,t=e.pipelineRun,r=e.selectedStream,i=(0,Y.useRouter)(),o=(0,l.useState)(null),c=o[0],u=o[1],d=(0,l.useState)(null),a=d[0],h=d[1],g=(0,l.useMemo)((function(){return t?D(t):{}}),[t]),j=(0,l.useMemo)((function(){return t?R(t):{}}),[t]),Z=(0,l.useMemo)((function(){var e=0,n=[],t=[];if(Object.entries(j).forEach((function(r){var i=(0,s.Z)(r,2),o=(i[0],i[1]),l=o.completed,c=o.runtime,u=o.total;null===c?t.push(o):(n.push(c),e+=c*(u-l))})),0===n.length)return null;var r=(0,E.Sm)(n)/n.length;return t.forEach((function(n){var t=n.completed,i=n.total;e+=r*(i-t)})),e}),[j]),C=(0,l.useMemo)((function(){return r?j[r]:null}),[j,r]),k=(0,l.useMemo)((function(){if(r&&j){var e=j[r]||{},n=e.completed,i=e.total;if(i>=1)return n/i}else if(t)return T(t);return 0}),[C,t,r]),w=(0,l.useMemo)((function(){return(0,H.jsx)(p.Z,{children:(0,E.w6)(101).map((function(e,n){return(0,H.jsx)(X,{even:n%2===0,fill:k>0&&Math.round(100*k)>=n},n)}))})}),[k]),I=(0,l.useMemo)((function(){if(r){var e=g[r]||[],n=e.every((function(e){var n=e.status;return S.V.COMPLETED===n})),i=(0,E.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],o=null===i||void 0===i?void 0:i.status,l=C||{},c=l.completed,u=l.runtime,s=l.total;if(n)return"Sync complete for ".concat(r);if([S.V.CANCELLED,S.V.FAILED].includes(o))return m.D[o];if(u&&s>=1){var d=Math.ceil(u*(s-c)/60);return"".concat((0,N._6)("minute",d,!0)," to completion")}return"Estimating time remaining for stream..."}if(m.V.COMPLETED===(null===t||void 0===t?void 0:t.status))return"Sync complete";if(t){if([m.V.CANCELLED,m.V.FAILED].includes(null===t||void 0===t?void 0:t.status))return m.D[null===t||void 0===t?void 0:t.status];if(m.V.INITIAL===(null===t||void 0===t?void 0:t.status))return"Initializing sync (this can take several minutes)";if(null===Z)return"Estimating time remaining...";var a=Math.ceil(Z/60);return"".concat((0,N._6)("minute",a,!0)," to completion")}return"Select a sync"}),[g,Z,C,t,r]),_=(0,l.useMemo)((function(){return t&&r?B(t,r):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[t,r]);(0,l.useEffect)((function(){var e;if(t){var n=A(t);u(n),e=setInterval((function(){return u((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[t]),(0,l.useEffect)((function(){var e;if(t&&r&&_){var n=(null===_||void 0===_?void 0:_.runtime)||0;h(n),e=setInterval((function(){return h((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[t,r,_]);var P=(0,l.useMemo)((function(){if(t){if(r)return null===_||void 0===_?void 0:_.timeText;var e=A(t);return(0,N.zf)(e)}}),[t,r,_]),O=(0,l.useMemo)((function(){var e=Math.floor(c%86400/3600),n=Math.floor(c%3600/60),t=Math.floor(c%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),t>=10?String(t):"0".concat(t)].join(":")}),[c]),M=(0,l.useMemo)((function(){var e=Math.floor(a%86400/3600),n=Math.floor(a%3600/60),t=Math.floor(a%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),t>=10?String(t):"0".concat(t)].join(":")}),[a]),z=(0,l.useMemo)((function(){return t?L(t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t]),U=z.errors,G=z.records,F=z.recordsInserted,$=z.recordsProcessed,ee=z.recordsUpdated,ne=(0,l.useMemo)((function(){return t&&r?L(t,r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t,r]),te=(0,l.useMemo)((function(){var e=r?null===ne||void 0===ne?void 0:ne.records:G,n=r?null===ne||void 0===ne?void 0:ne.recordsInserted:F,t=r?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,i=r?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,o=[{label:"Rows fetched",value:null===e?"-":(0,N.x6)(e)}];return null===n&&null===i?o.push({label:"Rows processed",value:null===t?"-":(0,N.x6)(t)}):null!==n?o.push({label:"Rows inserted",value:(0,N.x6)(n)}):null!==i&&o.push({label:"Rows updated",value:(0,N.x6)(i)}),o.map((function(e){var n=e.label,t=e.value;return(0,H.jsxs)("div",{children:[(0,H.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,H.jsx)(b.ZP,{headline:!0,children:t})]},n)}))}),[G,ne,F,$,ee,P,O,status]),re=(0,l.useMemo)((function(){if(!t)return(0,H.jsx)("div",{});var e=V(t);return(0,H.jsx)(J.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(n){return r&&r===e[n]},onClickRow:n,rows:e.map((function(e){var n=B(t,e),r=(n.completed,n.completedAt),o=n.done,l=n.progress,c=n.startedAt,u=n.status,s=n.timeText,d=(n.total,!!U[e]);return[(0,H.jsx)(b.ZP,{danger:d,default:!d,monospace:!0,children:e},"stream"),(0,H.jsx)(b.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,H.jsx)(b.ZP,{default:!0,monospace:!0,children:r?r.split(".")[0]:"-"},"completed_at"),(0,H.jsx)(b.ZP,{default:!0,children:[S.V.INITIAL,S.V.RUNNING].includes(u)?"-":s},"runtime"),(0,H.jsxs)("div",{children:[o&&(0,H.jsx)(x.Jr,{default:!0,size:2*y.iI}),!o&&(0,H.jsx)(p.Z,{children:(0,E.w6)(51).map((function(e,n){return(0,H.jsx)(X,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,H.jsx)(q.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){i.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id)),(0,Q.j)(e)},children:(0,H.jsx)(x.B4,{default:!0,size:2*y.iI})},"logs")]})),uuid:"".concat(null===t||void 0===t?void 0:t.id,"-streams-table")})}),[U,j,t,r]),ie=(0,l.useMemo)((function(){var e,n,i,o,l,c,u,d;if(t&&r){var a=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},p=null===a||void 0===a||null===(e=a.pipeline)||void 0===e||null===(n=e[r])||void 0===n||null===(i=n.bookmarks)||void 0===i?void 0:i[r],f=null===a||void 0===a||null===(o=a.blocks)||void 0===o||null===(l=o[r])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(d=u.bookmarks)||void 0===d?void 0:d[r];if(p||f){var m=Array.from(new Set(Object.keys(p||{}).concat(Object.keys(f||{})))).sort(),v=[];m.forEach((function(e){var n=[(0,H.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[p,f].forEach((function(t,r){t&&n.push((0,H.jsx)(b.ZP,{monospace:!0,small:!0,children:t[e]},"".concat(e,"-").concat(r)))})),v.push(n)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===a||void 0===a?void 0:a.source,"source",p],[null===a||void 0===a?void 0:a.destination,"destination",f]].forEach((function(e){var n=(0,s.Z)(e,3),t=n[0],r=n[1];n[2]&&h.push({uuid:"".concat(t," (").concat(r,")")})})),(0,H.jsx)(J.Z,{columnFlex:[null,1,1],columns:h,rows:v,uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),oe=(0,l.useMemo)((function(){var e,n,i,o,l,c;if(t&&r){var u=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},d=null===u||void 0===u||null===(e=u.blocks)||void 0===e||null===(n=e[r])||void 0===n||null===(i=n.sources)||void 0===i?void 0:i.record,a=null===u||void 0===u||null===(o=u.blocks)||void 0===o||null===(l=o[r])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(d||a){var p=Object.keys(a||d||{}).sort(),f=[];p.forEach((function(e){var n=[(0,H.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[d,a].forEach((function(t,r){if(t){var i=t[e],o="object"===typeof i;n.push((0,H.jsxs)(b.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[o&&(0,H.jsx)("pre",{children:JSON.stringify(i,null,2)}),!o&&i]},"".concat(e,"-").concat(r)))}})),f.push(n)}));var m=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",d],[null===u||void 0===u?void 0:u.destination,"destination",a]].forEach((function(e){var n=(0,s.Z)(e,3),t=n[0],r=n[1];n[2]&&m.push({uuid:"".concat(t," (").concat(r,")")})})),(0,H.jsx)(J.Z,{columnFlex:[null,1,1],columns:m,rows:f.map((function(e){return e.map((function(e){return(0,H.jsx)(b.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),le=(0,l.useMemo)((function(){var e,n,i,o,l,c,u=null===t||void 0===t||null===(e=t.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[r];return(null===u||void 0===u||null===(i=u.sources)||void 0===i||null===(o=i.block_tags)||void 0===o?void 0:o.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[t,r]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(v.Z,{p:3,children:[r&&(0,H.jsx)(v.Z,{mb:3,children:(0,H.jsxs)(p.Z,{alignItems:"center",children:[(0,H.jsx)(K.Z,{block:!0,onClick:function(){return i.push("/pipelines/".concat(t.pipeline_uuid,"/syncs?pipeline_run_id=").concat(t.id))},preventDefault:!0,children:(0,H.jsxs)(p.Z,{alignItems:"center",children:[(0,H.jsx)(x.Xd,{default:!0,size:1.5*y.iI}),(0,H.jsx)(v.Z,{mr:1}),(0,H.jsx)(b.ZP,{default:!0,children:"Syncs"})]})}),(0,H.jsx)(v.Z,{mx:1,children:(0,H.jsx)(b.ZP,{default:!0,monospace:!0,children:"/"})}),(0,H.jsx)(b.ZP,{bold:!0,monospace:!0,children:r})]})}),(0,H.jsxs)(p.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsx)(v.Z,{mr:2,my:1,children:(0,H.jsx)(f.Z,{level:5,muted:!t,children:I})}),t&&(0,H.jsx)(q.Z,{onClick:function(){return i.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id))},small:!0,children:"Logs"})]}),(0,H.jsx)(v.Z,{mt:2,children:w}),t&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(v.Z,{mt:3,children:(0,H.jsxs)(p.Z,{justifyContent:"space-between",children:[(0,H.jsxs)("div",{children:[(0,H.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,H.jsxs)(b.ZP,{headline:!0,children:[r&&[S.V.INITIAL,S.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&M,r&&![S.V.INITIAL,S.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&(null===_||void 0===_?void 0:_.timeText),!r&&[m.V.INITIAL,m.V.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&O,!r&&![m.V.INITIAL,m.V.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&P]})]}),te]})}),Object.values(U).length>=1&&(0,H.jsxs)(v.Z,{mt:3,children:[(0,H.jsx)(f.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(U).map((function(e,n){var t=(0,s.Z)(e,2),i=t[0],o=t[1];return(!r||r===i)&&(0,H.jsx)(v.Z,{mt:n>=1?1:0,children:Object.entries(o).map((function(e){var n=(0,s.Z)(e,2),t=n[0],r=n[1],o=r.error,l=r.errors,c=r.message,u=Array.isArray(o)?o.join(" "):o;return(0,H.jsxs)("div",{children:[(0,H.jsx)(v.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,H.jsxs)(b.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[i,!!t&&(0,H.jsxs)(b.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",t,")"]}),": ",(0,H.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,H.jsx)(W(),{children:u})})]})}),(0,H.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(e){return(0,H.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(i,"-").concat(t))}))},i)}))]})]})]}),t&&!r&&(0,H.jsx)(v.Z,{my:3,children:re}),t&&r&&(0,H.jsxs)(H.Fragment,{children:[le&&(0,H.jsx)(v.Z,{my:3,children:(0,H.jsxs)(v.Z,{px:3,children:[(0,H.jsx)(f.Z,{level:5,children:"Table name"}),(0,H.jsx)(v.Z,{mt:1,children:(0,H.jsx)(b.ZP,{default:!0,monospace:!0,children:le})})]})}),ie&&(0,H.jsxs)(v.Z,{my:3,children:[(0,H.jsx)(v.Z,{px:3,children:(0,H.jsx)(f.Z,{level:5,children:"Bookmarks"})}),(0,H.jsx)(v.Z,{px:1,children:ie})]}),oe&&(0,H.jsxs)(v.Z,{my:3,children:[(0,H.jsx)(v.Z,{px:3,children:(0,H.jsx)(f.Z,{level:5,children:"Sample row"})}),(0,H.jsx)(v.Z,{px:1,children:oe})]})]})]})},ee=t(82531),ne=t(59920),te=t(33766),re=t(59e3);function ie(e){var n=e.pipeline,t=n.uuid,r=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:t},{refreshInterval:5e3}),i=r.data,o=(r.mutate,(0,l.useMemo)((function(){return(null===i||void 0===i?void 0:i.pipeline_runs)||[]}),[i])),u=(0,re.iV)(),s=(0,l.useState)(null),d=s[0],a=s[1],p=(0,l.useState)(null),f=p[0],m=p[1];(0,l.useEffect)((function(){null!==u&&void 0!==u&&u.pipeline_run_id?m(null===o||void 0===o?void 0:o.find((function(e){return e.id===Number(u.pipeline_run_id)}))):f&&m(null),null!==u&&void 0!==u&&u.stream?a(u.stream):d&&a(null)}),[o,u,f,d]);var v=(0,l.useCallback)((function(){var e=f?V(f):[];return(0,H.jsx)($,{onClickRow:function(n){var t=e[n];(0,te.u)({stream:d===t?null:t})},pipelineRun:f,selectedStream:d})}),[f,d]),h=(0,l.useMemo)((function(){var e="/pipelines/".concat(t,"/syncs");f&&(e="".concat(e,"?pipeline_run_id=").concat(f.id));var n=[{label:function(){return"Syncs"},linkProps:d?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return d&&n.push({label:function(){return d}}),n}),[f,d]);return(0,H.jsx)(c.Z,{breadcrumbs:h,buildSidekick:v,pageName:ne.M.SYNCS,pipeline:n,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(t),children:o.map((function(e){var n=(null===f||void 0===f?void 0:f.id)===e.id;return(0,H.jsx)(G,{onSelect:function(e){return(0,te.u)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}ie.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var t;return o().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 oe=(0,u.Z)(ie)},33766:function(e,n,t){"use strict";t.d(n,{u:function(){return d}});var r=t(75582),i=t(82394),o=t(34376),l=t.n(o),c=t(59e3);function u(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?u(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function d(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.replaceParams,o=t.pushHistory,u=i?{}:(0,c.iV)();n=window.location.pathname;var d=o?l().push:l().replace,a=s(s({},u),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete a[t]}));var p=(0,c.uM)(a);p.length>=1&&(p="?".concat(p));var f="".concat(n.split("?")[0]).concat(p);return d(l().router.pathname,f,{shallow:!0})}},59416:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return t(89745)}])}},function(e){e.O(0,[3850,2083,9565,9767,6579,434,1830,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[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,l,o,c,s,u,a=!1;n||(n={}),t=n.debug||!1;try{if(o=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 l=i[n.format]||i.default;window.clipboardData.setData(l,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"),l=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(l,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),u&&document.body.removeChild(u),o()}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)),l=c(t(90659)),o=["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={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[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=v(e);if(n){var i=v(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 g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(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(g(e=c.call.apply(c,[this].concat(t))),"onClick",(function(n){var t=e.props,r=t.text,o=t.onCopy,c=t.children,s=t.options,u=i.default.Children.only(c),a=(0,l.default)(r,s);o&&o(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,o),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()}}},56681:function(e,n,t){"use strict";t.d(n,{G:function(){return b},Z:function(){return y}});var r=t(75582),i=t(82394),l=t(26304),o=t(32316),c=t(22673),s=t(86532),u=t(86673),a=t(19711),d=t(87815),p=t(49125),f=t(19395),h=t(28598),m=["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 v(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 j={uuid:"Run details"},x={uuid:"Dependency tree"},b=[x,j];function y(e){var n=e.height,t=e.heightOffset,i=e.pipeline,g=e.selectedRun,y=e.selectedTab,Z=e.setSelectedTab,_=v({},(0,l.Z)(e,m));g?_.blockStatus=(0,f.IJ)(null===g||void 0===g?void 0:g.block_runs):_.noStatus=!0;var O=(null===g||void 0===g?void 0:g.variables)||{};null!==g&&void 0!==g&&g.event_variables&&(O.event=g.event_variables);var P=[];O&&JSON.stringify(O,null,2).split("\n").forEach((function(e){P.push(" ".concat(e))}));var w=g&&[["Run ID",null===g||void 0===g?void 0:g.id],["Variables",(0,h.jsx)(c.Z,{language:"json",small:!0,source:P.join("\n")})]],S=g&&(0,h.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,h.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:w.map((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];return[(0,h.jsx)(a.ZP,{monospace:!0,muted:!0,children:t}),(0,h.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:i})]})),uuid:"LogDetail"})}),C=y&&Z;return(0,h.jsxs)(h.Fragment,{children:[C&&(0,h.jsx)(u.Z,{py:p.cd,children:(0,h.jsx)(o.Z,{onClickTab:Z,selectedTabUUID:null===y||void 0===y?void 0:y.uuid,tabs:b})}),(!C||x.uuid===(null===y||void 0===y?void 0:y.uuid))&&(0,h.jsx)(s.Z,v(v({},_),{},{height:n,heightOffset:(t||0)+(C?76:0),pipeline:i})),j.uuid===(null===y||void 0===y?void 0:y.uuid)&&S]})}},54183:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ee}});var r,i=t(75582),l=t(77837),o=t(82394),c=t(38860),s=t.n(c),u=t(82684),a=t(83455),d=t(34376),p=t(60328),f=t(34744),h=t(67971),m=t(87372),g=t(51099),v=t(2626),j=t(97496),x=t(47409),b=t(93348),y=t(55378),Z=t(86673),_=t(87815),O=t(19711),P=t(46261),w=t(82531),S=t(56681),C=t(2850),E=t(10503),I=t(49125),k=t(59920),T=t(24224);!function(e){e.AWS="aws_event"}(r||(r={}));var D=[{label:function(){return"AWS"},uuid:r.AWS}],A=(0,T.HK)(D,(function(e){return e.uuid})),M=t(66050),R=t(58122),N=t(19395),U=t(33766),F=t(7715),H=t(96510),z=t(66653),q=t(59e3),V=t(28598);function X(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 L(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?X(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var W=function(e){var n=e.fetchPipelineSchedule,t=e.pipeline,r=e.pipelineSchedule,l=e.variables,o=(0,d.useRouter)(),c=(t||{}).uuid,s=r||{},T=s.id,D=s.event_matchers,X=s.name,W=s.schedule_interval,J=s.schedule_type,G=s.settings,B=s.sla,K=s.start_time,Y=s.status,Q=s.variables,$=void 0===Q?{}:Q,ee=(0,q.iV)(),ne={_limit:30,_offset:30*(null!==ee&&void 0!==ee&&ee.page?ee.page:0)};null!==ee&&void 0!==ee&&ee.status&&(ne.status=ee.status);var te=w.ZP.pipeline_runs.pipeline_schedules.list(T,ne,{refreshInterval:3e3,revalidateOnFocus:!0}),re=te.data,ie=te.mutate,le=(0,u.useMemo)((function(){return(null===re||void 0===re?void 0:re.pipeline_runs)||[]}),[re]),oe=(0,u.useMemo)((function(){var e;return(null===re||void 0===re||null===(e=re.metadata)||void 0===e?void 0:e.count)||[]}),[re]),ce=(0,u.useState)(null),se=ce[0],ue=ce[1],ae=(0,u.useMemo)((function(){var e=null!==ee&&void 0!==ee&&ee.page?ee.page:0;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(j.Z,{fetchPipelineRuns:ie,onClickRow:function(e){return ue((function(n){var t=le[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:le,selectedRun:se}),(0,V.jsx)(Z.Z,{p:2,children:(0,V.jsx)(g.Z,{page:Number(e),maxPages:9,onUpdate:function(e){var n=Number(e),t=L(L({},ee),{},{page:n>=0?n:0});o.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(c,"/triggers/").concat(T,"?").concat((0,q.uM)(t)))},totalPages:Math.ceil(oe/30)})})]})}),[ie,t,le,se]),de=(0,u.useState)(S.G[0]),pe=de[0],fe=de[1],he=(0,a.Db)((function(e){return w.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,F.gR)(e,["id"])})}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){n()},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),me=(0,i.Z)(he,2),ge=me[0],ve=me[1].isLoading,je=(0,u.useMemo)((function(){return b.fq.ACTIVE===Y}),[Y]),xe=(0,u.useMemo)((function(){var e,n={default:!0,size:1.5*I.iI},t=[[(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.VW,L({},n)),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,V.jsx)(O.ZP,{monospace:!0,children:null===(e=b.Z4[J])||void 0===e?void 0:e.call(b.Z4)},"trigger_type")],[(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.rs,L({},n)),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,V.jsx)(O.ZP,{danger:!je,monospace:!0,success:je,children:Y},"trigger_status")]];if(B){var r=(0,N.gU)(B),i=r.time,l=r.unit,o=1===i?l:"".concat(l,"s");t.push([(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.kI,L({},n)),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,V.jsx)(O.ZP,{monospace:!0,children:"".concat(i," ").concat(o)},"trigger_sla")])}if(W&&t.push([(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.Pf,L({},n)),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,V.jsx)(O.ZP,{monospace:!0,children:W.replace("@","")},"trigger_frequency")]),K&&t.push([(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.aw,L({},n)),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,V.jsx)(O.ZP,{monospace:!0,children:K},"trigger_start_date")]),G){var c=G.skip_if_previous_running;c&&t.push([(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(P.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",widthFitContent:!0,size:1.5*I.iI}),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running_label"),(0,V.jsx)(O.ZP,{monospace:!0,children:c.toString()},"trigger_skip_if_running")])}return(0,V.jsx)(_.Z,{columnFlex:[null,1],rows:t})}),[je,W,G,B,K,J]),be=(0,u.useMemo)((function(){return $||{}}),[$]),ye=(0,u.useMemo)((function(){var e,n=[];return(0,F.Qr)(be)?n=(0,R.wx)(l,(function(e){return"global"===e.uuid})):Object.entries(be).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],l=t[1];n.push({uuid:r,value:(0,R.FS)(l)})})),"undefined"!==typeof(n=(0,R.JZ)(n||[],J))&&null!==(e=n)&&void 0!==e&&e.length?(0,V.jsx)(_.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,V.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,V.jsx)(O.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[J,$,l]),Ze=(0,u.useMemo)((function(){return(0,V.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===D||void 0===D?void 0:D.map((function(e,n){var t=e.event_type,r=e.name;return[(0,V.jsx)(O.ZP,{default:!0,monospace:!0,children:A[t].label()},"".concat(t,"_").concat(n,"_label")),(0,V.jsx)(O.ZP,{monospace:!0,children:r},"".concat(t,"_").concat(n,"_name"))]}))})}),[D]);return(0,V.jsxs)(v.Z,{afterHidden:!se,before:(0,V.jsxs)(C.M,{children:[(0,V.jsxs)(Z.Z,{mb:I.HN,pt:I.cd,px:I.cd,children:[(0,V.jsxs)(Z.Z,{mb:I.cd,children:[b.Xm.TIME===J&&(0,V.jsx)(E.kO,{size:5*I.iI}),b.Xm.EVENT===J&&(0,V.jsx)(E.Jp,{size:5*I.iI}),!J&&(0,V.jsx)(E.VW,{size:5*I.iI})]}),(0,V.jsx)(m.Z,{children:X})]}),(0,V.jsx)(Z.Z,{px:I.cd,children:(0,V.jsx)(m.Z,{level:5,children:"Settings"})}),(0,V.jsx)(f.Z,{light:!0,mt:1,short:!0}),xe,(null===D||void 0===D?void 0:D.length)>=1&&(0,V.jsxs)(Z.Z,{my:I.HN,children:[(0,V.jsx)(Z.Z,{px:I.cd,children:(0,V.jsx)(m.Z,{level:5,children:"Events"})}),(0,V.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ze]}),ye&&(0,V.jsxs)(Z.Z,{my:I.HN,children:[(0,V.jsx)(Z.Z,{px:I.cd,children:(0,V.jsx)(m.Z,{level:5,children:"Runtime variables"})}),(0,V.jsx)(f.Z,{light:!0,mt:1,short:!0}),ye]})]}),beforeWidth:C.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(c,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return X},linkProps:{as:"/pipelines/".concat(c,"/triggers/").concat(T),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,S.Z)(L(L({},e),{},{selectedRun:se,selectedTab:pe,setSelectedTab:fe}))},pageName:k.M.TRIGGERS,pipeline:t,subheader:(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(p.Z,{beforeIcon:je?(0,V.jsx)(E.dz,{size:2*I.iI}):(0,V.jsx)(E.Py,{inverted:!0,size:2*I.iI}),danger:je,loading:ve,onClick:function(e){(0,z.j)(e),ge({id:T,status:je?b.fq.INACTIVE:b.fq.ACTIVE})},outline:!0,success:!je,children:je?"Pause trigger":"Start trigger"}),(0,V.jsx)(Z.Z,{mr:I.cd}),(0,V.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(c,"/triggers/").concat(T,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,V.jsx)(Z.Z,{mr:I.cd}),(0,V.jsxs)(y.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?o.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(c,"/triggers/").concat(T)):(0,U.u)({page:0,status:e.target.value})},paddingRight:4*I.iI,placeholder:"Select run status",value:(null===ee||void 0===ee?void 0:ee.status)||"all",children:[(0,V.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(M.V).map((function(e){return(0,V.jsx)("option",{value:e,children:x.D[e]},e)}))]})]}),title:function(){return X},uuid:"triggers/detail",children:[(0,V.jsx)(Z.Z,{mt:I.cd,px:I.cd,children:(0,V.jsx)(m.Z,{level:5,children:"Runs for this trigger"})}),(0,V.jsx)(f.Z,{light:!0,mt:I.cd,short:!0}),ae]})},J=t(21831),G=t(21764),B=t(2713),K=t(38341),Y=t(47999),Q=t(22673),$=t(65730),ee=t(28358),ne=t(93461),te=t(10919),re=t(26304),ie=t(9518),le=t(23831),oe=t(2005),ce=t(31012),se=["children","large","lineHeight","ordered"];function ue(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 ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ue(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var de=(0,ie.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||le.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||le.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||le.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(oe.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(oe.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(ce.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(ce.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(ce.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),pe=ie.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],de),fe=ie.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],de),he=ie.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*I.iI,"px;\n ")}));var me=function(e){var n=e.children,t=e.large,r=e.lineHeight,i=e.ordered,l=(0,re.Z)(e,se),o=i?fe:pe;return(0,V.jsx)(o,ae(ae({large:t,lineHeight:r},l),{},{children:u.Children.map(n,(function(e,n){return(0,V.jsx)(he,ae(ae({large:t,marginTop:n>=1},l),{},{children:u.cloneElement(e)}),e.props.key)}))}))},ge=t(98781),ve=t(82944),je=t(70902),xe=t(18025);function be(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?be(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):be(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ze=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:b.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:b.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:b.Xm.API}];return e?n.slice(0,1):n};var _e=function(e){var n=e.fetchPipelineSchedule,t=e.pipeline,r=e.pipelineSchedule,l=e.variables,c=(0,d.useRouter)(),s=null===t||void 0===t?void 0:t.uuid,g=null===r||void 0===r?void 0:r.id,j=(null===t||void 0===t?void 0:t.type)===ge.q.STREAMING,x=(0,u.useState)(null),P=x[0],S=x[1],C=(0,u.useState)([]),A=C[0],M=C[1],U=(0,u.useState)(!1),z=U[0],q=U[1],X=(0,u.useState)(!1),L=X[0],W=X[1],re=(0,u.useState)(),ie=re[0],le=re[1],oe=(0,u.useState)({}),ce=oe[0],se=oe[1],ue=(0,u.useState)(r),ae=ue[0],de=ue[1],pe=(0,u.useState)(!1),fe=pe[0],he=pe[1],be=(0,u.useState)(null),_e=be[0],Oe=be[1],Pe=(0,u.useMemo)((function(){return(0,R.wx)(l,(function(e){return"global"===e.uuid}))}),[l]),we=ae||{},Se=we.name,Ce=we.schedule_interval,Ee=we.schedule_type,Ie=we.settings,ke=void 0===Ie?{}:Ie,Te=we.sla,De=we.start_time,Ae=(we.token,we.variables),Me=void 0===Ae?{}:Ae;(0,u.useEffect)((function(){le(null===ke||void 0===ke?void 0:ke.skip_if_previous_running)}),[ke]);var Re=(0,u.useState)(null),Ne=Re[0],Ue=Re[1],Fe=(0,u.useState)({hour:"00",minute:"00"}),He=Fe[0],ze=Fe[1],qe=w.ZP.event_rules.detail("aws").data,Ve=(0,u.useMemo)((function(){var e;return(null===qe||void 0===qe||null===(e=qe.event_rule)||void 0===e?void 0:e.rules)||[]}),[qe]),Xe=(0,u.useMemo)((function(){return(0,T.HK)(Ve,(function(e){return e.name}))}),[Ve]),Le=(0,a.Db)(w.ZP.pipeline_schedules.useUpdate(g),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){n(),c.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(s,"/triggers/").concat(g))},onErrorCallback:function(e,n){return S({errors:n,response:e})}})}}),We=(0,i.Z)(Le,2),Je=We[0],Ge=We[1].isLoading,Be=(0,u.useMemo)((function(){return Me||{}}),[Me]);(0,u.useEffect)((function(){if(De){var e=De.split(" ")[1];Ue((0,N.eI)(De)),ze({hour:e.substring(0,2),minute:e.substring(3,5)})}else{var n=new Date;Ue(n),ze({hour:String(n.getUTCHours()).padStart(2,"0"),minute:String(n.getUTCMinutes()).padStart(2,"0")})}}),[De]),(0,u.useEffect)((function(){Be&&Object.keys(Be).length>0&&q(!0)}),[Be]),(0,u.useEffect)((function(){se(z?null===Pe||void 0===Pe?void 0:Pe.reduce((function(e,n){var t=n.uuid,r=n.value;return ye(ye({},e),{},(0,o.Z)({},t,Be[t]||r))}),{}):null)}),[Pe,z]),(0,u.useEffect)((function(){if(r&&(M(r.event_matchers),Ye?(de(ye(ye({},r),{},{schedule_interval:"custom"})),Oe(Ce)):de(j?ye(ye({},r),{},{schedule_interval:b.U5.ONCE}):r),r.sla)){W(!0);var e=(0,N.gU)(Te),n=e.time,t=e.unit;de((function(e){return ye(ye({},e),{},{slaAmount:n,slaUnit:t})}))}}),[r]);var Ke=(0,u.useCallback)((function(){var e=ye(ye({},(0,F.GL)(ae,["name","schedule_type"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,R.e7)(ce)});if(b.Xm.EVENT===ae.schedule_type?e.event_matchers=A:(e.schedule_interval=Ye?_e:ae.schedule_interval,e.start_time=Ne&&null!==He&&void 0!==He&&He.hour&&null!==He&&void 0!==He&&He.minute?"".concat(Ne.toISOString().split("T")[0]," ").concat(null===He||void 0===He?void 0:He.hour,":").concat(null===He||void 0===He?void 0:He.minute,":00"):null),L){var n=null===ae||void 0===ae?void 0:ae.slaAmount,t=null===ae||void 0===ae?void 0:ae.slaUnit;if(!n||isNaN(n)||!t)return void G.Am.error("Please enter a valid SLA",{position:G.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,N.vJ)(n,t)}else null!==r&&void 0!==r&&r.sla&&(e.sla=0);b.Xm.TIME===ae.schedule_type&&(e.settings=ye(ye({},ke),{},{skip_if_previous_running:ie})),Je({pipeline_schedule:e})}),[_e,Ne,L,A,r,ce,ae,ke,ie,He,Je]),Ye=(0,u.useMemo)((function(){return Ce&&!Object.values(b.U5).includes(Ce)}),[Ce]),Qe=(0,u.useMemo)((function(){var e=[[(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.KJ,{default:!0,size:1.5*I.iI}),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_detail"),(0,V.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),de((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Se},"trigger_name_input_detail")],[(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.Pf,{default:!0,size:1.5*I.iI}),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,V.jsxs)(y.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;de((function(e){return ye(ye({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:Ce,children:[!Ce&&(0,V.jsx)("option",{value:""}),Object.values(b.U5).map((function(e){return(0,V.jsx)("option",{value:e,children:e.substring(1)},e)})),(0,V.jsx)("option",{value:"custom",children:"custom"},"custom")]},"frequency_input")],[(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.aw,{default:!0,size:1.5*I.iI}),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,V.jsxs)("div",{style:{minHeight:"".concat(5.75*I.iI,"px")},children:[!fe&&(0,V.jsx)(ve.Z,{monospace:!0,onClick:function(){return he((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Ne?"".concat(Ne.toISOString().split("T")[0]," ").concat(null===He||void 0===He?void 0:He.hour,":").concat(null===He||void 0===He?void 0:He.minute):""}),(0,V.jsx)("div",{style:{width:"400px"},children:(0,V.jsx)(Y.Z,{disableEscape:!0,onClickOutside:function(){return he(!1)},open:fe,style:{position:"relative"},children:(0,V.jsx)(B.Z,{selectedDate:Ne,selectedTime:He,setSelectedDate:Ue,setSelectedTime:ze,topPosition:!0})})})]},"start_time_input")]];return j&&e.splice(1,1),Ye&&e.splice(2,0,[(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.EK,{default:!0,size:1.5*I.iI}),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,V.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Oe(e.target.value)},placeholder:"* * * * *",value:_e},"cron_expression_input")]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Z.Z,{mb:2,px:I.cd,children:(0,V.jsx)(m.Z,{children:"Settings"})}),(0,V.jsx)(f.Z,{light:!0,short:!0}),(0,V.jsx)(_.Z,{columnFlex:[null,1],rows:e})]})}),[_e,Ne,ae,fe,He]),$e=(0,u.useCallback)((function(e,n){M((function(t){return Object.entries(n).forEach((function(n){var r=(0,i.Z)(n,2),l=r[0],o=r[1];t[e][l]=o})),(0,J.Z)(t)}))}),[M]),en=(0,u.useMemo)((function(){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Z.Z,{mb:I.cd,px:I.cd,children:(0,V.jsx)(m.Z,{children:"Settings"})}),(0,V.jsx)(f.Z,{light:!0,short:!0}),(0,V.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.KJ,{default:!0,size:1.5*I.iI}),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_event"),(0,V.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),de((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Se},"trigger_name_input_event")]]}),(0,V.jsxs)(Z.Z,{mb:2,mt:5,px:I.cd,children:[(0,V.jsx)(m.Z,{children:"Events"}),(0,V.jsxs)(O.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,V.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,V.jsxs)(Z.Z,{mt:I.Mq,children:[(0,V.jsx)(O.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,V.jsxs)(O.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,V.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,V.jsx)(te.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,V.jsx)(Z.Z,{mt:1,children:(0,V.jsxs)(me,{monospace:!0,ordered:!0,children:[(0,V.jsx)(O.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,V.jsx)(O.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,V.jsx)(O.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,V.jsx)(f.Z,{light:!0,short:!0}),(null===A||void 0===A?void 0:A.length)>=1&&(0,V.jsx)(_.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===A||void 0===A?void 0:A.map((function(e,n){var t=e.event_type,r=e.name,i=e.pattern,l=e.id||"".concat(t,"-").concat(r,"-").concat(n,"-").concat(JSON.stringify(i)),o=[];return i&&JSON.stringify(i,null,2).split("\n").forEach((function(e){o.push(" ".concat(e))})),[(0,V.jsxs)(y.Z,{monospace:!0,onChange:function(e){return $e(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:[!t&&(0,V.jsx)("option",{value:""}),D.map((function(e){var n=e.label,t=e.uuid;return(0,V.jsx)("option",{value:t,children:n()},t)}))]},"event-provider-".concat(l)),(0,V.jsxs)(y.Z,{monospace:!0,onChange:function(e){var t,r=e.target.value,i=null===(t=Xe[r])||void 0===t?void 0:t.event_pattern;$e(n,{name:r,pattern:i?JSON.parse(i):null})},placeholder:"Event name",value:r,children:[!r&&(0,V.jsx)("option",{value:""}),Ve.map((function(e){var n=e.name;return(0,V.jsx)("option",{value:n,children:n},n)}))]},"event-name-".concat(l)),i&&(0,V.jsx)(Q.Z,{language:"json",small:!0,source:o.join("\n")}),(0,V.jsx)(p.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return M((function(e){return(0,T.oM)(e,n)}))},children:(0,V.jsx)(E.rF,{default:!0,size:2*I.iI})},"remove_event")]}))}),(0,V.jsx)(Z.Z,{p:I.cd,children:(0,V.jsx)(p.Z,{beforeIcon:(0,V.jsx)(E.mm,{size:2*I.iI}),onClick:function(){return M((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[A,Ve,Se]),nn=(0,u.useMemo)((function(){var e,n="";return n="".concat(window.origin,"/api/pipeline_schedules/").concat(null===r||void 0===r?void 0:r.id,"/pipeline_runs"),null!==r&&void 0!==r&&r.token&&(n="".concat(n,"/").concat(r.token)),(e=window.location.port)&&(n=n.replace(e,"6789")),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Z.Z,{mb:I.cd,px:I.cd,children:(0,V.jsx)(m.Z,{children:"Settings"})}),(0,V.jsx)(f.Z,{light:!0,short:!0}),(0,V.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.KJ,{default:!0,size:1.5*I.iI}),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_api"),(0,V.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),de((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Se},"trigger_name_input_api")]]}),(0,V.jsxs)(Z.Z,{mb:2,mt:5,px:I.cd,children:[(0,V.jsx)(m.Z,{children:"Endpoint"}),(0,V.jsxs)(O.ZP,{muted:!0,children:["Make a ",(0,V.jsx)(O.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,V.jsx)(Z.Z,{mt:I.Mq,children:(0,V.jsx)($.Z,{copiedText:n,linkText:n,monospace:!0,withCopyIcon:!0})})]}),(0,V.jsxs)(Z.Z,{mb:2,mt:5,px:I.cd,children:[(0,V.jsx)(m.Z,{children:"Payload"}),(0,V.jsx)(O.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,V.jsx)(Z.Z,{mt:I.Mq,children:(0,V.jsx)($.Z,{withCopyIcon:!0,copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',children:(0,V.jsx)(Q.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,V.jsxs)(Z.Z,{mb:2,mt:5,px:I.cd,children:[(0,V.jsx)(m.Z,{children:"Sample cURL command"}),(0,V.jsx)(Z.Z,{mt:I.Mq,children:(0,V.jsx)(Q.Z,{language:"bash",small:!0,source:"\n curl -X POST ".concat(n,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[Se,r,"object"]),tn=!Ee||b.Xm.TIME===Ee&&!(j&&Ne||!j&&Ne&&Ce)||b.Xm.EVENT===Ee&&(!(null!==A&&void 0!==A&&A.length)||!A.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),rn=(0,u.useMemo)((function(){return(0,V.jsxs)(Z.Z,{p:I.cd,children:[!(0,F.Qr)(Pe)&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(Z.Z,{mr:2,children:(0,V.jsx)(je.Z,{checked:z,onCheck:q})}),(0,V.jsx)(O.ZP,{monospace:!0,muted:!0,children:"Overwrite global variables"})]}),z&&ce&&Object.entries(ce).length>0&&(0,V.jsx)(Z.Z,{mt:2,children:(0,V.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(ce).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return[(0,V.jsx)(O.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),(0,V.jsx)(ve.Z,{borderless:!0,monospace:!0,onChange:function(e){e.preventDefault(),se((function(n){return ye(ye({},n),{},(0,o.Z)({},t,e.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:r},"variable_uuid_input_".concat(t))]}))})})]}),(0,V.jsxs)(Z.Z,{mt:2,children:[(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(Z.Z,{mr:2,children:(0,V.jsx)(je.Z,{checked:L,onCheck:function(e){W(e),e||de((function(e){return ye(ye({},e),{},{slaAmount:0})}))}})}),(0,V.jsx)(O.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),L&&(0,V.jsx)(Z.Z,{mt:2,children:(0,V.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(E.aw,{default:!0,size:1.5*I.iI}),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(O.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,V.jsxs)(h.Z,{children:[(0,V.jsx)(ne.Z,{flex:1,children:(0,V.jsx)(ve.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),de((function(n){return ye(ye({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===ae||void 0===ae?void 0:ae.slaAmount})}),(0,V.jsx)(ne.Z,{flex:1,children:(0,V.jsx)(y.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),de((function(n){return ye(ye({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===ae||void 0===ae?void 0:ae.slaUnit,children:Object.keys(N.tL).map((function(e){return(0,V.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})}),b.Xm.TIME===Ee&&(0,V.jsx)(V.Fragment,{children:(0,V.jsxs)(Z.Z,{mt:2,children:[(0,V.jsx)(m.Z,{default:!0,level:5,monospace:!0,children:"Additional settings"}),(0,V.jsx)(Z.Z,{mt:2,children:(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(K.Z,{checked:ie,onClick:function(){return le((function(e){return!e}))}}),(0,V.jsx)(Z.Z,{ml:2}),(0,V.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:"Skip run if previous run still in progress"})]})})]})})]})]})}),[L,Pe,z,ce,ae,W,q,ie]);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(v.Z,{after:rn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(s,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===r||void 0===r?void 0:r.name},linkProps:{as:"/pipelines/".concat(s,"/triggers/").concat(g),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],pageName:k.M.TRIGGERS,pipeline:t,subheader:(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(p.Z,{disabled:tn,loading:Ge,onClick:Ke,outline:!0,primary:!0,children:"Save changes"}),(0,V.jsx)(Z.Z,{mr:1}),(0,V.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/triggers/[...slug]",as:"/pipelines/".concat(s,"/triggers/").concat(g)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===r||void 0===r?void 0:r.name)},uuid:"triggers/edit",children:[(0,V.jsxs)(Z.Z,{p:I.cd,children:[(0,V.jsxs)(Z.Z,{mb:2,children:[(0,V.jsx)(m.Z,{children:"Trigger type"}),(0,V.jsx)(O.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,V.jsx)(h.Z,{children:Ze(j).map((function(e){var n=e.label,t=e.description,r=e.uuid,i=Ee===r,l=Ee&&!i;return(0,V.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){b.Xm.EVENT!==r||null!==A&&void 0!==A&&A.length||M([{}]),de((function(e){return ye(ye({},e),{},{schedule_type:r})}))},children:(0,V.jsx)(xe.U,{selected:i,children:(0,V.jsxs)(h.Z,{alignItems:"center",children:[(0,V.jsx)(ne.Z,{children:(0,V.jsx)("input",{checked:i,type:"radio"})}),(0,V.jsx)(Z.Z,{mr:I.cd}),(0,V.jsxs)(ne.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,V.jsx)(m.Z,{bold:!0,default:!i&&!l,level:5,muted:!i&&l,children:n()}),(0,V.jsx)(O.ZP,{default:!i&&!l,leftAligned:!0,muted:l,children:t()})]})]})})},r)}))})]}),(0,V.jsxs)(Z.Z,{mt:5,children:[b.Xm.TIME===Ee&&Qe,b.Xm.EVENT===Ee&&en,b.Xm.API===Ee&&nn]})]}),P&&(0,V.jsx)(Y.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return S(null)},children:(0,V.jsx)(ee.Z,ye(ye({},P),{},{onClose:function(){return S(null)}}))})]})},Oe=t(41788),Pe=t(70543);function we(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?we(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):we(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Ce(e){var n=e.pipelineScheduleId,t=e.pipelineUUID,r=e.subpath,i=w.ZP.variables.pipelines.list(t).data,l=null===i||void 0===i?void 0:i.variables,o=w.ZP.pipeline_schedules.detail(n),c=o.data,s=o.mutate,u=null===c||void 0===c?void 0:c.pipeline_schedule,a=w.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=Se(Se({},null===a||void 0===a?void 0:a.pipeline),{},{uuid:t});return Pe.b===r?(0,V.jsx)(_e,{fetchPipelineSchedule:s,pipeline:d,pipelineSchedule:u,variables:l}):(0,V.jsx)(W,{fetchPipelineSchedule:s,pipeline:d,pipelineSchedule:u,variables:l})}Ce.getInitialProps=function(){var e=(0,l.Z)(s().mark((function e(n){var t,r,l,o,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,l=t.slug,!Array.isArray(l)){e.next=4;break}return o=(0,i.Z)(l,2),c=o[0],u=o[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 Ee=(0,Oe.Z)(Ce)},95488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return t(54183)}])}},function(e){e.O(0,[3850,2083,5896,4804,1774,5872,2524,4495,9767,6579,434,9898,1830,4463,6532,1286,4846,8961,2426,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{59920:function(e,n,t){"use strict";var i;t.d(n,{M:function(){return i}}),function(e){e.BACKFILLS="backfills",e.BLOCK_RUNS="block_runs",e.EDIT="edit",e.MONITOR="monitor",e.PIPELINE_LOGS="pipeline_logs",e.PIPELINE_RUNS="pipeline_runs",e.RUNS="runs",e.SYNCS="syncs",e.TRIGGERS="triggers"}(i||(i={}))},2626:function(e,n,t){"use strict";t.d(n,{Z:function(){return T}});var i=t(21831),r=t(75582),o=t(82684),c=t(83455),l=t(34376),u=t(28598);var s=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("g",{clipPath:"url(#clip0_7525_68660)",children:(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.67625 7.82429C8.48671 8.13404 8.61933 8.53116 8.9436 8.69464C9.26787 8.85812 9.6606 8.72561 9.85513 8.41896C10.5416 7.33682 11.5276 6.47056 12.6997 5.92987C14.0715 5.29701 15.6173 5.14749 17.085 5.50568C18.5526 5.86388 19.8557 6.70866 20.7818 7.90233C21.7079 9.096 22.2023 10.5682 22.1845 12.0788C22.1667 13.5895 21.6377 15.0496 20.6837 16.2211C19.7298 17.3926 18.4071 18.2064 16.9314 18.5299C15.4557 18.8534 13.9139 18.6675 12.5573 18.0024C11.3984 17.4343 10.433 16.545 9.77227 15.447C9.58502 15.1358 9.19553 14.9941 8.86749 15.1499C8.53946 15.3057 8.39751 15.6995 8.5797 16.0137C9.37152 17.379 10.5525 18.4842 11.9785 19.1832C13.6018 19.9791 15.4469 20.2016 17.213 19.8145C18.979 19.4273 20.5619 18.4534 21.7035 17.0514C22.8451 15.6495 23.4781 13.9022 23.4994 12.0943C23.5208 10.2865 22.9291 8.52472 21.8208 7.09623C20.7126 5.66774 19.1532 4.65677 17.3968 4.22811C15.6403 3.79945 13.7905 3.97839 12.1488 4.73574C10.7068 5.40099 9.50004 6.47805 8.67625 7.82429ZM0.219185 12.5303C-0.0737079 12.2375 -0.0737079 11.7626 0.219185 11.4697L4.71918 6.96968C5.01208 6.67679 5.48695 6.67679 5.77985 6.96968C6.07274 7.26258 6.07274 7.73745 5.77985 8.03034L2.56017 11.25L15.7495 11.25C16.1637 11.25 16.4995 11.5858 16.4995 12C16.4995 12.4142 16.1637 12.75 15.7495 12.75L2.56017 12.75L5.77985 15.9697C6.07274 16.2626 6.07274 16.7375 5.77985 17.0303C5.48695 17.3232 5.01208 17.3232 4.71918 17.0303L0.219185 12.5303Z",fill:"url(#paint0_linear_7525_68660)"})}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_7525_68660",x1:"11.7498",y1:"4",x2:"11.7498",y2:"20",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},a=t(16953),d=t(61519);var p=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.25 1C23.25 0.585786 22.9142 0.25 22.5 0.25C22.0858 0.25 21.75 0.585786 21.75 1V15.5C21.75 15.9142 22.0858 16.25 22.5 16.25C22.9142 16.25 23.25 15.9142 23.25 15.5V1ZM5 4.25C5.41421 4.25 5.75 4.58579 5.75 5V15.5C5.75 15.9142 5.41421 16.25 5 16.25C4.58579 16.25 4.25 15.9142 4.25 15.5V5C4.25 4.58579 4.58579 4.25 5 4.25ZM1.5 7.25C1.91421 7.25 2.25 7.58579 2.25 8V15.5C2.25 15.9142 1.91421 16.25 1.5 16.25C1.08579 16.25 0.75 15.9142 0.75 15.5V8C0.75 7.58579 1.08579 7.25 1.5 7.25ZM9.25 7C9.25 6.58579 8.91421 6.25 8.5 6.25C8.08579 6.25 7.75 6.58579 7.75 7V15.5C7.75 15.9142 8.08579 16.25 8.5 16.25C8.91421 16.25 9.25 15.9142 9.25 15.5V7ZM12 8.75C12.4142 8.75 12.75 9.08579 12.75 9.5V15.5C12.75 15.9142 12.4142 16.25 12 16.25C11.5858 16.25 11.25 15.9142 11.25 15.5V9.5C11.25 9.08579 11.5858 8.75 12 8.75ZM16.25 11.5C16.25 11.0858 15.9142 10.75 15.5 10.75C15.0858 10.75 14.75 11.0858 14.75 11.5V15.5C14.75 15.9142 15.0858 16.25 15.5 16.25C15.9142 16.25 16.25 15.9142 16.25 15.5V11.5ZM19 9.25C19.4142 9.25 19.75 9.58579 19.75 10V15.5C19.75 15.9142 19.4142 16.25 19 16.25C18.5858 16.25 18.25 15.9142 18.25 15.5V10C18.25 9.58579 18.5858 9.25 19 9.25Z",fill:"url(#paint0_linear_2919_69883)"}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_2919_69883",x1:"1.5",y1:"11.875",x2:"22.75",y2:"11.875",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},f=t(70434),h=t(34744),g=t(67971),b=t(87372),v=t(98781),x=t(29664),m=t(86673);var j=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 17c0 1.1046-.89543 2-2 2s-2-.8954-2-2 .89543-2 2-2 2 .8954 2 2zm1.5 0c0 1.933-1.567 3.5-3.5 3.5S1.5 18.933 1.5 17s1.567-3.5 3.5-3.5 3.5 1.567 3.5 3.5zm2.25-.5c0-.4142.3358-.75.75-.75H22c.4142 0 .75.3358.75.75s-.3358.75-.75.75H11.5c-.4142 0-.75-.3358-.75-.75zM8.68946 4.29563c.16317-.38072-.0132-.82163-.39392-.9848-.38072-.16316-.82163.0132-.9848.39392L5.06418 8.94674c-.07952.18554-.3348.2052-.44179.03402L3.1361 6.60269c-.21953-.35125-.68225-.45803-1.0335-.2385-.35125.21954-.45803.68225-.2385 1.0335l1.48629 2.37807c.74892 1.19824 2.53587 1.06064 3.0925-.23814l2.24657-5.24199zM11.5 6.75c-.4142 0-.75.33579-.75.75s.3358.75.75.75H22c.4142 0 .75-.33579.75-.75s-.3358-.75-.75-.75H11.5z",fill:"url(#paint0_linear_2919_69883)"}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_2919_69883",x1:"1.5",y1:"11.875",x2:"22.75",y2:"11.875",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},y=t(82531),C=t(10503),O=t(9518),Z=t(23831),w=t(73942),_=t(49125),P=O.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],w.n_,3*_.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||Z.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),S=t(3055),k=t(59920),I=t(96510),E=t(90211),D=t(24141);var T=function(e){var n=e.after,t=e.afterHidden,O=e.afterWidth,Z=e.before,w=e.beforeWidth,T=e.breadcrumbs,N=e.buildSidekick,M=e.children,H=e.headline,R=e.pageName,V=e.pipeline,A=e.subheader,B=e.subheaderBackground,L=e.subheaderBackgroundImage,Y=e.subheaderButton,F=e.subheaderText,z=e.title,U=e.uuid,G=(0,l.useRouter)(),q=(0,D.i)().height,J=V.uuid,W=y.ZP.pipelines.detail(J,{includes_outputs:!1},{revalidateOnFocus:!1}).data,X=null===W||void 0===W?void 0:W.pipeline,K=(0,c.Db)(y.ZP.pipelines.useCreate(),{onSuccess:function(e){return(0,I.wD)(e,{callback:function(e){var n=e.pipeline.uuid;G.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n,"/edit"))}})}}),Q=(0,r.Z)(K,1)[0],$=(0,c.Db)((function(e){return y.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,I.wD)(e,{callback:function(){G.push("/pipelines")}})}}),ee=(0,r.Z)($,1)[0],ne=[{label:function(){return"New standard pipeline"},onClick:function(){return Q({pipeline:{name:(0,E.Y6)()}})},uuid:"PipelineDetail/Header/new_standard_pipeline"},{label:function(){return"New streaming pipeline"},onClick:function(){return Q({pipeline:{name:(0,E.Y6)(),type:v.q.STREAMING}})},uuid:"PipelineDetail/Header/new_streaming_pipeline"},{label:function(){return"Delete current pipeline"},onClick:function(){return ee(J)},openConfirmationDialogue:!0,uuid:"PipelineDetail/Header/delete_pipeline"}],te=(0,o.useMemo)((function(){return n||(N?N({height:q,heightOffset:S.Mz,pipeline:X}):null)}),[n,N,q,X]),ie=O||(te?50*_.iI:null),re=(0,o.useMemo)((function(){var e=[];return X&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),T?(e.push({label:function(){return X.uuid},linkProps:{as:"/pipelines/".concat(J,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,i.Z)(T)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return X.name}})),e}),[T,X,J]),oe=[{Icon:C.Pf,IconSelected:x.Z,id:k.M.TRIGGERS,isSelected:function(){return k.M.TRIGGERS===R},label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(J,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{Icon:C.pd,IconSelected:d.Z,id:k.M.RUNS,isSelected:function(){return k.M.RUNS===R},label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(J,"/runs"),href:"/pipelines/[pipeline]/runs"}},{Icon:C.yg,IconSelected:s,id:k.M.BACKFILLS,isSelected:function(){return k.M.BACKFILLS===R},label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(J,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{Icon:C.B4,IconSelected:j,id:k.M.PIPELINE_LOGS,isSelected:function(){return k.M.PIPELINE_LOGS===R},label:function(){return"Logs"},linkProps:{as:"/pipelines/".concat(J,"/logs"),href:"/pipelines/[pipeline]/logs"}},{Icon:C.kL,IconSelected:p,id:k.M.MONITOR,isSelected:function(){return k.M.MONITOR===R},label:function(){return"Monitor"},linkProps:{as:"/pipelines/".concat(J,"/monitors"),href:"/pipelines/[pipeline]/monitors"}}];return v.q.INTEGRATION===(null===X||void 0===X?void 0:X.type)&&oe.unshift({Icon:C.Re,IconSelected:a.Z,id:k.M.SYNCS,isSelected:function(){return k.M.SYNCS===R},label:function(){return"Syncs"},linkProps:{as:"/pipelines/".concat(J,"/syncs"),href:"/pipelines/[pipeline]/syncs"}}),oe.unshift({Icon:null,IconSelected:null,id:k.M.EDIT,label:function(){return"Edit pipeline"},linkProps:{as:"/pipelines/".concat(J,"/edit"),href:"/pipelines/[pipeline]/edit"}}),(0,u.jsxs)(f.Z,{after:te,afterHidden:t,afterWidth:ie,before:Z,beforeWidth:w,breadcrumbs:re,headerMenuItems:ne,navigationItems:oe,subheaderChildren:"undefined"!==typeof A&&A,title:X?z?z(X):X.name:null,uuid:U,children:[(Y||F)&&(0,u.jsx)(m.Z,{mb:_.Mq,mt:_.cd,mx:_.cd,children:(0,u.jsx)(P,{background:B,backgroundImage:L,children:(0,u.jsxs)(g.Z,{alignItems:"center",children:[Y,F&&(0,u.jsx)(m.Z,{ml:3}),F]})})}),H&&(0,u.jsx)(m.Z,{p:_.cd,children:(0,u.jsxs)(m.Z,{mt:_.cd,px:_.cd,children:[(0,u.jsx)(b.Z,{level:5,children:H}),(0,u.jsx)(h.Z,{light:!0,mt:_.cd,short:!0})]})}),M]})}},58122:function(e,n,t){"use strict";t.d(n,{CL:function(){return f},FS:function(){return h},JZ:function(){return b},e7:function(){return v},v0:function(){return p},wx:function(){return g}});var i=t(75582),r=t(82394),o=t(43313),c=t(93348),l=t(1286),u=t(90211),s=t(84779);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function p(e){var n=e.statistics,t=Object.keys(n),i=Array(o.Dy.length).fill(0);return 0===t.length?null:(t.forEach((function(e){if(o.Dy.includes(e)){var t=o.CC[e],r=n[e],c=r,l=!1,u=[2,3],a=o.Ub[e],d=o.oH[e],p=o.OD[e];if(o.y_.includes(e))l=!0,u=[2,1,2];else if(e in o.Sq){r=(0,s.Jw)(r,0);var f=o.Sq[e];c=n[f]}var h={columnFlexNumbers:u,name:t,progress:l,rate:c,successDirection:d,warning:p};o.y_.includes(e)||(h.value=r),i[a]=h}})),i)}function f(e){var n=e.columnTypes,t=void 0===n?{}:n,i=e.statistics,r=Object.keys(i);if(0===r.length)return null;var c=Object.values(t),s=c.length,a=[];a.push({name:"Column count",successDirection:o.oH.column_count,value:(0,u.x6)(s)}),r.forEach((function(e){if(o.Zu.includes(e)){var n=o.CC[e],t=i[e],r=o.OD[e];a.push({name:n,successDirection:o.oH[e],value:(0,u.x6)(t),warning:r})}}));var d=(0,l.QO)(c),p=d.countCategory,f=d.countDatetime,h=d.countNumerical;return a.push({name:"Categorical Features",rate:p/s,value:(0,u.x6)(p)},{name:"Numerical Features",rate:h/s,value:(0,u.x6)(h)},{name:"Datetime Features",rate:f/s,value:(0,u.x6)(f)}),a}function h(e){return"string"===typeof e?e:JSON.stringify(e)}function g(e,n){var t,i;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(i=t.variables)||void 0===i?void 0:i.map((function(e){var n=e.value;return d(d({},e),{},{value:h(n)})}))}function b(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 v(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,i.Z)(n,2),o=t[0],c=t[1],l=c;try{l=JSON.parse(c)}catch(u){}return d(d({},e),{},(0,r.Z)({},o,l))}),{}):e}},97225:function(e,n,t){"use strict";var i=t(75582),r=t(12691),o=t.n(r),c=t(82684),l=t(83455),u=t(34376),s=t(60328),a=t(47999),d=t(67971),p=t(10919),f=t(93348),h=t(62609),g=t(86673),b=t(87815),v=t(19711),x=t(82531),m=t(10503),j=t(49125),y=t(45838),C=t(96510),O=t(66653),Z=t(28598);n.Z=function(e){var n=e.fetchPipelineSchedules,t=e.highlightRowOnHover,r=e.includeCreatedAtColumn,w=e.includePipelineColumn,_=e.pipeline,P=e.pipelineSchedules,S=e.selectedSchedule,k=e.setSelectedSchedule,I=e.stickyHeader,E=null===_||void 0===_?void 0:_.uuid,D=(0,u.useRouter)(),T=(0,c.useRef)({}),N=(0,c.useState)(null),M=N[0],H=N[1],R=(0,c.useState)(0),V=R[0],A=R[1],B=(0,c.useState)(0),L=B[0],Y=B[1],F=(0,l.Db)((function(e){return x.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){n()},onErrorCallback:function(e){var n=e.error,t=n.errors,i=n.message;console.log(t,i)}})}}),z=(0,i.Z)(F,1)[0],U=(0,l.Db)((function(e){return x.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){n(),E?D.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(E,"/triggers")):n()}})}}),G=(0,i.Z)(U,1)[0],q=[{label:function(){return""},uuid:"action"},{uuid:"Status"},{uuid:"Type"},{uuid:"Name"},{uuid:"Frequency"},{uuid:"Runs"},{uuid:"Latest run status"},{uuid:"Logs"},{label:function(){return""},uuid:"edit/delete"}],J=[null,1,1,3,1,null,null,null,null];return w&&(q.splice(2,0,{uuid:"Pipeline"}),J.splice(2,0,2)),r&&(q.splice(3,0,{uuid:"Created at"}),J.splice(3,0,null)),(0,Z.jsx)(y.cl,{overflowVisible:!0,children:0===P.length?(0,Z.jsx)(g.Z,{px:3,py:1,children:(0,Z.jsx)(v.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,Z.jsx)(b.Z,{columnFlex:J,columns:q,highlightRowOnHover:t,isSelectedRow:function(e){return P[e].id===(null===S||void 0===S?void 0:S.id)},onClickRow:k?function(e){return null===k||void 0===k?void 0:k(P[e])}:null,rowVerticalPadding:6,rows:P.map((function(e,n){var t,i=e.id,l=e.created_at,u=e.pipeline_runs_count,b=e.pipeline_uuid,x=e.last_pipeline_run_status,y=e.name,C=e.schedule_interval,_=e.status,P=E||b;T.current[i]=(0,c.createRef)();var S=[(0,Z.jsx)(s.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,O.j)(n),z({id:e.id,status:f.fq.ACTIVE===_?f.fq.INACTIVE:f.fq.ACTIVE})},children:f.fq.ACTIVE===_?(0,Z.jsx)(m.dz,{muted:!0,size:2*j.iI}):(0,Z.jsx)(m.Py,{default:!0,size:2*j.iI})},"toggle_trigger_".concat(n)),(0,Z.jsx)(v.ZP,{default:f.fq.INACTIVE===_,monospace:!0,success:f.fq.ACTIVE===_,children:_},"trigger_status_".concat(n)),(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:null===(t=f.Z4[e.schedule_type])||void 0===t?void 0:t.call(f.Z4)},"trigger_type_".concat(n)),(0,Z.jsx)(o(),{as:"/pipelines/".concat(P,"/triggers/").concat(i),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,Z.jsx)(p.Z,{bold:!0,onClick:function(e){(0,O.j)(e),D.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(P,"/triggers/").concat(i))},sameColorAsText:!0,children:y})},"trigger_name_".concat(n)),(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:C},"trigger_frequency_".concat(n)),(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:u},"trigger_run_count_".concat(n)),(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:x||"N/A"},"latest_run_status_".concat(n)),(0,Z.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return D.push("/pipelines/".concat(P,"/logs?pipeline_schedule_id[]=").concat(i))},children:(0,Z.jsx)(m.B4,{default:!0,size:2*j.iI})},"logs_button_".concat(n)),(0,Z.jsxs)(d.Z,{children:[(0,Z.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return D.push("/pipelines/".concat(P,"/triggers/").concat(i,"/edit"))},title:"Edit",children:(0,Z.jsx)(m.I8,{default:!0,size:2*j.iI})}),(0,Z.jsx)(g.Z,{mr:1}),(0,Z.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,r;H(i),A((null===(e=T.current[i])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),Y((null===(t=T.current[i])||void 0===t||null===(r=t.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:T.current[i],title:"Delete",children:(0,Z.jsx)(m.rF,{default:!0,size:2*j.iI})}),(0,Z.jsx)(a.Z,{onClickOutside:function(){return H(null)},open:M===i,children:(0,Z.jsx)(h.Z,{danger:!0,left:(L||0)-286,onCancel:function(){return H(null)},onClick:function(){H(null),G(i)},title:"Are you sure you want to delete the trigger ".concat(y,"?"),top:(V||0)-(n<=1?40:96),width:40*j.iI})})]},"edit_delete_buttons_".concat(n))];return w&&S.splice(2,0,(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:P},"pipeline_name_".concat(n))),r&&S.splice(3,0,(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:l},"created_at_".concat(n))),S})),stickyHeader:I,uuid:"pipeline-triggers"})})}},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return u},Xm:function(){return o},Z4:function(){return a},fq:function(){return l},kJ:function(){return s}});var i,r,o,c=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var l,u,s,a=(i={},(0,c.Z)(i,o.API,(function(){return"API"})),(0,c.Z)(i,o.EVENT,(function(){return"event"})),(0,c.Z)(i,o.TIME,(function(){return"schedule"})),i);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(l||(l={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(u||(u={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(s||(s={}));var d=(r={},(0,c.Z)(r,s.CREATED_AT,"Created at"),(0,c.Z)(r,s.NAME,"Name"),(0,c.Z)(r,s.PIPELINE,"Pipeline"),(0,c.Z)(r,s.STATUS,"Status"),(0,c.Z)(r,s.TYPE,"Type"),r)},29237:function(e,n,t){"use strict";var i=t(9518),r=t(67971),o=t(86673),c=t(19711),l=t(31969),u=t(73942),s=t(37391),a=t(49125),d=t(28598),p=1.75,f=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],p*a.iI,1.5*a.iI,1.5*a.iI),h=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;width:100%;"," "," "," "," "," ",""],u.n_,(function(e){return"\n background-color: ".concat((e.theme.background||l.Z.background).panel,";\n border: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\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.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),g=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," ",""],u.n_,u.n_,(function(e){return"\n background-color: ".concat((e.theme.background||l.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f),b=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],p*a.iI,s.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*a.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),v=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],u.M8,u.YF,p*a.iI);n.Z=function(e){var n=e.borderless,t=e.children,i=e.containerRef,l=e.contentContainerRef,u=e.footer,s=e.fullHeight,a=void 0===s||s,p=e.header,f=e.headerHeight,x=e.headerIcon,m=e.headerTitle,j=e.maxHeight,y=e.noPadding,C=e.overflowVisible,O=e.subtitle,Z=e.minWidth;return(0,d.jsxs)(h,{borderless:n,fullHeight:a,maxHeight:j,minWidth:Z,overflowVisible:C,ref:i,children:[(p||m)&&(0,d.jsxs)(g,{height:f,children:[p&&p,m&&(0,d.jsx)(r.Z,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(r.Z,{alignItems:"center",children:[x&&x,(0,d.jsx)(o.Z,{ml:x?1:0,children:(0,d.jsx)(c.ZP,{bold:!0,default:!0,children:m})})]})})]}),(0,d.jsxs)(b,{maxHeight:j,noPadding:y,overflowVisible:C,ref:l,children:[O&&(0,d.jsx)(o.Z,{mb:2,children:(0,d.jsx)(c.ZP,{default:!0,children:O})}),t]}),u&&(0,d.jsx)(v,{children:u})]})}},82944:function(e,n,t){"use strict";var i=t(82394),r=t(91835),o=t(82684),c=t(9518),l=t(69898),u=t(28598);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var d=c.default.input.withConfig({displayName:"TextInput__TextInputStyle",componentId:"sc-1ii4qtc-0"})(["",""],l.p),p=function(e,n){var t=(0,r.Z)({},e);return(0,u.jsx)(l.Z,a(a({},t),{},{input:(0,u.jsx)(d,a({},t)),ref:n}))};n.Z=o.forwardRef(p)},70902:function(e,n,t){"use strict";var i=t(82394),r=t(26304),o=t(82684),c=t(9518),l=t(69898),u=t(23831),s=t(28598),a=["checked","onCheck"];function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=c.default.label.withConfig({displayName:"ToggleSwitch__ToggleSwitchStyle",componentId:"sc-179r5zs-0"})([""," position:relative;display:inline-block;width:","px;min-width:","px;height:",'px;& input[type="checkbox"]{display:none;}& span{position:absolute;cursor:',";background-color:",";border-radius:13px;",';top:0;right:0;bottom:0;left:0;transition:background-color 0.2s ease;}& span::before{position:absolute;content:"";left:2px;top:2px;width:22px;height:22px;background-color:#787A85;border-radius:50%;transition:transform 0.3s ease;}& input[type="checkbox"]:checked + span::before{transform:translateX(20px);}',""],l.p,46,46,26,(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.disabled?u.Z.monotone.white:u.Z.monotone.black}),(function(e){return e.disabled&&"border: 1px solid ".concat(u.Z.monotone.grey200)}),(function(e){return!e.disabled&&'\n & input[type="checkbox"]:checked + span {\n background-color: #6AA1E0;\n }\n\n & input[type="checkbox"]:checked + span::before {\n background-color: '.concat(u.Z.monotone.white,";\n }\n ")})),h=function(e,n){var t=e.checked,i=e.onCheck,o=(0,r.Z)(e,a);return(0,s.jsx)(l.Z,p(p({},o),{},{input:(0,s.jsxs)(f,p(p({},o),{},{noBackground:!0,noBorder:!0,children:[(0,s.jsx)("input",{checked:t,type:"checkbox"}),(0,s.jsx)("span",{onClick:function(){return i((function(e){return!e}))}})]})),noBackground:!0,ref:n}))};n.Z=o.forwardRef(h)},16953:function(e,n,t){"use strict";var i=t(28598);n.Z=function(e){var n=e.size;return(0,i.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 8.5H15.5V3.5H20.5V8.5ZM14 9V3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55229 21.5523 10 21 10H15C14.4477 10 14 9.55229 14 9ZM2 5V12.5V14V21.5C2 22.0523 2.44772 22.5 3 22.5H10.5H12H19.5C20.0523 22.5 20.5 22.0523 20.5 21.5V13.5C20.5 12.9477 20.0523 12.5 19.5 12.5H12V5C12 4.44772 11.5523 4 11 4H3C2.44772 4 2 4.44772 2 5ZM10.5 14V21H3.5V14H10.5ZM19 14V21H12V14H19ZM10.5 5.5V12.5H3.5V5.5H10.5Z",fill:"url(#paint0_linear_2842_55048)"}),(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{id:"paint0_linear_2842_55048",x1:"2",y1:"12.25",x2:"22",y2:"12.25",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,i.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})}},56312:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return fe}});var i=t(77837),r=t(82394),o=t(75582),c=t(38860),l=t.n(c),u=t(12691),s=t.n(u),a=t(82684),d=t(83455),p=t(34376),f=t(60328),h=t(86532),g=t(34744),b=t(67971),v=t(87372),x=t(11135),m=t(10919),j=t(2626),y=t(93348),C=t(41788),O=t(29237),Z=t(86673),w=t(87815),_=t(19711),P=t(26304),S=t(9518),k=t(69898),I=t(28598),E=["rows"];function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var N=S.default.textarea.withConfig({displayName:"TextArea__TextInputStyle",componentId:"sc-112wx63-0"})(["",""],k.p),M=function(e,n){var t=e.rows,i=void 0===t?3:t,r=(0,P.Z)(e,E);return(0,I.jsx)(k.Z,T(T({},r),{},{input:(0,I.jsx)(N,T({rows:i},r)),ref:n}))},H=a.forwardRef(M),R=t(82944),V=t(70902),A=t(23831),B=t(73942),L=t(49125),Y=S.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*L.iI,2*L.iI,B.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||A.Z).borders.light,";\n background-color: ").concat((e.theme||A.Z).background.popup,";\n ")})),F=t(90211),z=t(58122);function U(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function G(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?U(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):U(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var q="".concat(L.iI,"px ").concat(3*L.iI,"px");var J=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,i=e.onSuccess,c=e.variables,l=(0,a.useState)(!1),u=l[0],s=l[1],d=(0,a.useState)({}),p=d[0],h=d[1],g=(0,a.useState)(c||{}),x=g[0],m=g[1],j=(0,a.useMemo)((function(){return G(G({},n),{},{name:(0,F.Y6)(),variables:u?(0,z.e7)(x):null})}),[n,u,x]),y=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),m((function(t){return G(G({},t),{},(0,r.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,I.jsx)(H,G(G({},t),{},{rows:1,value:n})):(0,I.jsx)(R.Z,G({},t))};return(0,a.useEffect)((function(){var e=Object.entries(x).reduce((function(e,n){var t=(0,o.Z)(n,2),i=t[0],c=t[1],l=(0,F.Pb)(c)&&"object"===typeof JSON.parse(c)&&!Array.isArray(JSON.parse(c))&&null!==JSON.parse(c);return G(G({},e),{},(0,r.Z)({},i,l))}),{});h(e)}),[]),(0,I.jsxs)(O.Z,{footer:(0,I.jsxs)(b.Z,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,I.jsx)(f.Z,{onClick:function(){i({pipeline_schedule:j}),t()},padding:q,primaryAlternate:!0,children:"Run now"}),(0,I.jsx)(Z.Z,{mr:1}),(0,I.jsx)(f.Z,{borderColor:A.Z.background.page,onClick:t,padding:q,secondary:!0,children:"Cancel"})]}),header:(0,I.jsx)(v.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*L.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,I.jsx)(Y,{children:(0,I.jsxs)(b.Z,{alignItems:"center",children:[(0,I.jsx)(Z.Z,{mr:2,children:(0,I.jsx)(V.Z,{checked:u,onCheck:s})}),(0,I.jsx)(_.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),u&&x&&Object.entries(x).length>0&&(0,I.jsx)(Z.Z,{mt:2,children:(0,I.jsx)(w.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(x).map((function(e){var n=(0,o.Z)(e,2),t=n[0],i=n[1];return[(0,I.jsx)(_.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),y(t,i)]}))})})]})},W=t(37391),X=S.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],A.Z.borders.medium,L.tr),K=S.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],W.w5),Q=S.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],A.Z.background.output,B.n_,L.iI,L.tr),$=t(73899);var ee=function(e){var n=e.hasOverride,t=e.scheduleType,i=e.variables,r=e.variablesOverride,c=[];return Object.entries(i).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0],i=n[1],l=null===r||void 0===r?void 0:r[t];c.push({uuid:t,value:(0,z.FS)(l||i)})})),(0,z.JZ)(c,t),(0,I.jsxs)(X,{children:[(0,I.jsx)(Z.Z,{mb:2,children:(0,I.jsxs)(_.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,I.jsx)(K,{noScrollbarTrackBackground:!0,children:i&&c.map((function(e){var n=e.uuid,t=e.value;return(0,I.jsxs)(Q,{children:[(0,I.jsx)(_.ZP,{monospace:!0,small:!0,children:n}),(0,I.jsx)(_.ZP,{color:$.Or,monospace:!0,small:!0,children:(0,z.FS)(t)})]})}))})]})},ne=t(46261),te=t(97225),ie=t(82531),re=t(10503),oe=t(59920),ce=t(42305),le=t(7715),ue=t(96510),se=t(83608);function ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function de(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,r.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 pe(e){var n=e.pipeline,t=(0,p.useRouter)(),i=n.uuid,c=ie.ZP.variables.pipelines.list(i).data,l=null===c||void 0===c?void 0:c.variables,u=ie.ZP.pipeline_schedules.pipelines.list(i,{},{refreshInterval:7500}),C=u.data,O=u.mutate,w=(0,a.useMemo)((function(){return(null===C||void 0===C?void 0:C.pipeline_schedules)||[]}),[C]),P=function(e){return(0,d.Db)(ie.ZP.pipeline_schedules.pipelines.useCreate(i),{onSuccess:function(n){return(0,ue.wD)(n,{callback:function(n){var t=n.pipeline_schedule.id;null===e||void 0===e||e(t)},onErrorCallback:function(e){var n=e.error,t=n.errors,i=n.message;console.log(t,i)}})}})},S=P((function(e){return t.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),k=(0,o.Z)(S,2),E=k[0],D=k[1].isLoading,T=P(O),N=(0,o.Z)(T,2),M=N[0],H=N[1].isLoading,R=(0,a.useMemo)((function(){var e;return null===(e=(0,z.wx)(l,(function(e){return"global"===e.uuid})))||void 0===e?void 0:e.reduce((function(e,n){var t=n.uuid,i=n.value;return de(de({},e),{},(0,r.Z)({},t,i))}),{})}),[l]),V={name:(0,F.Y6)(),schedule_interval:y.U5.ONCE,schedule_type:y.Xm.TIME,start_time:(0,ce.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:y.fq.ACTIVE},A=(0,se.dd)((function(){return(0,I.jsx)(J,{initialPipelineSchedulePayload:V,onCancel:U,onSuccess:M,variables:R})}),{},[l,R],{background:!0,uuid:"run_pipeline_now_popup"}),B=(0,o.Z)(A,2),Y=B[0],U=B[1],G=(0,a.useState)(),q=G[0],W=G[1],X=(0,a.useMemo)((function(){var e=null===q||void 0===q?void 0:q.variables,n=!(0,le.Qr)(e),t=n?null===q||void 0===q?void 0:q.variables:(0,le.Qr)(R)?null:R;return function(r){var o=r.height-(t?151:0);return(0,I.jsxs)(I.Fragment,{children:[t&&(0,I.jsx)(ee,{hasOverride:n,scheduleType:null===q||void 0===q?void 0:q.schedule_type,variables:R,variablesOverride:e}),!t&&(0,I.jsxs)(Z.Z,{p:L.cd,children:[(0,I.jsx)(_.ZP,{children:"This pipeline has no runtime variables."}),(0,I.jsxs)(Z.Z,{mt:1,children:[(0,I.jsx)(s(),{as:"/pipelines/".concat(i,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,I.jsx)(m.Z,{children:"Click here"})})," ",(0,I.jsx)(_.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,I.jsx)(h.Z,de(de({},r),{},{height:o,noStatus:!0}))]})}}),[l,q]);return(0,I.jsxs)(j.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:X,pageName:oe.M.TRIGGERS,pipeline:n,subheaderBackgroundImage:"/images/banner-shape-purple-peach.jpg",subheaderButton:(0,I.jsx)(x.ZP,{beforeElement:(0,I.jsx)(re.mm,{size:2.5*L.iI}),blackBorder:!0,inline:!0,loading:D,noHoverUnderline:!0,onClick:function(){return E({pipeline_schedule:{name:(0,F.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,I.jsx)(_.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(oe.M.TRIGGERS,"_").concat(i),children:[(0,I.jsx)(Z.Z,{mt:L.cd,px:L.cd,children:(0,I.jsxs)(b.Z,{justifyContent:"space-between",children:[(0,I.jsx)(v.Z,{level:5,children:"Pipeline triggers"}),(0,I.jsx)(ne.Z,{appearBefore:!0,default:!0,fullSize:!0,label:"Creates an @once trigger and runs pipeline immediately",widthFitContent:!0,children:(0,I.jsx)(f.Z,{beforeIcon:(0,I.jsx)(re.JM,{inverted:!0,size:2*L.iI}),loading:H,onClick:(0,le.Qr)(R)?function(){return M({pipeline_schedule:V})}:Y,outline:!0,success:!0,children:"Run pipeline now"})})]})}),(0,I.jsx)(g.Z,{light:!0,mt:L.cd,short:!0}),(0,I.jsx)(te.Z,{fetchPipelineSchedules:O,pipeline:n,pipelineSchedules:w,selectedSchedule:q,setSelectedSchedule:W})]})}pe.getInitialProps=function(){var e=(0,i.Z)(l().mark((function e(n){var t;return l().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 fe=(0,C.Z)(pe)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return d},AY:function(){return p},BP:function(){return a},JX:function(){return s},OC:function(){return o},Pc:function(){return f},d$:function(){return u},lJ:function(){return h},n1:function(){return l}});var i=t(92083),r=t.n(i),o="YYYY-MM-DD HH:mm:SS",c="YYYY-MM-DD HH:mm",l="YYYY-MM-DD";function u(e,n){var t=n.utcFormat,i=n.dayAgo,o=r()(e);return t&&(o=o.utc()),i&&(o=o.subtract(1,"days")),o.format(c)}function s(e){return r().unix(e).format(c)}function a(e,n,t){return r()(e).utc().hours(+n).minutes(+t).format()}function d(e){return r()(e).unix()}function p(e,n,t){return"".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t)}function f(e){var n=r().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function h(e){return e.padStart(2,"0")}},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(56312)}])}},function(e){e.O(0,[3850,2083,5896,4804,1774,5872,9767,6579,434,9898,1830,4463,6532,1286,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6308],{29237:function(n,e,t){"use strict";var i=t(9518),r=t(67971),o=t(86673),d=t(19711),c=t(31969),a=t(73942),l=t(37391),u=t(49125),h=t(28598),s=1.75,f=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],s*u.iI,1.5*u.iI,1.5*u.iI),g=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;width:100%;"," "," "," "," "," ",""],a.n_,(function(n){return"\n background-color: ".concat((n.theme.background||c.Z.background).panel,";\n border: 1px solid ").concat((n.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(n){return!n.fullHeight&&"\n height: fit-content;\n "}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,";\n ")}),(function(n){return n.minWidth&&"\n min-width: ".concat(n.minWidth,"px;\n\n @media (max-width: ").concat(n.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(n){return n.borderless&&"\n border: none;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),p=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," ",""],a.n_,a.n_,(function(n){return"\n background-color: ".concat((n.theme.background||c.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((n.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),f),x=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],s*u.iI,l.w5,(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return n.maxHeight&&"\n max-height: calc(".concat(n.maxHeight," - ").concat(15*u.iI,"px);\n ")}),(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),m=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],a.M8,a.YF,s*u.iI);e.Z=function(n){var e=n.borderless,t=n.children,i=n.containerRef,c=n.contentContainerRef,a=n.footer,l=n.fullHeight,u=void 0===l||l,s=n.header,f=n.headerHeight,b=n.headerIcon,v=n.headerTitle,w=n.maxHeight,_=n.noPadding,Z=n.overflowVisible,j=n.subtitle,I=n.minWidth;return(0,h.jsxs)(g,{borderless:e,fullHeight:u,maxHeight:w,minWidth:I,overflowVisible:Z,ref:i,children:[(s||v)&&(0,h.jsxs)(p,{height:f,children:[s&&s,v&&(0,h.jsx)(r.Z,{alignItems:"center",justifyContent:"space-between",children:(0,h.jsxs)(r.Z,{alignItems:"center",children:[b&&b,(0,h.jsx)(o.Z,{ml:b?1:0,children:(0,h.jsx)(d.ZP,{bold:!0,default:!0,children:v})})]})})]}),(0,h.jsxs)(x,{maxHeight:w,noPadding:_,overflowVisible:Z,ref:c,children:[j&&(0,h.jsx)(o.Z,{mb:2,children:(0,h.jsx)(d.ZP,{default:!0,children:j})}),t]}),a&&(0,h.jsx)(m,{children:a})]})}},96283:function(n,e,t){"use strict";t.r(e);var i=t(77837),r=t(38860),o=t.n(r),d=t(29237),c=t(41788),a=t(30775),l=t(86673),u=t(67867),h=t(82531),s=t(49125),f=t(79585),g=t(9736),p=t(28598);function x(){var n=((0,g.PR)()||{}).id,e=h.ZP.users.detail(n).data,t=null===e||void 0===e?void 0:e.user;return(0,p.jsx)(a.Z,{uuidItemSelected:f.DQ,uuidWorkspaceSelected:f.tC,children:(0,p.jsx)(l.Z,{p:s.cd,children:(0,p.jsx)(d.Z,{children:(0,p.jsx)(u.Z,{disabledFields:["roles"],user:t})})})})}x.getInitialProps=(0,i.Z)(o().mark((function n(){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{});case 1:case"end":return n.stop()}}),n)}))),e.default=(0,c.Z)(x)},10736:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/account/profile",function(){return t(96283)}])}},function(n){n.O(0,[3850,9767,6579,434,9898,9140,9774,2888,179],(function(){return e=10736,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{2850:function(e,n,t){"use strict";t.d(n,{M:function(){return a},W:function(){return i}});var r=t(9518),o=t(23831),c=t(3055),i=34*t(49125).iI,a=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],c.Mz,(function(e){return"\n border-left: 1px solid ".concat((e.theme.borders||o.Z.borders).medium,";\n ")}))},79585:function(e,n,t){"use strict";t.d(n,{DQ:function(){return d},HY:function(){return c},SA:function(){return l},WH:function(){return o},eC:function(){return i},tC:function(){return a}});var r=t(9736),o="Workspace",c="Preferences",i="Users",a="Account",d="Profile",l=function(e){var n=e.owner,t=[{linkProps:{href:"/settings/workspace/preferences"},uuid:c}];n&&t.push({linkProps:{href:"/settings/workspace/users"},uuid:i});var l=[{items:t,uuid:o}];return(0,r.YB)()?l.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:d}],uuid:a}]):l}},30775:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var r=t(70434),o=t(82394),c=t(12691),i=t.n(c),a=t(10919),d=t(86673),l=t(19711),u=t(9518),s=t(23831),p=t(49125),f=t(90880),h=(p.iI,u.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*p.iI,2.5*p.iI)),b=u.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,f.eR)(),1.5*p.iI,2.5*p.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||s.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||s.Z.background).codeTextarea,";\n ")})),m=t(28598),g=t(82684);function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var v=function(e){var n=e.isItemSelected,t=e.sections;return(0,m.jsx)(d.Z,{py:p.Gg,children:null===t||void 0===t?void 0:t.map((function(e){var t=e.items,r=e.title,o=e.uuid;return(0,m.jsxs)(d.Z,{children:[(0,m.jsx)(h,{children:(0,m.jsx)(l.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:r?r():o})}),null===t||void 0===t?void 0:t.map((function(e){var t=e.label,r=e.linkProps,c=e.onClick,d=e.uuid,l=t?t():d,u=(0,m.jsx)(b,{selected:null===n||void 0===n?void 0:n(k(k({},e),{},{uuidWorkspace:o})),children:l});return r?(0,g.createElement)(i(),k(k({},r),{},{key:d,passHref:!0}),(0,m.jsx)(a.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:u})):(0,m.jsx)(a.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:c,preventDefault:!0,sameColorAsText:!0,children:u},d)}))]},o)}))})},j=t(2850),y=t(79585),w=t(9736);var O=function(e){var n=e.after,t=e.afterHidden,o=e.children,c=e.uuidItemSelected,i=e.uuidWorkspaceSelected,a=((0,w.PR)()||{}).owner;return(0,m.jsx)(r.Z,{after:n,afterHidden:!n||t,afterWidth:n?50*p.iI:0,afterWidthOverride:!0,before:(0,m.jsx)(j.M,{children:(0,m.jsx)(v,{isItemSelected:function(e){var n=e.uuid,t=e.uuidWorkspace;return i===t&&c===n},sections:(0,y.SA)({owner:a})})}),beforeWidth:j.W,title:"Settings",uuid:"settings/index",children:o})}},38341:function(e,n,t){"use strict";var r=t(21831),o=t(82394),c=t(26304),i=(t(82684),t(9518)),a=t(67971),d=t(86673),l=t(19711),u=t(23831),s=t(10503),p=t(73942),f=t(49125),h=t(28598),b=["beforeIcon","checked","disabled","errorMessage","label","labelDescription","large","meta","monospace","onClick","required","small","warning","xsmall"];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 g(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,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=i.default.div.withConfig({displayName:"Checkbox__CheckboxContainer",componentId:"sc-ujqx42-0"})(["display:inline-block;vertical-align:middle;cursor:pointer;"]),k=i.default.div.withConfig({displayName:"Checkbox__ErrorContainer",componentId:"sc-ujqx42-1"})(["margin-top:4px;"]),v=i.default.input.withConfig({displayName:"Checkbox__HiddenCheckbox",componentId:"sc-ujqx42-2"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;",""],(function(e){return e.notClickable&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,"\n border-color: ").concat((e.theme.content||u.Z.content).disabled,"\n\n &:hover {\n cursor: not-allowed;\n }\n ")})),j=i.default.div.withConfig({displayName:"Checkbox__StyledCheckbox",componentId:"sc-ujqx42-3"})(["border-radius:","px;height:","px;transition:all 150ms;width:","px;svg{position:relative;visibility:",";}"," "," "," "," input[disabled]{cursor:default;}"," ",""],.5*f.iI,2*f.iI,2*f.iI,(function(e){return e.checked||e.required?"visible":"hidden"}),(function(e){return e.large&&"\n svg {\n left: -4px;\n top: -8px;\n }\n "}),(function(e){return!e.checked&&"\n background-color: ".concat((e.theme.background||u.Z.background).popup,";\n border: ").concat(p.PV,"px ").concat(p.M8," ").concat((e.theme.content||u.Z.content).muted,";\n ")}),(function(e){return e.checked&&"\n background-color: ".concat((e.theme.interactive||u.Z.interactive).checked,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.required&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,";\n border-color: ").concat((e.theme.content||u.Z.content).disabled,";\n\n &:hover {\n cursor: not-allowed;\n }\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||u.Z.accent).warning,";\n border-color: ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,"\n ")})),y=i.default.label.withConfig({displayName:"Checkbox__LabelStyle",componentId:"sc-ujqx42-4"})(["-ms-flex-direction:column;align-items:center;display:flex;flex-direction:column;flex-direction:row;&:hover{cursor:pointer;}"]);n.Z=function(e){var n=e.beforeIcon,t=e.checked,o=e.disabled,i=e.errorMessage,u=e.label,p=e.labelDescription,m=e.large,w=e.meta,O=e.monospace,Z=void 0!==O&&O,C=e.onClick,P=e.required,_=e.small,I=void 0!==_&&_,S=e.warning,D=e.xsmall,N=void 0!==D&&D,W=(0,c.Z)(e,b),E=S||!!(i||w&&w.touched&&w.error);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(y,{onClick:function(e){e.preventDefault(),C&&C(e)},children:[(0,h.jsxs)(x,{children:[(0,h.jsx)(v,g(g({},W),{},{disabled:o?"disabled":void 0,notClickable:o})),(0,h.jsx)(j,{checked:t,disabled:o,large:m,required:P,warning:E,children:(0,h.jsx)(s.Jr,{size:f.iI*(m?3:2)})})]}),n&&(0,h.jsx)(d.Z,{ml:1,children:(0,h.jsx)(a.Z,{children:n})}),u&&(0,h.jsxs)(d.Z,{pl:1,children:["string"===typeof u&&(0,h.jsx)(l.ZP,{disabled:o,lineThrough:o,monospace:Z,small:I,xsmall:N,children:u}),"string"!==typeof u&&u,p&&(0,h.jsx)(l.ZP,{muted:!0,small:!0,children:p})]})]}),(i||w&&w.touched&&w.error)&&(0,h.jsx)(k,{children:(0,h.jsx)(l.ZP,{small:!0,warning:!0,children:i?(0,r.Z)(i):w.error})})]})}},42949:function(e,n,t){"use strict";t.r(n);var r=t(77837),o=t(38860),c=t.n(o),i=t(82684),a=t(38341),d=t(67971),l=t(41788),u=t(30775),s=t(86673),p=t(11366),f=t(49125),h=t(79585),b=t(91427),m=t(28598);function g(){var e=(0,i.useState)(!!(0,b.U2)(p.k)),n=e[0],t=e[1];return(0,m.jsx)(u.Z,{uuidItemSelected:h.HY,uuidWorkspaceSelected:h.WH,children:(0,m.jsx)(s.Z,{p:f.cd,children:(0,m.jsx)(d.Z,{alignItems:"center",children:(0,m.jsx)(a.Z,{checked:n,label:"Automatically use randomly generated name for blocks created in the future",onClick:function(){t(!n),(0,b.t8)(p.k,!n)}})})})})}g.getInitialProps=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,l.Z)(g)},11366:function(e,n,t){"use strict";t.d(n,{k:function(){return r}});var r="automatically_name_blocks"},33323:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return t(42949)}])}},function(e){e.O(0,[3850,9767,6579,434,9774,2888,179],(function(){return n=33323,e(e.s=n);var n}));var n=e.O();_N_E=n}]);