diff --git a/public/build/app.js b/public/build/app.js index 2903544c..ec39bbd1 100644 --- a/public/build/app.js +++ b/public/build/app.js @@ -100,4 +100,4 @@ z0.version="2.30.1";nm(K0);z0.fn=J;z0.min=KR;z0.max=GR;z0.now=JR;z0.utc=h2;z0.un `+p;var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(p)),M.appendChild(r)}}var Na={disableCSSInjection:!1,_enabled:typeof window<"u"&&typeof document<"u",_ensureLoaded:function(M){if(!this.disableCSSInjection){var p=M.getRootNode?M.getRootNode():document,n=p.host?p:document.head;au(n,Jl)}},acquireContext:function(M,p){typeof M=="string"?M=document.getElementById(M):M.length&&(M=M[0]),M&&M.canvas&&(M=M.canvas);var n=M&&M.getContext&&M.getContext("2d");return n&&n.canvas===M?(this._ensureLoaded(M),eu(M,p),n):null},releaseContext:function(M){var p=M.canvas;if(p[l1]){var n=p[l1].initial;["height","width"].forEach(function(r){var c=n[r];m.isNullOrUndef(c)?p.removeAttribute(r):p.setAttribute(r,c)}),m.each(n.style||{},function(r,c){p.style[c]=r}),p.width=p.width,delete p[l1]}},addEventListener:function(M,p,n){var r=M.canvas;if(p==="resize"){nu(r,n,M);return}var c=n[l1]||(n[l1]={}),O=c.proxies||(c.proxies={}),s=O[M.id+"_"+p]=function(l){n(ou(l,M))};no(r,p,s)},removeEventListener:function(M,p,n){var r=M.canvas;if(p==="resize"){ru(r);return}var c=n[l1]||{},O=c.proxies||{},s=O[M.id+"_"+p];s&&wp(r,p,s)}};m.addEvent=no,m.removeEvent=wp;var cu=Na._enabled?Na:Yl,ct=m.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},cu);Z._set("global",{plugins:{}});var V0={_plugins:[],_cacheId:0,register:function(M){var p=this._plugins;[].concat(M).forEach(function(n){p.indexOf(n)===-1&&p.push(n)}),this._cacheId++},unregister:function(M){var p=this._plugins;[].concat(M).forEach(function(n){var r=p.indexOf(n);r!==-1&&p.splice(r,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(M,p,n){var r=this.descriptors(M),c=r.length,O,s,l,A,f;for(O=0;O0){var O=M[0];O.label?n=O.label:O.xLabel?n=O.xLabel:c>0&&O.index-1?M.split(` `):M}function iu(M){var p=M._xScale,n=M._yScale||M._scale,r=M._index,c=M._datasetIndex,O=M._chart.getDatasetMeta(c).controller,s=O._getIndexScale(),l=O._getValueScale();return{xLabel:p?p.getLabelForIndex(r,c):"",yLabel:n?n.getLabelForIndex(r,c):"",label:s?""+s.getLabelForIndex(r,c):"",value:l?""+l.getLabelForIndex(r,c):"",index:r,datasetIndex:c,x:M._model.x,y:M._model.y}}function Ba(M){var p=Z.global;return{xPadding:M.xPadding,yPadding:M.yPadding,xAlign:M.xAlign,yAlign:M.yAlign,rtl:M.rtl,textDirection:M.textDirection,bodyFontColor:M.bodyFontColor,_bodyFontFamily:L2(M.bodyFontFamily,p.defaultFontFamily),_bodyFontStyle:L2(M.bodyFontStyle,p.defaultFontStyle),_bodyAlign:M.bodyAlign,bodyFontSize:L2(M.bodyFontSize,p.defaultFontSize),bodySpacing:M.bodySpacing,titleFontColor:M.titleFontColor,_titleFontFamily:L2(M.titleFontFamily,p.defaultFontFamily),_titleFontStyle:L2(M.titleFontStyle,p.defaultFontStyle),titleFontSize:L2(M.titleFontSize,p.defaultFontSize),_titleAlign:M.titleAlign,titleSpacing:M.titleSpacing,titleMarginBottom:M.titleMarginBottom,footerFontColor:M.footerFontColor,_footerFontFamily:L2(M.footerFontFamily,p.defaultFontFamily),_footerFontStyle:L2(M.footerFontStyle,p.defaultFontStyle),footerFontSize:L2(M.footerFontSize,p.defaultFontSize),_footerAlign:M.footerAlign,footerSpacing:M.footerSpacing,footerMarginTop:M.footerMarginTop,caretSize:M.caretSize,cornerRadius:M.cornerRadius,backgroundColor:M.backgroundColor,opacity:0,legendColorBackground:M.multiKeyBackground,displayColors:M.displayColors,borderColor:M.borderColor,borderWidth:M.borderWidth}}function Ou(M,p){var n=M._chart.ctx,r=p.yPadding*2,c=0,O=p.body,s=O.reduce(function(N,B){return N+B.before.length+B.lines.length+B.after.length},0);s+=p.beforeBody.length+p.afterBody.length;var l=p.title.length,A=p.footer.length,f=p.titleFontSize,q=p.bodyFontSize,W=p.footerFontSize;r+=l*f,r+=l?(l-1)*p.titleSpacing:0,r+=l?p.titleMarginBottom:0,r+=s*q,r+=s?(s-1)*p.bodySpacing:0,r+=A?p.footerMarginTop:0,r+=A*W,r+=A?(A-1)*p.footerSpacing:0;var L=0,_=function(N){c=Math.max(c,n.measureText(N).width+L)};return n.font=m.fontString(f,p._titleFontStyle,p._titleFontFamily),m.each(p.title,_),n.font=m.fontString(q,p._bodyFontStyle,p._bodyFontFamily),m.each(p.beforeBody.concat(p.afterBody),_),L=p.displayColors?q+2:0,m.each(O,function(N){m.each(N.before,_),m.each(N.lines,_),m.each(N.after,_)}),L=0,n.font=m.fontString(W,p._footerFontStyle,p._footerFontFamily),m.each(p.footer,_),c+=2*p.xPadding,{width:c,height:r}}function su(M,p){var n=M._model,r=M._chart,c=M._chart.chartArea,O="center",s="center";n.yr.height-p.height&&(s="bottom");var l,A,f,q,W,L=(c.left+c.right)/2,_=(c.top+c.bottom)/2;s==="center"?(l=function(B){return B<=L},A=function(B){return B>L}):(l=function(B){return B<=p.width/2},A=function(B){return B>=r.width-p.width/2}),f=function(B){return B+p.width+n.caretSize+n.caretPadding>r.width},q=function(B){return B-p.width-n.caretSize-n.caretPadding<0},W=function(B){return B<=_?"top":"bottom"},l(n.x)?(O="left",f(n.x)&&(O="center",s=W(n.y))):A(n.x)&&(O="right",q(n.x)&&(O="center",s=W(n.y)));var N=M._options;return{xAlign:N.xAlign?N.xAlign:O,yAlign:N.yAlign?N.yAlign:s}}function Au(M,p,n,r){var c=M.x,O=M.y,s=M.caretSize,l=M.caretPadding,A=M.cornerRadius,f=n.xAlign,q=n.yAlign,W=s+l,L=A+l;return f==="right"?c-=p.width:f==="center"&&(c-=p.width/2,c+p.width>r.width&&(c=r.width-p.width),c<0&&(c=0)),q==="top"?O+=W:q==="bottom"?O-=p.height+W:O-=p.height/2,q==="center"?f==="left"?c+=W:f==="right"&&(c-=W):f==="left"?c-=L:f==="right"&&(c+=L),{x:c,y:O}}function uM(M,p){return p==="center"?M.x+M.width/2:p==="right"?M.x+M.width-M.xPadding:M.x+M.xPadding}function Ta(M){return c2([],_2(M))}var du=r2.extend({initialize:function(){this._model=Ba(this._options),this._lastActive=[]},getTitle:function(){var M=this,p=M._options,n=p.callbacks,r=n.beforeTitle.apply(M,arguments),c=n.title.apply(M,arguments),O=n.afterTitle.apply(M,arguments),s=[];return s=c2(s,_2(r)),s=c2(s,_2(c)),s=c2(s,_2(O)),s},getBeforeBody:function(){return Ta(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(M,p){var n=this,r=n._options.callbacks,c=[];return m.each(M,function(O){var s={before:[],lines:[],after:[]};c2(s.before,_2(r.beforeLabel.call(n,O,p))),c2(s.lines,r.label.call(n,O,p)),c2(s.after,_2(r.afterLabel.call(n,O,p))),c.push(s)}),c},getAfterBody:function(){return Ta(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var M=this,p=M._options.callbacks,n=p.beforeFooter.apply(M,arguments),r=p.footer.apply(M,arguments),c=p.afterFooter.apply(M,arguments),O=[];return O=c2(O,_2(n)),O=c2(O,_2(r)),O=c2(O,_2(c)),O},update:function(M){var p=this,n=p._options,r=p._model,c=p._model=Ba(n),O=p._active,s=p._data,l={xAlign:r.xAlign,yAlign:r.yAlign},A={x:r.x,y:r.y},f={width:r.width,height:r.height},q={x:r.caretX,y:r.caretY},W,L;if(O.length){c.opacity=1;var _=[],N=[];q=ya[n.position].call(p,O,p._eventPosition);var B=[];for(W=0,L=O.length;W0&&n.stroke()},draw:function(){var M=this._chart.ctx,p=this._view;if(p.opacity!==0){var n={width:p.width,height:p.height},r={x:p.x,y:p.y},c=Math.abs(p.opacity<.001)?0:p.opacity,O=p.title.length||p.beforeBody.length||p.body.length||p.afterBody.length||p.footer.length;this._options.enabled&&O&&(M.save(),M.globalAlpha=c,this.drawBackground(r,p,M,n),r.y+=p.yPadding,m.rtl.overrideTextDirection(M,p.textDirection),this.drawTitle(r,p,M),this.drawBody(r,p,M),this.drawFooter(r,p,M),m.rtl.restoreTextDirection(M,p.textDirection),M.restore())}},handleEvent:function(M){var p=this,n=p._options,r=!1;return p._lastActive=p._lastActive||[],M.type==="mouseout"?p._active=[]:(p._active=p._chart.getElementsAtEventForMode(M,n.mode,n),n.reverse&&p._active.reverse()),r=!m.arrayEquals(p._active,p._lastActive),r&&(p._lastActive=p._active,(n.enabled||n.custom)&&(p._eventPosition={x:M.x,y:M.y},p.update(!0),p.pivot())),r}}),lu=ya,Sp=du;Sp.positioners=lu;var xp=m.valueOrDefault;Z._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});function Xa(){return m.merge(Object.create(null),[].slice.call(arguments),{merger:function(M,p,n,r){if(M==="xAxes"||M==="yAxes"){var c=n[M].length,O,s,l;for(p[M]||(p[M]=[]),O=0;O=p[M].length&&p[M].push({}),!p[M][O].type||l.type&&l.type!==p[M][O].type?m.merge(p[M][O],[ao.getScaleDefaults(s),l]):m.merge(p[M][O],l)}else m._merger(M,p,n,r)}})}function kp(){return m.merge(Object.create(null),[].slice.call(arguments),{merger:function(M,p,n,r){var c=p[M]||Object.create(null),O=n[M];M==="scales"?p[M]=Xa(c,O):M==="scale"?p[M]=m.merge(c,[ao.getScaleDefaults(O.type),O]):m._merger(M,p,n,r)}})}function uu(M){M=M||Object.create(null);var p=M.data=M.data||{};return p.datasets=p.datasets||[],p.labels=p.labels||[],M.options=kp(Z.global,Z[M.type],M.options||{}),M}function fu(M){var p=M.options;m.each(M.scales,function(n){P1.removeBox(M,n)}),p=kp(Z.global,Z[M.config.type],p),M.options=M.config.options=p,M.ensureScalesHaveIDs(),M.buildOrUpdateScales(),M.tooltip._options=p.tooltips,M.tooltip.initialize()}function wa(M,p,n){var r,c=function(O){return O.id===r};do r=p+n++;while(m.findIndex(M,c)>=0);return r}function Ca(M){return M==="top"||M==="bottom"}function Ea(M,p){return function(n,r){return n[M]===r[M]?n[p]-r[p]:n[M]-r[M]}}var Y2=function(M,p){return this.construct(M,p),this};m.extend(Y2.prototype,{construct:function(M,p){var n=this;p=uu(p);var r=ct.acquireContext(M,p),c=r&&r.canvas,O=c&&c.height,s=c&&c.width;if(n.id=m.uid(),n.ctx=r,n.canvas=c,n.config=p,n.width=s,n.height=O,n.aspectRatio=O?s/O:null,n.options=p.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Y2.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(l){n.config.data=l}}),!r||!c){console.error("Failed to create chart: can't acquire context from the given item");return}n.initialize(),n.update()},initialize:function(){var M=this;return V0.notify(M,"beforeInit"),m.retinaScale(M,M.options.devicePixelRatio),M.bindEvents(),M.options.responsive&&M.resize(!0),M.initToolTip(),V0.notify(M,"afterInit"),M},clear:function(){return m.canvas.clear(this),this},stop:function(){return vp.cancelAnimation(this),this},resize:function(M){var p=this,n=p.options,r=p.canvas,c=n.maintainAspectRatio&&p.aspectRatio||null,O=Math.max(0,Math.floor(m.getMaximumWidth(r))),s=Math.max(0,Math.floor(c?O/c:m.getMaximumHeight(r)));if(!(p.width===O&&p.height===s)&&(r.width=p.width=O,r.height=p.height=s,r.style.width=O+"px",r.style.height=s+"px",m.retinaScale(p,n.devicePixelRatio),!M)){var l={width:O,height:s};V0.notify(p,"resize",[l]),n.onResize&&n.onResize(p,l),p.stop(),p.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var M=this.options,p=M.scales||{},n=M.scale;m.each(p.xAxes,function(r,c){r.id||(r.id=wa(p.xAxes,"x-axis-",c))}),m.each(p.yAxes,function(r,c){r.id||(r.id=wa(p.yAxes,"y-axis-",c))}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var M=this,p=M.options,n=M.scales||{},r=[],c=Object.keys(n).reduce(function(O,s){return O[s]=!1,O},{});p.scales&&(r=r.concat((p.scales.xAxes||[]).map(function(O){return{options:O,dtype:"category",dposition:"bottom"}}),(p.scales.yAxes||[]).map(function(O){return{options:O,dtype:"linear",dposition:"left"}}))),p.scale&&r.push({options:p.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),m.each(r,function(O){var s=O.options,l=s.id,A=xp(s.type,O.dtype);Ca(s.position)!==Ca(O.dposition)&&(s.position=O.dposition),c[l]=!0;var f=null;if(l in n&&n[l].type===A)f=n[l],f.options=s,f.ctx=M.ctx,f.chart=M;else{var q=ao.getScaleConstructor(A);if(!q)return;f=new q({id:l,type:A,options:s,ctx:M.ctx,chart:M}),n[f.id]=f}f.mergeTicksOptions(),O.isDefault&&(M.scale=f)}),m.each(c,function(O,s){O||delete n[s]}),M.scales=n,ao.addScalesToLayout(this)},buildOrUpdateControllers:function(){var M=this,p=[],n=M.data.datasets,r,c;for(r=0,c=n.length;r=0;--r)p.drawDataset(n[r],M);V0.notify(p,"afterDatasetsDraw",[M])}},drawDataset:function(M,p){var n=this,r={meta:M,index:M.index,easingValue:p};V0.notify(n,"beforeDatasetDraw",[r])!==!1&&(M.controller.draw(p),V0.notify(n,"afterDatasetDraw",[r]))},_drawTooltip:function(M){var p=this,n=p.tooltip,r={tooltip:n,easingValue:M};V0.notify(p,"beforeTooltipDraw",[r])!==!1&&(n.draw(),V0.notify(p,"afterTooltipDraw",[r]))},getElementAtEvent:function(M){return at.modes.single(this,M)},getElementsAtEvent:function(M){return at.modes.label(this,M,{intersect:!0})},getElementsAtXAxis:function(M){return at.modes["x-axis"](this,M,{intersect:!0})},getElementsAtEventForMode:function(M,p,n){var r=at.modes[p];return typeof r=="function"?r(this,M,n):[]},getDatasetAtEvent:function(M){return at.modes.dataset(this,M,{intersect:!0})},getDatasetMeta:function(M){var p=this,n=p.data.datasets[M];n._meta||(n._meta={});var r=n._meta[p.id];return r||(r=n._meta[p.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:M}),r},getVisibleDatasetCount:function(){for(var M=0,p=0,n=this.data.datasets.length;p=0;s--){var l=r[s];if(c(l))return l}},m.isNumber=function(r){return!isNaN(parseFloat(r))&&isFinite(r)},m.almostEquals=function(r,c,O){return Math.abs(r-c)=r},m.max=function(r){return r.reduce(function(c,O){return isNaN(O)?c:Math.max(c,O)},Number.NEGATIVE_INFINITY)},m.min=function(r){return r.reduce(function(c,O){return isNaN(O)?c:Math.min(c,O)},Number.POSITIVE_INFINITY)},m.sign=Math.sign?function(r){return Math.sign(r)}:function(r){return r=+r,r===0||isNaN(r)?r:r>0?1:-1},m.toRadians=function(r){return r*(Math.PI/180)},m.toDegrees=function(r){return r*(180/Math.PI)},m._decimalPlaces=function(r){if(m.isFinite(r)){for(var c=1,O=0;Math.round(r*c)/c!==r;)c*=10,O++;return O}},m.getAngleFromPoint=function(r,c){var O=c.x-r.x,s=c.y-r.y,l=Math.sqrt(O*O+s*s),A=Math.atan2(s,O);return A<-.5*Math.PI&&(A+=2*Math.PI),{angle:A,distance:l}},m.distanceBetweenPoints=function(r,c){return Math.sqrt(Math.pow(c.x-r.x,2)+Math.pow(c.y-r.y,2))},m.aliasPixel=function(r){return r%2===0?0:.5},m._alignPixel=function(r,c,O){var s=r.currentDevicePixelRatio,l=O/2;return Math.round((c-l)*s)/s+l},m.splineCurve=function(r,c,O,s){var l=r.skip?c:r,A=c,f=O.skip?c:O,q=Math.sqrt(Math.pow(A.x-l.x,2)+Math.pow(A.y-l.y,2)),W=Math.sqrt(Math.pow(f.x-A.x,2)+Math.pow(f.y-A.y,2)),L=q/(q+W),_=W/(q+W);L=isNaN(L)?0:L,_=isNaN(_)?0:_;var N=s*L,B=s*_;return{previous:{x:A.x-N*(f.x-l.x),y:A.y-N*(f.y-l.y)},next:{x:A.x+B*(f.x-l.x),y:A.y+B*(f.y-l.y)}}},m.EPSILON=Number.EPSILON||1e-14,m.splineCurveMonotone=function(r){var c=(r||[]).map(function(S){return{model:S._model,deltaK:0,mK:0}}),O=c.length,s,l,A,f;for(s=0;s0?c[s-1]:null,f=s0?c[s-1]:null,f=s=r.length-1?r[0]:r[c+1]:c>=r.length-1?r[r.length-1]:r[c+1]},m.previousItem=function(r,c,O){return O?c<=0?r[r.length-1]:r[c-1]:c<=0?r[0]:r[c-1]},m.niceNum=function(r,c){var O=Math.floor(m.log10(r)),s=r/Math.pow(10,O),l;return c?s<1.5?l=1:s<3?l=2:s<7?l=5:l=10:s<=1?l=1:s<=2?l=2:s<=5?l=5:l=10,l*Math.pow(10,O)},m.requestAnimFrame=function(){return typeof window>"u"?function(r){r()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(r){return window.setTimeout(r,1e3/60)}}(),m.getRelativePosition=function(r,c){var O,s,l=r.originalEvent||r,A=r.target||r.srcElement,f=A.getBoundingClientRect(),q=l.touches;q&&q.length>0?(O=q[0].clientX,s=q[0].clientY):(O=l.clientX,s=l.clientY);var W=parseFloat(m.getStyle(A,"padding-left")),L=parseFloat(m.getStyle(A,"padding-top")),_=parseFloat(m.getStyle(A,"padding-right")),N=parseFloat(m.getStyle(A,"padding-bottom")),B=f.right-f.left-W-_,S=f.bottom-f.top-L-N;return O=Math.round((O-f.left-W)/B*A.width/c.currentDevicePixelRatio),s=Math.round((s-f.top-L)/S*A.height/c.currentDevicePixelRatio),{x:O,y:s}};function M(r,c,O){var s;return typeof r=="string"?(s=parseInt(r,10),r.indexOf("%")!==-1&&(s=s/100*c.parentNode[O])):s=r,s}function p(r){return r!=null&&r!=="none"}function n(r,c,O){var s=document.defaultView,l=m._getParentNode(r),A=s.getComputedStyle(r)[c],f=s.getComputedStyle(l)[c],q=p(A),W=p(f),L=Number.POSITIVE_INFINITY;return q||W?Math.min(q?M(A,r,O):L,W?M(f,l,O):L):"none"}m.getConstraintWidth=function(r){return n(r,"max-width","clientWidth")},m.getConstraintHeight=function(r){return n(r,"max-height","clientHeight")},m._calculatePadding=function(r,c,O){return c=m.getStyle(r,c),c.indexOf("%")>-1?O*parseInt(c,10)/100:parseInt(c,10)},m._getParentNode=function(r){var c=r.parentNode;return c&&c.toString()==="[object ShadowRoot]"&&(c=c.host),c},m.getMaximumWidth=function(r){var c=m._getParentNode(r);if(!c)return r.clientWidth;var O=c.clientWidth,s=m._calculatePadding(c,"padding-left",O),l=m._calculatePadding(c,"padding-right",O),A=O-s-l,f=m.getConstraintWidth(r);return isNaN(f)?A:Math.min(A,f)},m.getMaximumHeight=function(r){var c=m._getParentNode(r);if(!c)return r.clientHeight;var O=c.clientHeight,s=m._calculatePadding(c,"padding-top",O),l=m._calculatePadding(c,"padding-bottom",O),A=O-s-l,f=m.getConstraintHeight(r);return isNaN(f)?A:Math.min(A,f)},m.getStyle=function(r,c){return r.currentStyle?r.currentStyle[c]:document.defaultView.getComputedStyle(r,null).getPropertyValue(c)},m.retinaScale=function(r,c){var O=r.currentDevicePixelRatio=c||typeof window<"u"&&window.devicePixelRatio||1;if(O!==1){var s=r.canvas,l=r.height,A=r.width;s.height=l*O,s.width=A*O,r.ctx.scale(O,O),!s.style.height&&!s.style.width&&(s.style.height=l+"px",s.style.width=A+"px")}},m.fontString=function(r,c,O){return c+" "+r+"px "+O},m.longestText=function(r,c,O,s){s=s||{};var l=s.data=s.data||{},A=s.garbageCollect=s.garbageCollect||[];s.font!==c&&(l=s.data={},A=s.garbageCollect=[],s.font=c),r.font=c;var f=0,q=O.length,W,L,_,N,B;for(W=0;WO.length){for(W=0;Ws&&(s=A),s},m.numberOfLabelLines=function(r){var c=1;return m.each(r,function(O){m.isArray(O)&&O.length>c&&(c=O.length)}),c},m.color=y0?function(r){return r instanceof CanvasGradient&&(r=Z.global.defaultColor),y0(r)}:function(r){return console.error("Color.js not found!"),r},m.getHoverColor=function(r){return r instanceof CanvasPattern||r instanceof CanvasGradient?r:m.color(r).saturate(.5).darken(.1).rgbString()}};function _e(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function fM(M){this.options=M||{}}m.extend(fM.prototype,{formats:_e,parse:_e,format:_e,add:_e,diff:_e,startOf:_e,endOf:_e,_create:function(M){return M}}),fM.override=function(M){m.extend(fM.prototype,M)};var Wu=fM,Dp={_date:Wu},co={formatters:{values:function(M){return m.isArray(M)?M:""+M},linear:function(M,p,n){var r=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&M!==Math.floor(M)&&(r=M-Math.floor(M));var c=m.log10(Math.abs(r)),O="";if(M!==0){var s=Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]));if(s<1e-4){var l=m.log10(Math.abs(M)),A=Math.floor(l)-Math.floor(c);A=Math.max(Math.min(A,20),0),O=M.toExponential(A)}else{var f=-1*Math.floor(c);f=Math.max(Math.min(f,20),0),O=M.toFixed(f)}}else O="0";return O},logarithmic:function(M,p,n){var r=M/Math.pow(10,Math.floor(m.log10(M)));return M===0?"0":r===1||r===2||r===5||p===0||p===n.length-1?M.toExponential():""}}},Ne=m.isArray,io=m.isNullOrUndef,ye=m.valueOrDefault,it=m.valueAtIndexOrDefault;Z._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:co.formatters.values,minor:{},major:{}}});function hu(M,p){for(var n=[],r=M.length/p,c=0,O=M.length;cl+A)))return O}function mu(M,p){m.each(M,function(n){var r=n.gc,c=r.length/2,O;if(c>p){for(O=0;OO)return l;return Math.max(O,1)}function _u(M){var p=[],n,r;for(n=0,r=M.length;n=O||r<=1||!M.isHorizontal()){M.labelRotation=c;return}l=M._getLabelSizes(),A=l.widest.width,f=l.highest.height-l.highest.offset,q=Math.min(M.maxWidth,M.chart.width-A),W=p.offset?M.maxWidth/r:q/(r-1),A+6>W&&(W=q/(r-(p.offset?.5:1)),L=M.maxHeight-Oo(p.gridLines)-n.padding-Pp(p.scaleLabel),_=Math.sqrt(A*A+f*f),s=m.toDegrees(Math.min(Math.asin(Math.min((l.highest.height+6)/W,1)),Math.asin(Math.min(L/_,1))-Math.asin(f/_))),s=Math.max(c,Math.min(O,s))),M.labelRotation=s},afterCalculateTickRotation:function(){m.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){m.callback(this.options.beforeFit,[this])},fit:function(){var M=this,p=M.minSize={width:0,height:0},n=M.chart,r=M.options,c=r.ticks,O=r.scaleLabel,s=r.gridLines,l=M._isVisible(),A=r.position==="bottom",f=M.isHorizontal();if(f?p.width=M.maxWidth:l&&(p.width=Oo(s)+Pp(O)),f?l&&(p.height=Oo(s)+Pp(O)):p.height=M.maxHeight,c.display&&l){var q=Ip(c),W=M._getLabelSizes(),L=W.first,_=W.last,N=W.widest,B=W.highest,S=q.minor.lineHeight*.4,V=c.padding;if(f){var i0=M.labelRotation!==0,s0=m.toRadians(M.labelRotation),R0=Math.cos(s0),m0=Math.sin(s0),x0=m0*N.width+R0*(B.height-(i0?B.offset:0))+(i0?0:S);p.height=Math.min(M.maxHeight,p.height+x0+V);var X0=M.getPixelForTick(0)-M.left,j0=M.right-M.getPixelForTick(M.getTicks().length-1),Y0,c1;i0?(Y0=A?R0*L.width+m0*L.offset:m0*(L.height-L.offset),c1=A?m0*(_.height-_.offset):R0*_.width+m0*_.offset):(Y0=L.width/2,c1=_.width/2),M.paddingLeft=Math.max((Y0-X0)*M.width/(M.width-X0),0)+3,M.paddingRight=Math.max((c1-j0)*M.width/(M.width-j0),0)+3}else{var r1=c.mirror?0:N.width+V+S;p.width=Math.min(M.maxWidth,p.width+r1),M.paddingTop=L.height/2,M.paddingBottom=_.height/2}}M.handleMargins(),f?(M.width=M._length=n.width-M.margins.left-M.margins.right,M.height=p.height):(M.width=p.width,M.height=M._length=n.height-M.margins.top-M.margins.bottom)},handleMargins:function(){var M=this;M.margins&&(M.margins.left=Math.max(M.paddingLeft,M.margins.left),M.margins.top=Math.max(M.paddingTop,M.margins.top),M.margins.right=Math.max(M.paddingRight,M.margins.right),M.margins.bottom=Math.max(M.paddingBottom,M.margins.bottom))},afterFit:function(){m.callback(this.options.afterFit,[this])},isHorizontal:function(){var M=this.options.position;return M==="top"||M==="bottom"},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(M){if(io(M))return NaN;if((typeof M=="number"||M instanceof Number)&&!isFinite(M))return NaN;if(M){if(this.isHorizontal()){if(M.x!==void 0)return this.getRightValue(M.x)}else if(M.y!==void 0)return this.getRightValue(M.y)}return M},_convertTicksToLabels:function(M){var p=this,n,r,c;for(p.ticks=M.map(function(O){return O.value}),p.beforeTickToLabelConversion(),n=p.convertTicksToLabels(M)||p.ticks,p.afterTickToLabelConversion(),r=0,c=M.length;rr-1?null:p.getPixelForDecimal(M*c+(n?c/2:0))},getPixelForDecimal:function(M){var p=this;return p._reversePixels&&(M=1-M),p._startPixel+M*p._length},getDecimalForPixel:function(M){var p=(M-this._startPixel)/this._length;return this._reversePixels?1-p:p},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var M=this,p=M.min,n=M.max;return M.beginAtZero?0:p<0&&n<0?n:p>0&&n>0?p:0},_autoSkip:function(M){var p=this,n=p.options.ticks,r=p._length,c=n.maxTicksLimit||r/p._tickSize()+1,O=n.major.enabled?_u(M):[],s=O.length,l=O[0],A=O[s-1],f,q,W,L;if(s>c)return Nu(M,O,s/c),$p(M);if(W=Lu(O,M,r,c),s>0){for(f=0,q=s-1;f1?(A-l)/(s-1):null,qM(M,W,m.isNullOrUndef(L)?0:l-L,l),qM(M,W,A,m.isNullOrUndef(L)?M.length:A+L),$p(M)}return qM(M,W),$p(M)},_tickSize:function(){var M=this,p=M.options.ticks,n=m.toRadians(M.labelRotation),r=Math.abs(Math.cos(n)),c=Math.abs(Math.sin(n)),O=M._getLabelSizes(),s=p.autoSkipPadding||0,l=O?O.widest.width+s:0,A=O?O.highest.height+s:0;return M.isHorizontal()?A*r>l*c?l/r:A/c:A*c=0&&(O=l)),c!==void 0&&(l=p.indexOf(c),l>=0&&(s=l)),M.minIndex=O,M.maxIndex=s,M.min=p[O],M.max=p[s]},buildTicks:function(){var M=this,p=M._getLabels(),n=M.minIndex,r=M.maxIndex;M.ticks=n===0&&r===p.length-1?p:p.slice(n,r+1)},getLabelForIndex:function(M,p){var n=this,r=n.chart;return r.getDatasetMeta(p).controller._getValueScaleId()===n.id?n.getRightValue(r.data.datasets[p].data[M]):n._getLabels()[M]},_configure:function(){var M=this,p=M.options.offset,n=M.ticks;m1.prototype._configure.call(M),M.isHorizontal()||(M._reversePixels=!M._reversePixels),n&&(M._startValue=M.minIndex-(p?.5:0),M._valueRange=Math.max(n.length-(p?0:1),1))},getPixelForValue:function(M,p,n){var r=this,c,O,s;return!jp(p)&&!jp(n)&&(M=r.chart.data.datasets[n].data[p]),jp(M)||(c=r.isHorizontal()?M.x:M.y),(c!==void 0||M!==void 0&&isNaN(p))&&(O=r._getLabels(),M=m.valueOrDefault(c,M),s=O.indexOf(M),p=s!==-1?s:p,isNaN(p)&&(p=M)),r.getPixelForDecimal((p-r._startValue)/r._valueRange)},getPixelForTick:function(M){var p=this.ticks;return M<0||M>p.length-1?null:this.getPixelForValue(p[M],M+this.minIndex)},getValueForPixel:function(M){var p=this,n=Math.round(p._startValue+p.getDecimalForPixel(M)*p._valueRange);return Math.min(Math.max(n,0),p.ticks.length-1)},getBasePixel:function(){return this.bottom}}),Bu=yu;xa._defaults=Bu;var Tu=m.noop,Be=m.isNullOrUndef;function Xu(M,p){var n=[],r=1e-14,c=M.stepSize,O=c||1,s=M.maxTicks-1,l=M.min,A=M.max,f=M.precision,q=p.min,W=p.max,L=m.niceNum((W-q)/s/O)*O,_,N,B,S;if(Ls&&(L=m.niceNum(S*L/s/O)*O),c||Be(f)?_=Math.pow(10,m._decimalPlaces(L)):(_=Math.pow(10,f),L=Math.ceil(L*_)/_),N=Math.floor(q/L)*L,B=Math.ceil(W/L)*L,c&&(!Be(l)&&m.almostWhole(l/L,L/1e3)&&(N=l),!Be(A)&&m.almostWhole(A/L,L/1e3)&&(B=A)),S=(B-N)/L,m.almostEquals(S,Math.round(S),L/1e3)?S=Math.round(S):S=Math.ceil(S),N=Math.round(N*_)/_,B=Math.round(B*_)/_,n.push(Be(l)?N:l);for(var V=1;V0&&c>0&&(M.min=0)}var O=n.min!==void 0||n.suggestedMin!==void 0,s=n.max!==void 0||n.suggestedMax!==void 0;n.min!==void 0?M.min=n.min:n.suggestedMin!==void 0&&(M.min===null?M.min=n.suggestedMin:M.min=Math.min(M.min,n.suggestedMin)),n.max!==void 0?M.max=n.max:n.suggestedMax!==void 0&&(M.max===null?M.max=n.suggestedMax:M.max=Math.max(M.max,n.suggestedMax)),O!==s&&M.min>=M.max&&(O?M.max=M.min+1:M.min=M.max-1),M.min===M.max&&(M.max++,n.beginAtZero||M.min--)},getTickLimit:function(){var M=this,p=M.options.ticks,n=p.stepSize,r=p.maxTicksLimit,c;return n?c=Math.ceil(M.max/n)-Math.floor(M.min/n)+1:(c=M._computeTickLimit(),r=r||11),r&&(c=Math.min(r,c)),c},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Tu,buildTicks:function(){var M=this,p=M.options,n=p.ticks,r=M.getTickLimit();r=Math.max(2,r);var c={maxTicks:r,min:n.min,max:n.max,precision:n.precision,stepSize:m.valueOrDefault(n.fixedStepSize,n.stepSize)},O=M.ticks=Xu(c,M);M.handleDirectionalChanges(),M.max=m.max(O),M.min=m.min(O),n.reverse?(O.reverse(),M.start=M.max,M.end=M.min):(M.start=M.min,M.end=M.max)},convertTicksToLabels:function(){var M=this;M.ticksAsNumbers=M.ticks.slice(),M.zeroLineIndex=M.ticks.indexOf(0),m1.prototype.convertTicksToLabels.call(M)},_configure:function(){var M=this,p=M.getTicks(),n=M.min,r=M.max,c;m1.prototype._configure.call(M),M.options.offset&&p.length&&(c=(r-n)/Math.max(p.length-1,1)/2,n-=c,r+=c),M._startValue=n,M._endValue=r,M._valueRange=r-n}}),wu={position:"left",ticks:{callback:co.formatters.linear}},Cu=0,Eu=1;function Su(M,p,n){var r=[n.type,p===void 0&&n.stack===void 0?n.index:"",n.stack].join(".");return M[r]===void 0&&(M[r]={pos:[],neg:[]}),M[r]}function xu(M,p,n,r){var c=M.options,O=c.stacked,s=Su(p,O,n),l=s.pos,A=s.neg,f=r.length,q,W;for(q=0;qp.length-1?null:this.getPixelForValue(p[M])}}),Du=wu;ka._defaults=Du;var Hp=m.valueOrDefault,R1=m.math.log10;function Pu(M,p){var n=[],r=Hp(M.min,Math.pow(10,Math.floor(R1(p.min)))),c=Math.floor(R1(p.max)),O=Math.ceil(p.max/Math.pow(10,c)),s,l;r===0?(s=Math.floor(R1(p.minNotZero)),l=Math.floor(p.minNotZero/Math.pow(10,s)),n.push(r),r=l*Math.pow(10,s)):(s=Math.floor(R1(r)),l=Math.floor(r/Math.pow(10,s)));var A=s<0?Math.pow(10,Math.abs(s)):1;do n.push(r),++l,l===10&&(l=1,++s,A=s>=0?1:A),r=Math.round(l*Math.pow(10,s)*A)/A;while(s=0?M:p}var Da=m1.extend({determineDataLimits:function(){var M=this,p=M.options,n=M.chart,r=n.data.datasets,c=M.isHorizontal();function O(S){return c?S.xAxisID===M.id:S.yAxisID===M.id}var s,l,A,f,q,W;M.min=Number.POSITIVE_INFINITY,M.max=Number.NEGATIVE_INFINITY,M.minNotZero=Number.POSITIVE_INFINITY;var L=p.stacked;if(L===void 0){for(s=0;s0){var V=m.min(S),i0=m.max(S);M.min=Math.min(M.min,V),M.max=Math.max(M.max,i0)}})}else for(s=0;s0?M.minNotZero=M.min:M.max<1?M.minNotZero=Math.pow(10,Math.floor(R1(M.max))):M.minNotZero=n)},buildTicks:function(){var M=this,p=M.options.ticks,n=!M.isHorizontal(),r={min:hM(p.min),max:hM(p.max)},c=M.ticks=Pu(r,M);M.max=m.max(c),M.min=m.min(c),p.reverse?(n=!n,M.start=M.max,M.end=M.min):(M.start=M.min,M.end=M.max),n&&c.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),m1.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(M,p){return this._getScaleLabel(this.chart.data.datasets[p].data[M])},getPixelForTick:function(M){var p=this.tickValues;return M<0||M>p.length-1?null:this.getPixelForValue(p[M])},_getFirstTickValue:function(M){var p=Math.floor(R1(M)),n=Math.floor(M/Math.pow(10,p));return n*Math.pow(10,p)},_configure:function(){var M=this,p=M.min,n=0;m1.prototype._configure.call(M),p===0&&(p=M._getFirstTickValue(M.minNotZero),n=Hp(M.options.ticks.fontSize,Z.global.defaultFontSize)/M._length),M._startValue=R1(p),M._valueOffset=n,M._valueRange=(R1(M.max)-R1(p))/(1-n)},getPixelForValue:function(M){var p=this,n=0;return M=+p.getRightValue(M),M>p.min&&M>0&&(n=(R1(M)-p._startValue)/p._valueRange+p._valueOffset),p.getPixelForDecimal(n)},getValueForPixel:function(M){var p=this,n=p.getDecimalForPixel(M);return n===0&&p.min===0?0:Math.pow(10,p._startValue+(n-p._valueOffset)*p._valueRange)}}),$u=Iu;Da._defaults=$u;var vM=m.valueOrDefault,Up=m.valueAtIndexOrDefault,Pa=m.options.resolve,Fu={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:co.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(M){return M}}};function Vp(M){var p=M.ticks;return p.display&&M.display?vM(p.fontSize,Z.global.defaultFontSize)+p.backdropPaddingY*2:0}function ju(M,p,n){return m.isArray(n)?{w:m.longestText(M,M.font,n),h:n.length*p}:{w:M.measureText(n).width,h:p}}function Ia(M,p,n,r,c){return M===r||M===c?{start:p-n/2,end:p+n/2}:Mc?{start:p-n,end:p}:{start:p,end:p+n}}function Hu(M){var p=m.options._parseFont(M.options.pointLabels),n={l:0,r:M.width,t:0,b:M.height-M.paddingTop},r={},c,O,s;M.ctx.font=p.string,M._pointLabelSizes=[];var l=M.chart.data.labels.length;for(c=0;cn.r&&(n.r=q.end,r.r=A),W.startn.b&&(n.b=W.end,r.b=A)}M.setReductions(M.drawingArea,n,r)}function Uu(M){return M===0||M===180?"center":M<180?"left":"right"}function Vu(M,p,n,r){var c=n.y+r/2,O,s;if(m.isArray(p))for(O=0,s=p.length;O270||M<90)&&(n.y-=p.h)}function Ku(M){var p=M.ctx,n=M.options,r=n.pointLabels,c=Vp(n),O=M.getDistanceFromCenterForValue(n.ticks.reverse?M.min:M.max),s=m.options._parseFont(r);p.save(),p.font=s.string,p.textBaseline="middle";for(var l=M.chart.data.labels.length-1;l>=0;l--){var A=l===0?c/2:0,f=M.getPointPosition(l,O+A+5),q=Up(r.fontColor,l,Z.global.defaultFontColor);p.fillStyle=q;var W=M.getIndexAngle(l),L=m.toDegrees(W);p.textAlign=Uu(L),Yu(L,M._pointLabelSizes[l],f),Vu(p,M.pointLabels[l],f,s.lineHeight)}p.restore()}function Gu(M,p,n,r){var c=M.ctx,O=p.circular,s=M.chart.data.labels.length,l=Up(p.color,r-1),A=Up(p.lineWidth,r-1),f;if(!(!O&&!s||!l||!A)){if(c.save(),c.strokeStyle=l,c.lineWidth=A,c.setLineDash&&(c.setLineDash(p.borderDash||[]),c.lineDashOffset=p.borderDashOffset||0),c.beginPath(),O)c.arc(M.xCenter,M.yCenter,n,0,Math.PI*2);else{f=M.getPointPosition(0,n),c.moveTo(f.x,f.y);for(var q=1;q0&&r>0?n:0)},_drawGrid:function(){var M=this,p=M.ctx,n=M.options,r=n.gridLines,c=n.angleLines,O=vM(c.lineWidth,r.lineWidth),s=vM(c.color,r.color),l,A,f;if(n.pointLabels.display&&Ku(M),r.display&&m.each(M.ticks,function(q,W){W!==0&&(A=M.getDistanceFromCenterForValue(M.ticksAsNumbers[W]),Gu(M,r,A,W))}),c.display&&O&&s){for(p.save(),p.lineWidth=O,p.strokeStyle=s,p.setLineDash&&(p.setLineDash(Pa([c.borderDash,r.borderDash,[]])),p.lineDashOffset=Pa([c.borderDashOffset,r.borderDashOffset,0])),l=M.chart.data.labels.length-1;l>=0;l--)A=M.getDistanceFromCenterForValue(n.ticks.reverse?M.min:M.max),f=M.getPointPosition(l,A),p.beginPath(),p.moveTo(M.xCenter,M.yCenter),p.lineTo(f.x,f.y),p.stroke();p.restore()}},_drawLabels:function(){var M=this,p=M.ctx,n=M.options,r=n.ticks;if(r.display){var c=M.getIndexAngle(0),O=m.options._parseFont(r),s=vM(r.fontColor,Z.global.defaultFontColor),l,A;p.save(),p.font=O.string,p.translate(M.xCenter,M.yCenter),p.rotate(c),p.textAlign="center",p.textBaseline="middle",m.each(M.ticks,function(f,q){q===0&&!r.reverse||(l=M.getDistanceFromCenterForValue(M.ticksAsNumbers[q]),r.showLabelBackdrop&&(A=p.measureText(f).width,p.fillStyle=r.backdropColor,p.fillRect(-A/2-r.backdropPaddingX,-l-O.size/2-r.backdropPaddingY,A+r.backdropPaddingX*2,O.size+r.backdropPaddingY*2)),p.fillStyle=s,p.fillText(f,0,-l))}),p.restore()}},_drawTitle:m.noop}),Ju=Fu;$a._defaults=Ju;var Yp=m._deprecated,Fa=m.options.resolve,Qu=m.valueOrDefault,ja=Number.MIN_SAFE_INTEGER||-9007199254740991,Kp=Number.MAX_SAFE_INTEGER||9007199254740991,RM={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},g1=Object.keys(RM);function Ha(M,p){return M-p}function Zu(M){var p={},n=[],r,c,O;for(r=0,c=M.length;rp&&f=0&&r<=c;)if(O=r+c>>1,s=M[O-1]||null,l=M[O],s)if(l[p]n)c=O-1;else return{lo:s,hi:l};else return{lo:null,hi:l};return{lo:l,hi:null}}function Ot(M,p,n,r){var c=tf(M,p,n),O=c.lo?c.hi?c.lo:M[M.length-2]:M[0],s=c.lo?c.hi?c.hi:M[M.length-1]:M[1],l=s[p]-O[p],A=l?(n-O[p])/l:0,f=(s[r]-O[r])*A;return O[r]+f}function Gp(M,p){var n=M._adapter,r=M.options.time,c=r.parser,O=c||r.format,s=p;return typeof c=="function"&&(s=c(s)),m.isFinite(s)||(s=typeof O=="string"?n.parse(s,O):n.parse(s)),s!==null?+s:(!c&&typeof O=="function"&&(s=O(p),m.isFinite(s)||(s=n.parse(s))),s)}function Te(M,p){if(m.isNullOrUndef(p))return null;var n=M.options.time,r=Gp(M,M.getRightValue(p));return r===null||n.round&&(r=+M._adapter.startOf(r,n.round)),r}function Ya(M,p,n,r){var c=g1.length,O,s,l;for(O=g1.indexOf(M);O=g1.indexOf(n);O--)if(s=g1[O],RM[s].common&&M._adapter.diff(c,r,s)>=p-1)return s;return g1[n?g1.indexOf(n):0]}function Mf(M){for(var p=g1.indexOf(M)+1,n=g1.length;p1e5*A)throw p+" and "+n+" are too far apart with stepSize of "+A+" "+l;for(L=q;L=0&&(p[A].major=!0);return p}function Ka(M,p,n){var r=[],c={},O=p.length,s,l;for(s=0;s1?Zu(l).sort(Ha):l.sort(Ha),O=Math.min(O,l[0]),s=Math.max(s,l[l.length-1])),O=Te(M,Ua(r))||O,s=Te(M,Va(r))||s,O=O===Kp?+n.startOf(Date.now(),c):O,s=s===ja?+n.endOf(Date.now(),c)+1:s,M.min=Math.min(O,s),M.max=Math.max(O+1,s),M._table=[],M._timestamps={data:l,datasets:A,labels:f}},buildTicks:function(){var M=this,p=M.min,n=M.max,r=M.options,c=r.ticks,O=r.time,s=M._timestamps,l=[],A=M.getLabelCapacity(p),f=c.source,q=r.distribution,W,L,_;for(f==="data"||f==="auto"&&q==="series"?s=s.data:f==="labels"?s=s.labels:s=bf(M,p,n,A),r.bounds==="ticks"&&s.length&&(p=s[0],n=s[s.length-1]),p=Te(M,Ua(r))||p,n=Te(M,Va(r))||n,W=0,L=s.length;W=p&&_<=n&&l.push(_);return M.min=p,M.max=n,M._unit=O.unit||(c.autoSkip?Ya(O.minUnit,M.min,M.max,A):of(M,l.length,O.minUnit,M.min,M.max)),M._majorUnit=!c.major.enabled||M._unit==="year"?void 0:Mf(M._unit),M._table=ef(M._timestamps.data,p,n,q),M._offsets=pf(M._table,l,p,n,r),c.reverse&&l.reverse(),Ka(M,l,M._majorUnit)},getLabelForIndex:function(M,p){var n=this,r=n._adapter,c=n.chart.data,O=n.options.time,s=c.labels&&M=0&&M0?l:1}}),rf=nf;Ga._defaults=rf;var af={category:xa,linear:ka,logarithmic:Da,radialLinear:$a,time:Ga},cf={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Dp._date.override(typeof o=="function"?{_id:"moment",formats:function(){return cf},parse:function(M,p){return typeof M=="string"&&typeof p=="string"?M=o(M,p):M instanceof o||(M=o(M)),M.isValid()?M.valueOf():null},format:function(M,p){return o(M).format(p)},add:function(M,p,n){return o(M).add(p,n).valueOf()},diff:function(M,p,n){return o(M).diff(o(p),n)},startOf:function(M,p,n){return M=o(M),p==="isoWeek"?M.isoWeekday(n).valueOf():M.startOf(p).valueOf()},endOf:function(M,p){return o(M).endOf(p).valueOf()},_create:function(M){return o(M)}}:{}),Z._set("global",{plugins:{filler:{propagate:!0}}});var Of={dataset:function(M){var p=M.fill,n=M.chart,r=n.getDatasetMeta(p),c=r&&n.isDatasetVisible(p),O=c&&r.dataset._children||[],s=O.length||0;return s?function(l,A){return A=n?!1:O;switch(c){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return c;default:return!1}}function Af(M){var p=M.el._model||{},n=M.el._scale||{},r=M.fill,c=null,O;if(isFinite(r))return null;if(r==="start"?c=p.scaleBottom===void 0?n.bottom:p.scaleBottom:r==="end"?c=p.scaleTop===void 0?n.top:p.scaleTop:p.scaleZero!==void 0?c=p.scaleZero:n.getBasePixel&&(c=n.getBasePixel()),c!=null){if(c.x!==void 0&&c.y!==void 0)return c;if(m.isFinite(c))return O=n.isHorizontal(),{x:O?c:null,y:O?null:c}}return null}function df(M){var p=M.el._scale,n=p.options,r=p.chart.data.labels.length,c=M.fill,O=[],s,l,A,f,q;if(!r)return null;for(s=n.ticks.reverse?p.max:p.min,l=n.ticks.reverse?p.min:p.max,A=p.getPointPositionForValue(0,s),f=0;f0;--O)M.arc(s,l,A,n[O].angle,n[O-1].angle,!0);return}for(M.lineTo(n[c-1].x,n[c-1].y),O=c-1;O>0;--O)m.canvas.lineTo(M,n[O],n[O-1],!0)}}function qf(M,p,n,r,c,O){var s=p.length,l=r.spanGaps,A=[],f=[],q=0,W=0,L,_,N,B,S,V,i0,s0;for(M.beginPath(),L=0,_=s;L<_;++L)N=L%s,B=p[N]._view,S=n(B,N,r),V=Ja(B),i0=Ja(S),O&&s0===void 0&&V&&(s0=L+1,_=s+s0),V&&i0?(q=A.push(B),W=f.push(S)):q&&W&&(l?(V&&A.push(B),i0&&f.push(S)):(Qa(M,A,f,q,W),q=W=0,A=[],f=[]));Qa(M,A,f,q,W),M.closePath(),M.fillStyle=c,M.fill()}var Wf={id:"filler",afterDatasetsUpdate:function(M,p){var n=(M.data.datasets||[]).length,r=p.propagate,c=[],O,s,l,A;for(s=0;s=0;--c)r=p[c].$filler,!(!r||!r.visible)&&(O=r.el,s=O._view,l=O._children||[],A=r.mapper,f=s.backgroundColor||Z.global.defaultColor,A&&f&&l.length&&(m.canvas.clipArea(n,M.chartArea),qf(n,l,A,s,f,O._loop),m.canvas.unclipArea(n)))}},hf=m.rtl.getRtlAdapter,K2=m.noop,G2=m.valueOrDefault;Z._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(M,p){var n=p.datasetIndex,r=this.chart,c=r.getDatasetMeta(n);c.hidden=c.hidden===null?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(M){var p=M.data.datasets,n=M.options.legend||{},r=n.labels&&n.labels.usePointStyle;return M._getSortedDatasetMetas().map(function(c){var O=c.controller.getStyle(r?0:void 0);return{text:p[c.index].label,fillStyle:O.backgroundColor,hidden:!M.isDatasetVisible(c.index),lineCap:O.borderCapStyle,lineDash:O.borderDash,lineDashOffset:O.borderDashOffset,lineJoin:O.borderJoinStyle,lineWidth:O.borderWidth,strokeStyle:O.borderColor,pointStyle:O.pointStyle,rotation:O.rotation,datasetIndex:c.index}},this)}}},legendCallback:function(M){var p=document.createElement("ul"),n=M.data.datasets,r,c,O,s;for(p.setAttribute("class",M.id+"-legend"),r=0,c=n.length;rp?p:M.boxWidth}var Za=r2.extend({initialize:function(M){var p=this;m.extend(p,M),p.legendHitBoxes=[],p._hoveredItem=null,p.doughnutMode=!1},beforeUpdate:K2,update:function(M,p,n){var r=this;return r.beforeUpdate(),r.maxWidth=M,r.maxHeight=p,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:K2,beforeSetDimensions:K2,setDimensions:function(){var M=this;M.isHorizontal()?(M.width=M.maxWidth,M.left=0,M.right=M.width):(M.height=M.maxHeight,M.top=0,M.bottom=M.height),M.paddingLeft=0,M.paddingTop=0,M.paddingRight=0,M.paddingBottom=0,M.minSize={width:0,height:0}},afterSetDimensions:K2,beforeBuildLabels:K2,buildLabels:function(){var M=this,p=M.options.labels||{},n=m.callback(p.generateLabels,[M.chart],M)||[];p.filter&&(n=n.filter(function(r){return p.filter(r,M.chart.data)})),M.options.reverse&&n.reverse(),M.legendItems=n},afterBuildLabels:K2,beforeFit:K2,fit:function(){var M=this,p=M.options,n=p.labels,r=p.display,c=M.ctx,O=m.options._parseFont(n),s=O.size,l=M.legendHitBoxes=[],A=M.minSize,f=M.isHorizontal();if(f?(A.width=M.maxWidth,A.height=r?10:0):(A.width=r?10:0,A.height=M.maxHeight),!r){M.width=A.width=M.height=A.height=0;return}if(c.font=O.string,f){var q=M.lineWidths=[0],W=0;c.textAlign="left",c.textBaseline="middle",m.each(M.legendItems,function(i0,s0){var R0=Jp(n,s),m0=R0+s/2+c.measureText(i0.text).width;(s0===0||q[q.length-1]+m0+2*n.padding>A.width)&&(W+=s+n.padding,q[q.length-(s0>0?0:1)]=0),l[s0]={left:0,top:0,width:m0,height:s},q[q.length-1]+=m0+n.padding}),A.height+=W}else{var L=n.padding,_=M.columnWidths=[],N=M.columnHeights=[],B=n.padding,S=0,V=0;m.each(M.legendItems,function(i0,s0){var R0=Jp(n,s),m0=R0+s/2+c.measureText(i0.text).width;s0>0&&V+s+2*L>A.height&&(B+=S+n.padding,_.push(S),N.push(V),S=0,V=0),S=Math.max(S,m0),V+=s+L,l[s0]={left:0,top:0,width:m0,height:s}}),B+=S,_.push(S),N.push(V),A.width+=B}M.width=A.width,M.height=A.height},afterFit:K2,isHorizontal:function(){return this.options.position==="top"||this.options.position==="bottom"},draw:function(){var M=this,p=M.options,n=p.labels,r=Z.global,c=r.defaultColor,O=r.elements.line,s=M.height,l=M.columnHeights,A=M.width,f=M.lineWidths;if(p.display){var q=hf(p.rtl,M.left,M.minSize.width),W=M.ctx,L=G2(n.fontColor,r.defaultFontColor),_=m.options._parseFont(n),N=_.size,B;W.textAlign=q.textAlign("left"),W.textBaseline="middle",W.lineWidth=.5,W.strokeStyle=L,W.fillStyle=L,W.font=_.string;var S=Jp(n,N),V=M.legendHitBoxes,i0=function(X0,j0,Y0){if(!(isNaN(S)||S<=0)){W.save();var c1=G2(Y0.lineWidth,O.borderWidth);if(W.fillStyle=G2(Y0.fillStyle,c),W.lineCap=G2(Y0.lineCap,O.borderCapStyle),W.lineDashOffset=G2(Y0.lineDashOffset,O.borderDashOffset),W.lineJoin=G2(Y0.lineJoin,O.borderJoinStyle),W.lineWidth=c1,W.strokeStyle=G2(Y0.strokeStyle,c),W.setLineDash&&W.setLineDash(G2(Y0.lineDash,O.borderDash)),n&&n.usePointStyle){var r1=S*Math.SQRT2/2,b1=q.xPlus(X0,S/2),i1=j0+N/2;m.canvas.drawPoint(W,Y0.pointStyle,r1,b1,i1,Y0.rotation)}else W.fillRect(q.leftForLtr(X0,S),j0,S,N),c1!==0&&W.strokeRect(q.leftForLtr(X0,S),j0,S,N);W.restore()}},s0=function(X0,j0,Y0,c1){var r1=N/2,b1=q.xPlus(X0,S+r1),i1=j0+r1;W.fillText(Y0.text,b1,i1),Y0.hidden&&(W.beginPath(),W.lineWidth=2,W.moveTo(b1,i1),W.lineTo(q.xPlus(b1,c1),i1),W.stroke())},R0=function(X0,j0){switch(p.align){case"start":return n.padding;case"end":return X0-j0;default:return(X0-j0+n.padding)/2}},m0=M.isHorizontal();m0?B={x:M.left+R0(A,f[0]),y:M.top+n.padding,line:0}:B={x:M.left+n.padding,y:M.top+R0(s,l[0]),line:0},m.rtl.overrideTextDirection(M.ctx,p.textDirection);var x0=N+n.padding;m.each(M.legendItems,function(X0,j0){var Y0=W.measureText(X0.text).width,c1=S+N/2+Y0,r1=B.x,b1=B.y;q.setWidth(M.minSize.width),m0?j0>0&&r1+c1+n.padding>M.left+M.minSize.width&&(b1=B.y+=x0,B.line++,r1=B.x=M.left+R0(A,f[B.line])):j0>0&&b1+x0>M.top+M.minSize.height&&(r1=B.x=r1+M.columnWidths[B.line]+n.padding,B.line++,b1=B.y=M.top+R0(s,l[B.line]));var i1=q.x(r1);i0(i1,b1,X0),V[j0].left=q.leftForLtr(i1,V[j0].width),V[j0].top=b1,s0(i1,b1,X0,Y0),m0?B.x+=c1+n.padding:B.y+=x0}),m.rtl.restoreTextDirection(M.ctx,p.textDirection)}},_getLegendItemAt:function(M,p){var n=this,r,c,O;if(M>=n.left&&M<=n.right&&p>=n.top&&p<=n.bottom){for(O=n.legendHitBoxes,r=0;r=c.left&&M<=c.left+c.width&&p>=c.top&&p<=c.top+c.height)return n.legendItems[r]}return null},handleEvent:function(M){var p=this,n=p.options,r=M.type==="mouseup"?"click":M.type,c;if(r==="mousemove"){if(!n.onHover&&!n.onLeave)return}else if(r==="click"){if(!n.onClick)return}else return;c=p._getLegendItemAt(M.x,M.y),r==="click"?c&&n.onClick&&n.onClick.call(p,M.native,c):(n.onLeave&&c!==p._hoveredItem&&(p._hoveredItem&&n.onLeave.call(p,M.native,p._hoveredItem),p._hoveredItem=c),n.onHover&&c&&n.onHover.call(p,M.native,c))}});function ec(M,p){var n=new Za({ctx:M.ctx,options:p,chart:M});P1.configure(M,n,p),P1.addBox(M,n),M.legend=n}var vf={id:"legend",_element:Za,beforeInit:function(M){var p=M.options.legend;p&&ec(M,p)},beforeUpdate:function(M){var p=M.options.legend,n=M.legend;p?(m.mergeIf(p,Z.global.legend),n?(P1.configure(M,n,p),n.options=p):ec(M,p)):n&&(P1.removeBox(M,n),delete M.legend)},afterEvent:function(M,p){var n=M.legend;n&&n.handleEvent(p)}},N2=m.noop;Z._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var tc=r2.extend({initialize:function(M){var p=this;m.extend(p,M),p.legendHitBoxes=[]},beforeUpdate:N2,update:function(M,p,n){var r=this;return r.beforeUpdate(),r.maxWidth=M,r.maxHeight=p,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:N2,beforeSetDimensions:N2,setDimensions:function(){var M=this;M.isHorizontal()?(M.width=M.maxWidth,M.left=0,M.right=M.width):(M.height=M.maxHeight,M.top=0,M.bottom=M.height),M.paddingLeft=0,M.paddingTop=0,M.paddingRight=0,M.paddingBottom=0,M.minSize={width:0,height:0}},afterSetDimensions:N2,beforeBuildLabels:N2,buildLabels:N2,afterBuildLabels:N2,beforeFit:N2,fit:function(){var M=this,p=M.options,n=M.minSize={},r=M.isHorizontal(),c,O;if(!p.display){M.width=n.width=M.height=n.height=0;return}c=m.isArray(p.text)?p.text.length:1,O=c*m.options._parseFont(p).lineHeight+p.padding*2,M.width=n.width=r?M.maxWidth:O,M.height=n.height=r?O:M.maxHeight},afterFit:N2,isHorizontal:function(){var M=this.options.position;return M==="top"||M==="bottom"},draw:function(){var M=this,p=M.ctx,n=M.options;if(n.display){var r=m.options._parseFont(n),c=r.lineHeight,O=c/2+n.padding,s=0,l=M.top,A=M.left,f=M.bottom,q=M.right,W,L,_;p.fillStyle=m.valueOrDefault(n.fontColor,Z.global.defaultFontColor),p.font=r.string,M.isHorizontal()?(L=A+(q-A)/2,_=l+O,W=q-A):(L=n.position==="left"?A+O:q-O,_=l+(f-l)/2,W=f-l,s=Math.PI*(n.position==="left"?-.5:.5)),p.save(),p.translate(L,_),p.rotate(s),p.textAlign="center",p.textBaseline="middle";var N=n.text;if(m.isArray(N))for(var B=0,S=0;Sthis.data.datasets[0].label==="Seconds"?`${t} secs`:t},gridLines:{display:!0},beforeBuildTicks:function(t){var e=t.chart.data.datasets[0].data.reduce((o,b)=>b>o?b:o);t.max=parseFloat(e)+parseFloat(e*.25)}}],xAxes:[{gridLines:{display:!0},afterTickToLabelConversion:function(t){var e=t.ticks;e.forEach(function(o,b){b%6!=0&&b+1!=e.length&&(e[b]="")})}}]}},data:this.data})}};var mB=function(){var e=this,o=e._self._c;return o("div",{staticStyle:{position:"relative"}},[o("canvas",{ref:"canvas",attrs:{height:"120"}})])},RB=[],gB=n1(vB,mB,RB,!1,null,null,null,null);const LB=gB.exports,_B={components:{LineChart:LB},data(){return{ready:!1,rawData:{},metric:{}}},mounted(){document.title="Horizon - Metrics",this.loadMetric()},methods:{loadMetric(){this.ready=!1,this.$http.get(Horizon.basePath+"/api/metrics/"+this.$route.params.type+"/"+encodeURIComponent(this.$route.params.slug)).then(t=>{let e=this.prepareData(t.data);this.rawData=t.data,this.metric.throughPutChart=this.buildChartData(e,"throughput","Times"),this.metric.runTimeChart=this.buildChartData(e,"runtime","Seconds"),this.ready=!0})},prepareData(t){return Object.values(this.groupBy(t.map(e=>({...e,time:this.formatDate(e.time).format("MMM-D hh:mmA")})),"time")).map(e=>e.reduce((o,b)=>({runtime:parseFloat(o.runtime)+parseFloat(b.runtime),throughput:parseInt(o.throughput)+parseInt(b.throughput),time:b.time})))},buildChartData(t,e,o){return{labels:t.map(b=>b.time),datasets:[{label:o,data:t.map(b=>b[e]),lineTension:0,backgroundColor:"transparent",pointBackgroundColor:"#fff",pointBorderColor:"#7746ec",borderColor:"#7746ec",borderWidth:2}]}}}};var NB=function(){var e=this,o=e._self._c;return o("div",[o("div",{staticClass:"card overflow-hidden"},[o("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[o("h2",{staticClass:"h6 m-0"},[e._v("Throughput - "+e._s(e.$route.params.slug))])]),e.ready?e._e():o("div",{staticClass:"d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("svg",{staticClass:"icon spin me-2 fill-text-color",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[o("path",{attrs:{d:"M12 10a2 2 0 0 1-3.41 1.41A2 2 0 0 1 10 8V0a9.97 9.97 0 0 1 10 10h-8zm7.9 1.41A10 10 0 1 1 8.59.1v2.03a8 8 0 1 0 9.29 9.29h2.02zm-4.07 0a6 6 0 1 1-7.25-7.25v2.1a3.99 3.99 0 0 0-1.4 6.57 4 4 0 0 0 6.56-1.42h2.1z"}})]),o("span",[e._v("Loading...")])]),e.ready?o("div",{staticClass:"card-body card-bg-secondary"},[e.ready&&!e.rawData.length?o("p",{staticClass:"text-center m-0 p-5"},[e._v(" Not Enough Data ")]):e._e(),e.ready&&e.rawData.length?o("line-chart",{attrs:{data:e.metric.throughPutChart}}):e._e()],1):e._e()]),o("div",{staticClass:"card overflow-hidden mt-4"},[o("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[o("h2",{staticClass:"h6 m-0"},[e._v("Runtime - "+e._s(e.$route.params.slug))])]),e.ready?e._e():o("div",{staticClass:"d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("svg",{staticClass:"icon spin me-2 fill-text-color",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[o("path",{attrs:{d:"M12 10a2 2 0 0 1-3.41 1.41A2 2 0 0 1 10 8V0a9.97 9.97 0 0 1 10 10h-8zm7.9 1.41A10 10 0 1 1 8.59.1v2.03a8 8 0 1 0 9.29 9.29h2.02zm-4.07 0a6 6 0 1 1-7.25-7.25v2.1a3.99 3.99 0 0 0-1.4 6.57 4 4 0 0 0 6.56-1.42h2.1z"}})]),o("span",[e._v("Loading...")])]),e.ready?o("div",{staticClass:"card-body card-bg-secondary"},[e.ready&&!e.rawData.length?o("p",{staticClass:"text-center m-0 p-5"},[e._v(" Not Enough Data ")]):e._e(),e.ready&&e.rawData.length?o("line-chart",{attrs:{data:e.metric.runTimeChart}}):e._e()],1):e._e()])])},yB=[],BB=n1(_B,NB,yB,!1,null,null,null,null);const TB=BB.exports,XB={props:{job:{type:Object,required:!0}},computed:{unserialized(){try{return Et(this.job.payload.data.command)}catch{}},delayed(){return this.unserialized&&this.unserialized.delay&&this.unserialized.delay.date?Vo.tz(this.unserialized.delay.date,this.unserialized.delay.timezone).fromNow(!0):this.unserialized&&this.unserialized.delay?this.formatDate(this.job.payload.pushedAt).add(this.unserialized.delay,"seconds").fromNow(!0):null}}};var wB=function(){var e=this,o=e._self._c;return o("tr",[o("td",[o("router-link",{attrs:{title:e.job.name,to:{name:e.$route.params.type+"-jobs-preview",params:{jobId:e.job.id}}}},[e._v(" "+e._s(e.jobBaseName(e.job.name))+" ")]),e.delayed&&(e.job.status=="reserved"||e.job.status=="pending")?o("small",{staticClass:"ms-1 badge bg-secondary badge-sm",attrs:{title:`Delayed for ${e.delayed}`}},[e._v(" Delayed ")]):e._e(),o("br"),o("small",{staticClass:"text-muted"},[e._v(" Queue: "+e._s(e.job.queue)+" "),e.job.payload.tags&&e.job.payload.tags.length?o("span",{staticClass:"text-break"},[e._v(" | Tags: "+e._s(e.job.payload.tags&&e.job.payload.tags.length?e.job.payload.tags.slice(0,3).join(", "):"")),e.job.payload.tags.length>3?o("span",[e._v(" ("+e._s(e.job.payload.tags.length-3)+" more)")]):e._e()]):e._e()])],1),o("td",{staticClass:"table-fit text-muted"},[e._v(" "+e._s(e.readableTimestamp(e.job.payload.pushedAt))+" ")]),e.$route.params.type=="completed"||e.$route.params.type=="silenced"?o("td",{staticClass:"table-fit text-muted"},[e._v(" "+e._s(e.readableTimestamp(e.job.completed_at))+" ")]):e._e(),e.$route.params.type=="completed"||e.$route.params.type=="silenced"?o("td",{staticClass:"table-fit text-end text-muted"},[o("span",[e._v(e._s(e.job.completed_at?(e.job.completed_at-e.job.reserved_at).toFixed(2)+"s":"-"))])]):e._e()])},CB=[],EB=n1(XB,wB,CB,!1,null,null,null,null);const SB=EB.exports,xB={data(){return{ready:!1,loadingNewEntries:!1,hasNewEntries:!1,page:1,perPage:50,totalPages:1,jobs:[]}},components:{JobRow:SB},mounted(){this.updatePageTitle(),this.loadJobs(),this.refreshJobsPeriodically()},destroyed(){clearInterval(this.interval)},watch:{$route(){this.updatePageTitle(),this.page=1,this.loadJobs()}},methods:{loadJobs(t=-1,e=!1){e||(this.ready=!1),this.$http.get(Horizon.basePath+"/api/jobs/"+this.$route.params.type+"?starting_at="+t+"&limit="+this.perPage).then(o=>{var b,z;!this.$root.autoLoadsNewEntries&&e&&this.jobs.length&&((b=o.data.jobs[0])==null?void 0:b.id)!==((z=this.jobs[0])==null?void 0:z.id)?this.hasNewEntries=!0:(this.jobs=o.data.jobs,this.totalPages=Math.ceil(o.data.total/this.perPage)),this.ready=!0})},loadNewEntries(){this.jobs=[],this.loadJobs(-1,!1),this.hasNewEntries=!1},refreshJobsPeriodically(){this.interval=setInterval(()=>{this.page==1&&this.loadJobs(-1,!0)},3e3)},previous(){this.loadJobs((this.page-2)*this.perPage-1),this.page-=1,this.hasNewEntries=!1},next(){this.loadJobs(this.page*this.perPage-1),this.page+=1,this.hasNewEntries=!1},updatePageTitle(){document.title=this.$route.params.type=="pending"?"Horizon - Pending Jobs":this.$route.params.type=="silenced"?"Horizon - Silenced Jobs":"Horizon - Completed Jobs"}}};var kB=function(){var e=this,o=e._self._c;return o("div",[o("div",{staticClass:"card overflow-hidden"},[o("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e.$route.params.type=="pending"?o("h2",{staticClass:"h6 m-0"},[e._v("Pending Jobs")]):e._e(),e.$route.params.type=="completed"?o("h2",{staticClass:"h6 m-0"},[e._v("Completed Jobs")]):e._e(),e.$route.params.type=="silenced"?o("h2",{staticClass:"h6 m-0"},[e._v("Silenced Jobs")]):e._e()]),e.ready?e._e():o("div",{staticClass:"d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("svg",{staticClass:"icon spin me-2 fill-text-color",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[o("path",{attrs:{d:"M12 10a2 2 0 0 1-3.41 1.41A2 2 0 0 1 10 8V0a9.97 9.97 0 0 1 10 10h-8zm7.9 1.41A10 10 0 1 1 8.59.1v2.03a8 8 0 1 0 9.29 9.29h2.02zm-4.07 0a6 6 0 1 1-7.25-7.25v2.1a3.99 3.99 0 0 0-1.4 6.57 4 4 0 0 0 6.56-1.42h2.1z"}})]),o("span",[e._v("Loading...")])]),e.ready&&e.jobs.length==0?o("div",{staticClass:"d-flex flex-column align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("span",[e._v("There aren't any jobs.")])]):e._e(),e.ready&&e.jobs.length>0?o("table",{staticClass:"table table-hover mb-0"},[o("thead",[o("tr",[o("th",[e._v("Job")]),e.$route.params.type=="pending"?o("th",{staticClass:"text-end"},[e._v("Queued")]):e._e(),e.$route.params.type=="completed"||e.$route.params.type=="silenced"?o("th",[e._v("Queued")]):e._e(),e.$route.params.type=="completed"||e.$route.params.type=="silenced"?o("th",[e._v("Completed")]):e._e(),e.$route.params.type=="completed"||e.$route.params.type=="silenced"?o("th",{staticClass:"text-end"},[e._v("Runtime")]):e._e()])]),o("tbody",[e.hasNewEntries?o("tr",{key:"newEntries",staticClass:"dontanimate"},[o("td",{staticClass:"text-center card-bg-secondary py-1",attrs:{colspan:"100"}},[o("small",[e.loadingNewEntries?e._e():o("a",{attrs:{href:"#"},on:{click:function(b){return b.preventDefault(),e.loadNewEntries.apply(null,arguments)}}},[e._v("Load New Entries")])]),e.loadingNewEntries?o("small",[e._v("Loading...")]):e._e()])]):e._e(),e._l(e.jobs,function(b){return o("job-row",{key:b.id,tag:"tr",attrs:{job:b}})})],2)]):e._e(),e.ready&&e.jobs.length?o("div",{staticClass:"p-3 d-flex justify-content-between border-top"},[o("button",{staticClass:"btn btn-secondary btn-sm",attrs:{disabled:e.page==1},on:{click:e.previous}},[e._v("Previous")]),o("button",{staticClass:"btn btn-secondary btn-sm",attrs:{disabled:e.page>=e.totalPages},on:{click:e.next}},[e._v("Next")])]):e._e()])])},DB=[],PB=n1(xB,kB,DB,!1,null,null,null,null);const IB=PB.exports,$B={props:["trace"],data(){return{minimumLines:5,showAll:!1}},computed:{lines(){return this.trace.slice(0,this.showAll?1e3:this.minimumLines)}}};var FB=function(){var e=this,o=e._self._c;return o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table mb-0"},[o("tbody",[e._l(e.lines,function(b){return o("tr",[o("td",{staticClass:"card-bg-secondary"},[o("code",[e._v(e._s(b))])])])}),e.showAll?e._e():o("tr",[o("td",{staticClass:"card-bg-secondary"},[o("a",{attrs:{href:"*"},on:{click:function(b){b.preventDefault(),e.showAll=!0}}},[e._v("Show All")])])])],2)])])},jB=[],HB=n1($B,FB,jB,!1,null,"8e468968",null,null);const Ml=HB.exports,UB={components:{"stack-trace":Ml},data(){return{ready:!1,job:{}}},computed:{unserialized(){return Et(this.job.payload.data.command)},delayed(){let t;try{t=Et(this.job.payload.data.command)}catch{}return t&&t.delay&&t.delay.date?Vo.tz(t.delay.date,t.delay.timezone).local().format("YYYY-MM-DD HH:mm:ss"):t&&t.delay?this.formatDate(this.job.payload.pushedAt).add(t.delay,"seconds").local().format("YYYY-MM-DD HH:mm:ss"):null}},mounted(){this.loadJob(this.$route.params.jobId),document.title="Horizon - Job Detail"},methods:{loadJob(t){this.ready=!1,this.$http.get(Horizon.basePath+"/api/jobs/"+t).then(e=>{this.job=e.data,this.ready=!0})},prettyPrintJob(t){try{return t.command&&!t.command.includes("CallQueuedClosure")?Et(t.command):t}catch{return t}}}};var VB=function(){var e=this,o=e._self._c;return o("div",[o("div",{staticClass:"card overflow-hidden"},[o("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e.ready?e._e():o("h2",{staticClass:"h6 m-0"},[e._v("Job Preview")]),e.ready?o("h2",{staticClass:"h6 m-0"},[e._v(e._s(e.job.name))]):e._e(),o("a",{attrs:{"data-bs-toggle":"collapse",href:"#collapseDetails",role:"button"}},[e._v(" Collapse ")])]),e.ready?e._e():o("div",{staticClass:"d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("svg",{staticClass:"icon spin me-2 fill-text-color",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[o("path",{attrs:{d:"M12 10a2 2 0 0 1-3.41 1.41A2 2 0 0 1 10 8V0a9.97 9.97 0 0 1 10 10h-8zm7.9 1.41A10 10 0 1 1 8.59.1v2.03a8 8 0 1 0 9.29 9.29h2.02zm-4.07 0a6 6 0 1 1-7.25-7.25v2.1a3.99 3.99 0 0 0-1.4 6.57 4 4 0 0 0 6.56-1.42h2.1z"}})]),o("span",[e._v("Loading...")])]),e.ready?o("div",{staticClass:"card-body card-bg-secondary collapse show",attrs:{id:"collapseDetails"}},[o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("ID")]),o("div",{staticClass:"col"},[e._v(e._s(e.job.id))])]),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Queue")]),o("div",{staticClass:"col"},[e._v(e._s(e.job.queue))])]),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Pushed")]),o("div",{staticClass:"col"},[e._v(e._s(e.readableTimestamp(e.job.payload.pushedAt)))])]),e.prettyPrintJob(e.job.payload.data).batchId?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Batch")]),o("div",{staticClass:"col"},[o("router-link",{attrs:{to:{name:"batches-preview",params:{batchId:e.prettyPrintJob(e.job.payload.data).batchId}}}},[e._v(" "+e._s(e.prettyPrintJob(e.job.payload.data).batchId)+" ")])],1)]):e._e(),e.delayed?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Delayed Until")]),o("div",{staticClass:"col"},[e._v(e._s(e.delayed))])]):e._e(),o("div",{staticClass:"row"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Completed")]),e.job.completed_at?o("div",{staticClass:"col"},[e._v(e._s(e.readableTimestamp(e.job.completed_at)))]):o("div",{staticClass:"col"},[e._v("-")])])]):e._e()]),e.ready?o("div",{staticClass:"card overflow-hidden mt-4"},[e._m(0),o("div",{staticClass:"card-body code-bg text-white collapse show",attrs:{id:"collapseData"}},[o("vue-json-pretty",{attrs:{data:e.prettyPrintJob(e.job.payload.data)}})],1)]):e._e(),e.ready&&e.job.payload.tags.length?o("div",{staticClass:"card overflow-hidden mt-4"},[e._m(1),o("div",{staticClass:"card-body code-bg text-white collapse show",attrs:{id:"collapseTags"}},[o("vue-json-pretty",{attrs:{data:e.job.payload.tags}})],1)]):e._e()])},YB=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Data")]),e("a",{attrs:{"data-bs-toggle":"collapse",href:"#collapseData",role:"button"}},[t._v(" Collapse ")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Tags")]),e("a",{attrs:{"data-bs-toggle":"collapse",href:"#collapseTags",role:"button"}},[t._v(" Collapse ")])])}],KB=n1(UB,VB,YB,!1,null,null,null,null);const Bz=KB.exports,GB={data(){return{tagSearchPhrase:"",searchTimeout:null,ready:!1,loadingNewEntries:!1,hasNewEntries:!1,page:1,perPage:50,totalPages:1,jobs:[],retryingJobs:[]}},mounted(){document.title="Horizon - Failed Jobs",this.loadJobs(),this.refreshJobsPeriodically()},destroyed(){clearInterval(this.interval)},watch:{$route(){this.page=1,this.loadJobs()},tagSearchPhrase(){clearTimeout(this.searchTimeout),clearInterval(this.interval),this.searchTimeout=setTimeout(()=>{this.loadJobs(),this.refreshJobsPeriodically()},500)}},methods:{loadJobs(t=0,e=!1){e||(this.ready=!1);var o=this.tagSearchPhrase?"tag="+this.tagSearchPhrase+"&":"";this.$http.get(Horizon.basePath+"/api/jobs/failed?"+o+"starting_at="+t).then(b=>{var z,a;!this.$root.autoLoadsNewEntries&&e&&!b.data.jobs.length||(!this.$root.autoLoadsNewEntries&&e&&this.jobs.length&&((z=b.data.jobs[0])==null?void 0:z.id)!==((a=this.jobs[0])==null?void 0:a.id)?this.hasNewEntries=!0:(this.jobs=b.data.jobs,this.totalPages=Math.ceil(b.data.total/this.perPage)),this.ready=!0)})},loadNewEntries(){this.jobs=[],this.loadJobs(0,!1),this.hasNewEntries=!1},retry(t){this.isRetrying(t)||(this.retryingJobs.push(t),this.$http.post(Horizon.basePath+"/api/jobs/retry/"+t).then(e=>{setTimeout(()=>{this.retryingJobs=this.retryingJobs.filter(o=>o!=t)},5e3)}).catch(e=>{this.retryingJobs=this.retryingJobs.filter(o=>o!=t)}))},isRetrying(t){return this.retryingJobs.includes(t)},hasCompleted(t){return t.retried_by.find(e=>e.status==="completed")},wasRetried(t){return t.retried_by&&t.retried_by.length},isRetry(t){return t.payload.retry_of},retriedJobTooltip(t){let e=t.retried_by[t.retried_by.length-1];return`Total retries: ${t.retried_by.length}, Last retry status: ${this.upperFirst(e.status)}`},refreshJobsPeriodically(){this.interval=setInterval(()=>{this.loadJobs((this.page-1)*this.perPage,!0)},3e3)},previous(){this.loadJobs((this.page-2)*this.perPage),this.page-=1,this.hasNewEntries=!1},next(){this.loadJobs(this.page*this.perPage),this.page+=1,this.hasNewEntries=!1}}};var JB=function(){var e=this,o=e._self._c;return o("div",[o("div",{staticClass:"card overflow-hidden"},[o("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[o("h2",{staticClass:"h6 m-0"},[e._v("Failed Jobs")]),o("div",{staticClass:"form-control-with-icon"},[o("div",{staticClass:"icon-wrapper"},[o("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z","clip-rule":"evenodd"}})])]),o("input",{directives:[{name:"model",rawName:"v-model",value:e.tagSearchPhrase,expression:"tagSearchPhrase"}],staticClass:"form-control w-100",attrs:{type:"text",placeholder:"Search Tags"},domProps:{value:e.tagSearchPhrase},on:{input:function(b){b.target.composing||(e.tagSearchPhrase=b.target.value)}}})])]),e.ready?e._e():o("div",{staticClass:"d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("svg",{staticClass:"icon spin me-2 fill-text-color",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[o("path",{attrs:{d:"M12 10a2 2 0 0 1-3.41 1.41A2 2 0 0 1 10 8V0a9.97 9.97 0 0 1 10 10h-8zm7.9 1.41A10 10 0 1 1 8.59.1v2.03a8 8 0 1 0 9.29 9.29h2.02zm-4.07 0a6 6 0 1 1-7.25-7.25v2.1a3.99 3.99 0 0 0-1.4 6.57 4 4 0 0 0 6.56-1.42h2.1z"}})]),o("span",[e._v("Loading...")])]),e.ready&&e.jobs.length==0?o("div",{staticClass:"d-flex flex-column align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("span",[e._v("There aren't any failed jobs.")])]):e._e(),e.ready&&e.jobs.length>0?o("table",{staticClass:"table table-hover mb-0"},[e._m(0),o("tbody",[e.hasNewEntries?o("tr",{key:"newEntries",staticClass:"dontanimate"},[o("td",{staticClass:"text-center card-bg-secondary py-2",attrs:{colspan:"100"}},[o("small",[e.loadingNewEntries?e._e():o("a",{attrs:{href:"#"},on:{click:function(b){return b.preventDefault(),e.loadNewEntries.apply(null,arguments)}}},[e._v("Load New Entries")])]),e.loadingNewEntries?o("small",[e._v("Loading...")]):e._e()])]):e._e(),e._l(e.jobs,function(b){return o("tr",{key:b.id},[o("td",[o("router-link",{attrs:{title:b.name,to:{name:"failed-jobs-preview",params:{jobId:b.id}}}},[e._v(e._s(e.jobBaseName(b.name)))]),e.wasRetried(b)?o("small",{staticClass:"ms-1 badge bg-secondary badge-sm",attrs:{title:e.retriedJobTooltip(b)}},[e._v(" Retried ")]):e._e(),o("br"),o("small",{staticClass:"text-muted"},[e._v(" Queue: "+e._s(b.queue)+" | Attempts: "+e._s(b.payload.attempts)+" "),e.isRetry(b)?o("span",[e._v(" | Retry of "),o("router-link",{attrs:{title:b.name,to:{name:"failed-jobs-preview",params:{jobId:b.payload.retry_of}}}},[e._v(" "+e._s(b.payload.retry_of.split("-")[0])+" ")])],1):e._e(),b.payload.tags&&b.payload.tags.length?o("span",{staticClass:"text-break"},[e._v(" | Tags: "+e._s(b.payload.tags&&b.payload.tags.length?b.payload.tags.join(", "):"")+" ")]):e._e()])],1),o("td",{staticClass:"table-fit text-muted text-end"},[o("span",[e._v(e._s(b.failed_at?String((b.failed_at-b.reserved_at).toFixed(2))+"s":"-"))])]),o("td",{staticClass:"table-fit text-muted"},[e._v(" "+e._s(e.readableTimestamp(b.failed_at))+" ")]),o("td",{staticClass:"text-end table-fit"},[e.hasCompleted(b)?e._e():o("a",{attrs:{href:"#",title:"Retry Job"},on:{click:function(z){return z.preventDefault(),e.retry(b.id)}}},[o("svg",{staticClass:"fill-primary",class:{spin:e.isRetrying(b.id)},staticStyle:{width:"1.25rem",height:"1.25rem"},attrs:{viewBox:"0 0 20 20"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M15.312 11.424a5.5 5.5 0 01-9.201 2.466l-.312-.311h2.433a.75.75 0 000-1.5H3.989a.75.75 0 00-.75.75v4.242a.75.75 0 001.5 0v-2.43l.31.31a7 7 0 0011.712-3.138.75.75 0 00-1.449-.39zm1.23-3.723a.75.75 0 00.219-.53V2.929a.75.75 0 00-1.5 0V5.36l-.31-.31A7 7 0 003.239 8.188a.75.75 0 101.448.389A5.5 5.5 0 0113.89 6.11l.311.31h-2.432a.75.75 0 000 1.5h4.243a.75.75 0 00.53-.219z","clip-rule":"evenodd"}})])])])])})],2)]):e._e(),e.ready&&e.jobs.length?o("div",{staticClass:"p-3 d-flex justify-content-between border-top"},[o("button",{staticClass:"btn btn-secondary btn-sm",attrs:{disabled:e.page==1},on:{click:e.previous}},[e._v("Previous")]),o("button",{staticClass:"btn btn-secondary btn-sm",attrs:{disabled:e.page>=e.totalPages},on:{click:e.next}},[e._v("Next")])]):e._e()])])},QB=[function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Job")]),e("th",{staticClass:"text-end"},[t._v("Runtime")]),e("th",[t._v("Failed")]),e("th",{staticClass:"text-end"},[t._v("Retry")])])])}],ZB=n1(GB,JB,QB,!1,null,null,null,null);const e9=ZB.exports,t9={components:{"stack-trace":Ml},data(){return{ready:!1,retrying:!1,job:{}}},mounted(){this.loadFailedJob(this.$route.params.jobId),document.title="Horizon - Failed Jobs",this.interval=setInterval(()=>{this.reloadRetries()},3e3)},destroyed(){clearInterval(this.interval)},methods:{loadFailedJob(t){this.ready=!1,this.$http.get(Horizon.basePath+"/api/jobs/failed/"+t).then(e=>{this.job=e.data,this.ready=!0})},reloadRetries(){this.$http.get(Horizon.basePath+"/api/jobs/failed/"+this.$route.params.jobId).then(t=>{this.job.retried_by=t.data.retried_by})},retry(t){this.retrying||(this.retrying=!0,this.$http.post(Horizon.basePath+"/api/jobs/retry/"+t).then(()=>{setTimeout(()=>{this.reloadRetries(),this.retrying=!1},3e3)}))},prettyPrintJob(t){try{return t.command&&!t.command.includes("CallQueuedClosure")?Et(t.command):t}catch{return t}}}};var o9=function(){var e=this,o=e._self._c;return o("div",[o("div",{staticClass:"card overflow-hidden"},[o("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e.ready?e._e():o("h2",{staticClass:"h6 m-0"},[e._v("Job Preview")]),e.ready?o("h2",{staticClass:"h6 m-0"},[e._v(e._s(e.job.name))]):e._e(),o("button",{staticClass:"btn btn-primary",on:{click:function(b){return b.preventDefault(),e.retry(e.job.id)}}},[o("svg",{staticClass:"icon",class:{spin:e.retrying},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M15.312 11.424a5.5 5.5 0 01-9.201 2.466l-.312-.311h2.433a.75.75 0 000-1.5H3.989a.75.75 0 00-.75.75v4.242a.75.75 0 001.5 0v-2.43l.31.31a7 7 0 0011.712-3.138.75.75 0 00-1.449-.39zm1.23-3.723a.75.75 0 00.219-.53V2.929a.75.75 0 00-1.5 0V5.36l-.31-.31A7 7 0 003.239 8.188a.75.75 0 101.448.389A5.5 5.5 0 0113.89 6.11l.311.31h-2.432a.75.75 0 000 1.5h4.243a.75.75 0 00.53-.219z","clip-rule":"evenodd"}})]),e._v(" Retry ")])]),e.ready?e._e():o("div",{staticClass:"d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("svg",{staticClass:"icon spin me-2 fill-text-color",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[o("path",{attrs:{d:"M12 10a2 2 0 0 1-3.41 1.41A2 2 0 0 1 10 8V0a9.97 9.97 0 0 1 10 10h-8zm7.9 1.41A10 10 0 1 1 8.59.1v2.03a8 8 0 1 0 9.29 9.29h2.02zm-4.07 0a6 6 0 1 1-7.25-7.25v2.1a3.99 3.99 0 0 0-1.4 6.57 4 4 0 0 0 6.56-1.42h2.1z"}})]),o("span",[e._v("Loading...")])]),e.ready?o("div",{staticClass:"card-body card-bg-secondary"},[o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("ID")]),o("div",{staticClass:"col"},[e._v(e._s(e.job.id))])]),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Queue")]),o("div",{staticClass:"col"},[e._v(e._s(e.job.queue))])]),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Attempts")]),o("div",{staticClass:"col"},[e._v(e._s(e.job.payload.attempts))])]),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Retries")]),o("div",{staticClass:"col"},[e._v(e._s(e.job.retried_by.length))])]),e.job.payload.retry_of?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Retry of ID")]),o("div",{staticClass:"col"},[o("a",{attrs:{href:e.Horizon.basePath+"/failed/"+e.job.payload.retry_of}},[e._v(" "+e._s(e.job.payload.retry_of)+" ")])])]):e._e(),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Tags")]),o("div",{staticClass:"col"},[e._v(e._s(e.job.payload.tags&&e.job.payload.tags.length?e.job.payload.tags.join(", "):""))])]),e.prettyPrintJob(e.job.payload.data).batchId?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Batch")]),o("div",{staticClass:"col"},[o("router-link",{attrs:{to:{name:"batches-preview",params:{batchId:e.prettyPrintJob(e.job.payload.data).batchId}}}},[e._v(" "+e._s(e.prettyPrintJob(e.job.payload.data).batchId)+" ")])],1)]):e._e(),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Pushed")]),o("div",{staticClass:"col"},[e._v(e._s(e.readableTimestamp(e.job.payload.pushedAt)))])]),o("div",{staticClass:"row"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Failed")]),o("div",{staticClass:"col"},[e._v(e._s(e.readableTimestamp(e.job.failed_at)))])])]):e._e()]),e.ready?o("div",{staticClass:"card overflow-hidden mt-4"},[e._m(0),o("div",[o("stack-trace",{attrs:{trace:e.job.exception.split(` -`)}})],1)]):e._e(),e.ready?o("div",{staticClass:"card overflow-hidden mt-4"},[e._m(1),o("div",{staticClass:"card-body code-bg text-white"},[o("vue-json-pretty",{attrs:{data:e.prettyPrintJob(e.job.context)}})],1)]):e._e(),e.ready?o("div",{staticClass:"card overflow-hidden mt-4"},[e._m(2),o("div",{staticClass:"card-body code-bg text-white"},[o("vue-json-pretty",{attrs:{data:e.prettyPrintJob(e.job.payload.data)}})],1)]):e._e(),e.ready&&e.job.retried_by.length?o("div",{staticClass:"card overflow-hidden mt-4"},[e._m(3),o("table",{staticClass:"table table-hover mb-0"},[e._m(4),o("tbody",e._l(e.job.retried_by,function(b){return o("tr",[o("td",[b.status=="completed"?o("svg",{staticClass:"fill-success",staticStyle:{width:"1.5rem",height:"1.5rem"},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"}})]):e._e(),b.status=="reserved"||b.status=="pending"?o("svg",{staticClass:"fill-warning",staticStyle:{width:"1.5rem",height:"1.5rem"},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M2 10a8 8 0 1116 0 8 8 0 01-16 0zm5-2.25A.75.75 0 017.75 7h.5a.75.75 0 01.75.75v4.5a.75.75 0 01-.75.75h-.5a.75.75 0 01-.75-.75v-4.5zm4 0a.75.75 0 01.75-.75h.5a.75.75 0 01.75.75v4.5a.75.75 0 01-.75.75h-.5a.75.75 0 01-.75-.75v-4.5z","clip-rule":"evenodd"}})]):e._e(),b.status=="failed"?o("svg",{staticClass:"fill-danger",staticStyle:{width:"1.5rem",height:"1.5rem"},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"}})]):e._e(),o("span",{staticClass:"ms-2"},[e._v(e._s(b.status.charAt(0).toUpperCase()+b.status.slice(1)))])]),o("td",{staticClass:"table-fit"},[b.status=="failed"?o("a",{attrs:{href:e.Horizon.basePath+"/failed/"+b.id}},[e._v(" "+e._s(b.id)+" ")]):o("span",[e._v(e._s(b.id))])]),o("td",{staticClass:"text-end table-fit text-muted"},[e._v(" "+e._s(e.readableTimestamp(b.retried_at))+" ")])])}),0)])]):e._e()])},M9=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Exception")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Exception Context")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Data")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Recent Retries")])])},function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Job")]),e("th",[t._v("ID")]),e("th",{staticClass:"text-end"},[t._v("Retry Time")])])])}],b9=n1(t9,o9,M9,!1,null,null,null,null);const p9=b9.exports,z9={data(){return{ready:!1,loadingNewEntries:!1,hasNewEntries:!1,page:1,previousFirstId:null,batches:[]}},mounted(){document.title="Horizon - Batches",this.loadBatches(),this.refreshBatchesPeriodically()},destroyed(){clearInterval(this.interval)},watch:{$route(){this.page=1,this.loadBatches()}},methods:{loadBatches(t="",e=!1){e||(this.ready=!1),this.$http.get(Horizon.basePath+"/api/batches?before_id="+t).then(o=>{var b,z;!this.$root.autoLoadsNewEntries&&e&&!o.data.batches.length||(!this.$root.autoLoadsNewEntries&&e&&this.batches.length&&((b=o.data.batches[0])==null?void 0:b.id)!==((z=this.batches[0])==null?void 0:z.id)?this.hasNewEntries=!0:this.batches=o.data.batches,this.ready=!0)})},loadNewEntries(){this.batches=[],this.loadBatches(0,!1),this.hasNewEntries=!1},refreshBatchesPeriodically(){this.interval=setInterval(()=>{this.page==1&&this.loadBatches("",!0)},3e3)},previous(){this.loadBatches(this.page==2?"":this.previousFirstId),this.page-=1,this.hasNewEntries=!1},next(){var t,e;this.previousFirstId=((t=this.batches[0])==null?void 0:t.id)+"0",this.loadBatches((e=this.batches.slice(-1)[0])==null?void 0:e.id),this.page+=1,this.hasNewEntries=!1}}};var n9=function(){var e=this,o=e._self._c;return o("div",[o("div",{staticClass:"card overflow-hidden"},[e._m(0),e.ready?e._e():o("div",{staticClass:"d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("svg",{staticClass:"icon spin me-2 fill-text-color",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[o("path",{attrs:{d:"M12 10a2 2 0 0 1-3.41 1.41A2 2 0 0 1 10 8V0a9.97 9.97 0 0 1 10 10h-8zm7.9 1.41A10 10 0 1 1 8.59.1v2.03a8 8 0 1 0 9.29 9.29h2.02zm-4.07 0a6 6 0 1 1-7.25-7.25v2.1a3.99 3.99 0 0 0-1.4 6.57 4 4 0 0 0 6.56-1.42h2.1z"}})]),o("span",[e._v("Loading...")])]),e.ready&&e.batches.length==0?o("div",{staticClass:"d-flex flex-column align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("span",[e._v("There aren't any batches.")])]):e._e(),e.ready&&e.batches.length>0?o("table",{staticClass:"table table-hover mb-0"},[e._m(1),o("tbody",[e.hasNewEntries?o("tr",{key:"newEntries",staticClass:"dontanimate"},[o("td",{staticClass:"text-center card-bg-secondary py-2",attrs:{colspan:"100"}},[o("small",[e.loadingNewEntries?e._e():o("a",{attrs:{href:"#"},on:{click:function(b){return b.preventDefault(),e.loadNewEntries.apply(null,arguments)}}},[e._v("Load New Entries")])]),e.loadingNewEntries?o("small",[e._v("Loading...")]):e._e()])]):e._e(),e._l(e.batches,function(b){return o("tr",{key:b.id},[o("td",[o("router-link",{attrs:{title:b.id,to:{name:"batches-preview",params:{batchId:b.id}}}},[e._v(" "+e._s(b.name||b.id)+" ")])],1),o("td",[!b.cancelledAt&&b.failedJobs>0&&b.totalJobs-b.pendingJobs0&&!b.failedJobs?o("small",{staticClass:"badge badge-secondary badge-sm"},[e._v(" Pending ")]):e._e(),b.cancelledAt?o("small",{staticClass:"badge badge-warning badge-sm"},[e._v(" Cancelled ")]):e._e()]),o("td",{staticClass:"text-end text-muted"},[e._v(e._s(b.totalJobs))]),o("td",{staticClass:"text-end text-muted"},[e._v(e._s(b.progress)+"%")]),o("td",{staticClass:"text-end table-fit"},[e._v(" "+e._s(e.formatDateIso(b.createdAt).format("YYYY-MM-DD HH:mm:ss"))+" ")])])})],2)]):e._e(),e.ready&&e.batches.length?o("div",{staticClass:"p-3 d-flex justify-content-between border-top"},[o("button",{staticClass:"btn btn-secondary btn-sm",attrs:{disabled:e.page==1},on:{click:e.previous}},[e._v("Previous")]),o("button",{staticClass:"btn btn-secondary btn-sm",attrs:{disabled:e.batches.length<50},on:{click:e.next}},[e._v("Next")])]):e._e()])])},r9=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Batches")])])},function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Batch")]),e("th",[t._v("Status")]),e("th",{staticClass:"text-end"},[t._v("Size")]),e("th",{staticClass:"text-end"},[t._v("Completion")]),e("th",{staticClass:"text-end"},[t._v("Created")])])])}],a9=n1(z9,n9,r9,!1,null,null,null,null);const c9=a9.exports,i9={data(){return{ready:!1,retrying:!1,batch:{},failedJobs:[]}},mounted(){this.loadBatch(),document.title="Horizon - Batches",this.interval=setInterval(()=>{this.loadBatch(!1)},3e3)},destroyed(){clearInterval(this.interval)},methods:{loadBatch(t=!0){t&&(this.ready=!1),this.$http.get(Horizon.basePath+"/api/batches/"+this.$route.params.batchId).then(e=>{this.batch=e.data.batch,this.failedJobs=e.data.failedJobs,this.ready=!0})},retry(t){this.retrying||(this.retrying=!0,this.$http.post(Horizon.basePath+"/api/batches/retry/"+t).then(()=>{setTimeout(()=>{this.loadBatch(!1),this.retrying=!1},3e3)}))}}};var O9=function(){var e=this,o=e._self._c;return o("div",[o("div",{staticClass:"card overflow-hidden"},[o("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e.ready?e._e():o("h2",{staticClass:"h6 m-0"},[e._v("Batch Preview")]),e.ready?o("h2",{staticClass:"h6 m-0"},[e._v(e._s(e.batch.name||e.batch.id))]):e._e(),e.failedJobs.length>0?o("button",{staticClass:"btn btn-primary",on:{click:function(b){return b.preventDefault(),e.retry(e.batch.id)}}},[o("svg",{staticClass:"icon",class:{spin:e.retrying},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M15.312 11.424a5.5 5.5 0 01-9.201 2.466l-.312-.311h2.433a.75.75 0 000-1.5H3.989a.75.75 0 00-.75.75v4.242a.75.75 0 001.5 0v-2.43l.31.31a7 7 0 0011.712-3.138.75.75 0 00-1.449-.39zm1.23-3.723a.75.75 0 00.219-.53V2.929a.75.75 0 00-1.5 0V5.36l-.31-.31A7 7 0 003.239 8.188a.75.75 0 101.448.389A5.5 5.5 0 0113.89 6.11l.311.31h-2.432a.75.75 0 000 1.5h4.243a.75.75 0 00.53-.219z","clip-rule":"evenodd"}})]),e._v(" Retry Failed Jobs ")]):e._e()]),e.ready?e._e():o("div",{staticClass:"d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("svg",{staticClass:"icon spin me-2 fill-text-color",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[o("path",{attrs:{d:"M12 10a2 2 0 0 1-3.41 1.41A2 2 0 0 1 10 8V0a9.97 9.97 0 0 1 10 10h-8zm7.9 1.41A10 10 0 1 1 8.59.1v2.03a8 8 0 1 0 9.29 9.29h2.02zm-4.07 0a6 6 0 1 1-7.25-7.25v2.1a3.99 3.99 0 0 0-1.4 6.57 4 4 0 0 0 6.56-1.42h2.1z"}})]),o("span",[e._v("Loading...")])]),e.ready?o("div",{staticClass:"card-body card-bg-secondary"},[o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("ID")]),o("div",{staticClass:"col"},[e._v(" "+e._s(e.batch.id)+" "),e.batch.failedJobs>0&&e.batch.totalJobs-e.batch.pendingJobs0&&!e.batch.failedJobs?o("small",{staticClass:"ms-1 badge badge-secondary badge-sm"},[e._v(" Pending ")]):e._e()])]),e.batch.name?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Name")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.name))])]):e._e(),e.batch.options.queue?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Queue")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.options.queue))])]):e._e(),e.batch.options.connection?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Connection")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.options.connection))])]):e._e(),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Created")]),o("div",{staticClass:"col"},[e._v(e._s(e.formatDateIso(e.batch.createdAt).format("YYYY-MM-DD HH:mm:ss")))])]),e.batch.finishedAt?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Finished")]),o("div",{staticClass:"col"},[e._v(e._s(e.formatDateIso(e.batch.finishedAt).format("YYYY-MM-DD HH:mm:ss")))])]):e._e(),e.batch.cancelledAt?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Cancelled")]),o("div",{staticClass:"col"},[e._v(e._s(e.formatDateIso(e.batch.cancelledAt).format("YYYY-MM-DD HH:mm:ss")))])]):e._e(),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Total Jobs")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.totalJobs))])]),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Pending Jobs")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.pendingJobs))])]),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Failed Jobs")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.failedJobs))])]),o("div",{staticClass:"row"},[e._m(0),o("div",{staticClass:"col"},[e._v(e._s(e.batch.processedJobs)+" ("+e._s(e.batch.progress)+"%)")])])]):e._e()]),e.ready&&e.failedJobs.length?o("div",{staticClass:"card overflow-hidden mt-4"},[e._m(1),o("table",{staticClass:"table table-hover mb-0"},[e._m(2),o("tbody",e._l(e.failedJobs,function(b){return o("tr",[o("td",[o("router-link",{attrs:{to:{name:"failed-jobs-preview",params:{jobId:b.id}}}},[e._v(" "+e._s(e.jobBaseName(b.name))+" ")])],1),o("td",{staticClass:"text-end text-muted table-fit"},[o("span",[e._v(e._s(b.failed_at&&b.reserved_at?String((b.failed_at-b.reserved_at).toFixed(2))+"s":"-"))])]),o("td",{staticClass:"text-end text-muted table-fit"},[e._v(" "+e._s(e.readableTimestamp(b.failed_at))+" ")])])}),0)])]):e._e()])},s9=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-md-2 text-muted"},[t._v("Processed Jobs"),e("br"),e("small",[t._v("(Including Failed)")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Failed Jobs")])])},function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Job")]),e("th",{staticClass:"text-end"},[t._v("Runtime")]),e("th",{staticClass:"text-end"},[t._v("Failed")])])])}],A9=n1(i9,O9,s9,!1,null,null,null,null);const d9=A9.exports,l9=[{path:"/",redirect:"/dashboard"},{path:"/dashboard",name:"dashboard",component:h8},{path:"/monitoring",name:"monitoring",component:Fy},{path:"/monitoring/:tag",component:Yy,children:[{path:"jobs",name:"monitoring-jobs",component:JO,props:{type:"jobs"}},{path:"failed",name:"monitoring-failed",component:JO,props:{type:"failed"}}]},{path:"/metrics",redirect:"/metrics/jobs"},{path:"/metrics/",component:aB,children:[{path:"jobs",name:"metrics-jobs",component:AB},{path:"queues",name:"metrics-queues",component:qB}]},{path:"/metrics/:type/:slug",name:"metrics-preview",component:TB},{path:"/jobs/:type",name:"jobs",component:IB},{path:"/jobs/pending/:jobId",name:"pending-jobs-preview",component:Bz},{path:"/jobs/completed/:jobId",name:"completed-jobs-preview",component:Bz},{path:"/jobs/silenced/:jobId",name:"silenced-jobs-preview",component:Bz},{path:"/failed",name:"failed-jobs",component:e9},{path:"/failed/:jobId",name:"failed-jobs-preview",component:p9},{path:"/batches",name:"batches",component:c9},{path:"/batches/:batchId",name:"batches-preview",component:d9}],u9={props:["type","message","autoClose","confirmationProceed","confirmationCancel"],data(){return{timeout:null,alertModal:null,anotherModalOpened:document.body.classList.contains("modal-open")}},mounted(){const t=document.getElementById("alertModal");this.alertModal=fe.getOrCreateInstance(t,{backdrop:"static"}),this.alertModal.show(),t.addEventListener("hidden.bs.modal",e=>{this.$root.alert.type=null,this.$root.alert.autoClose=!1,this.$root.alert.message="",this.$root.alert.confirmationProceed=null,this.$root.alert.confirmationCancel=null,this.anotherModalOpened&&document.body.classList.add("modal-open")},this),this.autoClose&&(this.timeout=setTimeout(()=>{this.close()},this.autoClose))},methods:{close(){clearTimeout(this.timeout),this.alertModal.hide()},confirm(){this.confirmationProceed(),this.close()},cancel(){this.confirmationCancel&&this.confirmationCancel(),this.close()}}};var f9=function(){var e=this,o=e._self._c;return o("div",{staticClass:"modal",attrs:{id:"alertModal",tabindex:"-1",role:"dialog","aria-labelledby":"alertModalLabel","aria-hidden":"true"}},[o("div",{staticClass:"modal-dialog",attrs:{role:"document"}},[o("div",{staticClass:"modal-content"},[o("div",{staticClass:"modal-body"},[o("p",{staticClass:"m-0 py-4"},[e._v(e._s(e.message))])]),o("div",{staticClass:"modal-footer justify-content-start flex-row-reverse"},[e.type=="error"?o("button",{staticClass:"btn btn-primary",on:{click:e.close}},[e._v(" Close ")]):e._e(),e.type=="success"?o("button",{staticClass:"btn btn-primary",on:{click:e.close}},[e._v(" Okay ")]):e._e(),e.type=="confirmation"?o("button",{staticClass:"btn btn-danger",on:{click:e.confirm}},[e._v(" Yes ")]):e._e(),e.type=="confirmation"?o("button",{staticClass:"btn",on:{click:e.cancel}},[e._v(" Cancel ")]):e._e()])])])])},q9=[],W9=n1(u9,f9,q9,!1,null,null,null,null);const h9=W9.exports,v9={data(){return{scheme:"system"}},watch:{scheme(t){localStorage.setItem("scheme",t)}},mounted(){this.scheme=localStorage.getItem("scheme")??"system",window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>this.calculateScheme()),this.calculateScheme()},methods:{toggleScheme(){this.scheme=="system"?this.scheme="dark":this.scheme=="dark"?this.scheme="light":this.scheme="system",this.calculateScheme()},calculateScheme(){const t=document.querySelector('link[data-scheme="dark"]');if(this.scheme=="system"){const e=window.matchMedia("(prefers-color-scheme: dark)");t.disabled=!e.matches}else t.disabled=this.scheme!="dark"}}};var m9=function(){var e=this,o=e._self._c;return o("button",{staticClass:"btn btn-muted",attrs:{title:"Switch Theme"},on:{click:function(b){return b.preventDefault(),e.toggleScheme.apply(null,arguments)}}},[e.scheme=="system"?o("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M2 4.25A2.25 2.25 0 014.25 2h11.5A2.25 2.25 0 0118 4.25v8.5A2.25 2.25 0 0115.75 15h-3.105a3.501 3.501 0 001.1 1.677A.75.75 0 0113.26 18H6.74a.75.75 0 01-.484-1.323A3.501 3.501 0 007.355 15H4.25A2.25 2.25 0 012 12.75v-8.5zm1.5 0a.75.75 0 01.75-.75h11.5a.75.75 0 01.75.75v7.5a.75.75 0 01-.75.75H4.25a.75.75 0 01-.75-.75v-7.5z","clip-rule":"evenodd"}})]):e._e(),e.scheme=="dark"?o("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M7.455 2.004a.75.75 0 01.26.77 7 7 0 009.958 7.967.75.75 0 011.067.853A8.5 8.5 0 116.647 1.921a.75.75 0 01.808.083z","clip-rule":"evenodd"}})]):e._e(),e.scheme=="light"?o("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{d:"M10 2a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 2zM10 15a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 15zM10 7a3 3 0 100 6 3 3 0 000-6zM15.657 5.404a.75.75 0 10-1.06-1.06l-1.061 1.06a.75.75 0 001.06 1.06l1.06-1.06zM6.464 14.596a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 001.06 1.06l1.06-1.06zM18 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0118 10zM5 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 015 10zM14.596 15.657a.75.75 0 001.06-1.06l-1.06-1.061a.75.75 0 10-1.06 1.06l1.06 1.06zM5.404 6.464a.75.75 0 001.06-1.06l-1.06-1.06a.75.75 0 10-1.061 1.06l1.06 1.06z"}})]):e._e()])},R9=[],g9=n1(v9,m9,R9,!1,null,null,null,null);const L9=g9.exports;let QO=document.head.querySelector('meta[name="csrf-token"]');t1.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";QO&&(t1.defaults.headers.common["X-CSRF-TOKEN"]=QO.content);$0.use(pA);$0.prototype.$http=t1.create();window.Horizon.basePath="/"+window.Horizon.path;let bl=window.Horizon.basePath+"/";(window.Horizon.path===""||window.Horizon.path==="/")&&(bl="/",window.Horizon.basePath="");const _9=new pA({routes:l9,mode:"history",base:bl});$0.component("vue-json-pretty",zm);$0.component("alert",h9);$0.component("scheme-toggler",L9);$0.mixin(l8);new $0({router:_9,data(){return{alert:{type:null,autoClose:0,message:"",confirmationProceed:null,confirmationCancel:null},autoLoadsNewEntries:localStorage.autoLoadsNewEntries==="1"}}}).$mount("#horizon")});export default N9(); +`)}})],1)]):e._e(),e.ready?o("div",{staticClass:"card overflow-hidden mt-4"},[e._m(1),o("div",{staticClass:"card-body code-bg text-white"},[o("vue-json-pretty",{attrs:{data:e.prettyPrintJob(e.job.context)}})],1)]):e._e(),e.ready?o("div",{staticClass:"card overflow-hidden mt-4"},[e._m(2),o("div",{staticClass:"card-body code-bg text-white"},[o("vue-json-pretty",{attrs:{data:e.prettyPrintJob(e.job.payload.data)}})],1)]):e._e(),e.ready&&e.job.retried_by.length?o("div",{staticClass:"card overflow-hidden mt-4"},[e._m(3),o("table",{staticClass:"table table-hover mb-0"},[e._m(4),o("tbody",e._l(e.job.retried_by,function(b){return o("tr",[o("td",[b.status=="completed"?o("svg",{staticClass:"fill-success",staticStyle:{width:"1.5rem",height:"1.5rem"},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"}})]):e._e(),b.status=="reserved"||b.status=="pending"?o("svg",{staticClass:"fill-warning",staticStyle:{width:"1.5rem",height:"1.5rem"},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M2 10a8 8 0 1116 0 8 8 0 01-16 0zm5-2.25A.75.75 0 017.75 7h.5a.75.75 0 01.75.75v4.5a.75.75 0 01-.75.75h-.5a.75.75 0 01-.75-.75v-4.5zm4 0a.75.75 0 01.75-.75h.5a.75.75 0 01.75.75v4.5a.75.75 0 01-.75.75h-.5a.75.75 0 01-.75-.75v-4.5z","clip-rule":"evenodd"}})]):e._e(),b.status=="failed"?o("svg",{staticClass:"fill-danger",staticStyle:{width:"1.5rem",height:"1.5rem"},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"}})]):e._e(),o("span",{staticClass:"ms-2"},[e._v(e._s(b.status.charAt(0).toUpperCase()+b.status.slice(1)))])]),o("td",{staticClass:"table-fit"},[b.status=="failed"?o("a",{attrs:{href:e.Horizon.basePath+"/failed/"+b.id}},[e._v(" "+e._s(b.id)+" ")]):o("span",[e._v(e._s(b.id))])]),o("td",{staticClass:"text-end table-fit text-muted"},[e._v(" "+e._s(e.readableTimestamp(b.retried_at))+" ")])])}),0)])]):e._e()])},M9=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Exception")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Exception Context")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Data")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Recent Retries")])])},function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Job")]),e("th",[t._v("ID")]),e("th",{staticClass:"text-end"},[t._v("Retry Time")])])])}],b9=n1(t9,o9,M9,!1,null,null,null,null);const p9=b9.exports,z9={data(){return{ready:!1,loadingNewEntries:!1,hasNewEntries:!1,page:1,previousFirstId:null,batches:[]}},mounted(){document.title="Horizon - Batches",this.loadBatches(),this.refreshBatchesPeriodically()},destroyed(){clearInterval(this.interval)},watch:{$route(){this.page=1,this.loadBatches()}},methods:{loadBatches(t="",e=!1){e||(this.ready=!1),this.$http.get(Horizon.basePath+"/api/batches?before_id="+t).then(o=>{var b,z;!this.$root.autoLoadsNewEntries&&e&&!o.data.batches.length||(!this.$root.autoLoadsNewEntries&&e&&this.batches.length&&((b=o.data.batches[0])==null?void 0:b.id)!==((z=this.batches[0])==null?void 0:z.id)?this.hasNewEntries=!0:this.batches=o.data.batches,this.ready=!0)})},loadNewEntries(){this.batches=[],this.loadBatches(0,!1),this.hasNewEntries=!1},refreshBatchesPeriodically(){this.interval=setInterval(()=>{this.page==1&&this.loadBatches("",!0)},3e3)},previous(){this.loadBatches(this.page==2?"":this.previousFirstId),this.page-=1,this.hasNewEntries=!1},next(){var t,e;this.previousFirstId=((t=this.batches[0])==null?void 0:t.id)+"0",this.loadBatches((e=this.batches.slice(-1)[0])==null?void 0:e.id),this.page+=1,this.hasNewEntries=!1}}};var n9=function(){var e=this,o=e._self._c;return o("div",[o("div",{staticClass:"card overflow-hidden"},[e._m(0),e.ready?e._e():o("div",{staticClass:"d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("svg",{staticClass:"icon spin me-2 fill-text-color",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[o("path",{attrs:{d:"M12 10a2 2 0 0 1-3.41 1.41A2 2 0 0 1 10 8V0a9.97 9.97 0 0 1 10 10h-8zm7.9 1.41A10 10 0 1 1 8.59.1v2.03a8 8 0 1 0 9.29 9.29h2.02zm-4.07 0a6 6 0 1 1-7.25-7.25v2.1a3.99 3.99 0 0 0-1.4 6.57 4 4 0 0 0 6.56-1.42h2.1z"}})]),o("span",[e._v("Loading...")])]),e.ready&&e.batches.length==0?o("div",{staticClass:"d-flex flex-column align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("span",[e._v("There aren't any batches.")])]):e._e(),e.ready&&e.batches.length>0?o("table",{staticClass:"table table-hover mb-0"},[e._m(1),o("tbody",[e.hasNewEntries?o("tr",{key:"newEntries",staticClass:"dontanimate"},[o("td",{staticClass:"text-center card-bg-secondary py-2",attrs:{colspan:"100"}},[o("small",[e.loadingNewEntries?e._e():o("a",{attrs:{href:"#"},on:{click:function(b){return b.preventDefault(),e.loadNewEntries.apply(null,arguments)}}},[e._v("Load New Entries")])]),e.loadingNewEntries?o("small",[e._v("Loading...")]):e._e()])]):e._e(),e._l(e.batches,function(b){return o("tr",{key:b.id},[o("td",[o("router-link",{attrs:{title:b.id,to:{name:"batches-preview",params:{batchId:b.id}}}},[e._v(" "+e._s(b.name||b.id)+" ")])],1),o("td",[!b.cancelledAt&&b.failedJobs>0&&b.totalJobs-b.pendingJobs0&&!b.failedJobs?o("small",{staticClass:"badge badge-secondary badge-sm"},[e._v(" Pending ")]):e._e(),b.cancelledAt?o("small",{staticClass:"badge badge-warning badge-sm"},[e._v(" Cancelled ")]):e._e()]),o("td",{staticClass:"text-end text-muted"},[e._v(e._s(b.totalJobs))]),o("td",{staticClass:"text-end text-muted"},[e._v(e._s(b.progress)+"%")]),o("td",{staticClass:"text-end table-fit"},[e._v(" "+e._s(e.formatDateIso(b.createdAt).format("YYYY-MM-DD HH:mm:ss"))+" ")])])})],2)]):e._e(),e.ready&&e.batches.length?o("div",{staticClass:"p-3 d-flex justify-content-between border-top"},[o("button",{staticClass:"btn btn-secondary btn-sm",attrs:{disabled:e.page==1},on:{click:e.previous}},[e._v("Previous")]),o("button",{staticClass:"btn btn-secondary btn-sm",attrs:{disabled:e.batches.length<50},on:{click:e.next}},[e._v("Next")])]):e._e()])])},r9=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Batches")])])},function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Batch")]),e("th",[t._v("Status")]),e("th",{staticClass:"text-end"},[t._v("Size")]),e("th",{staticClass:"text-end"},[t._v("Completion")]),e("th",{staticClass:"text-end"},[t._v("Created")])])])}],a9=n1(z9,n9,r9,!1,null,null,null,null);const c9=a9.exports,i9={data(){return{ready:!1,retrying:!1,batch:{},failedJobs:[]}},mounted(){this.loadBatch(),document.title="Horizon - Batches",this.interval=setInterval(()=>{this.loadBatch(!1)},3e3)},destroyed(){clearInterval(this.interval)},methods:{loadBatch(t=!0){t&&(this.ready=!1),this.$http.get(Horizon.basePath+"/api/batches/"+this.$route.params.batchId).then(e=>{this.batch=e.data.batch,this.failedJobs=e.data.failedJobs,this.ready=!0})},retry(t){this.retrying||(this.retrying=!0,this.$http.post(Horizon.basePath+"/api/batches/retry/"+t).then(()=>{setTimeout(()=>{this.loadBatch(!1),this.retrying=!1},3e3)}))}}};var O9=function(){var e=this,o=e._self._c;return o("div",[o("div",{staticClass:"card overflow-hidden"},[o("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e.ready?e._e():o("h2",{staticClass:"h6 m-0"},[e._v("Batch Preview")]),e.ready?o("h2",{staticClass:"h6 m-0"},[e._v(e._s(e.batch.name||e.batch.id))]):e._e(),e.failedJobs.length>0?o("button",{staticClass:"btn btn-primary",on:{click:function(b){return b.preventDefault(),e.retry(e.batch.id)}}},[o("svg",{staticClass:"icon",class:{spin:e.retrying},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M15.312 11.424a5.5 5.5 0 01-9.201 2.466l-.312-.311h2.433a.75.75 0 000-1.5H3.989a.75.75 0 00-.75.75v4.242a.75.75 0 001.5 0v-2.43l.31.31a7 7 0 0011.712-3.138.75.75 0 00-1.449-.39zm1.23-3.723a.75.75 0 00.219-.53V2.929a.75.75 0 00-1.5 0V5.36l-.31-.31A7 7 0 003.239 8.188a.75.75 0 101.448.389A5.5 5.5 0 0113.89 6.11l.311.31h-2.432a.75.75 0 000 1.5h4.243a.75.75 0 00.53-.219z","clip-rule":"evenodd"}})]),e._v(" Retry Failed Jobs ")]):e._e()]),e.ready?e._e():o("div",{staticClass:"d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"},[o("svg",{staticClass:"icon spin me-2 fill-text-color",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[o("path",{attrs:{d:"M12 10a2 2 0 0 1-3.41 1.41A2 2 0 0 1 10 8V0a9.97 9.97 0 0 1 10 10h-8zm7.9 1.41A10 10 0 1 1 8.59.1v2.03a8 8 0 1 0 9.29 9.29h2.02zm-4.07 0a6 6 0 1 1-7.25-7.25v2.1a3.99 3.99 0 0 0-1.4 6.57 4 4 0 0 0 6.56-1.42h2.1z"}})]),o("span",[e._v("Loading...")])]),e.ready?o("div",{staticClass:"card-body card-bg-secondary"},[o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("ID")]),o("div",{staticClass:"col"},[e._v(" "+e._s(e.batch.id)+" "),e.batch.failedJobs>0&&e.batch.totalJobs-e.batch.pendingJobs0&&!e.batch.failedJobs?o("small",{staticClass:"ms-1 badge badge-secondary badge-sm"},[e._v(" Pending ")]):e._e()])]),e.batch.name?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Name")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.name))])]):e._e(),e.batch.options.queue?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Queue")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.options.queue))])]):e._e(),e.batch.options.connection?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Connection")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.options.connection))])]):e._e(),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Created")]),o("div",{staticClass:"col"},[e._v(e._s(e.formatDateIso(e.batch.createdAt).format("YYYY-MM-DD HH:mm:ss")))])]),e.batch.finishedAt?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Finished")]),o("div",{staticClass:"col"},[e._v(e._s(e.formatDateIso(e.batch.finishedAt).format("YYYY-MM-DD HH:mm:ss")))])]):e._e(),e.batch.cancelledAt?o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Cancelled")]),o("div",{staticClass:"col"},[e._v(e._s(e.formatDateIso(e.batch.cancelledAt).format("YYYY-MM-DD HH:mm:ss")))])]):e._e(),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Total Jobs")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.totalJobs))])]),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Pending Jobs")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.pendingJobs))])]),o("div",{staticClass:"row mb-2"},[o("div",{staticClass:"col-md-2 text-muted"},[e._v("Failed Jobs")]),o("div",{staticClass:"col"},[e._v(e._s(e.batch.failedJobs))])]),o("div",{staticClass:"row"},[e._m(0),o("div",{staticClass:"col"},[e._v(e._s(e.batch.processedJobs)+" ("+e._s(e.batch.progress)+"%)")])])]):e._e()]),e.ready&&e.failedJobs.length?o("div",{staticClass:"card overflow-hidden mt-4"},[e._m(1),o("table",{staticClass:"table table-hover mb-0"},[e._m(2),o("tbody",e._l(e.failedJobs,function(b){return o("tr",[o("td",[o("router-link",{attrs:{to:{name:"failed-jobs-preview",params:{jobId:b.id}}}},[e._v(" "+e._s(e.jobBaseName(b.name))+" ")])],1),o("td",{staticClass:"text-end text-muted table-fit"},[o("span",[e._v(e._s(b.failed_at&&b.reserved_at?String((b.failed_at-b.reserved_at).toFixed(2))+"s":"-"))])]),o("td",{staticClass:"text-end text-muted table-fit"},[e._v(" "+e._s(e.readableTimestamp(b.failed_at))+" ")])])}),0)])]):e._e()])},s9=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-md-2 text-muted"},[t._v("Processed Jobs"),e("br"),e("small",[t._v("(Including Failed)")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-header d-flex align-items-center justify-content-between"},[e("h2",{staticClass:"h6 m-0"},[t._v("Failed Jobs")])])},function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Job")]),e("th",{staticClass:"text-end"},[t._v("Runtime")]),e("th",{staticClass:"text-end"},[t._v("Failed")])])])}],A9=n1(i9,O9,s9,!1,null,null,null,null);const d9=A9.exports,l9=[{path:"/",redirect:"/dashboard"},{path:"/dashboard",name:"dashboard",component:h8},{path:"/monitoring",name:"monitoring",component:Fy},{path:"/monitoring/:tag",component:Yy,children:[{path:"jobs",name:"monitoring-jobs",component:JO,props:{type:"jobs"}},{path:"failed",name:"monitoring-failed",component:JO,props:{type:"failed"}}]},{path:"/metrics",redirect:"/metrics/jobs"},{path:"/metrics/",component:aB,children:[{path:"jobs",name:"metrics-jobs",component:AB},{path:"queues",name:"metrics-queues",component:qB}]},{path:"/metrics/:type/:slug",name:"metrics-preview",component:TB},{path:"/jobs/:type",name:"jobs",component:IB},{path:"/jobs/pending/:jobId",name:"pending-jobs-preview",component:Bz},{path:"/jobs/completed/:jobId",name:"completed-jobs-preview",component:Bz},{path:"/jobs/silenced/:jobId",name:"silenced-jobs-preview",component:Bz},{path:"/failed",name:"failed-jobs",component:e9},{path:"/failed/:jobId",name:"failed-jobs-preview",component:p9},{path:"/batches",name:"batches",component:c9},{path:"/batches/:batchId",name:"batches-preview",component:d9}],u9={props:["type","message","autoClose","confirmationProceed","confirmationCancel"],data(){return{timeout:null,alertModal:null,anotherModalOpened:document.body.classList.contains("modal-open")}},mounted(){const t=document.getElementById("alertModal");this.alertModal=fe.getOrCreateInstance(t,{backdrop:"static"}),this.alertModal.show(),t.addEventListener("hidden.bs.modal",e=>{this.$root.alert.type=null,this.$root.alert.autoClose=!1,this.$root.alert.message="",this.$root.alert.confirmationProceed=null,this.$root.alert.confirmationCancel=null,this.anotherModalOpened&&document.body.classList.add("modal-open")},this),this.autoClose&&(this.timeout=setTimeout(()=>{this.close()},this.autoClose))},methods:{close(){clearTimeout(this.timeout),this.alertModal.hide()},confirm(){this.confirmationProceed(),this.close()},cancel(){this.confirmationCancel&&this.confirmationCancel(),this.close()}}};var f9=function(){var e=this,o=e._self._c;return o("div",{staticClass:"modal",attrs:{id:"alertModal",tabindex:"-1",role:"dialog","aria-labelledby":"alertModalLabel","aria-hidden":"true"}},[o("div",{staticClass:"modal-dialog",attrs:{role:"document"}},[o("div",{staticClass:"modal-content"},[o("div",{staticClass:"modal-body"},[o("p",{staticClass:"m-0 py-4"},[e._v(e._s(e.message))])]),o("div",{staticClass:"modal-footer justify-content-start flex-row-reverse"},[e.type=="error"?o("button",{staticClass:"btn btn-primary",on:{click:e.close}},[e._v(" Close ")]):e._e(),e.type=="success"?o("button",{staticClass:"btn btn-primary",on:{click:e.close}},[e._v(" Okay ")]):e._e(),e.type=="confirmation"?o("button",{staticClass:"btn btn-danger",on:{click:e.confirm}},[e._v(" Yes ")]):e._e(),e.type=="confirmation"?o("button",{staticClass:"btn",on:{click:e.cancel}},[e._v(" Cancel ")]):e._e()])])])])},q9=[],W9=n1(u9,f9,q9,!1,null,null,null,null);const h9=W9.exports,v9={data(){return{scheme:"system"}},watch:{scheme(t){localStorage.setItem("scheme",t)}},mounted(){this.scheme=localStorage.getItem("scheme")??"system",window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>this.calculateScheme()),this.calculateScheme()},methods:{toggleScheme(){this.scheme=="system"?this.scheme="dark":this.scheme=="dark"?this.scheme="light":this.scheme="system",this.calculateScheme()},calculateScheme(){const t=document.querySelector('link[data-scheme="dark"]');if(this.scheme=="system"){const e=window.matchMedia("(prefers-color-scheme: dark)");t.disabled=!e.matches}else t.disabled=this.scheme!="dark"}}};var m9=function(){var e=this,o=e._self._c;return o("button",{staticClass:"btn btn-muted",attrs:{title:"Switch Theme"},on:{click:function(b){return b.preventDefault(),e.toggleScheme.apply(null,arguments)}}},[e.scheme=="system"?o("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M2 4.25A2.25 2.25 0 014.25 2h11.5A2.25 2.25 0 0118 4.25v8.5A2.25 2.25 0 0115.75 15h-3.105a3.501 3.501 0 001.1 1.677A.75.75 0 0113.26 18H6.74a.75.75 0 01-.484-1.323A3.501 3.501 0 007.355 15H4.25A2.25 2.25 0 012 12.75v-8.5zm1.5 0a.75.75 0 01.75-.75h11.5a.75.75 0 01.75.75v7.5a.75.75 0 01-.75.75H4.25a.75.75 0 01-.75-.75v-7.5z","clip-rule":"evenodd"}})]):e._e(),e.scheme=="dark"?o("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M7.455 2.004a.75.75 0 01.26.77 7 7 0 009.958 7.967.75.75 0 011.067.853A8.5 8.5 0 116.647 1.921a.75.75 0 01.808.083z","clip-rule":"evenodd"}})]):e._e(),e.scheme=="light"?o("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[o("path",{attrs:{d:"M10 2a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 2zM10 15a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 15zM10 7a3 3 0 100 6 3 3 0 000-6zM15.657 5.404a.75.75 0 10-1.06-1.06l-1.061 1.06a.75.75 0 001.06 1.06l1.06-1.06zM6.464 14.596a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 001.06 1.06l1.06-1.06zM18 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0118 10zM5 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 015 10zM14.596 15.657a.75.75 0 001.06-1.06l-1.06-1.061a.75.75 0 10-1.06 1.06l1.06 1.06zM5.404 6.464a.75.75 0 001.06-1.06l-1.06-1.06a.75.75 0 10-1.061 1.06l1.06 1.06z"}})]):e._e()])},R9=[],g9=n1(v9,m9,R9,!1,null,null,null,null);const L9=g9.exports;let QO=document.head.querySelector("meta[name='csrf-token']");t1.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";QO&&(t1.defaults.headers.common["X-CSRF-TOKEN"]=QO.content);$0.use(pA);$0.prototype.$http=t1.create();window.Horizon.basePath="/"+window.Horizon.path;let bl=window.Horizon.basePath+"/";(window.Horizon.path===""||window.Horizon.path==="/")&&(bl="/",window.Horizon.basePath="");const _9=new pA({routes:l9,mode:"history",base:bl});$0.component("vue-json-pretty",zm);$0.component("alert",h9);$0.component("scheme-toggler",L9);$0.mixin(l8);new $0({router:_9,data(){return{alert:{type:null,autoClose:0,message:"",confirmationProceed:null,confirmationCancel:null},autoLoadsNewEntries:localStorage.autoLoadsNewEntries==="1"}}}).$mount("#horizon")});export default N9(); diff --git a/resources/js/app.js b/resources/js/app.js index 6b2f13c2..faae0c4d 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -9,7 +9,7 @@ import SchemeToggler from './components/SchemeToggler.vue'; import.meta.glob(['../img/**']); -let token = document.head.querySelector('meta[name='csrf-token']'); +let token = document.head.querySelector("meta[name='csrf-token']"); axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';