18 lines
61 KiB
JavaScript
18 lines
61 KiB
JavaScript
(()=>{var Zr=Object.create;var Rs=Object.defineProperty;var Qr=Object.getOwnPropertyDescriptor;var Xr=Object.getOwnPropertyNames;var eo=Object.getPrototypeOf,to=Object.prototype.hasOwnProperty;var lo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var no=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Xr(t))!to.call(e,r)&&r!==n&&Rs(e,r,{get:()=>t[r],enumerable:!(s=Qr(t,r))||s.enumerable});return e};var so=(e,t,n)=>(n=e!=null?Zr(eo(e)):{},no(t||!e||!e.__esModule?Rs(n,"default",{value:e,enumerable:!0}):n,e));var Vs=lo((En,zs)=>{(function(e,t){typeof define=="function"&&define.amd?define(t):typeof En=="object"?zs.exports=t():e.NProgress=t()})(En,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(u){var w,x;for(w in u)x=u[w],x!==void 0&&u.hasOwnProperty(w)&&(t[w]=x);return this},e.status=null,e.set=function(u){var w=e.isStarted();u=n(u,t.minimum,1),e.status=u===1?null:u;var x=e.render(!w),M=x.querySelector(t.barSelector),L=t.speed,N=t.easing;return x.offsetWidth,f(function(E){t.positionUsing===""&&(t.positionUsing=e.getPositioningCSS()),c(M,r(u,L,N)),u===1?(c(x,{transition:"none",opacity:1}),x.offsetWidth,setTimeout(function(){c(x,{transition:"all "+L+"ms linear",opacity:0}),setTimeout(function(){e.remove(),E()},L)},L)):setTimeout(E,L)}),this},e.isStarted=function(){return typeof e.status=="number"},e.start=function(){e.status||e.set(0);var u=function(){setTimeout(function(){!e.status||(e.trickle(),u())},t.trickleSpeed)};return t.trickle&&u(),this},e.done=function(u){return!u&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(u){var w=e.status;return w?(typeof u!="number"&&(u=(1-w)*n(Math.random()*w,.1,.95)),w=n(w+u,0,.994),e.set(w)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var u=0,w=0;e.promise=function(x){return!x||x.state()==="resolved"?this:(w===0&&e.start(),u++,w++,x.always(function(){w--,w===0?(u=0,e.done()):e.set((u-w)/u)}),this)}}(),e.render=function(u){if(e.isRendered())return document.getElementById("nprogress");d(document.documentElement,"nprogress-busy");var w=document.createElement("div");w.id="nprogress",w.innerHTML=t.template;var x=w.querySelector(t.barSelector),M=u?"-100":s(e.status||0),L=document.querySelector(t.parent),N;return c(x,{transition:"all 0 linear",transform:"translate3d("+M+"%,0,0)"}),t.showSpinner||(N=w.querySelector(t.spinnerSelector),N&&y(N)),L!=document.body&&d(L,"nprogress-custom-parent"),L.appendChild(w),w},e.remove=function(){g(document.documentElement,"nprogress-busy"),g(document.querySelector(t.parent),"nprogress-custom-parent");var u=document.getElementById("nprogress");u&&y(u)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var u=document.body.style,w="WebkitTransform"in u?"Webkit":"MozTransform"in u?"Moz":"msTransform"in u?"ms":"OTransform"in u?"O":"";return w+"Perspective"in u?"translate3d":w+"Transform"in u?"translate":"margin"};function n(u,w,x){return u<w?w:u>x?x:u}function s(u){return(-1+u)*100}function r(u,w,x){var M;return t.positionUsing==="translate3d"?M={transform:"translate3d("+s(u)+"%,0,0)"}:t.positionUsing==="translate"?M={transform:"translate("+s(u)+"%,0)"}:M={"margin-left":s(u)+"%"},M.transition="all "+w+"ms "+x,M}var f=function(){var u=[];function w(){var x=u.shift();x&&x(w)}return function(x){u.push(x),u.length==1&&w()}}(),c=function(){var u=["Webkit","O","Moz","ms"],w={};function x(E){return E.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(v,C){return C.toUpperCase()})}function M(E){var v=document.body.style;if(E in v)return E;for(var C=u.length,D=E.charAt(0).toUpperCase()+E.slice(1),R;C--;)if(R=u[C]+D,R in v)return R;return E}function L(E){return E=x(E),w[E]||(w[E]=M(E))}function N(E,v,C){v=L(v),E.style[v]=C}return function(E,v){var C=arguments,D,R;if(C.length==2)for(D in v)R=v[D],R!==void 0&&v.hasOwnProperty(D)&&N(E,D,R);else N(E,C[1],C[2])}}();function m(u,w){var x=typeof u=="string"?u:_(u);return x.indexOf(" "+w+" ")>=0}function d(u,w){var x=_(u),M=x+w;m(x,w)||(u.className=M.substring(1))}function g(u,w){var x=_(u),M;!m(u,w)||(M=x.replace(" "+w+" "," "),u.className=M.substring(1,M.length-1))}function _(u){return(" "+(u.className||"")+" ").replace(/\s+/gi," ")}function y(u){u&&u.parentNode&&u.parentNode.removeChild(u)}return e})});var ss=so(Vs());var Ns={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]},Fs=Object.keys(Ns),Os={at:e=>{let[t,n,s]=Os.rgb(e);return`rgb(${t}, ${n}, ${s})`},rgb:e=>Ns[Fs[e%Fs.length]]},Ol={at:e=>{let[t,n,s]=Os.rgb(e);return{stroke:`rgb(${t}, ${n}, ${s})`,fill:`rgb(${t}, ${n}, ${s}, 0.1)`}}};var ve="u-",io="uplot",ro=ve+"hz",oo=ve+"vt",ao=ve+"title",uo=ve+"wrap",co=ve+"under",fo=ve+"over",ho=ve+"axis",Tt=ve+"off",po=ve+"select",mo=ve+"cursor-x",go=ve+"cursor-y",wo=ve+"cursor-pt",So=ve+"legend",vo=ve+"live",_o=ve+"inline",yo=ve+"thead",bo=ve+"series",xo=ve+"marker",Hs=ve+"label",ko=ve+"value",pl="width",ml="height",hl="top",Is="bottom",Yt="left",Pn="right",Yn="#000",Ws=Yn+"0",Bs="mousemove",Ys="mousedown",An="mouseup",Gs="mouseenter",qs="mouseleave",Us="dblclick",Mo="resize",To="scroll",$s="change",Yl="dppxchange",jt=typeof window<"u",Nn=jt?document:null,Ut=jt?window:null,Do=jt?navigator:null,te,Hl;function On(){let e=devicePixelRatio;te!=e&&(te=e,Hl&&In($s,Hl,On),Hl=matchMedia(`(min-resolution: ${te-.001}dppx) and (max-resolution: ${te+.001}dppx)`),Ct($s,Hl,On),Ut.dispatchEvent(new CustomEvent(Yl)))}function $e(e,t){if(t!=null){let n=e.classList;!n.contains(t)&&n.add(t)}}function Hn(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function ce(e,t,n){e.style[t]=n+"px"}function ct(e,t,n,s){let r=Nn.createElement(e);return t!=null&&$e(r,t),n?.insertBefore(r,s),r}function et(e,t){return ct("div",e,t)}var Ks=new WeakMap;function Gt(e,t,n,s,r){let f="translate("+t+"px,"+n+"px)",c=Ks.get(e);f!=c&&(e.style.transform=f,Ks.set(e,f),t<0||n<0||t>s||n>r?$e(e,Tt):Hn(e,Tt))}var js=new WeakMap;function Co(e,t,n){let s=t+n,r=js.get(e);s!=r&&(js.set(e,s),e.style.background=t,e.style.borderColor=n)}var Js=new WeakMap;function Eo(e,t,n,s){let r=t+""+n,f=Js.get(e);r!=f&&(Js.set(e,r),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=s?-t/2+"px":0,e.style.marginTop=s?-n/2+"px":0)}var Gn={passive:!0},xi={...Gn,capture:!0};function Ct(e,t,n,s){t.addEventListener(e,n,s?xi:Gn)}function In(e,t,n,s){t.removeEventListener(e,n,s?xi:Gn)}jt&&On();function vt(e,t,n,s){let r;n=n||0,s=s||t.length-1;let f=s<=2147483647;for(;s-n>1;)r=f?n+s>>1:Ke((n+s)/2),t[r]<e?n=r:s=r;return e-t[n]<=t[s]-e?n:s}function $t(e,t,n,s){for(let r=s==1?t:n;r>=t&&r<=n;r+=s)if(e[r]!=null)return r;return-1}function Po(e,t,n,s){let r=Q,f=-Q;if(s==1)r=e[t],f=e[n];else if(s==-1)r=e[n],f=e[t];else for(let c=t;c<=n;c++)e[c]!=null&&(r=Ge(r,e[c]),f=Le(f,e[c]));return[r,f]}function Ao(e,t,n){let s=Q,r=-Q;for(let f=t;f<=n;f++)e[f]>0&&(s=Ge(s,e[f]),r=Le(r,e[f]));return[s==Q?1:s,r==-Q?10:r]}var Ln=[0,0];function Zs(e,t,n,s){return Ln[0]=n<0?oe(e,-n):e,Ln[1]=s<0?oe(t,-s):t,Ln}function $l(e,t,n,s){let r=Vo(e),f=n==10?Et:ki;e==t&&(r==-1?(e*=n,t/=n):(e/=n,t*=n));let c,m,d;return s?(c=Ke(f(e)),m=Kn(f(t)),d=Zs(_t(n,c),_t(n,m),c,m),e=d[0],t=d[1]):(c=Ke(f(Ye(e))),m=Ke(f(Ye(t))),d=Zs(_t(n,c),_t(n,m),c,m),e=Ti(e,d[0]),t=Pt(t,d[1])),[e,t]}function qn(e,t,n,s){let r=$l(e,t,n,s);return e==0&&(r[0]=0),t==0&&(r[1]=0),r}var Un=.1,Qs={mode:3,pad:Un},wl={pad:0,soft:null,mode:0},Lo={min:wl,max:wl};function Gl(e,t,n,s){return jl(n)?Xs(e,t,n):(wl.pad=n,wl.soft=s?0:null,wl.mode=s?3:0,Xs(e,t,Lo))}function le(e,t){return e??t}function Ro(e,t,n){for(t=le(t,0),n=le(n,e.length-1);t<=n;){if(e[t]!=null)return!0;t++}return!1}function Xs(e,t,n){let s=n.min,r=n.max,f=le(s.pad,0),c=le(r.pad,0),m=le(s.hard,-Q),d=le(r.hard,Q),g=le(s.soft,Q),_=le(r.soft,-Q),y=le(s.mode,0),u=le(r.mode,0),w=t-e;w<1e-9&&(w=0,(e==0||t==0)&&(w=1e-9,y==2&&g!=Q&&(f=0),u==2&&_!=-Q&&(c=0)));let x=w||Ye(t)||1e3,M=Et(x),L=_t(10,Ke(M)),N=x*(w==0?e==0?.1:1:f),E=oe(Ti(e-N,L/10),9),v=e>=g&&(y==1||y==3&&E<=g||y==2&&E>=g)?g:Q,C=Le(m,E<v&&e>=v?v:Ge(v,E)),D=x*(w==0?t==0?.1:1:c),R=oe(Pt(t+D,L/10),9),A=t<=_&&(u==1||u==3&&R>=_||u==2&&R<=_)?_:-Q,W=Ge(d,R>A&&t<=A?A:Le(A,R));return C==W&&C==0&&(W=100),[C,W]}var zo=new Intl.NumberFormat(jt?Do.language:"en-US"),$n=e=>zo.format(e),je=Math,Bl=je.PI,Ye=je.abs,Ke=je.floor,Me=je.round,Kn=je.ceil,Ge=je.min,Le=je.max,_t=je.pow,Vo=je.sign,Et=je.log10,ki=je.log2,Fo=(e,t=1)=>je.sinh(e)*t,Rn=(e,t=1)=>je.asinh(e/t),Q=1/0;function ei(e){return(Et((e^e>>31)-(e>>31))|0)+1}function Mt(e,t){return Me(e/t)*t}function ti(e,t,n){return Ge(Le(e,t),n)}function ee(e){return typeof e=="function"?e:()=>e}var No=e=>e,Mi=(e,t)=>t,Oo=e=>null,li=e=>!0,ni=(e,t)=>e==t;function Pt(e,t){return Kn(e/t)*t}function Ti(e,t){return Ke(e/t)*t}function oe(e,t){return Me(e*(t=10**t))/t}var Kl=new Map;function Ho(e){return((""+e).split(".")[1]||"").length}function vl(e,t,n,s){let r=[],f=s.map(Ho);for(let c=t;c<n;c++){let m=Ye(c),d=oe(_t(e,c),m);for(let g=0;g<s.length;g++){let _=s[g]*d,y=(_>=0&&c>=0?0:m)+(c>=f[g]?0:f[g]),u=oe(_,y);r.push(u),Kl.set(u,y)}}return r}var Sl={},Di=[],Kt=[null,null],Dt=Array.isArray;function si(e){return typeof e=="string"}function jl(e){let t=!1;if(e!=null){let n=e.constructor;t=n==null||n==Object}return t}function ii(e){return e!=null&&typeof e=="object"}var Io=Object.getPrototypeOf(Uint8Array);function At(e,t=jl){let n;if(Dt(e)){let s=e.find(r=>r!=null);if(Dt(s)||t(s)){n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=At(e[r],t)}else n=e.slice()}else if(e instanceof Io)n=e.slice();else if(t(e)){n={};for(let s in e)n[s]=At(e[s],t)}else n=e;return n}function we(e){let t=arguments;for(let n=1;n<t.length;n++){let s=t[n];for(let r in s)jl(e[r])?we(e[r],At(s[r])):e[r]=At(s[r])}return e}var Wo=0,Bo=1,Yo=2;function Go(e,t,n){for(let s=0,r,f=-1;s<t.length;s++){let c=t[s];if(c>f){for(r=c-1;r>=0&&e[r]==null;)e[r--]=null;for(r=c+1;r<n&&e[r]==null;)e[f=r++]=null}}}function qo(e,t){let n=new Set;for(let c=0;c<e.length;c++){let d=e[c][0],g=d.length;for(let _=0;_<g;_++)n.add(d[_])}let s=[Array.from(n).sort((c,m)=>c-m)],r=s[0].length,f=new Map;for(let c=0;c<r;c++)f.set(s[0][c],c);for(let c=0;c<e.length;c++){let m=e[c],d=m[0];for(let g=1;g<m.length;g++){let _=m[g],y=Array(r).fill(void 0),u=t?t[c][g]:Bo,w=[];for(let x=0;x<_.length;x++){let M=_[x],L=f.get(d[x]);M===null?u!=Wo&&(y[L]=M,u==Yo&&w.push(L)):y[L]=M}Go(y,w,r),s.push(y)}}return s}var Uo=typeof queueMicrotask>"u"?e=>Promise.resolve().then(e):queueMicrotask,Ci=["January","February","March","April","May","June","July","August","September","October","November","December"],Ei=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Pi(e){return e.slice(0,3)}var $o=Ei.map(Pi),Ko=Ci.map(Pi),jo={MMMM:Ci,MMM:Ko,WWWW:Ei,WWW:$o};function dl(e){return(e<10?"0":"")+e}function Jo(e){return(e<10?"00":e<100?"0":"")+e}var Zo={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>dl(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>dl(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>dl(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return t==0?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>dl(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>dl(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>Jo(e.getMilliseconds())};function jn(e,t){t=t||jo;let n=[],s=/\{([a-z]+)\}|[^{]+/gi,r;for(;r=s.exec(e);)n.push(r[0][0]=="{"?Zo[r[1]]:r[0]);return f=>{let c="";for(let m=0;m<n.length;m++)c+=typeof n[m]=="string"?n[m]:n[m](f,t);return c}}var Qo=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Xo(e,t){let n;return t=="UTC"||t=="Etc/UTC"?n=new Date(+e+e.getTimezoneOffset()*6e4):t==Qo?n=e:(n=new Date(e.toLocaleString("en-US",{timeZone:t})),n.setMilliseconds(e.getMilliseconds())),n}var Ai=e=>e%1==0,ql=[1,2,2.5,5],ea=vl(10,-16,0,ql),Li=vl(10,0,16,ql),ta=Li.filter(Ai),la=ea.concat(Li),Jn=`
|
|
`,Ri="{YYYY}",ri=Jn+Ri,zi="{M}/{D}",gl=Jn+zi,Il=gl+"/{YY}",Vi="{aa}",na="{h}:{mm}",qt=na+Vi,oi=Jn+qt,ai=":{ss}",ie=null;function Fi(e){let t=e*1e3,n=t*60,s=n*60,r=s*24,f=r*30,c=r*365,d=(e==1?vl(10,0,3,ql).filter(Ai):vl(10,-3,0,ql)).concat([t,t*5,t*10,t*15,t*30,n,n*5,n*10,n*15,n*30,s,s*2,s*3,s*4,s*6,s*8,s*12,r,r*2,r*3,r*4,r*5,r*6,r*7,r*8,r*9,r*10,r*15,f,f*2,f*3,f*4,f*6,c,c*2,c*5,c*10,c*25,c*50,c*100]),g=[[c,Ri,ie,ie,ie,ie,ie,ie,1],[r*28,"{MMM}",ri,ie,ie,ie,ie,ie,1],[r,zi,ri,ie,ie,ie,ie,ie,1],[s,"{h}"+Vi,Il,ie,gl,ie,ie,ie,1],[n,qt,Il,ie,gl,ie,ie,ie,1],[t,ai,Il+" "+qt,ie,gl+" "+qt,ie,oi,ie,1],[e,ai+".{fff}",Il+" "+qt,ie,gl+" "+qt,ie,oi,ie,1]];function _(y){return(u,w,x,M,L,N)=>{let E=[],v=L>=c,C=L>=f&&L<c,D=y(x),R=oe(D*e,3),A=zn(D.getFullYear(),v?0:D.getMonth(),C||v?1:D.getDate()),W=oe(A*e,3);if(C||v){let Y=C?L/f:0,$=v?L/c:0,P=R==W?R:oe(zn(A.getFullYear()+$,A.getMonth()+Y,1)*e,3),U=new Date(Me(P/e)),re=U.getFullYear(),Z=U.getMonth();for(let F=0;P<=M;F++){let X=zn(re+$*F,Z+Y*F,1),O=X-y(oe(X*e,3));P=oe((+X+O)*e,3),P<=M&&E.push(P)}}else{let Y=L>=r?r:L,$=Ke(x)-Ke(R),P=W+$+Pt(R-W,Y);E.push(P);let U=y(P),re=U.getHours()+U.getMinutes()/n+U.getSeconds()/s,Z=L/s,F=u.axes[w]._space,X=N/F;for(;P=oe(P+L,e==1?0:3),!(P>M);)if(Z>1){let O=Ke(oe(re+Z,6))%24,Fe=y(P).getHours()-O;Fe>1&&(Fe=-1),P-=Fe*s,re=(re+Z)%24;let H=E[E.length-1];oe((P-H)/L,3)*X>=.7&&E.push(P)}else E.push(P)}return E}}return[d,g,_]}var[sa,ia,ra]=Fi(1),[oa,aa,ua]=Fi(.001);vl(2,-53,53,[1]);function ui(e,t){return e.map(n=>n.map((s,r)=>r==0||r==8||s==null?s:t(r==1||n[8]==0?s:n[1]+s)))}function ci(e,t){return(n,s,r,f,c)=>{let m=t.find(x=>c>=x[0])||t[t.length-1],d,g,_,y,u,w;return s.map(x=>{let M=e(x),L=M.getFullYear(),N=M.getMonth(),E=M.getDate(),v=M.getHours(),C=M.getMinutes(),D=M.getSeconds(),R=L!=d&&m[2]||N!=g&&m[3]||E!=_&&m[4]||v!=y&&m[5]||C!=u&&m[6]||D!=w&&m[7]||m[1];return d=L,g=N,_=E,y=v,u=C,w=D,R(M)})}}function ca(e,t){let n=jn(t);return(s,r,f,c,m)=>r.map(d=>n(e(d)))}function zn(e,t,n){return new Date(e,t,n)}function fi(e,t){return t(e)}var fa="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function hi(e,t){return(n,s)=>t(e(s))}function ha(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null}function da(e,t){return e.series[t].fill(e,t)}var pa={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:ha,fill:da,dash:"solid"},idx:null,idxs:null,values:[]};function ma(e,t){let n=e.cursor.points,s=et(),r=n.size(e,t);ce(s,pl,r),ce(s,ml,r);let f=r/-2;ce(s,"marginLeft",f),ce(s,"marginTop",f);let c=n.width(e,t,r);return c&&ce(s,"borderWidth",c),s}function ga(e,t){let n=e.series[t].points;return n._fill||n._stroke}function wa(e,t){let n=e.series[t].points;return n._stroke||n._fill}function Sa(e,t){let n=e.series[t].points;return Wi(n.width,1)}function va(e,t,n){return n}var Vn=[0,0];function _a(e,t,n){return Vn[0]=t,Vn[1]=n,Vn}function Wl(e,t,n){return s=>{s.button==0&&n(s)}}function Fn(e,t,n){return n}var ya={show:!0,x:!0,y:!0,lock:!1,move:_a,points:{show:ma,size:Sa,width:0,stroke:wa,fill:ga},bind:{mousedown:Wl,mouseup:Wl,click:Wl,dblclick:Wl,mousemove:Fn,mouseleave:Fn,mouseenter:Fn},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:va,idxs:null},Ni={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Zn=we({},Ni,{filter:Mi}),Oi=we({},Zn,{size:10}),Hi=we({},Ni,{show:!1}),Qn='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Ii="bold "+Qn,ba=1.5,di={show:!0,scale:"x",stroke:Yn,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Ii,side:2,grid:Zn,ticks:Oi,border:Hi,font:Qn,rotate:0},xa="Value",ka="Time",pi={show:!0,scale:"x",auto:!1,sorted:1,min:Q,max:-Q,idxs:[]};function Ma(e,t,n,s,r){return t.map(f=>f==null?"":$n(f))}function Ta(e,t,n,s,r,f,c){let m=[],d=Kl.get(r)||0;n=c?n:oe(Pt(n,r),d);for(let g=n;g<=s;g=oe(g+r,d))m.push(Object.is(g,-0)?0:g);return m}function Wn(e,t,n,s,r,f,c){let m=[],d=e.scales[e.axes[t].scale].log,g=d==10?Et:ki,_=Ke(g(n));r=_t(d,_),_<0&&(r=oe(r,-_));let y=n;do m.push(y),y=oe(y+r,Kl.get(r)),y>=r*d&&(r=y);while(y<=s);return m}function Da(e,t,n,s,r,f,c){let d=e.scales[e.axes[t].scale].asinh,g=s>d?Wn(e,t,Le(d,n),s,r):[d],_=s>=0&&n<=0?[0]:[];return(n<-d?Wn(e,t,Le(d,-s),-n,r):[d]).reverse().map(u=>-u).concat(_,g)}var Ca=/./,Ea=/[12357]/,Pa=/[125]/,Aa=/1/;function La(e,t,n,s,r){let f=e.axes[n],c=f.scale,m=e.scales[c];if(m.distr==3&&m.log==2)return t;let d=e.valToPos,g=f._space,_=d(10,c),y=d(9,c)-_>=g?Ca:d(7,c)-_>=g?Ea:d(5,c)-_>=g?Pa:Aa;return t.map(u=>m.distr==4&&u==0||y.test(u)?u:null)}function Ra(e,t){return t==null?"":$n(t)}var mi={show:!0,scale:"y",stroke:Yn,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Ii,side:3,grid:Zn,ticks:Oi,border:Hi,font:Qn,rotate:0};function Wi(e,t){let n=3+(e||1)*2;return oe(n*t,3)}function za(e,t){let{scale:n,idxs:s}=e.series[0],r=e._data[0],f=e.valToPos(r[s[0]],n,!0),c=e.valToPos(r[s[1]],n,!0),m=Ye(c-f),d=e.series[t],g=m/(d.points.space*te);return s[1]-s[0]<=g}var gi={scale:null,auto:!0,sorted:0,min:Q,max:-Q},Va={show:!0,auto:!0,sorted:0,alpha:1,facets:[we({},gi,{scale:"x"}),we({},gi,{scale:"y"})]},wi={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:(e,t,n,s,r)=>r,alpha:1,points:{show:za,filter:null},values:null,min:Q,max:-Q,idxs:[],path:null,clip:null};function Fa(e,t,n,s,r){return n/10}var Bi={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Na=we({},Bi,{time:!1,ori:1}),Si={};function Yi(e,t){let n=Si[e];return n||(n={key:e,plots:[],sub(s){n.plots.push(s)},unsub(s){n.plots=n.plots.filter(r=>r!=s)},pub(s,r,f,c,m,d,g){for(let _=0;_<n.plots.length;_++)n.plots[_]!=r&&n.plots[_].pub(s,r,f,c,m,d,g)}},e!=null&&(Si[e]=n)),n}var Lt=1<<0,Ul=1<<1;function Rt(e,t,n){let s=e.series[t],r=e.scales,f=e.bbox,c=e.mode==2?r[s.facets[0].scale]:r[e.series[0].scale],m=e._data[0],d=e._data[t],g=c,_=e.mode==2?r[s.facets[1].scale]:r[s.scale],y=f.left,u=f.top,w=f.width,x=f.height,M=e.valToPosH,L=e.valToPosV;return g.ori==0?n(s,m,d,g,_,M,L,y,u,w,x,Ql,Jt,en,qi,$i):n(s,m,d,g,_,L,M,u,y,x,w,Xl,Zt,es,Ui,Ki)}function Jl(e,t){let n=0,s=0,r=le(e.bands,Di);for(let f=0;f<r.length;f++){let c=r[f];c.series[0]==t?n=c.dir:c.series[1]==t&&(c.dir==1?s|=1:s|=2)}return[n,s==1?-1:s==2?1:s==3?2:0]}function Oa(e,t,n,s,r){let f=e.scales[e.series[t].scale];return r==-1?f.min:r==1?f.max:f.distr==3?f.dir==1?f.min:f.max:0}function ft(e,t,n,s,r,f){return Rt(e,t,(c,m,d,g,_,y,u,w,x,M,L)=>{let N=c.pxRound,E=g.dir*(g.ori==0?1:-1),v=g.ori==0?Jt:Zt,C,D;E==1?(C=n,D=s):(C=s,D=n);let R=N(y(m[C],g,M,w)),A=N(u(d[C],_,L,x)),W=N(y(m[D],g,M,w)),Y=N(u(f==1?_.max:_.min,_,L,x)),$=new Path2D(r);return v($,W,Y),v($,R,Y),v($,R,A),$})}function Zl(e,t,n,s,r,f){let c=null;if(e.length>0){c=new Path2D;let m=t==0?en:es,d=n;for(let _=0;_<e.length;_++){let y=e[_];if(y[1]>y[0]){let u=y[0]-d;u>0&&m(c,d,s,u,s+f),d=y[1]}}let g=n+r-d;g>0&&m(c,d,s,g,s+f)}return c}function Ha(e,t,n){let s=e[e.length-1];s&&s[0]==t?s[1]=n:e.push([t,n])}function Xn(e,t,n,s,r,f,c){let m=[];for(let d=r==1?n:s;d>=n&&d<=s;d+=r)if(t[d]===null){let _=d,y=d;if(r==1)for(;++d<=s&&t[d]===null;)y=d;else for(;--d>=n&&t[d]===null;)y=d;let u=f(e[_]),w=y==_?u:f(e[y]);u=c<=0?f(e[_-r]):u,w=c>=0?f(e[y+r]):w,w>=u&&m.push([u,w])}return m}function vi(e){return e==0?No:e==1?Me:t=>Mt(t,e)}function Gi(e){let t=e==0?Ql:Xl,n=e==0?(r,f,c,m,d,g)=>{r.arcTo(f,c,m,d,g)}:(r,f,c,m,d,g)=>{r.arcTo(c,f,d,m,g)},s=e==0?(r,f,c,m,d)=>{r.rect(f,c,m,d)}:(r,f,c,m,d)=>{r.rect(c,f,d,m)};return(r,f,c,m,d,g=0)=>{g==0?s(r,f,c,m,d):(g=Ge(g,m/2,d/2),t(r,f+g,c),n(r,f+m,c,f+m,c+d,g),n(r,f+m,c+d,f,c+d,g),n(r,f,c+d,f,c,g),n(r,f,c,f+m,c,g),r.closePath())}}var Ql=(e,t,n)=>{e.moveTo(t,n)},Xl=(e,t,n)=>{e.moveTo(n,t)},Jt=(e,t,n)=>{e.lineTo(t,n)},Zt=(e,t,n)=>{e.lineTo(n,t)},en=Gi(0),es=Gi(1),qi=(e,t,n,s,r,f)=>{e.arc(t,n,s,r,f)},Ui=(e,t,n,s,r,f)=>{e.arc(n,t,s,r,f)},$i=(e,t,n,s,r,f,c)=>{e.bezierCurveTo(t,n,s,r,f,c)},Ki=(e,t,n,s,r,f,c)=>{e.bezierCurveTo(n,t,r,s,c,f)};function ji(e){return(t,n,s,r,f)=>Rt(t,n,(c,m,d,g,_,y,u,w,x,M,L)=>{let{pxRound:N,points:E}=c,v,C;g.ori==0?(v=Ql,C=qi):(v=Xl,C=Ui);let D=oe(E.width*te,3),R=(E.size-E.width)/2*te,A=oe(R*2,3),W=new Path2D,Y=new Path2D,{left:$,top:P,width:U,height:re}=t.bbox;en(Y,$-A,P-A,U+A*2,re+A*2);let Z=F=>{if(d[F]!=null){let X=N(y(m[F],g,M,w)),O=N(u(d[F],_,L,x));v(W,X+R,O),C(W,X,O,R,0,Bl*2)}};if(f)f.forEach(Z);else for(let F=s;F<=r;F++)Z(F);return{stroke:D>0?W:null,fill:W,clip:Y,flags:Lt|Ul}})}function Ji(e){return(t,n,s,r,f,c)=>{s!=r&&(f!=s&&c!=s&&e(t,n,s),f!=r&&c!=r&&e(t,n,r),e(t,n,c))}}var Ia=Ji(Jt),Wa=Ji(Zt);function Zi(e){let t=le(e?.alignGaps,0);return(n,s,r,f)=>Rt(n,s,(c,m,d,g,_,y,u,w,x,M,L)=>{let N=c.pxRound,E=H=>N(y(H,g,M,w)),v=H=>N(u(H,_,L,x)),C,D;g.ori==0?(C=Jt,D=Ia):(C=Zt,D=Wa);let R=g.dir*(g.ori==0?1:-1),A={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Lt},W=A.stroke,Y=Q,$=-Q,P,U,re,Z=E(m[R==1?r:f]),F=$t(d,r,f,1*R),X=$t(d,r,f,-1*R),O=E(m[F]),Re=E(m[X]);for(let H=R==1?r:f;H>=r&&H<=f;H+=R){let I=E(m[H]);I==Z?d[H]!=null&&(U=v(d[H]),Y==Q&&(C(W,I,U),P=U),Y=Ge(U,Y),$=Le(U,$)):(Y!=Q&&(D(W,Z,Y,$,P,U),re=Z),d[H]!=null?(U=v(d[H]),C(W,I,U),Y=$=P=U):(Y=Q,$=-Q),Z=I)}Y!=Q&&Y!=$&&re!=Z&&D(W,Z,Y,$,P,U);let[Te,Fe]=Jl(n,s);if(c.fill!=null||Te!=0){let H=A.fill=new Path2D(W),I=c.fillTo(n,s,c.min,c.max,Te),De=v(I);C(H,Re,De),C(H,O,De)}if(!c.spanGaps){let H=[];H.push(...Xn(m,d,r,f,R,E,t)),A.gaps=H=c.gaps(n,s,r,f,H),A.clip=Zl(H,g.ori,w,x,M,L)}return Fe!=0&&(A.band=Fe==2?[ft(n,s,r,f,W,-1),ft(n,s,r,f,W,1)]:ft(n,s,r,f,W,Fe)),A})}function Ba(e){let t=le(e.align,1),n=le(e.ascDesc,!1),s=le(e.alignGaps,0);return(r,f,c,m)=>Rt(r,f,(d,g,_,y,u,w,x,M,L,N,E)=>{let v=d.pxRound,C=F=>v(w(F,y,N,M)),D=F=>v(x(F,u,E,L)),R=y.ori==0?Jt:Zt,A={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Lt},W=A.stroke,Y=y.dir*(y.ori==0?1:-1);c=$t(_,c,m,1),m=$t(_,c,m,-1);let $=D(_[Y==1?c:m]),P=C(g[Y==1?c:m]),U=P;R(W,P,$);for(let F=Y==1?c:m;F>=c&&F<=m;F+=Y){let X=_[F];if(X==null)continue;let O=C(g[F]),Re=D(X);t==1?R(W,O,$):R(W,U,Re),R(W,O,Re),$=Re,U=O}let[re,Z]=Jl(r,f);if(d.fill!=null||re!=0){let F=A.fill=new Path2D(W),X=d.fillTo(r,f,d.min,d.max,re),O=D(X);R(F,U,O),R(F,P,O)}if(!d.spanGaps){let F=[];F.push(...Xn(g,_,c,m,Y,C,s));let X=d.width*te/2,O=n||t==1?X:-X,Re=n||t==-1?-X:X;F.forEach(Te=>{Te[0]+=O,Te[1]+=Re}),A.gaps=F=d.gaps(r,f,c,m,F),A.clip=Zl(F,y.ori,M,L,N,E)}return Z!=0&&(A.band=Z==2?[ft(r,f,c,m,W,-1),ft(r,f,c,m,W,1)]:ft(r,f,c,m,W,Z)),A})}function Ya(e){e=e||Sl;let t=le(e.size,[.6,Q,1]),n=e.align||0,s=(e.gap||0)*te,r=le(e.radius,0),f=1-t[0],c=le(t[1],Q)*te,m=le(t[2],1)*te,d=le(e.disp,Sl),g=le(e.each,u=>{}),{fill:_,stroke:y}=d;return(u,w,x,M)=>Rt(u,w,(L,N,E,v,C,D,R,A,W,Y,$)=>{let P=L.pxRound,U=v.dir*(v.ori==0?1:-1),re=C.dir*(C.ori==1?1:-1),Z=v.ori==0?en:es,F=v.ori==0?g:(ne,Ne,qe,G,j,pe,_e)=>{g(ne,Ne,qe,j,G,_e,pe)},[X,O]=Jl(u,w),Re=C.distr==3?X==1?C.max:C.min:0,Te=R(Re,C,$,W),Fe,H,I=P(L.width*te),De=!1,de=null,Je=null,st=null,ht=null;_!=null&&(I==0||y!=null)&&(De=!0,de=_.values(u,w,x,M),Je=new Map,new Set(de).forEach(ne=>{ne!=null&&Je.set(ne,new Path2D)}),I>0&&(st=y.values(u,w,x,M),ht=new Map,new Set(st).forEach(ne=>{ne!=null&&ht.set(ne,new Path2D)})));let{x0:dt,size:Ze}=d;if(dt!=null&&Ze!=null){N=dt.values(u,w,x,M),dt.unit==2&&(N=N.map(Ne=>u.posToVal(A+Ne*Y,v.key,!0)));let ne=Ze.values(u,w,x,M);Ze.unit==2?H=ne[0]*Y:H=D(ne[0],v,Y,A)-D(0,v,Y,A),H=P(H-I),Fe=U==1?-I/2:H+I/2}else{let ne=Y;if(N.length>1){let qe=null;for(let G=0,j=1/0;G<N.length;G++)if(E[G]!==void 0){if(qe!=null){let pe=Ye(N[G]-N[qe]);pe<j&&(j=pe,ne=Ye(D(N[G],v,Y,A)-D(N[qe],v,Y,A)))}qe=G}}let Ne=ne*f;H=P(Ge(c,Le(m,ne-Ne))-I-s),Fe=(n==0?H/2:n==U?0:H)-n*U*s/2}let ot={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:Lt|Ul},Qt;O!=0&&(ot.band=new Path2D,Qt=P(R(O==1?C.max:C.min,C,$,W)));let Vt=De?null:new Path2D,on=ot.band,{y0:bl,y1:pt}=d,Qe=null;bl!=null&&pt!=null&&(E=pt.values(u,w,x,M),Qe=bl.values(u,w,x,M));for(let ne=U==1?x:M;ne>=x&&ne<=M;ne+=U){let Ne=E[ne];if(Ne===void 0)continue;let qe=v.distr!=2||d!=null?N[ne]:ne,G=D(qe,v,Y,A),j=R(le(Ne,Re),C,$,W);Qe!=null&&Ne!=null&&(Te=R(Qe[ne],C,$,W));let pe=P(G-Fe),_e=P(Le(j,Te)),ye=P(Ge(j,Te)),He=_e-ye,tt=r*H;Ne!=null&&(De?(I>0&&st[ne]!=null&&Z(ht.get(st[ne]),pe,ye+Ke(I/2),H,Le(0,He-I),tt),de[ne]!=null&&Z(Je.get(de[ne]),pe,ye+Ke(I/2),H,Le(0,He-I),tt)):Z(Vt,pe,ye+Ke(I/2),H,Le(0,He-I),tt),F(u,w,ne,pe-I/2,ye,H+I,He)),O!=0&&(re*O==1?(_e=ye,ye=Qt):(ye=_e,_e=Qt),He=_e-ye,Z(on,pe-I/2,ye,H+I,Le(0,He),0))}return I>0&&(ot.stroke=De?ht:Vt),ot.fill=De?Je:Vt,ot})}function Ga(e,t){let n=le(t?.alignGaps,0);return(s,r,f,c)=>Rt(s,r,(m,d,g,_,y,u,w,x,M,L,N)=>{let E=m.pxRound,v=O=>E(u(O,_,L,x)),C=O=>E(w(O,y,N,M)),D,R,A;_.ori==0?(D=Ql,A=Jt,R=$i):(D=Xl,A=Zt,R=Ki);let W=_.dir*(_.ori==0?1:-1);f=$t(g,f,c,1),c=$t(g,f,c,-1);let Y=v(d[W==1?f:c]),$=Y,P=[],U=[];for(let O=W==1?f:c;O>=f&&O<=c;O+=W)if(g[O]!=null){let Te=d[O],Fe=v(Te);P.push($=Fe),U.push(C(g[O]))}let re={stroke:e(P,U,D,A,R,E),fill:null,clip:null,band:null,gaps:null,flags:Lt},Z=re.stroke,[F,X]=Jl(s,r);if(m.fill!=null||F!=0){let O=re.fill=new Path2D(Z),Re=m.fillTo(s,r,m.min,m.max,F),Te=C(Re);A(O,$,Te),A(O,Y,Te)}if(!m.spanGaps){let O=[];O.push(...Xn(d,g,f,c,W,v,n)),re.gaps=O=m.gaps(s,r,f,c,O),re.clip=Zl(O,_.ori,x,M,L,N)}return X!=0&&(re.band=X==2?[ft(s,r,f,c,Z,-1),ft(s,r,f,c,Z,1)]:ft(s,r,f,c,Z,X)),re})}function qa(e){return Ga(Ua,e)}function Ua(e,t,n,s,r,f){let c=e.length;if(c<2)return null;let m=new Path2D;if(n(m,e[0],t[0]),c==2)s(m,e[1],t[1]);else{let d=Array(c),g=Array(c-1),_=Array(c-1),y=Array(c-1);for(let u=0;u<c-1;u++)_[u]=t[u+1]-t[u],y[u]=e[u+1]-e[u],g[u]=_[u]/y[u];d[0]=g[0];for(let u=1;u<c-1;u++)g[u]===0||g[u-1]===0||g[u-1]>0!=g[u]>0?d[u]=0:(d[u]=3*(y[u-1]+y[u])/((2*y[u]+y[u-1])/g[u-1]+(y[u]+2*y[u-1])/g[u]),isFinite(d[u])||(d[u]=0));d[c-1]=g[c-2];for(let u=0;u<c-1;u++)r(m,e[u]+y[u]/3,t[u]+d[u]*y[u]/3,e[u+1]-y[u]/3,t[u+1]-d[u+1]*y[u]/3,e[u+1],t[u+1])}return m}var Bn=new Set;function _i(){Bn.forEach(e=>{e.syncRect(!0)})}jt&&(Ct(Mo,Ut,_i),Ct(To,Ut,_i,!0),Ct(Yl,Ut,()=>{Se.pxRatio=te}));var $a=Zi(),Ka=ji();function yi(e,t,n,s){return(s?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((f,c)=>Qi(f,c,t,n))}function ja(e,t){return e.map((n,s)=>s==0?null:we({},t,n))}function Qi(e,t,n,s){return we({},t==0?n:s,e)}function Xi(e,t,n){return t==null?Kt:[t,n]}var Ja=Xi;function Za(e,t,n){return t==null?Kt:Gl(t,n,Un,!0)}function er(e,t,n,s){return t==null?Kt:$l(t,n,e.scales[s].log,!1)}var Qa=er;function tr(e,t,n,s){return t==null?Kt:qn(t,n,e.scales[s].log,!1)}var Xa=tr;function eu(e,t,n,s,r){let f=Le(ei(e),ei(t)),c=t-e,m=vt(r/s*c,n);do{let d=n[m],g=s*d/c;if(g>=r&&f+(d<5?Kl.get(d):0)<=17)return[d,g]}while(++m<n.length);return[0,0]}function bi(e){let t,n;return e=e.replace(/(\d+)px/,(s,r)=>(t=Me((n=+r)*te))+"px"),[e,t,n]}function tu(e){e.show&&[e.font,e.labelFont].forEach(t=>{let n=oe(t[2]*te,1);t[0]=t[0].replace(/[0-9.]+px/,n+"px"),t[1]=n})}function Se(e,t,n){let s={mode:le(e.mode,1)},r=s.mode;function f(l,i){return((i.distr==3?Et(l>0?l:i.clamp(s,l,i.min,i.max,i.key)):i.distr==4?Rn(l,i.asinh):l)-i._min)/(i._max-i._min)}function c(l,i,o,a){let h=f(l,i);return a+o*(i.dir==-1?1-h:h)}function m(l,i,o,a){let h=f(l,i);return a+o*(i.dir==-1?h:1-h)}function d(l,i,o,a){return i.ori==0?c(l,i,o,a):m(l,i,o,a)}s.valToPosH=c,s.valToPosV=m;let g=!1;s.status=0;let _=s.root=et(io);if(e.id!=null&&(_.id=e.id),$e(_,e.class),e.title){let l=et(ao,_);l.textContent=e.title}let y=ct("canvas"),u=s.ctx=y.getContext("2d"),w=et(uo,_),x=s.under=et(co,w);w.appendChild(y);let M=s.over=et(fo,w);e=At(e);let L=+le(e.pxAlign,1),N=vi(L);(e.plugins||[]).forEach(l=>{l.opts&&(e=l.opts(s,e)||e)});let E=e.ms||.001,v=s.series=r==1?yi(e.series||[],pi,wi,!1):ja(e.series||[null],Va),C=s.axes=yi(e.axes||[],di,mi,!0),D=s.scales={},R=s.bands=e.bands||[];R.forEach(l=>{l.fill=ee(l.fill||null),l.dir=le(l.dir,-1)});let A=r==2?v[1].facets[0].scale:v[0].scale,W={axes:Fr,series:Ar},Y=(e.drawOrder||["axes","series"]).map(l=>W[l]);function $(l){let i=D[l];if(i==null){let o=(e.scales||Sl)[l]||Sl;if(o.from!=null)$(o.from),D[l]=we({},D[o.from],o,{key:l});else{i=D[l]=we({},l==A?Bi:Na,o),i.key=l;let a=i.time,h=i.range,p=Dt(h);if((l!=A||r==2&&!a)&&(p&&(h[0]==null||h[1]==null)&&(h={min:h[0]==null?Qs:{mode:1,hard:h[0],soft:h[0]},max:h[1]==null?Qs:{mode:1,hard:h[1],soft:h[1]}},p=!1),!p&&jl(h))){let S=h;h=(b,T,V)=>T==null?Kt:Gl(T,V,S)}i.range=ee(h||(a?Ja:l==A?i.distr==3?Qa:i.distr==4?Xa:Xi:i.distr==3?er:i.distr==4?tr:Za)),i.auto=ee(p?!1:i.auto),i.clamp=ee(i.clamp||Fa),i._min=i._max=null}}}$("x"),$("y"),r==1&&v.forEach(l=>{$(l.scale)}),C.forEach(l=>{$(l.scale)});for(let l in e.scales)$(l);let P=D[A],U=P.distr,re,Z;P.ori==0?($e(_,ro),re=c,Z=m):($e(_,oo),re=m,Z=c);let F={};for(let l in D){let i=D[l];(i.min!=null||i.max!=null)&&(F[l]={min:i.min,max:i.max},i.min=i.max=null)}let X=e.tzDate||(l=>new Date(Me(l/E))),O=e.fmtDate||jn,Re=E==1?ra(X):ua(X),Te=ci(X,ui(E==1?ia:aa,O)),Fe=hi(X,fi(fa,O)),H=[],I=s.legend=we({},pa,e.legend),De=I.show,de=I.markers;I.idxs=H,de.width=ee(de.width),de.dash=ee(de.dash),de.stroke=ee(de.stroke),de.fill=ee(de.fill);let Je,st=[],ht=[],dt,Ze=!1,ot={};if(I.live){let l=v[1]?v[1].values:null;Ze=l!=null,dt=Ze?l(s,1,0):{_:0};for(let i in dt)ot[i]="--"}if(De)if(Je=ct("table",So,_),Ze){let l=ct("tr",yo,Je);ct("th",null,l);for(var Qt in dt)ct("th",Hs,l).textContent=Qt}else $e(Je,_o),I.live&&$e(Je,vo);let Vt={show:!0},on={show:!1};function bl(l,i){if(i==0&&(Ze||!I.live||r==2))return Kt;let o=[],a=ct("tr",bo,Je,Je.childNodes[i]);$e(a,l.class),l.show||$e(a,Tt);let h=ct("th",null,a);if(de.show){let b=et(xo,h);if(i>0){let T=de.width(s,i);T&&(b.style.border=T+"px "+de.dash(s,i)+" "+de.stroke(s,i)),b.style.background=de.fill(s,i)}}let p=et(Hs,h);p.textContent=l.label,i>0&&(de.show||(p.style.color=l.width>0?de.stroke(s,i):de.fill(s,i)),Qe("click",h,b=>{if(B._lock)return;let T=v.indexOf(l);if((b.ctrlKey||b.metaKey)!=I.isolate){let V=v.some((k,z)=>z>0&&z!=T&&k.show);v.forEach((k,z)=>{z>0&&rt(z,V?z==T?Vt:on:Vt,!0,Ae.setSeries)})}else rt(T,{show:!l.show},!0,Ae.setSeries)}),Ml&&Qe(Gs,h,b=>{B._lock||rt(v.indexOf(l),Ht,!0,Ae.setSeries)}));for(var S in dt){let b=ct("td",ko,a);b.textContent="--",o.push(b)}return[a,o]}let pt=new Map;function Qe(l,i,o){let a=pt.get(i)||{},h=B.bind[l](s,i,o);h&&(Ct(l,i,a[l]=h),pt.set(i,a))}function ne(l,i,o){let a=pt.get(i)||{};for(let h in a)(l==null||h==l)&&(In(h,i,a[h]),delete a[h]);l==null&&pt.delete(i)}let Ne=0,qe=0,G=0,j=0,pe=0,_e=0,ye=0,He=0,tt=0,yt=0;s.bbox={};let an=!1,xl=!1,Ft=!1,Xt=!1,it=!1;function un(l,i,o){(o||l!=s.width||i!=s.height)&&rs(l,i),ll(!1),Ft=!0,xl=!0,Xt=it=B.left>=0,xt()}function rs(l,i){s.width=Ne=G=l,s.height=qe=j=i,pe=_e=0,xr(),kr();let o=s.bbox;ye=o.left=Mt(pe*te,.5),He=o.top=Mt(_e*te,.5),tt=o.width=Mt(G*te,.5),yt=o.height=Mt(j*te,.5)}let _r=3;function yr(){let l=!1,i=0;for(;!l;){i++;let o=zr(i),a=Vr(i);l=i==_r||o&&a,l||(rs(s.width,s.height),xl=!0)}}function br({width:l,height:i}){un(l,i)}s.setSize=br;function xr(){let l=!1,i=!1,o=!1,a=!1;C.forEach((h,p)=>{if(h.show&&h._show){let{side:S,_size:b}=h,T=S%2,V=h.label!=null?h.labelSize:0,k=b+V;k>0&&(T?(G-=k,S==3?(pe+=k,a=!0):o=!0):(j-=k,S==0?(_e+=k,l=!0):i=!0))}}),bt[0]=l,bt[1]=o,bt[2]=i,bt[3]=a,G-=mt[1]+mt[3],pe+=mt[3],j-=mt[2]+mt[0],_e+=mt[0]}function kr(){let l=pe+G,i=_e+j,o=pe,a=_e;function h(p,S){switch(p){case 1:return l+=S,l-S;case 2:return i+=S,i-S;case 3:return o-=S,o+S;case 0:return a-=S,a+S}}C.forEach((p,S)=>{if(p.show&&p._show){let b=p.side;p._pos=h(b,p._size),p.label!=null&&(p._lpos=h(b,p.labelSize))}})}let B=s.cursor=we({},ya,{drag:{y:r==2}},e.cursor);{B.idxs=H,B._lock=!1;let l=B.points;l.show=ee(l.show),l.size=ee(l.size),l.stroke=ee(l.stroke),l.width=ee(l.width),l.fill=ee(l.fill)}let kl=s.focus=we({},e.focus||{alpha:.3},B.focus),Ml=kl.prox>=0,Ie=[null];function Mr(l,i){if(i>0){let o=B.points.show(s,i);if(o)return $e(o,wo),$e(o,l.class),Gt(o,-10,-10,G,j),M.insertBefore(o,Ie[i]),o}}function os(l,i){if(r==1||i>0){let o=r==1&&D[l.scale].time,a=l.value;l.value=o?si(a)?hi(X,fi(a,O)):a||Fe:a||Ra,l.label=l.label||(o?ka:xa)}if(i>0){l.width=l.width==null?1:l.width,l.paths=l.paths||$a||Oo,l.fillTo=ee(l.fillTo||Oa),l.pxAlign=+le(l.pxAlign,L),l.pxRound=vi(l.pxAlign),l.stroke=ee(l.stroke||null),l.fill=ee(l.fill||null),l._stroke=l._fill=l._paths=l._focus=null;let o=Wi(l.width,1),a=l.points=we({},{size:o,width:Le(1,o*.2),stroke:l.stroke,space:o*2,paths:Ka,_stroke:null,_fill:null},l.points);a.show=ee(a.show),a.filter=ee(a.filter),a.fill=ee(a.fill),a.stroke=ee(a.stroke),a.paths=ee(a.paths),a.pxAlign=l.pxAlign}if(De){let o=bl(l,i);st.splice(i,0,o[0]),ht.splice(i,0,o[1]),I.values.push(null)}if(B.show){H.splice(i,0,null);let o=Mr(l,i);o&&Ie.splice(i,0,o)}Pe("addSeries",i)}function Tr(l,i){i=i??v.length,l=Qi(l,i,pi,wi),v.splice(i,0,l),os(v[i],i)}s.addSeries=Tr;function Dr(l){if(v.splice(l,1),De){I.values.splice(l,1),ht.splice(l,1);let i=st.splice(l,1)[0];ne(null,i.firstChild),i.remove()}B.show&&(H.splice(l,1),Ie.length>1&&Ie.splice(l,1)[0].remove()),Pe("delSeries",l)}s.delSeries=Dr;let bt=[!1,!1,!1,!1];function Cr(l,i){if(l._show=l.show,l.show){let o=l.side%2,a=D[l.scale];a==null&&(l.scale=o?v[1].scale:A,a=D[l.scale]);let h=a.time;l.size=ee(l.size),l.space=ee(l.space),l.rotate=ee(l.rotate),l.incrs=ee(l.incrs||(a.distr==2?ta:h?E==1?sa:oa:la)),l.splits=ee(l.splits||(h&&a.distr==1?Re:a.distr==3?Wn:a.distr==4?Da:Ta)),l.stroke=ee(l.stroke),l.grid.stroke=ee(l.grid.stroke),l.ticks.stroke=ee(l.ticks.stroke),l.border.stroke=ee(l.border.stroke);let p=l.values;l.values=Dt(p)&&!Dt(p[0])?ee(p):h?Dt(p)?ci(X,ui(p,O)):si(p)?ca(X,p):p||Te:p||Ma,l.filter=ee(l.filter||(a.distr>=3?La:Mi)),l.font=bi(l.font),l.labelFont=bi(l.labelFont),l._size=l.size(s,null,i,0),l._space=l._rotate=l._incrs=l._found=l._splits=l._values=null,l._size>0&&(bt[i]=!0,l._el=et(ho,w))}}function el(l,i,o,a){let[h,p,S,b]=o,T=i%2,V=0;return T==0&&(b||p)&&(V=i==0&&!h||i==2&&!S?Me(di.size/3):0),T==1&&(h||S)&&(V=i==1&&!p||i==3&&!b?Me(mi.size/2):0),V}let as=s.padding=(e.padding||[el,el,el,el]).map(l=>ee(le(l,el))),mt=s._padding=as.map((l,i)=>l(s,i,bt,0)),be,Ce=null,Ee=null,Tl=r==1?v[0].idxs:null,lt=null,Dl=!1;function us(l,i){if(t=l==null?[]:At(l,ii),r==2){be=0;for(let o=1;o<v.length;o++)be+=t[o][0].length;s.data=t=l}else if(t[0]==null&&(t[0]=[]),s.data=t.slice(),lt=t[0],be=lt.length,U==2){t[0]=Array(be);for(let o=0;o<be;o++)t[0][o]=o}if(s._data=t,ll(!0),Pe("setData"),U==2&&(Ft=!0),i!==!1){let o=P;o.auto(s,Dl)?cn():Ot(A,o.min,o.max),Xt=B.left>=0,it=!0,xt()}}s.setData=us;function cn(){Dl=!0;let l,i;r==1&&(be>0?(Ce=Tl[0]=0,Ee=Tl[1]=be-1,l=t[0][Ce],i=t[0][Ee],U==2?(l=Ce,i=Ee):be==1&&(U==3?[l,i]=$l(l,l,P.log,!1):U==4?[l,i]=qn(l,l,P.log,!1):P.time?i=l+Me(86400/E):[l,i]=Gl(l,i,Un,!0))):(Ce=Tl[0]=l=null,Ee=Tl[1]=i=null)),Ot(A,l,i)}let Cl,Nt,fn,hn,dn,pn,mn,gn,wn,tl;function cs(l=Ws,i,o=Di,a="butt",h=Ws,p="round"){l!=Cl&&(u.strokeStyle=Cl=l),h!=Nt&&(u.fillStyle=Nt=h),i!=fn&&(u.lineWidth=fn=i),p!=dn&&(u.lineJoin=dn=p),a!=pn&&(u.lineCap=pn=a),o!=hn&&u.setLineDash(hn=o)}function fs(l,i,o,a){i!=Nt&&(u.fillStyle=Nt=i),l!=mn&&(u.font=mn=l),o!=gn&&(u.textAlign=gn=o),a!=wn&&(u.textBaseline=wn=a)}function Sn(l,i,o,a,h=0){if(a.length>0&&l.auto(s,Dl)&&(i==null||i.min==null)){let p=le(Ce,0),S=le(Ee,a.length-1),b=o.min==null?l.distr==3?Ao(a,p,S):Po(a,p,S,h):[o.min,o.max];l.min=Ge(l.min,o.min=b[0]),l.max=Le(l.max,o.max=b[1])}}function Er(){let l=At(D,ii);for(let a in l){let h=l[a],p=F[a];if(p!=null&&p.min!=null)we(h,p),a==A&&ll(!0);else if(a!=A||r==2)if(be==0&&h.from==null){let S=h.range(s,null,null,a);h.min=S[0],h.max=S[1]}else h.min=Q,h.max=-Q}if(be>0){v.forEach((a,h)=>{if(r==1){let p=a.scale,S=l[p],b=F[p];if(h==0){let T=S.range(s,S.min,S.max,p);S.min=T[0],S.max=T[1],Ce=vt(S.min,t[0]),Ee=vt(S.max,t[0]),t[0][Ce]<S.min&&Ce++,t[0][Ee]>S.max&&Ee--,a.min=lt[Ce],a.max=lt[Ee]}else a.show&&a.auto&&Sn(S,b,a,t[h],a.sorted);a.idxs[0]=Ce,a.idxs[1]=Ee}else if(h>0&&a.show&&a.auto){let[p,S]=a.facets,b=p.scale,T=S.scale,[V,k]=t[h];Sn(l[b],F[b],p,V,p.sorted),Sn(l[T],F[T],S,k,S.sorted),a.min=S.min,a.max=S.max}});for(let a in l){let h=l[a],p=F[a];if(h.from==null&&(p==null||p.min==null)){let S=h.range(s,h.min==Q?null:h.min,h.max==-Q?null:h.max,a);h.min=S[0],h.max=S[1]}}}for(let a in l){let h=l[a];if(h.from!=null){let p=l[h.from];if(p.min==null)h.min=h.max=null;else{let S=h.range(s,p.min,p.max,a);h.min=S[0],h.max=S[1]}}}let i={},o=!1;for(let a in l){let h=l[a],p=D[a];if(p.min!=h.min||p.max!=h.max){p.min=h.min,p.max=h.max;let S=p.distr;p._min=S==3?Et(p.min):S==4?Rn(p.min,p.asinh):p.min,p._max=S==3?Et(p.max):S==4?Rn(p.max,p.asinh):p.max,i[a]=o=!0}}if(o){v.forEach((a,h)=>{r==2?h>0&&i.y&&(a._paths=null):i[a.scale]&&(a._paths=null)});for(let a in i)Ft=!0,Pe("setScale",a);B.show&&(Xt=it=B.left>=0)}for(let a in F)F[a]=null}function Pr(l){let i=ti(Ce-1,0,be-1),o=ti(Ee+1,0,be-1);for(;l[i]==null&&i>0;)i--;for(;l[o]==null&&o<be-1;)o++;return[i,o]}function Ar(){be>0&&(v.forEach((l,i)=>{if(i>0&&l.show&&l._paths==null){let o=Pr(t[i]);l._paths=l.paths(s,i,o[0],o[1])}}),v.forEach((l,i)=>{if(i>0&&l.show){tl!=l.alpha&&(u.globalAlpha=tl=l.alpha),hs(i,!1),l._paths&&ds(i,!1);{hs(i,!0);let o=l.points.show(s,i,Ce,Ee),a=l.points.filter(s,i,o,l._paths?l._paths.gaps:null);(o||a)&&(l.points._paths=l.points.paths(s,i,Ce,Ee,a),ds(i,!0))}tl!=1&&(u.globalAlpha=tl=1),Pe("drawSeries",i)}}))}function hs(l,i){let o=i?v[l].points:v[l];o._stroke=o.stroke(s,l),o._fill=o.fill(s,l)}function ds(l,i){let o=i?v[l].points:v[l],a=o._stroke,h=o._fill,{stroke:p,fill:S,clip:b,flags:T}=o._paths,V=null,k=oe(o.width*te,3),z=k%2/2;i&&h==null&&(h=k>0?"#fff":a);let q=o.pxAlign==1;if(q&&u.translate(z,z),!i){let me=ye,K=He,ae=tt,J=yt,se=k*te/2;o.min==0&&(J+=se),o.max==0&&(K-=se,J+=se),V=new Path2D,V.rect(me,K,ae,J)}i?vn(a,k,o.dash,o.cap,h,p,S,T,b):Lr(l,a,k,o.dash,o.cap,h,p,S,T,V,b),q&&u.translate(-z,-z)}function Lr(l,i,o,a,h,p,S,b,T,V,k){let z=!1;R.forEach((q,me)=>{if(q.series[0]==l){let K=v[q.series[1]],ae=t[q.series[1]],J=(K._paths||Sl).band;Dt(J)&&(J=q.dir==1?J[0]:J[1]);let se,ge=null;K.show&&J&&Ro(ae,Ce,Ee)?(ge=q.fill(s,me)||p,se=K._paths.clip):J=null,vn(i,o,a,h,ge,S,b,T,V,k,se,J),z=!0}}),z||vn(i,o,a,h,p,S,b,T,V,k)}let ps=Lt|Ul;function vn(l,i,o,a,h,p,S,b,T,V,k,z){cs(l,i,o,a,h),(T||V||z)&&(u.save(),T&&u.clip(T),V&&u.clip(V)),z?(b&ps)==ps?(u.clip(z),k&&u.clip(k),Pl(h,S),El(l,p,i)):b&Ul?(Pl(h,S),u.clip(z),El(l,p,i)):b&Lt&&(u.save(),u.clip(z),k&&u.clip(k),Pl(h,S),u.restore(),El(l,p,i)):(Pl(h,S),El(l,p,i)),(T||V||z)&&u.restore()}function El(l,i,o){o>0&&(i instanceof Map?i.forEach((a,h)=>{u.strokeStyle=Cl=h,u.stroke(a)}):i!=null&&l&&u.stroke(i))}function Pl(l,i){i instanceof Map?i.forEach((o,a)=>{u.fillStyle=Nt=a,u.fill(o)}):i!=null&&l&&u.fill(i)}function Rr(l,i,o,a){let h=C[l],p;if(a<=0)p=[0,0];else{let S=h._space=h.space(s,l,i,o,a),b=h._incrs=h.incrs(s,l,i,o,a,S);p=eu(i,o,b,a,S)}return h._found=p}function _n(l,i,o,a,h,p,S,b,T,V){let k=S%2/2;L==1&&u.translate(k,k),cs(b,S,T,V,b),u.beginPath();let z,q,me,K,ae=h+(a==0||a==3?-p:p);o==0?(q=h,K=ae):(z=h,me=ae);for(let J=0;J<l.length;J++)i[J]!=null&&(o==0?z=me=l[J]:q=K=l[J],u.moveTo(z,q),u.lineTo(me,K));u.stroke(),L==1&&u.translate(-k,-k)}function zr(l){let i=!0;return C.forEach((o,a)=>{if(!o.show)return;let h=D[o.scale];if(h.min==null){o._show&&(i=!1,o._show=!1,ll(!1));return}else o._show||(i=!1,o._show=!0,ll(!1));let p=o.side,S=p%2,{min:b,max:T}=h,[V,k]=Rr(a,b,T,S==0?G:j);if(k==0)return;let z=h.distr==2,q=o._splits=o.splits(s,a,b,T,V,k,z),me=h.distr==2?q.map(se=>lt[se]):q,K=h.distr==2?lt[q[1]]-lt[q[0]]:V,ae=o._values=o.values(s,o.filter(s,me,a,k,K),a,k,K);o._rotate=p==2?o.rotate(s,ae,a,k):0;let J=o._size;o._size=Kn(o.size(s,ae,a,l)),J!=null&&o._size!=J&&(i=!1)}),i}function Vr(l){let i=!0;return as.forEach((o,a)=>{let h=o(s,a,bt,l);h!=mt[a]&&(i=!1),mt[a]=h}),i}function Fr(){for(let l=0;l<C.length;l++){let i=C[l];if(!i.show||!i._show)continue;let o=i.side,a=o%2,h,p,S=i.stroke(s,l),b=o==0||o==3?-1:1;if(i.label){let nt=i.labelGap*b,ut=Me((i._lpos+nt)*te);fs(i.labelFont[0],S,"center",o==2?hl:Is),u.save(),a==1?(h=p=0,u.translate(ut,Me(He+yt/2)),u.rotate((o==3?-Bl:Bl)/2)):(h=Me(ye+tt/2),p=ut),u.fillText(i.label,h,p),u.restore()}let[T,V]=i._found;if(V==0)continue;let k=D[i.scale],z=a==0?tt:yt,q=a==0?ye:He,me=Me(i.gap*te),K=i._splits,ae=k.distr==2?K.map(nt=>lt[nt]):K,J=k.distr==2?lt[K[1]]-lt[K[0]]:T,se=i.ticks,ge=i.border,We=se.show?Me(se.size*te):0,ue=i._rotate*-Bl/180,Ve=N(i._pos*te),Be=(We+me)*b,Oe=Ve+Be;p=a==0?Oe:0,h=a==1?Oe:0;let Ue=i.font[0],wt=i.align==1?Yt:i.align==2?Pn:ue>0?Yt:ue<0?Pn:a==0?"center":o==3?Pn:Yt,St=ue||a==1?"middle":o==2?hl:Is;fs(Ue,S,wt,St);let Es=i.font[1]*ba,Nl=K.map(nt=>N(d(nt,k,z,q))),Ps=i._values;for(let nt=0;nt<Ps.length;nt++){let ut=Ps[nt];if(ut!=null){a==0?h=Nl[nt]:p=Nl[nt],ut=""+ut;let As=ut.indexOf(`
|
|
`)==-1?[ut]:ut.split(/\n/gm);for(let fl=0;fl<As.length;fl++){let Ls=As[fl];ue?(u.save(),u.translate(h,p+fl*Es),u.rotate(ue),u.fillText(Ls,0,0),u.restore()):u.fillText(Ls,h,p+fl*Es)}}}se.show&&_n(Nl,se.filter(s,ae,l,V,J),a,o,Ve,We,oe(se.width*te,3),se.stroke(s,l),se.dash,se.cap);let Bt=i.grid;Bt.show&&_n(Nl,Bt.filter(s,ae,l,V,J),a,a==0?2:1,a==0?He:ye,a==0?yt:tt,oe(Bt.width*te,3),Bt.stroke(s,l),Bt.dash,Bt.cap),ge.show&&_n([Ve],[1],a==0?1:0,a==0?1:2,a==1?He:ye,a==1?yt:tt,oe(ge.width*te,3),ge.stroke(s,l),ge.dash,ge.cap)}Pe("drawAxes")}function ll(l){v.forEach((i,o)=>{o>0&&(i._paths=null,l&&(r==1?(i.min=null,i.max=null):i.facets.forEach(a=>{a.min=null,a.max=null})))})}let yn=!1;function xt(){yn||(Uo(Nr),yn=!0)}function Nr(){an&&(Er(),an=!1),Ft&&(yr(),Ft=!1),xl&&(ce(x,Yt,pe),ce(x,hl,_e),ce(x,pl,G),ce(x,ml,j),ce(M,Yt,pe),ce(M,hl,_e),ce(M,pl,G),ce(M,ml,j),ce(w,pl,Ne),ce(w,ml,qe),y.width=Me(Ne*te),y.height=Me(qe*te),C.forEach(({_el:l,_show:i,_size:o,_pos:a,side:h})=>{if(l!=null)if(i){let p=h===3||h===0?o:0,S=h%2==1;ce(l,S?"left":"top",a-p),ce(l,S?"width":"height",o),ce(l,S?"top":"left",S?_e:pe),ce(l,S?"height":"width",S?j:G),Hn(l,Tt)}else $e(l,Tt)}),Cl=Nt=fn=dn=pn=mn=gn=wn=hn=null,tl=1,Vl(!0),Pe("setSize"),xl=!1),Ne>0&&qe>0&&(u.clearRect(0,0,y.width,y.height),Pe("drawClear"),Y.forEach(l=>l()),Pe("draw")),B.show&&Xt&&(gt(null,!0,!1),Xt=!1),g||(g=!0,s.status=1,Pe("ready")),Dl=!1,yn=!1}s.redraw=(l,i)=>{Ft=i||!1,l!==!1?Ot(A,P.min,P.max):xt()};function bn(l,i){let o=D[l];if(o.from==null){if(be==0){let a=o.range(s,i.min,i.max,l);i.min=a[0],i.max=a[1]}if(i.min>i.max){let a=i.min;i.min=i.max,i.max=a}if(be>1&&i.min!=null&&i.max!=null&&i.max-i.min<1e-16)return;l==A&&o.distr==2&&be>0&&(i.min=vt(i.min,t[0]),i.max=vt(i.max,t[0]),i.min==i.max&&i.max++),F[l]=i,an=!0,xt()}}s.setScale=bn;let xn,kn,Al,Ll,ms,gs,nl,sl,ws,Ss,fe,he,kt=!1,ze=B.drag,xe=ze.x,ke=ze.y;B.show&&(B.x&&(xn=et(mo,M)),B.y&&(kn=et(go,M)),P.ori==0?(Al=xn,Ll=kn):(Al=kn,Ll=xn),fe=B.left,he=B.top);let Xe=s.select=we({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),il=Xe.show?et(po,Xe.over?M:x):null;function Rl(l,i){if(Xe.show){for(let o in l)ce(il,o,Xe[o]=l[o]);i!==!1&&Pe("setSelect")}}s.setSelect=Rl;function Or(l,i){let o=v[l],a=De?st[l]:null;o.show?a&&Hn(a,Tt):(a&&$e(a,Tt),Ie.length>1&&Gt(Ie[l],-10,-10,G,j))}function Ot(l,i,o){bn(l,{min:i,max:o})}function rt(l,i,o,a){i.focus!=null&&Yr(l),i.show!=null&&v.forEach((h,p)=>{p>0&&(l==p||l==null)&&(h.show=i.show,Or(p,i.show),Ot(r==2?h.facets[1].scale:h.scale,null,null),xt())}),o!==!1&&Pe("setSeries",l,i),a&&cl("setSeries",s,l,i)}s.setSeries=rt;function Hr(l,i){we(R[l],i)}function Ir(l,i){l.fill=ee(l.fill||null),l.dir=le(l.dir,-1),i=i??R.length,R.splice(i,0,l)}function Wr(l){l==null?R.length=0:R.splice(l,1)}s.addBand=Ir,s.setBand=Hr,s.delBand=Wr;function Br(l,i){v[l].alpha=i,B.show&&Ie[l]&&(Ie[l].style.opacity=i),De&&st[l]&&(st[l].style.opacity=i)}let rl,zl,ol,Ht={focus:!0};function Yr(l){if(l!=ol){let i=l==null,o=kl.alpha!=1;v.forEach((a,h)=>{let p=i||h==0||h==l;a._focus=i?null:p,o&&Br(h,p?1:kl.alpha)}),ol=l,o&&xt()}}De&&Ml&&Ct(qs,Je,l=>{B._lock||ol!=null&&rt(null,Ht,!0,Ae.setSeries)});function at(l,i,o){let a=D[i];o&&(l=l/te-(a.ori==1?_e:pe));let h=G;a.ori==1&&(h=j,l=h-l),a.dir==-1&&(l=h-l);let p=a._min,S=a._max,b=l/h,T=p+(S-p)*b,V=a.distr;return V==3?_t(10,T):V==4?Fo(T,a.asinh):T}function Gr(l,i){let o=at(l,A,i);return vt(o,t[0],Ce,Ee)}s.valToIdx=l=>vt(l,t[0]),s.posToIdx=Gr,s.posToVal=at,s.valToPos=(l,i,o)=>D[i].ori==0?c(l,D[i],o?tt:G,o?ye:0):m(l,D[i],o?yt:j,o?He:0);function qr(l){l(s),xt()}s.batch=qr,s.setCursor=(l,i,o)=>{fe=l.left,he=l.top,gt(null,i,o)};function vs(l,i){ce(il,Yt,Xe.left=l),ce(il,pl,Xe.width=i)}function _s(l,i){ce(il,hl,Xe.top=l),ce(il,ml,Xe.height=i)}let al=P.ori==0?vs:_s,ul=P.ori==1?vs:_s;function Ur(){if(De&&I.live)for(let l=r==2?1:0;l<v.length;l++){if(l==0&&Ze)continue;let i=I.values[l],o=0;for(let a in i)ht[l][o++].firstChild.nodeValue=i[a]}}function ys(l,i){if(l!=null){let o=l.idx;I.idx=o,v.forEach((a,h)=>{(h>0||!Ze)&&bs(h,o)})}De&&I.live&&Ur(),it=!1,i!==!1&&Pe("setLegend")}s.setLegend=ys;function bs(l,i){let o;if(i==null)o=ot;else{let a=v[l],h=l==0&&U==2?lt:t[l];o=Ze?a.values(s,l,i):{_:a.value(s,h[i],l,i)}}I.values[l]=o}function gt(l,i,o){ws=fe,Ss=he,[fe,he]=B.move(s,fe,he),B.show&&(Al&&Gt(Al,Me(fe),0,G,j),Ll&&Gt(Ll,0,Me(he),G,j));let a,h=Ce>Ee;rl=Q;let p=P.ori==0?G:j,S=P.ori==1?G:j;if(fe<0||be==0||h){a=null;for(let b=0;b<v.length;b++)b>0&&Ie.length>1&&Gt(Ie[b],-10,-10,G,j);if(Ml&&rt(null,Ht,!0,l==null&&Ae.setSeries),I.live){H.fill(null),it=!0;for(let b=0;b<v.length;b++)I.values[b]=ot}}else{let b,T,V;r==1&&(b=P.ori==0?fe:he,T=at(b,A),a=vt(T,t[0],Ce,Ee),V=Pt(re(t[0][a],P,p,0),.5));for(let k=r==2?1:0;k<v.length;k++){let z=v[k],q=H[k],me=r==1?t[k][q]:t[k][1][q],K=B.dataIdx(s,k,a,T),ae=r==1?t[k][K]:t[k][1][K];it=it||ae!=me||K!=q,H[k]=K;let J=K==a?V:Pt(re(r==1?t[0][K]:t[k][0][K],P,p,0),.5);if(k>0&&z.show){let se=ae==null?-10:Pt(Z(ae,r==1?D[z.scale]:D[z.facets[1].scale],S,0),.5);if(se>0&&r==1){let ue=Ye(se-he);ue<=rl&&(rl=ue,zl=k)}let ge,We;if(P.ori==0?(ge=J,We=se):(ge=se,We=J),it&&Ie.length>1){Co(Ie[k],B.points.fill(s,k),B.points.stroke(s,k));let ue,Ve,Be,Oe,Ue=!0,wt=B.points.bbox;if(wt!=null){Ue=!1;let St=wt(s,k);Be=St.left,Oe=St.top,ue=St.width,Ve=St.height}else Be=ge,Oe=We,ue=Ve=B.points.size(s,k);Eo(Ie[k],ue,Ve,Ue),Gt(Ie[k],Be,Oe,G,j)}}if(I.live){if(!it||k==0&&Ze)continue;bs(k,K)}}}if(B.idx=a,B.left=fe,B.top=he,it&&(I.idx=a,ys()),Xe.show&&kt)if(l!=null){let[b,T]=Ae.scales,[V,k]=Ae.match,[z,q]=l.cursor.sync.scales,me=l.cursor.drag;if(xe=me._x,ke=me._y,xe||ke){let{left:K,top:ae,width:J,height:se}=l.select,ge=l.scales[b].ori,We=l.posToVal,ue,Ve,Be,Oe,Ue,wt=b!=null&&V(b,z),St=T!=null&&k(T,q);wt&&xe?(ge==0?(ue=K,Ve=J):(ue=ae,Ve=se),Be=D[b],Oe=re(We(ue,z),Be,p,0),Ue=re(We(ue+Ve,z),Be,p,0),al(Ge(Oe,Ue),Ye(Ue-Oe))):al(0,p),St&&ke?(ge==1?(ue=K,Ve=J):(ue=ae,Ve=se),Be=D[T],Oe=Z(We(ue,q),Be,S,0),Ue=Z(We(ue+Ve,q),Be,S,0),ul(Ge(Oe,Ue),Ye(Ue-Oe))):ul(0,S)}else Tn()}else{let b=Ye(ws-ms),T=Ye(Ss-gs);if(P.ori==1){let q=b;b=T,T=q}xe=ze.x&&b>=ze.dist,ke=ze.y&&T>=ze.dist;let V=ze.uni;V!=null?xe&&ke&&(xe=b>=V,ke=T>=V,!xe&&!ke&&(T>b?ke=!0:xe=!0)):ze.x&&ze.y&&(xe||ke)&&(xe=ke=!0);let k,z;xe&&(P.ori==0?(k=nl,z=fe):(k=sl,z=he),al(Ge(k,z),Ye(z-k)),ke||ul(0,S)),ke&&(P.ori==1?(k=nl,z=fe):(k=sl,z=he),ul(Ge(k,z),Ye(z-k)),xe||al(0,p)),!xe&&!ke&&(al(0,0),ul(0,0))}if(ze._x=xe,ze._y=ke,l==null){if(o){if(Cs!=null){let[b,T]=Ae.scales;Ae.values[0]=b!=null?at(P.ori==0?fe:he,b):null,Ae.values[1]=T!=null?at(P.ori==1?fe:he,T):null}cl(Bs,s,fe,he,G,j,a)}if(Ml){let b=o&&Ae.setSeries,T=kl.prox;ol==null?rl<=T&&rt(zl,Ht,!0,b):rl>T?rt(null,Ht,!0,b):zl!=ol&&rt(zl,Ht,!0,b)}}g&&i!==!1&&Pe("setCursor")}let It=null;function Vl(l){l===!0?It=null:(It=M.getBoundingClientRect(),Pe("syncRect",It))}function xs(l,i,o,a,h,p,S){B._lock||(Mn(l,i,o,a,h,p,S,!1,l!=null),l!=null?gt(null,!0,!0):gt(i,!0,!1))}function Mn(l,i,o,a,h,p,S,b,T){if(It==null&&Vl(!1),l!=null)o=l.clientX-It.left,a=l.clientY-It.top;else{if(o<0||a<0){fe=-10,he=-10;return}let[V,k]=Ae.scales,z=i.cursor.sync,[q,me]=z.values,[K,ae]=z.scales,[J,se]=Ae.match,ge=i.axes[0].side%2==1,We=P.ori==0?G:j,ue=P.ori==1?G:j,Ve=ge?p:h,Be=ge?h:p,Oe=ge?a:o,Ue=ge?o:a;if(K!=null?o=J(V,K)?d(q,D[V],We,0):-10:o=We*(Oe/Ve),ae!=null?a=se(k,ae)?d(me,D[k],ue,0):-10:a=ue*(Ue/Be),P.ori==1){let wt=o;o=a,a=wt}}T&&((o<=1||o>=G-1)&&(o=Mt(o,G)),(a<=1||a>=j-1)&&(a=Mt(a,j))),b?(ms=o,gs=a,[nl,sl]=B.move(s,o,a)):(fe=o,he=a)}let $r={width:0,height:0};function Tn(){Rl($r,!1)}function ks(l,i,o,a,h,p,S){kt=!0,xe=ke=ze._x=ze._y=!1,Mn(l,i,o,a,h,p,S,!0,!1),l!=null&&(Qe(An,Nn,Ms),cl(Ys,s,nl,sl,G,j,null))}function Ms(l,i,o,a,h,p,S){kt=ze._x=ze._y=!1,Mn(l,i,o,a,h,p,S,!1,!0);let{left:b,top:T,width:V,height:k}=Xe,z=V>0||k>0;if(z&&Rl(Xe),ze.setScale&&z){let q=b,me=V,K=T,ae=k;if(P.ori==1&&(q=T,me=k,K=b,ae=V),xe&&Ot(A,at(q,A),at(q+me,A)),ke)for(let J in D){let se=D[J];J!=A&&se.from==null&&se.min!=Q&&Ot(J,at(K+ae,J),at(K,J))}Tn()}else B.lock&&(B._lock=!B._lock,B._lock||gt(null,!0,!1));l!=null&&(ne(An,Nn),cl(An,s,fe,he,G,j,null))}function Kr(l,i,o,a,h,p,S){if(!B._lock){let b=kt;if(kt){let T=!0,V=!0,k=10,z,q;P.ori==0?(z=xe,q=ke):(z=ke,q=xe),z&&q&&(T=fe<=k||fe>=G-k,V=he<=k||he>=j-k),z&&T&&(fe=fe<nl?0:G),q&&V&&(he=he<sl?0:j),gt(null,!0,!0),kt=!1}fe=-10,he=-10,gt(null,!0,!0),b&&(kt=b)}}function Ts(l,i,o,a,h,p,S){cn(),Tn(),l!=null&&cl(Us,s,fe,he,G,j,null)}function Ds(){C.forEach(tu),un(s.width,s.height,!0)}Ct(Yl,Ut,Ds);let Wt={};Wt.mousedown=ks,Wt.mousemove=xs,Wt.mouseup=Ms,Wt.dblclick=Ts,Wt.setSeries=(l,i,o,a)=>{rt(o,a,!0,!1)},B.show&&(Qe(Ys,M,ks),Qe(Bs,M,xs),Qe(Gs,M,Vl),Qe(qs,M,Kr),Qe(Us,M,Ts),Bn.add(s),s.syncRect=Vl);let Fl=s.hooks=e.hooks||{};function Pe(l,i,o){l in Fl&&Fl[l].forEach(a=>{a.call(null,s,i,o)})}(e.plugins||[]).forEach(l=>{for(let i in l.hooks)Fl[i]=(Fl[i]||[]).concat(l.hooks[i])});let Ae=we({key:null,setSeries:!1,filters:{pub:li,sub:li},scales:[A,v[1]?v[1].scale:null],match:[ni,ni],values:[null,null]},B.sync);B.sync=Ae;let Cs=Ae.key,Dn=Yi(Cs);function cl(l,i,o,a,h,p,S){Ae.filters.pub(l,i,o,a,h,p,S)&&Dn.pub(l,i,o,a,h,p,S)}Dn.sub(s);function jr(l,i,o,a,h,p,S){Ae.filters.sub(l,i,o,a,h,p,S)&&Wt[l](null,i,o,a,h,p,S)}s.pub=jr;function Jr(){Dn.unsub(s),Bn.delete(s),pt.clear(),In(Yl,Ut,Ds),_.remove(),Pe("destroy")}s.destroy=Jr;function Cn(){Pe("init",e,t),us(t||e.data,!1),F[A]?bn(A,F[A]):cn(),un(e.width,e.height),gt(null,!0,!1),Rl(Xe,!1)}return v.forEach(os),C.forEach(Cr),n?n instanceof HTMLElement?(n.appendChild(_),Cn()):n(s,Cn):Cn(),s}Se.assign=we;Se.fmtNum=$n;Se.rangeNum=Gl;Se.rangeLog=$l;Se.rangeAsinh=qn;Se.orient=Rt;Se.pxRatio=te;Se.join=qo;Se.fmtDate=jn,Se.tzDate=Xo;Se.sync=Yi;{Se.addGap=Ha,Se.clipGaps=Zl;let e=Se.paths={points:ji};e.linear=Zi,e.stepped=Ba,e.bars=Ya,e.spline=qa}var lu=(e,t,n)=>su(e-t,n)+t,nu=(e,t)=>e-t;function su(e,t){return Math.floor(e/t)*t}function iu(e,t){let n=[...e.values()];t&&n.sort((f,c)=>t(f.value,c.value));let s=Array(n.length),r=Array(n.length);for(let f=0;f<n.length;f++)s[f]=n[f].value,r[f]=n[f].count;return[s,r]}var lr=({bucketSize:e=20})=>+e,tn=class{constructor(t,n){this.chart=t,this.datasets=new Map,this.options=n,this.bucketSize=lr(n),this.histOffset=0}handleMeasurements(t){t.forEach(({y:n})=>{if(n==null)return;n=lu(n,this.histOffset,this.bucketSize);let s=this.datasets.get(n);s?s.count++:this.datasets.set(n,{value:n,count:1})}),this.chart.setData(iu(this.datasets,nu))}static initialData(){return[[],[]]}static getConfig(t){let n=lr(t),s=Se.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:r=>[r.data[0][0],r.data[0][r.data[0].length-1]+n]}},axes:[{incrs:()=>[0,1,2,3,4,5,6,7,8,9,10].map(r=>r*n),splits:(r,f,c,m,d,g)=>{let _=r.axes[f]._space,y=r.valToPos(r.data[0][0]+n,"x")-r.valToPos(r.data[0][0],"x"),u=r.data[0][0],w=r.data[0][r.data[0].length-1]+n,x=[],M=Math.ceil(_/y);for(let L=0,N=u;N<=w;L++,N+=n)!(L%M)&&x.push(N);return x}}],series:[{label:t.label,value:(r,f)=>f+`-${f+n} ${t.unit}`},{paths:s,points:{show:!1},...Ol.at(1),width:2,label:"Events"}]}}};var ru=e=>e.unit?{value:(t,n)=>n==null?"--":n.toFixed(3)+` ${e.unit}`}:{},sr=e=>({value:"{YYYY}-{MM}-{DD} {HH}:{mm}:{ss}"}),ou=e=>e.unit?{values:(t,n,s)=>n.map(r=>+r.toFixed(2)+` ${e.unit}`)}:{},ir=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]]}),rr=e=>({show:!0,size:70,space:15,...ou(e)}),ln={width:100,height:300},or={sync:{key:"metrics-live"}};function au(e,t){let n=!1;return()=>{n||(requestAnimationFrame(e),n=!0,setTimeout(()=>{n=!1},t))}}var nn=(e,t=0)=>({...Ol.at(t),...ru(e),label:e.label,spanGaps:!0,points:{show:!1}}),ar=e=>e.slice(0).map(({data:t})=>t);function uu({y:e,z:t},n){this.datasets[0].data.push(t);let s=this.datasets[1].data[this.datasets[1].data.length-1]||0,r=n.call(this,e,s);this.datasets[1].data.push(r)}var ts=e=>e.reduceRight((t,n)=>n!=null&&t==null?n:t,null);function cu({x:e,y:t,z:n},s){let r=this.datasets.findIndex(({key:f})=>e===f);r===-1&&(r=this.datasets.push({key:e,data:Array(this.datasets[0].data.length).fill(null)})-1,this.chart.addSeries(nn({label:e,unit:this.options.unit},r-1),r)),this.datasets=this.datasets.map((f,c)=>(c===0?f.data.push(n):c===r?f.data.push(s.call(this,t,ts(f.data)||0)):f.data.push(null),f))}var ur=({pruneThreshold:e=1e3})=>e,_l=class{static __projections(){return{counter:(t,n)=>n+1,last_value:t=>t,sum:(t,n)=>n+t}}static getConfig(t){return{class:t.kind,title:t.title,width:t.width,height:t.height,cursor:or,series:[{...sr()},nn(t,0)],scales:{x:{min:t.now-60,max:t.now},y:{min:0,max:1}},axes:[ir(),rr(t)]}}static initialData(){return[[],[]]}constructor(t,n){this.__callback=this.constructor.__projections()[n.metric],this.chart=t,this.datasets=[{key:"|x|",data:[]}],this.options=n,this.pruneThreshold=ur(n),n.tagged?(this.chart.delSeries(1),this.__handler=cu):(this.datasets.push({key:n.label,data:[]}),this.__handler=uu)}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,...r})=>({data:s.slice(-this.pruneThreshold),...r}))),this.chart.setData(ar(this.datasets))}},yl=class{constructor(t,n){let s=this.constructor.getConfig(t);s.series[1].values=this.__seriesValues.bind(this),this.datasets=[{key:"|x|",data:[]}],this.chart=new Se(s,this.constructor.initialData(t),n),this.pruneThreshold=ur(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(n=>this.__handler(n)),this.__maybePruneDatasets(),this.chart.setData(ar(this.datasets))}handleTaggedMeasurement(t){let n=this.findOrCreateSeries(t.x);this.handleMeasurement(t,n)}handleMeasurement(t,n=1){let{z:s}=t;this.datasets=this.datasets.map((r,f)=>(r.key==="|x|"?r.data.push(s):f===n?this.pushToDataset(r,t):this.pushToDataset(r,null),r))}findOrCreateSeries(t){let n=this.datasets.findIndex(({key:s})=>t===s);if(n===-1){n=this.datasets.push(this.constructor.newDataset(t,this.datasets[0].data.length))-1;let s={values:this.__seriesValues.bind(this),...nn({label:t},n-1)};this.chart.addSeries(s,n)}return n}pushToDataset(t,n){if(n===null){t.data.push(null),t.agg.avg.push(null),t.agg.max.push(null),t.agg.min.push(null);return}let{y:s}=n;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 n=-this.pruneThreshold;this.datasets=this.datasets.map(({key:s,data:r,agg:f})=>{let c=r.slice(n);if(!f)return{key:s,data:c};let{avg:m,count:d,max:g,min:_,total:y}=f,u=_.slice(n),w=g.slice(n);return{key:s,data:c,agg:{avg:m.slice(n),count:d,min:u,max:w,total:y},last:{min:ts(u),max:ts(w)}}})}}__seriesValues(t,n,s){let r=this.datasets[n];if(r&&r.data&&r.data[s]){let{agg:{avg:f,max:c,min:m},data:d}=r;return{Value:d[s].toFixed(3),Min:m[s].toFixed(3),Max:c[s].toFixed(3),Avg:f[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:or,series:[{...sr()},nn(t,0)],scales:{x:{min:t.now-60,max:t.now},y:{min:0,max:1}},axes:[ir(),rr(t)]}}static newDataset(t,n=0){let s=n>0?Array(n).fill(null):[];return{key:t,data:[...s],agg:{avg:[...s],count:0,max:[...s],min:[...s],total:0},last:{max:null,min:null}}}},nr={counter:_l,last_value:_l,sum:_l,summary:yl,distribution:tn},ls=class{constructor(t,n){if(n.metric){if(n.metric&&!nr[n.metric])throw new TypeError(`No metric defined for type ${n.metric}`)}else throw new TypeError("No metric type was provided");let s=nr[n.metric];s===yl?(this.metric=new yl(n,t),this.uplotChart=this.metric.chart):(this.uplotChart=new Se(s.getConfig(n),s.initialData(n),t),this.metric=new s(this.uplotChart,n));let r=typeof n.refreshInterval<"u";this._isBufferingData=r,this._buffer=[],this._timer=r?setInterval(this._flushToChart.bind(this),+n.refreshInterval):null}clearTimers(){clearInterval(this._timer)}resize(t){this.uplotChart.setSize({width:Math.max(t.width,ln.width),height:ln.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((n,s)=>n.concat(s),[])}},fu={mounted(){let e=this.el.parentElement.querySelector(".chart"),t=e.getBoundingClientRect(),n=Object.assign({},e.dataset,{tagged:e.dataset.tags&&e.dataset.tags!==""||!1,width:Math.max(t.width,ln.width),height:ln.height,now:new Date/1e3,refreshInterval:1e3});this.chart=new ls(e,n),window.addEventListener("resize",au(()=>{let s=e.getBoundingClientRect();this.chart.resize(s)}))},updated(){let e=Array.from(this.el.children||[]).map(({dataset:{x:t,y:n,z:s}})=>({x:t,y:+n,z:+s/1e6}));e.length>0&&this.chart.pushData(e)},destroyed(){this.chart.clearTimers()}},cr=fu;var hu=e=>{let t=`${e.key}=${e.value};path=/`;window.location.protocol==="https:"&&(t+=";samesite=strict"),e.domain&&(t+=`;domain=${e.domain}`),document.cookie=t},du=e=>{let t="Thu, 01 Jan 1970 00:00:00 GMT";document.cookie=`${e.key}=; expires=${t}`},pu=e=>e.el.hasAttribute("data-cookie-enabled"),mu=e=>({key:e.el.getAttribute("data-cookie-key"),value:e.el.getAttribute("data-cookie-value"),domain:e.el.getAttribute("data-cookie-domain")}),gu={updated(){let e=mu(this);du(e),pu(this)&&hu(e)}},fr=gu;var wu=e=>{if(!navigator.clipboard)e.select(),e.setSelectionRange(0,99999),document.execCommand("copy");else{let t=e.value;navigator.clipboard.writeText(t)}},Su={mounted(){this.el.querySelector(".btn-primary").addEventListener("click",e=>{let t=this.el.querySelector("textarea");wu(t);let n=this.el.querySelector(".copy-indicator");n.setAttribute("data-enabled","false"),n.offsetWidth,n.setAttribute("data-enabled","true")})}},hr=Su;var vu={updated(){if(this.el.querySelector(".logger-autoscroll-checkbox").checked){let e=this.el.querySelector("#logger-messages");e.scrollTop=e.scrollHeight}}},dr=vu;var mr=".progress-bar, .color-bar-legend-entry",sn,pr=e=>{e.querySelectorAll(mr).forEach(t=>{if(sn){let n=t.getAttribute("data-name")!==sn;t.setAttribute("data-muted",n)}else t.removeAttribute("data-muted")})},_u={mounted(){this.el.setAttribute("data-highlight-enabled","true"),this.el.querySelectorAll(mr).forEach(e=>e.addEventListener("click",t=>{let n=t.currentTarget.getAttribute("data-name");sn=n===sn?null:n,pr(this.el)}))},updated(){this.el.setAttribute("data-highlight-enabled","true"),pr(this.el)}},gr=_u;var wr="_refresh_data";function Sr(e,t){let n=JSON.stringify(e),s=xu(n);bu(wr,s,t,15768e4)}function rn(){let e=yu(wr);if(e){let t=ku(e);return JSON.parse(t)}else return null}function yu(e){let t=document.cookie.split("; ").find(n=>n.startsWith(`${e}=`));return t?t.replace(`${e}=`,""):null}function bu(e,t,n,s){let r=`${e}=${t};max-age=${s};path=${n}`;document.cookie=r}function xu(e){return btoa(unescape(encodeURIComponent(e)))}function ku(e){return decodeURIComponent(escape(atob(e)))}var Mu={updated(){let e=rn()||{};e[this.el.dataset.page]=this.el.value,Sr(e,this.el.dataset.dashboardMountPath)}},vr=Mu;var Tu={PhxChartComponent:cr,PhxRequestLoggerCookie:fr,PhxRequestLoggerQueryParameter:hr,PhxRequestLoggerMessages:dr,PhxColorBarHighlight:gr,PhxRememberRefresh:vr},Du=document.querySelector("html").getAttribute("phx-socket")||"/live",Cu=document.querySelector("meta[name='csrf-token']").getAttribute("content"),is=new LiveView.LiveSocket(Du,Phoenix.Socket,{hooks:{...Tu,...window.LiveDashboard.customHooks},params:e=>({_csrf_token:Cu,refresh_data:rn()})}),zt=is.socket,Eu=zt.onConnError,ns=!0;zt.onOpen(()=>{ns=!1});zt.onConnError=(...e)=>{ns?(ns=!1,zt.disconnect(null,3e3),zt.transport=Phoenix.LongPoll,zt.connect()):Eu.apply(zt,e)};window.addEventListener("phx:page-loading-start",e=>ss.default.start());window.addEventListener("phx:page-loading-stop",e=>ss.default.done());is.connect();window.liveSocket=is;})();
|
|
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
* @license MIT */
|