TelegramPWA/dist/8878.6a2ae99baac761093038.js
Alexander Zinchuk fdd5c31623 [Build]
2023-12-12 12:44:22 +01:00

2 lines
35 KiB
JavaScript

"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[8878],{18878:(t,e,n)=>{n.r(e),n.d(e,{create:()=>$t});const o=window.devicePixelRatio||1,a={begin:.8,end:1},i=300,l=500,s=10,r=320,c=15,d=2,u=.45,h=10,f=.5,m=.02,p=20,y="300 10px Helvetica, Arial, sans-serif",g=45,v=50,x=30,M=1,b=.1,w=40,k=10,S=1,L=8,F=4,T=i,A=.1,P=.5,$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],I=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],V=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],C=864e5,O=200,E=4,W=1e3,D=1,Z=.5,H=["begin 200 fast","end 200 fast","labelFromIndex 200 fast floor","labelToIndex 200 fast ceil","xAxisScale 400","yMinViewport","yMaxViewport","yMinViewportSecond","yMaxViewportSecond","yMinMinimap","yMaxMinimap","yMinMinimapSecond","yMaxMinimapSecond","yAxisScale","yAxisScaleSecond"];function X(t){const e=t.length;let n=t[0],o=t[0];for(let a=0;a<e;a++){const e=t[a];e>n?n=e:e<o&&(o=e)}return{max:n,min:o}}function z(t){return[].concat.apply([],t)}function N(t){const e=[],n=t.length;for(let o=0,a=t[0].length;o<a;o++){e[o]=0;for(let a=0;a<n;a++)e[o]+=t[a][o]}return e}function R(t,e){return new Proxy({},{get:(n,o)=>void 0!==n[o]?n[o]:void 0!==e[o]?e[o]:t[o]})}function Y(t,e,n=!0){let o,a,i=null;return(...l)=>{o=!0,a=l,i||(n&&(o=!1,t(...a)),i=window.setInterval((()=>{if(!o)return window.clearInterval(i),void(i=null);o=!1,t(...a)}),e))}}function B(t){let e,n=!1;return function(...o){e=o,n||(n=!0,requestAnimationFrame((()=>{n=!1,t(...e)})))}}const j=[1,2,8,18,50,100,250,500,1e3,2500,5e3,1e4,25e3,5e4,1e5,25e4,5e5,1e6,25e5,5e6,1e7,25e6,5e7,1e8];function q(t){return j[t]||j[j.length-1]}function U(t,e,n){const o=Math.min(e+s,n-e);return o<=4*s&&(t=Math.min(1,t,o/(4*s))),t}function J(t,e){return e-s<=2*s?Math.min(1,t,(e-s)/(2*s)):t}function _(t){return Math.min(...t.getSize())*u}function K(t){return t>=W?Math.min(t/1e3,1):0}function G(t,e,n){const o={begin:0,end:1},a=function(){const e={};return t.datasets.forEach((({key:t})=>{e[t]=!0})),e}(),l=function(){const e=[],n=t.datasets.map((({key:t})=>`opacity#${t} 300`));return z([H,n]).forEach((t=>{const[n,o,...a]=t.split(" ");e.push({prop:n,duration:o,options:a})})),e}(),s=function(t){const e={};let n=null,o=null,a=null,l=null,s=null,r=null;function c(t){delete e[t],d()||(cancelAnimationFrame(n),n=null)}function d(){return Boolean(Object.keys(e).length)}function u(t){return!(!t&&(r||s))&&(null===a||a>=E)}function h(){const r=!u();!o||Date.now()-o>=O?(l&&(a=l,s||u(!0)||(s=Date.now())),o=Date.now(),l=0):l++;const f={};Object.keys(e).forEach((t=>{const{startedAt:n,from:o,to:a,duration:l=i,options:s}=e[t],r=Math.min(1,(Date.now()-n)/l);let d=o+(a-o)*(u=r,1-Math.pow(1-u,1.675));var u;s.includes("ceil")?d=Math.ceil(d):s.includes("floor")&&(d=Math.floor(d)),e[t].current=d,e[t].progress=r,f[t]=d,1===r&&c(t)})),r||t(f),d()&&(n=requestAnimationFrame(h))}return{add:function(t,a,i,c,d){e[t]={from:a,to:i,duration:c,options:d,current:a,startedAt:Date.now(),progress:0},n||(o=null,l=null,s&&Date.now()-s>5e3&&(s=null),r=Boolean(s)||!u(!0),n=requestAnimationFrame(h))},remove:c,get:function(t){return e[t]},getState:function(){const t={};return Object.keys(e).forEach((n=>{const{current:o,from:a,to:i,progress:l}=e[n];t[n]=o,t[`${n}From`]=a,t[`${n}To`]=i,t[`${n}Progress`]=l})),t},isRunning:d,isFast:u}}(d),r=B(d);let c={};function d(){const t=s.isFast()?R(c,s.getState()):c;t.static=c,n(t)}return{update:function({range:n={},filter:i={},focusOn:d,minimapDelta:u}={},h){Object.assign(o,n),Object.assign(a,i);const f=c;c=function(t,e,n,o,a,i,l){const{begin:s,end:r}=n,c=t.xLabels.length-1,d=Math.max(0,Math.ceil(c*s)),u=Math.min(Math.floor(c*r),c),h=function(t,e,n){return o=(n-e)/Math.floor(t/g),Math.ceil(Math.log2(o||1));var o}(e.width,d,u),f=t.isStacked?function(t,e,n,o,a){const i=t.datasets.filter((t=>e[t.key])).map((({values:t})=>t)),l=i.length?N(i):[],{max:s=a.yMaxMinimap}=X(l),{max:r=a.yMaxViewport}=X(l.slice(n,o+1));return{yMinViewport:0,yMaxViewport:r,yMinMinimap:0,yMaxMinimap:s}}(t,o,d,u,l):function(t,e,n,o,a){const i=t.hasSecondYAxis&&t.datasets.slice(-1)[0],l=t.datasets.filter((t=>e[t.key]&&t!==i)),s=Q(t,n,o,a,l);if(i){const{yMinViewport:e,yMaxViewport:l,yMinMinimap:r,yMaxMinimap:c}=Q(t,n,o,a,[i]);Object.assign(s,{yMinViewportSecond:e,yMaxViewportSecond:l,yMinMinimapSecond:r,yMaxMinimapSecond:c})}return s}(t,o,d,u,l),m=tt(e.height,f.yMinViewport,f.yMaxViewport),p=t.hasSecondYAxis&&tt(e.height,f.yMinViewportSecond,f.yMaxViewportSecond),y=q(m);if(f.yMinViewport-=f.yMinViewport%y,p){const t=q(p);f.yMinViewportSecond-=f.yMinViewportSecond%t}const v={};return t.datasets.forEach((({key:t})=>{v[`opacity#${t}`]=o[t]?1:0})),Object.assign({totalXWidth:c,xAxisScale:h,yAxisScale:m,yAxisScaleSecond:p,labelFromIndex:Math.max(0,d-1),labelToIndex:Math.min(u+1,c),filter:Object.assign({},o),focusOn:void 0!==a?a:l.focusOn,minimapDelta:void 0!==i?i:l.minimapDelta},f,v,n)}(t,e,o,a,d,u,f),h||l.forEach((({prop:t,duration:e,options:n})=>{const o=s.get(t),a=o?o.to:f[t];if(void 0!==a&&a!==c[t]){const a=o?n.includes("fast")?f[t]:o.current:f[t];o&&s.remove(t),s.add(t,a,c[t],e,n)}})),s.isRunning()&&s.isFast()||r()},hasAnimations:function(){return s.isFast()}}}function Q(t,e,n,o,a){const{min:i=o.yMinMinimap,max:l=o.yMaxMinimap}=X(z(a.map((({yMax:t,yMin:e})=>[t,e])))),s=i/l>b?i:0;let r,c;if(0===e&&n===t.xLabels.length-1)r=s,c=l;else{const t=X(z(a.map((({values:t})=>t)).map((t=>t.slice(e,n+1))))),i=void 0!==t.min?t.min:o.yMinViewport;c=void 0!==t.max?t.max:o.yMaxViewport,r=i/c>b?i:0}return{yMinViewport:r,yMaxViewport:c,yMinMinimap:s,yMaxMinimap:l}}function tt(t,e,n){const o=t-x,a=n-e,i=Math.floor(o/v);return l=a/i,j.findIndex((t=>t>=l))||j.length-1;var l}const et=(t="div")=>document.createElement(t);function nt(t,e,n){t.addEventListener(e,n)}function ot(t,e,n){t.removeEventListener(e,n)}function at(t,e,n="",o=!1){const a=t.parentNode;a.classList.add("lovely-chart--transition-container");const i=et(t.tagName);i.className=`${n} lovely-chart--transition lovely-chart--position-${o?"top":"bottom"} lovely-chart--state-hidden`,i.innerHTML=e;const l=n.length?`.${n.split(" ").join(".")}`:"";return a.querySelectorAll(`${l}.lovely-chart--state-hidden`).forEach((t=>t.remove())),t.classList.add("lovely-chart--transition"),t.classList.remove("lovely-chart--position-bottom","lovely-chart--position-top"),t.classList.add(o?"lovely-chart--position-bottom":"lovely-chart--position-top"),a.insertBefore(i,t.nextSibling),function(t){t.classList.remove("lovely-chart--state-animated"),t.classList.add("lovely-chart--state-animated"),t.classList.remove("lovely-chart--state-hidden")}(i),function(t){t.classList.remove("lovely-chart--state-animated"),t.classList.add("lovely-chart--state-animated"),t.classList.add("lovely-chart--state-hidden")}(t),i}function it(t,e=1){return t>=1e6?lt(t/1e6,e)+"M":t>=1e3?lt(t/1e3,e)+"K":t}function lt(t,e){return t.toFixed(e).replace(/(\d{3,})\.\d+/,"$1").replace(/\.0+$/,"")}function st(t){return String(t).replace(/\d(?=(\d{3})+$)/g,"$& ")}function rt(t,{isShort:e=!1}={}){return ct(t,{isShort:e,displayWeekDay:!0})}function ct(t,{isShort:e=!1,displayWeekDay:n=!1,displayYear:o=!0,displayHours:a=!1}={}){const{value:i}=t,l=new Date(i),s=e?V:I;let r=`${l.getUTCDate()} ${$[l.getUTCMonth()]}`;return n&&(r=`${s[l.getUTCDay()]}, `+r),o&&(r+=` ${l.getUTCFullYear()}`),a&&(r+=`, ${("0"+l.getUTCHours()).slice(-2)}:${("0"+l.getUTCMinutes()).slice(-2)}`),r}function dt(){return document.documentElement.classList.contains("theme-dark")?"skin-night":"skin-day"}let ut=dt();const ht={"skin-day":{background:"#FFFFFF","text-color":"#222222","minimap-mask":"#E2EEF9/0.6","minimap-slider":"#C0D1E1","grid-lines":"#182D3B/0.1","zoom-out-text":"#108BE3","tooltip-background":"#FFFFFF","tooltip-arrow":"#D2D5D7",mask:"#FFFFFF/0.5","x-axis-text":"#252529/0.6","y-axis-text":"#252529/0.6"},"skin-night":{background:"#242F3E","text-color":"#FFFFFF","minimap-mask":"#304259/0.6","minimap-slider":"#56626D","grid-lines":"#FFFFFF/0.1","zoom-out-text":"#48AAF0","tooltip-background":"#1c2533","tooltip-arrow":"#D2D5D7",mask:"#242F3E/0.5","x-axis-text":"#A3B1C2/0.6","y-axis-text":"#A3B1C2/0.6"}},ft=document.createElement("style");ft.type="text/css",ft.appendChild(document.createTextNode("")),document.head.appendChild(ft);const mt=ft.sheet;function pt(t){const e={},n=".lovely-chart--color";return["skin-day","skin-night"].forEach((o=>{e[o]={},Object.keys(ht[o]).forEach((t=>{e[o][t]=gt(ht[o][t])})),Object.keys(t).forEach((a=>{e[o][`dataset#${a}`]=gt(t[a]),vt(mt,`.lovely-chart--tooltip-dataset-value${n}-${t[a].slice(1)}`,`color: ${t[a]}`),vt(mt,`.lovely-chart--button${n}-${t[a].slice(1)}`,`border-color: ${t[a]}; color: ${t[a]}`),vt(mt,`.lovely-chart--button.lovely-chart--state-checked${n}-${t[a].slice(1)}`,`background-color: ${t[a]}`)}))})),e}function yt(t,e,n){return function([t,e,n,o=1],a=1){return`rgba(${t}, ${e}, ${n}, ${o*a})`}(t[ut][e],n)}function gt(t){const[e,n]=t.replace("#","").split("/");return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16),n?parseFloat(n):1]}function vt(t,e,n){t.insertRule(`${e} { ${n} }`,t.cssRules.length)}function xt(t){const{begin:e,end:n,totalXWidth:o,yMin:a,yMax:i,availableWidth:l,availableHeight:s,xPadding:r=0,yPadding:c=0}=t;let d=l;0===e&&(d-=r),1===n&&(d-=r);const u=d/((n!==e?n-e:1)*o);let h=e*o*u;0===e&&(h-=r);const f=s-c,m=f/(i-a),p=a*m;return{findClosestLabelIndex:function(t){return Math.round((t+h)/u)},copy:function(e,n){return xt(R(t,e))},getCenter:function(){return[l/2,s-f/2]},getSize:function(){return[l,f]},getParams:function(){return t},getState:function(){return{xFactor:u,xOffsetPx:h,availableHeight:s,yFactor:m,yOffsetPx:p}}}}function Mt(t,e,n){const{xFactor:o,xOffsetPx:a,availableHeight:i,yFactor:l,yOffsetPx:s}=t.getState();return[e*o-a,i-(n*l-s)]}function bt(t,{width:e,height:n}){const a=et("canvas");a.width=e*o,a.height=n*o,a.style.width="100%",a.style.height=`${n}px`;const i=a.getContext("2d");return i.scale(o,o),t.appendChild(a),{canvas:a,context:i}}function wt(t,e){e.clearRect(0,0,t.width,t.height)}function kt(t,e,n,o,a,i){let l=e.map((({values:t})=>t.slice(n.from,n.to+1)));t.isPie&&!i&&(l=function(t){return t.map((t=>[t.reduce(((t,e)=>t+e),0)]))}(l));const s=l.map(((e,a)=>e.map(((e,i)=>{let l=e;return t.isStacked&&(l*=o[a]),{labelIndex:n.from+i,value:e,visibleValue:l,stackOffset:0,stackValue:l}}))));return t.isPercentage&&function(t,e){const n=function(t){return N(t.map((t=>t.map((({visibleValue:t})=>t)))))}(t);t.forEach((t=>{t.forEach(((t,o)=>{t.percent=t.visibleValue/n[o],t.visibleValue=t.percent*e.yMax}))}))}(s,a),t.isStacked&&function(t){const e=[];t.forEach((t=>{t.forEach(((t,n)=>{void 0===e[n]&&(e[n]=0),t.stackOffset=e[n],e[n]+=t.visibleValue,t.stackValue=e[n]}))}))}(s),s}document.documentElement.addEventListener("darkmode",(()=>{ut=dt()}));const St=(()=>{let t=1/Math.pow(2,22),e=1e5;function n(t,e,n,o,a){let i,l=+e[0],s=+e[1];i=+((t[0]-l)*o[0]+(t[1]-s)*o[1])*a,i>1?(l=+n[0],s=+n[1]):i>0&&(l+=+o[0]*i,s+=+o[1]*i);let r=+t[0]-l,c=+t[1]-s;return+r*r+c*c}return function(o,a,i){if(o.length<6)return function(){return{points:o,indexes:a,removed:[]}};let l=function(o,a){let i,l=o.length,s=[],r=[];for(let t=0,e=o.length;t<e;++t)s[t]=0;a||(a=[]);let c=0;for(let t=0,n=a.length;t<n;++t)s[a[t]]=e;function d(){let l=r.pop(),c=function(l){let c=l.start,d=l.end,u=l.record,h=l.currentLimit,f=0;if(!u){let i=-1,l=[o[d][0]-o[c][0],o[d][1]-o[c][1]];for(let t=0,n=a.length;t<n;++t){let n=a[t];if(n>c){if(n<d){i=n,f=e;break}break}}if(i<0){if(Math.abs(l[0])>t||Math.abs(l[1])>t){let t=1/(l[0]*l[0]+l[1]*l[1]);for(let e=c+1;e<d;++e){let a=n(o[e],o[c],o[d],l,t);a>f&&(i=e,f=a)}}else i=Math.round(.5*(c+d)),f=h;s[i]=f}u={start:c,end:d,index:i,distance:f}}return u.index&&u.distance>i&&(u.index-c>=2&&r.push({start:c,end:u.index,record:u.left,currentLimit:u.distance,parent:u,parentProperty:"left"}),d-u.index>=2&&r.push({start:u.index,end:d,record:u.right,currentLimit:u.distance,parent:u,parentProperty:"right"})),u}(l);return l.parent&&l.parentProperty&&(l.parent[l.parentProperty]=c),c}return function(t){for(i=t,r.push({start:0,end:l-1,record:c,currentLimit:e}),c=d();r.length;)d();return s}}(o,i);return function(t){let e=[],n=[],i=[],s=t*t,r=l(s);for(let t=0,l=o.length;t<l;t++)r[t]>=s||0==t||t==l-1?(e.push(o[t]),n.push(a?a[t]:t)):i.push(t);return{points:e,indexes:n,removed:i}}}})();function Lt(t,e,n,o,a,i,l,s,r,c,d,u,p){if(n.datasets.forEach((({key:y,type:g,hasOwnYAxis:v},x)=>{if(!c[x])return;const M={color:yt(d,`dataset#${y}`),lineWidth:r,opacity:n.isStacked?1:c[x],simplification:p},b="pie"===g&&u?"bar":g;let w=v?l:a[x],k=v?s:i;if("area"===b){const{yMin:t,yMax:e}=i.getParams(),n=e-t,l=[{labelIndex:o.from,stackValue:0},{labelIndex:o.to,stackValue:0}],s=[{labelIndex:o.to,stackValue:n},{labelIndex:o.from,stackValue:n}];w=z([a[x-1]||l,s])}if("pie"===b&&(M.center=i.getCenter(),M.radius=_(i),M.pointerVector=e.focusOn),"bar"===b){const[t]=Mt(i,0,0),[n]=Mt(i,1,0);M.lineWidth=n-t,M.focusOn=e.focusOn}!function(t,...e){switch(t){case"line":return function(t,e,n,o){t.beginPath();let a=[];for(let t=0,o=e.length;t<o;t++){const{labelIndex:o,stackValue:i}=e[t];a.push(Mt(n,o,i))}o.simplification&&(a=St(a)(o.simplification).points),a.forEach((([e,n])=>{t.lineTo(e,n)})),t.save(),t.strokeStyle=o.color,t.lineWidth=o.lineWidth,t.globalAlpha=o.opacity,t.lineJoin="bevel",t.lineCap="butt",t.stroke(),t.restore()}(...e);case"bar":return function(t,e,n,o){const{yMin:a}=n.getParams();t.save(),t.globalAlpha=o.opacity,t.fillStyle=o.color;for(let i=0,l=e.length;i<l;i++){const{labelIndex:l,stackValue:s,stackOffset:r=0}=e[i],[,c]=Mt(n,l,Math.max(r,a)),[d,u]=Mt(n,l,s),h=d-o.lineWidth/2,m=u,p=1===o.opacity?o.lineWidth+f:o.lineWidth+f*o.opacity,y=c-u;t.fillRect(h,m,p,y)}t.restore()}(...e);case"step":return function(t,e,n,o){t.beginPath();let a=[];for(let t=0,o=e.length;t<o;t++){const{labelIndex:o,stackValue:i}=e[t];a.push(Mt(n,o-f,i),Mt(n,o+f,i))}a.forEach((([e,n])=>{t.lineTo(e,n)})),t.save(),t.strokeStyle=o.color,t.lineWidth=o.lineWidth,t.globalAlpha=o.opacity,t.stroke(),t.restore()}(...e);case"area":return function(t,e,n,o){t.beginPath();let a=[];for(let t=0,o=e.length;t<o;t++){const{labelIndex:o,stackValue:i}=e[t];a.push(Mt(n,o,i))}o.simplification&&(a=St(a)(o.simplification).points),a.forEach((([e,n])=>{t.lineTo(e,n)})),t.save(),t.fillStyle=o.color,t.lineWidth=o.lineWidth,t.globalAlpha=o.opacity,t.lineJoin="bevel",t.lineCap="butt",t.fill(),t.restore()}(...e);case"pie":!function(t,e,n,o){const{visibleValue:a,stackValue:i,stackOffset:l=0}=e[0];if(!a)return;const{yMin:s,yMax:r}=n.getParams(),c=1/(r-s),d=a*c,u=l*c*Math.PI*2-Math.PI/2,f=i*c*Math.PI*2-Math.PI/2,{radius:p=120,center:[y,g],pointerVector:v}=o,x=v&&u<=v.angle&&v.angle<f&&v.distance<=p?h:0,M=(u+f)/2,b=Math.cos(M),w=Math.sin(M),k=b*x,S=w*x;if(t.save(),t.beginPath(),t.fillStyle=o.color,t.moveTo(y+k,g+S),t.arc(y+k,g+S,p,u,f),t.lineTo(y+k,g+S),t.fill(),d>=m){t.font=`700 ${function(t,e){return(e+200*t)/10}(d,p)}px Helvetica, Arial, sans-serif`,t.textAlign="center",t.textBaseline="middle",t.fillStyle="white";const e=function(t,e,n){return t>=.99?0:Math.min(1-Math.log(30*t)/5,.8)*e}(d,p);t.fillText(`${Math.round(100*d)}%`,y+b*e+k,g+w*e+S)}t.restore()}(...e)}}(b,t,w,k,M)})),e.focusOn&&(n.isBars||n.isSteps)){const[o]=Mt(i,0,0),[a]=Mt(i,1,0);!function(t,e,n){const[o,a]=e.getCenter(),[i,l]=e.getSize(),[s]=Mt(e,n.focusOn,0);t.fillStyle=n.color,t.fillRect(o-i/2,a-l/2,s-n.lineWidth/2+f,l),t.fillRect(s+n.lineWidth/2,a-l/2,i-(s+n.lineWidth/2),l)}(t,i,{focusOn:e.focusOn,color:yt(d,"mask"),lineWidth:n.isSteps?a-o+r:a-o})}}function Ft(t,e){let n=null,o=null;function a(t){n=t,"mousedown"===t.type?(nt(document,"mousemove",s),nt(document,"mouseup",i)):"touchstart"===t.type&&(nt(document,"touchmove",s),nt(document,"touchend",i),nt(document,"touchcancel",i),void 0===t.pageX&&(t.pageX=t.touches[0].pageX)),e.draggingCursor&&document.body.classList.add(`cursor-${e.draggingCursor}`),e.onCapture&&e.onCapture(t),e.onLongPress&&(o=setTimeout((()=>e.onLongPress()),l))}function i(t){n&&(o&&(clearTimeout(o),o=null),e.draggingCursor&&document.body.classList.remove(`cursor-${e.draggingCursor}`),ot(document,"mouseup",i),ot(document,"mousemove",s),ot(document,"touchcancel",i),ot(document,"touchend",i),ot(document,"touchmove",s),n=null,e.onRelease&&e.onRelease(t))}function s(t){n&&(o&&(clearTimeout(o),o=null),"touchmove"===t.type&&void 0===t.pageX&&(t.pageX=t.touches[0].pageX),e.onDrag&&e.onDrag(t,n,{dragOffsetX:t.pageX-n.pageX}))}nt(t,"mousedown",a),nt(t,"touchstart",a)}function Tt(t,e,n,o,a,i){let l,s,r,c,d,u,h,f,m,y,g,v=null,M=!1,b=!1;const w=B($),k=Y(V,100,!0);function S(t){if(t.target===m||m.contains(t.target)||v)return;b=!1;const e=u.getBoundingClientRect();y=(t.touches?t.touches[0].clientX:t.clientX)-e.left,g=(t.touches?t.touches[0].clientY:t.clientY)-e.top,w()}function L(t){null===y||t.target===u||u.contains(t.target)||A()}function F(t){if(!b&&e.isZoomable){const e=v;v=null,S(t);const n=P();n!==e&&(v=n),a(n)}}function T(){if(m.classList.contains("lovely-chart--state-inactive"))return;const t=r.findClosestLabelIndex(y);a(t)}function A(t){y=null,v=null,wt(h,f),C(),!t&&i&&i(null)}function P(){const t=r.findClosestLabelIndex(y);return t<l.labelFromIndex||t>l.labelToIndex?null:t}function $(a){if(!y||!l||b)return;const u=P();if(null===u)return void A(a);const v=O(),M=!e.isPie||v.distance<=_(r);function w(t,n){return e.isPie?t.slice(l.labelFromIndex,l.labelToIndex+1).reduce(((t,e)=>t+e),0):t[n]}!a&&i&&(e.isPie?i(v):i(u));const[S]=Mt(r,u,0),L=e.datasets.map((({key:t,name:e,values:n,hasOwnYAxis:o},a)=>({key:t,name:e,value:w(n,u),hasOwnYAxis:o,originalIndex:a}))).filter((({key:t})=>l.filter[t]));L.length&&M?function(n,o){m.style.transform=`translate3D(${function(n){const o=(l.labelFromIndex+l.labelToIndex)/2,{angle:a}=O(),i=(e.isPie?a>Math.PI/2:n<o)?y+p:y-(m.offsetWidth+p);return Math.min(Math.max(0,i),t.offsetWidth-m.offsetWidth)}(o)}px, ${e.isPie?`${g}px`:0}, 0)`,m.classList.add("lovely-chart--state-shown"),e.isPie?V(null,n):k(function(t,e){switch(t.tooltipFormatter){case"statsFormatDayHourFull":return`${t.xLabels[e].value}:00`;case"statsTooltipFormat('day')":return ct(t.xLabels[e]);case"statsTooltipFormat('hour')":case"statsTooltipFormat('5min')":return n=t.xLabels[e],new Date(n.value).toString().match(/(\d+:\d+):/)[1];default:return t.xLabels[e].text}var n}(e,o),n)}(L,u):C(),wt(h,f),(e.isLines||e.isAreas)&&(e.isLines&&function(t,e){t.forEach((({value:t,key:n,hasOwnYAxis:a,originalIndex:i})=>{const u=e-l.labelFromIndex,h=a?c[u]:s[i][u];if(!h)return;const[m,p]=Mt(a?d:r,e,h.stackValue);!function([t,e],n,o){f.strokeStyle=n,f.fillStyle=o,f.lineWidth=2,f.beginPath(),f.arc(t,e,4,0,2*Math.PI),f.fill(),f.stroke()}([m,p],yt(o,`dataset#${n}`),yt(o,"background"))}))}(L,u),function(t,e,n){f.strokeStyle=n,f.lineWidth=1,f.beginPath(),f.moveTo(t,0),f.lineTo(t,e),f.stroke()}(S,n.height-x,yt(o,"grid-lines")))}function I(t,n,o){if(!e.isPercentage)return;if(e.isPie)return void Array.from(t.querySelectorAll(".lovely-chart--percentage-title")).forEach((t=>t.remove()));const a=o?Math.round(n/o*100):0,i=t.querySelector(".lovely-chart--percentage-title:not(.lovely-chart--state-hidden)");if(i)i.innerHTML=`${a}%`;else{const e=et("span");e.className="lovely-chart--percentage-title lovely-chart--position-left",e.innerHTML=`${a}%`,t.prepend(e)}}function V(t,n){!function(t){const n=m.children[0];if(e.isPie)n&&(n.style.display="none");else{"none"===n.style.display&&(n.style.display="");const e=n.querySelector(":not(.lovely-chart--state-hidden)");n.innerHTML&&e?e.innerHTML=t:n.innerHTML=`<span>${t}</span>`}}(t),function(t){const n=m.children[1];e.isPie&&n.classList.add("lovely-chart--tooltip-legend-pie"),Array.from(n.children).forEach((t=>{!e.isPie&&n.classList.contains("lovely-chart--tooltip-legend-pie")?t.remove():t.setAttribute("data-present","false")}));const o=t.reduce(((t,e)=>t+e.value),0),a=O(),i=e.isPie?t.filter((({value:e},n)=>function(t,e,n,o,a){const i=o>0?t.slice(0,o).reduce(((t,e)=>t+e.value),0):0,l=i/n*Math.PI*2-Math.PI/2,s=(i+e)/n*Math.PI*2-Math.PI/2;return a&&l<=a.angle&&a.angle<s&&a.distance<=_(r)}(t,e,o,n,a))):t;i.forEach((t=>{const a=n.querySelector(`[data-name="${t.name}"]`);a?function(t,{key:n,value:o}={},a){t.setAttribute("data-present","true"),t.querySelector(`.lovely-chart--tooltip-dataset-value.lovely-chart--color-${e.colors[n].slice(1)}:not(.lovely-chart--state-hidden)`).innerHTML=st(o),I(t,o,a)}(a,t,o):function(t,{name:n,key:o,value:a},i){const l=`lovely-chart--tooltip-dataset-value lovely-chart--position-right lovely-chart--color-${e.colors[o].slice(1)}`,s=et();s.className="lovely-chart--tooltip-dataset",s.setAttribute("data-present","true"),s.setAttribute("data-name",n),s.innerHTML=`<span class="lovely-chart--dataset-title">${n}</span><span class="${l}">${st(a)}</span>`,I(s,a,i);const r=t.querySelector('[data-total="true"]');r?t.insertBefore(s,r):t.appendChild(s)}(n,t,o)})),(e.isBars||e.isSteps)&&e.isStacked&&function(t,e){const n=t.querySelector('[data-total="true"]');if(n)n.setAttribute("data-present","true"),n.querySelector(".lovely-chart--tooltip-dataset-value:not(.lovely-chart--state-hidden)").innerHTML=e;else{const n=et();n.className="lovely-chart--tooltip-dataset",n.setAttribute("data-present","true"),n.setAttribute("data-total","true"),n.innerHTML=`<span>All</span><span class="lovely-chart--tooltip-dataset-value lovely-chart--position-right">${e}</span>`,t.appendChild(n)}}(n,st(o)),Array.from(n.querySelectorAll('[data-present="false"]')).forEach((t=>{t.remove()}))}(n)}function C(){m.classList.remove("lovely-chart--state-shown")}function O(){const{width:t,height:e}=u.getBoundingClientRect(),n=[t/2,e/2],o=Math.atan2(g-n[1],y-n[0]),a=Math.sqrt((y-n[0])**2+(g-n[1])**2);return{angle:o>=-Math.PI/2?o:2*Math.PI+o,distance:a}}return u=et(),u.className="lovely-chart--tooltip",function(){const{canvas:t,context:e}=bt(u,n);h=t,f=e}(),m=et(),m.className="lovely-chart--tooltip-balloon"+(e.isZoomable?"":" lovely-chart--state-inactive"),m.innerHTML='<div class="lovely-chart--tooltip-title"></div><div class="lovely-chart--tooltip-legend"></div><div class="lovely-chart--spinner"></div>',"ontouchstart"in window&&e.isZoomable&&nt(m,"click",T),u.appendChild(m),"ontouchstart"in window?(nt(u,"touchmove",S),nt(u,"touchstart",S),nt(document,"touchstart",L)):(nt(u,"mousemove",S),nt(u,"click",F),nt(document,"mousemove",L)),t.appendChild(u),{update:function(t,e,n,o,a){l=t,s=e,r=n,c=o,d=a,$(!0)},toggleLoading:function(t){m.classList.toggle("lovely-chart--state-loading",t),t||A()},toggleIsZoomed:function(t){t!==M&&(b=!0),M=t,m.classList.toggle("lovely-chart--state-inactive",t)}}}function At(t){const{title:e,labelFormatter:n,tooltipFormatter:o,isStacked:a,isPercentage:i,hasSecondYAxis:l,onZoom:s,minimapRange:r,hideCaption:c,zoomOutLabel:d}=t,{datasets:u,labels:h}=function(t){const{type:e,labels:n,datasets:o,hasSecondYAxis:a}=t;return{labels:Pt(n),datasets:o.map((({name:t,color:n,values:i},l)=>{const{min:s,max:r}=X(i);return{type:e,key:`y${l}`,name:t,color:n,values:Pt(i),hasOwnYAxis:a&&l===o.length-1,yMin:s,yMax:r}}))}}(t),f={};let m,p=1/0,y=-1/0;switch(u.forEach((({key:t,color:e,yMin:n,yMax:o})=>{f[t]=e,n<p&&(p=n),o>y&&(y=o)})),n){case"statsFormatDayHour":m=function(t){return t.map((t=>({value:t,text:`${t}:00`})))}(h);break;case"statsFormat('day')":m=function(t){return t.map((t=>{const e=new Date(t);return{value:t,text:`${e.getDate()} ${$[e.getMonth()]}`}}))}(h);break;case"statsFormat('hour')":case"statsFormat('5min')":m=function(t){return t.map((t=>({value:t,text:new Date(t).toString().match(/(\d+:\d+):/)[1]})))}(h);break;default:m=function(t){return t.map(((t,e)=>({value:e,text:t})))}(h)}const g={title:e,labelFormatter:n,tooltipFormatter:o,xLabels:m,datasets:u,isStacked:a,isPercentage:i,hasSecondYAxis:l,onZoom:s,isLines:"line"===t.type,isBars:"bar"===t.type,isSteps:"step"===t.type,isAreas:"area"===t.type,isPie:"pie"===t.type,yMin:p,yMax:y,colors:f,minimapRange:r,hideCaption:c,zoomOutLabel:d};return g.shouldZoomToPie=!g.onZoom&&g.isPercentage,g.isZoomable=g.onZoom||g.shouldZoomToPie,g}function Pt(t){return t.slice(0)}function $t(t,e){let n,o,i,l,u,h,f,m,p,g,v,b,$=window.innerWidth;const I=At(e),V=pt(I.colors),O=function(t,e,n=!0,o=!0){let a=null;return function(){a?(clearTimeout(a),a=null):n&&t(),a=setTimeout((()=>{o&&t(),a=null}),e)}}((function(){Object.assign(I,At(e)),o.remove(),E()}),500,!1,!0);function E(){o=et(),o.className="lovely-chart--container"+(I.shouldZoomToPie?" lovely-chart--container-type-pie":""),t.appendChild(o),h=function(t,e,n="Zoom out",o){let a,i,l,s,r;const c=Y(d,100,!1);function d(t){r||(s.innerHTML=t)}function u(){i=at(l,e,"lovely-chart--header-title",!0),i.classList.remove("lovely-chart--transition"),o()}return a=et(),a.className="lovely-chart--header",i=et(),i.className="lovely-chart--header-title",i.innerHTML=e,a.appendChild(i),s=et(),s.className="lovely-chart--header-caption lovely-chart--position-right",a.appendChild(s),t.appendChild(a),{setCaption:c,zoom:function(t){l=at(i,n,"lovely-chart--header-title lovely-chart--header-zoom-out-control"),setTimeout((()=>{nt(l,"click",u)}),500),d(t)},toggleIsZooming:function(t){r=t}}}(o,I.title,I.zoomOutLabel,j),function(){const{canvas:t,context:e}=bt(o,{width:o.clientWidth,height:r});i=t,l=e,u={width:i.offsetWidth,height:i.offsetHeight}}(),n=G(I,u,W),f=function(t,e,n,o){function a(e,a,i,l,r,c=1,d=null,u=!1){const h=q(i),f=Math.ceil(l/h)*h,m=Math.floor(r/h)*h;t.font=y,t.textAlign=u?"right":"left",t.textBaseline="bottom",t.lineWidth=1,t.beginPath();for(let e=f;e<=m;e+=h){const[,i]=Mt(a,0,e),l=J(c,i);t.fillStyle=yt(o,d||"y-axis-text",l),u?t.fillText(it(e),n.width-s,i-s/2):t.fillText(it(e),s,i-s/2),u?(t.strokeStyle=yt(o,d,c),t.moveTo(n.width-s,i),t.lineTo(n.width-2*s,i)):(t.moveTo(s,i),t.strokeStyle=yt(o,"grid-lines",c),t.lineTo(n.width-s,i))}t.stroke()}return{drawXAxis:function(a,i){t.clearRect(0,n.height-x+1,n.width,x+1);const l=n.height-x/2,s=Math.floor(a.xAxisScale),r=function(t){return Math.pow(2,t)}(s),c=1-(a.xAxisScale-s);t.font=y,t.textAlign="center",t.textBaseline="middle";for(let s=a.labelFromIndex;s<=a.labelToIndex;s++){const a=s-M;if(a%r!=0)continue;const d=e.xLabels[s],[u]=Mt(i,s,0);let h=a%(2*r)==0?1:c;h=U(h,u,n.width),t.fillStyle=yt(o,"x-axis-text",h),t.fillText(d.text,u,l)}},drawYAxis:function(i,l,r){const{yAxisScale:d,yAxisScaleFrom:u,yAxisScaleTo:h,yAxisScaleProgress:f=0,yMinViewport:m,yMinViewportFrom:p,yMinViewportTo:g,yMaxViewport:v,yMaxViewportFrom:x,yMaxViewportTo:M,yMinViewportSecond:b,yMinViewportSecondFrom:w,yMinViewportSecondTo:k,yMaxViewportSecond:S,yMaxViewportSecondFrom:L,yMaxViewportSecondTo:F}=i,T=r&&`dataset#${e.datasets[0].key}`,A=void 0!==p||void 0!==x;if(e.isPercentage?function(e){const[,a]=e.getSize();t.font=y,t.textAlign="left",t.textBaseline="bottom",t.lineWidth=1,t.beginPath(),[0,.25,.5,.75,1].forEach((e=>{const i=a-a*e+c;t.fillStyle=yt(o,"y-axis-text",1),t.fillText(100*e+"%",s,i-s/4),t.moveTo(s,i),t.strokeStyle=yt(o,"grid-lines",1),t.lineTo(n.width-s,i)})),t.stroke()}(l):a(0,l,Math.round(h||d),void 0!==g?g:m,void 0!==M?M:v,u?f:1,T),f>0&&A&&a(0,l,Math.round(u),void 0!==p?p:m,void 0!==x?x:v,1-f,T),r){const{yAxisScaleSecond:t,yAxisScaleSecondFrom:n,yAxisScaleSecondTo:o,yAxisScaleSecondProgress:l=0}=i,s=`dataset#${e.datasets[e.datasets.length-1].key}`,c=void 0!==w||void 0!==L;a(0,r,Math.round(o||t),void 0!==k?k:b,void 0!==F?F:S,n?l:1,s,!0),l>0&&c&&a(0,r,Math.round(n),void 0!==w?w:b,void 0!==L?L:S,1-l,s,!0)}}}}(l,I,u,V),m=function(t,e,n,o){let i,l,s,r,c,d,u,h,f={};const m=B((function(){const{begin:t,end:e}=f;c.children[0].style.width=100*t+"%",c.children[1].style.width=100*(e-t)+"%",c.children[2].style.width=100*(1-e)+"%"}));function p(t){t.preventDefault(),u=t.target.offsetLeft}function y(){u=null}function g(t,e){let n=Object.assign({},f,t);h&&h.minimapDelta&&!e&&(n=function(t){return{begin:Math.round(t.begin/h.minimapDelta)*h.minimapDelta,end:Math.round(t.end/h.minimapDelta)*h.minimapDelta}}(n)),n.begin===f.begin&&n.end===f.end||(f=n,m(),e||o(f))}return i=et(),i.className="lovely-chart--minimap",i.style.height=`${w}px`,function(){const{canvas:e,context:n}=bt(i,{width:t.offsetWidth-2*k,height:w});l=e,s=n}(),c=et(),c.className="lovely-chart--minimap-ruler",c.innerHTML='<div class="lovely-chart--minimap-mask"></div><div class="lovely-chart--minimap-slider"><div class="lovely-chart--minimap-slider-handle"><span class="lovely-chart--minimap-slider-handle-pin"></span></div><div class="lovely-chart--minimap-slider-inner"></div><div class="lovely-chart--minimap-slider-handle"><span class="lovely-chart--minimap-slider-handle-pin"></span></div></div><div class="lovely-chart--minimap-mask"></div>',d=c.children[1],Ft(d.children[1],{onCapture:p,onDrag:function(t,e,{dragOffsetX:n}){const o=r.width-d.offsetWidth,a=Math.max(0,Math.min(u+n-L,o)),i=a+d.offsetWidth;g({begin:a/r.width,end:i/r.width})},onRelease:y,draggingCursor:"grabbing"}),Ft(d.children[0],{onCapture:p,onDrag:function(t,e,{dragOffsetX:n}){const o=d.offsetLeft+d.offsetWidth-2*L;g({begin:Math.min(o,Math.max(0,u+n))/r.width})},onRelease:y,draggingCursor:"ew-resize"}),Ft(d.children[2],{onCapture:p,onDrag:function(t,e,{dragOffsetX:n}){const o=d.offsetLeft+2*L,a=r.width;g({end:Math.max(o,Math.min(u+L+n,a))/r.width})},onRelease:y,draggingCursor:"ew-resize"}),i.appendChild(c),t.appendChild(i),r={width:l.offsetWidth,height:l.offsetHeight},g(e.minimapRange||a),{update:function(t){const{begin:o,end:a}=t;u||g({begin:o,end:a},!0),e.datasets.length>=F&&(t=t.static),function(t){if(!h)return!0;const{datasets:n}=e;return!!n.some((({key:e})=>h[`opacity#${e}`]!==t[`opacity#${e}`]))||h.yMaxMinimap!==t.yMaxMinimap}(t)&&(h=R(t,{focusOn:null}),wt(l,s),function(t={}){const{datasets:o}=e,a={from:0,to:t.totalXWidth},i={begin:0,end:1,totalXWidth:t.totalXWidth,yMin:t.yMinMinimap,yMax:t.yMaxMinimap,availableWidth:r.width,availableHeight:r.height,yPadding:1},l=o.map((({key:t})=>h[`opacity#${t}`])),c=kt(e,o,a,l,i,!0),d=xt(i);let u=null,f=null;if(e.hasSecondYAxis){const n=o.find((t=>t.hasOwnYAxis)),i={yMin:t.yMinMinimapSecond,yMax:t.yMaxMinimapSecond};u=kt(e,[n],a,l,i)[0],f=d.copy(i)}const m=K(c.reduce(((t,e)=>t+e.length),0))*Z;Lt(s,t,e,a,c,d,u,f,S,l,n,!0,m)}(h))},toggle:function(t){i.classList.toggle("lovely-chart--state-hidden",!t),requestAnimationFrame((()=>{i.classList.toggle("lovely-chart--state-transparent",!t)}))}}}(o,I,V,H),p=Tt(o,I,u,V,N,z),g=function(t,e,n){let o;function a(){o=et(),o.className="lovely-chart--tools",e.datasets.length<2&&(o.className+=" lovely-chart--state-hidden"),e.datasets.forEach((({key:t,name:n})=>{const a=et("a");a.href="#",a.dataset.key=t,a.className=`lovely-chart--button lovely-chart--color-${e.colors[t].slice(1)} lovely-chart--state-checked`,a.innerHTML=`<span class="lovely-chart--button-check"></span><span class="lovely-chart--button-label">${n}</span>`,a.addEventListener("click",(t=>{t.preventDefault(),a.dataset.clickPrevented||i(a),delete a.dataset.clickPrevented})),Ft(a,{onLongPress:()=>{a.dataset.clickPrevented="true",i(a,!0)}}),o.appendChild(a)})),t.appendChild(o)}function i(t,e=!1){const a=Array.from(o.getElementsByTagName("a")),i=1===o.querySelectorAll(".lovely-chart--state-checked").length;t&&(t.classList.contains("lovely-chart--state-checked")&&i?e?(a.forEach((t=>t.classList.add("lovely-chart--state-checked"))),t.classList.remove("lovely-chart--state-checked")):(t.classList.remove("lovely-chart--state-shake"),requestAnimationFrame((()=>{t.classList.add("lovely-chart--state-shake")}))):e?(a.forEach((t=>t.classList.remove("lovely-chart--state-checked"))),t.classList.add("lovely-chart--state-checked")):t.classList.toggle("lovely-chart--state-checked"));const l={};a.forEach((t=>{l[t.dataset.key]=t.classList.contains("lovely-chart--state-checked")})),n(l)}return a(),i(),{redraw:function(){if(o){const t=o;t.classList.add("lovely-chart--state-hidden"),setTimeout((()=>{t.parentNode.removeChild(t)}),500)}a(),o.classList.add("lovely-chart--state-transparent"),requestAnimationFrame((()=>{o.classList.remove("lovely-chart--state-transparent")}))}}}(o,I,X),v=I.isZoomable&&function(t,e,n,o,a,i,l,s,r){let c,d,u=!1;function h(e,h,f){if(!e)return s.toggleLoading(!1),s.toggleIsZoomed(!1),void i.toggleIsZooming(!1);s.toggleLoading(!1);const m=1/t.xLabels.length,p=h/(t.xLabels.length-1),y={};t.datasets.forEach((({key:t})=>y[t]=!1));const g=At(e,u||t.shouldZoomToPie),v=Object.keys(t.datasets).length!==Object.keys(g.datasets).length;o.update({range:{begin:p-m/2,end:p+m/2},filter:y}),setTimeout((()=>{Object.assign(t,g),v&&e.colors&&Object.assign(n,pt(e.colors)),v&&(l.toggle(u),r.redraw(),a.style.width=`${a.scrollWidth}px`,a.style.height=`${a.scrollHeight}px`),o.update({range:{begin:P-A,end:P+A},focusOn:null},!0);const s=1/(u||t.shouldZoomToPie?t.xLabels.length:t.xLabels.length/24)/2;let h,m;u?(h={begin:c.begin,end:c.end},m=v?c.filter:d.filter):v?(h={begin:0,end:1},m={},t.datasets.forEach((({key:t})=>m[t]=!0))):(h=t.shouldZoomToPie?{begin:P-s,end:P+s}:g.minimapRange,m=c.filter),o.update({range:h,filter:m,minimapDelta:u?null:h.end-h.begin}),f&&i.zoom(rt(f)),u=!u,i.toggleIsZooming(!1)}),o.hasAnimations()?T:0),setTimeout((()=>{t.shouldZoomToPie&&a.classList.remove("lovely-chart--state-animating")}),o.hasAnimations()?1e3:0)}return{zoomIn:function(n,o){if(u)return;const l=t.xLabels[o];c=n,i.toggleIsZooming(!0),s.toggleLoading(!0),s.toggleIsZoomed(!0),t.shouldZoomToPie&&(a.classList.add("lovely-chart--state-zoomed-in"),a.classList.add("lovely-chart--state-animating"));const{value:r}=l;(t.shouldZoomToPie?Promise.resolve(function(t){return Object.assign({},e,{type:"pie",labels:e.labels.slice(t-3,t+4),datasets:e.datasets.map((e=>({...e,values:e.values.slice(t-3,t+4)})))})}(o)):t.onZoom(r)).then((t=>h(t,o,l)))},zoomOut:function(n){if(!u)return;d=n,i.toggleIsZooming(!0),s.toggleLoading(!0),s.toggleIsZoomed(!1),t.shouldZoomToPie&&(a.classList.remove("lovely-chart--state-zoomed-in"),a.classList.add("lovely-chart--state-animating"));const o=Math.round((n.labelFromIndex+n.labelToIndex)/2);h(e,o)},isZoomed:function(){return u}}}(I,e,V,n,o,h,m,p,g)}function W(t){b=t;const{datasets:e}=I,n={from:t.labelFromIndex,to:t.labelToIndex},o={begin:t.begin,end:t.end,totalXWidth:t.totalXWidth,yMin:t.yMinViewport,yMax:t.yMaxViewport,availableWidth:u.width,availableHeight:u.height-x,xPadding:s,yPadding:c},a=e.map((({key:e})=>t[`opacity#${e}`])),r=kt(I,e,n,a,o),y=xt(o);let g=null,M=null;if(I.hasSecondYAxis){const o=e.find((t=>t.hasOwnYAxis)),i={yMin:t.yMinViewportSecond,yMax:t.yMaxViewportSecond};g=kt(I,[o],n,a,i)[0],M=y.copy(i)}I.hideCaption||h.setCaption(function(t){let e,n;return v&&v.isZoomed()?(e=0===t.labelFromIndex?0:t.labelFromIndex+1,n=t.labelToIndex===t.totalXWidth-1?t.labelToIndex:t.labelToIndex-1):(e=t.labelFromIndex,n=t.labelToIndex),o=I.xLabels[e],a=I.xLabels[n],Math.abs(a.value-o.value)>C?`${ct(I.xLabels[e])}${ct(I.xLabels[n])}`:rt(I.xLabels[e]);var o,a}(t)),wt(i,l);const w=K(r.reduce(((t,e)=>t+e.length),0))*D;Lt(l,t,I,n,r,y,g,M,d,a,V,!1,w),I.isPie||(f.drawYAxis(t,y,M),f.drawXAxis(t,y)),m.update(t),p.update(t,r,y,g,M)}function H(t){n.update({range:t})}function X(t){n.update({filter:t})}function z(t){(I.isBars||I.isPie||I.isSteps)&&n.update({focusOn:t})}function N(t){v.zoomIn(b,t)}function j(){v.zoomOut(b)}E(),document.documentElement.addEventListener("darkmode",(()=>{n.update()})),window.addEventListener("resize",(()=>{window.innerWidth!==$&&($=window.innerWidth,O())})),window.addEventListener("orientationchange",(()=>{O()}))}}}]);
//# sourceMappingURL=8878.6a2ae99baac761093038.js.map