mage-ai 0.8.97__py3-none-any.whl → 0.8.99__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 (152) hide show
  1. mage_ai/api/policies/AutocompleteItemPolicy.py +2 -1
  2. mage_ai/api/policies/BasePolicy.py +2 -2
  3. mage_ai/api/policies/BlockTemplatePolicy.py +2 -1
  4. mage_ai/api/policies/ClusterPolicy.py +2 -1
  5. mage_ai/api/policies/DataProviderPolicy.py +2 -1
  6. mage_ai/api/policies/EventRulePolicy.py +2 -1
  7. mage_ai/api/policies/ExtensionOptionPolicy.py +2 -1
  8. mage_ai/api/policies/FileVersionPolicy.py +2 -1
  9. mage_ai/api/policies/GitBranchPolicy.py +9 -0
  10. mage_ai/api/policies/KernelPolicy.py +2 -1
  11. mage_ai/api/policies/LogPolicy.py +2 -2
  12. mage_ai/api/policies/OauthPolicy.py +15 -0
  13. mage_ai/api/policies/OutputPolicy.py +2 -2
  14. mage_ai/api/policies/PipelinePolicy.py +2 -2
  15. mage_ai/api/policies/PipelineRunPolicy.py +2 -2
  16. mage_ai/api/policies/PipelineSchedulePolicy.py +2 -2
  17. mage_ai/api/policies/PullRequestPolicy.py +64 -0
  18. mage_ai/api/policies/SessionPolicy.py +4 -1
  19. mage_ai/api/policies/VariablePolicy.py +2 -2
  20. mage_ai/api/policies/WidgetPolicy.py +2 -2
  21. mage_ai/api/policies/WorkspacePolicy.py +3 -3
  22. mage_ai/api/presenters/PipelinePresenter.py +1 -0
  23. mage_ai/api/presenters/PullRequestPresenter.py +16 -0
  24. mage_ai/api/presenters/StatusPresenter.py +2 -0
  25. mage_ai/api/presenters/SyncPresenter.py +1 -0
  26. mage_ai/api/presenters/WorkspacePresenter.py +2 -0
  27. mage_ai/api/resources/GitBranchResource.py +81 -26
  28. mage_ai/api/resources/OauthResource.py +31 -4
  29. mage_ai/api/resources/PipelineResource.py +8 -1
  30. mage_ai/api/resources/PullRequestResource.py +87 -0
  31. mage_ai/api/resources/RoleResource.py +6 -3
  32. mage_ai/api/resources/SecretResource.py +2 -5
  33. mage_ai/api/resources/SessionResource.py +18 -0
  34. mage_ai/api/resources/StatusResource.py +7 -3
  35. mage_ai/api/resources/UserResource.py +11 -16
  36. mage_ai/api/resources/WorkspaceResource.py +83 -53
  37. mage_ai/authentication/oauth/active_directory.py +17 -0
  38. mage_ai/authentication/oauth/constants.py +9 -0
  39. mage_ai/authentication/oauth/utils.py +2 -1
  40. mage_ai/authentication/oauth2.py +9 -3
  41. mage_ai/cli/main.py +94 -51
  42. mage_ai/cluster_manager/kubernetes/workload_manager.py +141 -45
  43. mage_ai/data_preparation/git/__init__.py +86 -16
  44. mage_ai/data_preparation/git/api.py +175 -0
  45. mage_ai/data_preparation/models/block/dbt/utils/__init__.py +49 -14
  46. mage_ai/data_preparation/models/block/sql/__init__.py +3 -2
  47. mage_ai/data_preparation/models/pipeline.py +4 -1
  48. mage_ai/data_preparation/models/pipelines/integration_pipeline.py +7 -3
  49. mage_ai/data_preparation/preferences.py +4 -2
  50. mage_ai/data_preparation/repo_manager.py +41 -10
  51. mage_ai/data_preparation/shared/secrets.py +5 -6
  52. mage_ai/data_preparation/sync/__init__.py +2 -1
  53. mage_ai/data_preparation/sync/git_sync.py +2 -5
  54. mage_ai/data_preparation/templates/utils.py +2 -0
  55. mage_ai/orchestration/db/models/oauth.py +22 -4
  56. mage_ai/orchestration/pipeline_scheduler.py +19 -8
  57. mage_ai/orchestration/queue/process_queue.py +15 -12
  58. mage_ai/server/api/clusters.py +21 -11
  59. mage_ai/server/constants.py +1 -1
  60. mage_ai/server/frontend_dist/404.html +2 -2
  61. mage_ai/server/frontend_dist/404.html.html +2 -2
  62. mage_ai/server/frontend_dist/_next/static/WRxCTOtmZhTqQws_7OJZD/_buildManifest.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/{1286-993725c925c56a98.js → 1286-b90bd4b7f8abfc3a.js} +1 -1
  64. mage_ai/server/frontend_dist/_next/static/chunks/{1424-f475cae42f8a7fca.js → 1424-90c0f66ba2f86b88.js} +1 -1
  65. mage_ai/server/frontend_dist/_next/static/chunks/3883-c95563b9f60ae526.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/6694-c8f2a68074420906.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/{9350-1ff50f1d7b9ee754.js → 9350-5191c83a8d0cf454.js} +1 -1
  68. mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-3527178abd99bc87.js → _app-171846e16d26855a.js} +1 -1
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-e4e778f8f5e1bf2e.js +1 -0
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-c788c1b127999825.js +1 -0
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-b4650224a19e8fe6.js +1 -0
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-931eb719e3fae29c.js +1 -0
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-d3724bde0b186dd9.js +1 -0
  74. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-af11f9cf94024ac0.js +1 -0
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-3ec5eb9562e4bff4.js → [...slug]-34326db259f922d1.js} +1 -1
  76. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-503ecb7a72257b79.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-7667080098731e30.js → [run]-2994b8ab7862c07b.js} +1 -1
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-7b31b851e2544b42.js +1 -0
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-e18058e13882b20d.js → [...slug]-4445619d4eabe065.js} +1 -1
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-6854c10d5589d394.js → triggers-b7db0b682fadb840.js} +1 -1
  81. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-ee0931af3abb55b3.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-f8a59d718751be9a.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-90f8830890036eb2.js +1 -0
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-9f82673fc438ea83.js +1 -0
  85. mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-a1871b8a537d823c.js +1 -0
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-48859b4e9c846212.js +1 -0
  87. mage_ai/server/frontend_dist/files.html +2 -2
  88. mage_ai/server/frontend_dist/index.html +2 -2
  89. mage_ai/server/frontend_dist/manage/settings.html +24 -0
  90. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  91. mage_ai/server/frontend_dist/manage/users/new.html +24 -0
  92. mage_ai/server/frontend_dist/manage/users.html +2 -2
  93. mage_ai/server/frontend_dist/manage.html +2 -2
  94. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  95. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  96. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  97. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  98. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  99. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  100. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  101. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  102. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  103. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  104. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  105. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  106. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  107. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  108. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  109. mage_ai/server/frontend_dist/pipelines.html +2 -2
  110. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  111. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  112. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  113. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  114. mage_ai/server/frontend_dist/settings.html +2 -2
  115. mage_ai/server/frontend_dist/sign-in.html +2 -2
  116. mage_ai/server/frontend_dist/terminal.html +2 -2
  117. mage_ai/server/frontend_dist/test.html +2 -2
  118. mage_ai/server/frontend_dist/triggers.html +2 -2
  119. mage_ai/server/frontend_dist/version-control.html +2 -2
  120. mage_ai/server/scheduler_manager.py +7 -2
  121. mage_ai/server/server.py +37 -3
  122. mage_ai/server/terminal_server.py +2 -2
  123. mage_ai/server/websocket_server.py +6 -2
  124. mage_ai/services/newrelic/__init__.py +21 -0
  125. mage_ai/settings/__init__.py +32 -0
  126. mage_ai/shared/hash.py +2 -0
  127. mage_ai/tests/api/test_utils.py +29 -2
  128. mage_ai/tests/data_preparation/models/test_pipeline.py +5 -0
  129. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/METADATA +8 -3
  130. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/RECORD +136 -127
  131. mage_ai/data_preparation/templates/main/projects/__init__.py +0 -0
  132. mage_ai/server/frontend_dist/_next/static/YLZRSrQ0aqtl-GGePfsMB/_buildManifest.js +0 -1
  133. mage_ai/server/frontend_dist/_next/static/chunks/3077-d58f18ed770e5137.js +0 -1
  134. mage_ai/server/frontend_dist/_next/static/chunks/3714-b676173cd4d8d86c.js +0 -1
  135. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-82b5409dac9564f4.js +0 -1
  136. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-bb6aaa23e92a5add.js +0 -1
  137. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-c91ee702a4cd7a6f.js +0 -1
  138. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-7961010cb0fb9abd.js +0 -1
  139. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-7b8ce89f0d717465.js +0 -1
  140. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-5bd17a8f3f3d57ef.js +0 -1
  141. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-7d75e42d5f4936bb.js +0 -1
  142. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-8220c1200472bf70.js +0 -1
  143. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-b602fa9b6ffabd12.js +0 -1
  144. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-3f9d5800f268a263.js +0 -1
  145. mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-2925c2c1b0c5559a.js +0 -1
  146. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5ffc663cfb0ec81e.js +0 -1
  147. /mage_ai/server/frontend_dist/_next/static/{YLZRSrQ0aqtl-GGePfsMB → WRxCTOtmZhTqQws_7OJZD}/_middlewareManifest.js +0 -0
  148. /mage_ai/server/frontend_dist/_next/static/{YLZRSrQ0aqtl-GGePfsMB → WRxCTOtmZhTqQws_7OJZD}/_ssgManifest.js +0 -0
  149. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/LICENSE +0 -0
  150. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/WHEEL +0 -0
  151. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/entry_points.txt +0 -0
  152. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7869],{59739:function(e,n,t){"use strict";var r=t(56669);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,n,t,i,o,u){if(u!==r){var c=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 c.name="Invariant Violation",c}}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:o,resetWarningCache:i};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"},44152:function(e,n,t){"use strict";t.d(n,{r:function(){return s}});var r=t(82684);const i=e=>{let n;const t=new Set,r=(e,r)=>{const i="function"===typeof e?e(n):e;if(i!==n){const e=n;n=r?i:Object.assign({},n,i),t.forEach((t=>t(n,e)))}},i=()=>n,o={setState:r,getState:i,subscribe:e=>(t.add(e),()=>t.delete(e)),destroy:()=>t.clear()};return n=e(r,i,o),o};var o=t(81550);const{useSyncExternalStoreWithSelector:u}=o;const c=e=>{const n="function"===typeof e?(e=>e?i(e):i)(e):e,t=(e,t)=>function(e,n=e.getState,t){const i=u(e.subscribe,e.getState,e.getServerState||e.getState,n,t);return(0,r.useDebugValue)(i),i}(n,e,t);return Object.assign(t,n),t};var l=e=>e?c(e):c;const s=e=>{const n=l((()=>e)),t=(Object.keys(e),(e,t)=>{n.setState((n=>{return{[e]:(r=n[e],i=t,"function"==typeof i?i(r):i)};var r,i}))});return{useGlobalState:e=>{const i=(0,r.useCallback)((n=>n[e]),[e]);return[n(i),(0,r.useCallback)((n=>t(e,n)),[e])]},getGlobalState:e=>n.getState()[e],setGlobalState:t,subscribe:(e,t)=>{n.subscribe(((n,r)=>{n[e]!==r[e]&&t(n[e])}))}}}},1589:function(e,n,t){"use strict";var r=t(82684);var i="function"===typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e===1/n)||e!==e&&n!==n},o=r.useState,u=r.useEffect,c=r.useLayoutEffect,l=r.useDebugValue;function s(e){var n=e.getSnapshot;e=e.value;try{var t=n();return!i(e,t)}catch(r){return!0}}var a="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,n){return n()}:function(e,n){var t=n(),r=o({inst:{value:t,getSnapshot:n}}),i=r[0].inst,a=r[1];return c((function(){i.value=t,i.getSnapshot=n,s(i)&&a({inst:i})}),[e,t,n]),u((function(){return s(i)&&a({inst:i}),e((function(){s(i)&&a({inst:i})}))}),[e]),l(t),t};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:a},73847:function(e,n,t){"use strict";var r=t(82684),i=t(48216);var o="function"===typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e===1/n)||e!==e&&n!==n},u=i.useSyncExternalStore,c=r.useRef,l=r.useEffect,s=r.useMemo,a=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,n,t,r,i){var f=c(null);if(null===f.current){var d={hasValue:!1,value:null};f.current=d}else d=f.current;f=s((function(){function e(e){if(!l){if(l=!0,u=e,e=r(e),void 0!==i&&d.hasValue){var n=d.value;if(i(n,e))return c=n}return c=e}if(n=c,o(u,e))return n;var t=r(e);return void 0!==i&&i(n,t)?n:(u=e,c=t)}var u,c,l=!1,s=void 0===t?null:t;return[function(){return e(n())},null===s?void 0:function(){return e(s())}]}),[n,t,r,i]);var v=u(e,f[0],f[1]);return l((function(){d.hasValue=!0,d.value=v}),[v]),a(v),v}},48216:function(e,n,t){"use strict";e.exports=t(1589)},81550:function(e,n,t){"use strict";e.exports=t(73847)},1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return C}});var r=t(82394),i=t(21831),o=t(82684),u=t(47999),c=t(49894),l=t(93461),s=t(57384),a=t(41424),f=t(72454),d=t(28598);function v(e,n){var t=e.children;return(0,d.jsx)(f.HS,{ref:n,children:t})}var h=o.forwardRef(v),p=t(32063),b=t(85019),y=t(82531),g=t(66166),j=t(3055),O=t(49125),x=t(91427),m=t(24141);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 w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?S(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):S(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var C=function(e){var n,t=e.after,r=e.afterHidden,v=e.afterWidth,S=e.afterWidthOverride,C=e.before,k=e.beforeWidth,E=e.breadcrumbs,Z=e.children,P=e.errors,_=e.headerMenuItems,M=e.headerOffset,F=e.mainContainerHeader,D=e.navigationItems,R=e.setErrors,T=e.subheaderChildren,V=e.title,I=e.uuid,H=(0,m.i)().width,W="dashboard_after_width_".concat(I),N="dashboard_before_width_".concat(I),U=(0,o.useRef)(null),A=(0,o.useState)(S?v:(0,x.U2)(W,v)),z=A[0],K=A[1],B=(0,o.useState)(!1),G=B[0],X=B[1],L=(0,o.useState)(C?Math.max((0,x.U2)(N,k),13*O.iI):null),Y=L[0],q=L[1],J=(0,o.useState)(!1),Q=J[0],$=J[1],ee=(0,o.useState)(null)[1],ne=y.ZP.projects.list({},{revalidateOnFocus:!1}).data,te=null===ne||void 0===ne?void 0:ne.projects,re=[];E?re.push.apply(re,(0,i.Z)(E)):(null===te||void 0===te?void 0:te.length)>=1&&re.push.apply(re,[{label:function(){var e;return null===(e=te[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return V}}]),(0,o.useEffect)((function(){null===U||void 0===U||!U.current||G||Q||null===ee||void 0===ee||ee(U.current.getBoundingClientRect().width)}),[G,z,Q,Y,U,ee,H]),(0,o.useEffect)((function(){G||(0,x.t8)(W,z)}),[r,G,z,W]),(0,o.useEffect)((function(){Q||(0,x.t8)(N,Y)}),[Q,Y,N]);var ie=(0,g.Z)(v);return(0,o.useEffect)((function(){S&&ie!==v&&K(v)}),[S,v,ie]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.Z,{title:V}),(0,d.jsx)(a.Z,{breadcrumbs:re,menuItems:_,project:null===te||void 0===te?void 0:te[0],version:null===te||void 0===te||null===(n=te[0])||void 0===n?void 0:n.version}),(0,d.jsxs)(f.Nk,{children:[0!==(null===D||void 0===D?void 0:D.length)&&(0,d.jsx)(f.lm,{showMore:!0,children:(0,d.jsx)(b.Z,{navigationItems:D,showMore:!0})}),(0,d.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,d.jsxs)(p.Z,{after:t,afterHeightOffset:j.Mz,afterHidden:r,afterMousedownActive:G,afterWidth:z,before:C,beforeHeightOffset:j.Mz,beforeMousedownActive:Q,beforeWidth:f.k1+(C?Y:0),headerOffset:M,hideAfterCompletely:!0,leftOffset:C?f.k1:null,mainContainerHeader:F,mainContainerRef:U,setAfterMousedownActive:X,setAfterWidth:K,setBeforeMousedownActive:$,setBeforeWidth:q,children:[T&&(0,d.jsx)(h,{children:T}),Z]})})]}),P&&(0,d.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===R||void 0===R?void 0:R(null)},children:(0,d.jsx)(c.Z,w(w({},P),{},{onClose:function(){return null===R||void 0===R?void 0:R(null)}}))})]})}},55389:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return J}});var r=t(77837),i=t(38860),o=t.n(i),u=t(82394),c=t(75582),l=t(17717),s=t(82684),a=t(37958),f=t(83455),d=t(48591),v=t(1210),h=t(46299),p=t(91207),b=t(47999),y=t(67971),g=t(62084),j=t(19711),O=t(16115),x=t(64318),m=t(54405),S=t(41150),w=t(28598);var C=function(e){var n=e.children,t=e.fileVersionsVisible,r=e.onSave,i=e.setFilesVersionsVisible,o=(0,s.useState)(null),u=o[0],c=o[1],l=(0,s.useRef)(null),a=(0,s.useRef)(null),f=(0,s.useMemo)((function(){return[{disabled:!r,keyTextGroups:[[(0,m.V5)()?O.RJ:O.hE,O.SS]],label:function(){return"Save"},onClick:function(){return r?r():null},uuid:"save"}]}),[r]),d=(0,s.useMemo)((function(){return[{label:function(){return t?"Hide versions":"Show versions"},onClick:function(){return i(!t)},uuid:"versions"}]}),[t,i]),v="FileHeaderMenu/index",h=(0,S.y)(),p=h.registerOnKeyDown,C=h.unregisterOnKeyDown;return(0,s.useEffect)((function(){return function(){C(v)}}),[C,v]),p(v,(function(e,n){null!==u&&(n[O.QK]?c((function(e){return 0===e?2:e-1})):n[O.DY]&&c((function(e){return 2===e?0:e+1})))}),[u,c]),(0,w.jsx)(b.Z,{onClickOutside:function(){return c(null)},open:!0,style:{position:"relative"},children:(0,w.jsxs)(y.Z,{children:[(0,w.jsxs)("div",{style:{position:"relative"},children:[(0,w.jsx)(x.u,{highlighted:0===u,onClick:function(){return c((function(e){return 0===e?null:0}))},onMouseEnter:function(){return c((function(e){return null!==e?0:null}))},ref:l,children:(0,w.jsx)(j.ZP,{children:"File"})}),(0,w.jsx)(g.Z,{items:f,onClickCallback:function(){return c(null)},open:0===u,parentRef:l,uuid:"FileHeaderMenu/file"})]}),(0,w.jsxs)("div",{style:{position:"relative"},children:[(0,w.jsx)(x.u,{highlighted:1===u,onClick:function(){return c((function(e){return 1===e?null:1}))},onMouseEnter:function(){return c((function(e){return null!==e?1:null}))},ref:a,children:(0,w.jsx)(j.ZP,{children:"Edit"})}),(0,w.jsx)(g.Z,{items:d,onClickCallback:function(){return c(null)},open:1===u,parentRef:a,uuid:"FileHeaderMenu/edit"})]}),n]})})},k=t(38488),E=t(23351),Z=t(82531),P=t(38626),_=t(23831),M=t(82386),F=t(3055),D=t(37391),R=72-M.uX+F.Mz,T=P.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-11pty4f-0"})(["height:","px;top:","px;z-index:3;",""],72,F.Mz,(function(e){return"\n background-color: ".concat((e.theme.background||_.Z.background).codeArea,";\n ")})),V=P.default.div.withConfig({displayName:"indexstyle__MenuStyle",componentId:"sc-11pty4f-1"})(["height:","px;position:relative;z-index:1;",""],36,(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||_.Z.borders).medium,";\n ")})),I=P.default.div.withConfig({displayName:"indexstyle__TabsStyle",componentId:"sc-11pty4f-2"})([""," height:","px;overflow-x:auto;position:sticky;width:100%;z-index:0;"],(0,D.y$)(),36),H=t(91427),W=t(24224),N="open_files";function U(e){(0,H.t8)(N,e)}var A=t(96510),z=t(51504),K=t(9728);function B(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?B(Object(t),!0).forEach((function(n){(0,u.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}function X(e){var n=e.split(l.sep);return n[n.length-1]}var L=function(){var e=(0,a.j)("apiReloads"),n=(0,c.Z)(e,2)[1],t=(0,s.useRef)(null),r=(0,s.useRef)(null),i=(0,s.useCallback)((function(e){r.current||(r.current={}),r.current=G(G({},r.current),e)}),[r]),o=(0,s.useState)([]),l=o[0],b=o[1],y=(0,s.useState)(null),g=y[0],j=y[1],x=(0,s.useState)({}),m=x[0],P=x[1],_=(0,s.useState)(!1),M=_[0],F=_[1],D=(0,s.useMemo)((function(){return l.reduce((function(e,n){var t=X(n);return e[t]||(e[t]=[]),e[t].push(n),e}),{})}),[l]),B=(0,s.useCallback)((function(e){U(e),b(e)}),[]),L=(0,s.useCallback)((function(e){B(function(e){var n=(0,H.U2)(N,[]);return n.includes(e)||n.push(e),U(n),n}(e))}),[B]),Y=(0,s.useCallback)((function(e){i((0,u.Z)({},e,null)),P((function(n){return G(G({},n),{},(0,u.Z)({},e,!1))}));var n=function(e){var n=(0,H.U2)(N,[]),t=(0,W.Od)(n,(function(n){return n===e}));return U(t),t}(e);B(n),g===e&&(null===n||void 0===n?void 0:n.length)>=1&&j(n[n.length-1]),0===(null===n||void 0===n?void 0:n.length)&&j(null)}),[g,i,B]),q=(0,s.useCallback)((function(e,n){n||(L(e),j(e))}),[L]);(0,s.useEffect)((function(){var e=(0,H.U2)(N,[]);B(e),j((function(n){return!n&&(null===e||void 0===e?void 0:e.length)>=1?e[0]:n}))}),[B]);var J=Z.ZP.files.list(),Q=J.data,$=J.mutate,ee=(0,s.useMemo)((function(){return(null===Q||void 0===Q?void 0:Q.files)||[]}),[Q]),ne=(0,K.VI)(null,{},[],{uuid:"FilesPage"}),te=(0,c.Z)(ne,1)[0],re="Files/index",ie=(0,S.y)(),oe=(ie.disableGlobalKeyboardShortcuts,ie.registerOnKeyDown),ue=ie.unregisterOnKeyDown;(0,s.useEffect)((function(){return function(){ue(re)}}),[ue,re]),oe(re,(function(e,n){var t=Object.entries(m).reduce((function(e,n){var t=(0,c.Z)(n,2),r=t[0];return t[1]?e.concat(r):e}),[]);if((0,z.y)([O.zX,O.hS],n)&&(null===t||void 0===t?void 0:t.length)>=1){e.preventDefault();var r="You have changes that are unsaved: ".concat(t.join(", "),". ")+"Click cancel and save your changes before reloading page.";"undefined"!==typeof location&&window.confirm(r)&&location.reload()}}),[m]);var ce=(0,s.useMemo)((function(){return(0,w.jsx)(k.Z,{filePaths:l,filesTouched:m,isSelectedFilePath:function(e,n){return e===n},onClickTab:function(e){return j(e)},onClickTabClose:function(e){return Y(e)},renderTabTitle:function(e){var n=X(e),t=D[n];return t&&(null===t||void 0===t?void 0:t.length)>=2?e:n},selectedFilePath:g})}),[m,l,D,Y,g]),le=(0,s.useMemo)((function(){return(0,w.jsx)(h.Z,{fetchFileTree:$,files:ee,onClickFile:function(e){return q(e)},onClickFolder:function(e){return q(e,!0)},onCreateFile:function(e){var n=e.path;return q(n)},ref:t,setErrors:te})}),[$,t,ee,q,te]),se=(0,f.Db)((function(e){return Z.ZP.file_contents.useUpdate((null===e||void 0===e?void 0:e.path)&&encodeURIComponent(null===e||void 0===e?void 0:e.path))({file_content:e})}),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(e){var t=e.file_content;n((function(e){return G(G({},e),{},(0,u.Z)({},"FileVersions/".concat(null===t||void 0===t?void 0:t.path),Number(new Date)))})),i((0,u.Z)({},null===t||void 0===t?void 0:t.path,null))},onErrorCallback:function(e,n){return te({errors:n,response:e})}})}}),ae=(0,c.Z)(se,1)[0],fe=(0,s.useCallback)((function(e,n){ae(G(G({},n),{},{content:e})),P((function(e){return G(G({},e),{},(0,u.Z)({},null===n||void 0===n?void 0:n.path,!1))}))}),[P,ae]),de=(0,s.useMemo)((function(){return null===l||void 0===l?void 0:l.map((function(e){return(0,w.jsx)("div",{style:{display:g===e?null:"none"},children:(0,w.jsx)(d.Z,{uuid:"FileEditor/".concat(decodeURIComponent(e)),children:(0,w.jsx)(p.Z,{active:g===e,disableRefreshWarning:!0,filePath:e,hideHeaderButtons:!0,onContentChange:function(n){return i((0,u.Z)({},e,n))},saveFile:fe,selectedFilePath:g,setErrors:te,setFilesTouched:P})})},e)}))}),[l,fe,g,i,te]),ve=(0,s.useMemo)((function(){return(0,w.jsx)(C,{fileVersionsVisible:M,onSave:function(){var e,n;(null===r||void 0===r||null===(e=r.current)||void 0===e||null===(n=e[g])||void 0===n?void 0:n.length)>=1&&fe(r.current[g],{path:g})},setFilesVersionsVisible:F})}),[r,M,fe,g,F]);return(0,w.jsx)(v.Z,{after:(0,w.jsx)(d.Z,{uuid:"FileVersions/".concat(g?decodeURIComponent(g):""),children:(0,w.jsx)(E.Z,{selectedFilePath:g,setErrors:te})}),afterHidden:!(M&&g),before:le,headerOffset:R,mainContainerHeader:(null===l||void 0===l?void 0:l.length)>=1&&(0,w.jsxs)(T,{children:[(0,w.jsx)(V,{children:ve}),(0,w.jsx)(I,{children:ce})]}),title:"Files",uuid:"Files/index",children:de})},Y=t(41788);function q(){return(0,w.jsx)(L,{})}q.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var J=(0,Y.Z)(q)},99017:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/files",function(){return t(55389)}])}},function(e){e.O(0,[844,7607,7011,8789,1424,1005,7815,6694,7722,551,4127,9774,2888,179],(function(){return n=99017,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3512],{59739:function(e,n,t){"use strict";var r=t(56669);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,n,t,i,o,u){if(u!==r){var c=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 c.name="Invariant Violation",c}}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:o,resetWarningCache:i};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"},44152:function(e,n,t){"use strict";t.d(n,{r:function(){return l}});var r=t(82684);const i=e=>{let n;const t=new Set,r=(e,r)=>{const i="function"===typeof e?e(n):e;if(i!==n){const e=n;n=r?i:Object.assign({},n,i),t.forEach((t=>t(n,e)))}},i=()=>n,o={setState:r,getState:i,subscribe:e=>(t.add(e),()=>t.delete(e)),destroy:()=>t.clear()};return n=e(r,i,o),o};var o=t(81550);const{useSyncExternalStoreWithSelector:u}=o;const c=e=>{const n="function"===typeof e?(e=>e?i(e):i)(e):e,t=(e,t)=>function(e,n=e.getState,t){const i=u(e.subscribe,e.getState,e.getServerState||e.getState,n,t);return(0,r.useDebugValue)(i),i}(n,e,t);return Object.assign(t,n),t};var a=e=>e?c(e):c;const l=e=>{const n=a((()=>e)),t=(Object.keys(e),(e,t)=>{n.setState((n=>{return{[e]:(r=n[e],i=t,"function"==typeof i?i(r):i)};var r,i}))});return{useGlobalState:e=>{const i=(0,r.useCallback)((n=>n[e]),[e]);return[n(i),(0,r.useCallback)((n=>t(e,n)),[e])]},getGlobalState:e=>n.getState()[e],setGlobalState:t,subscribe:(e,t)=>{n.subscribe(((n,r)=>{n[e]!==r[e]&&t(n[e])}))}}}},1589:function(e,n,t){"use strict";var r=t(82684);var i="function"===typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e===1/n)||e!==e&&n!==n},o=r.useState,u=r.useEffect,c=r.useLayoutEffect,a=r.useDebugValue;function l(e){var n=e.getSnapshot;e=e.value;try{var t=n();return!i(e,t)}catch(r){return!0}}var s="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,n){return n()}:function(e,n){var t=n(),r=o({inst:{value:t,getSnapshot:n}}),i=r[0].inst,s=r[1];return c((function(){i.value=t,i.getSnapshot=n,l(i)&&s({inst:i})}),[e,t,n]),u((function(){return l(i)&&s({inst:i}),e((function(){l(i)&&s({inst:i})}))}),[e]),a(t),t};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:s},73847:function(e,n,t){"use strict";var r=t(82684),i=t(48216);var o="function"===typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e===1/n)||e!==e&&n!==n},u=i.useSyncExternalStore,c=r.useRef,a=r.useEffect,l=r.useMemo,s=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,n,t,r,i){var f=c(null);if(null===f.current){var d={hasValue:!1,value:null};f.current=d}else d=f.current;f=l((function(){function e(e){if(!a){if(a=!0,u=e,e=r(e),void 0!==i&&d.hasValue){var n=d.value;if(i(n,e))return c=n}return c=e}if(n=c,o(u,e))return n;var t=r(e);return void 0!==i&&i(n,t)?n:(u=e,c=t)}var u,c,a=!1,l=void 0===t?null:t;return[function(){return e(n())},null===l?void 0:function(){return e(l())}]}),[n,t,r,i]);var p=u(e,f[0],f[1]);return a((function(){d.hasValue=!0,d.value=p}),[p]),s(p),p}},48216:function(e,n,t){"use strict";e.exports=t(1589)},81550:function(e,n,t){"use strict";e.exports=t(73847)},1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var r=t(82394),i=t(21831),o=t(82684),u=t(47999),c=t(49894),a=t(93461),l=t(57384),s=t(41424),f=t(72454),d=t(28598);function p(e,n){var t=e.children;return(0,d.jsx)(f.HS,{ref:n,children:t})}var v=o.forwardRef(p),h=t(32063),S=t(85019),A=t(82531),T=t(66166),E=t(3055),R=t(49125),O=t(91427),g=t(24141);function b(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 m(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 y=function(e){var n,t=e.after,r=e.afterHidden,p=e.afterWidth,b=e.afterWidthOverride,y=e.before,D=e.beforeWidth,N=e.breadcrumbs,L=e.children,C=e.errors,P=e.headerMenuItems,w=e.headerOffset,Z=e.mainContainerHeader,_=e.navigationItems,k=e.setErrors,M=e.subheaderChildren,j=e.title,I=e.uuid,x=(0,g.i)().width,Y="dashboard_after_width_".concat(I),H="dashboard_before_width_".concat(I),B=(0,o.useRef)(null),U=(0,o.useState)(b?p:(0,O.U2)(Y,p)),W=U[0],X=U[1],K=(0,o.useState)(!1),V=K[0],F=K[1],G=(0,o.useState)(y?Math.max((0,O.U2)(H,D),13*R.iI):null),Q=G[0],q=G[1],J=(0,o.useState)(!1),$=J[0],z=J[1],ee=(0,o.useState)(null)[1],ne=A.ZP.projects.list({},{revalidateOnFocus:!1}).data,te=null===ne||void 0===ne?void 0:ne.projects,re=[];N?re.push.apply(re,(0,i.Z)(N)):(null===te||void 0===te?void 0:te.length)>=1&&re.push.apply(re,[{label:function(){var e;return null===(e=te[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return j}}]),(0,o.useEffect)((function(){null===B||void 0===B||!B.current||V||$||null===ee||void 0===ee||ee(B.current.getBoundingClientRect().width)}),[V,W,$,Q,B,ee,x]),(0,o.useEffect)((function(){V||(0,O.t8)(Y,W)}),[r,V,W,Y]),(0,o.useEffect)((function(){$||(0,O.t8)(H,Q)}),[$,Q,H]);var ie=(0,T.Z)(p);return(0,o.useEffect)((function(){b&&ie!==p&&X(p)}),[b,p,ie]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.Z,{title:j}),(0,d.jsx)(s.Z,{breadcrumbs:re,menuItems:P,project:null===te||void 0===te?void 0:te[0],version:null===te||void 0===te||null===(n=te[0])||void 0===n?void 0:n.version}),(0,d.jsxs)(f.Nk,{children:[0!==(null===_||void 0===_?void 0:_.length)&&(0,d.jsx)(f.lm,{showMore:!0,children:(0,d.jsx)(S.Z,{navigationItems:_,showMore:!0})}),(0,d.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,d.jsxs)(h.Z,{after:t,afterHeightOffset:E.Mz,afterHidden:r,afterMousedownActive:V,afterWidth:W,before:y,beforeHeightOffset:E.Mz,beforeMousedownActive:$,beforeWidth:f.k1+(y?Q:0),headerOffset:w,hideAfterCompletely:!0,leftOffset:y?f.k1:null,mainContainerHeader:Z,mainContainerRef:B,setAfterMousedownActive:F,setAfterWidth:X,setBeforeMousedownActive:z,setBeforeWidth:q,children:[M&&(0,d.jsx)(v,{children:M}),L]})})]}),C&&(0,d.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===k||void 0===k?void 0:k(null)},children:(0,d.jsx)(c.Z,m(m({},C),{},{onClose:function(){return null===k||void 0===k?void 0:k(null)}}))})]})}},32821:function(e,n,t){"use strict";t.d(n,{V3:function(){return f},a9:function(){return c},dq:function(){return d},jN:function(){return l},lr:function(){return s}});var r=t(17717),i=t(86422),o=t(73828),u=t(90211);function c(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n||(t?null:null===e||void 0===e?void 0:e.name);if(null!==e&&void 0!==e&&e.parent){var o=[e.parent.name];return(null===i||void 0===i?void 0:i.length)>=1&&o.push(i),c(e.parent,o.join(r.sep))}return i}function a(e){return null===e||void 0===e?void 0:e.split(r.sep).slice(1).join(r.sep)}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=c(e,n,t);return a(r)}function s(e){var n,t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=c(e,a).split(r.sep);if(!l)return null;if(1===l.length)(l=null===e||void 0===e||null===(t=e.path)||void 0===t?void 0:t.split(r.sep))&&(n=l[0]===i.tf.CUSTOM?l[0]:(0,u.C5)(l[0]||""));else if(l[1]===i.tf.CUSTOM)n=l[1];else{var s=l[1];n=i.tf.DBT===s?s:(0,u.C5)(s||"")}if(!l||i.tf.DBT===n)return null;var f="";f=l.length>=3?l.slice(2,l.length).join(r.sep):l[l.length-1];var d=["\\.".concat(o.Lu.PY),"\\.".concat(o.Lu.R),"\\.".concat(o.Lu.SQL),"\\.".concat(o.Lu.YAML),"\\.".concat(o.Lu.YML)].join("|"),p=new RegExp("".concat(d,"$"));if(i.$W.concat(i.tf.DBT).includes(n)&&f.match(p)){var v=f.lastIndexOf("."),h=f.slice(v+1);return{language:o.nB[h],type:n,uuid:f.slice(0,v)}}}function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=c(e,n).split(r.sep);if(t[1]){var a=(0,u.C5)(t[n?0:1]);t[1]===i.tf.DBT&&(a=i.tf.DBT);var l=t[t.length-1],s=new RegExp(".".concat(o.Lu.YAML,"$")),f=new RegExp(".".concat(o.Lu.R,"$")),d=new RegExp(".".concat(o.Lu.SQL,"$")),p=new RegExp(".".concat(o.Lu.MD,"$"));if(l.match(s)&&i.VZ.includes(a))return{type:a,uuid:l.replace(s,"")};if(l.match(f)&&i.J8.includes(a))return{type:a,uuid:l.replace(f,"")};if(l.match(d)&&i.HX.includes(a)){var v=l.replace(/[.]/g,"_"),h=a===i.tf.DBT?t.slice(2,-1).join("_").concat("_".concat(v)):l.replace(d,"");return{type:a,uuid:h}}return l.match(p)&&a===i.tf.MARKDOWN?{type:a,uuid:l.replace(p,"")}:void 0}}function d(e){var n=e.name.split("."),t=n[n.length-1];return o.n6.includes(t)&&n.pop(),n.join("")}},91207:function(e,n,t){"use strict";t.d(n,{Z:function(){return I}});var r=t(82394),i=t(75582),o=t(17717),u=t(82684),c=t(37958),a=t(83455),l=t(35490),s=t(86422),f=t(60328),d=t(38626),p=t(93461),v=t(67971),h=t(28598),S=d.default.div.withConfig({displayName:"ButtonGroup__ButtonGroupStyle",componentId:"sc-15vbmc8-0"})([""]),A=d.default.div.withConfig({displayName:"ButtonGroup__VerticalDivider",componentId:"sc-15vbmc8-1"})(["width:1px;"]),T=function(e){var n=e.children,t=e.divider,r=u.Children.toArray(n).length;return(0,h.jsx)(S,{children:(0,h.jsx)(v.Z,{children:u.Children.map(n,(function(e,n){return e&&(0,h.jsxs)(p.Z,{children:[n>=1&&t&&(0,h.jsx)(A,{}),u.cloneElement(e,{borderRadiusLeft:r>=2&&0===n,borderRadiusRight:r>=2&&n===r-1,halfPaddingLeft:r>=2&&0!==n,halfPaddingRight:r>=2&&n!==r-1,noBorder:r>=2&&n>0&&n<r-1,noBorderRight:r>=2&&n!==r-1})]},"button-group-child-".concat(n))}))})})},E=t(57722),R=t(73828),O=t(11135),g=t(98781),b=t(86673),m=t(82531),y=t(16115),D=t(94353),N=t(60701),L=t(55512),C=t(24224),P=t(32821),w=t(90211),Z=t(96510),_=t(51504),k=t(41150);function M(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?M(Object(t),!0).forEach((function(n){(0,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}var I=function(e){var n=e.active,t=e.addNewBlock,d=e.disableRefreshWarning,p=e.fetchPipeline,S=e.fetchVariables,A=e.filePath,M=e.hideHeaderButtons,I=e.onContentChange,x=e.openSidekickView,Y=e.pipeline,H=e.saveFile,B=e.selectedFilePath,U=e.sendTerminalMessage,W=e.setDisableShortcuts,X=e.setErrors,K=e.setFilesTouched,V=e.setSelectedBlock,F=(0,c.j)("apiReloads"),G=(0,i.Z)(F,2)[1],Q=(0,u.useState)(null),q=Q[0],J=Q[1],$=(0,u.useState)(!1),z=$[0],ee=($[1],(0,u.useRef)(null)),ne=(0,u.useMemo)((function(){return new l.Z}),[]),te=(0,u.useMemo)((function(){return{api_key:D.l,token:ne.decodedToken.token}}),[ne]),re=m.ZP.statuses.list().data,ie=(0,u.useMemo)((function(){var e,n;return null===re||void 0===re||null===(e=re.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.repo_path}),[re]),oe=m.ZP.file_contents.detail(A).data;(0,u.useEffect)((function(){null!==oe&&void 0!==oe&&oe.file_content&&J(oe.file_content)}),[oe]);var ue=(0,u.useState)(null===q||void 0===q?void 0:q.content),ce=ue[0],ae=ue[1],le=(0,u.useCallback)((function(e){ae(e),I&&(null===I||void 0===I||I(e))}),[I]),se=(0,u.useState)(!1),fe=se[0],de=se[1];(0,u.useEffect)((function(){n&&W&&(null===W||void 0===W||W(!0))}),[n,W]),(0,u.useEffect)((function(){var e;B&&(null===ee||void 0===ee||null===(e=ee.current)||void 0===e||e.scrollIntoView())}),[B]);var pe=(0,a.Db)(m.ZP.file_contents.useUpdate((null===q||void 0===q?void 0:q.path)&&encodeURIComponent(null===q||void 0===q?void 0:q.path)),{onSuccess:function(e){return(0,Z.wD)(e,{callback:function(){G((function(e){return j(j({},e),{},(0,r.Z)({},"FileVersions/".concat(null===q||void 0===q?void 0:q.path),Number(new Date)))}))},onErrorCallback:function(e,n){return null===X||void 0===X?void 0:X({errors:n,response:e})}})}}),ve=(0,i.Z)(pe,1)[0],he=(0,u.useCallback)((function(e,n){if(H)return H(e,n);ve({file_content:j(j({},n),{},{content:e})}).then((function(){decodeURIComponent(A).split(o.sep).pop()===R.dT.METADATA_YAML&&S&&(null===S||void 0===S||S())})),K((function(e){return j(j({},e),{},(0,r.Z)({},null===n||void 0===n?void 0:n.path,!1))})),de(!1)}),[S,A,H,K,ve]),Se=(0,u.useMemo)((function(){return(0,L.lU)()}),[]),Ae=(0,u.useMemo)((function(){var e;return null===q||void 0===q||null===(e=q.path.match(Se)[0])||void 0===e?void 0:e.split(".")[1]}),[Se,q]),Te=(0,u.useMemo)((function(){if(null!==q&&void 0!==q&&q.path)return(0,h.jsx)(E.Z,{autoHeight:!0,language:R.nB[Ae],onChange:function(e){le(e),K((function(e){return j(j({},e),{},(0,r.Z)({},null===q||void 0===q?void 0:q.path,!0))})),de(!0)},onSave:function(e){he(e,q)},selected:!0,textareaFocused:!0,value:(0,w.Pb)(null===q||void 0===q?void 0:q.content)?JSON.stringify(JSON.parse(null===q||void 0===q?void 0:q.content),null,2):null===q||void 0===q?void 0:q.content,width:"100%"})}),[q,Ae,he,le,K]),Ee=null!==Y&&void 0!==Y&&Y.blocks?(0,C.sE)(null===Y||void 0===Y?void 0:Y.blocks,(function(e){var n=e.type;return s.tf.DATA_EXPORTER===n})):null,Re=(0,a.Db)(m.ZP.blocks.pipelines.useUpdate(null===Y||void 0===Y?void 0:Y.uuid,null===Ee||void 0===Ee?void 0:Ee.uuid),{onSuccess:function(e){return(0,Z.wD)(e,{callback:function(){null===p||void 0===p||p()}})}}),Oe=(0,i.Z)(Re,1)[0],ge=t&&Y&&(Ae===R.Lu.PY||Ae===R.Lu.SQL||(Ae===R.Lu.YAML||Ae===R.Lu.R)&&(0,P.V3)(q,null===q||void 0===q?void 0:q.path))&&(0,L.ck)(q.path.split(o.sep))!==s.tf.SCRATCHPAD&&(0,P.lr)(q)&&(0,h.jsx)(f.Z,{onClick:function(){var e=(null===Y||void 0===Y?void 0:Y.type)===g.qL.INTEGRATION,n=(0,L.TU)(q,ie,Y);t(n,(function(n){e&&Ee&&Oe({block:j(j({},Ee),{},{upstream_blocks:[n.uuid]})}),null===V||void 0===V||V(n)}))},primary:!0,children:"Add to current pipeline"}),be=U&&(0,h.jsx)(b.Z,{m:2,children:(0,h.jsx)(O.ZP,{disabled:!ie,inline:!0,loading:z,onClick:function(){null===x||void 0===x||x(N.cH.TERMINAL),null===U||void 0===U||U(JSON.stringify(j(j({},te),{},{command:["stdin","pip install -r ".concat(ie,"/requirements.txt\r")]})))},title:ie?"Pip install packages from your saved requirements.txt file (\u2318+S to save).":"Please use right panel terminal to install packages.",uuid:"FileEditor/InstallPackages",children:"Install packages"})}),me="FileEditor/".concat(null===q||void 0===q?void 0:q.path),ye=(0,k.y)(),De=ye.registerOnKeyDown,Ne=ye.unregisterOnKeyDown;return(0,u.useEffect)((function(){return function(){Ne(me)}}),[Ne,me]),De(me,(function(e,t){if(n&&!d)if((0,_.y)([y.zX,y.Um],t)||(0,_.y)([y.PQ,y.Um],t))e.preventDefault(),he(ce,q);else if(fe&&(0,_.y)([y.zX,y.hS],t)){e.preventDefault();var r="".concat(q.path," has changes that are unsaved. ")+"Click cancel and save your changes before reloading page.";"undefined"!==typeof location&&window.confirm(r)&&location.reload()}}),[n,ce,d,q,he,fe]),(0,h.jsxs)("div",{ref:ee,children:[!M&&(0,h.jsx)(b.Z,{p:2,children:(0,h.jsxs)(v.Z,{justifyContent:"space-between",children:[(0,h.jsxs)(T,{children:[ge,(0,h.jsx)(f.Z,{disabled:!ce,onClick:function(e){e.preventDefault(),he(ce,q)},title:ce?null:"No changes have been made to this file.",children:"Save file content"})]}),x&&(0,h.jsx)(T,{children:(0,h.jsx)(f.Z,{compact:!0,onClick:function(){x(N.cH.FILE_VERSIONS)},small:!0,title:"View previous changes to this file.",children:"Show versions"})})]})}),Te,A===R.dT.REQS_TXT&&be]})}},55512:function(e,n,t){"use strict";t.d(n,{TU:function(){return d},ck:function(){return s},lU:function(){return f}});var r=t(21831),i=t(17717),o=t(86422),u=t(98781),c=t(73828),a=t(24224),l=t(90211),s=function(e){var n=e[0];return n===o.tf.DBT||n===o.tf.CUSTOM?n:e[0].slice(0,-1)};function f(){return new RegExp(Object.keys(c.nB).map((function(e){return".(".concat(e,")$")})).join("|"))}function d(e,n,t){var d,p,v=null===e||void 0===e||null===(d=e.path.match(f())[0])||void 0===d?void 0:d.split(".")[1],h=t.type===u.qL.INTEGRATION,S=(0,a.sE)(null===t||void 0===t?void 0:t.blocks,(function(e){var n=e.type;return o.tf.DATA_EXPORTER===n})),A=e.path.replace(n,"").split(i.sep),T=e.path.split(i.sep)[0]===o.tf.DBT,E=(p=A)[0]===o.tf.DBT?p.slice(1).join(i.sep):function(e){return e.at(-1)}(p).split(".")[0];if(A.length>=3&&!T){var R=A.slice(1,A.length-1).join(i.sep);E="".concat(R,"/").concat(E)}var O=s(e.path.split(i.sep)),g={configuration:{file_path:T?E:null},language:c.nB[v],name:(0,l.wE)(E),type:O};if(O===o.tf.CUSTOM&&(g.color=o.Lq.TEAL),h){var b=(0,a.sE)(t.blocks,(function(e){var n=e.type;return o.tf.DATA_LOADER===n})),m=(0,a.sE)(t.blocks,(function(e){var n=e.type;return o.tf.TRANSFORMER===n})),y=[];m?y.push(m.uuid):null!==S&&void 0!==S&&S.upstream_blocks?y.push.apply(y,(0,r.Z)(S.upstream_blocks)):b&&y.push(b.uuid),g.upstream_blocks=y}return g}},60701:function(e,n,t){"use strict";t.d(n,{Qq:function(){return d},Z7:function(){return p},cH:function(){return i},du:function(){return s},fp:function(){return l},j5:function(){return f},uM:function(){return a}});var r,i,o=t(82394),u=t(10503),c=t(24224),a="sideview",l=90;!function(e){e.ADDON_BLOCKS="addon_blocks",e.CALLBACKS="callbacks",e.CHARTS="charts",e.DATA="data",e.EXTENSIONS="power_ups",e.FILE_VERSIONS="file_versions",e.GRAPHS="graphs",e.REPORTS="reports",e.SECRETS="secrets",e.SETTINGS="settings",e.TERMINAL="terminal",e.TREE="tree",e.VARIABLES="variables"}(i||(i={}));i.CALLBACKS,i.CHARTS,i.DATA,i.EXTENSIONS,i.REPORTS,i.TREE;var s=[i.DATA,i.REPORTS,i.GRAPHS],f=[{key:i.TREE,label:"Tree"},{buildLabel:function(e){var n=(e.pipeline||{}).widgets,t=void 0===n?[]:n;return(null===t||void 0===t?void 0:t.length)>=1?"Charts (".concat(t.length,")"):"Charts"},key:i.CHARTS},{buildLabel:function(e){var n=e.variables;return(null===n||void 0===n?void 0:n.length)>=1?"Variables (".concat(n.length,")"):"Variables"},key:i.VARIABLES},{buildLabel:function(e){var n=e.secrets;return(null===n||void 0===n?void 0:n.length)>=1?"Secrets (".concat(n.length,")"):"Secrets"},key:i.SECRETS},{buildLabel:function(e){e.pipeline;return"Add-on blocks"},key:i.ADDON_BLOCKS},{buildLabel:function(e){var n=(e.pipeline||{}).extensions,t=void 0===n?{}:n,r=0;return Object.values(t).forEach((function(e){var n=e.blocks;r+=(null===n||void 0===n?void 0:n.length)||0})),r>=1?"Power ups (".concat(r,")"):"Power ups"},key:i.EXTENSIONS},{key:i.DATA,label:"Data"},{key:i.TERMINAL,label:"Terminal"}],d=(0,c.HK)(f,(function(e){return e.key})),p=(r={},(0,o.Z)(r,i.ADDON_BLOCKS,u.EJ),(0,o.Z)(r,i.CALLBACKS,u.AQ),(0,o.Z)(r,i.CHARTS,u.GQ),(0,o.Z)(r,i.DATA,u.iA),(0,o.Z)(r,i.EXTENSIONS,u.Bf),(0,o.Z)(r,i.GRAPHS,u.GQ),(0,o.Z)(r,i.REPORTS,u.Do),(0,o.Z)(r,i.SECRETS,u.Yo),(0,o.Z)(r,i.SETTINGS,u.Zr),(0,o.Z)(r,i.TERMINAL,u.oI),(0,o.Z)(r,i.TREE,u.mp),(0,o.Z)(r,i.VARIABLES,u.LO),r)},20103:function(e,n,t){"use strict";t.d(n,{L6:function(){return o},HF:function(){return c}});var r,i=t(81132);!function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(r||(r={}));var o,u=t(10503);function c(e,n,t){var c=e.owner,a=e.roles,l=[{Icon:u.Vz,id:o.WORKSPACES,isSelected:function(){return o.WORKSPACES===t},label:function(){return"Workspaces"},linkProps:{href:"/manage"}}];return(c||a===i.No.ADMIN)&&l.push({Icon:u.NO,id:o.USERS,isSelected:function(){return o.USERS===t},label:function(){return"Users"},linkProps:{href:"/manage/users"}}),n==r.MAIN&&l.push({Icon:u.Zr,id:o.SETTINGS,isSelected:function(){return o.SETTINGS===t},label:function(){return"Settings"},linkProps:{href:"/manage/settings"}}),l}!function(e){e.WORKSPACES="workspaces",e.USERS="users",e.SETTINGS="settings"}(o||(o={}))},3849:function(e,n,t){"use strict";var r=t(82684),i=t(1210),o=t(82531),u=t(49125),c=t(20103),a=t(9736),l=t(28598);n.Z=function(e){var n=e.before,t=e.breadcrumbs,s=void 0===t?[]:t,f=e.children,d=e.errors,p=e.pageName,v=e.subheaderChildren,h=o.ZP.statuses.list().data,S=(0,r.useMemo)((function(){var e,n;return null===h||void 0===h||null===(e=h.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.project_type}),[h]),A=(0,a.PR)()||{};return(0,l.jsx)(i.Z,{before:n,beforeWidth:n?50*u.iI:0,breadcrumbs:s,errors:d,navigationItems:(0,c.HF)(A,S,p),subheaderChildren:v,title:"Workspaces",uuid:"workspaces/index",children:f})}},86422:function(e,n,t){"use strict";t.d(n,{$W:function(){return v},DA:function(){return p},HX:function(){return A},J8:function(){return S},L8:function(){return u},Lq:function(){return f},M5:function(){return d},Qj:function(){return T},Ut:function(){return g},V4:function(){return O},VZ:function(){return h},dO:function(){return s},f2:function(){return R},iZ:function(){return E},t6:function(){return c},tf:function(){return l}});var r,i,o,u,c,a=t(82394);!function(e){e.CONDITION="condition",e.DBT_SNAPSHOT="snapshot",e.DYNAMIC="dynamic",e.DYNAMIC_CHILD="dynamic_child",e.REDUCE_OUTPUT="reduce_output",e.REPLICA="replica"}(u||(u={})),function(e){e.MARKDOWN="markdown",e.PYTHON="python",e.R="r",e.SQL="sql",e.YAML="yaml"}(c||(c={}));var l,s=(r={},(0,a.Z)(r,c.MARKDOWN,"MD"),(0,a.Z)(r,c.PYTHON,"PY"),(0,a.Z)(r,c.R,"R"),(0,a.Z)(r,c.SQL,"SQL"),(0,a.Z)(r,c.YAML,"YAML"),r);!function(e){e.CALLBACK="callback",e.CHART="chart",e.CONDITIONAL="conditional",e.CUSTOM="custom",e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.DBT="dbt",e.EXTENSION="extension",e.SCRATCHPAD="scratchpad",e.SENSOR="sensor",e.MARKDOWN="markdown",e.TRANSFORMER="transformer"}(l||(l={}));var f,d=[l.CALLBACK,l.CONDITIONAL,l.EXTENSION];!function(e){e.BLUE="blue",e.GREY="grey",e.PINK="pink",e.PURPLE="purple",e.TEAL="teal",e.YELLOW="yellow"}(f||(f={}));var p,v=[l.CHART,l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.SCRATCHPAD,l.SENSOR,l.MARKDOWN,l.TRANSFORMER],h=[l.DATA_EXPORTER,l.DATA_LOADER],S=[l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],A=[l.DATA_EXPORTER,l.DATA_LOADER,l.DBT,l.TRANSFORMER],T=[l.CHART,l.SCRATCHPAD,l.SENSOR,l.MARKDOWN],E=[l.CALLBACK,l.CHART,l.EXTENSION,l.SCRATCHPAD,l.MARKDOWN];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(p||(p={}));var R=[l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],O=(i={},(0,a.Z)(i,l.CALLBACK,"Callback"),(0,a.Z)(i,l.CUSTOM,"Custom"),(0,a.Z)(i,l.DATA_EXPORTER,"Data exporter"),(0,a.Z)(i,l.DATA_LOADER,"Data loader"),(0,a.Z)(i,l.EXTENSION,"Extension"),(0,a.Z)(i,l.SCRATCHPAD,"Scratchpad"),(0,a.Z)(i,l.SENSOR,"Sensor"),(0,a.Z)(i,l.MARKDOWN,"Markdown"),(0,a.Z)(i,l.TRANSFORMER,"Transformer"),i),g=[l.DATA_LOADER,l.TRANSFORMER,l.DATA_EXPORTER,l.SENSOR];o={},(0,a.Z)(o,l.DATA_EXPORTER,"DE"),(0,a.Z)(o,l.DATA_LOADER,"DL"),(0,a.Z)(o,l.SCRATCHPAD,"SP"),(0,a.Z)(o,l.SENSOR,"SR"),(0,a.Z)(o,l.MARKDOWN,"MD"),(0,a.Z)(o,l.TRANSFORMER,"TF")},73828:function(e,n,t){"use strict";t.d(n,{JD:function(){return S},Lu:function(){return o},PF:function(){return p},d2:function(){return d},dT:function(){return u},n6:function(){return l},nB:function(){return h},oy:function(){return v},xF:function(){return f}});var r,i,o,u,c=t(82394),a=t(86422);!function(e){e.CSV="csv",e.JSON="json",e.MD="md",e.PY="py",e.R="r",e.SQL="sql",e.TXT="txt",e.YAML="yaml",e.YML="yml"}(o||(o={})),function(e){e.INIT_PY="__init__.py",e.METADATA_YAML="metadata.yaml",e.REQS_TXT="requirements.txt"}(u||(u={}));var l=[o.PY,o.SQL],s=[o.JSON,o.MD,o.PY,o.R,o.SQL,o.TXT,o.YAML,o.YML],f=new RegExp(s.map((function(e){return".".concat(e,"$")})).join("|")),d=new RegExp(s.map((function(e){return".".concat(e,"$")})).join("|")),p="charts",v="pipelines",h=(r={},(0,c.Z)(r,o.MD,a.t6.MARKDOWN),(0,c.Z)(r,o.JSON,o.JSON),(0,c.Z)(r,o.PY,a.t6.PYTHON),(0,c.Z)(r,o.R,a.t6.R),(0,c.Z)(r,o.SQL,a.t6.SQL),(0,c.Z)(r,o.TXT,"text"),(0,c.Z)(r,o.YAML,a.t6.YAML),(0,c.Z)(r,o.YML,a.t6.YAML),r),S=(i={},(0,c.Z)(i,a.t6.MARKDOWN,o.MD),(0,c.Z)(i,a.t6.PYTHON,o.PY),(0,c.Z)(i,a.t6.R,o.R),(0,c.Z)(i,a.t6.SQL,o.SQL),(0,c.Z)(i,a.t6.YAML,o.YAML),(0,c.Z)(i,"text",o.TXT),i)},98781:function(e,n,t){"use strict";t.d(n,{$1:function(){return a},G7:function(){return s},QK:function(){return c},a_:function(){return f},qL:function(){return o},r0:function(){return l}});var r,i,o,u=t(82394);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(o||(o={}));var c,a,l,s=(r={},(0,u.Z)(r,o.INTEGRATION,"Integration"),(0,u.Z)(r,o.PYTHON,"Standard"),(0,u.Z)(r,o.PYSPARK,"PySpark"),(0,u.Z)(r,o.STREAMING,"Streaming"),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry"}(c||(c={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TYPE="type[]"}(a||(a={})),function(e){e.STATUS="status",e.TYPE="type"}(l||(l={}));var f=(i={},(0,u.Z)(i,o.PYTHON,"python3"),(0,u.Z)(i,o.PYSPARK,"pysparkkernel"),i)},3938:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(38860),o=t.n(i),u=t(82684),c=t(91207),a=t(41788),l=t(3849),s=t(20103),f=t(28598);function d(){var e=(0,u.useState)(null),n=e[0];e[1];return(0,f.jsx)(l.Z,{breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{bold:!0,label:function(){return"Settings"}}],errors:n,pageName:s.L6.SETTINGS,children:(0,f.jsx)(c.Z,{active:!0,filePath:"metadata.yaml",selectedFilePath:"metadata.yaml",setFilesTouched:function(){return null}})})}d.getInitialProps=(0,r.Z)(o().mark((function e(){return o().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,a.Z)(d)},37958:function(e,n,t){"use strict";t.d(n,{j:function(){return r}});var r=(0,t(44152).r)({apiReloads:{}}).useGlobalState},90211:function(e,n,t){"use strict";t.d(n,{RA:function(){return s},kC:function(){return f},vg:function(){return T},kE:function(){return m},T3:function(){return O},Mp:function(){return d},Pb:function(){return a},HW:function(){return R},wX:function(){return p},x6:function(){return v},_6:function(){return h},zf:function(){return E},Y6:function(){return b},wE:function(){return y},J3:function(){return S},We:function(){return l},QV:function(){return g},C5:function(){return A}});var r=t(75582),i=t(17717),o=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],u=(t(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),c=t(24224);function a(e){if(!e)return!1;try{JSON.parse(e)}catch(n){return!1}return!0}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.split(" ").join(n)}function s(e){return e.split(" ").join("_")}function f(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*e)}function p(e){return e.charAt(0).toLowerCase()+e.slice(1)}function v(e){if(null===e||"undefined"===typeof e)return"";var n=e.toString().split("."),t=(0,r.Z)(n,2),i=t[0],o=t[1],u=i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return o?"".concat(u,".").concat(o):u}function h(e,n){var t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n,o=void 0!==i&&null!==i;if(o||(i=2),1===i)t=e;else{var u=e.length,c=e[u-1];t="y"===c&&"day"!==e?"".concat(e.slice(0,u-1),"ies"):"".concat(e,"s"===c?"es":"s")}if(o){var a=r?v(i):i;return"".concat(a," ").concat(t)}return t}function S(e){return null===e||void 0===e?void 0:e.replace(/_/g," ")}function A(e){var n=e.length;return"ies"===e.slice(n-3,n)?"".concat(e.slice(0,n-3),"y"):"es"===e.slice(n-2,n)&&"ces"!==e.slice(n-3,n)?e.slice(0,n-2):e.slice(0,n-1)}function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return f(S(e.toLowerCase()))}function E(e){var n,t=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return t.forEach((function(i,o){if(!n){var u=(0,r.Z)(i,2),c=u[0],a=u[1],l=t.slice(0,o).reduce((function(e,n){return e*Number(n[1])}),1);e<Number(a)*l&&(n=h(c,Math.round(e/l)))}})),n}function R(e){return!isNaN(e)}function O(e){return"".concat(v(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Math.round((e||0)*Math.pow(100,n))/100}(e)),"%")}function g(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=Math.pow(10,n);return Math.round((e||0)*t)/t}function b(){return"".concat((0,c.mp)(o)," ").concat((0,c.mp)(u))}function m(e){return null===e||void 0===e?void 0:e.toLowerCase().replace(/\W+/g,"_")}function y(e){var n,t=e.split(i.sep),r=t[t.length-1].split(".");return n=1===r.length?r[0]:r.slice(0,-1).join("."),t.slice(0,t.length-1).concat(n).join(i.sep)}},1116:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/settings",function(){return t(3938)}])}},function(e){e.O(0,[844,7607,8789,1424,1005,7722,9774,2888,179],(function(){return n=1116,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4496],{20103:function(e,r,n){"use strict";n.d(r,{L6:function(){return u},HF:function(){return s}});var t,o=n(81132);!function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(t||(t={}));var u,i=n(10503);function s(e,r,n){var s=e.owner,c=e.roles,a=[{Icon:i.Vz,id:u.WORKSPACES,isSelected:function(){return u.WORKSPACES===n},label:function(){return"Workspaces"},linkProps:{href:"/manage"}}];return(s||c===o.No.ADMIN)&&a.push({Icon:i.NO,id:u.USERS,isSelected:function(){return u.USERS===n},label:function(){return"Users"},linkProps:{href:"/manage/users"}}),r==t.MAIN&&a.push({Icon:i.Zr,id:u.SETTINGS,isSelected:function(){return u.SETTINGS===n},label:function(){return"Settings"},linkProps:{href:"/manage/settings"}}),a}!function(e){e.WORKSPACES="workspaces",e.USERS="users",e.SETTINGS="settings"}(u||(u={}))},3849:function(e,r,n){"use strict";var t=n(82684),o=n(1210),u=n(82531),i=n(49125),s=n(20103),c=n(9736),a=n(28598);r.Z=function(e){var r=e.before,n=e.breadcrumbs,l=void 0===n?[]:n,d=e.children,v=e.errors,f=e.pageName,p=e.subheaderChildren,m=u.ZP.statuses.list().data,b=(0,t.useMemo)((function(){var e,r;return null===m||void 0===m||null===(e=m.statuses)||void 0===e||null===(r=e[0])||void 0===r?void 0:r.project_type}),[m]),h=(0,c.PR)()||{};return(0,a.jsx)(o.Z,{before:r,beforeWidth:r?50*i.iI:0,breadcrumbs:l,errors:v,navigationItems:(0,s.HF)(h,b,f),subheaderChildren:p,title:"Workspaces",uuid:"workspaces/index",children:d})}},82702:function(e,r,n){"use strict";n.r(r),n.d(r,{default:function(){return x}});var t=n(77837),o=n(38860),u=n.n(o),i=n(82684),s=n(34376),c=n(41788),a=n(86673),l=n(20582),d=n(75582),v=n(21831),f=n(82394),p=n(21764),m=n(83455),b=n(60328),h=n(55378),S=n(87815),O=n(19711),g=n(82531),w=n(24224),j=n(96510),P=n(28598);function _(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function k(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?_(Object(n),!0).forEach((function(r){(0,f.Z)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var Z=function(e){var r=e.fetchUser,n=e.user,t=e.workspaces,o=(0,i.useState)(),u=o[0],s=o[1];(0,i.useEffect)((function(){n&&s(n)}),[n]);var c=null===t||void 0===t?void 0:t.map((function(e){return e.project_uuid})),l=g.ZP.roles.list({entity:"project",entity_ids:c},{},{}),_=l.data,Z=(l.mutate,(0,i.useMemo)((function(){var e=(null===_||void 0===_?void 0:_.roles)||[];return null===e||void 0===e?void 0:e.reduce((function(e,r){var n=r.permissions[0].entity_id,t=e[n]||[];return k(k({},e),{},(0,f.Z)({},n,[].concat((0,v.Z)(t),[r])))}),{})}),[_])),E=(0,i.useMemo)((function(){var e=u||n,r=null===e||void 0===e?void 0:e.roles_new;return null===r||void 0===r?void 0:r.reduce((function(e,r){var n,t,o=null===r||void 0===r||null===(n=r.permissions)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.entity_id;return k(k({},e),{},(0,f.Z)({},o,r))}),{})}),[u,n]),y=(0,m.Db)(g.ZP.users.useUpdate(null===n||void 0===n?void 0:n.id),{onSuccess:function(e){return(0,j.wD)(e,{callback:function(e){var n=e.user;p.Am.success("User roles successfully saved.",{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(n.id)}),r()},onErrorCallback:function(e){var r=e.error,n=r.errors,t=r.exception,o=r.message,u=r.type;p.Am.error((null===n||void 0===n?void 0:n.error)||t||o,{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:u})}})}}),I=(0,d.Z)(y,2),N=I[0],T=I[1].isLoading;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(S.Z,{columnFlex:[1,1],columns:[{uuid:"Workspace"},{uuid:"Role"}],rows:null===t||void 0===t?void 0:t.map((function(e){var r=e.name,n=e.project_uuid,t=(null===Z||void 0===Z?void 0:Z[n])||[],o=null===E||void 0===E?void 0:E[n];return[(0,P.jsx)(O.ZP,{bold:!0,children:r},"name"),(0,P.jsx)(h.Z,{onChange:function(e){var r=(0,w.sE)(t,(function(r){return r.id==e.target.value}));r&&s((function(e){var n,t=(null===e||void 0===e||null===(n=e.roles_new)||void 0===n?void 0:n.filter((function(e){return e.id!=(null===r||void 0===r?void 0:r.id)})))||[];console.log("prev roles:",t);var o={roles_new:[].concat((0,v.Z)(t),[r])};return k(k({},e),o)}))},placeholder:"No access",primary:!0,setContentOnMount:!0,value:null===o||void 0===o?void 0:o.id,children:t.map((function(e){var r=e.id,n=e.name;return(0,P.jsx)("option",{value:r,children:n},n)}))},"project_role")]}))}),(0,P.jsx)(a.Z,{p:2,children:(0,P.jsx)(b.Z,{loading:T,onClick:function(){var e,r=k(k({},u),{},{roles_new:null===u||void 0===u||null===(e=u.roles_new)||void 0===e?void 0:e.map((function(e){return e.id}))});N({user:r})},primary:!0,children:"Update roles"})})]})},E=n(3849),y=n(49125),I=n(63153),N=n(20103);function T(e){var r=e.user,n=(0,s.useRouter)(),t=(0,i.useState)(null),o=t[0],u=t[1],c=null===r||void 0===r?void 0:r.id,d=g.ZP.users.detail(c),v=d.data,f=d.mutate,p=(0,i.useMemo)((function(){return null===v||void 0===v?void 0:v.user}),[v]);(0,i.useEffect)((function(){(0,j.bB)(v,u)}),[v]);var m=g.ZP.workspaces.list({user_id:c},{refreshInterval:5e3,revalidateOnFocus:!0}),b=m.data,h=(m.mutate,(0,i.useMemo)((function(){return(0,P.jsx)(a.Z,{p:y.cd,children:(0,P.jsx)(l.Z,{hideFields:[I.s7],onDeleteSuccess:function(){return n.push("/manage/users")},onSaveSuccess:f,showDelete:!0,title:"Edit user",user:p})})}),[f,n,p])),S=(0,i.useMemo)((function(){return null===b||void 0===b?void 0:b.workspaces}),[b]);return(0,P.jsx)(E.Z,{before:h,breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{label:function(){return"Users"},linkProps:{as:"/manage/users",href:"/manage/users"}},{bold:!0,label:function(){return(null===p||void 0===p?void 0:p.username)||"User"}}],errors:o,pageName:N.L6.USERS,children:(0,P.jsx)(Z,{fetchUser:f,user:p,workspaces:S})})}T.getInitialProps=function(){var e=(0,t.Z)(u().mark((function e(r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.query.user,e.abrupt("return",{user:{id:n}});case 2:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}();var x=(0,c.Z)(T)},11976:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/users/[user]",function(){return n(82702)}])}},function(e){e.O(0,[844,7607,1424,1005,7815,3883,9774,2888,179],(function(){return r=11976,e(e.s=r);var r}));var r=e.O();_N_E=r}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3277],{20103:function(e,n,r){"use strict";r.d(n,{L6:function(){return o},HF:function(){return s}});var t,u=r(81132);!function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(t||(t={}));var o,i=r(10503);function s(e,n,r){var s=e.owner,c=e.roles,a=[{Icon:i.Vz,id:o.WORKSPACES,isSelected:function(){return o.WORKSPACES===r},label:function(){return"Workspaces"},linkProps:{href:"/manage"}}];return(s||c===u.No.ADMIN)&&a.push({Icon:i.NO,id:o.USERS,isSelected:function(){return o.USERS===r},label:function(){return"Users"},linkProps:{href:"/manage/users"}}),n==t.MAIN&&a.push({Icon:i.Zr,id:o.SETTINGS,isSelected:function(){return o.SETTINGS===r},label:function(){return"Settings"},linkProps:{href:"/manage/settings"}}),a}!function(e){e.WORKSPACES="workspaces",e.USERS="users",e.SETTINGS="settings"}(o||(o={}))},3849:function(e,n,r){"use strict";var t=r(82684),u=r(1210),o=r(82531),i=r(49125),s=r(20103),c=r(9736),a=r(28598);n.Z=function(e){var n=e.before,r=e.breadcrumbs,f=void 0===r?[]:r,l=e.children,d=e.errors,p=e.pageName,b=e.subheaderChildren,h=o.ZP.statuses.list().data,S=(0,t.useMemo)((function(){var e,n;return null===h||void 0===h||null===(e=h.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.project_type}),[h]),v=(0,c.PR)()||{};return(0,a.jsx)(u.Z,{before:n,beforeWidth:n?50*i.iI:0,breadcrumbs:f,errors:d,navigationItems:(0,s.HF)(v,S,p),subheaderChildren:b,title:"Workspaces",uuid:"workspaces/index",children:l})}},29273:function(e,n,r){"use strict";r.r(n);var t=r(77837),u=r(38860),o=r.n(u),i=(r(82684),r(34376)),s=r(41788),c=r(86673),a=r(20582),f=r(3849),l=r(49125),d=r(20103),p=r(28598);function b(){var e=(0,i.useRouter)();return(0,p.jsx)(f.Z,{breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{label:function(){return"Users"},linkProps:{as:"/manage/users",href:"/manage/users"}},{bold:!0,label:function(){return"New"}}],pageName:d.L6.USERS,children:(0,p.jsx)(c.Z,{p:l.cd,children:(0,p.jsx)(a.Z,{hideFields:["roles"],newUser:!0,onSaveSuccess:function(n){e.push("/manage/users/[user]","/manage/users/".concat(null===n||void 0===n?void 0:n.id))},title:"Add new user",user:{}})})})}b.getInitialProps=function(){var e=(0,t.Z)(o().mark((function e(n){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),n.default=(0,s.Z)(b)},47272:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/users/new",function(){return r(29273)}])},80022:function(e,n,r){"use strict";function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(n,{Z:function(){return t}})},15544:function(e,n,r){"use strict";function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}r.d(n,{Z:function(){return t}})},99177:function(e,n,r){"use strict";function t(e,n){return t=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},t(e,n)}function u(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&t(e,n)}r.d(n,{Z:function(){return u}})},93189:function(e,n,r){"use strict";r.d(n,{Z:function(){return o}});var t=r(12539),u=r(80022);function o(e,n){if(n&&("object"===t(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,u.Z)(e)}}},function(e){e.O(0,[844,1424,1005,3883,9774,2888,179],(function(){return n=47272,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1911],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return _}});var r=t(82394),i=t(21831),o=t(82684),u=t(47999),c=t(49894),l=t(93461),s=t(57384),a=t(41424),d=t(72454),f=t(28598);function p(e,n){var t=e.children;return(0,f.jsx)(d.HS,{ref:n,children:t})}var h=o.forwardRef(p),m=t(32063),b=t(85019),v=t(82531),g=t(66166),y=t(3055),w=t(49125),j=t(91427),O=t(24141);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 x(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,r.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 _=function(e){var n,t=e.after,r=e.afterHidden,p=e.afterWidth,S=e.afterWidthOverride,_=e.before,P=e.beforeWidth,Z=e.breadcrumbs,N=e.children,I=e.errors,E=e.headerMenuItems,C=e.headerOffset,H=e.mainContainerHeader,k=e.navigationItems,z=e.setErrors,M=e.subheaderChildren,A=e.title,R=e.uuid,D=(0,O.i)().width,W="dashboard_after_width_".concat(R),F="dashboard_before_width_".concat(R),U=(0,o.useRef)(null),B=(0,o.useState)(S?p:(0,j.U2)(W,p)),T=B[0],L=B[1],X=(0,o.useState)(!1),G=X[0],K=X[1],Q=(0,o.useState)(_?Math.max((0,j.U2)(F,P),13*w.iI):null),J=Q[0],V=Q[1],Y=(0,o.useState)(!1),q=Y[0],$=Y[1],ee=(0,o.useState)(null)[1],ne=v.ZP.projects.list({},{revalidateOnFocus:!1}).data,te=null===ne||void 0===ne?void 0:ne.projects,re=[];Z?re.push.apply(re,(0,i.Z)(Z)):(null===te||void 0===te?void 0:te.length)>=1&&re.push.apply(re,[{label:function(){var e;return null===(e=te[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return A}}]),(0,o.useEffect)((function(){null===U||void 0===U||!U.current||G||q||null===ee||void 0===ee||ee(U.current.getBoundingClientRect().width)}),[G,T,q,J,U,ee,D]),(0,o.useEffect)((function(){G||(0,j.t8)(W,T)}),[r,G,T,W]),(0,o.useEffect)((function(){q||(0,j.t8)(F,J)}),[q,J,F]);var ie=(0,g.Z)(p);return(0,o.useEffect)((function(){S&&ie!==p&&L(p)}),[S,p,ie]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.Z,{title:A}),(0,f.jsx)(a.Z,{breadcrumbs:re,menuItems:E,project:null===te||void 0===te?void 0:te[0],version:null===te||void 0===te||null===(n=te[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===k||void 0===k?void 0:k.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:k,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(m.Z,{after:t,afterHeightOffset:y.Mz,afterHidden:r,afterMousedownActive:G,afterWidth:T,before:_,beforeHeightOffset:y.Mz,beforeMousedownActive:q,beforeWidth:d.k1+(_?J:0),headerOffset:C,hideAfterCompletely:!0,leftOffset:_?d.k1:null,mainContainerHeader:H,mainContainerRef:U,setAfterMousedownActive:K,setAfterWidth:L,setBeforeMousedownActive:$,setBeforeWidth:V,children:[M&&(0,f.jsx)(h,{children:M}),N]})})]}),I&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===z||void 0===z?void 0:z(null)},children:(0,f.jsx)(c.Z,x(x({},I),{},{onClose:function(){return null===z||void 0===z?void 0:z(null)}}))})]})}},20103:function(e,n,t){"use strict";t.d(n,{L6:function(){return o},HF:function(){return c}});var r,i=t(81132);!function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(r||(r={}));var o,u=t(10503);function c(e,n,t){var c=e.owner,l=e.roles,s=[{Icon:u.Vz,id:o.WORKSPACES,isSelected:function(){return o.WORKSPACES===t},label:function(){return"Workspaces"},linkProps:{href:"/manage"}}];return(c||l===i.No.ADMIN)&&s.push({Icon:u.NO,id:o.USERS,isSelected:function(){return o.USERS===t},label:function(){return"Users"},linkProps:{href:"/manage/users"}}),n==r.MAIN&&s.push({Icon:u.Zr,id:o.SETTINGS,isSelected:function(){return o.SETTINGS===t},label:function(){return"Settings"},linkProps:{href:"/manage/settings"}}),s}!function(e){e.WORKSPACES="workspaces",e.USERS="users",e.SETTINGS="settings"}(o||(o={}))},3849:function(e,n,t){"use strict";var r=t(82684),i=t(1210),o=t(82531),u=t(49125),c=t(20103),l=t(9736),s=t(28598);n.Z=function(e){var n=e.before,t=e.breadcrumbs,a=void 0===t?[]:t,d=e.children,f=e.errors,p=e.pageName,h=e.subheaderChildren,m=o.ZP.statuses.list().data,b=(0,r.useMemo)((function(){var e,n;return null===m||void 0===m||null===(e=m.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.project_type}),[m]),v=(0,l.PR)()||{};return(0,s.jsx)(i.Z,{before:n,beforeWidth:n?50*u.iI:0,breadcrumbs:a,errors:f,navigationItems:(0,c.HF)(v,b,p),subheaderChildren:h,title:"Workspaces",uuid:"workspaces/index",children:d})}},87372:function(e,n,t){"use strict";var r,i,o,u,c,l,s,a,d=t(82394),f=t(26304),p=t(26653),h=t(38626),m=t(33591),b=t(23831),v=t(2005),g=t(31012),y=t(19711),w=t(49125),j=t(86673),O=t(28598),S=["children","condensed","inline","level","marketing","spacingBelow"];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 _(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,d.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 P=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],y.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||b.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(v.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(v.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(v.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(v.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(v.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(v.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(v.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(v.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(v.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),Z=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")})),N=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],P,m.media.md(r||(r=(0,p.Z)(["\n ","\n "])),g.aQ),m.media.lg(i||(i=(0,p.Z)(["\n ","\n "])),g.aQ),m.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),g.aQ)),I=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],P,g.MJ),E=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],P,m.media.xs(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.sm(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.md(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.lg(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.xl(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI)),C=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],P,g.BL),H=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],P),k=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],P),z=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],P),M=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],P,(function(e){return 1===e.level&&"\n ".concat(g.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(g.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),A=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,u=e.marketing,c=e.spacingBelow,l=(0,f.Z)(e,S);i?n=M:0===Number(o)?n=N:1===Number(o)?n=u?E:I:2===Number(o)?n=C:3===Number(o)?n=H:4===Number(o)?n=k:5===Number(o)&&(n=z);var s=(0,O.jsxs)(n,_(_({},l),{},{level:o,children:[c&&(0,O.jsx)(j.Z,{mb:r?2:3,children:t}),!c&&t]}));return i?s:(0,O.jsx)(Z,{children:s})};A.defaultProps={level:3,weightStyle:6},n.Z=A},37938:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(82394),o=t(38860),u=t.n(o),c=t(82684),l=t(34376),s=t(60328),a=t(87372),d=t(41788),f=t(86673),p=t(87815),h=t(19711),m=t(3849),b=t(82531),v=t(66166),g=t(10503),y=t(49125),w=t(20103),j=t(9736),O=t(7715),S=t(59e3),x=t(96510),_=t(28598);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 Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function N(){var e=(0,l.useRouter)(),n=(0,c.useState)(null),t=n[0],r=n[1],i=((0,j.PR)()||{}).owner,o=(0,c.useState)(null),u=o[0],d=o[1],P=b.ZP.users.list({},{revalidateOnFocus:!1}),N=P.data;P.mutate;(0,c.useEffect)((function(){(0,x.bB)(N,r)}),[N]);var I=(0,c.useMemo)((function(){return(null===N||void 0===N?void 0:N.users)||[]}),[null===N||void 0===N?void 0:N.users]),E=b.ZP.users.detail(null===u||void 0===u?void 0:u.user_id,{},{revalidateOnFocus:!1}),C=E.data;E.mutate;(0,c.useEffect)((function(){(0,x.bB)(C,r)}),[C]);var H=null===C||void 0===C?void 0:C.user,k=(0,S.iV)(),z=(0,v.Z)(k);return(0,c.useEffect)((function(){var e=k.add_new_user,n=k.user_id;if(!(0,O.Xy)(k,z)){var t=Z(Z({},z),k);n?t.user_id=n:delete t.user_id,e?t.add_new_user=e:delete t.add_new_user,d(t)}}),[k,z]),(0,_.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{bold:!0,label:function(){return"Users"}}],errors:t,pageName:w.L6.USERS,children:[i&&(0,_.jsx)(f.Z,{p:y.cd,children:(0,_.jsx)(s.Z,{beforeIcon:(0,_.jsx)(g.mm,{}),onClick:function(){return e.push("/manage/users/new")},primary:!0,children:"Add new user"})}),(0,_.jsx)(f.Z,{p:y.cd,children:(0,_.jsx)(a.Z,{children:"Users"})}),(0,_.jsx)(p.Z,{columnFlex:[1,1,1],columns:[{uuid:"Username"},{uuid:"Email"},{uuid:"Role"}],isSelectedRow:function(e){var n;return(null===(n=I[e])||void 0===n?void 0:n.id)===(null===H||void 0===H?void 0:H.id)},onClickRow:function(n){var t,r=null===(t=I[n])||void 0===t?void 0:t.id;e.push("/manage/users/[user]","/manage/users/".concat(r))},rows:I.map((function(e){var n=e.email,t=e.roles_display,r=e.roles_new,i=e.username;return[(0,_.jsx)(h.ZP,{bold:!0,children:i},"username"),(0,_.jsx)(h.ZP,{default:!0,children:n},"email"),(0,_.jsx)(h.ZP,{default:!0,children:r&&r[0]?r[0].name:t},"roles")]})),uuid:"pipeline-runs"})]})}N.getInitialProps=(0,r.Z)(u().mark((function e(){return u().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,d.Z)(N)},72695:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/users",function(){return t(37938)}])}},function(e){e.O(0,[844,7607,1424,1005,7815,9774,2888,179],(function(){return n=72695,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8867],{59739:function(e,n,t){"use strict";var r=t(56669);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,n,t,i,o,c){if(c!==r){var a=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 a.name="Invariant Violation",a}}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:o,resetWarningCache:i};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"},1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),a=t(49894),u=t(93461),s=t(57384),l=t(41424),d=t(72454),f=t(28598);function p(e,n){var t=e.children;return(0,f.jsx)(d.HS,{ref:n,children:t})}var h=o.forwardRef(p),m=t(32063),b=t(85019),g=t(82531),v=t(66166),O=t(3055),x=t(49125),y=t(91427),j=t(24141);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 Z(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,r.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 w=function(e){var n,t=e.after,r=e.afterHidden,p=e.afterWidth,S=e.afterWidthOverride,w=e.before,_=e.beforeWidth,C=e.breadcrumbs,A=e.children,R=e.errors,E=e.headerMenuItems,N=e.headerOffset,P=e.mainContainerHeader,T=e.navigationItems,k=e.setErrors,D=e.subheaderChildren,I=e.title,M=e.uuid,H=(0,j.i)().width,L="dashboard_after_width_".concat(M),W="dashboard_before_width_".concat(M),z=(0,o.useRef)(null),U=(0,o.useState)(S?p:(0,y.U2)(L,p)),F=U[0],B=U[1],K=(0,o.useState)(!1),X=K[0],Y=K[1],q=(0,o.useState)(w?Math.max((0,y.U2)(W,_),13*x.iI):null),G=q[0],Q=q[1],V=(0,o.useState)(!1),$=V[0],J=V[1],ee=(0,o.useState)(null)[1],ne=g.ZP.projects.list({},{revalidateOnFocus:!1}).data,te=null===ne||void 0===ne?void 0:ne.projects,re=[];C?re.push.apply(re,(0,i.Z)(C)):(null===te||void 0===te?void 0:te.length)>=1&&re.push.apply(re,[{label:function(){var e;return null===(e=te[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return I}}]),(0,o.useEffect)((function(){null===z||void 0===z||!z.current||X||$||null===ee||void 0===ee||ee(z.current.getBoundingClientRect().width)}),[X,F,$,G,z,ee,H]),(0,o.useEffect)((function(){X||(0,y.t8)(L,F)}),[r,X,F,L]),(0,o.useEffect)((function(){$||(0,y.t8)(W,G)}),[$,G,W]);var ie=(0,v.Z)(p);return(0,o.useEffect)((function(){S&&ie!==p&&B(p)}),[S,p,ie]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.Z,{title:I}),(0,f.jsx)(l.Z,{breadcrumbs:re,menuItems:E,project:null===te||void 0===te?void 0:te[0],version:null===te||void 0===te||null===(n=te[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===T||void 0===T?void 0:T.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:T,showMore:!0})}),(0,f.jsx)(u.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(m.Z,{after:t,afterHeightOffset:O.Mz,afterHidden:r,afterMousedownActive:X,afterWidth:F,before:w,beforeHeightOffset:O.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(w?G:0),headerOffset:N,hideAfterCompletely:!0,leftOffset:w?d.k1:null,mainContainerHeader:P,mainContainerRef:z,setAfterMousedownActive:Y,setAfterWidth:B,setBeforeMousedownActive:J,setBeforeWidth:Q,children:[D&&(0,f.jsx)(h,{children:D}),A]})})]}),R&&(0,f.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===k||void 0===k?void 0:k(null)},children:(0,f.jsx)(a.Z,Z(Z({},R),{},{onClose:function(){return null===k||void 0===k?void 0:k(null)}}))})]})}},85307:function(e,n,t){"use strict";t.d(n,{$W:function(){return s},cl:function(){return l},cv:function(){return d},dE:function(){return u}});var r=t(38626),i=t(23831),o=t(73942),c=t(49125),a=t(37391),u=r.default.div.withConfig({displayName:"indexstyle__SectionStyle",componentId:"sc-7a1uhf-0"})(["border-radius:","px;padding:","px;",""],o.n_,c.cd*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).popup,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__CodeEditorStyle",componentId:"sc-7a1uhf-1"})(["padding-top:","px;",""],c.cd*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).codeTextarea,";\n ")})),l=r.default.div.withConfig({displayName:"indexstyle__TableContainerStyle",componentId:"sc-7a1uhf-2"})(["overflow:auto;max-height:90vh;width:100%;"," "," "," "," ",""],a.w5,(function(e){return e.hideHorizontalScrollbar&&"\n overflow-x: hidden;\n "}),(function(e){return e.width&&"\n width: ".concat(e.width,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,";\n ")}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")})),d=r.default.div.withConfig({displayName:"indexstyle__HeaderRowStyle",componentId:"sc-7a1uhf-3"})(["padding:","px;"," "," ",""],2*c.iI,(function(e){return"\n background-color: ".concat((e.theme||i.Z).interactive.defaultBackground,";\n border-bottom: ").concat(o.YF,"px ").concat(o.M8," ").concat((e.theme||i.Z).borders.medium,";\n ")}),(function(e){return e.padding&&"\n padding: ".concat(e.padding,"px;\n ")}),(function(e){return e.rounded&&"\n border-top-left-radius: ".concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n ")}))},65597:function(e,n,t){"use strict";t.d(n,{f:function(){return a}});var r=t(38626),i=t(23831),o=t(49125),c=t(73942),a=r.default.div.withConfig({displayName:"Tablestyle__PopupContainerStyle",componentId:"sc-8ammqd-0"})(["position:absolute;max-height:","px;z-index:10;border-radius:","px;padding:","px;"," "," "," ",""],58*o.iI,c.TR,2*o.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||i.Z.shadow).popup,";\n background-color: ").concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.leftOffset&&"\n left: ".concat(e.leftOffset,"px;\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")}))},20103:function(e,n,t){"use strict";t.d(n,{L6:function(){return o},HF:function(){return a}});var r,i=t(81132);!function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(r||(r={}));var o,c=t(10503);function a(e,n,t){var a=e.owner,u=e.roles,s=[{Icon:c.Vz,id:o.WORKSPACES,isSelected:function(){return o.WORKSPACES===t},label:function(){return"Workspaces"},linkProps:{href:"/manage"}}];return(a||u===i.No.ADMIN)&&s.push({Icon:c.NO,id:o.USERS,isSelected:function(){return o.USERS===t},label:function(){return"Users"},linkProps:{href:"/manage/users"}}),n==r.MAIN&&s.push({Icon:c.Zr,id:o.SETTINGS,isSelected:function(){return o.SETTINGS===t},label:function(){return"Settings"},linkProps:{href:"/manage/settings"}}),s}!function(e){e.WORKSPACES="workspaces",e.USERS="users",e.SETTINGS="settings"}(o||(o={}))},3849:function(e,n,t){"use strict";var r=t(82684),i=t(1210),o=t(82531),c=t(49125),a=t(20103),u=t(9736),s=t(28598);n.Z=function(e){var n=e.before,t=e.breadcrumbs,l=void 0===t?[]:t,d=e.children,f=e.errors,p=e.pageName,h=e.subheaderChildren,m=o.ZP.statuses.list().data,b=(0,r.useMemo)((function(){var e,n;return null===m||void 0===m||null===(e=m.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.project_type}),[m]),g=(0,u.PR)()||{};return(0,s.jsx)(i.Z,{before:n,beforeWidth:n?50*c.iI:0,breadcrumbs:l,errors:f,navigationItems:(0,a.HF)(g,b,p),subheaderChildren:h,title:"Workspaces",uuid:"workspaces/index",children:d})}},86422:function(e,n,t){"use strict";t.d(n,{$W:function(){return h},DA:function(){return p},HX:function(){return g},J8:function(){return b},L8:function(){return c},Lq:function(){return d},M5:function(){return f},Qj:function(){return v},Ut:function(){return j},V4:function(){return y},VZ:function(){return m},dO:function(){return l},f2:function(){return x},iZ:function(){return O},t6:function(){return a},tf:function(){return s}});var r,i,o,c,a,u=t(82394);!function(e){e.CONDITION="condition",e.DBT_SNAPSHOT="snapshot",e.DYNAMIC="dynamic",e.DYNAMIC_CHILD="dynamic_child",e.REDUCE_OUTPUT="reduce_output",e.REPLICA="replica"}(c||(c={})),function(e){e.MARKDOWN="markdown",e.PYTHON="python",e.R="r",e.SQL="sql",e.YAML="yaml"}(a||(a={}));var s,l=(r={},(0,u.Z)(r,a.MARKDOWN,"MD"),(0,u.Z)(r,a.PYTHON,"PY"),(0,u.Z)(r,a.R,"R"),(0,u.Z)(r,a.SQL,"SQL"),(0,u.Z)(r,a.YAML,"YAML"),r);!function(e){e.CALLBACK="callback",e.CHART="chart",e.CONDITIONAL="conditional",e.CUSTOM="custom",e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.DBT="dbt",e.EXTENSION="extension",e.SCRATCHPAD="scratchpad",e.SENSOR="sensor",e.MARKDOWN="markdown",e.TRANSFORMER="transformer"}(s||(s={}));var d,f=[s.CALLBACK,s.CONDITIONAL,s.EXTENSION];!function(e){e.BLUE="blue",e.GREY="grey",e.PINK="pink",e.PURPLE="purple",e.TEAL="teal",e.YELLOW="yellow"}(d||(d={}));var p,h=[s.CHART,s.CUSTOM,s.DATA_EXPORTER,s.DATA_LOADER,s.SCRATCHPAD,s.SENSOR,s.MARKDOWN,s.TRANSFORMER],m=[s.DATA_EXPORTER,s.DATA_LOADER],b=[s.DATA_EXPORTER,s.DATA_LOADER,s.TRANSFORMER],g=[s.DATA_EXPORTER,s.DATA_LOADER,s.DBT,s.TRANSFORMER],v=[s.CHART,s.SCRATCHPAD,s.SENSOR,s.MARKDOWN],O=[s.CALLBACK,s.CHART,s.EXTENSION,s.SCRATCHPAD,s.MARKDOWN];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(p||(p={}));var x=[s.CUSTOM,s.DATA_EXPORTER,s.DATA_LOADER,s.TRANSFORMER],y=(i={},(0,u.Z)(i,s.CALLBACK,"Callback"),(0,u.Z)(i,s.CUSTOM,"Custom"),(0,u.Z)(i,s.DATA_EXPORTER,"Data exporter"),(0,u.Z)(i,s.DATA_LOADER,"Data loader"),(0,u.Z)(i,s.EXTENSION,"Extension"),(0,u.Z)(i,s.SCRATCHPAD,"Scratchpad"),(0,u.Z)(i,s.SENSOR,"Sensor"),(0,u.Z)(i,s.MARKDOWN,"Markdown"),(0,u.Z)(i,s.TRANSFORMER,"Transformer"),i),j=[s.DATA_LOADER,s.TRANSFORMER,s.DATA_EXPORTER,s.SENSOR];o={},(0,u.Z)(o,s.DATA_EXPORTER,"DE"),(0,u.Z)(o,s.DATA_LOADER,"DL"),(0,u.Z)(o,s.SCRATCHPAD,"SP"),(0,u.Z)(o,s.SENSOR,"SR"),(0,u.Z)(o,s.MARKDOWN,"MD"),(0,u.Z)(o,s.TRANSFORMER,"TF")},18776:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(38626),i=t(23831),o=t(73942),c=r.default.div.withConfig({displayName:"indexstyle__PanelStyle",componentId:"sc-1rfr5wd-0"})(["border-radius:","px;"," ",""],o.n_,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).panel,";\n ")}),(function(e){return e.fullWidth&&"\n width: 100%;\n "})),a=t(28598);var u=function(e){var n=e.children,t=e.fullWidth,r=void 0===t||t;return(0,a.jsx)(c,{fullWidth:r,children:n})}},87372:function(e,n,t){"use strict";var r,i,o,c,a,u,s,l,d=t(82394),f=t(26304),p=t(26653),h=t(38626),m=t(33591),b=t(23831),g=t(2005),v=t(31012),O=t(19711),x=t(49125),y=t(86673),j=t(28598),S=["children","condensed","inline","level","marketing","spacingBelow"];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 w(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 _=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],O.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||b.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(g.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(g.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(g.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(g.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(g.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),C=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")})),A=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,m.media.md(r||(r=(0,p.Z)(["\n ","\n "])),v.aQ),m.media.lg(i||(i=(0,p.Z)(["\n ","\n "])),v.aQ),m.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),v.aQ)),R=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,v.MJ),E=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,m.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),m.media.sm(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),m.media.md(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),m.media.lg(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI),m.media.xl(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*x.iI,7*x.iI)),N=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,v.BL),P=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),T=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),k=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),D=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(v.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(v.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),I=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,a=e.spacingBelow,u=(0,f.Z)(e,S);i?n=D:0===Number(o)?n=A:1===Number(o)?n=c?E:R:2===Number(o)?n=N:3===Number(o)?n=P:4===Number(o)?n=T:5===Number(o)&&(n=k);var s=(0,j.jsxs)(n,w(w({},u),{},{level:o,children:[a&&(0,j.jsx)(y.Z,{mb:r?2:3,children:t}),!a&&t]}));return i?s:(0,j.jsx)(C,{children:s})};I.defaultProps={level:3,weightStyle:6},n.Z=I},27664:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return G}});var r,i=t(77837),o=t(75582),c=t(38860),a=t.n(c),u=t(82684),s=t(83455),l=t(60328),d=t(47999),f=t(82394),p=t(57722),h=t(67971),m=t(87372),b=t(11135),g=t(18776),v=t(55378),O=t(86673),x=t(19711),y=t(82944),j=t(70902),S=t(82531),Z=["ReadWriteOnce","ReadWriteMany","ReadOnlyMany"],w=[{label:"Workspace name",required:!0,uuid:"name"}],_=[{label:"Service account name",uuid:"service_account_name"},{label:"Storage class name",labelDescription:"Volume claim parameters",uuid:"storage_class_name"},{label:"Storage request size (in GB)",type:"number",uuid:"storage_request_size"}],C=t(86422);!function(e){e.K8S="k8s",e.ECS="ecs",e.CLOUD_RUN="cloud_run",e.EMR="emr"}(r||(r={}));var A=t(73899),R=t(85307),E=t(96510),N=t(90211),P=t(28598);function T(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?T(Object(t),!0).forEach((function(n){(0,f.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var D=function(e){var n=e.clusterType,t=e.onCancel,i=e.onCreate,c=(0,u.useState)(),a=c[0],l=c[1],d=(0,u.useState)(),T=d[0],D=d[1],I=(0,u.useState)(null),M=I[0],H=I[1],L=(0,s.Db)(S.ZP.workspaces.useCreate(),{onSuccess:function(e){return(0,E.wD)(e,{callback:function(e){e.error_message?l(e.error_message):i()},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;l(r),console.log(t,r)}})}}),W=(0,o.Z)(L,2),z=W[0],U=W[1].isLoading,F=(0,u.useMemo)((function(){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(m.Z,{level:5,children:"Kubernetes settings"}),_.map((function(e){var n=e.autoComplete,t=e.disabled,r=e.label,i=e.labelDescription,o=e.required,c=e.type,a=e.uuid;return(0,P.jsxs)(O.Z,{mt:1,children:[i&&(0,P.jsx)(O.Z,{mb:1,children:(0,P.jsx)(x.ZP,{small:!0,children:i})}),(0,P.jsx)(y.Z,{autoComplete:n,disabled:t,label:r,onChange:function(e){H((function(n){return k(k({},n),{},(0,f.Z)({},a,e.target.value))}))},primary:!0,required:o,setContentOnMount:!0,type:c,value:(null===M||void 0===M?void 0:M[a])||""})]},a)})),(0,P.jsx)(O.Z,{mt:1,children:(0,P.jsx)(v.Z,{label:"Access mode",onChange:function(e){e.preventDefault(),H((function(n){return k(k({},n),{},{storage_access_mode:e.target.value})}))},placeholder:"Access mode",value:null===M||void 0===M?void 0:M.storage_access_mode,children:Z.map((function(e){return(0,P.jsx)("option",{value:e,children:e},e)}))})}),(0,P.jsx)(O.Z,{mt:2,children:(0,P.jsxs)(h.Z,{alignItems:"center",children:[(0,P.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:"Configure container"}),(0,P.jsx)(O.Z,{ml:1}),(0,P.jsx)(j.Z,{checked:T,onCheck:function(){return D((function(e){return!e}))}})]})}),T&&(0,P.jsx)(O.Z,{mt:1,children:(0,P.jsx)(R.$W,{children:(0,P.jsx)(p.Z,{autoHeight:!0,fontSize:12,language:C.t6.YAML,onChange:function(e){H((function(n){return k(k({},n),{},{container_config:e})}))},tabSize:2,value:null===M||void 0===M?void 0:M.container_config,width:"100%"})})})]})}),[T,M]);return(0,P.jsx)(g.Z,{children:(0,P.jsx)("div",{style:{width:"500px"},children:(0,P.jsxs)(O.Z,{p:2,children:[(0,P.jsx)(h.Z,{justifyContent:"center",children:(0,P.jsx)(m.Z,{level:4,children:"Create new workspace"})}),(0,P.jsxs)("form",{children:[w.map((function(e){var n=e.autoComplete,t=e.disabled,r=e.label,i=e.required,o=e.type,c=e.uuid;return(0,P.jsx)(O.Z,{mt:2,children:(0,P.jsx)(y.Z,{autoComplete:n,disabled:t,label:r,onChange:function(e){H((function(n){return k(k({},n),{},(0,f.Z)({},c,e.target.value))}))},primary:!0,required:i,setContentOnMount:!0,type:o,value:(null===M||void 0===M?void 0:M[c])||""})},c)})),n===r.K8S&&(0,P.jsx)(O.Z,{mt:2,children:F})]}),U&&(0,P.jsx)(O.Z,{mt:1,children:(0,P.jsx)(x.ZP,{small:!0,warning:!0,children:"This may take up to a few minutes... Once the service is created, it may take another 5-10 minutes for the service to be accessible."})}),!U&&a&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(O.Z,{mt:1,children:(0,P.jsx)(x.ZP,{danger:!0,small:!0,children:"Failed to create instance, see error below."})}),(0,P.jsx)(O.Z,{mt:1,children:(0,P.jsx)(x.ZP,{danger:!0,small:!0,children:a})})]}),(0,P.jsx)(O.Z,{my:2,children:(0,P.jsxs)(h.Z,{children:[(0,P.jsx)(b.ZP,{background:A.a$,bold:!0,inline:!0,loading:U,onClick:function(){var e=M||{},t=e.name,r=e.container_config;if(t){var i=k({},M);i.name=function(e){return"ecs"===n?(0,N.We)(e,"_"):(0,N.We)(e,"-")}(t),i.container_config=T&&r,z({workspace:k(k({},i),{},{cluster_type:n})})}else l("Please enter a valid name!")},uuid:"workspaces/create",children:"Create"}),(0,P.jsx)(O.Z,{ml:1}),(0,P.jsx)(b.ZP,{bold:!0,inline:!0,onClick:t,uuid:"workspaces/cancel",children:"Cancel"})]})})]})})})},I=t(62084),M=t(41788),H=t(87815),L=t(3849),W=t(10503),z=t(73942),U=t(99994),F=t(65597),B=t(49125),K=t(20103),X=t(99497);function Y(e){var n=e.fetchWorkspaces,t=e.instance,r=e.clusterType,i=(0,u.useRef)(null),c=(0,u.useState)(),a=c[0],f=c[1],p=(0,u.useState)(),m=p[0],b=p[1],g=t.name,v=(t.task_arn,{cluster_type:r}),y=(0,s.Db)(S.ZP.workspaces.useUpdate(g,v),{onSuccess:function(e){return(0,E.wD)(e,{callback:function(){n(),f(!1)},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),j=(0,o.Z)(y,1)[0],Z=(0,s.Db)(S.ZP.workspaces.useDelete(g,v),{onSuccess:function(e){return(0,E.wD)(e,{callback:function(){n(),f(!1)},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),w=(0,o.Z)(Z,1)[0],_=(0,u.useMemo)((function(){var e=t.status,n=[{label:function(){return(0,P.jsx)(x.ZP,{children:"Delete workspace"})},onClick:function(){return b(!0)},uuid:"delete_workspace"}];return"ecs"===r&&("STOPPED"===e?n.unshift({label:function(){return(0,P.jsx)(x.ZP,{children:"Resume instance"})},onClick:function(){return j({workspace:{action:"resume",cluster_type:r,name:t.name,task_arn:t.task_arn}})},uuid:"resume_instance"}):"RUNNING"===e&&n.unshift({label:function(){return(0,P.jsx)(x.ZP,{children:"Stop instance"})},onClick:function(){return j({workspace:{action:"stop",cluster_type:r,name:t.name,task_arn:t.task_arn}})},uuid:"stop_instance"})),n}),[r,t,j]);return(0,P.jsx)(P.Fragment,{children:["ecs","k8s"].includes(r)&&(0,P.jsxs)("div",{ref:i,style:{position:"relative",zIndex:"1"},children:[(0,P.jsx)(l.Z,{iconOnly:!0,onClick:function(){return f(!a)},children:(0,P.jsx)(W.mH,{size:2*B.iI})}),(0,P.jsx)(d.Z,{disableEscape:!0,onClickOutside:function(){f(!1),b(!1)},open:a,children:m?(0,P.jsxs)(F.f,{leftOffset:30*-B.iI,topOffset:3*-B.iI,width:30*B.iI,children:[(0,P.jsx)(x.ZP,{children:"Are you sure you want to delete"}),(0,P.jsx)(x.ZP,{children:"this instance? You may not be"}),(0,P.jsx)(x.ZP,{children:"able to recover your data."}),(0,P.jsx)(O.Z,{mt:1}),(0,P.jsxs)(h.Z,{children:[(0,P.jsx)(l.Z,{danger:!0,onClick:w,children:"Confirm"}),(0,P.jsx)(O.Z,{ml:1}),(0,P.jsx)(l.Z,{default:!0,onClick:function(){return b(!1)},children:"Cancel"})]})]}):(0,P.jsx)(I.Z,{items:_,left:25*-B.iI,open:a,parentRef:i,topOffset:3*-B.iI,uuid:"workspaces/more_actions",width:25*B.iI})})]})})}function q(){var e=S.ZP.statuses.list().data,n=(0,u.useMemo)((function(){var n,t;return(null===e||void 0===e||null===(n=e.statuses)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.instance_type)||"ecs"}),[e]),t=S.ZP.workspaces.list({cluster_type:n},{refreshInterval:1e4,revalidateOnFocus:!0}),r=t.data,i=t.mutate,c=(0,u.useMemo)((function(){var e;return null===r||void 0===r||null===(e=r.workspaces)||void 0===e?void 0:e.filter((function(e){return e.name}))}),[r]),a=(0,X.dd)((function(){return(0,P.jsx)(D,{clusterType:n,onCancel:f,onCreate:function(){i(),f()}})}),{},[n,i],{background:!0,uuid:"configure_workspace"}),s=(0,o.Z)(a,2),d=s[0],f=s[1];return(0,P.jsx)(L.Z,{breadcrumbs:[{bold:!0,label:function(){return"Workspaces"}}],pageName:K.L6.WORKSPACES,subheaderChildren:(0,P.jsx)(b.ZP,{background:U.eW,beforeElement:(0,P.jsx)(W.mm,{size:2.5*B.iI}),bold:!0,inline:!0,onClick:function(){return d()},uuid:"workspaces/new",children:"Create new workspace"}),children:(0,P.jsx)(H.Z,{columnFlex:[2,4,2,3,1,null],columns:[{uuid:"Status"},{uuid:"Instance Name"},{uuid:"Type"},{uuid:"Public IP address"},{uuid:"Open"},{label:function(){return""},uuid:"Actions"}],rows:null===c||void 0===c?void 0:c.map((function(e){var t=e.instance,r=t.ip,o=t.name,c=t.status,a=t.type,u="http://".concat(r);return"ecs"===n&&(u="http://".concat(r,":6789")),[(0,P.jsx)(l.Z,{borderRadius:z.D7,danger:"STOPPED"===c,default:"PROVISIONING"===c,notClickable:!0,padding:"6px",primary:"RUNNING"===c,warning:"PENDING"===c,children:(0,N.vg)(c)},"status"),(0,P.jsx)(x.ZP,{children:o},"name"),(0,P.jsx)(x.ZP,{children:(0,N.vg)(a)},"type"),(0,P.jsx)(x.ZP,{children:r},"ip"),(0,P.jsx)(l.Z,{disabled:!r,iconOnly:!0,onClick:function(){return window.open(u)},children:(0,P.jsx)(W.M0,{size:2*B.iI})},"open_button"),(0,P.jsx)(Y,{clusterType:n,fetchWorkspaces:i,instance:t},"more_actions")]}))})})}q.getInitialProps=(0,i.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var G=(0,M.Z)(q)},13157:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage",function(){return t(27664)}])}},function(e){e.O(0,[844,7607,8789,1424,1005,7815,7722,9774,2888,179],(function(){return n=13157,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{2850:function(e,n,t){"use strict";t.d(n,{M:function(){return a},W:function(){return l}});var r=t(38626),i=t(3055),l=34*t(49125).iI,a=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},56681:function(e,n,t){"use strict";t.d(n,{G7:function(){return y},ZP:function(){return O},u$:function(){return x}});var r=t(75582),i=t(82394),l=t(26304),a=t(32316),c=t(22673),s=t(73752),o=t(86673),u=t(19711),d=t(87815),p=t(49125),f=t(19395),v=t(7715),b=t(28598),h=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=76,g={uuid:"Run details"},Z={uuid:"Dependency tree"},y=[Z,g];function O(e){var n=e.height,t=e.heightOffset,i=e.pipeline,m=e.selectedRun,O=e.selectedTab,k=e.setSelectedTab,_=j({},(0,l.Z)(e,h));m?_.blockStatus=(0,f.IJ)(null===m||void 0===m?void 0:m.block_runs):_.noStatus=!0;var P=(0,v.Kn)(null===m||void 0===m?void 0:m.variables)?j({},null===m||void 0===m?void 0:m.variables):(null===m||void 0===m?void 0:m.variables)||{},I=null===m||void 0===m?void 0:m.event_variables;if(I&&(0,v.Kn)(I)&&!(0,v.Qr)(I))if((0,v.Kn)(P)&&P.hasOwnProperty("event")){var w=(0,v.Kn)(P.event)?P.event:{};P.event=j(j({},w),I)}else P.event=j({},I);var S=[];P&&JSON.stringify(P,null,2).split("\n").forEach((function(e){S.push(" ".concat(e))}));var D=m&&[["Run ID",null===m||void 0===m?void 0:m.id],["Variables",(0,b.jsx)(c.Z,{language:"json",small:!0,source:S.join("\n")},"variable_value")]],C=m&&(0,b.jsx)(o.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:D.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],l=t[1];return[(0,b.jsx)(u.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,b.jsx)(u.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),E=O&&k;return(0,b.jsxs)(b.Fragment,{children:[E&&(0,b.jsx)(o.Z,{py:p.cd,children:(0,b.jsx)(a.Z,{onClickTab:k,selectedTabUUID:null===O||void 0===O?void 0:O.uuid,tabs:y})}),(!E||Z.uuid===(null===O||void 0===O?void 0:O.uuid))&&(0,b.jsx)(s.Z,j(j({},_),{},{height:n,heightOffset:(t||0)+(E?x:0),pipeline:i})),g.uuid===(null===O||void 0===O?void 0:O.uuid)&&C]})}},58122:function(e,n,t){"use strict";t.d(n,{CL:function(){return f},FS:function(){return v},JZ:function(){return h},e7:function(){return m},v0:function(){return p},wx:function(){return b}});var r=t(75582),i=t(82394),l=t(43313),a=t(93348),c=t(1286),s=t(90211),o=t(84779);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 d(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 p(e){var n=e.statistics,t=Object.keys(n),r=Array(l.Dy.length).fill(0);return 0===t.length?null:(t.forEach((function(e){if(l.Dy.includes(e)){var t=l.CC[e],i=n[e],a=i,c=!1,s=[2,3],u=l.Ub[e],d=l.oH[e],p=l.OD[e];if(l.y_.includes(e))c=!0,s=[2,1,2];else if(e in l.Sq){i=(0,o.Jw)(i,0);var f=l.Sq[e];a=n[f]}var v={columnFlexNumbers:s,name:t,progress:c,rate:a,successDirection:d,warning:p};l.y_.includes(e)||(v.value=i),r[u]=v}})),r)}function f(e){var n=e.columnTypes,t=void 0===n?{}:n,r=e.statistics,i=Object.keys(r);if(0===i.length)return null;var a=Object.values(t),o=a.length,u=[];u.push({name:"Column count",successDirection:l.oH.column_count,value:(0,s.x6)(o)}),i.forEach((function(e){if(l.Zu.includes(e)){var n=l.CC[e],t=r[e],i=l.OD[e];u.push({name:n,successDirection:l.oH[e],value:(0,s.x6)(t),warning:i})}}));var d=(0,c.QO)(a),p=d.countCategory,f=d.countDatetime,v=d.countNumerical;return u.push({name:"Categorical Features",rate:p/o,value:(0,s.x6)(p)},{name:"Numerical Features",rate:v/o,value:(0,s.x6)(v)},{name:"Datetime Features",rate:f/o,value:(0,s.x6)(f)}),u}function v(e){return"string"===typeof e?e:JSON.stringify(e)}function b(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return d(d({},e),{},{value:v(n)})}))}function h(e,n){return n===a.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===a.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function m(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],a=t[1],c=a;try{c=JSON.parse(a)}catch(s){}return d(d({},e),{},(0,i.Z)({},l,c))}),{}):e}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return c}});var r=t(38626),i=t(23831),l=t(73942),a=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*a.iI,a.cd*a.iI,a.cd*a.iI,40*a.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,a.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*a.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*a.iI,"px;\n ")}))},43526:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return s},VV:function(){return l},_7:function(){return a},rn:function(){return c}});var r,i=t(66050),l="datetime",a="code",c=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var s=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR,r.CUSTOM]},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),l=t(67971),a=t(55378),c=t(86673),s=t(19711),o=t(18025),u=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,b=e.topPosition;return(0,p.jsxs)(o.J,{absolute:!0,topPosition:b,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(l.Z,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(a.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return v(v({},n),{},{hour:e.target.value})}))},paddingRight:5*u.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(a.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return v(v({},n),{},{minute:e.target.value})}))},paddingRight:5*u.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},22673:function(e,n,t){"use strict";var r=t(82684),i=t(68792),l=t(31811),a=t(38626),c=t(65292),s=t(23831),o=t(2005),u=t(49125),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,v=e.source,b=e.wrapLines,h=(0,r.useContext)(a.ThemeContext);function m(e){var r=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(h.background||s.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:o.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*u.iI,paddingTop:2*u.iI},language:n,lineNumberStyle:{color:(h.content||s.Z.content).muted},showLineNumbers:p,style:c._4,useInlineStyles:!0,wrapLines:b,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(m,{value:n})}},children:v})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return h}});var r=t(82684),i=t(60328),l=t(67971),a=t(882),c=t(86673),s=t(19711),o=t(99994),u=t(38626),d=t(49125),p=t(37391),f=u.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],d.cd*d.iI,d.cd*d.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),p.w5),v=t(66653),b=t(28598);var h=function(e){var n=e.allowScroll,t=e.compact,u=e.contained,p=e.noPadding,h=e.onClickTab,m=e.selectedTabUUID,j=e.small,x=e.tabs,g=(0,r.useMemo)((function(){var e=x.length,n=[];return x.forEach((function(r,u){var p=r.Icon,f=r.IconSelected,x=r.label,g=r.uuid,Z=g===m,y=Z&&f||p,O=x?x():g,k=(0,b.jsxs)(l.Z,{alignItems:"center",children:[y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y,{default:!Z,size:2*d.iI}),(0,b.jsx)(c.Z,{mr:1})]}),(0,b.jsx)(s.ZP,{bold:!0,default:!Z,noWrapping:!0,small:!0,children:O})]});u>=1&&e>=2&&n.push((0,b.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(g))),Z?n.push((0,b.jsx)(a.Z,{backgroundGradient:o.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||j,onClick:function(e){(0,v.j)(e),h(r)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:j,children:k},g)):n.push((0,b.jsx)("div",{style:{padding:2},children:(0,b.jsx)(i.Z,{borderLess:!0,compact:t||j,default:!0,onClick:function(e){(0,v.j)(e),h(r)},outline:!0,small:j,children:k})},"button-tab-".concat(g)))})),n}),[t,h,m,j,x]),Z=(0,b.jsx)(l.Z,{alignItems:"center",children:g});return u?Z:(0,b.jsx)(f,{allowScroll:n,noPadding:p,children:Z})}},12625:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ie}});var r=t(75582),i=t(77837),l=t(82394),a=t(38860),c=t.n(a),s=t(82684),o=t(83455),u=t(34376),d=t(43526),p=t(60328),f=t(34744),v=t(67971),b=t(87372),h=t(51099),m=t(60547),j=t(97496),x=t(47409),g=t(52769),Z=t(55378),y=t(86673),O=t(54283),k=t(87815),_=t(19711),P=t(82531),I=t(56681),w=t(10503),S=t(2850),D=t(49125),C=t(59920),E=t(90211),N=t(58122),T=t(19395),M=t(33766),L=t(7715),F=t(9736),U=t(96510),A=t(66653),R=t(59e3),H=t(28598);function V(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?V(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,a=e.setErrors,c=e.variables,V=(0,F.Ct)(),z=(0,u.useRouter)(),Y=n||{},W=Y.block_uuid,J=Y.end_datetime,K=Y.id,G=Y.interval_type,q=Y.interval_units,X=Y.name,Q=Y.pipeline_run_dates,$=Y.start_datetime,ee=Y.status,ne=Y.total_run_count,te=Y.variables,re=void 0===te?{}:te,ie=l.uuid,le=(0,R.iV)(),ae={_limit:40,_offset:40*(null!==le&&void 0!==le&&le.page?le.page:0)};null!==le&&void 0!==le&&le.status&&(ae.status=le.status);var ce=P.ZP.pipeline_runs.list(B(B({},ae),{},{backfill_id:K}),{refreshInterval:3e3,revalidateOnFocus:!0},{pauseFetch:!K}),se=ce.data,oe=ce.mutate,ue=!($&&J&&G&&q),de=!ee,pe=(0,s.useMemo)((function(){return(de?Q:null===se||void 0===se?void 0:se.pipeline_runs)||[]}),[se,Q,de]),fe=(0,s.useMemo)((function(){var e;return(null===se||void 0===se||null===(e=se.metadata)||void 0===e?void 0:e.count)||[]}),[se]),ve=(0,s.useState)(null),be=ve[0],he=ve[1],me=(0,s.useMemo)((function(){var e=null!==le&&void 0!==le&&le.page?le.page:0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(j.Z,{disableRowSelect:de,emptyMessage:null!==le&&void 0!==le&&le.status?"No runs available":'No runs available. Please complete backfill configuration by clicking "Edit backfill" above.',fetchPipelineRuns:oe,onClickRow:function(e){return he((function(n){var t=pe[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:pe,selectedRun:be,setErrors:a}),(0,H.jsx)(y.Z,{p:2,children:(0,H.jsx)(h.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),t=B(B({},le),{},{page:n>=0?n:0});z.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(ie,"/backfills/").concat(K,"?").concat((0,R.uM)(t)))},page:Number(e),totalPages:Math.ceil(fe/40)})})]})}),[oe,K,pe,ie,le,z,be,de,fe]),je=(0,s.useState)(I.G7[0]),xe=je[0],ge=je[1],Ze=(0,o.Db)(P.ZP.backfills.useUpdate(K),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(){i(),oe()},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),ye=(0,r.Z)(Ze,2),Oe=ye[0],ke=ye[1].isLoading,_e=(0,s.useMemo)((function(){return!!ee&&(d.rn.CANCELLED!==ee&&d.rn.FAILED!==ee)}),[ee]),Pe=(0,s.useMemo)((function(){return ee&&d.rn.CANCELLED!==ee&&d.rn.FAILED!==ee&&d.rn.INITIAL!==ee&&d.rn.RUNNING!==ee}),[ee]),Ie=(0,s.useMemo)((function(){var e={default:!0,size:1.5*D.iI},n=[[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.VW,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Backfill type"})]},"backfill_type_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:W?d._7:d.VV},"backfill_type")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.rs,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Status"})]},"backfill_status_label"),(0,H.jsx)(_.ZP,{danger:d.rn.CANCELLED===ee||d.rn.FAILED==ee,default:d.rn.INITIAL===ee,monospace:!0,muted:!ee,success:d.rn.RUNNING===ee||d.rn.COMPLETED===ee,children:ee||"inactive"},"backfill_status")]];return W||n.push.apply(n,[[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.aw,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Start date and time"})]},"backfill_start_date_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:(0,T.Vx)($)},"backfill_start_date")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.aw,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"End date and time"})]},"backfill_end_date_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:(0,T.Vx)(J)},"backfill_end_date")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.Pf,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Interval type"})]},"interval_type_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:G&&(0,E.kC)(G)},"interval_type")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.Pf,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Interval units"})]},"interval_units_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:q},"interval_units")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.qZ,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Total runs"})]},"total_runs_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:ne},"total_runs")]]),(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:n})}),[W,J,G,q,$,ee,ne]),we=(0,s.useMemo)((function(){return re||{}}),[re]),Se=(0,s.useMemo)((function(){var e,n=[];return(0,L.Qr)(we)?n=(0,N.wx)(c,(function(e){return e.uuid===g.C})):Object.entries(we).forEach((function(e){var t=(0,r.Z)(e,2),i=t[0],l=t[1];n.push({uuid:i,value:(0,N.FS)(l)})})),"undefined"!==typeof n&&null!==(e=n)&&void 0!==e&&e.length?(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,H.jsx)(_.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,H.jsx)(_.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[we,c]);return(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(m.Z,{afterHidden:!be,before:(0,H.jsxs)(S.M,{children:[(0,H.jsxs)(y.Z,{mb:D.HN,pt:D.cd,px:D.cd,children:[(0,H.jsx)(y.Z,{mb:D.cd,children:(0,H.jsx)(w.yg,{size:5*D.iI})}),(0,H.jsx)(b.Z,{children:X})]}),(0,H.jsx)(y.Z,{px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ie,Se&&(0,H.jsxs)(y.Z,{my:D.HN,children:[(0,H.jsx)(y.Z,{px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Runtime variables"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),Se]})]}),beforeWidth:34*D.iI,breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(ie,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return X},linkProps:{as:"/pipelines/".concat(ie,"/backfills/").concat(K),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],buildSidekick:function(e){return(0,I.ZP)(B(B({},e),{},{selectedRun:be,selectedTab:xe,setSelectedTab:ge}))},errors:t,pageName:C.M.BACKFILLS,pipeline:l,setErrors:a,subheader:(0,H.jsxs)(v.Z,{alignItems:"center",children:[!Pe&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(p.Z,{beforeIcon:_e?(0,H.jsx)(w.dz,{size:2*D.iI}):(0,H.jsx)(w.Py,{inverted:!(d.rn.CANCELLED===ee||d.rn.FAILED===ee),size:2*D.iI}),danger:_e,disabled:ue,loading:ke,onClick:function(e){(0,A.j)(e),Oe({backfill:{status:_e?d.rn.CANCELLED:d.rn.INITIAL}})},outline:!0,success:!_e&&!(d.rn.CANCELLED===ee||d.rn.FAILED===ee)&&!ue,children:_e?"Cancel backfill":d.rn.CANCELLED===ee||d.rn.FAILED===ee?"Retry backfill":"Start backfill"}),(0,H.jsx)(y.Z,{mr:D.cd})]}),!V&&(0,H.jsxs)(H.Fragment,{children:[ee===x.VO.COMPLETED?(0,H.jsx)(_.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}):(0,H.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(ie,"/backfills/").concat(K,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit backfill"}),(0,H.jsx)(y.Z,{mr:D.cd})]}),!de&&(0,H.jsxs)(Z.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?z.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(ie,"/backfills/").concat(K)):(0,M.u7)({page:0,status:e.target.value})},paddingRight:4*D.iI,placeholder:"Select run status",value:(null===le||void 0===le?void 0:le.status)||"all",children:[(0,H.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(x.VO).map((function(e){return(0,H.jsx)("option",{value:e,children:x.Do[e]},e)}))]})]}),title:function(){return X},uuid:"backfill/detail",children:[(0,H.jsx)(y.Z,{mt:D.cd,px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Runs for this backfill"})}),(0,H.jsx)(f.Z,{light:!0,mt:D.cd,short:!0}),se?me:(0,H.jsx)(y.Z,{m:2,children:(0,H.jsx)(O.Z,{inverted:!0})})]})})},Y=t(2713),W=t(47999),J=t(93461),K=t(82944),G=[{label:function(){return"Date and time window"},description:function(){return"Backfill between a date and time range."},uuid:d.VV}],q=t(18025);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 Q(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,l.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 $=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,a=e.setErrors,c=(e.variables,(0,u.useRouter)()),h=(0,s.useState)(),j=h[0],x=h[1],g=j||{},O=g.block_uuid,I=g.id,S=g.interval_type,M=g.interval_units,F=(g.end_datetime,g.start_datetime,g.name),A=l.uuid,R=(0,s.useState)({}),V=R[0],B=(R[1],(0,s.useState)(O?d._7:d.VV)),z=B[0],X=B[1],$=(0,s.useState)(!1),ee=$[0],ne=$[1],te=(0,s.useState)(!1),re=te[0],ie=te[1],le=(0,s.useState)(null),ae=le[0],ce=le[1],se=(0,s.useState)(null),oe=se[0],ue=se[1],de=(0,s.useState)({hour:"00",minute:"00"}),pe=de[0],fe=de[1],ve=(0,s.useState)({hour:"00",minute:"00"}),be=ve[0],he=ve[1];(0,s.useEffect)((function(){if(n){x(n);var e=n.start_datetime;if(e){var t=e.split(" ")[1];ue((0,T.eI)(e)),he({hour:t.substring(0,2),minute:t.substring(3,5)})}var r=n.end_datetime;if(r){var i=r.split(" ")[1];ce((0,T.eI)(r)),fe({hour:i.substring(0,2),minute:i.substring(3,5)})}}}),[n]);var me=(0,s.useMemo)((function(){var e=[[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.KJ,{default:!0,size:1.5*D.iI}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Backfill name"})]},"model_name_detail"),(0,H.jsx)(K.Z,{monospace:!0,onChange:function(e){e.preventDefault(),x((function(n){return Q(Q({},n),{},{name:e.target.value})}))},placeholder:"Name this backfill",value:F},"model_name_input_detail")]];return d.VV===z&&e.push.apply(e,[[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.aw,{default:!0,size:1.5*D.iI}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!ee&&(0,H.jsx)(K.Z,{monospace:!0,onClick:function(){return ne((function(e){return!e}))},onFocus:function(){return ne(!0)},placeholder:"YYYY-MM-DD HH:MM",value:oe?"".concat(oe.toISOString().split("T")[0]," ").concat(null===be||void 0===be?void 0:be.hour,":").concat(null===be||void 0===be?void 0:be.minute):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(W.Z,{disableEscape:!0,onClickOutside:function(){return ne(!1)},open:ee,style:{position:"relative"},children:(0,H.jsx)(Y.Z,{selectedDate:oe,selectedTime:be,setSelectedDate:ue,setSelectedTime:he,topPosition:!0})})})]},"start_time_input")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.aw,{default:!0,size:1.5*D.iI}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"End date and time"})]},"end_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!re&&(0,H.jsx)(K.Z,{monospace:!0,onClick:function(){return ie((function(e){return!e}))},onFocus:function(){return ie(!0)},placeholder:"YYYY-MM-DD HH:MM",value:ae?"".concat(ae.toISOString().split("T")[0]," ").concat(null===pe||void 0===pe?void 0:pe.hour,":").concat(null===pe||void 0===pe?void 0:pe.minute):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(W.Z,{disableEscape:!0,onClickOutside:function(){return ie(!1)},open:re,style:{position:"relative"},children:(0,H.jsx)(Y.Z,{selectedDate:ae,selectedTime:pe,setSelectedDate:ce,setSelectedTime:fe,topPosition:!0})})})]},"end_time_input")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.Pf,{default:!0,size:1.5*D.iI}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Interval type"})]},"interval_type"),(0,H.jsx)(Z.Z,{monospace:!0,onChange:function(e){e.preventDefault(),x((function(n){return Q(Q({},n),{},{interval_type:e.target.value})}))},placeholder:"Time spacing between each backfill",value:S,children:d.IB.map((function(e){return(0,H.jsx)("option",{value:e,children:(0,E.kC)(e)},e)}))},"interval_type_input")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.Pf,{default:!0,size:1.5*D.iI}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Interval units"})]},"interval_units"),(0,H.jsx)(K.Z,{disabled:!S,monospace:!0,onChange:function(e){e.preventDefault(),x((function(n){return Q(Q({},n),{},{interval_units:e.target.value})}))},placeholder:S?"Number of ".concat(S).concat(S!==d.I7.CUSTOM?"s":""," between each backfill"):"Interval type is required",type:"number",value:M},"interval_unit_input")]]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y.Z,{mb:2,px:D.cd,children:(0,H.jsx)(b.Z,{children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,short:!0}),(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:e})]})}),[ae,oe,S,M,F,z,ee,re,pe,be]),je=(0,o.Db)(P.ZP.backfills.useUpdate(I),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(){i(),c.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(A,"/backfills/").concat(I))},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),xe=(0,r.Z)(je,2),ge=xe[0],Ze=xe[1].isLoading,ye=(0,s.useCallback)((function(){var e=Q(Q({},(0,L.GL)(j,["name"])),{},{end_datetime:null,interval_type:null,interval_units:null,start_datetime:null,variables:(0,N.e7)(V)});return d._7===z||(e.interval_type=S,e.interval_units=M,e.end_datetime=ae&&null!==pe&&void 0!==pe&&pe.hour&&null!==pe&&void 0!==pe&&pe.minute?"".concat(ae.toISOString().split("T")[0]," ").concat(null===pe||void 0===pe?void 0:pe.hour,":").concat(null===pe||void 0===pe?void 0:pe.minute,":00"):null,e.start_datetime=oe&&null!==be&&void 0!==be&&be.hour&&null!==be&&void 0!==be&&be.minute?"".concat(oe.toISOString().split("T")[0]," ").concat(null===be||void 0===be?void 0:be.hour,":").concat(null===be||void 0===be?void 0:be.minute,":00"):null),ge({backfill:e})}),[ae,oe,S,M,j,V,z,pe,be]),Oe=(0,s.useMemo)((function(){return d._7===z?!O:!(ae&&oe&&S&&M)}),[O,ae,oe,S,M,z,pe,be]);return(0,H.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(A,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return null===j||void 0===j?void 0:j.name},linkProps:{as:"/pipelines/".concat(A,"/backfills/").concat(I),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],errors:t,pageName:C.M.BACKFILLS,pipeline:l,setErrors:a,subheader:(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(p.Z,{disabled:Oe,loading:Ze,onClick:ye,outline:!0,primary:!0,children:"Save changes"}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/backfills/[...slug]",as:"/pipelines/".concat(A,"/backfills/").concat(I)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===j||void 0===j?void 0:j.name)},uuid:"backfill/edit",children:[(0,H.jsxs)(y.Z,{p:D.cd,children:[(0,H.jsxs)(y.Z,{mb:2,children:[(0,H.jsx)(b.Z,{children:"Backfill type"}),(0,H.jsx)(_.ZP,{muted:!0,children:"How would you like this pipeline to be backfilled?"})]}),(0,H.jsx)(v.Z,{children:G.map((function(e){var n=e.label,t=e.description,r=e.uuid,i=z===r,l=z&&!i;return(0,H.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){X(r)},children:(0,H.jsx)(q.U,{selected:i,children:(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(J.Z,{children:(0,H.jsx)("input",{checked:i,type:"radio"})}),(0,H.jsx)(y.Z,{mr:D.cd}),(0,H.jsxs)(J.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,H.jsx)(b.Z,{bold:!0,default:!i&&!l,level:5,muted:!i&&l,children:n()}),(0,H.jsx)(_.ZP,{default:!i&&!l,leftAligned:!0,muted:l,children:t()})]})]})})},r)}))})]}),(0,H.jsx)(y.Z,{mt:5,children:me})]})},ee=t(41788);function ne(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function te(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ne(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ne(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function re(e){var n=e.backfillId,t=e.pipelineUUID,r=e.subpath,i=(0,s.useState)(null),l=i[0],a=i[1],c=P.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,o=(0,s.useMemo)((function(){return null===c||void 0===c?void 0:c.variables}),[c]),u=P.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=(0,s.useMemo)((function(){return te(te({},null===u||void 0===u?void 0:u.pipeline),{},{uuid:t})}),[u,t]),p=P.ZP.backfills.detail(n,{include_preview_runs:!0}),f=p.data,v=p.mutate,b=(0,s.useMemo)((function(){return null===f||void 0===f?void 0:f.backfill}),[f]);return"edit"===r?(0,H.jsx)($,{backfill:b,errors:l,fetchBackfill:v,pipeline:d,setErrors:a,variables:o}):(0,H.jsx)(z,{backfill:b,errors:l,fetchBackfill:v,pipeline:d,setErrors:a,variables:o})}re.getInitialProps=function(){var e=(0,i.Z)(c().mark((function e(n){var t,i,l,a,s,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,i=t.pipeline,l=t.slug,!Array.isArray(l)){e.next=4;break}return a=(0,r.Z)(l,2),s=a[0],o=a[1],e.abrupt("return",{backfillId:s,pipelineUUID:i,subpath:o});case 4:return e.abrupt("return",{pipelineUUID:i});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var ie=(0,ee.Z)(re)},53664:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills/[...slug]",function(){return t(12625)}])}},function(e){e.O(0,[844,7607,5896,4804,1774,9350,5872,4495,1424,1005,7815,547,3714,3752,1286,8312,9774,2888,179],(function(){return n=53664,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{2850:function(e,n,t){"use strict";t.d(n,{M:function(){return a},W:function(){return l}});var r=t(38626),i=t(3055),l=34*t(49125).iI,a=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},56681:function(e,n,t){"use strict";t.d(n,{G7:function(){return y},ZP:function(){return O},u$:function(){return x}});var r=t(75582),i=t(82394),l=t(26304),a=t(32316),c=t(22673),s=t(73752),o=t(86673),u=t(19711),d=t(87815),p=t(49125),f=t(19395),v=t(7715),b=t(28598),h=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=76,g={uuid:"Run details"},Z={uuid:"Dependency tree"},y=[Z,g];function O(e){var n=e.height,t=e.heightOffset,i=e.pipeline,m=e.selectedRun,O=e.selectedTab,k=e.setSelectedTab,_=j({},(0,l.Z)(e,h));m?_.blockStatus=(0,f.IJ)(null===m||void 0===m?void 0:m.block_runs):_.noStatus=!0;var P=(0,v.Kn)(null===m||void 0===m?void 0:m.variables)?j({},null===m||void 0===m?void 0:m.variables):(null===m||void 0===m?void 0:m.variables)||{},I=null===m||void 0===m?void 0:m.event_variables;if(I&&(0,v.Kn)(I)&&!(0,v.Qr)(I))if((0,v.Kn)(P)&&P.hasOwnProperty("event")){var w=(0,v.Kn)(P.event)?P.event:{};P.event=j(j({},w),I)}else P.event=j({},I);var S=[];P&&JSON.stringify(P,null,2).split("\n").forEach((function(e){S.push(" ".concat(e))}));var D=m&&[["Run ID",null===m||void 0===m?void 0:m.id],["Variables",(0,b.jsx)(c.Z,{language:"json",small:!0,source:S.join("\n")},"variable_value")]],C=m&&(0,b.jsx)(o.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:D.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],l=t[1];return[(0,b.jsx)(u.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,b.jsx)(u.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),E=O&&k;return(0,b.jsxs)(b.Fragment,{children:[E&&(0,b.jsx)(o.Z,{py:p.cd,children:(0,b.jsx)(a.Z,{onClickTab:k,selectedTabUUID:null===O||void 0===O?void 0:O.uuid,tabs:y})}),(!E||Z.uuid===(null===O||void 0===O?void 0:O.uuid))&&(0,b.jsx)(s.Z,j(j({},_),{},{height:n,heightOffset:(t||0)+(E?x:0),pipeline:i})),g.uuid===(null===O||void 0===O?void 0:O.uuid)&&C]})}},58122:function(e,n,t){"use strict";t.d(n,{CL:function(){return f},FS:function(){return v},JZ:function(){return h},e7:function(){return m},v0:function(){return p},wx:function(){return b}});var r=t(75582),i=t(82394),l=t(43313),a=t(93348),c=t(1286),s=t(90211),o=t(84779);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 d(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 p(e){var n=e.statistics,t=Object.keys(n),r=Array(l.Dy.length).fill(0);return 0===t.length?null:(t.forEach((function(e){if(l.Dy.includes(e)){var t=l.CC[e],i=n[e],a=i,c=!1,s=[2,3],u=l.Ub[e],d=l.oH[e],p=l.OD[e];if(l.y_.includes(e))c=!0,s=[2,1,2];else if(e in l.Sq){i=(0,o.Jw)(i,0);var f=l.Sq[e];a=n[f]}var v={columnFlexNumbers:s,name:t,progress:c,rate:a,successDirection:d,warning:p};l.y_.includes(e)||(v.value=i),r[u]=v}})),r)}function f(e){var n=e.columnTypes,t=void 0===n?{}:n,r=e.statistics,i=Object.keys(r);if(0===i.length)return null;var a=Object.values(t),o=a.length,u=[];u.push({name:"Column count",successDirection:l.oH.column_count,value:(0,s.x6)(o)}),i.forEach((function(e){if(l.Zu.includes(e)){var n=l.CC[e],t=r[e],i=l.OD[e];u.push({name:n,successDirection:l.oH[e],value:(0,s.x6)(t),warning:i})}}));var d=(0,c.QO)(a),p=d.countCategory,f=d.countDatetime,v=d.countNumerical;return u.push({name:"Categorical Features",rate:p/o,value:(0,s.x6)(p)},{name:"Numerical Features",rate:v/o,value:(0,s.x6)(v)},{name:"Datetime Features",rate:f/o,value:(0,s.x6)(f)}),u}function v(e){return"string"===typeof e?e:JSON.stringify(e)}function b(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return d(d({},e),{},{value:v(n)})}))}function h(e,n){return n===a.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===a.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function m(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],a=t[1],c=a;try{c=JSON.parse(a)}catch(s){}return d(d({},e),{},(0,i.Z)({},l,c))}),{}):e}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return c}});var r=t(38626),i=t(23831),l=t(73942),a=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*a.iI,a.cd*a.iI,a.cd*a.iI,40*a.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,a.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*a.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*a.iI,"px;\n ")}))},43526:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return s},VV:function(){return l},_7:function(){return a},rn:function(){return c}});var r,i=t(66050),l="datetime",a="code",c=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var s=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR,r.CUSTOM]},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),l=t(67971),a=t(55378),c=t(86673),s=t(19711),o=t(18025),u=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,b=e.topPosition;return(0,p.jsxs)(o.J,{absolute:!0,topPosition:b,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(l.Z,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(a.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return v(v({},n),{},{hour:e.target.value})}))},paddingRight:5*u.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(a.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return v(v({},n),{},{minute:e.target.value})}))},paddingRight:5*u.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},22673:function(e,n,t){"use strict";var r=t(82684),i=t(68792),l=t(31811),a=t(38626),c=t(65292),s=t(23831),o=t(2005),u=t(49125),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,v=e.source,b=e.wrapLines,h=(0,r.useContext)(a.ThemeContext);function m(e){var r=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(h.background||s.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:o.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*u.iI,paddingTop:2*u.iI},language:n,lineNumberStyle:{color:(h.content||s.Z.content).muted},showLineNumbers:p,style:c._4,useInlineStyles:!0,wrapLines:b,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(m,{value:n})}},children:v})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return h}});var r=t(82684),i=t(60328),l=t(67971),a=t(882),c=t(86673),s=t(19711),o=t(99994),u=t(38626),d=t(49125),p=t(37391),f=u.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],d.cd*d.iI,d.cd*d.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),p.w5),v=t(66653),b=t(28598);var h=function(e){var n=e.allowScroll,t=e.compact,u=e.contained,p=e.noPadding,h=e.onClickTab,m=e.selectedTabUUID,j=e.small,x=e.tabs,g=(0,r.useMemo)((function(){var e=x.length,n=[];return x.forEach((function(r,u){var p=r.Icon,f=r.IconSelected,x=r.label,g=r.uuid,Z=g===m,y=Z&&f||p,O=x?x():g,k=(0,b.jsxs)(l.Z,{alignItems:"center",children:[y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y,{default:!Z,size:2*d.iI}),(0,b.jsx)(c.Z,{mr:1})]}),(0,b.jsx)(s.ZP,{bold:!0,default:!Z,noWrapping:!0,small:!0,children:O})]});u>=1&&e>=2&&n.push((0,b.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(g))),Z?n.push((0,b.jsx)(a.Z,{backgroundGradient:o.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||j,onClick:function(e){(0,v.j)(e),h(r)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:j,children:k},g)):n.push((0,b.jsx)("div",{style:{padding:2},children:(0,b.jsx)(i.Z,{borderLess:!0,compact:t||j,default:!0,onClick:function(e){(0,v.j)(e),h(r)},outline:!0,small:j,children:k})},"button-tab-".concat(g)))})),n}),[t,h,m,j,x]),Z=(0,b.jsx)(l.Z,{alignItems:"center",children:g});return u?Z:(0,b.jsx)(f,{allowScroll:n,noPadding:p,children:Z})}},12625:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ie}});var r=t(75582),i=t(77837),l=t(82394),a=t(38860),c=t.n(a),s=t(82684),o=t(83455),u=t(34376),d=t(43526),p=t(60328),f=t(34744),v=t(67971),b=t(87372),h=t(51099),m=t(60547),j=t(97496),x=t(47409),g=t(52769),Z=t(55378),y=t(86673),O=t(54283),k=t(87815),_=t(19711),P=t(82531),I=t(56681),w=t(10503),S=t(2850),D=t(49125),C=t(59920),E=t(90211),N=t(58122),T=t(19395),M=t(33766),L=t(7715),F=t(9736),U=t(96510),A=t(66653),R=t(59e3),H=t(28598);function V(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?V(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,a=e.setErrors,c=e.variables,V=(0,F.Ct)(),z=(0,u.useRouter)(),Y=n||{},W=Y.block_uuid,J=Y.end_datetime,K=Y.id,G=Y.interval_type,q=Y.interval_units,X=Y.name,Q=Y.pipeline_run_dates,$=Y.start_datetime,ee=Y.status,ne=Y.total_run_count,te=Y.variables,re=void 0===te?{}:te,ie=l.uuid,le=(0,R.iV)(),ae={_limit:40,_offset:40*(null!==le&&void 0!==le&&le.page?le.page:0)};null!==le&&void 0!==le&&le.status&&(ae.status=le.status);var ce=P.ZP.pipeline_runs.list(B(B({},ae),{},{backfill_id:K}),{refreshInterval:3e3,revalidateOnFocus:!0},{pauseFetch:!K}),se=ce.data,oe=ce.mutate,ue=!($&&J&&G&&q),de=!ee,pe=(0,s.useMemo)((function(){return(de?Q:null===se||void 0===se?void 0:se.pipeline_runs)||[]}),[se,Q,de]),fe=(0,s.useMemo)((function(){var e;return(null===se||void 0===se||null===(e=se.metadata)||void 0===e?void 0:e.count)||[]}),[se]),ve=(0,s.useState)(null),be=ve[0],he=ve[1],me=(0,s.useMemo)((function(){var e=null!==le&&void 0!==le&&le.page?le.page:0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(j.Z,{disableRowSelect:de,emptyMessage:null!==le&&void 0!==le&&le.status?"No runs available":'No runs available. Please complete backfill configuration by clicking "Edit backfill" above.',fetchPipelineRuns:oe,onClickRow:function(e){return he((function(n){var t=pe[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:pe,selectedRun:be,setErrors:a}),(0,H.jsx)(y.Z,{p:2,children:(0,H.jsx)(h.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),t=B(B({},le),{},{page:n>=0?n:0});z.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(ie,"/backfills/").concat(K,"?").concat((0,R.uM)(t)))},page:Number(e),totalPages:Math.ceil(fe/40)})})]})}),[oe,K,pe,ie,le,z,be,de,fe]),je=(0,s.useState)(I.G7[0]),xe=je[0],ge=je[1],Ze=(0,o.Db)(P.ZP.backfills.useUpdate(K),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(){i(),oe()},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),ye=(0,r.Z)(Ze,2),Oe=ye[0],ke=ye[1].isLoading,_e=(0,s.useMemo)((function(){return!!ee&&(d.rn.CANCELLED!==ee&&d.rn.FAILED!==ee)}),[ee]),Pe=(0,s.useMemo)((function(){return ee&&d.rn.CANCELLED!==ee&&d.rn.FAILED!==ee&&d.rn.INITIAL!==ee&&d.rn.RUNNING!==ee}),[ee]),Ie=(0,s.useMemo)((function(){var e={default:!0,size:1.5*D.iI},n=[[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.VW,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Backfill type"})]},"backfill_type_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:W?d._7:d.VV},"backfill_type")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.rs,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Status"})]},"backfill_status_label"),(0,H.jsx)(_.ZP,{danger:d.rn.CANCELLED===ee||d.rn.FAILED==ee,default:d.rn.INITIAL===ee,monospace:!0,muted:!ee,success:d.rn.RUNNING===ee||d.rn.COMPLETED===ee,children:ee||"inactive"},"backfill_status")]];return W||n.push.apply(n,[[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.aw,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Start date and time"})]},"backfill_start_date_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:(0,T.Vx)($)},"backfill_start_date")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.aw,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"End date and time"})]},"backfill_end_date_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:(0,T.Vx)(J)},"backfill_end_date")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.Pf,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Interval type"})]},"interval_type_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:G&&(0,E.kC)(G)},"interval_type")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.Pf,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Interval units"})]},"interval_units_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:q},"interval_units")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.qZ,B({},e)),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Total runs"})]},"total_runs_label"),(0,H.jsx)(_.ZP,{monospace:!0,children:ne},"total_runs")]]),(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:n})}),[W,J,G,q,$,ee,ne]),we=(0,s.useMemo)((function(){return re||{}}),[re]),Se=(0,s.useMemo)((function(){var e,n=[];return(0,L.Qr)(we)?n=(0,N.wx)(c,(function(e){return e.uuid===g.C})):Object.entries(we).forEach((function(e){var t=(0,r.Z)(e,2),i=t[0],l=t[1];n.push({uuid:i,value:(0,N.FS)(l)})})),"undefined"!==typeof n&&null!==(e=n)&&void 0!==e&&e.length?(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,H.jsx)(_.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,H.jsx)(_.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[we,c]);return(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(m.Z,{afterHidden:!be,before:(0,H.jsxs)(S.M,{children:[(0,H.jsxs)(y.Z,{mb:D.HN,pt:D.cd,px:D.cd,children:[(0,H.jsx)(y.Z,{mb:D.cd,children:(0,H.jsx)(w.yg,{size:5*D.iI})}),(0,H.jsx)(b.Z,{children:X})]}),(0,H.jsx)(y.Z,{px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ie,Se&&(0,H.jsxs)(y.Z,{my:D.HN,children:[(0,H.jsx)(y.Z,{px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Runtime variables"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),Se]})]}),beforeWidth:34*D.iI,breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(ie,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return X},linkProps:{as:"/pipelines/".concat(ie,"/backfills/").concat(K),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],buildSidekick:function(e){return(0,I.ZP)(B(B({},e),{},{selectedRun:be,selectedTab:xe,setSelectedTab:ge}))},errors:t,pageName:C.M.BACKFILLS,pipeline:l,setErrors:a,subheader:(0,H.jsxs)(v.Z,{alignItems:"center",children:[!Pe&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(p.Z,{beforeIcon:_e?(0,H.jsx)(w.dz,{size:2*D.iI}):(0,H.jsx)(w.Py,{inverted:!(d.rn.CANCELLED===ee||d.rn.FAILED===ee),size:2*D.iI}),danger:_e,disabled:ue,loading:ke,onClick:function(e){(0,A.j)(e),Oe({backfill:{status:_e?d.rn.CANCELLED:d.rn.INITIAL}})},outline:!0,success:!_e&&!(d.rn.CANCELLED===ee||d.rn.FAILED===ee)&&!ue,children:_e?"Cancel backfill":d.rn.CANCELLED===ee||d.rn.FAILED===ee?"Retry backfill":"Start backfill"}),(0,H.jsx)(y.Z,{mr:D.cd})]}),!V&&(0,H.jsxs)(H.Fragment,{children:[ee===x.VO.COMPLETED?(0,H.jsx)(_.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}):(0,H.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(ie,"/backfills/").concat(K,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit backfill"}),(0,H.jsx)(y.Z,{mr:D.cd})]}),!de&&(0,H.jsxs)(Z.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?z.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(ie,"/backfills/").concat(K)):(0,M.u7)({page:0,status:e.target.value})},paddingRight:4*D.iI,placeholder:"Select run status",value:(null===le||void 0===le?void 0:le.status)||"all",children:[(0,H.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(x.VO).map((function(e){return(0,H.jsx)("option",{value:e,children:x.Do[e]},e)}))]})]}),title:function(){return X},uuid:"backfill/detail",children:[(0,H.jsx)(y.Z,{mt:D.cd,px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Runs for this backfill"})}),(0,H.jsx)(f.Z,{light:!0,mt:D.cd,short:!0}),se?me:(0,H.jsx)(y.Z,{m:2,children:(0,H.jsx)(O.Z,{inverted:!0})})]})})},Y=t(2713),W=t(47999),J=t(93461),K=t(82944),G=[{label:function(){return"Date and time window"},description:function(){return"Backfill between a date and time range."},uuid:d.VV}],q=t(18025);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 Q(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,l.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 $=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,a=e.setErrors,c=(e.variables,(0,u.useRouter)()),h=(0,s.useState)(),j=h[0],x=h[1],g=j||{},O=g.block_uuid,I=g.id,S=g.interval_type,M=g.interval_units,F=(g.end_datetime,g.start_datetime,g.name),A=l.uuid,R=(0,s.useState)({}),V=R[0],B=(R[1],(0,s.useState)(O?d._7:d.VV)),z=B[0],X=B[1],$=(0,s.useState)(!1),ee=$[0],ne=$[1],te=(0,s.useState)(!1),re=te[0],ie=te[1],le=(0,s.useState)(null),ae=le[0],ce=le[1],se=(0,s.useState)(null),oe=se[0],ue=se[1],de=(0,s.useState)({hour:"00",minute:"00"}),pe=de[0],fe=de[1],ve=(0,s.useState)({hour:"00",minute:"00"}),be=ve[0],he=ve[1];(0,s.useEffect)((function(){if(n){x(n);var e=n.start_datetime;if(e){var t=e.split(" ")[1];ue((0,T.eI)(e)),he({hour:t.substring(0,2),minute:t.substring(3,5)})}var r=n.end_datetime;if(r){var i=r.split(" ")[1];ce((0,T.eI)(r)),fe({hour:i.substring(0,2),minute:i.substring(3,5)})}}}),[n]);var me=(0,s.useMemo)((function(){var e=[[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.KJ,{default:!0,size:1.5*D.iI}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Backfill name"})]},"model_name_detail"),(0,H.jsx)(K.Z,{monospace:!0,onChange:function(e){e.preventDefault(),x((function(n){return Q(Q({},n),{},{name:e.target.value})}))},placeholder:"Name this backfill",value:F},"model_name_input_detail")]];return d.VV===z&&e.push.apply(e,[[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.aw,{default:!0,size:1.5*D.iI}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!ee&&(0,H.jsx)(K.Z,{monospace:!0,onClick:function(){return ne((function(e){return!e}))},onFocus:function(){return ne(!0)},placeholder:"YYYY-MM-DD HH:MM",value:oe?"".concat(oe.toISOString().split("T")[0]," ").concat(null===be||void 0===be?void 0:be.hour,":").concat(null===be||void 0===be?void 0:be.minute):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(W.Z,{disableEscape:!0,onClickOutside:function(){return ne(!1)},open:ee,style:{position:"relative"},children:(0,H.jsx)(Y.Z,{selectedDate:oe,selectedTime:be,setSelectedDate:ue,setSelectedTime:he,topPosition:!0})})})]},"start_time_input")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.aw,{default:!0,size:1.5*D.iI}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"End date and time"})]},"end_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!re&&(0,H.jsx)(K.Z,{monospace:!0,onClick:function(){return ie((function(e){return!e}))},onFocus:function(){return ie(!0)},placeholder:"YYYY-MM-DD HH:MM",value:ae?"".concat(ae.toISOString().split("T")[0]," ").concat(null===pe||void 0===pe?void 0:pe.hour,":").concat(null===pe||void 0===pe?void 0:pe.minute):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(W.Z,{disableEscape:!0,onClickOutside:function(){return ie(!1)},open:re,style:{position:"relative"},children:(0,H.jsx)(Y.Z,{selectedDate:ae,selectedTime:pe,setSelectedDate:ce,setSelectedTime:fe,topPosition:!0})})})]},"end_time_input")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.Pf,{default:!0,size:1.5*D.iI}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Interval type"})]},"interval_type"),(0,H.jsx)(Z.Z,{monospace:!0,onChange:function(e){e.preventDefault(),x((function(n){return Q(Q({},n),{},{interval_type:e.target.value})}))},placeholder:"Time spacing between each backfill",value:S,children:d.IB.map((function(e){return(0,H.jsx)("option",{value:e,children:(0,E.kC)(e)},e)}))},"interval_type_input")],[(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(w.Pf,{default:!0,size:1.5*D.iI}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(_.ZP,{default:!0,children:"Interval units"})]},"interval_units"),(0,H.jsx)(K.Z,{disabled:!S,monospace:!0,onChange:function(e){e.preventDefault(),x((function(n){return Q(Q({},n),{},{interval_units:e.target.value})}))},placeholder:S?"Number of ".concat(S).concat(S!==d.I7.CUSTOM?"s":""," between each backfill"):"Interval type is required",type:"number",value:M},"interval_unit_input")]]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y.Z,{mb:2,px:D.cd,children:(0,H.jsx)(b.Z,{children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,short:!0}),(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:e})]})}),[ae,oe,S,M,F,z,ee,re,pe,be]),je=(0,o.Db)(P.ZP.backfills.useUpdate(I),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(){i(),c.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(A,"/backfills/").concat(I))},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),xe=(0,r.Z)(je,2),ge=xe[0],Ze=xe[1].isLoading,ye=(0,s.useCallback)((function(){var e=Q(Q({},(0,L.GL)(j,["name"])),{},{end_datetime:null,interval_type:null,interval_units:null,start_datetime:null,variables:(0,N.e7)(V)});return d._7===z||(e.interval_type=S,e.interval_units=M,e.end_datetime=ae&&null!==pe&&void 0!==pe&&pe.hour&&null!==pe&&void 0!==pe&&pe.minute?"".concat(ae.toISOString().split("T")[0]," ").concat(null===pe||void 0===pe?void 0:pe.hour,":").concat(null===pe||void 0===pe?void 0:pe.minute,":00"):null,e.start_datetime=oe&&null!==be&&void 0!==be&&be.hour&&null!==be&&void 0!==be&&be.minute?"".concat(oe.toISOString().split("T")[0]," ").concat(null===be||void 0===be?void 0:be.hour,":").concat(null===be||void 0===be?void 0:be.minute,":00"):null),ge({backfill:e})}),[ae,oe,S,M,j,V,z,pe,be]),Oe=(0,s.useMemo)((function(){return d._7===z?!O:!(ae&&oe&&S&&M)}),[O,ae,oe,S,M,z,pe,be]);return(0,H.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(A,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return null===j||void 0===j?void 0:j.name},linkProps:{as:"/pipelines/".concat(A,"/backfills/").concat(I),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],errors:t,pageName:C.M.BACKFILLS,pipeline:l,setErrors:a,subheader:(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(p.Z,{disabled:Oe,loading:Ze,onClick:ye,outline:!0,primary:!0,children:"Save changes"}),(0,H.jsx)(y.Z,{mr:1}),(0,H.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/backfills/[...slug]",as:"/pipelines/".concat(A,"/backfills/").concat(I)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===j||void 0===j?void 0:j.name)},uuid:"backfill/edit",children:[(0,H.jsxs)(y.Z,{p:D.cd,children:[(0,H.jsxs)(y.Z,{mb:2,children:[(0,H.jsx)(b.Z,{children:"Backfill type"}),(0,H.jsx)(_.ZP,{muted:!0,children:"How would you like this pipeline to be backfilled?"})]}),(0,H.jsx)(v.Z,{children:G.map((function(e){var n=e.label,t=e.description,r=e.uuid,i=z===r,l=z&&!i;return(0,H.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){X(r)},children:(0,H.jsx)(q.U,{selected:i,children:(0,H.jsxs)(v.Z,{alignItems:"center",children:[(0,H.jsx)(J.Z,{children:(0,H.jsx)("input",{checked:i,type:"radio"})}),(0,H.jsx)(y.Z,{mr:D.cd}),(0,H.jsxs)(J.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,H.jsx)(b.Z,{bold:!0,default:!i&&!l,level:5,muted:!i&&l,children:n()}),(0,H.jsx)(_.ZP,{default:!i&&!l,leftAligned:!0,muted:l,children:t()})]})]})})},r)}))})]}),(0,H.jsx)(y.Z,{mt:5,children:me})]})},ee=t(41788);function ne(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function te(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ne(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ne(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function re(e){var n=e.backfillId,t=e.pipelineUUID,r=e.subpath,i=(0,s.useState)(null),l=i[0],a=i[1],c=P.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,o=(0,s.useMemo)((function(){return null===c||void 0===c?void 0:c.variables}),[c]),u=P.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=(0,s.useMemo)((function(){return te(te({},null===u||void 0===u?void 0:u.pipeline),{},{uuid:t})}),[u,t]),p=P.ZP.backfills.detail(n,{include_preview_runs:!0}),f=p.data,v=p.mutate,b=(0,s.useMemo)((function(){return null===f||void 0===f?void 0:f.backfill}),[f]);return"edit"===r?(0,H.jsx)($,{backfill:b,errors:l,fetchBackfill:v,pipeline:d,setErrors:a,variables:o}):(0,H.jsx)(z,{backfill:b,errors:l,fetchBackfill:v,pipeline:d,setErrors:a,variables:o})}re.getInitialProps=function(){var e=(0,i.Z)(c().mark((function e(n){var t,i,l,a,s,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,i=t.pipeline,l=t.slug,!Array.isArray(l)){e.next=4;break}return a=(0,r.Z)(l,2),s=a[0],o=a[1],e.abrupt("return",{backfillId:s,pipelineUUID:i,subpath:o});case 4:return e.abrupt("return",{pipelineUUID:i});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var ie=(0,ee.Z)(re)},53664:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills/[...slug]",function(){return t(12625)}])}},function(e){e.O(0,[844,7607,5896,4804,1774,9350,5872,4495,1424,1005,7815,547,6694,3752,1286,8312,9774,2888,179],(function(){return n=53664,e(e.s=n);var n}));var n=e.O();_N_E=n}]);