Current section
Files
Jump to
Current section
Files
dist/js/app.js
(()=>{var Is=Object.create;var Zn=Object.defineProperty;var Os=Object.getOwnPropertyDescriptor;var zs=Object.getOwnPropertyNames;var Vs=Object.getPrototypeOf,Ws=Object.prototype.hasOwnProperty;var Ns=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Bs=(e,t,l,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of zs(t))!Ws.call(e,a)&&a!==l&&Zn(e,a,{get:()=>t[a],enumerable:!(s=Os(t,a))||s.enumerable});return e};var Fs=(e,t,l)=>(l=e!=null?Is(Vs(e)):{},Bs(t||!e||!e.__esModule?Zn(l,"default",{value:e,enumerable:!0}):l,e));var tl=Ns((ln,el)=>{(function(e,t){typeof define=="function"&&define.amd?define(t):typeof ln=="object"?el.exports=t():e.NProgress=t()})(ln,function(){var e={};e.version="0.2.0";var t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};e.configure=function(m){var f,g;for(f in m)g=m[f],g!==void 0&&m.hasOwnProperty(f)&&(t[f]=g);return this},e.status=null,e.set=function(m){var f=e.isStarted();m=l(m,t.minimum,1),e.status=m===1?null:m;var g=e.render(!f),C=g.querySelector(t.barSelector),R=t.speed,V=t.easing;return g.offsetWidth,p(function(D){t.positionUsing===""&&(t.positionUsing=e.getPositioningCSS()),c(C,a(m,R,V)),m===1?(c(g,{transition:"none",opacity:1}),g.offsetWidth,setTimeout(function(){c(g,{transition:"all "+R+"ms linear",opacity:0}),setTimeout(function(){e.remove(),D()},R)},R)):setTimeout(D,R)}),this},e.isStarted=function(){return typeof e.status=="number"},e.start=function(){e.status||e.set(0);var m=function(){setTimeout(function(){!e.status||(e.trickle(),m())},t.trickleSpeed)};return t.trickle&&m(),this},e.done=function(m){return!m&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(m){var f=e.status;return f?(typeof m!="number"&&(m=(1-f)*l(Math.random()*f,.1,.95)),f=l(f+m,0,.994),e.set(f)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var m=0,f=0;e.promise=function(g){return!g||g.state()==="resolved"?this:(f===0&&e.start(),m++,f++,g.always(function(){f--,f===0?(m=0,e.done()):e.set((m-f)/m)}),this)}}(),e.render=function(m){if(e.isRendered())return document.getElementById("nprogress");z(document.documentElement,"nprogress-busy");var f=document.createElement("div");f.id="nprogress",f.innerHTML=t.template;var g=f.querySelector(t.barSelector),C=m?"-100":s(e.status||0),R=document.querySelector(t.parent),V;return c(g,{transition:"all 0 linear",transform:"translate3d("+C+"%,0,0)"}),t.showSpinner||(V=f.querySelector(t.spinnerSelector),V&&w(V)),R!=document.body&&z(R,"nprogress-custom-parent"),R.appendChild(f),f},e.remove=function(){k(document.documentElement,"nprogress-busy"),k(document.querySelector(t.parent),"nprogress-custom-parent");var m=document.getElementById("nprogress");m&&w(m)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var m=document.body.style,f="WebkitTransform"in m?"Webkit":"MozTransform"in m?"Moz":"msTransform"in m?"ms":"OTransform"in m?"O":"";return f+"Perspective"in m?"translate3d":f+"Transform"in m?"translate":"margin"};function l(m,f,g){return m<f?f:m>g?g:m}function s(m){return(-1+m)*100}function a(m,f,g){var C;return t.positionUsing==="translate3d"?C={transform:"translate3d("+s(m)+"%,0,0)"}:t.positionUsing==="translate"?C={transform:"translate("+s(m)+"%,0)"}:C={"margin-left":s(m)+"%"},C.transition="all "+f+"ms "+g,C}var p=function(){var m=[];function f(){var g=m.shift();g&&g(f)}return function(g){m.push(g),m.length==1&&f()}}(),c=function(){var m=["Webkit","O","Moz","ms"],f={};function g(D){return D.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(G,B){return B.toUpperCase()})}function C(D){var G=document.body.style;if(D in G)return D;for(var B=m.length,be=D.charAt(0).toUpperCase()+D.slice(1),Q;B--;)if(Q=m[B]+be,Q in G)return Q;return D}function R(D){return D=g(D),f[D]||(f[D]=C(D))}function V(D,G,B){G=R(G),D.style[G]=B}return function(D,G){var B=arguments,be,Q;if(B.length==2)for(be in G)Q=G[be],Q!==void 0&&G.hasOwnProperty(be)&&V(D,be,Q);else V(D,B[1],B[2])}}();function v(m,f){var g=typeof m=="string"?m:E(m);return g.indexOf(" "+f+" ")>=0}function z(m,f){var g=E(m),C=g+f;v(g,f)||(m.className=C.substring(1))}function k(m,f){var g=E(m),C;!v(m,f)||(C=g.replace(" "+f+" "," "),m.className=C.substring(1,C.length-1))}function E(m){return(" "+(m.className||"")+" ").replace(/\s+/gi," ")}function w(m){m&&m.parentNode&&m.parentNode.removeChild(m)}return e})});var Cn=Fs(tl());var ll={phoenix:[242,110,64],elixir:[75,68,115],red:[255,99,132],orange:[255,159,64],yellow:[255,205,86],green:[75,192,192],blue:[54,162,253],purple:[153,102,255],grey:[201,203,207]},nl=Object.keys(ll),sl={at:e=>{let[t,l,s]=sl.rgb(e);return`rgb(${t}, ${l}, ${s})`},rgb:e=>ll[nl[e%nl.length]]},_t={at:e=>{let[t,l,s]=sl.rgb(e);return{stroke:`rgb(${t}, ${l}, ${s})`,fill:`rgb(${t}, ${l}, ${s}, 0.1)`}}};function Hs(e,t){let l=null;function s(){l=null,e()}return function(){clearTimeout(l),l=setTimeout(s,t)}}function it(e,t,l,s){let a;l=l||0,s=s||t.length-1;let p=s<=2147483647;for(;s-l>1;)a=p?l+s>>1:je((l+s)/2),t[a]<e?l=a:s=a;return e-t[l]<=t[s]-e?l:s}function qs(e,t,l){let s=N,a=-N;for(let p=t;p<=l;p++)e[p]!=null&&(s=_e(s,e[p]),a=mt(a,e[p]));return[s,a]}function Al(e,t,l,s){let a=t-e,p=El(a||We(t)||1),c=je(p),v=gn(10,c)*l,z=a==0?v:0,k=hn(Us(e-z,v)),E=hn(Ot(t+z,v));return s&&(a==0?t>0?(k=0,E=t*2):t<0&&(E=0,k=e*2):(E-t<v&&(E+=v),e-k<v&&(k-=v),e>=0&&k<0&&(k=0),t<=0&&E>0&&(E=0))),[k,E]}var Ye=Math,We=Ye.abs,je=Ye.floor,O=Ye.round,$s=Ye.ceil,_e=Ye.min,mt=Ye.max,gn=Ye.pow,El=Ye.log10,At=Ye.PI,N=1/0;function rt(e,t){return O(e/t)*t}function il(e,t,l){return _e(mt(e,t),l)}function $e(e){return typeof e=="function"?e:()=>e}function Ot(e,t){return $s(e/t)*t}function Us(e,t){return je(e/t)*t}function Se(e){return O(e*1e3)/1e3}function hn(e){return O(e*1e6)/1e6}var Yl=Array.isArray;function Xs(e){return typeof e=="string"}function Rl(e){return typeof e=="object"&&e!==null}function ct(e){let t;if(Yl(e))t=e.map(ct);else if(Rl(e)){t={};for(var l in e)t[l]=ct(e[l])}else t=e;return t}function oe(e){let t=arguments;for(let l=1;l<t.length;l++){let s=t[l];for(let a in s)Rl(e[a])?oe(e[a],ct(s[a])):e[a]=ct(s[a])}return e}var I="width",W="height",$="top",rl="bottom",U="left",ol="right",al="firstChild",Gs="createElement",at="#000",Ll="classList",sn="mousemove",rn="mousedown",Et="mouseup",ul="mouseenter",cl="mouseleave",on="dblclick",fl="resize",hl="scroll",dl=requestAnimationFrame,dn=document,Yt=window,X=devicePixelRatio;function Ve(e,t){t!=null&&e[Ll].add(t)}function js(e,t){e[Ll].remove(t)}function T(e,t,l){e.style[t]=l+"px"}function De(e,t,l,s){let a=dn[Gs](e);return t!=null&&Ve(a,t),l?.insertBefore(a,s),a}function ye(e,t){return De("div",e,t)}function ot(e,t,l){e.style.transform="translate("+t+"px,"+l+"px)"}var Il={passive:!0};function we(e,t,l){t.addEventListener(e,l,Il)}function an(e,t,l){t.removeEventListener(e,l,Il)}var Ol=["January","February","March","April","May","June","July","August","September","October","November","December"],zl=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Vl(e){return e.slice(0,3)}var Ks=zl.map(Vl),Js=Ol.map(Vl),Qs={MMMM:Ol,MMM:Js,WWWW:zl,WWW:Ks};function dt(e){return(e<10?"0":"")+e}function Zs(e){return(e<10?"00":e<100?"0":"")+e}var ut="getFullYear",Ge="getMonth",Lt="getDate",ml="getDay",Ue="getHours",It="getMinutes",mn="getSeconds",Wl="getMilliseconds",ei={YYYY:e=>e[ut](),YY:e=>(e[ut]()+"").slice(2),MMMM:(e,t)=>t.MMMM[e[Ge]()],MMM:(e,t)=>t.MMM[e[Ge]()],MM:e=>dt(e[Ge]()+1),M:e=>e[Ge]()+1,DD:e=>dt(e[Lt]()),D:e=>e[Lt](),WWWW:(e,t)=>t.WWWW[e[ml]()],WWW:(e,t)=>t.WWW[e[ml]()],HH:e=>dt(e[Ue]()),H:e=>e[Ue](),h:e=>{let t=e[Ue]();return t==0?12:t>12?t-12:t},AA:e=>e[Ue]()>=12?"PM":"AM",aa:e=>e[Ue]()>=12?"pm":"am",a:e=>e[Ue]()>=12?"p":"a",mm:e=>dt(e[It]()),m:e=>e[It](),ss:e=>dt(e[mn]()),s:e=>e[mn](),fff:e=>Zs(e[Wl]())};function Nl(e,t){t=t||Qs;let l=[],s=/\{([a-z]+)\}|[^{]+/gi,a;for(;a=s.exec(e);)l.push(a[0][0]=="{"?ei[a[1]]:a[0]);return p=>{let c="";for(let v=0;v<l.length;v++)c+=typeof l[v]=="string"?l[v]:l[v](p,t);return c}}function ti(e,t){let l;return t=="Etc/UTC"?l=new Date(+e+e.getTimezoneOffset()*6e4):(l=new Date(e.toLocaleString("en-US",{timeZone:t})),l.setMilliseconds(e[Wl]())),l}function bn(e,t,l){let s=[];for(let a=e;a<t;a++)for(let p=0;p<l.length;p++){let c=l[p]*gn(10,a);s.push(+c.toFixed(We(a)))}return s}var xn=[1,2,5],ni=bn(-12,0,xn),Bl=bn(0,12,xn),li=ni.concat(Bl),si=1,Ee=60,ge=Ee*Ee,ee=ge*24,Xe=ee*30,Ae=ee*365,ii=[5e-4].concat(bn(-3,0,xn),[1,5,10,15,30,Ee,Ee*5,Ee*10,Ee*15,Ee*30,ge,ge*2,ge*3,ge*4,ge*6,ge*8,ge*12,ee,ee*2,ee*3,ee*4,ee*5,ee*6,ee*7,ee*8,ee*9,ee*10,ee*15,Xe,Xe*2,Xe*3,Xe*4,Xe*6,Ae,Ae*2,Ae*5,Ae*10,Ae*25,Ae*50,Ae*100]);function pl(e,t){return e.map(l=>[l[0],t(l[1]),l[2],t(l[4]?l[1]+l[3]:l[3])])}var Fl="{YYYY}",gl=`
`+Fl,Hl="{M}/{D}",Rt=`
`+Hl,ql="{aa}",ri="{h}:{mm}",un=ri+ql,bl=":{ss}",oi=[[Ae,Fl,7,"",1],[ee*28,"{MMM}",7,gl,1],[ee,Hl,7,gl,1],[ge,"{h}"+ql,4,Rt,1],[Ee,un,4,Rt,1],[si,bl,2,Rt+" "+un,1],[.001,bl+".{fff}",2,Rt+" "+un,1]];function xl(e,t){return(l,s,a,p)=>{let c=t.find(E=>p>=E[0])||t[t.length-1],v=null,z=null,k=null;return s.map((E,w)=>{let m=e(E),f=m[ut](),g=m[Lt](),C=m[It](),R=f!=v,V=g!=z,D=C!=k,G=c[2]==7&&R||c[2]==4&&V||c[2]==2&&D?c[3]:c[1];return v=f,z=g,k=C,G(m)})}}function cn(e,t,l){return new Date(e,t,l)}function ai(e){return(t,l,s,a,p)=>{let c=[],v=a>=Xe&&a<Ae,z=e(l),k=z/1e3,E=cn(z[ut](),z[Ge](),v?1:z[Lt]()),w=E/1e3;if(v){let m=a/Xe,f=k==w?k:cn(E[ut](),E[Ge]()+m,1)/1e3,g=new Date(f*1e3),C=g[ut](),R=g[Ge]();for(let V=0;f<=s;V++){let D=cn(C,R+m*V,1),G=D-e(D/1e3);f=(+D+G)/1e3,f<=s&&c.push(f)}}else{let m=a>=ee?ee:a,f=je(l)-je(k),g=w+f+Ot(k-w,m);c.push(g);let C=e(g),R=C[Ue]()+C[It]()/Ee+C[mn]()/ge,V=a/ge;for(;;){g=Se(g+a);let D=je(hn(R+V))%24,be=e(g).getHours()-D;if(be>1&&(be=-1),g-=be*ge,g>s)break;R=(R+V)%24;let Q=c[c.length-1];Se((g-Q)/a)*p>=.7&&c.push(g)}}return c}}function wl(e,t){return t(e)}var ui="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function yl(e,t){return(l,s)=>t(e(s))}function ci(e,t){let l=e.series[t],s=ye();s.style.background=l.stroke||at;let a=Sn(l.width,1),p=(a-1)/-2;return T(s,I,a),T(s,W,a),T(s,"marginLeft",p),T(s,"marginTop",p),s}var fi={show:!0,x:!0,y:!0,lock:!1,points:{show:ci},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},locked:!1,left:-10,top:-10,idx:null},wn={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},$l=oe({},wn,{size:10}),yn='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Ul="bold "+yn,hi=1.5,Sl={type:"x",show:!0,scale:"x",space:50,gap:5,size:50,labelSize:30,labelFont:Ul,side:2,grid:wn,ticks:$l,font:yn,rotate:0},di="Value",mi="Time",vl={show:!0,scale:"x",min:N,max:-N,idxs:[]},pi=new Intl.NumberFormat(navigator.language);function gi(e,t,l,s){return t.map(pi.format)}function bi(e,t,l,s,a,p){t=p?t:+Ot(t,s).toFixed(12);let c=[];for(let v=t;v<=l;v=+(v+s).toFixed(12))c.push(v);return c}function xi(e,t){return t}var kl={type:"y",show:!0,scale:"y",space:40,gap:5,size:50,labelSize:30,labelFont:Ul,side:3,grid:wn,ticks:$l,font:yn,rotate:0};function Sn(e,t){let l=3+(e||1)*2;return Se(l*t)}function wi(e,t){let l=Sn(e.series[t].width,X),s=e.bbox.width/l/2,a=e.series[0].idxs;return a[1]-a[0]<=s}var Ml={scale:"y",show:!0,band:!1,spanGaps:!1,alpha:1,points:{show:wi},values:null,min:N,max:-N,idxs:[],path:null,clip:null},pn={time:!0,auto:!1,distr:1,min:null,max:null},Cl=oe({},pn,{time:!1,auto:!0}),Tl={};function Pl(e){let t=[];return{sub(l){t.push(l)},unsub(l){t=t.filter(s=>s!=l)},pub(l,s,a,p,c,v,z){t.length>1&&t.forEach(k=>{k!=s&&k.pub(l,s,a,p,c,v,z)})}}}function Dl(e,t,l,s){return(s?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((p,c)=>Xl(p,c,t,l))}function Xl(e,t,l,s){return oe({},t==0||e&&e.side%2==0?l:s,e)}function pe(e,t,l,s){let a=(e-t.min)/(t.max-t.min);return s+(1-a)*l}function Pe(e,t,l,s){let a=(e-t.min)/(t.max-t.min);return s+a*l}function yi(e,t,l){return[t,l>t?l:l+86400]}function Si(e,t,l){let s=l-t;if(s==0){let a=El(s||We(l)||1),p=je(a)+1;return[t,Ot(l,gn(10,p))]}else return[t,l]}function vi(e,t,l){return Al(t,l,.2,!0)}function ki(e,t,l,s){let a=l/e;for(var p=0;p<t.length;p++){let c=t[p]*a;if(c>=s)return[t[p],c]}}function fn(e){return e.button==0}function _l(e){let t;return e=e.replace(/\d+/,l=>t=O(l*X)),[e,t]}function pt(e,t,l){let s={},a=s.root=ye("uplot");if(e.id!=null&&(a.id=e.id),Ve(a,e.class),e.title){let n=ye("title",a);n.textContent=e.title}let p=De("canvas"),c=s.ctx=p.getContext("2d"),v=ye("wrap",a),z=ye("under",v);v.appendChild(p);let k=ye("over",v);e=ct(e),(e.plugins||[]).forEach(n=>{n.opts&&(e=n.opts(s,e)||e)});let E=!1,w=s.series=Dl(e.series||[],vl,Ml,!1),m=s.axes=Dl(e.axes||[],Sl,kl,!0),f=s.scales=oe({},{x:pn,y:Cl},e.scales),g=oe({x:O(kl.size/2),y:O(Sl.size/3)},e.gutters),C=e.tzDate||(n=>new Date(n*1e3)),R=e.fmtDate||Nl,V=ai(C),D=xl(C,pl(oi,R)),G=yl(C,wl(ui,R)),B={};for(let n in f){let i=f[n];(i.min!=null||i.max!=null)&&(B[n]={min:i.min,max:i.max})}let Q=oe({show:!0},e.legend).show,Ne,Re=[],wt,Je=!1;if(Q){Ne=De("table","legend",a);let n=w[1]?w[1].values:null;if(Je=n!=null,Je){let i=De("tr","labels",Ne);De("th",null,i),wt=n(s,1,0);for(var hs in wt)De("th",null,i).textContent=hs}else wt={_:0},Ve(Ne,"inline")}function ds(n,i){if(i==0&&Je)return null;let r=[],o=De("tr","series",Ne,Ne.childNodes[i]);Ve(o,n.class),n.show||Ve(o,"off");let u=De("th",null,o),d=ye("ident",u);n.width&&(d.style.borderColor=n.stroke),d.style.backgroundColor=n.fill;let h=ye("text",u);h.textContent=n.label,i>0&&(we("click",u,x=>{_.locked||fn(x)&&Fe(w.indexOf(n),{show:!n.show},Oe.setSeries)}),yt&&we(ul,u,x=>{_.locked||Fe(w.indexOf(n),{focus:!0},Oe.setSeries)}));for(var b in wt){let x=De("td",null,o);x.textContent="--",r.push(x)}return r}let _=s.cursor=oe({},fi,e.cursor);_.points.show=$e(_.points.show);let Ft=s.focus=oe({},e.focus||{alpha:.3},_.focus),yt=Ft.prox>=0,ve=[null];function ms(n,i){if(i>0){let r=_.points.show(s,i);if(r)return Ve(r,"cursor-pt"),Ve(r,n.class),ot(r,-10,-10),k.insertBefore(r,ve[i]),r}}function Pn(n,i){let r=n.scale,o=f[r]=oe({},i==0?pn:Cl,f[r]),u=o.time;o.range=$e(o.range||(u?yi:i==0?Si:vi));let d=n.value;if(n.value=u?Xs(d)?yl(C,wl(d,R)):d||G:d||xi,n.label=n.label||(u?mi:di),i>0){n.width=n.width==null?1:n.width,n.paths=n.paths||Ts;let h=Sn(n.width,1);n.points=oe({},{size:h,width:mt(1,h*.2)},n.points),n.points.show=$e(n.points.show),n._paths=null}if(Q&&Re.splice(i,0,ds(n,i)),_.show){let h=ms(n,i);h&&ve.splice(i,0,h)}}function ps(n,i){i=i??w.length,n=Xl(n,i,vl,Ml),w.splice(i,0,n),Pn(w[i],i)}s.addSeries=ps;function gs(n){w.splice(n,1),Q&&Re.splice(n,1)[0][0].parentNode.remove(),ve.length>1&&ve.splice(n,1)[0].remove()}s.delSeries=gs,w.forEach(Pn);for(let n in f){let i=f[n];i.from!=null&&(f[n]=oe({},f[i.from],i))}let A=w[0].scale,St=f[A].distr;function bs(n,i){if(n.show){let r=n.side%2,o=f[n.scale];o==null&&(n.scale=r?w[1].scale:A,o=f[n.scale]);let u=o.time;n.space=$e(n.space),n.rotate=$e(n.rotate),n.incrs=$e(n.incrs||(o.distr==2?Bl:u?ii:li)),n.split=$e(n.split||(u&&o.distr==1?V:bi));let d=n.values;n.values=u?Yl(d)?xl(C,pl(d,R)):d||D:d||gi,n.font=_l(n.font),n.labelFont=_l(n.labelFont)}}m.forEach(bs);let ke,te=null,ae=null,Dn=w[0].idxs,Me=null;function _n(n,i){n=n||[],n[0]=n[0]||[],s.data=n,t=n.slice(),Me=t[0],ke=Me.length,St==2&&(t[0]=Me.map((r,o)=>o)),In(),he("setData"),i!==!1&&Ht()}s.setData=_n;function Ht(){te=Dn[0]=0,ae=Dn[1]=ke-1;let n=St==2?te:t[0][te],i=St==2?ae:t[0][ae];Ze(A,n,i)}function qt(n,i,r,o){c.strokeStyle=n||at,c.lineWidth=i,c.lineJoin="round",c.setLineDash(r||[]),c.fillStyle=o||at}let $t,Ut,Y,L,Le,Ie,j,Z,fe,ue;s.bbox={};function An(n,i){s.width=$t=Y=n,s.height=Ut=L=i,Le=Ie=0,ws(),ys();let r=s.bbox;j=r[U]=rt(Le*X,.5),Z=r[$]=rt(Ie*X,.5),fe=r[I]=rt(Y*X,.5),ue=r[W]=rt(L*X,.5),T(z,U,Le),T(z,$,Ie),T(z,I,Y),T(z,W,L),T(k,U,Le),T(k,$,Ie),T(k,I,Y),T(k,W,L),T(v,I,$t),T(v,W,Ut),p[I]=O($t*X),p[W]=O(Ut*X),Tt(),E&&Ze(A,f[A].min,f[A].max),E&&he("setSize")}function xs({width:n,height:i}){An(n,i)}s.setSize=xs;function ws(){let n=!1,i=!1,r=!1,o=!1;m.forEach((u,d)=>{if(u.show){let{side:h,size:b}=u,x=h%2,y=u.labelSize=u.label!=null?u.labelSize||30:0,S=b+y;S>0&&(x?(Y-=S,h==3?(Le+=S,o=!0):r=!0):(L-=S,h==0?(Ie+=S,n=!0):i=!0))}}),(n||i)&&(r||(Y-=g.x),o||(Y-=g.x,Le+=g.x)),(o||r)&&(i||(L-=g.y),n||(L-=g.y,Ie+=g.y))}function ys(){let n=Le+Y,i=Ie+L,r=Le,o=Ie;function u(d,h){switch(d){case 1:return n+=h,n-h;case 2:return i+=h,i-h;case 3:return r-=h,r+h;case 0:return o-=h,o+h}}m.forEach((d,h)=>{let b=d.side;d._pos=u(b,d.size),d.label!=null&&(d._lpos=u(b,d.labelSize))})}function En(){if(tt){jt=!0;return}if(ke>0){let n=ct(f);for(let r in n){let o=n[r],u=B[r];u!=null?(oe(o,u),r==A&&In()):r!=A&&(o.min=N,o.max=-N)}w.forEach((r,o)=>{let u=r.scale,d=n[u];if(o==0){let h=d.range(s,d.min,d.max);d.min=h[0],d.max=h[1],te=it(d.min,t[0]),ae=it(d.max,t[0]),t[0][te]<d.min&&te++,t[0][ae]>d.max&&ae--,r.min=Me[te],r.max=Me[ae]}else if(r.show&&B[u]==null){let h=r.min==N?d.auto?qs(t[o],te,ae):[0,100]:[r.min,r.max];d.min=_e(d.min,r.min=h[0]),d.max=mt(d.max,r.max=h[1])}r.idxs[0]=te,r.idxs[1]=ae});for(let r in n){let o=n[r];if(o.from==null&&o.min!=N&&B[r]==null){let u=o.range(s,o.min,o.max);o.min=u[0],o.max=u[1]}}for(let r in n){let o=n[r];if(o.from!=null){let u=n[o.from];if(u.min!=N){let d=o.range(s,u.min,u.max);o.min=d[0],o.max=d[1]}}}let i={};for(let r in n){let o=n[r],u=f[r];(u.min!=o.min||u.max!=o.max)&&(u.min=o.min,u.max=o.max,i[r]=!0)}w.forEach(r=>{i[r.scale]&&(r._paths=null)});for(let r in i)he("setScale",r)}for(let n in B)B[n]=null;_.show&&Ce()}function Ss(n){let i=w[n],r=i.points,o=Se(r.width*X),u=o%2/2,d=r.width>0,h=(r.size-r.width)/2*X,b=Se(h*2);c.translate(u,u),c.save(),c.beginPath(),c.rect(j-b,Z-b,fe+b*2,ue+b*2),c.clip(),c.globalAlpha=i.alpha;let x=new Path2D;for(let y=te;y<=ae;y++)if(t[n][y]!=null){let S=O(Pe(t[0][y],f[A],fe,j)),P=O(pe(t[n][y],f[i.scale],ue,Z));x.moveTo(S+h,P),x.arc(S,P,h,0,At*2)}qt(r.stroke||i.stroke||at,o,null,r.fill||(d?"#fff":i.stroke||at)),c.fill(x),d&&c.stroke(x),c.globalAlpha=1,c.restore(),c.translate(-u,-u)}function vs(n){let i=il(te-1,0,ke-1),r=il(ae+1,0,ke-1);for(;n[i]==null&&i>0;)i--;for(;n[r]==null&&r<ke-1;)r++;return[i,r]}let xe=1;function ks(){w.forEach((n,i)=>{if(i>0&&n.show&&ke>0&&n._paths==null){let r=vs(t[i]);n._paths=n.paths(s,i,r[0],r[1])}}),w.forEach((n,i)=>{i>0&&n.show&&(n._paths&&Ms(i),n.points.show(s,i,te,ae)&&Ss(i),he("drawSeries",i))})}function Ms(n){let i=w[n];if(xe==1){let{stroke:r,fill:o,clip:u}=i._paths,d=Se(i[I]*X),h=d%2/2;qt(i.stroke,d,i.dash,i.fill),c.globalAlpha=i.alpha,c.translate(h,h),c.save();let b=j,x=Z,y=fe,S=ue,P=d*X/2;i.min==0&&(S+=P),i.max==0&&(x-=P,S+=P),c.beginPath(),c.rect(b,x,y,S),c.clip(),u!=null&&c.clip(u),i.band?(c.fill(r),d&&c.stroke(r)):(d&&c.stroke(r),i.fill!=null&&c.fill(o)),c.restore(),c.translate(-h,-h),c.globalAlpha=1}i.band&&(xe*=-1)}function Cs(n,i,r,o){let u=w[n],d=null;if(i.length>0){if(u.spanGaps){let b=i[0],x=i[i.length-1];i=[],r&&i.push(b),o&&i.push(x)}d=new Path2D;let h=j;for(let b=0;b<i.length;b++){let x=i[b];d.rect(h,Z,x[0]-h,Z+ue),h=x[1]}d.rect(h,Z,j+fe-h,Z+ue)}return d}function Yn(n,i,r){let o=n[n.length-1];o&&o[0]==i?o[1]=r:n.push([i,r])}function Ts(n,i,r,o){let u=w[i],d=t[0],h=t[i],b=f[A],x=f[u.scale],y=xe==1?{stroke:new Path2D,fill:null,clip:null}:w[i-1]._paths,S=y.stroke,P=Se(u[I]*X),K=N,ie=-N,me,Te,qe=[],re=O(Pe(d[xe==1?r:o],b,fe,j));u.band&&xe==1&&r==te&&(P&&S.lineTo(-P,O(pe(h[r],x,ue,Z))),b.min<d[0]&&qe.push([j,re-1]));for(let J=xe==1?r:o;J>=r&&J<=o;J+=xe){let ce=O(Pe(d[J],b,fe,j));if(ce==re)h[J]!=null&&(me=O(pe(h[J],x,ue,Z)),K=_e(me,K),ie=mt(me,ie));else{let de=!1;K!=N?(S.lineTo(re,K),S.lineTo(re,ie),S.lineTo(re,me),Te=re):de=!0,h[J]!=null?(me=O(pe(h[J],x,ue,Z)),S.lineTo(ce,me),K=ie=me,ce-re>1&&h[J-1]==null&&(de=!0)):(K=N,ie=-N),de&&Yn(qe,Te,ce),re=ce}}if(h[o]==null&&Yn(qe,Te,re),u.band){let J=P*100,ce,de;xe==-1&&r==te&&(de=j-J,ce=r),xe==1&&o==ae&&(de=j+fe+J,ce=o,b.max>d[ke-1]&&qe.push([re,j+fe])),S.lineTo(de,O(pe(h[ce],x,ue,Z)))}if(xe==1&&(y.clip=Cs(i,qe,h[r]==null,h[o]==null),u.fill!=null)){let J=y.fill=new Path2D(S),ce=O(pe(0,x,ue,Z));J.lineTo(j+fe,ce),J.lineTo(j,ce)}return u.band&&(xe*=-1),y}function Rn(n,i,r,o){let u;if(o<=0)u=[0,0];else{let d=n.space(s,i,r,o),h=n.incrs(s,i,r,o,d);u=ki(r-i,h,o,d),u.push(u[1]/d)}return u}function Ln(n,i,r,o,u,d,h,b){let x=d%2/2;c.translate(x,x),qt(h,d,b),c.beginPath();let y,S,P,K,ie=o+(r==0||r==3?-u:u);i==0?(S=o,K=ie):(y=o,P=ie),n.forEach((me,Te)=>{i==0?y=P=me:S=K=me,c.moveTo(y,S),c.lineTo(P,K)}),c.stroke(),c.translate(-x,-x)}function Ps(){m.forEach((n,i)=>{if(!n.show)return;let r=f[n.scale];if(r.min==N)return;let o=n.side,u=o%2,{min:d,max:h}=r,[b,x,y]=Rn(n,d,h,u==0?Y:L),S=r.distr==2,P=n.split(s,d,h,b,y,S),K=u==0?Pe:pe,ie=u==0?fe:ue,me=u==0?j:Z,Te=P.map(ze=>O(K(ze,r,ie,me))),qe=O(n.gap*X),re=n.ticks,J=re.show?O(re.size*X):0,ce=n.values(s,r.distr==2?P.map(ze=>Me[ze]):P,x,r.distr==2?Me[P[1]]-Me[P[0]]:b),de=o==2?n.rotate(s,ce,x)*-At/180:0,Xn=O(n._pos*X),Rs=J+qe,Ls=u==0&&o==0||u==1&&o==3?-1:1,Gn=Xn+Rs*Ls,lt=u==0?Gn:0,st=u==1?Gn:0;c.font=n.font[0],c.fillStyle=n.stroke||at,c.textAlign=de>0?U:de<0?ol:u==0?"center":o==3?ol:U,c.textBaseline=de||u==1?"middle":o==2?$:rl;let jn=n.font[1]*hi;if(ce.forEach((ze,Kn)=>{u==0?st=Te[Kn]:lt=Te[Kn],(""+ze).split(/\n/gm).forEach((Jn,Qn)=>{de?(c.save(),c.translate(st,lt+Qn*jn),c.rotate(de),c.fillText(Jn,0,0),c.restore()):c.fillText(Jn,st,lt+Qn*jn)})}),n.label){c.save();let ze=O(n._lpos*X);u==1?(st=lt=0,c.translate(ze,O(Z+ue/2)),c.rotate((o==3?-At:At)/2)):(st=O(j+fe/2),lt=ze),c.font=n.labelFont[0],c.textAlign="center",c.textBaseline=o==2?$:rl,c.fillText(n.label,st,lt),c.restore()}re.show&&Ln(Te,u,o,Xn,J,Se(re[I]*X),re.stroke);let Dt=n.grid;Dt.show&&Ln(Te,u,u==0?2:1,u==0?Z:j,u==0?ue:fe,Se(Dt[I]*X),Dt.stroke,Dt.dash)}),he("drawAxes")}function In(){w.forEach((n,i)=>{i>0&&(n.min=N,n.max=-N,n._paths=null)})}let Qe;function vt(){if(tt){Gt=!0;return}c.clearRect(0,0,p[I],p[W]),he("drawClear"),Ps(),ks(),Qe=!0,he("draw")}s.redraw=n=>{n!==!1?Ze(A,f[A].min,f[A].max):vt()};function Xt(n,i){let r=f[n];if(r.from==null){if(n==A&&(r.distr==2&&(i.min=it(i.min,t[0]),i.max=it(i.max,t[0])),r.time&&m[0].show&&i.max>i.min&&Rn(m[0],i.min,i.max,Y)[0]<.001))return;B[n]=i,Qe=!1,En(),!Qe&&vt(),Qe=!1}}s.setScale=Xt;let On,zn,kt,Mt,F,H,Be=!1,ne=_.drag,le=ne.x,se=ne.y;if(_.show){let n="cursor-";_.x&&(F=_.left,On=ye(n+"x",k)),_.y&&(H=_.top,zn=ye(n+"y",k))}let M=s.select=oe({show:!0,left:0,width:0,top:0,height:0},e.select),q=M.show?ye("select",k):null;function Ct(n,i){if(M.show){for(let r in n)T(q,r,M[r]=n[r]);i!==!1&&he("setSelect")}}s.setSelect=Ct;function Vn(n,i){let r=w[n],o=Q?Re[n][0].parentNode:null;r.show?o&&js(o,"off"):(o&&Ve(o,"off"),ve.length>1&&ot(ve[n],0,-10))}function Ze(n,i,r){Xt(n,{min:i,max:r})}function Fe(n,i,r){let o=w[n];if(i.focus!=null&&_s(n),i.show!=null){if(o.show=i.show,Vn(n,i.show),o.band){let u=w[n+1]&&w[n+1].band?n+1:n-1;w[u].show=o.show,Vn(u,i.show)}Ze(A,f[A].min,f[A].max)}he("setSeries",n,i),r&&He.pub("setSeries",s,n,i)}s.setSeries=Fe;function Wn(n,i){w[n].alpha=i,Re&&(Re[n][0].parentNode.style.opacity=i)}function Ds(n,i){let r=w[n];if(Wn(n,i),r.band){let o=w[n+1].band?n+1:n-1;Wn(o,i)}}let ft=Array(w.length),Nn=null;function _s(n){n!=Nn&&(w.forEach((i,r)=>{Ds(r,n==null||r==0||r==n?1:Ft.alpha)}),Nn=n,vt())}Q&&yt&&we(cl,Ne,n=>{_.locked||(Fe(null,{focus:!1},Oe.setSeries),Ce())});function et(n,i){let r=Y;i!=A&&(r=L,n=r-n);let o=n/r,u=f[i],d=u.max-u.min;return u.min+o*d}function Bn(n){let i=et(n,A);return it(i,t[0],te,ae)}s.valToIdx=n=>it(n,t[0]),s.posToIdx=Bn,s.posToVal=et,s.valToPos=(n,i,r)=>i==A?Pe(n,f[i],r?fe:Y,r?j:0):pe(n,f[i],r?ue:L,r?Z:0);let tt=!1,Gt=!1,jt=!1,Kt=!1;function Fn(n){tt=!0,n(s),tt=!1,jt&&En(),Kt&&Ce(),Gt&&!Qe&&vt(),jt=Kt=Gt=Qe=tt}s.batch=Fn,s.setCursor=n=>{F=n.left,H=n.top,Ce()};let Jt=0;function Ce(n,i){if(tt){Kt=!0;return}Jt=0,_.show&&(_.x&&ot(On,O(F),0),_.y&&ot(zn,0,O(H)));let r,o=te>ae;if(F<0||ke==0||o){r=null;for(let u=0;u<w.length;u++)if(u>0&&(ft[u]=N,ve.length>1&&ot(ve[u],-10,-10)),Q){if(u==0&&Je)continue;for(let d=0;d<Re[u].length;d++)Re[u][d][al].nodeValue="--"}yt&&Fe(null,{focus:!0},Oe.setSeries)}else{r=Bn(F);let u=f[A],d=Se(Pe(t[0][r],u,Y,0));for(let h=0;h<w.length;h++){let b=w[h];if(h>0&&b.show){let x=t[h][r],y=x==null?-10:Se(pe(x,f[b.scale],L,0));ft[h]=y>0?We(y-H):N,ve.length>1&&ot(ve[h],d,y)}else ft[h]=N;if(Q){if(r==_.idx||h==0&&Je)continue;let x=h==0&&St==2?Me:t[h],y=Je?b.values(s,h,r):{_:b.value(s,x[r],h,r)},S=0;for(let P in y)Re[h][S++][al].nodeValue=y[P]}}}if(M.show&&Be){let u=We(F-kt),d=We(H-Mt);if(i!=null){let[h,b]=Oe.scales,x=i.cursor.drag;if(le=x._x,se=x._y,h){let y=f[h],S=i.posToVal(i.select[U],h),P=i.posToVal(i.select[U]+i.select[I],h);M[U]=Pe(S,y,Y,0),M[I]=We(M[U]-Pe(P,y,Y,0)),T(q,U,M[U]),T(q,I,M[I]),b||(T(q,$,M[$]=0),T(q,W,M[W]=L))}if(b){let y=f[b],S=i.posToVal(i.select[$],b),P=i.posToVal(i.select[$]+i.select[W],b);M[$]=pe(S,y,L,0),M[W]=We(M[$]-pe(P,y,L,0)),T(q,$,M[$]),T(q,W,M[W]),h||(T(q,U,M[U]=0),T(q,I,M[I]=Y))}}else{le=ne.x&&u>=ne.dist,se=ne.y&&d>=ne.dist;let h=ne.uni;if(h!=null?le&&se&&(le=u>=h,se=d>=h,!le&&!se&&(d>u?se=!0:le=!0)):ne.x&&ne.y&&(le||se)&&(le=se=!0),le){let b=_e(kt,F);T(q,U,M[U]=b),T(q,I,M[I]=u),se||(T(q,$,M[$]=0),T(q,W,M[W]=L))}if(se){let b=_e(Mt,H);T(q,$,M[$]=b),T(q,W,M[W]=d),le||(T(q,U,M[U]=0),T(q,I,M[I]=Y))}!le&&!se&&(T(q,W,M[W]=0),T(q,I,M[I]=0))}}if(_.idx=r,_.left=F,_.top=H,ne._x=le,ne._y=se,n!=null&&(He.pub(sn,s,F,H,Y,L,r),yt)){let u=_e.apply(null,ft),d=null;u<=Ft.prox&&ft.some((h,b)=>{if(h==u)return d=b}),Fe(d,{focus:!0},Oe.setSeries)}E&&he("setCursor")}let Qt=null;function Tt(){Qt=k.getBoundingClientRect()}function Hn(n,i,r,o,u,d,h){_.locked||(Zt(n,i,r,o,u,d,h,!1,n!=null),n!=null?Jt==0&&(Jt=dl(Ce)):Ce(null,i))}function Zt(n,i,r,o,u,d,h,b,x){if(n!=null)r=n.clientX-Qt.left,o=n.clientY-Qt.top;else{if(r<0||o<0){F=-10,H=-10;return}let[y,S]=Oe.scales;y!=null?r=Pe(i.posToVal(r,y),f[y],Y,0):r=Y*(r/u),S!=null?o=pe(i.posToVal(o,S),f[S],L,0):o=L*(o/d)}x&&((r<=1||r>=Y-1)&&(r=rt(r,Y)),(o<=1||o>=L-1)&&(o=rt(o,L))),b?(kt=r,Mt=o):(F=r,H=o)}function qn(){Ct({width:0,height:0},!1)}function $n(n,i,r,o,u,d,h){(i!=null||fn(n))&&(Be=!0,le=se=ne._x=ne._y=!1,Zt(n,i,r,o,u,d,h,!0,!1),n!=null&&(we(Et,dn,en),He.pub(rn,s,kt,Mt,Y,L,null)))}function en(n,i,r,o,u,d,h){if(i!=null||fn(n)){Be=ne._x=ne._y=!1,Zt(n,i,r,o,u,d,h,!1,!0);let b=M[I]>0||M[W]>0;b&&Ct(M),ne.setScale&&b?(Fn(()=>{if(le&&Ze(A,et(M[U],A),et(M[U]+M[I],A)),se)for(let x in f){let y=f[x];x!=A&&y.from==null&&Ze(x,et(M[$]+M[W],x),et(M[$],x))}}),qn()):_.lock&&(_.locked=!_.locked,_.locked||Ce())}n!=null&&(an(Et,dn,en),He.pub(Et,s,F,H,Y,L,null))}function As(n,i,r,o,u,d,h){if(!_.locked){let b=Be;if(Be){let x=!0,y=!0,S=10;if(le&&se&&(x=F<=S||F>=Y-S,y=H<=S||H>=L-S),le&&x){let P=F,K=Y-F,ie=_e(P,K);ie==P&&(F=0),ie==K&&(F=Y)}if(se&&y){let P=H,K=L-H,ie=_e(P,K);ie==P&&(H=0),ie==K&&(H=L)}Ce(1),Be=!1}F=-10,H=-10,Ce(1),b&&(Be=b)}}function Un(n,i,r,o,u,d,h){Ht(),qn(),n!=null&&He.pub(on,s,F,H,Y,L,null)}let nt={};nt[rn]=$n,nt[sn]=Hn,nt[Et]=en,nt[on]=Un,nt.setSeries=(n,i,r,o)=>{Fe(r,o)};let ht;_.show&&(we(rn,k,$n),we(sn,k,Hn),we(ul,k,Tt),we(cl,k,n=>{dl(As)}),we(on,k,Un),ht=Hs(Tt,100),we(fl,Yt,ht),we(hl,Yt,ht),s.syncRect=Tt);let Pt=s.hooks=e.hooks||{};function he(n,i,r){n in Pt&&Pt[n].forEach(o=>{o.call(null,s,i,r)})}(e.plugins||[]).forEach(n=>{for(let i in n.hooks)Pt[i]=(Pt[i]||[]).concat(n.hooks[i])});let Oe=oe({key:null,setSeries:!1,scales:[A,null]},_.sync),tn=Oe.key,He=tn!=null?Tl[tn]=Tl[tn]||Pl():Pl();He.sub(s);function Es(n,i,r,o,u,d,h){nt[n](null,i,r,o,u,d,h)}s.pub=Es;function Ys(){He.unsub(s),an(fl,Yt,ht),an(hl,Yt,ht),a.remove(),he("destroy")}s.destroy=Ys;function nn(){An(e[I],e[W]),he("init",e,t),_n(t||e.data,!1),B[A]?Xt(A,B[A]):Ht(),Ct(M,!1),E=!0,he("ready")}return l?l instanceof HTMLElement?(l.appendChild(a),nn()):l(s,nn):nn(),s}pt.assign=oe;pt.rangeNum=Al;pt.fmtDate=Nl,pt.tzDate=ti;var gt=pt;var Mi=(e,t,l)=>Ti(e-t,l)+t,Ci=(e,t)=>e-t;function Ti(e,t){return Math.floor(e/t)*t}function Pi(e,t){let l=[...e.values()];t&&l.sort((p,c)=>t(p.value,c.value));let s=Array(l.length),a=Array(l.length);for(let p=0;p<l.length;p++)s[p]=l[p].value,a[p]=l[p].count;return[s,a]}var Gl=({bucketSize:e=20})=>+e,zt=class{constructor(t,l){this.chart=t,this.datasets=new Map,this.options=l,this.bucketSize=Gl(l),this.histOffset=0}handleMeasurements(t){t.forEach(({y:l})=>{if(l==null)return;l=Mi(l,this.histOffset,this.bucketSize);let s=this.datasets.get(l);s?s.count++:this.datasets.set(l,{value:l,count:1})}),this.chart.setData(Pi(this.datasets,Ci))}static initialData(){return[[],[]]}static getConfig(t){let l=Gl(t),s=gt.paths.bars({align:1,size:[1,1/0],gap:4});return{title:t.title,width:t.width,height:t.height,scales:{x:{time:!1,auto:!1,dir:1,range:a=>[a.data[0][0],a.data[0][a.data[0].length-1]+l]}},axes:[{incrs:()=>[0,1,2,3,4,5,6,7,8,9,10].map(a=>a*l),splits:(a,p,c,v,z,k)=>{let E=a.axes[p]._space,w=a.valToPos(a.data[0][0]+l,"x")-a.valToPos(a.data[0][0],"x"),m=a.data[0][0],f=a.data[0][a.data[0].length-1]+l,g=[],C=Math.ceil(E/w);for(let R=0,V=m;V<=f;R++,V+=l)!(R%C)&&g.push(V);return g}}],series:[{label:t.label,value:(a,p)=>p+`-${p+l} ${t.unit}`},{paths:s,points:{show:!1},..._t.at(1),width:2,label:"Events"}]}}};var Di=e=>e.unit?{value:(t,l)=>l==null?"--":l.toFixed(3)+` ${e.unit}`}:{},Kl=e=>({value:"{YYYY}-{MM}-{DD} {HH}:{mm}:{ss}"}),_i=e=>e.unit?{values:(t,l,s)=>l.map(a=>+a.toFixed(2)+` ${e.unit}`)}:{},Jl=e=>({space:55,values:[[3600*24*365,"{YYYY}",null,null,null,null,null,null,1],[3600*24*28,"{MMM}",`
{YYYY}`,null,null,null,null,null,1],[3600*24,"{M}/{D}",`
{YYYY}`,null,null,null,null,null,1],[3600,"{h}{aa}",`
{M}/{D}/{YY}`,null,`
{M}/{D}`,null,null,null,1],[60,"{h}:{mm}{aa}",`
{M}/{D}/{YY}`,null,`
{M}/{D}`,null,null,null,1],[1,":{ss}",`
{M}/{D}/{YY} {h}:{mm}{aa}`,null,`
{M}/{D} {h}:{mm}{aa}`,null,`
{h}:{mm}{aa}`,null,1],[.001,":{ss}.{fff}",`
{M}/{D}/{YY} {h}:{mm}{aa}`,null,`
{M}/{D} {h}:{mm}{aa}`,null,`
{h}:{mm}{aa}`,null,1]]}),Ql=e=>({show:!0,size:70,space:15,..._i(e)}),Vt={width:100,height:300},Zl={sync:{key:"metrics-live"}};function Ai(e,t){let l=!1;return()=>{l||(requestAnimationFrame(e),l=!0,setTimeout(()=>{l=!1},t))}}var Wt=(e,t=0)=>({..._t.at(t),...Di(e),label:e.label,spanGaps:!0,points:{show:!1}}),es=e=>e.slice(0).map(({data:t})=>t);function Ei({y:e,z:t},l){this.datasets[0].data.push(t);let s=this.datasets[1].data[this.datasets[1].data.length-1]||0,a=l.call(this,e,s);this.datasets[1].data.push(a)}var vn=e=>e.reduceRight((t,l)=>l!=null&&t==null?l:t,null);function Yi({x:e,y:t,z:l},s){let a=this.datasets.findIndex(({key:p})=>e===p);a===-1&&(a=this.datasets.push({key:e,data:Array(this.datasets[0].data.length).fill(null)})-1,this.chart.addSeries(Wt({label:e,unit:this.options.unit},a-1),a)),this.datasets=this.datasets.map((p,c)=>(c===0?p.data.push(l):c===a?p.data.push(s.call(this,t,vn(p.data)||0)):p.data.push(null),p))}var ts=({pruneThreshold:e=1e3})=>e,bt=class{static __projections(){return{counter:(t,l)=>l+1,last_value:t=>t,sum:(t,l)=>l+t}}static getConfig(t){return{class:t.kind,title:t.title,width:t.width,height:t.height,cursor:Zl,series:[{...Kl()},Wt(t,0)],scales:{x:{min:t.now-60,max:t.now},y:{min:0,max:1}},axes:[Jl(),Ql(t)]}}static initialData(){return[[],[]]}constructor(t,l){this.__callback=this.constructor.__projections()[l.metric],this.chart=t,this.datasets=[{key:"|x|",data:[]}],this.options=l,this.pruneThreshold=ts(l),l.tagged?(this.chart.delSeries(1),this.__handler=Yi):(this.datasets.push({key:l.label,data:[]}),this.__handler=Ei)}handleMeasurements(t){t.forEach(s=>this.__handler.call(this,s,this.__callback)),this.datasets[0].data.length>=this.pruneThreshold&&(this.datasets=this.datasets.map(({data:s,...a})=>({data:s.slice(-this.pruneThreshold),...a}))),this.chart.setData(es(this.datasets))}},xt=class{constructor(t,l){let s=this.constructor.getConfig(t);s.series[1].values=this.__seriesValues.bind(this),this.datasets=[{key:"|x|",data:[]}],this.chart=new gt(s,this.constructor.initialData(t),l),this.pruneThreshold=ts(t),this.options=t,t.tagged?(this.chart.delSeries(1),this.__handler=this.handleTaggedMeasurement.bind(this)):(this.datasets.push(this.constructor.newDataset(t.label)),this.__handler=this.handleMeasurement.bind(this))}handleMeasurements(t){t.forEach(l=>this.__handler(l)),this.__maybePruneDatasets(),this.chart.setData(es(this.datasets))}handleTaggedMeasurement(t){let l=this.findOrCreateSeries(t.x);this.handleMeasurement(t,l)}handleMeasurement(t,l=1){let{z:s}=t;this.datasets=this.datasets.map((a,p)=>(a.key==="|x|"?a.data.push(s):p===l?this.pushToDataset(a,t):this.pushToDataset(a,null),a))}findOrCreateSeries(t){let l=this.datasets.findIndex(({key:s})=>t===s);if(l===-1){l=this.datasets.push(this.constructor.newDataset(t,this.datasets[0].data.length))-1;let s={values:this.__seriesValues.bind(this),...Wt({label:t},l-1)};this.chart.addSeries(s,l)}return l}pushToDataset(t,l){if(l===null){t.data.push(null),t.agg.avg.push(null),t.agg.max.push(null),t.agg.min.push(null);return}let{y:s}=l;return t.agg.count++,t.agg.total+=s,t.data.push(s),(t.last.min===null||s<t.last.min)&&(t.last.min=s),t.agg.min.push(t.last.min),(t.last.max===null||s>t.last.max)&&(t.last.max=s),t.agg.max.push(t.last.max),t.agg.avg.push(t.agg.total/t.agg.count),t}__maybePruneDatasets(){if(this.datasets[0].data.length>this.pruneThreshold){let l=-this.pruneThreshold;this.datasets=this.datasets.map(({key:s,data:a,agg:p})=>{let c=a.slice(l);if(!p)return{key:s,data:c};let{avg:v,count:z,max:k,min:E,total:w}=p,m=E.slice(l),f=k.slice(l);return{key:s,data:c,agg:{avg:v.slice(l),count:z,min:m,max:f,total:w},last:{min:vn(m),max:vn(f)}}})}}__seriesValues(t,l,s){let a=this.datasets[l];if(a&&a.data&&a.data[s]){let{agg:{avg:p,max:c,min:v},data:z}=a;return{Value:z[s].toFixed(3),Min:v[s].toFixed(3),Max:c[s].toFixed(3),Avg:p[s].toFixed(3)}}else return{Value:"--",Min:"--",Max:"--",Avg:"--"}}static initialData(){return[[],[]]}static getConfig(t){return{class:t.kind,title:t.title,width:t.width,height:t.height,cursor:Zl,series:[{...Kl()},Wt(t,0)],scales:{x:{min:t.now-60,max:t.now},y:{min:0,max:1}},axes:[Jl(),Ql(t)]}}static newDataset(t,l=0){let s=l>0?Array(l).fill(null):[];return{key:t,data:[...s],agg:{avg:[...s],count:0,max:[...s],min:[...s],total:0},last:{max:null,min:null}}}},jl={counter:bt,last_value:bt,sum:bt,summary:xt,distribution:zt},kn=class{constructor(t,l){if(l.metric){if(l.metric&&!jl[l.metric])throw new TypeError(`No metric defined for type ${l.metric}`)}else throw new TypeError("No metric type was provided");let s=jl[l.metric];s===xt?(this.metric=new xt(l,t),this.uplotChart=this.metric.chart):(this.uplotChart=new gt(s.getConfig(l),s.initialData(l),t),this.metric=new s(this.uplotChart,l));let a=typeof l.refreshInterval<"u";this._isBufferingData=a,this._buffer=[],this._timer=a?setInterval(this._flushToChart.bind(this),+l.refreshInterval):null}clearTimers(){clearInterval(this._timer)}resize(t){this.uplotChart.setSize({width:Math.max(t.width,Vt.width),height:Vt.height})}pushData(t){if(!t.length)return;(this._isBufferingData?this._pushToBuffer:this._pushToChart).call(this,t)}_pushToBuffer(t){this._buffer=this._buffer.concat(t)}_pushToChart(t){this.metric.handleMeasurements(t)}_flushToChart(){let t=this._flushBuffer();!t.length||this._pushToChart(t)}_flushBuffer(){if(this._buffer&&!this._buffer.length)return[];let t=this._buffer;return this._buffer=[],t.reduce((l,s)=>l.concat(s),[])}},Ri={mounted(){let e=this.el.parentElement.querySelector(".chart"),t=e.getBoundingClientRect(),l=Object.assign({},e.dataset,{tagged:e.dataset.tags&&e.dataset.tags!==""||!1,width:Math.max(t.width,Vt.width),height:Vt.height,now:new Date/1e3,refreshInterval:1e3});this.chart=new kn(e,l),window.addEventListener("resize",Ai(()=>{let s=e.getBoundingClientRect();this.chart.resize(s)}))},updated(){let e=Array.from(this.el.children||[]).map(({dataset:{x:t,y:l,z:s}})=>({x:t,y:+l,z:+s/1e6}));e.length>0&&this.chart.pushData(e)},destroyed(){this.chart.clearTimers()}},ns=Ri;var Li=e=>{let t=`${e.key}=${e.value};path=/`;window.location.protocol==="https:"&&(t+=";samesite=strict"),e.domain&&(t+=`;domain=${e.domain}`),document.cookie=t},Ii=e=>{let t="Thu, 01 Jan 1970 00:00:00 GMT";document.cookie=`${e.key}=; expires=${t}`},Oi=e=>e.el.hasAttribute("data-cookie-enabled"),zi=e=>({key:e.el.getAttribute("data-cookie-key"),value:e.el.getAttribute("data-cookie-value"),domain:e.el.getAttribute("data-cookie-domain")}),Vi={updated(){let e=zi(this);Ii(e),Oi(this)&&Li(e)}},ls=Vi;var Wi=e=>{if(!navigator.clipboard)e.select(),e.setSelectionRange(0,99999),document.execCommand("copy");else{let t=e.value;navigator.clipboard.writeText(t)}},Ni={mounted(){this.el.querySelector(".btn-primary").addEventListener("click",e=>{let t=this.el.querySelector("textarea");Wi(t);let l=this.el.querySelector(".copy-indicator");l.setAttribute("data-enabled","false"),l.offsetWidth,l.setAttribute("data-enabled","true")})}},ss=Ni;var Bi={updated(){if(this.el.querySelector(".logger-autoscroll-checkbox").checked){let e=this.el.querySelector("#logger-messages");e.scrollTop=e.scrollHeight}}},is=Bi;var os=".progress-bar, .color-bar-legend-entry",Nt,rs=e=>{e.querySelectorAll(os).forEach(t=>{if(Nt){let l=t.getAttribute("data-name")!==Nt;t.setAttribute("data-muted",l)}else t.removeAttribute("data-muted")})},Fi={mounted(){this.el.setAttribute("data-highlight-enabled","true"),this.el.querySelectorAll(os).forEach(e=>e.addEventListener("click",t=>{let l=t.currentTarget.getAttribute("data-name");Nt=l===Nt?null:l,rs(this.el)}))},updated(){this.el.setAttribute("data-highlight-enabled","true"),rs(this.el)}},as=Fi;var us="_refresh_data";function cs(e,t){let l=JSON.stringify(e),s=$i(l);qi(us,s,t,15768e4)}function Bt(){let e=Hi(us);if(e){let t=Ui(e);return JSON.parse(t)}else return null}function Hi(e){let t=document.cookie.split("; ").find(l=>l.startsWith(`${e}=`));return t?t.replace(`${e}=`,""):null}function qi(e,t,l,s){let a=`${e}=${t};max-age=${s};path=${l}`;document.cookie=a}function $i(e){return btoa(unescape(encodeURIComponent(e)))}function Ui(e){return decodeURIComponent(escape(atob(e)))}var Xi={updated(){let e=Bt()||{};e[this.el.dataset.page]=this.el.value,cs(e,this.el.dataset.dashboardMountPath)}},fs=Xi;var Gi={PhxChartComponent:ns,PhxRequestLoggerCookie:ls,PhxRequestLoggerQueryParameter:ss,PhxRequestLoggerMessages:is,PhxColorBarHighlight:as,PhxRememberRefresh:fs},ji=document.querySelector("html").getAttribute("phx-socket")||"/live",Ki=document.querySelector("meta[name='csrf-token']").getAttribute("content"),Tn=new LiveView.LiveSocket(ji,Phoenix.Socket,{hooks:Gi,params:e=>({_csrf_token:Ki,refresh_data:Bt()})}),Ke=Tn.socket,Ji=Ke.onConnError,Mn=!0;Ke.onOpen(()=>{Mn=!1});Ke.onConnError=(...e)=>{Mn?(Mn=!1,Ke.disconnect(null,3e3),Ke.transport=Phoenix.LongPoll,Ke.connect()):Ji.apply(Ke,e)};window.addEventListener("phx:page-loading-start",e=>Cn.default.start());window.addEventListener("phx:page-loading-stop",e=>Cn.default.done());Tn.connect();window.liveSocket=Tn;})();
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */