/*! https://github.com/leeoniya/uPlot (v1.6.22) */ var uPlot=function(){"use strict";const e="u-off",t="u-label",l="width",n="height",i="top",o="bottom",s="left",r="right",u="#000",a="#0000",f="mousemove",c="mousedown",h="mouseup",d="mouseenter",p="mouseleave",m="dblclick",g="change",x="dppxchange",w="undefined"!=typeof window,_=w?document:null,b=w?window:null,k=w?navigator:null;let v,y;function M(e,t){if(null!=t){let l=e.classList;!l.contains(t)&&l.add(t)}}function S(e,t){let l=e.classList;l.contains(t)&&l.remove(t)}function E(e,t,l){e.style[t]=l+"px"}function D(e,t,l,n){let i=_.createElement(e);return null!=t&&M(i,t),null!=l&&l.insertBefore(i,n),i}function z(e,t){return D("div",e,t)}const T=new WeakMap;function P(t,l,n,i,o){let s="translate("+l+"px,"+n+"px)";s!=T.get(t)&&(t.style.transform=s,T.set(t,s),0>l||0>n||l>i||n>o?M(t,e):S(t,e))}const A=new WeakMap;function W(e,t,l){let n=t+l;n!=A.get(e)&&(A.set(e,n),e.style.background=t,e.style.borderColor=l)}const Y=new WeakMap;function C(e,t,l,n){let i=t+""+l;i!=Y.get(e)&&(Y.set(e,i),e.style.height=l+"px",e.style.width=t+"px",e.style.marginLeft=n?-t/2+"px":0,e.style.marginTop=n?-l/2+"px":0)}const F={passive:!0},H={...F,capture:!0};function R(e,t,l,n){t.addEventListener(e,l,n?H:F)}function L(e,t,l,n){t.removeEventListener(e,l,n?H:F)}function G(e,t,l,n){let i;l=l||0;let o=2147483647>=(n=n||t.length-1);for(;n-l>1;)i=o?l+n>>1:ee((l+n)/2),e>t[i]?l=i:n=i;return e-t[l]>t[n]-e?n:l}function I(e,t,l,n){for(let i=1==n?t:l;i>=t&&l>=i;i+=n)if(null!=e[i])return i;return-1}function O(e,t,l,n){let i=se(e),o=se(t),s=10==l?re:ue;e==t&&(-1==i?(e*=l,t/=l):(e/=l,t*=l));let r=1==o?le:ee,u=(1==i?ee:le)(s(Q(e))),a=r(s(Q(t))),f=oe(l,u),c=oe(l,a);return 0>u&&(f=ve(f,-u)),0>a&&(c=ve(c,-a)),n?(e=f*i,t=c*o):(e=ke(e,f),t=be(t,c)),[e,t]}function N(e,t,l,n){let i=O(e,t,l,n);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}w&&function e(){let t=devicePixelRatio;v!=t&&(v=t,y&&L(g,y,e),y=matchMedia(`(min-resolution: ${v-.001}dppx) and (max-resolution: ${v+.001}dppx)`),R(g,y,e),b.dispatchEvent(new CustomEvent(x)))}();const j={mode:3,pad:.1},U={pad:0,soft:null,mode:0},B={min:U,max:U};function V(e,t,l,n){return We(l)?q(e,t,l):(U.pad=l,U.soft=n?0:null,U.mode=n?3:0,q(e,t,B))}function J(e,t){return null==e?t:e}function q(e,t,l){let n=l.min,i=l.max,o=J(n.pad,0),s=J(i.pad,0),r=J(n.hard,-fe),u=J(i.hard,fe),a=J(n.soft,fe),f=J(i.soft,-fe),c=J(n.mode,0),h=J(i.mode,0),d=t-e;1e-9>d&&(d=0,0!=e&&0!=t||(d=1e-9,2==c&&a!=fe&&(o=0),2==h&&f!=-fe&&(s=0)));let p=d||Q(t)||1e3,m=re(p),g=oe(10,ee(m)),x=ve(ke(e-p*(0==d?0==e?.1:1:o),g/10),9),w=a>e||1!=c&&(3!=c||x>a)&&(2!=c||a>x)?fe:a,_=ie(r,w>x&&e>=w?w:ne(w,x)),b=ve(be(t+p*(0==d?0==t?.1:1:s),g/10),9),k=t>f||1!=h&&(3!=h||f>b)&&(2!=h||b>f)?-fe:f,v=ne(u,b>k&&k>=t?k:ie(k,b));return _==v&&0==_&&(v=100),[_,v]}const K=new Intl.NumberFormat(w?k.language:"en-US"),Z=e=>K.format(e),$=Math,X=$.PI,Q=$.abs,ee=$.floor,te=$.round,le=$.ceil,ne=$.min,ie=$.max,oe=$.pow,se=$.sign,re=$.log10,ue=$.log2,ae=(e,t=1)=>$.asinh(e/t),fe=1/0;function ce(e){return 1+(0|re((e^e>>31)-(e>>31)))}function he(e,t){return te(e/t)*t}function de(e,t,l){return ne(ie(e,t),l)}function pe(e){return"function"==typeof e?e:()=>e}const me=e=>e,ge=(e,t)=>t,xe=()=>null,we=()=>!0,_e=(e,t)=>e==t;function be(e,t){return le(e/t)*t}function ke(e,t){return ee(e/t)*t}function ve(e,t=0){if(Pe(e))return e;let l=10**t;return te(e*l*(1+Number.EPSILON))/l}const ye=new Map;function Me(e){return((""+e).split(".")[1]||"").length}function Se(e,t,l,n){let i=[],o=n.map(Me);for(let s=t;l>s;s++){let t=Q(s),l=ve(oe(e,s),t);for(let e=0;n.length>e;e++){let r=n[e]*l,u=(0>r||0>s?t:0)+(o[e]>s?o[e]:0),a=ve(r,u);i.push(a),ye.set(a,u)}}return i}const Ee={},De=[],ze=[null,null],Te=Array.isArray,Pe=Number.isInteger;function Ae(e){return"string"==typeof e}function We(e){let t=!1;if(null!=e){let l=e.constructor;t=null==l||l==Object}return t}function Ye(e){return null!=e&&"object"==typeof e}const Ce=Object.getPrototypeOf(Uint8Array);function Fe(e,t=We){let l;if(Te(e)){let n=e.find((e=>null!=e));if(Te(n)||t(n)){l=Array(e.length);for(let n=0;e.length>n;n++)l[n]=Fe(e[n],t)}else l=e.slice()}else if(e instanceof Ce)l=e.slice();else if(t(e)){l={};for(let n in e)l[n]=Fe(e[n],t)}else l=e;return l}function He(e){let t=arguments;for(let l=1;t.length>l;l++){let n=t[l];for(let t in n)We(e[t])?He(e[t],Fe(n[t])):e[t]=Fe(n[t])}return e}function Re(e,t,l){for(let n,i=0,o=-1;t.length>i;i++){let s=t[i];if(s>o){for(n=s-1;n>=0&&null==e[n];)e[n--]=null;for(n=s+1;l>n&&null==e[n];)e[o=n++]=null}}}const Le="undefined"==typeof queueMicrotask?e=>Promise.resolve().then(e):queueMicrotask,Ge=["January","February","March","April","May","June","July","August","September","October","November","December"],Ie=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Oe(e){return e.slice(0,3)}const Ne=Ie.map(Oe),je=Ge.map(Oe),Ue={MMMM:Ge,MMM:je,WWWW:Ie,WWW:Ne};function Be(e){return(10>e?"0":"")+e}const Ve={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=>Be(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Be(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>Be(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>12>e.getHours()?"AM":"PM",aa:e=>12>e.getHours()?"am":"pm",a:e=>12>e.getHours()?"a":"p",mm:e=>Be(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Be(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>function(e){return(10>e?"00":100>e?"0":"")+e}(e.getMilliseconds())};function Je(e,t){t=t||Ue;let l,n=[],i=/\{([a-z]+)\}|[^{]+/gi;for(;l=i.exec(e);)n.push("{"==l[0][0]?Ve[l[1]]:l[0]);return e=>{let l="";for(let i=0;n.length>i;i++)l+="string"==typeof n[i]?n[i]:n[i](e,t);return l}}const qe=(new Intl.DateTimeFormat).resolvedOptions().timeZone,Ke=e=>e%1==0,Ze=[1,2,2.5,5],$e=Se(10,-16,0,Ze),Xe=Se(10,0,16,Ze),Qe=Xe.filter(Ke),et=$e.concat(Xe),tt="{YYYY}",lt="\n"+tt,nt="{M}/{D}",it="\n"+nt,ot=it+"/{YY}",st="{aa}",rt="{h}:{mm}"+st,ut="\n"+rt,at=":{ss}",ft=null;function ct(e){let t=1e3*e,l=60*t,n=60*l,i=24*n,o=30*i,s=365*i;return[(1==e?Se(10,0,3,Ze).filter(Ke):Se(10,-3,0,Ze)).concat([t,5*t,10*t,15*t,30*t,l,5*l,10*l,15*l,30*l,n,2*n,3*n,4*n,6*n,8*n,12*n,i,2*i,3*i,4*i,5*i,6*i,7*i,8*i,9*i,10*i,15*i,o,2*o,3*o,4*o,6*o,s,2*s,5*s,10*s,25*s,50*s,100*s]),[[s,tt,ft,ft,ft,ft,ft,ft,1],[28*i,"{MMM}",lt,ft,ft,ft,ft,ft,1],[i,nt,lt,ft,ft,ft,ft,ft,1],[n,"{h}"+st,ot,ft,it,ft,ft,ft,1],[l,rt,ot,ft,it,ft,ft,ft,1],[t,at,ot+" "+rt,ft,it+" "+rt,ft,ut,ft,1],[e,at+".{fff}",ot+" "+rt,ft,it+" "+rt,ft,ut,ft,1]],function(t){return(r,u,a,f,c,h)=>{let d=[],p=c>=s,m=c>=o&&s>c,g=t(a),x=ve(g*e,3),w=bt(g.getFullYear(),p?0:g.getMonth(),m||p?1:g.getDate()),_=ve(w*e,3);if(m||p){let l=m?c/o:0,n=p?c/s:0,i=x==_?x:ve(bt(w.getFullYear()+n,w.getMonth()+l,1)*e,3),r=new Date(te(i/e)),u=r.getFullYear(),a=r.getMonth();for(let o=0;f>=i;o++){let s=bt(u+n*o,a+l*o,1),r=s-t(ve(s*e,3));i=ve((+s+r)*e,3),i>f||d.push(i)}}else{let o=i>c?c:i,s=_+(ee(a)-ee(x))+be(x-_,o);d.push(s);let p=t(s),m=p.getHours()+p.getMinutes()/l+p.getSeconds()/n,g=c/n,w=h/r.axes[u]._space;for(;s=ve(s+c,1==e?0:3),f>=s;)if(g>1){let e=ee(ve(m+g,6))%24,l=t(s).getHours()-e;l>1&&(l=-1),s-=l*n,m=(m+g)%24,.7>ve((s-d[d.length-1])/c,3)*w||d.push(s)}else d.push(s)}return d}}]}const[ht,dt,pt]=ct(1),[mt,gt,xt]=ct(.001);function wt(e,t){return e.map((e=>e.map(((l,n)=>0==n||8==n||null==l?l:t(1==n||0==e[8]?l:e[1]+l)))))}function _t(e,t){return(l,n,i,o,s)=>{let r,u,a,f,c,h,d=t.find((e=>s>=e[0]))||t[t.length-1];return n.map((t=>{let l=e(t),n=l.getFullYear(),i=l.getMonth(),o=l.getDate(),s=l.getHours(),p=l.getMinutes(),m=l.getSeconds(),g=n!=r&&d[2]||i!=u&&d[3]||o!=a&&d[4]||s!=f&&d[5]||p!=c&&d[6]||m!=h&&d[7]||d[1];return r=n,u=i,a=o,f=s,c=p,h=m,g(l)}))}}function bt(e,t,l){return new Date(e,t,l)}function kt(e,t){return t(e)}function vt(e,t){return(l,n)=>t(e(n))}Se(2,-53,53,[1]);const yt={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(e,t){let l=e.series[t];return l.width?l.stroke(e,t):l.points.width?l.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]},Mt=[0,0];function St(e,t,l){return e=>{0==e.button&&l(e)}}function Et(e,t,l){return l}const Dt={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,l){return Mt[0]=t,Mt[1]=l,Mt},points:{show:function(e,t){let i=e.cursor.points,o=z(),s=i.size(e,t);E(o,l,s),E(o,n,s);let r=s/-2;E(o,"marginLeft",r),E(o,"marginTop",r);let u=i.width(e,t,s);return u&&E(o,"borderWidth",u),o},size:function(e,t){return Jt(e.series[t].points.width,1)},width:0,stroke:function(e,t){let l=e.series[t].points;return l._stroke||l._fill},fill:function(e,t){let l=e.series[t].points;return l._fill||l._stroke}},bind:{mousedown:St,mouseup:St,click:St,dblclick:St,mousemove:Et,mouseleave:Et,mouseenter:Et},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:function(e,t,l){return l},idxs:null},zt={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Tt=He({},zt,{filter:ge}),Pt=He({},Tt,{size:10}),At=He({},zt,{show:!1}),Wt='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"',Yt="bold "+Wt,Ct={show:!0,scale:"x",stroke:u,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Yt,side:2,grid:Tt,ticks:Pt,border:At,font:Wt,rotate:0},Ft={show:!0,scale:"x",auto:!1,sorted:1,min:fe,max:-fe,idxs:[]};function Ht(e,t){return t.map((e=>null==e?"":Z(e)))}function Rt(e,t,l,n,i,o,s){let r=[],u=ye.get(i)||0;for(let e=l=s?l:ve(be(l,i),u);n>=e;e=ve(e+i,u))r.push(Object.is(e,-0)?0:e);return r}function Lt(e,t,l,n,i){const o=[],s=e.scales[e.axes[t].scale].log,r=ee((10==s?re:ue)(l));i=oe(s,r),0>r&&(i=ve(i,-r));let u=l;do{o.push(u),u=ve(u+i,ye.get(i)),i*s>u||(i=u)}while(n>=u);return o}function Gt(e,t,l,n,i){let o=e.scales[e.axes[t].scale].asinh,s=n>o?Lt(e,t,ie(o,l),n,i):[o],r=0>n||l>0?[]:[0];return(-o>l?Lt(e,t,ie(o,-n),-l,i):[o]).reverse().map((e=>-e)).concat(r,s)}const It=/./,Ot=/[12357]/,Nt=/[125]/,jt=/1/;function Ut(e,t,l){let n=e.axes[l],i=n.scale,o=e.scales[i];if(3==o.distr&&2==o.log)return t;let s=e.valToPos,r=n._space,u=s(10,i),a=s(9,i)-u4==o.distr&&0==e||a.test(e)?e:null))}function Bt(e,t){return null==t?"":Z(t)}const Vt={show:!0,scale:"y",stroke:u,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Yt,side:3,grid:Tt,ticks:Pt,border:At,font:Wt,rotate:0};function Jt(e,t){return ve((3+2*(e||1))*t,3)}const qt={scale:null,auto:!0,sorted:0,min:fe,max:-fe},Kt=(e,t,l,n,i)=>i,Zt={show:!0,auto:!0,sorted:0,gaps:Kt,alpha:1,facets:[He({},qt,{scale:"x"}),He({},qt,{scale:"y"})]},$t={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Kt,alpha:1,points:{show:function(e,t){let{scale:l,idxs:n}=e.series[0],i=e._data[0],o=e.valToPos(i[n[0]],l,!0),s=e.valToPos(i[n[1]],l,!0);return Q(s-o)/(e.series[t].points.space*v)>=n[1]-n[0]},filter:null},values:null,min:fe,max:-fe,idxs:[],path:null,clip:null};function Xt(e,t,l){return l/10}const Qt={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},el=He({},Qt,{time:!1,ori:1}),tl={};function ll(e){let t=tl[e];return t||(t={key:e,plots:[],sub(e){t.plots.push(e)},unsub(e){t.plots=t.plots.filter((t=>t!=e))},pub(e,l,n,i,o,s,r){for(let u=0;t.plots.length>u;u++)t.plots[u]!=l&&t.plots[u].pub(e,l,n,i,o,s,r)}},null!=e&&(tl[e]=t)),t}function nl(e,t,l){const n=e.mode,i=e.series[t],o=2==n?e._data[t]:e._data,s=e.scales,r=e.bbox;let u=o[0],a=2==n?o[1]:o[t],f=2==n?s[i.facets[0].scale]:s[e.series[0].scale],c=2==n?s[i.facets[1].scale]:s[i.scale],h=r.left,d=r.top,p=r.width,m=r.height,g=e.valToPosH,x=e.valToPosV;return 0==f.ori?l(i,u,a,f,c,g,x,h,d,p,m,cl,dl,ml,xl,_l):l(i,u,a,f,c,x,g,d,h,m,p,hl,pl,gl,wl,bl)}function il(e,t){let l=0,n=0,i=J(e.bands,De);for(let e=0;i.length>e;e++){let o=i[e];o.series[0]==t?l=o.dir:o.series[1]==t&&(n|=1==o.dir?1:2)}return[l,1==n?-1:2==n?1:3==n?2:0]}function ol(e,t,l,n,i){let o=e.series[t],s=e.scales[2==e.mode?o.facets[1].scale:o.scale];return-1==i?s.min:1==i?s.max:3==s.distr?1==s.dir?s.min:s.max:0}function sl(e,t,l,n,i,o){return nl(e,t,((e,t,s,r,u,a,f,c,h,d,p)=>{let m=e.pxRound;const g=0==r.ori?dl:pl;let x,w;1==r.dir*(0==r.ori?1:-1)?(x=l,w=n):(x=n,w=l);let _=m(a(t[x],r,d,c)),b=m(f(s[x],u,p,h)),k=m(a(t[w],r,d,c)),v=m(f(1==o?u.max:u.min,u,p,h)),y=new Path2D(i);return g(y,k,v),g(y,_,v),g(y,_,b),y}))}function rl(e,t,l,n,i,o){let s=null;if(e.length>0){s=new Path2D;const r=0==t?ml:gl;let u=l;for(let t=0;e.length>t;t++){let l=e[t];if(l[1]>l[0]){let e=l[0]-u;e>0&&r(s,u,n,e,n+o),u=l[1]}}let a=l+i-u;a>0&&r(s,u,n,a,n+o)}return s}function ul(e,t,l,n,i,o,s){let r=[];for(let u=1==i?l:n;u>=l&&n>=u;u+=i)if(null===t[u]){let a=u,f=u;if(1==i)for(;++u<=n&&null===t[u];)f=u;else for(;--u>=l&&null===t[u];)f=u;let c=o(e[a]),h=f==a?c:o(e[f]);c=s>0?c:o(e[a-i]),h=0>s?h:o(e[f+i]),c>h||r.push([c,h])}return r}function al(e){return 0==e?me:1==e?te:t=>he(t,e)}function fl(e){let t=0==e?cl:hl,l=0==e?(e,t,l,n,i,o)=>{e.arcTo(t,l,n,i,o)}:(e,t,l,n,i,o)=>{e.arcTo(l,t,i,n,o)},n=0==e?(e,t,l,n,i)=>{e.rect(t,l,n,i)}:(e,t,l,n,i)=>{e.rect(l,t,i,n)};return(e,i,o,s,r,u=0)=>{0==u?n(e,i,o,s,r):(u=ne(u,s/2,r/2),t(e,i+u,o),l(e,i+s,o,i+s,o+r,u),l(e,i+s,o+r,i,o+r,u),l(e,i,o+r,i,o,u),l(e,i,o,i+s,o,u),e.closePath())}}const cl=(e,t,l)=>{e.moveTo(t,l)},hl=(e,t,l)=>{e.moveTo(l,t)},dl=(e,t,l)=>{e.lineTo(t,l)},pl=(e,t,l)=>{e.lineTo(l,t)},ml=fl(0),gl=fl(1),xl=(e,t,l,n,i,o)=>{e.arc(t,l,n,i,o)},wl=(e,t,l,n,i,o)=>{e.arc(l,t,n,i,o)},_l=(e,t,l,n,i,o,s)=>{e.bezierCurveTo(t,l,n,i,o,s)},bl=(e,t,l,n,i,o,s)=>{e.bezierCurveTo(l,t,i,n,s,o)};function kl(){return(e,t,l,n,i)=>nl(e,t,((t,o,s,r,u,a,f,c,h,d,p)=>{let m,g,{pxRound:x,points:w}=t;0==r.ori?(m=cl,g=xl):(m=hl,g=wl);const _=ve(w.width*v,3);let b=(w.size-w.width)/2*v,k=ve(2*b,3),y=new Path2D,M=new Path2D,{left:S,top:E,width:D,height:z}=e.bbox;ml(M,S-k,E-k,D+2*k,z+2*k);const T=e=>{if(null!=s[e]){let t=x(a(o[e],r,d,c)),l=x(f(s[e],u,p,h));m(y,t+b,l),g(y,t,l,b,0,2*X)}};if(i)i.forEach(T);else for(let e=l;n>=e;e++)T(e);return{stroke:_>0?y:null,fill:y,clip:M,flags:3}}))}function vl(e){return(t,l,n,i,o,s)=>{n!=i&&(o!=n&&s!=n&&e(t,l,n),o!=i&&s!=i&&e(t,l,i),e(t,l,s))}}const yl=vl(dl),Ml=vl(pl);function Sl(e){const t=J(e?.alignGaps,0);return(e,l,n,i)=>nl(e,l,((o,s,r,u,a,f,c,h,d,p,m)=>{let g,x,w=o.pxRound,_=e=>w(f(e,u,p,h)),b=e=>w(c(e,a,m,d));0==u.ori?(g=dl,x=yl):(g=pl,x=Ml);const k=u.dir*(0==u.ori?1:-1),v={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},y=v.stroke;let M,S,E,D=fe,z=-fe,T=_(s[1==k?n:i]),P=I(r,n,i,1*k),A=I(r,n,i,-1*k),W=_(s[P]),Y=_(s[A]);for(let e=1==k?n:i;e>=n&&i>=e;e+=k){let t=_(s[e]);t==T?null!=r[e]&&(S=b(r[e]),D==fe&&(g(y,t,S),M=S),D=ne(S,D),z=ie(S,z)):(D!=fe&&(x(y,T,D,z,M,S),E=T),null!=r[e]?(S=b(r[e]),g(y,t,S),D=z=M=S):(D=fe,z=-fe),T=t)}D!=fe&&D!=z&&E!=T&&x(y,T,D,z,M,S);let[C,F]=il(e,l);if(null!=o.fill||0!=C){let t=v.fill=new Path2D(y),n=b(o.fillTo(e,l,o.min,o.max,C));g(t,Y,n),g(t,W,n)}if(!o.spanGaps){let a=[];a.push(...ul(s,r,n,i,k,_,t)),v.gaps=a=o.gaps(e,l,n,i,a),v.clip=rl(a,u.ori,h,d,p,m)}return 0!=F&&(v.band=2==F?[sl(e,l,n,i,y,-1),sl(e,l,n,i,y,1)]:sl(e,l,n,i,y,F)),v}))}function El(e,t,l,n,i){const o=e.length;if(2>o)return null;const s=new Path2D;if(l(s,e[0],t[0]),2==o)n(s,e[1],t[1]);else{let l=Array(o),n=Array(o-1),r=Array(o-1),u=Array(o-1);for(let l=0;o-1>l;l++)r[l]=t[l+1]-t[l],u[l]=e[l+1]-e[l],n[l]=r[l]/u[l];l[0]=n[0];for(let e=1;o-1>e;e++)0===n[e]||0===n[e-1]||n[e-1]>0!=n[e]>0?l[e]=0:(l[e]=3*(u[e-1]+u[e])/((2*u[e]+u[e-1])/n[e-1]+(u[e]+2*u[e-1])/n[e]),isFinite(l[e])||(l[e]=0));l[o-1]=n[o-2];for(let n=0;o-1>n;n++)i(s,e[n]+u[n]/3,t[n]+l[n]*u[n]/3,e[n+1]-u[n]/3,t[n+1]-l[n+1]*u[n]/3,e[n+1],t[n+1])}return s}const Dl=new Set;function zl(){for(let e of Dl)e.syncRect(!0)}w&&(R("resize",b,zl),R("scroll",b,zl,!0),R(x,b,(()=>{jl.pxRatio=v})));const Tl=Sl(),Pl=kl();function Al(e,t,l,n){return(n?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,n)=>Wl(e,n,t,l)))}function Wl(e,t,l,n){return He({},0==t?l:n,e)}function Yl(e,t,l){return null==t?ze:[t,l]}const Cl=Yl;function Fl(e,t,l){return null==t?ze:V(t,l,.1,!0)}function Hl(e,t,l,n){return null==t?ze:O(t,l,e.scales[n].log,!1)}const Rl=Hl;function Ll(e,t,l,n){return null==t?ze:N(t,l,e.scales[n].log,!1)}const Gl=Ll;function Il(e,t,l,n,i){let o=ie(ce(e),ce(t)),s=t-e,r=G(i/n*s,l);do{let e=l[r],t=n*e/s;if(t>=i&&17>=o+(5>e?ye.get(e):0))return[e,t]}while(++r(t=te((l=+n)*v))+"px")),t,l]}function Nl(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=ve(e[2]*v,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function jl(u,g,w){const k={mode:J(u.mode,1)},y=k.mode;function T(e,t){return((3==t.distr?re(e>0?e:t.clamp(k,e,t.min,t.max,t.key)):4==t.distr?ae(e,t.asinh):e)-t._min)/(t._max-t._min)}function A(e,t,l,n){let i=T(e,t);return n+l*(-1==t.dir?1-i:i)}function Y(e,t,l,n){let i=T(e,t);return n+l*(-1==t.dir?i:1-i)}function F(e,t,l,n){return 0==t.ori?A(e,t,l,n):Y(e,t,l,n)}k.valToPosH=A,k.valToPosV=Y;let H=!1;k.status=0;const I=k.root=z("uplot");null!=u.id&&(I.id=u.id),M(I,u.class),u.title&&(z("u-title",I).textContent=u.title);const U=D("canvas"),B=k.ctx=U.getContext("2d"),q=z("u-wrap",I),K=k.under=z("u-under",q);q.appendChild(U);const Z=k.over=z("u-over",q),ee=+J((u=Fe(u)).pxAlign,1),se=al(ee);(u.plugins||[]).forEach((e=>{e.opts&&(u=e.opts(k,u)||u)}));const ue=u.ms||.001,ce=k.series=1==y?Al(u.series||[],Ft,$t,!1):function(e,t){return e.map(((e,l)=>0==l?null:He({},t,e)))}(u.series||[null],Zt),me=k.axes=Al(u.axes||[],Ct,Vt,!0),ke=k.scales={},ye=k.bands=u.bands||[];ye.forEach((e=>{e.fill=pe(e.fill||null),e.dir=J(e.dir,-1)}));const Me=2==y?ce[1].facets[0].scale:ce[0].scale,Se={axes:function(){for(let e=0;me.length>e;e++){let t=me[e];if(!t.show||!t._show)continue;let l,n,u=t.side,a=u%2,f=t.stroke(k,e),c=0==u||3==u?-1:1;if(t.label){let e=te((t._lpos+t.labelGap*c)*v);Zl(t.labelFont[0],f,"center",2==u?i:o),B.save(),1==a?(l=n=0,B.translate(e,te(Wt+It/2)),B.rotate((3==u?-X:X)/2)):(l=te(At+Yt/2),n=e),B.fillText(t.label,l,n),B.restore()}let[h,d]=t._found;if(0==d)continue;let p=ke[t.scale],m=0==a?Yt:It,g=0==a?At:Wt,x=te(t.gap*v),w=t._splits,_=2==p.distr?w.map((e=>Bl[e])):w,b=2==p.distr?Bl[w[1]]-Bl[w[0]]:h,y=t.ticks,M=t.border,S=y.show?te(y.size*v):0,E=t._rotate*-X/180,D=se(t._pos*v),z=D+(S+x)*c;n=0==a?z:0,l=1==a?z:0,Zl(t.font[0],f,1==t.align?s:2==t.align?r:E>0?s:0>E?r:0==a?"center":3==u?r:s,E||1==a?"middle":2==u?i:o);let T=1.5*t.font[1],P=w.map((e=>se(F(e,p,m,g)))),A=t._values;for(let e=0;A.length>e;e++){let t=A[e];if(null!=t){0==a?l=P[e]:n=P[e],t=""+t;let i=-1==t.indexOf("\n")?[t]:t.split(/\n/gm);for(let e=0;i.length>e;e++){let t=i[e];E?(B.save(),B.translate(l,n+e*T),B.rotate(E),B.fillText(t,0,0),B.restore()):B.fillText(t,l,n+e*T)}}}y.show&&nn(P,y.filter(k,_,e,d,b),a,u,D,S,ve(y.width*v,3),y.stroke(k,e),y.dash,y.cap);let W=t.grid;W.show&&nn(P,W.filter(k,_,e,d,b),a,0==a?2:1,0==a?Wt:At,0==a?It:Yt,ve(W.width*v,3),W.stroke(k,e),W.dash,W.cap),M.show&&nn([D],[1],0==a?1:0,0==a?1:2,1==a?Wt:At,1==a?It:Yt,ve(M.width*v,3),M.stroke(k,e),M.dash,M.cap)}ni("drawAxes")},series:function(){gl>0&&(ce.forEach(((e,t)=>{if(t>0&&e.show&&null==e._paths){let l=2==y?[0,g[t][0].length-1]:function(e){let t=de(xl-1,0,gl-1),l=de(wl+1,0,gl-1);for(;null==e[t]&&t>0;)t--;for(;null==e[l]&&gl-1>l;)l++;return[t,l]}(g[t]);e._paths=e.paths(k,t,l[0],l[1])}})),ce.forEach(((e,t)=>{if(t>0&&e.show){Ul!=e.alpha&&(B.globalAlpha=Ul=e.alpha),Xl(t,!1),e._paths&&Ql(t,!1);{Xl(t,!0);let l=e.points.show(k,t,xl,wl),n=e.points.filter(k,t,l,e._paths?e._paths.gaps:null);(l||n)&&(e.points._paths=e.points.paths(k,t,xl,wl,n),Ql(t,!0))}1!=Ul&&(B.globalAlpha=Ul=1),ni("drawSeries",t)}})))}},Pe=(u.drawOrder||["axes","series"]).map((e=>Se[e]));function Ce(e){let t=ke[e];if(null==t){let l=(u.scales||Ee)[e]||Ee;if(null!=l.from)Ce(l.from),ke[e]=He({},ke[l.from],l,{key:e});else{t=ke[e]=He({},e==Me?Qt:el,l),t.key=e;let n=t.time,i=t.range,o=Te(i);if((e!=Me||2==y&&!n)&&(!o||null!=i[0]&&null!=i[1]||(i={min:null==i[0]?j:{mode:1,hard:i[0],soft:i[0]},max:null==i[1]?j:{mode:1,hard:i[1],soft:i[1]}},o=!1),!o&&We(i))){let e=i;i=(t,l,n)=>null==l?ze:V(l,n,e)}t.range=pe(i||(n?Cl:e==Me?3==t.distr?Rl:4==t.distr?Gl:Yl:3==t.distr?Hl:4==t.distr?Ll:Fl)),t.auto=pe(!o&&t.auto),t.clamp=pe(t.clamp||Xt),t._min=t._max=null}}}Ce("x"),Ce("y"),1==y&&ce.forEach((e=>{Ce(e.scale)})),me.forEach((e=>{Ce(e.scale)}));for(let e in u.scales)Ce(e);const Re=ke[Me],Ge=Re.distr;let Ie,Oe;0==Re.ori?(M(I,"u-hz"),Ie=A,Oe=Y):(M(I,"u-vt"),Ie=Y,Oe=A);const Ne={};for(let e in ke){let t=ke[e];null==t.min&&null==t.max||(Ne[e]={min:t.min,max:t.max},t.min=t.max=null)}const je=u.tzDate||(e=>new Date(te(e/ue))),Ue=u.fmtDate||Je,Be=1==ue?pt(je):xt(je),Ve=_t(je,wt(1==ue?dt:gt,Ue)),qe=vt(je,kt("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",Ue)),Ke=[],Ze=k.legend=He({},yt,u.legend),$e=Ze.show,Xe=Ze.markers;let tt;Ze.idxs=Ke,Xe.width=pe(Xe.width),Xe.dash=pe(Xe.dash),Xe.stroke=pe(Xe.stroke),Xe.fill=pe(Xe.fill);let lt,nt=[],it=[],ot=!1,st={};if(Ze.live){const e=ce[1]?ce[1].values:null;ot=null!=e,lt=ot?e(k,1,0):{_:0};for(let e in lt)st[e]="--"}if($e)if(tt=D("table","u-legend",I),Ze.mount(k,tt),ot){let e=D("tr","u-thead",tt);for(var rt in D("th",null,e),lt)D("th",t,e).textContent=rt}else M(tt,"u-inline"),Ze.live&&M(tt,"u-live");const ut={show:!0},at={show:!1},ft=new Map;function ct(e,t,l){const n=ft.get(t)||{},i=sl.bind[e](k,t,l);i&&(R(e,t,n[e]=i),ft.set(t,n))}function bt(e,t){const l=ft.get(t)||{};for(let n in l)null!=e&&n!=e||(L(n,t,l[n]),delete l[n]);null==e&&ft.delete(t)}let Mt=0,St=0,Et=0,zt=0,Tt=0,Pt=0,At=0,Wt=0,Yt=0,It=0;k.bbox={};let Ot=!1,Nt=!1,jt=!1,qt=!1,Kt=!1,tl=!1;function nl(e,t,l){(l||e!=k.width||t!=k.height)&&il(e,t),rn(!1),jt=!0,Nt=!0,0>sl.left||(qt=tl=!0),kn()}function il(e,t){k.width=Mt=Et=e,k.height=St=zt=t,Tt=Pt=0,function(){let e=!1,t=!1,l=!1,n=!1;me.forEach((i=>{if(i.show&&i._show){let{side:o,_size:s}=i,r=o%2,u=s+(null!=i.label?i.labelSize:0);u>0&&(r?(Et-=u,3==o?(Tt+=u,n=!0):l=!0):(zt-=u,0==o?(Pt+=u,e=!0):t=!0))}})),hl[0]=e,hl[1]=l,hl[2]=t,hl[3]=n,Et-=ml[1]+ml[3],Tt+=ml[3],zt-=ml[2]+ml[0],Pt+=ml[0]}(),function(){let e=Tt+Et,t=Pt+zt,l=Tt,n=Pt;function i(i,o){switch(i){case 1:return e+=o,e-o;case 2:return t+=o,t-o;case 3:return l-=o,l+o;case 0:return n-=o,n+o}}me.forEach((e=>{if(e.show&&e._show){let t=e.side;e._pos=i(t,e._size),null!=e.label&&(e._lpos=i(t,e.labelSize))}}))}();let l=k.bbox;At=l.left=he(Tt*v,.5),Wt=l.top=he(Pt*v,.5),Yt=l.width=he(Et*v,.5),It=l.height=he(zt*v,.5)}k.setSize=function({width:e,height:t}){nl(e,t)};const sl=k.cursor=He({},Dt,{drag:{y:2==y}},u.cursor);{sl.idxs=Ke,sl._lock=!1;let e=sl.points;e.show=pe(e.show),e.size=pe(e.size),e.stroke=pe(e.stroke),e.width=pe(e.width),e.fill=pe(e.fill)}const rl=k.focus=He({},u.focus||{alpha:.3},sl.focus),ul=rl.prox>=0;let fl=[null];function cl(l,n){if(1==y||n>0){let e=1==y&&ke[l.scale].time,t=l.value;l.value=e?Ae(t)?vt(je,kt(t,Ue)):t||qe:t||Bt,l.label=l.label||(e?"Time":"Value")}if(n>0){l.width=null==l.width?1:l.width,l.paths=l.paths||Tl||xe,l.fillTo=pe(l.fillTo||ol),l.pxAlign=+J(l.pxAlign,ee),l.pxRound=al(l.pxAlign),l.stroke=pe(l.stroke||null),l.fill=pe(l.fill||null),l._stroke=l._fill=l._paths=l._focus=null;let e=Jt(l.width,1),t=l.points=He({},{size:e,width:ie(1,.2*e),stroke:l.stroke,space:2*e,paths:Pl,_stroke:null,_fill:null},l.points);t.show=pe(t.show),t.filter=pe(t.filter),t.fill=pe(t.fill),t.stroke=pe(t.stroke),t.paths=pe(t.paths),t.pxAlign=l.pxAlign}if($e){let i=function(l,n){if(0==n&&(ot||!Ze.live||2==y))return ze;let i=[],o=D("tr","u-series",tt,tt.childNodes[n]);M(o,l.class),l.show||M(o,e);let s=D("th",null,o);if(Xe.show){let e=z("u-marker",s);if(n>0){let t=Xe.width(k,n);t&&(e.style.border=t+"px "+Xe.dash(k,n)+" "+Xe.stroke(k,n)),e.style.background=Xe.fill(k,n)}}let r=z(t,s);for(var u in r.textContent=l.label,n>0&&(Xe.show||(r.style.color=l.width>0?Xe.stroke(k,n):Xe.fill(k,n)),ct("click",s,(e=>{if(sl._lock)return;let t=ce.indexOf(l);if((e.ctrlKey||e.metaKey)!=Ze.isolate){let e=ce.some(((e,l)=>l>0&&l!=t&&e.show));ce.forEach(((l,n)=>{n>0&&Wn(n,e?n==t?ut:at:ut,!0,ii.setSeries)}))}else Wn(t,{show:!l.show},!0,ii.setSeries)})),ul&&ct(d,s,(()=>{sl._lock||Wn(ce.indexOf(l),Hn,!0,ii.setSeries)}))),lt){let e=D("td","u-value",o);e.textContent="--",i.push(e)}return[o,i]}(l,n);nt.splice(n,0,i[0]),it.splice(n,0,i[1]),Ze.values.push(null)}if(sl.show){Ke.splice(n,0,null);let e=function(e,t){if(t>0){let l=sl.points.show(k,t);if(l)return M(l,"u-cursor-pt"),M(l,e.class),P(l,-10,-10,Et,zt),Z.insertBefore(l,fl[t]),l}}(l,n);e&&fl.splice(n,0,e)}ni("addSeries",n)}k.addSeries=function(e,t){t=null==t?ce.length:t,e=1==y?Wl(e,t,Ft,$t):Wl(e,t,null,Zt),ce.splice(t,0,e),cl(ce[t],t)},k.delSeries=function(e){if(ce.splice(e,1),$e){Ze.values.splice(e,1),it.splice(e,1);let t=nt.splice(e,1)[0];bt(null,t.firstChild),t.remove()}sl.show&&(Ke.splice(e,1),fl.length>1&&fl.splice(e,1)[0].remove()),ni("delSeries",e)};const hl=[!1,!1,!1,!1];function dl(e,t,l){let[n,i,o,s]=l,r=t%2,u=0;return 0==r&&(s||i)&&(u=0==t&&!n||2==t&&!o?te(Ct.size/3):0),1==r&&(n||o)&&(u=1==t&&!i||3==t&&!s?te(Vt.size/2):0),u}const pl=k.padding=(u.padding||[dl,dl,dl,dl]).map((e=>pe(J(e,dl)))),ml=k._padding=pl.map(((e,t)=>e(k,t,hl,0)));let gl,xl=null,wl=null;const _l=1==y?ce[0].idxs:null;let bl,kl,vl,yl,Ml,Sl,El,zl,jl,Ul,Bl=null,Vl=!1;function Jl(e,t){if(g=null==e?[]:Fe(e,Ye),2==y){gl=0;for(let e=1;ce.length>e;e++)gl+=g[e][0].length;k.data=g=e}else if(null==g[0]&&(g[0]=[]),k.data=g.slice(),Bl=g[0],gl=Bl.length,2==Ge){g[0]=Array(gl);for(let e=0;gl>e;e++)g[0][e]=e}if(k._data=g,rn(!0),ni("setData"),2==Ge&&(jt=!0),!1!==t){let e=Re;e.auto(k,Vl)?ql():An(Me,e.min,e.max),qt=sl.left>=0,tl=!0,kn()}}function ql(){let e,t;Vl=!0,1==y&&(gl>0?(xl=_l[0]=0,wl=_l[1]=gl-1,e=g[0][xl],t=g[0][wl],2==Ge?(e=xl,t=wl):1==gl&&(3==Ge?[e,t]=O(e,e,Re.log,!1):4==Ge?[e,t]=N(e,e,Re.log,!1):Re.time?t=e+te(86400/ue):[e,t]=V(e,t,.1,!0))):(xl=_l[0]=e=null,wl=_l[1]=t=null)),An(Me,e,t)}function Kl(e,t,l,n,i,o){e??=a,l??=De,n??="butt",i??=a,o??="round",e!=bl&&(B.strokeStyle=bl=e),i!=kl&&(B.fillStyle=kl=i),t!=vl&&(B.lineWidth=vl=t),o!=Ml&&(B.lineJoin=Ml=o),n!=Sl&&(B.lineCap=Sl=n),l!=yl&&B.setLineDash(yl=l)}function Zl(e,t,l,n){t!=kl&&(B.fillStyle=kl=t),e!=El&&(B.font=El=e),l!=zl&&(B.textAlign=zl=l),n!=jl&&(B.textBaseline=jl=n)}function $l(e,t,l,n,i=0){if(n.length>0&&e.auto(k,Vl)&&(null==t||null==t.min)){let t=J(xl,0),o=J(wl,n.length-1),s=null==l.min?3==e.distr?function(e,t,l){let n=fe,i=-fe;for(let o=t;l>=o;o++)e[o]>0&&(n=ne(n,e[o]),i=ie(i,e[o]));return[n==fe?1:n,i==-fe?10:i]}(n,t,o):function(e,t,l,n){let i=fe,o=-fe;if(1==n)i=e[t],o=e[l];else if(-1==n)i=e[l],o=e[t];else for(let n=t;l>=n;n++)null!=e[n]&&(i=ne(i,e[n]),o=ie(o,e[n]));return[i,o]}(n,t,o,i):[l.min,l.max];e.min=ne(e.min,l.min=s[0]),e.max=ie(e.max,l.max=s[1])}}function Xl(e,t){let l=t?ce[e].points:ce[e];l._stroke=l.stroke(k,e),l._fill=l.fill(k,e)}function Ql(e,t){let l=t?ce[e].points:ce[e],n=l._stroke,i=l._fill,{stroke:o,fill:s,clip:r,flags:u}=l._paths,a=null,f=ve(l.width*v,3),c=f%2/2;t&&null==i&&(i=f>0?"#fff":n);let h=1==l.pxAlign;if(h&&B.translate(c,c),!t){let e=At,t=Wt,n=Yt,i=It,o=f*v/2;0==l.min&&(i+=o),0==l.max&&(t-=o,i+=o),a=new Path2D,a.rect(e,t,n,i)}t?en(n,f,l.dash,l.cap,i,o,s,u,r):function(e,t,l,n,i,o,s,r,u,a,f){let c=!1;ye.forEach(((h,d)=>{if(h.series[0]==e){let e,p=ce[h.series[1]],m=g[h.series[1]],x=(p._paths||Ee).band;Te(x)&&(x=1==h.dir?x[0]:x[1]);let w=null;p.show&&x&&function(e,t,l){for(t=J(t,0),l=J(l,e.length-1);l>=t;){if(null!=e[t])return!0;t++}return!1}(m,xl,wl)?(w=h.fill(k,d)||o,e=p._paths.clip):x=null,en(t,l,n,i,w,s,r,u,a,f,e,x),c=!0}})),c||en(t,l,n,i,o,s,r,u,a,f)}(e,n,f,l.dash,l.cap,i,o,s,u,a,r),h&&B.translate(-c,-c)}function en(e,t,l,n,i,o,s,r,u,a,f,c){Kl(e,t,l,n,i),(u||a||c)&&(B.save(),u&&B.clip(u),a&&B.clip(a)),c?3==(3&r)?(B.clip(c),f&&B.clip(f),ln(i,s),tn(e,o,t)):2&r?(ln(i,s),B.clip(c),tn(e,o,t)):1&r&&(B.save(),B.clip(c),f&&B.clip(f),ln(i,s),B.restore(),tn(e,o,t)):(ln(i,s),tn(e,o,t)),(u||a||c)&&B.restore()}function tn(e,t,l){l>0&&(t instanceof Map?t.forEach(((e,t)=>{B.strokeStyle=bl=t,B.stroke(e)})):null!=t&&e&&B.stroke(t))}function ln(e,t){t instanceof Map?t.forEach(((e,t)=>{B.fillStyle=kl=t,B.fill(e)})):null!=t&&e&&B.fill(t)}function nn(e,t,l,n,i,o,s,r,u,a){let f=s%2/2;1==ee&&B.translate(f,f),Kl(r,s,u,a,r),B.beginPath();let c,h,d,p,m=i+(0==n||3==n?-o:o);0==l?(h=i,p=m):(c=i,d=m);for(let n=0;e.length>n;n++)null!=t[n]&&(0==l?c=d=e[n]:h=p=e[n],B.moveTo(c,h),B.lineTo(d,p));B.stroke(),1==ee&&B.translate(-f,-f)}function on(e){let t=!0;return me.forEach(((l,n)=>{if(!l.show)return;let i=ke[l.scale];if(null==i.min)return void(l._show&&(t=!1,l._show=!1,rn(!1)));l._show||(t=!1,l._show=!0,rn(!1));let o=l.side,s=o%2,{min:r,max:u}=i,[a,f]=function(e,t,l,n){let i,o=me[e];if(n>0){let s=o._space=o.space(k,e,t,l,n);i=Il(t,l,o._incrs=o.incrs(k,e,t,l,n,s),n,s)}else i=[0,0];return o._found=i}(n,r,u,0==s?Et:zt);if(0==f)return;let c=l._splits=l.splits(k,n,r,u,a,f,2==i.distr),h=2==i.distr?c.map((e=>Bl[e])):c,d=2==i.distr?Bl[c[1]]-Bl[c[0]]:a,p=l._values=l.values(k,l.filter(k,h,n,f,d),n,f,d);l._rotate=2==o?l.rotate(k,p,n,f):0;let m=l._size;l._size=le(l.size(k,p,n,e)),null!=m&&l._size!=m&&(t=!1)})),t}function sn(e){let t=!0;return pl.forEach(((l,n)=>{let i=l(k,n,hl,e);i!=ml[n]&&(t=!1),ml[n]=i})),t}function rn(e){ce.forEach(((t,l)=>{l>0&&(t._paths=null,e&&(1==y?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}k.setData=Jl;let un,an,fn,cn,hn,dn,pn,mn,gn,xn,wn,_n,bn=!1;function kn(){bn||(Le(vn),bn=!0)}function vn(){Ot&&(function(){let e=Fe(ke,Ye);for(let t in e){let l=e[t],n=Ne[t];if(null!=n&&null!=n.min)He(l,n),t==Me&&rn(!0);else if(t!=Me||2==y)if(0==gl&&null==l.from){let e=l.range(k,null,null,t);l.min=e[0],l.max=e[1]}else l.min=fe,l.max=-fe}if(gl>0){ce.forEach(((t,l)=>{if(1==y){let n=t.scale,i=e[n],o=Ne[n];if(0==l){let e=i.range(k,i.min,i.max,n);i.min=e[0],i.max=e[1],xl=G(i.min,g[0]),wl=G(i.max,g[0]),i.min>g[0][xl]&&xl++,g[0][wl]>i.max&&wl--,t.min=Bl[xl],t.max=Bl[wl]}else t.show&&t.auto&&$l(i,o,t,g[l],t.sorted);t.idxs[0]=xl,t.idxs[1]=wl}else if(l>0&&t.show&&t.auto){let[n,i]=t.facets,o=n.scale,s=i.scale,[r,u]=g[l];$l(e[o],Ne[o],n,r,n.sorted),$l(e[s],Ne[s],i,u,i.sorted),t.min=i.min,t.max=i.max}}));for(let t in e){let l=e[t],n=Ne[t];if(null==l.from&&(null==n||null==n.min)){let e=l.range(k,l.min==fe?null:l.min,l.max==-fe?null:l.max,t);l.min=e[0],l.max=e[1]}}}for(let t in e){let l=e[t];if(null!=l.from){let n=e[l.from];if(null==n.min)l.min=l.max=null;else{let e=l.range(k,n.min,n.max,t);l.min=e[0],l.max=e[1]}}}let t={},l=!1;for(let n in e){let i=e[n],o=ke[n];if(o.min!=i.min||o.max!=i.max){o.min=i.min,o.max=i.max;let e=o.distr;o._min=3==e?re(o.min):4==e?ae(o.min,o.asinh):o.min,o._max=3==e?re(o.max):4==e?ae(o.max,o.asinh):o.max,t[n]=l=!0}}if(l){ce.forEach(((e,l)=>{2==y?l>0&&t.y&&(e._paths=null):t[e.scale]&&(e._paths=null)}));for(let e in t)jt=!0,ni("setScale",e);sl.show&&sl.left>=0&&(qt=tl=!0)}for(let e in Ne)Ne[e]=null}(),Ot=!1),jt&&(function(){let e=!1,t=0;for(;!e;){t++;let l=on(t),n=sn(t);e=3==t||l&&n,e||(il(k.width,k.height),Nt=!0)}}(),jt=!1),Nt&&(E(K,s,Tt),E(K,i,Pt),E(K,l,Et),E(K,n,zt),E(Z,s,Tt),E(Z,i,Pt),E(Z,l,Et),E(Z,n,zt),E(q,l,Mt),E(q,n,St),U.width=te(Mt*v),U.height=te(St*v),me.forEach((({_el:t,_show:l,_size:n,_pos:i,side:o})=>{if(null!=t)if(l){let l=o%2==1;E(t,l?"left":"top",i-(3===o||0===o?n:0)),E(t,l?"width":"height",n),E(t,l?"top":"left",l?Pt:Tt),E(t,l?"height":"width",l?zt:Et),S(t,e)}else M(t,e)})),bl=kl=vl=Ml=Sl=El=zl=jl=yl=null,Ul=1,Vn(!0),ni("setSize"),Nt=!1),Mt>0&&St>0&&(B.clearRect(0,0,U.width,U.height),ni("drawClear"),Pe.forEach((e=>e())),ni("draw")),zn.show&&Kt&&(Pn(zn),Kt=!1),sl.show&&qt&&(Un(null,!0,!1),qt=!1),H||(H=!0,k.status=1,ni("ready")),Vl=!1,bn=!1}function yn(e,t){let l=ke[e];if(null==l.from){if(0==gl){let n=l.range(k,t.min,t.max,e);t.min=n[0],t.max=n[1]}if(t.min>t.max){let e=t.min;t.min=t.max,t.max=e}if(gl>1&&null!=t.min&&null!=t.max&&1e-16>t.max-t.min)return;e==Me&&2==l.distr&&gl>0&&(t.min=G(t.min,g[0]),t.max=G(t.max,g[0]),t.min==t.max&&t.max++),Ne[e]=t,Ot=!0,kn()}}k.redraw=(e,t)=>{jt=t||!1,!1!==e?An(Me,Re.min,Re.max):kn()},k.setScale=yn;let Mn=!1;const Sn=sl.drag;let En=Sn.x,Dn=Sn.y;sl.show&&(sl.x&&(un=z("u-cursor-x",Z)),sl.y&&(an=z("u-cursor-y",Z)),0==Re.ori?(fn=un,cn=an):(fn=an,cn=un),wn=sl.left,_n=sl.top);const zn=k.select=He({show:!0,over:!0,left:0,width:0,top:0,height:0},u.select),Tn=zn.show?z("u-select",zn.over?Z:K):null;function Pn(e,t){if(zn.show){for(let t in e)zn[t]=e[t],t in Kn&&E(Tn,t,e[t]);!1!==t&&ni("setSelect")}}function An(e,t,l){yn(e,{min:t,max:l})}function Wn(t,l,n,i){null!=l.focus&&function(e){if(e!=Fn){let t=null==e,l=1!=rl.alpha;ce.forEach(((n,i)=>{let o=t||0==i||i==e;n._focus=t?null:o,l&&function(e,t){ce[e].alpha=t,sl.show&&fl[e]&&(fl[e].style.opacity=t),$e&&nt[e]&&(nt[e].style.opacity=t)}(i,o?1:rl.alpha)})),Fn=e,l&&kn()}}(t),null!=l.show&&ce.forEach(((n,i)=>{0>=i||t!=i&&null!=t||(n.show=l.show,function(t){let l=$e?nt[t]:null;ce[t].show?l&&S(l,e):(l&&M(l,e),fl.length>1&&P(fl[t],-10,-10,Et,zt))}(i),An(2==y?n.facets[1].scale:n.scale,null,null),kn())})),!1!==n&&ni("setSeries",t,l),i&&ri("setSeries",k,t,l)}let Yn,Cn,Fn;k.setSelect=Pn,k.setSeries=Wn,k.addBand=function(e,t){e.fill=pe(e.fill||null),e.dir=J(e.dir,-1),ye.splice(t=null==t?ye.length:t,0,e)},k.setBand=function(e,t){He(ye[e],t)},k.delBand=function(e){null==e?ye.length=0:ye.splice(e,1)};const Hn={focus:!0};function Rn(e,t,l){let n=ke[t];l&&(e=e/v-(1==n.ori?Pt:Tt));let i=Et;1==n.ori&&(i=zt,e=i-e),-1==n.dir&&(e=i-e);let o=n._min,s=o+e/i*(n._max-o),r=n.distr;return 3==r?oe(10,s):4==r?((e,t=1)=>$.sinh(e)*t)(s,n.asinh):s}function Ln(e,t){E(Tn,s,zn.left=e),E(Tn,l,zn.width=t)}function Gn(e,t){E(Tn,i,zn.top=e),E(Tn,n,zn.height=t)}$e&&ul&&R(p,tt,(()=>{sl._lock||null!=Fn&&Wn(null,Hn,!0,ii.setSeries)})),k.valToIdx=e=>G(e,g[0]),k.posToIdx=function(e,t){return G(Rn(e,Me,t),g[0],xl,wl)},k.posToVal=Rn,k.valToPos=(e,t,l)=>0==ke[t].ori?A(e,ke[t],l?Yt:Et,l?At:0):Y(e,ke[t],l?It:zt,l?Wt:0),k.batch=function(e){e(k),kn()},k.setCursor=(e,t,l)=>{wn=e.left,_n=e.top,Un(null,t,l)};let In=0==Re.ori?Ln:Gn,On=1==Re.ori?Ln:Gn;function Nn(e,t){if(null!=e){let t=e.idx;Ze.idx=t,ce.forEach(((e,l)=>{(l>0||!ot)&&jn(l,t)}))}$e&&Ze.live&&function(){if($e&&Ze.live)for(let e=2==y?1:0;ce.length>e;e++){if(0==e&&ot)continue;let t=Ze.values[e],l=0;for(let n in t)it[e][l++].firstChild.nodeValue=t[n]}}(),tl=!1,!1!==t&&ni("setLegend")}function jn(e,t){let l;if(null==t)l=st;else{let n=ce[e],i=0==e&&2==Ge?Bl:g[e];l=ot?n.values(k,e,t):{_:n.value(k,i[t],e,t)}}Ze.values[e]=l}function Un(e,t,l){let n;gn=wn,xn=_n,[wn,_n]=sl.move(k,wn,_n),sl.show&&(fn&&P(fn,te(wn),0,Et,zt),cn&&P(cn,0,te(_n),Et,zt)),Yn=fe;let i=0==Re.ori?Et:zt,o=1==Re.ori?Et:zt;if(0>wn||0==gl||xl>wl){n=null;for(let e=0;ce.length>e;e++)e>0&&fl.length>1&&P(fl[e],-10,-10,Et,zt);if(ul&&Wn(null,Hn,!0,null==e&&ii.setSeries),Ze.live){Ke.fill(null),tl=!0;for(let e=0;ce.length>e;e++)Ze.values[e]=st}}else{let e,t,l;1==y&&(e=0==Re.ori?wn:_n,t=Rn(e,Me),n=G(t,g[0],xl,wl),l=be(Ie(g[0][n],Re,i,0),.5));for(let e=2==y?1:0;ce.length>e;e++){let s=ce[e],r=Ke[e],u=1==y?g[e][r]:g[e][1][r],a=sl.dataIdx(k,e,n,t),f=1==y?g[e][a]:g[e][1][a];tl=tl||f!=u||a!=r,Ke[e]=a;let c=a==n?l:be(Ie(1==y?g[0][a]:g[e][0][a],Re,i,0),.5);if(e>0&&s.show){let t,l,n=null==f?-10:be(Oe(f,1==y?ke[s.scale]:ke[s.facets[1].scale],o,0),.5);if(n>0&&1==y){let t=Q(n-_n);t>Yn||(Yn=t,Cn=e)}if(0==Re.ori?(t=c,l=n):(t=n,l=c),tl&&fl.length>1){W(fl[e],sl.points.fill(k,e),sl.points.stroke(k,e));let n,i,o,s,r=!0,u=sl.points.bbox;if(null!=u){r=!1;let t=u(k,e);o=t.left,s=t.top,n=t.width,i=t.height}else o=t,s=l,n=i=sl.points.size(k,e);C(fl[e],n,i,r),P(fl[e],o,s,Et,zt)}}if(Ze.live){if(!tl||0==e&&ot)continue;jn(e,a)}}}if(sl.idx=n,sl.left=wn,sl.top=_n,tl&&(Ze.idx=n,Nn()),zn.show&&Mn)if(null!=e){let[t,l]=ii.scales,[n,s]=ii.match,[r,u]=e.cursor.sync.scales,a=e.cursor.drag;if(En=a._x,Dn=a._y,En||Dn){let a,f,c,h,d,{left:p,top:m,width:g,height:x}=e.select,w=e.scales[t].ori,_=e.posToVal,b=null!=t&&n(t,r),k=null!=l&&s(l,u);b&&En?(0==w?(a=p,f=g):(a=m,f=x),c=ke[t],h=Ie(_(a,r),c,i,0),d=Ie(_(a+f,r),c,i,0),In(ne(h,d),Q(d-h))):In(0,i),k&&Dn?(1==w?(a=p,f=g):(a=m,f=x),c=ke[l],h=Oe(_(a,u),c,o,0),d=Oe(_(a+f,u),c,o,0),On(ne(h,d),Q(d-h))):On(0,o)}else Zn()}else{let e=Q(gn-hn),t=Q(xn-dn);if(1==Re.ori){let l=e;e=t,t=l}En=Sn.x&&e>=Sn.dist,Dn=Sn.y&&t>=Sn.dist;let l,n,s=Sn.uni;null!=s?En&&Dn&&(En=e>=s,Dn=t>=s,En||Dn||(t>e?Dn=!0:En=!0)):Sn.x&&Sn.y&&(En||Dn)&&(En=Dn=!0),En&&(0==Re.ori?(l=pn,n=wn):(l=mn,n=_n),In(ne(l,n),Q(n-l)),Dn||On(0,o)),Dn&&(1==Re.ori?(l=pn,n=wn):(l=mn,n=_n),On(ne(l,n),Q(n-l)),En||In(0,i)),En||Dn||(In(0,0),On(0,0))}if(Sn._x=En,Sn._y=Dn,null==e){if(l){if(null!=oi){let[e,t]=ii.scales;ii.values[0]=null!=e?Rn(0==Re.ori?wn:_n,e):null,ii.values[1]=null!=t?Rn(1==Re.ori?wn:_n,t):null}ri(f,k,wn,_n,Et,zt,n)}if(ul){let e=l&&ii.setSeries,t=rl.prox;null==Fn?Yn>t||Wn(Cn,Hn,!0,e):Yn>t?Wn(null,Hn,!0,e):Cn!=Fn&&Wn(Cn,Hn,!0,e)}}!1!==t&&ni("setCursor")}k.setLegend=Nn;let Bn=null;function Vn(e){!0===e?Bn=null:(Bn=Z.getBoundingClientRect(),ni("syncRect",Bn))}function Jn(e,t,l,n,i,o){sl._lock||(qn(e,t,l,n,i,o,0,!1,null!=e),null!=e?Un(null,!0,!0):Un(t,!0,!1))}function qn(e,t,l,n,i,o,s,r,u){if(null==Bn&&Vn(!1),null!=e)l=e.offsetX,n=e.offsetY;else{if(0>l||0>n)return wn=-10,void(_n=-10);let[e,s]=ii.scales,r=t.cursor.sync,[u,a]=r.values,[f,c]=r.scales,[h,d]=ii.match,p=t.axes[0].side%2==1,m=0==Re.ori?Et:zt,g=1==Re.ori?Et:zt,x=p?o:i,w=p?i:o,_=p?n:l,b=p?l:n;if(l=null!=f?h(e,f)?F(u,ke[e],m,0):-10:m*(_/x),n=null!=c?d(s,c)?F(a,ke[s],g,0):-10:g*(b/w),1==Re.ori){let e=l;l=n,n=e}}u&&(l>1&&Et-1>l||(l=he(l,Et)),n>1&&zt-1>n||(n=he(n,zt))),r?(hn=l,dn=n,[pn,mn]=sl.move(k,l,n)):(wn=l,_n=n)}const Kn={width:0,height:0,left:0,top:0};function Zn(){Pn(Kn,!1)}function $n(e,t,l,n,i,o){Mn=!0,En=Dn=Sn._x=Sn._y=!1,qn(e,t,l,n,i,o,0,!0,!1),null!=e&&(ct(h,_,Xn),ri(c,k,pn,mn,Et,zt,null))}function Xn(e,t,l,n,i,o){Mn=Sn._x=Sn._y=!1,qn(e,t,l,n,i,o,0,!1,!0);let{left:s,top:r,width:u,height:a}=zn,f=u>0||a>0;if(f&&Pn(zn),Sn.setScale&&f){let e=s,t=u,l=r,n=a;if(1==Re.ori&&(e=r,t=a,l=s,n=u),En&&An(Me,Rn(e,Me),Rn(e+t,Me)),Dn)for(let e in ke){let t=ke[e];e!=Me&&null==t.from&&t.min!=fe&&An(e,Rn(l+n,e),Rn(l,e))}Zn()}else sl.lock&&(sl._lock=!sl._lock,sl._lock||Un(null,!0,!1));null!=e&&(bt(h,_),ri(h,k,wn,_n,Et,zt,null))}function Qn(e){ql(),Zn(),null!=e&&ri(m,k,wn,_n,Et,zt,null)}function ei(){me.forEach(Nl),nl(k.width,k.height,!0)}R(x,b,ei);const ti={};ti.mousedown=$n,ti.mousemove=Jn,ti.mouseup=Xn,ti.dblclick=Qn,ti.setSeries=(e,t,l,n)=>{Wn(l,n,!0,!1)},sl.show&&(ct(c,Z,$n),ct(f,Z,Jn),ct(d,Z,Vn),ct(p,Z,(function(){if(!sl._lock){let e=Mn;if(Mn){let e,t,l=!0,n=!0,i=10;0==Re.ori?(e=En,t=Dn):(e=Dn,t=En),e&&t&&(l=i>=wn||wn>=Et-i,n=i>=_n||_n>=zt-i),e&&l&&(wn=pn>wn?0:Et),t&&n&&(_n=mn>_n?0:zt),Un(null,!0,!0),Mn=!1}wn=-10,_n=-10,Un(null,!0,!0),e&&(Mn=e)}})),ct(m,Z,Qn),Dl.add(k),k.syncRect=Vn);const li=k.hooks=u.hooks||{};function ni(e,t,l){e in li&&li[e].forEach((e=>{e.call(null,k,t,l)}))}(u.plugins||[]).forEach((e=>{for(let t in e.hooks)li[t]=(li[t]||[]).concat(e.hooks[t])}));const ii=He({key:null,setSeries:!1,filters:{pub:we,sub:we},scales:[Me,ce[1]?ce[1].scale:null],match:[_e,_e],values:[null,null]},sl.sync);sl.sync=ii;const oi=ii.key,si=ll(oi);function ri(e,t,l,n,i,o,s){ii.filters.pub(e,t,l,n,i,o,s)&&si.pub(e,t,l,n,i,o,s)}function ui(){ni("init",u,g),Jl(g||u.data,!1),Ne[Me]?yn(Me,Ne[Me]):ql(),Kt=zn.show,qt=tl=!0,nl(u.width,u.height)}return si.sub(k),k.pub=function(e,t,l,n,i,o,s){ii.filters.sub(e,t,l,n,i,o,s)&&ti[e](null,t,l,n,i,o,s)},k.destroy=function(){si.unsub(k),Dl.delete(k),ft.clear(),L(x,b,ei),I.remove(),tt.remove(),ni("destroy")},ce.forEach(cl),me.forEach((function(e,t){if(e._show=e.show,e.show){let l=e.side%2,n=ke[e.scale];null==n&&(e.scale=l?ce[1].scale:Me,n=ke[e.scale]);let i=n.time;e.size=pe(e.size),e.space=pe(e.space),e.rotate=pe(e.rotate),e.incrs=pe(e.incrs||(2==n.distr?Qe:i?1==ue?ht:mt:et)),e.splits=pe(e.splits||(i&&1==n.distr?Be:3==n.distr?Lt:4==n.distr?Gt:Rt)),e.stroke=pe(e.stroke),e.grid.stroke=pe(e.grid.stroke),e.ticks.stroke=pe(e.ticks.stroke),e.border.stroke=pe(e.border.stroke);let o=e.values;e.values=Te(o)&&!Te(o[0])?pe(o):i?Te(o)?_t(je,wt(o,Ue)):Ae(o)?function(e,t){let l=Je(t);return(t,n)=>n.map((t=>l(e(t))))}(je,o):o||Ve:o||Ht,e.filter=pe(e.filter||(3>n.distr||10!=n.log?ge:Ut)),e.font=Ol(e.font),e.labelFont=Ol(e.labelFont),e._size=e.size(k,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(hl[t]=!0,e._el=z("u-axis",q))}})),w?w instanceof HTMLElement?(w.appendChild(I),ui()):w(k,ui):ui(),k}jl.assign=He,jl.fmtNum=Z,jl.rangeNum=V,jl.rangeLog=O,jl.rangeAsinh=N,jl.orient=nl,jl.pxRatio=v,jl.join=function(e,t){let l=new Set;for(let t=0;e.length>t;t++){let n=e[t][0],i=n.length;for(let e=0;i>e;e++)l.add(n[e])}let n=[Array.from(l).sort(((e,t)=>e-t))],i=n[0].length,o=new Map;for(let e=0;i>e;e++)o.set(n[0][e],e);for(let l=0;e.length>l;l++){let s=e[l],r=s[0];for(let e=1;s.length>e;e++){let u=s[e],a=Array(i).fill(void 0),f=t?t[l][e]:1,c=[];for(let e=0;u.length>e;e++){let t=u[e],l=o.get(r[e]);null===t?0!=f&&(a[l]=t,2==f&&c.push(l)):a[l]=t}Re(a,c,i),n.push(a)}}return n},jl.fmtDate=Je,jl.tzDate=function(e,t){let l;return"UTC"==t||"Etc/UTC"==t?l=new Date(+e+6e4*e.getTimezoneOffset()):t==qe?l=e:(l=new Date(e.toLocaleString("en-US",{timeZone:t})),l.setMilliseconds(e.getMilliseconds())),l},jl.sync=ll;{jl.addGap=function(e,t,l){let n=e[e.length-1];n&&n[0]==t?n[1]=l:e.push([t,l])},jl.clipGaps=rl;let e=jl.paths={points:kl};e.linear=Sl,e.stepped=function(e){const t=J(e.align,1),l=J(e.ascDesc,!1),n=J(e.alignGaps,0);return(e,i,o,s)=>nl(e,i,((r,u,a,f,c,h,d,p,m,g,x)=>{let w=r.pxRound,_=e=>w(h(e,f,g,p)),b=e=>w(d(e,c,x,m)),k=0==f.ori?dl:pl;const y={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},M=y.stroke,S=f.dir*(0==f.ori?1:-1);o=I(a,o,s,1),s=I(a,o,s,-1);let E=b(a[1==S?o:s]),D=_(u[1==S?o:s]),z=D;k(M,D,E);for(let e=1==S?o:s;e>=o&&s>=e;e+=S){let l=a[e];if(null==l)continue;let n=_(u[e]),i=b(l);1==t?k(M,n,E):k(M,z,i),k(M,n,i),E=i,z=n}let[T,P]=il(e,i);if(null!=r.fill||0!=T){let t=y.fill=new Path2D(M),l=b(r.fillTo(e,i,r.min,r.max,T));k(t,z,l),k(t,D,l)}if(!r.spanGaps){let c=[];c.push(...ul(u,a,o,s,S,_,n));let h=r.width*v/2,d=l||1==t?h:-h,w=l||-1==t?-h:h;c.forEach((e=>{e[0]+=d,e[1]+=w})),y.gaps=c=r.gaps(e,i,o,s,c),y.clip=rl(c,f.ori,p,m,g,x)}return 0!=P&&(y.band=2==P?[sl(e,i,o,s,M,-1),sl(e,i,o,s,M,1)]:sl(e,i,o,s,M,P)),y}))},e.bars=function(e){const t=J((e=e||Ee).size,[.6,fe,1]),l=e.align||0,n=(e.gap||0)*v,i=J(e.radius,0),o=1-t[0],s=J(t[1],fe)*v,r=J(t[2],1)*v,u=J(e.disp,Ee),a=J(e.each,(()=>{})),{fill:f,stroke:c}=u;return(e,t,h,d)=>nl(e,t,((p,m,g,x,w,_,b,k,y,M,S)=>{let E=p.pxRound;const D=x.dir*(0==x.ori?1:-1),z=w.dir*(1==w.ori?1:-1);let T,P,A=0==x.ori?ml:gl,W=0==x.ori?a:(e,t,l,n,i,o,s)=>{a(e,t,l,i,n,s,o)},[Y,C]=il(e,t),F=3==w.distr?1==Y?w.max:w.min:0,H=b(F,w,S,y),R=E(p.width*v),L=!1,G=null,I=null,O=null,N=null;null==f||0!=R&&null==c||(L=!0,G=f.values(e,t,h,d),I=new Map,new Set(G).forEach((e=>{null!=e&&I.set(e,new Path2D)})),R>0&&(O=c.values(e,t,h,d),N=new Map,new Set(O).forEach((e=>{null!=e&&N.set(e,new Path2D)}))));let{x0:j,size:U}=u;if(null!=j&&null!=U){m=j.values(e,t,h,d),2==j.unit&&(m=m.map((t=>e.posToVal(k+t*M,x.key,!0))));let l=U.values(e,t,h,d);P=2==U.unit?l[0]*M:_(l[0],x,M,k)-_(0,x,M,k),P=E(P-R),T=1==D?-R/2:P+R/2}else{let e=M;if(m.length>1){let t=null;for(let l=0,n=1/0;m.length>l;l++)if(void 0!==g[l]){if(null!=t){let i=Q(m[l]-m[t]);n>i&&(n=i,e=Q(_(m[l],x,M,k)-_(m[t],x,M,k)))}t=l}}P=E(ne(s,ie(r,e-e*o))-R-n),T=(0==l?P/2:l==D?0:P)-l*D*n/2}const B={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:3};let V;0!=C&&(B.band=new Path2D,V=E(b(1==C?w.max:w.min,w,S,y)));const q=L?null:new Path2D,K=B.band;let{y0:Z,y1:$}=u,X=null;null!=Z&&null!=$&&(g=$.values(e,t,h,d),X=Z.values(e,t,h,d));for(let l=1==D?h:d;l>=h&&d>=l;l+=D){let n=g[l];if(void 0===n)continue;let o=_(2!=x.distr||null!=u?m[l]:l,x,M,k),s=b(J(n,F),w,S,y);null!=X&&null!=n&&(H=b(X[l],w,S,y));let r=E(o-T),a=E(ie(s,H)),f=E(ne(s,H)),c=a-f,h=i*P;null!=n&&(L?(R>0&&null!=O[l]&&A(N.get(O[l]),r,f+ee(R/2),P,ie(0,c-R),h),null!=G[l]&&A(I.get(G[l]),r,f+ee(R/2),P,ie(0,c-R),h)):A(q,r,f+ee(R/2),P,ie(0,c-R),h),W(e,t,l,r-R/2,f,P+R,c)),0!=C&&(z*C==1?(a=f,f=V):(f=a,a=V),c=a-f,A(K,r-R/2,f,P+R,ie(0,c),0))}return R>0&&(B.stroke=L?N:q),B.fill=L?I:q,B}))},e.spline=function(e){return function(e,t){const l=J(t?.alignGaps,0);return(t,n,i,o)=>nl(t,n,((s,r,u,a,f,c,h,d,p,m,g)=>{let x,w,_,b=s.pxRound,k=e=>b(c(e,a,m,d)),v=e=>b(h(e,f,g,p));0==a.ori?(x=cl,_=dl,w=_l):(x=hl,_=pl,w=bl);const y=a.dir*(0==a.ori?1:-1);i=I(u,i,o,1),o=I(u,i,o,-1);let M=k(r[1==y?i:o]),S=M,E=[],D=[];for(let e=1==y?i:o;e>=i&&o>=e;e+=y)if(null!=u[e]){let t=k(r[e]);E.push(S=t),D.push(v(u[e]))}const z={stroke:e(E,D,x,_,w,b),fill:null,clip:null,band:null,gaps:null,flags:1},T=z.stroke;let[P,A]=il(t,n);if(null!=s.fill||0!=P){let e=z.fill=new Path2D(T),l=v(s.fillTo(t,n,s.min,s.max,P));_(e,S,l),_(e,M,l)}if(!s.spanGaps){let e=[];e.push(...ul(r,u,i,o,y,k,l)),z.gaps=e=s.gaps(t,n,i,o,e),z.clip=rl(e,a.ori,d,p,m,g)}return 0!=A&&(z.band=2==A?[sl(t,n,i,o,T,-1),sl(t,n,i,o,T,1)]:sl(t,n,i,o,T,A)),z}))}(El,e)}}return jl}();