"use strict";(self.webpackChunk_bull_board_ui=self.webpackChunk_bull_board_ui||[]).push([["44067"],{66485:function(e,t,l){l.d(t,{n:function(){return n}});let n={latest:"latest",active:"active",waiting:"waiting",waitingChildren:"waiting-children",prioritized:"prioritized",completed:"completed",failed:"failed",delayed:"delayed",paused:"paused"}},93065:function(e,t,l){l.d(t,{Z:()=>i});var n=l("52322"),s=l("6277");l("2784");let r="card-xqyZlH",i=e=>{let{children:t,className:l}=e;return(0,n.jsx)("div",{className:(0,s.Z)(r,l),children:t})}},37354:function(e,t,l){l.d(t,{g:()=>a});var n=l("52322"),s=l("6277");l("2784");let r="field-JbAWJt",i="inline-vXG0Za",a=e=>{let{label:t,id:l,inline:a,children:c}=e;return(0,n.jsxs)("div",{className:(0,s.Z)(r,{[i]:a}),children:[!!t&&!a&&(0,n.jsx)("label",{htmlFor:l,children:t}),c,!!t&&a&&(0,n.jsx)("label",{htmlFor:l,children:t})]})}},39278:function(e,t,l){l.d(t,{U:function(){return r}});var n=l(52322);l(2784);var s=l(37354);let r=e=>{let{label:t,id:l,...r}=e;return(0,n.jsx)(s.g,{label:t,id:l,children:(0,n.jsx)("input",{id:l,type:"text",...r})})}},4930:function(e,t,l){l.d(t,{Y:function(){return s}});var n=l(52322);l(2784);let s=()=>(0,n.jsx)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 512",children:(0,n.jsx)("path",{d:"M231.293 473.899l19.799-19.799c4.686-4.686 4.686-12.284 0-16.971L70.393 256 251.092 74.87c4.686-4.686 4.686-12.284 0-16.971L231.293 38.1c-4.686-4.686-12.284-4.686-16.971 0L4.908 247.515c-4.686 4.686-4.686 12.284 0 16.971L214.322 473.9c4.687 4.686 12.285 4.686 16.971-.001z"})})},34372:function(e,t,l){l.d(t,{f:function(){return s}});var n=l(52322);l(2784);let s=()=>(0,n.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,n.jsx)("path",{d:"M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"})})},74154:function(e,t,l){l.d(t,{o:function(){return s}});var n=l(52322);l(2784);let s=()=>(0,n.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,n.jsx)("path",{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"})})},25156:function(e,t,l){l.d(t,{m:function(){return s}});var n=l(52322);l(2784);let s=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,n.jsx)("path",{d:"M15 17v-2.99A4 4 0 0 0 11 10H8v5L2 9l6-6v5h3a6 6 0 0 1 6 6v3h-2z"})})},17500:function(e,t,l){l.d(t,{O:function(){return s}});var n=l(52322);l(2784);let s=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,n.jsx)("path",{d:"M5 4a2 2 0 0 0-2 2v6H0l4 4 4-4H5V6h7l2-2H5zm10 4h-3l4-4 4 4h-3v6a2 2 0 0 1-2 2H6l2-2h7V8z"})})},2054:function(e,t,l){l.d(t,{X:function(){return s}});var n=l(52322);l(2784);let s=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,n.jsx)("path",{d:"M6 2l2-2h4l2 2h4v2H2V2h4zM3 6h14l-1 14H4L3 6zm5 2v10h1V8H8zm3 0v10h1V8h-1z"})})},6294:function(e,t,l){l.d(t,{t:()=>ej});var n=l("52322"),s=l("66485"),r=l("2784"),i=l("59382"),a=l("47933"),c=l("93065");let o=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,n.jsx)("path",{d:"M207.029 381.476 12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"})});var d=l("20666");let u=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,n.jsx)("path",{d:"M241 130.5l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9l-22.7 22.7c-9.4 9.4-24.5 9.4-33.9 0L224 227.5 69.3 381.5c-9.4 9.3-24.5 9.3-33.9 0l-22.7-22.7c-9.4-9.4-9.4-24.6 0-33.9L207 130.5C216.4 121.2 231.6 121.2 241 130.5z"})});var h=l("47549"),p=l("17260"),x=l("49638");let m="details-LkCTWS",j="tabActions-fF3v6_",v="tabContent-qmHNgq";var g=l("6277"),f=l("37567");let w=void 0!==window.Worker,b=null,y=new Map;async function L(e,t){if(w)return!b&&((b=new Worker(new URL(l.p+l.u("16651"),l.b),Object.assign({},{name:"highlight-worker"},{type:void 0}))).onmessage=e=>{let{data:t}=e,{id:l,code:n}=t;if(y.has(l)){let{resolve:e}=y.get(l);e(n)}}),new Promise((l,n)=>{let s=(0,f.x0)(5);null==b||b.postMessage({id:s,code:e,language:t}),y.set(s,{resolve:e=>{y.delete(s),l(e)},reject:()=>{y.delete(s),n()}}),setTimeout(()=>n(),6e4)});{let{highlighter:n}=await Promise.all([l.e("85093"),l.e("54183")]).then(l.bind(l,98827));return n.highlightAuto(e,[t]).value||""}}let O="codeContainerWrapper-ZpYBAP",N="copyBtn-vLoi5u",B=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:(0,n.jsx)("path",{d:"M280 64l40 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l40 0 9.6 0C121 27.5 153.3 0 192 0s71 27.5 78.4 64l9.6 0zM64 112c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16l-16 0 0 24c0 13.3-10.7 24-24 24l-88 0-88 0c-13.3 0-24-10.7-24-24l0-24-16 0zm128-8a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"})}),C=e=>{let{language:t,text:l}=e,[s,i]=(0,r.useState)("");return(0,r.useEffect)(()=>{let e=!1;return L(l,t).then(t=>{!e&&i(t)}),()=>{e=!0}},[t,l]),(0,n.jsxs)("div",{className:O,children:[(0,n.jsx)("pre",{children:(0,n.jsx)("code",{className:(0,g.Z)("hljs",t),dangerouslySetInnerHTML:{__html:s}})}),(0,n.jsx)(h.z,{onClick:()=>{navigator.clipboard.writeText(l??"")},className:N,children:(0,n.jsx)(B,{})})]})};var J=l("68138"),T=l("39278"),A=l("75439"),S=l("34372"),I=l("74154");let E={jobLogs:"jobLogs-MsL4aJ",preWrapper:"preWrapper-V9RpQs",toolbar:"toolbar-duDU2f",searchBar:"searchBar-N4o70g",logLineCopyButton:"logLineCopyButton-LnHhmG"},D=e=>{var t,l;let n=null===(l=e.message)||void 0===l?void 0:null===(t=l.match(/((info|warn|error)?):/i))||void 0===t?void 0:t[1];return null==n?void 0:n.toLowerCase()},z=e=>async()=>e&&document.fullscreenElement!==e?await e.requestFullscreen():document.exitFullscreen(),R=e=>{navigator.clipboard.writeText(e.message)},k=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return!t||RegExp(`${t}`,"i").test(e.message)};function M(e){return e.map((e,t)=>({message:e,lineNumber:t+1}))}let _=e=>{let{actions:t,job:l}=e,{t:s}=(0,i.$G)(),[a,c]=(0,r.useState)([]),[o,d]=(0,r.useState)(!1),[u,p]=(0,r.useState)(""),x=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=!0;return t.getJobLogs().then(t=>{e&&c(M(t))}),()=>{e=!1}},[]),(0,J.Y)(async()=>{var e;let l=null===(e=x.current)||void 0===e?void 0:e.querySelector(`.${E.preWrapper}`);c(M(await t.getJobLogs())),requestAnimationFrame(()=>{null==l||l.scrollTo({top:null==l?void 0:l.scrollHeight,behavior:"smooth"})})},o?2500:null);let m=a.filter(e=>k(e,u));return(0,n.jsxs)("div",{className:E.jobLogs,ref:x,children:[(0,n.jsxs)("ul",{className:E.toolbar,children:[(0,n.jsx)("li",{children:(0,n.jsx)("form",{onSubmit:e=>{var t,l;p((null===(l=e.currentTarget)||void 0===l?void 0:null===(t=l.searchQuery)||void 0===t?void 0:t.value)||""),e.preventDefault()},children:(0,n.jsx)(T.U,{className:E.searchBar,name:"searchQuery",type:"search",placeholder:s("JOB.LOGS.FILTER_PLACEHOLDER"),onChange:e=>{var t;!(null===(t=e.currentTarget)||void 0===t?void 0:t.value)&&p("")}})})}),!l.finishedOn&&(0,n.jsx)("li",{children:(0,n.jsx)(h.z,{isActive:o,onClick:()=>{d(!o)},children:o?(0,n.jsx)(S.f,{}):(0,n.jsx)(I.o,{})})}),(0,n.jsx)("li",{children:(0,n.jsx)(h.z,{onClick:z(x.current),children:(0,n.jsx)(A.$,{})})}),(0,n.jsx)("li",{children:(0,n.jsx)(h.z,{onClick:()=>{let e=m.map(e=>e.message).join("\n");navigator.clipboard.writeText(e)},children:(0,n.jsx)(B,{})})})]}),(0,n.jsx)("div",{className:E.preWrapper,children:(0,n.jsx)("pre",{children:(0,n.jsx)("ol",{style:{paddingInlineStart:`${`${m.length}`.length+1}ch`},children:m.map(e=>(0,n.jsxs)("li",{className:D(e),"data-line-number":`${e.lineNumber}.`,children:[e.message,(0,n.jsx)(h.z,{onClick:()=>R(e),className:E.logLineCopyButton,tabIndex:-1,children:(0,n.jsx)(B,{})})]},e.lineNumber))})})})]})},H=e=>{let{selectedTab:t,job:l,actions:s}=e,{t:a}=(0,i.$G)(),{collapseJobData:c,collapseJobOptions:u,collapseJobError:p}=(0,d.F)(),[x,m]=(0,r.useState)({data:!1,options:!1,error:!1}),{stacktrace:j,data:v,returnValue:g,opts:f,failedReason:w}=l;switch(t){case"Data":return c&&!x.data?(0,n.jsxs)(h.z,{onClick:()=>m({...x,data:!0}),children:[a("JOB.SHOW_DATA_BTN")," ",(0,n.jsx)(o,{})]}):(0,n.jsx)(C,{language:"json",text:JSON.stringify({jobData:v,returnValue:g},null,2)});case"Options":return u&&!x.options?(0,n.jsxs)(h.z,{onClick:()=>m({...x,options:!0}),children:[a("JOB.SHOW_OPTIONS_BTN")," ",(0,n.jsx)(o,{})]}):(0,n.jsx)(C,{language:"json",text:JSON.stringify(f,null,2)});case"Error":if(0===j.length)return(0,n.jsx)("div",{className:"error",children:w||a("JOB.NA")});return p&&!x.error?(0,n.jsxs)(h.z,{onClick:()=>m({...x,error:!0}),children:[a("JOB.SHOW_ERRORS_BTN")," ",(0,n.jsx)(o,{})]}):(0,n.jsx)(C,{language:"stacktrace",text:j.join("\n")},"stacktrace");case"Logs":return(0,n.jsx)(_,{actions:s,job:l});default:return null}},F=e=>{let{status:t,job:l,actions:s}=e,{tabs:r,selectedTab:a}=(0,x.r)(t),{t:c}=(0,i.$G)();return 0===r.length?null:(0,n.jsxs)("div",{className:m,children:[(0,n.jsx)("ul",{className:j,children:r.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(h.z,{onClick:e.selectTab,isActive:e.isActive,children:c(`JOB.TABS.${e.title.toUpperCase()}`)})},e.title))}),(0,n.jsx)("div",{className:v,children:(0,n.jsx)(H,{selectedTab:a,job:l,actions:s})})]})};var W=l("25156"),$=l("17500"),Z=l("2054");let G="tooltip-QJB3Pz",K=e=>{let{title:t,children:l}=e;return(0,n.jsx)("span",{"data-title":t,className:G,children:l})},P="jobActions-XfoQK8",U="button-GXX8BV",Y={updateData:{titleKey:"UPDATE_DATA",Icon:()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,n.jsx)("path",{d:"M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"})}),actionKey:"updateJobData"},promote:{titleKey:"PROMOTE",Icon:W.m,actionKey:"promoteJob"},clean:{titleKey:"CLEAN",Icon:Z.X,actionKey:"cleanJob"},retry:{titleKey:"RETRY",Icon:$.O,actionKey:"retryJob"},duplicate:{titleKey:"DUPLICATE",Icon:()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,n.jsx)("path",{d:"M208 0L332.1 0c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9L448 336c0 26.5-21.5 48-48 48l-192 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48zM48 128l80 0 0 64-64 0 0 256 192 0 0-32 64 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 176c0-26.5 21.5-48 48-48z"})}),actionKey:"duplicateJob"}},V={[s.n.failed]:[Y.retry,Y.duplicate,Y.updateData,Y.clean],[s.n.delayed]:[Y.promote,Y.duplicate,Y.updateData,Y.clean],[s.n.completed]:[Y.duplicate,Y.retry,Y.clean],[s.n.waiting]:[Y.duplicate,Y.updateData,Y.clean],[s.n.paused]:[Y.duplicate,Y.updateData,Y.clean]},q=e=>{let{actions:t,status:l,allowRetries:s}=e,r=V[l],{t:a}=(0,i.$G)();return r?(!s&&(r=r.filter(e=>"retryJob"!==e.actionKey)),(0,n.jsx)("ul",{className:P,children:r.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(K,{title:a(`JOB.ACTIONS.${e.titleKey}`),children:(0,n.jsx)(h.z,{onClick:t[e.actionKey],className:U,children:(0,n.jsx)(e.Icon,{})})})},e.titleKey))})):null},X="progress-Rr7sCM",Q="failed-rTUpGj",ee="success-RY6h2q",et=e=>{let{progress:t,status:l,className:r,strokeWidth:i=6}=e,a="number"==typeof t?t:t.progress??null;if(!a)return null;let c={cx:"50%",cy:"50%",r:`calc(50% - ${i/2}px)`,strokeWidth:i,"transform-origin":"center"};return(0,n.jsxs)("svg",{className:(0,g.Z)(X,r),width:"100%",height:"100%",children:[(0,n.jsx)("circle",{...c}),(0,n.jsx)("circle",{className:(0,g.Z)({[Q]:l===s.n.failed,[ee]:l!==s.n.failed}),pathLength:100,strokeDasharray:100,strokeDashoffset:100-a,strokeLinejoin:"round",strokeLinecap:"round",transform:"rotate(-90)",...c}),(0,n.jsxs)("text",{textAnchor:"middle",dominantBaseline:"middle",x:"50%",y:"50%",children:[Math.round(a),"%"]})]})};var el=l("89192"),en=l("86626"),es=l("31794"),er=l("86544"),ei=l("77184"),ea=l("64068");let ec="timeline-lF9niS",eo="timelineWrapper-iZqG0C";var ed=l("15006");let eu=(e,t,l)=>{let n;if((0,el.Z)(e)){if(null==l?void 0:l.short)return(0,en.Z)(new Date(e),l.short);n={hour:"numeric",minute:"numeric",second:"numeric"}}else if((0,es.Z)(e,new Date)){if(null==l?void 0:l.common)return(0,en.Z)(new Date(e),l.common);n={month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"}}else{if(null==l?void 0:l.full)return(0,en.Z)(new Date(e),l.full);n={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"}}return new Intl.DateTimeFormat(t,n).format(e)},eh=(e,t,l)=>{let n=(0,er.Z)(e,t),s=n/1e3;return s>5?(0,ei.Z)(e,t,{includeSeconds:!0,locale:ea.Y}):s>=1?l("JOB.DURATION.SECS",{duration:s.toFixed(2)}):l("JOB.DURATION.MILLI_SECS",{duration:n})},ep=function(e){let{job:t,status:l}=e,{t:r,i18n:a}=(0,i.$G)(),c=(0,ed.p)().dateFormats||{};return(0,n.jsx)("div",{className:eo,children:(0,n.jsxs)("ul",{className:ec,children:[(0,n.jsxs)("li",{children:[(0,n.jsx)("small",{children:r("JOB.ADDED_AT")}),(0,n.jsx)("time",{children:eu(t.timestamp||0,a.language,c)})]}),!!t.delay&&t.delay>0&&l===s.n.delayed&&(0,n.jsxs)("li",{children:[(0,n.jsx)("small",{children:r("JOB.WILL_RUN_AT")}),(0,n.jsx)("time",{children:eu((t.timestamp||0)+(t.opts.delay||t.delay||0),a.language,c)}),t.delay!==t.opts.delay&&(0,n.jsxs)("small",{children:[r("JOB.DELAY_CHANGED")," "]})]}),!!t.processedOn&&(0,n.jsxs)("li",{children:[(0,n.jsxs)("small",{children:[!!t.delay&&t.delay>0&&r("JOB.DELAYED_FOR")+" ",eh(t.processedOn,t.timestamp||0,r)]}),(0,n.jsx)("small",{children:r("JOB.PROCESS_STARTED_AT")}),(0,n.jsx)("time",{children:eu(t.processedOn,a.language,c)}),!!t.processedBy&&(0,n.jsx)("small",{children:r("JOB.PROCESSED_BY",{processedBy:t.processedBy})})]}),!!t.finishedOn&&(0,n.jsxs)("li",{children:[(0,n.jsx)("small",{children:eh(t.finishedOn,t.processedOn||0,r)}),(0,n.jsx)("small",{children:r(t.isFailed&&l!==s.n.active?"JOB.FAILED_AT":"JOB.FINISHED_AT")}),(0,n.jsx)("time",{children:eu(t.finishedOn,a.language,c)})]})]})})},ex={card:"card-BRjpw_",contentWrapper:"contentWrapper-Aj9Wmy",title:"title-wDT4dB",sideInfo:"sideInfo-a9IFbv",header:"header-Lw4QCc",details:"details-JRsI9B",collapseBtn:"collapseBtn-J6rMz7",content:"content-SHI77x",progress:"progress-POOya3",jobLink:"jobLink-wmCWQg"},em=[s.n.active,s.n.completed],ej=e=>{var t,l,x,m,j,v;let{job:g,status:f,actions:w,readOnlyMode:b,allowRetries:y,jobUrl:L}=e,{t:O}=(0,i.$G)(),{collapseJob:N}=(0,d.F)(),[B,C]=r.useState(),J=!L||B||!N,T=N&&L,A=(0,n.jsxs)("h4",{children:[/^\d+$/.test(`${g.id}`)?"#":"",g.id]});return(0,n.jsx)(p.fC,{asChild:!0,open:J,children:(0,n.jsxs)(c.Z,{className:ex.card,children:[(0,n.jsxs)("div",{className:ex.header,children:[L?(0,n.jsx)(a.rU,{className:ex.jobLink,to:L,children:A}):A,T&&(0,n.jsx)(h.z,{className:ex.collapseBtn,onClick:()=>C(!J),children:J?(0,n.jsx)(u,{}):(0,n.jsx)(o,{})})]}),(0,n.jsx)(p.VY,{asChild:!0,children:(0,n.jsxs)("div",{className:ex.details,children:[(0,n.jsx)("div",{className:ex.sideInfo,children:(0,n.jsx)(ep,{job:g,status:f})}),(0,n.jsxs)("div",{className:ex.contentWrapper,children:[(0,n.jsxs)("div",{className:ex.title,children:[(0,n.jsxs)("h5",{children:[g.name,g.attempts>1&&(0,n.jsx)("span",{children:O("JOB.ATTEMPTS",{attempts:g.attempts})}),!!(null===(l=g.opts)||void 0===l?void 0:null===(t=l.repeat)||void 0===t?void 0:t.count)&&(0,n.jsx)("span",{children:O(`JOB.REPEAT${(null===(m=g.opts)||void 0===m?void 0:null===(x=m.repeat)||void 0===x?void 0:x.limit)?"_WITH_LIMIT":""}`,{count:g.opts.repeat.count,limit:null===(v=g.opts)||void 0===v?void 0:null===(j=v.repeat)||void 0===j?void 0:j.limit})})]}),!b&&(0,n.jsx)(q,{status:f,actions:w,allowRetries:y})]}),(0,n.jsxs)("div",{className:ex.content,children:[(0,n.jsx)(F,{status:f,job:g,actions:w}),(0,n.jsx)(et,{progress:g.progress,status:g.isFailed&&!em.includes(f)?s.n.failed:f,className:ex.progress})]})]})]})})]})})}},15927:function(e,t,l){l.d(t,{M:()=>r});var n=l("52322");l("2784");let s={stickyHeader:"stickyHeader-Woc0cg",actionContainer:"actionContainer-gipYSV"},r=e=>{let{actions:t,children:l}=e;return(0,n.jsxs)("div",{className:s.stickyHeader,children:[l,!!t&&(0,n.jsx)("div",{className:s.actionContainer,children:t})]})}},49638:function(e,t,l){l.d(t,{X:function(){return i},r:function(){return a}});var n=l(66485),s=l(2784),r=l(20666);let i=["Data","Options","Logs","Error"];function a(e){let[t,l]=(0,s.useState)([]),{defaultJobTab:a}=(0,r.F)(),[c,o]=(0,s.useState)(t.find(e=>e===a)||t[0]);return(0,s.useEffect)(()=>{let t=i.filter(e=>"Error"!==e);l(t=e===n.n.failed?["Error",...t]:[...t,"Error"])},[e]),(0,s.useEffect)(()=>{t.includes(a)&&e!==n.n.failed?o(a):o(t[0])},[a,t]),{tabs:null==t?void 0:t.map(e=>({title:e,isActive:e===c,selectTab:()=>o(e)})),selectedTab:c}}},59789:function(e,t,l){l.d(t,{t:()=>x});var n=l("59382"),s=l("9210"),r=l("85106"),i=l("7267"),a=l("48199"),c=l("1304"),o=l("58901"),d=l("68138"),u=l("95095"),h=l("20666");let p=(0,s.Ue)(e=>({job:null,status:"latest",loading:!0,updateJob:(t,l)=>e(()=>({job:t,status:l,loading:!1}))}));function x(){let e=(0,c.h)(),t=(0,a.u)(),l=function(){let{pathname:e}=(0,i.TH)(),t=(0,i.LX)(e,{path:["/queue/:name/:jobId"],exact:!1,strict:!1});return decodeURIComponent((null==t?void 0:t.params.jobId)||"")}(),{actions:{updateQueues:s}}=(0,u.y)(),{t:x}=(0,n.$G)(),{confirmJobActions:m,pollingInterval:j}=(0,h.F)(e=>{let{confirmJobActions:t,pollingInterval:l}=e;return{confirmJobActions:t,pollingInterval:l}}),{job:v,status:g,loading:f,updateJob:w}=p(e=>e),{openConfirm:b}=(0,o.N)(),y=()=>e.getJob(t,l).then(e=>{let{job:t,status:l}=e;return w(t,l)}),L=(0,r.G)(l?y:s,b);return{job:v,status:g,loading:f,actions:{getJob:y,pollJob:()=>(0,d.Y)(y,j>0?1e3*j:null,[t]),promoteJob:t=>l=>L(()=>e.promoteJob(t,l.id),x("JOB.ACTIONS.CONFIRM.PROMOTE"),m),cleanJob:t=>l=>L(()=>e.cleanJob(t,l.id),x("JOB.ACTIONS.CONFIRM.CLEAN"),m),getJobLogs:t=>l=>()=>e.getJobLogs(t,l.id),retryJob:(t,l)=>n=>L(()=>e.retryJob(t,n.id,l),x("JOB.ACTIONS.CONFIRM.RETRY"),m),updateJobData:(t,l,n)=>L(()=>e.updateJobData(t,l.id,n),"",!1)}}}}}]);