Socket
Socket
Sign inDemoInstall

@d3fc/d3fc-series

Package Overview
Dependencies
Maintainers
3
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@d3fc/d3fc-series - npm Package Compare versions

Comparing version 4.3.2 to 4.3.3

50

build/d3fc-series.min.js

@@ -1,2 +0,2 @@

(function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports,require("d3-shape"),require("d3-selection"),require("d3-scale"),require("d3-path"),require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-shape","d3-selection","d3-scale","d3-path","d3-array"],a):(e=e||self,a(e.fc=e.fc||{},e.d3,e.d3,e.d3,e.d3,e.d3))})(this,function(e,a,t,n,l,r){'use strict';var g=Math.max,f=Math.min,p=Math.abs;function o(){var e=arguments;return function(a,t){for(var n=0,l=e.length;n<l;n++)if(null==e[n](a,t))return!1;return!0}}function h(e){return c(e)||s(e)||u()}function c(e){if(Array.isArray(e)){for(var a=0,t=Array(e.length);a<e.length;a++)t[a]=e[a];return t}}function s(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var m="default"in a?a["default"]:a,y="default"in n?n["default"]:n;const v=1e-6;var x=(e,a)=>{e=e||"g";let t=(e,a)=>a,n=null;const l=function(l,i){i=i||(e=>e);const d=l.selection?l:null;d&&(l=l.selection());const r=l.selectAll((e,a,t)=>Array.from(t[a].childNodes).filter(e=>1===e.nodeType)).filter(null==a?e:`${e}.${a}`);let o=r.data(i,t);const h=o.enter().append(e).attr("class",a);let c=o.exit();o=o.merge(h);const s=d||n;return s&&(o=o.transition(s).style("opacity",1),h.style("opacity",v),c=c.transition(s).style("opacity",v)),c.remove(),o.enter=()=>h,o.exit=()=>c,o};return l.element=(...a)=>a.length?(e=a[0],l):e,l.className=(...e)=>e.length?(a=e[0],l):a,l.key=(...e)=>e.length?(t=e[0],l):t,l.transition=(...e)=>e.length?(n=e[0],l):n,l},S=(e,a,t)=>{const n=a[t];if("function"!=typeof n)throw new Error(`Attempt to rebind ${t} which isn't a function on the source object`);return(...t)=>{var l=n.apply(a,t);return l===a?e:l}},b=(e,a,...t)=>{for(const n of t)e[n]=S(e,a,n);return e};const w=e=>a=>e.reduce((e,a)=>e&&a(e),a);var V=(e,a,...t)=>{const n=w(t);for(const l of Object.keys(a)){const t=n(l);t&&(e[t]=S(e,a,l))}return e},T=e=>e.map(e=>"string"==typeof e?new RegExp(`^${e}$`):e),E=(...e)=>(e=T(e),a=>e.every(e=>!e.test(a))&&a),P=e=>a=>e[a],k=function(e){return"function"==typeof e?e:function(){return e}},B=function(e,a){return"left"===e?a/2:"right"===e?-a/2:0},A=function(e){var a=Object.assign({},e),t=function(){};return Object.keys(a).forEach(function(e){t[e]=function(){return arguments.length?(a[e]=0>=arguments.length?void 0:arguments[0],t):a[e]}}),t},I=function(){var e=function(){return 0},a=function(e){return e.x},t=function(e){return e.y},l="center",r=function(){return 5},h="vertical",c=A({decorate:function(){},defined:function(n,l){return o(e,a,t)(n,l)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return c.values=function(n,d){var i=r(n,d),o=B(l,i),s=c.xScale(),u=c.yScale();if("vertical"===h){var g=u(t(n,d),d),f=u(e(n,d),d),p=s(a(n,d),d)+o;return{d:n,x:p,y:g,y0:f,width:i,height:g-f,origin:[p,g],baseOrigin:[p,f],transposedX:p,transposedY:g}}var m=s(t(n,d),d),y=s(e(n,d),d),v=u(a(n,d),d)+o;return{d:n,x:v,y:m,y0:y,width:i,height:m-y,origin:[m,v],baseOrigin:[y,v],transposedX:m,transposedY:v}},c.xValues=function(){return"vertical"===h?[a]:[e,t]},c.yValues=function(){return"vertical"===h?[e,t]:[a]},c.baseValue=function(){return arguments.length?(e=k(0>=arguments.length?void 0:arguments[0]),c):e},c.crossValue=function(){return arguments.length?(a=k(0>=arguments.length?void 0:arguments[0]),c):a},c.mainValue=function(){return arguments.length?(t=k(0>=arguments.length?void 0:arguments[0]),c):t},c.bandwidth=function(){return arguments.length?(r=k(0>=arguments.length?void 0:arguments[0]),c):r},c.align=function(){return arguments.length?(l=0>=arguments.length?void 0:arguments[0],c):l},c.orient=function(){return arguments.length?(h=0>=arguments.length?void 0:arguments[0],c):h},c},C={red:"#c60",green:"#6c0",black:"#000",gray:"#ddd",darkGray:"#999"},H=function(){var e=I(),n=a.line().x(function(a,t){return e.values(a,t).transposedX}).y(function(a,t){return e.values(a,t).transposedY}),l=x("path","line"),i=function(a){a.selection&&l.transition(a),n.defined(e.defined()),a.each(function(a,i,d){var r=l(t.select(d[i]),[a]);r.enter().attr("fill","none").attr("stroke",C.black),r.attr("d",n),e.decorate()(r,a,i)})};return V(i,e,E("baseValue","bandwidth","align")),b(i,l,"key"),b(i,n,"curve"),i},L=function(){var e=I(),t=a.line().x(function(a,t){return e.values(a,t).transposedX}).y(function(a,t){return e.values(a,t).transposedY}),n=function(a){var n=t.context();n.beginPath(),t.defined(e.defined())(a),n.strokeStyle=C.black,n.fillStyle="transparent",e.decorate()(n,a),n.fill(),n.stroke(),n.closePath()};return V(n,e,E("baseValue","bandwidth","align")),b(n,t,"curve","context"),n},Q=()=>{const e={},a={},t=(t,n,l,i)=>{Object.keys(e).forEach(a=>{e[a](t,n,a,l,i)}),Object.keys(a).forEach(e=>{a[e](t,n,e)})};return t.attribute=(...a)=>1===a.length?e[a[0]]:(e[a[0]]=a[1],t),t.uniform=(...e)=>1===e.length?a[e[0]]:(a[e[0]]=e[1],t),t};const R={FLOAT:5126};var W=()=>{let e=null,a=1,t=R.FLOAT,n=!1,l=0,i=0;const d=(a,t,n)=>{null==e&&(e=a.createBuffer()),a.bindBuffer(a.ARRAY_BUFFER,e);const l=a.getAttribLocation(t,n);a.vertexAttribPointer(l,d.size(),d.type(),d.normalized(),d.stride(),d.offset()),a.enableVertexAttribArray(l)};return d.buffer=(...a)=>a.length?(e=a[0],d):e,d.size=(...e)=>e.length?(a=e[0],d):a,d.type=(...e)=>e.length?(t=e[0],d):t,d.normalized=(...e)=>e.length?(n=e[0],d):n,d.stride=(...e)=>e.length?(l=e[0],d):l,d.offset=(...e)=>e.length?(i=e[0],d):i,d},z=()=>{const e=W();let a=(e,a,t,n,l)=>e[l],t=null,n=0;const l=(n,l)=>{const i=e.size(),d=e.offset(),r=new Float32Array(d+n*l*i);let o=0;for(let e=0;e<n;e++)for(let n=0;n<l;n++)for(let l=0;l<i;l++)r[d+o++]=a(t,e,n,l,o);return r},i=(a,t,i,d,r)=>{if(!(n>=r)){const o=l(r,d);e(a,t,i),a.bindBuffer(a.ARRAY_BUFFER,e.buffer()),a.bufferData(a.ARRAY_BUFFER,o,a.DYNAMIC_DRAW),n=r}};return i.value=(...e)=>e.length?(a=e[0],n=0,i):a,i.data=(...e)=>e.length?(t=e[0],n=0,i):t,V(i,e,E("buffer")),i},N=e=>{let a=e,t=!0,n=(e,t,n)=>{const l=e.getUniformLocation(t,n);if(a instanceof Array)switch(a.length){case 1:e.uniform1fv(l,a);break;case 2:e.uniform2fv(l,a);break;case 3:e.uniform3fv(l,a);break;case 4:e.uniform4fv(l,a);break;default:throw new Error(`Uniform supports up to 4 elements. ${a.length} provided.`);}else e.uniform1f(l,a)};const l=(e,a,l)=>{t&&(t=!1,n(e,a,l))};return l.bind=(...e)=>e.length?(n=e[0],l):n,l.data=(...e)=>e.length?(a=e[0],t=!0,l):a,l},Y=e=>{function a(e,a){e.push(a)}function t(e,a,t){const n=e.indexOf(t);e.splice(0<=n?n:e.length,0,a)}function n(e,a){const t=e.indexOf(a);-1===t&&e.push(a)}const l=[],i=[],d=()=>e(l.join("\n"),i.join("\n"));return d.appendHeader=e=>(a(l,e),d),d.insertHeader=(e,a)=>(t(l,e,a),d),d.appendHeaderIfNotExists=e=>(n(l,e),d),d.appendBody=e=>(a(i,e),d),d.insertBody=(e,a)=>(t(i,e,a),d),d.appendBodyIfNotExists=e=>(n(i,e),d),d};const G=(e,a)=>`
(function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports,require("d3-shape"),require("d3-selection"),require("d3-scale"),require("d3-path"),require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-shape","d3-selection","d3-scale","d3-path","d3-array"],a):(e=e||self,a(e.fc=e.fc||{},e.d3,e.d3,e.d3,e.d3,e.d3))})(this,function(e,a,t,n,l,r){'use strict';var g=Math.max,f=Math.min,p=Math.abs;function o(){var e=arguments;return function(a,t){for(var n=0,l=e.length;n<l;n++)if(null==e[n](a,t))return!1;return!0}}function h(e){return c(e)||s(e)||u()}function c(e){if(Array.isArray(e)){for(var a=0,t=Array(e.length);a<e.length;a++)t[a]=e[a];return t}}function s(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var y="default"in a?a["default"]:a,m="default"in n?n["default"]:n;const v=1e-6;var x=(e,a)=>{e=e||"g";let t=(e,a)=>a,n=null;const l=function(l,i){i=i||(e=>e);const d=l.selection?l:null;d&&(l=l.selection());const r=l.selectAll((e,a,t)=>Array.from(t[a].childNodes).filter(e=>1===e.nodeType)).filter(null==a?e:`${e}.${a}`);let o=r.data(i,t);const h=o.enter().append(e).attr("class",a);let c=o.exit();o=o.merge(h);const s=d||n;return s&&(o=o.transition(s).style("opacity",1),h.style("opacity",v),c=c.transition(s).style("opacity",v)),c.remove(),o.enter=()=>h,o.exit=()=>c,o};return l.element=(...a)=>a.length?(e=a[0],l):e,l.className=(...e)=>e.length?(a=e[0],l):a,l.key=(...e)=>e.length?(t=e[0],l):t,l.transition=(...e)=>e.length?(n=e[0],l):n,l},S=(e,a,t)=>{const n=a[t];if("function"!=typeof n)throw new Error(`Attempt to rebind ${t} which isn't a function on the source object`);return(...t)=>{var l=n.apply(a,t);return l===a?e:l}},b=(e,a,...t)=>{for(const n of t)e[n]=S(e,a,n);return e};const w=e=>a=>e.reduce((e,a)=>e&&a(e),a);var V=(e,a,...t)=>{const n=w(t);for(const l of Object.keys(a)){const t=n(l);t&&(e[t]=S(e,a,l))}return e},T=e=>e.map(e=>"string"==typeof e?new RegExp(`^${e}$`):e),E=(...e)=>(e=T(e),a=>e.every(e=>!e.test(a))&&a),P=e=>a=>e[a],k=function(e){return"function"==typeof e?e:function(){return e}},B=function(e,a){return"left"===e?a/2:"right"===e?-a/2:0},A=function(e){var a=Object.assign({},e),t=function(){};return Object.keys(a).forEach(function(e){t[e]=function(){return arguments.length?(a[e]=0>=arguments.length?void 0:arguments[0],t):a[e]}}),t},I=function(){var e=function(){return 0},a=function(e){return e.x},t=function(e){return e.y},l="center",r=function(){return 5},h="vertical",c=A({decorate:function(){},defined:function(n,l){return o(e,a,t)(n,l)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return c.values=function(n,d){var i=r(n,d),o=B(l,i),s=c.xScale(),u=c.yScale();if("vertical"===h){var g=u(t(n,d),d),f=u(e(n,d),d),p=s(a(n,d),d)+o;return{d:n,x:p,y:g,y0:f,width:i,height:g-f,origin:[p,g],baseOrigin:[p,f],transposedX:p,transposedY:g}}var y=s(t(n,d),d),m=s(e(n,d),d),v=u(a(n,d),d)+o;return{d:n,x:v,y:y,y0:m,width:i,height:y-m,origin:[y,v],baseOrigin:[m,v],transposedX:y,transposedY:v}},c.xValues=function(){return"vertical"===h?[a]:[e,t]},c.yValues=function(){return"vertical"===h?[e,t]:[a]},c.baseValue=function(){return arguments.length?(e=k(0>=arguments.length?void 0:arguments[0]),c):e},c.crossValue=function(){return arguments.length?(a=k(0>=arguments.length?void 0:arguments[0]),c):a},c.mainValue=function(){return arguments.length?(t=k(0>=arguments.length?void 0:arguments[0]),c):t},c.bandwidth=function(){return arguments.length?(r=k(0>=arguments.length?void 0:arguments[0]),c):r},c.align=function(){return arguments.length?(l=0>=arguments.length?void 0:arguments[0],c):l},c.orient=function(){return arguments.length?(h=0>=arguments.length?void 0:arguments[0],c):h},c},C={red:"#c60",green:"#6c0",black:"#000",gray:"#ddd",darkGray:"#999"},H=function(){var e=I(),n=a.line().x(function(a,t){return e.values(a,t).transposedX}).y(function(a,t){return e.values(a,t).transposedY}),l=x("path","line"),i=function(a){a.selection&&l.transition(a),n.defined(e.defined()),a.each(function(a,i,d){var r=l(t.select(d[i]),[a]);r.enter().attr("fill","none").attr("stroke",C.black),r.attr("d",n),e.decorate()(r,a,i)})};return V(i,e,E("baseValue","bandwidth","align")),b(i,l,"key"),b(i,n,"curve"),i},L=function(){var e=I(),t=a.line().x(function(a,t){return e.values(a,t).transposedX}).y(function(a,t){return e.values(a,t).transposedY}),n=function(a){var n=t.context();n.beginPath(),t.defined(e.defined())(a),n.strokeStyle=C.black,n.fillStyle="transparent",e.decorate()(n,a),n.fill(),n.stroke(),n.closePath()};return V(n,e,E("baseValue","bandwidth","align")),b(n,t,"curve","context"),n},Q=()=>{const e={},a={},t=(t,n,l,i)=>{Object.keys(e).forEach(a=>{e[a](t,n,a,l,i)}),Object.keys(a).forEach(e=>{a[e](t,n,e)})};return t.attribute=(...a)=>1===a.length?e[a[0]]:(e[a[0]]=a[1],t),t.uniform=(...e)=>1===e.length?a[e[0]]:(a[e[0]]=e[1],t),t};const R={FLOAT:5126};var W=()=>{let e=null,a=1,t=R.FLOAT,n=!1,l=0,i=0;const d=(a,t,n)=>{null==e&&(e=a.createBuffer()),a.bindBuffer(a.ARRAY_BUFFER,e);const l=a.getAttribLocation(t,n);a.vertexAttribPointer(l,d.size(),d.type(),d.normalized(),d.stride(),d.offset()),a.enableVertexAttribArray(l)};return d.buffer=(...a)=>a.length?(e=a[0],d):e,d.size=(...e)=>e.length?(a=e[0],d):a,d.type=(...e)=>e.length?(t=e[0],d):t,d.normalized=(...e)=>e.length?(n=e[0],d):n,d.stride=(...e)=>e.length?(l=e[0],d):l,d.offset=(...e)=>e.length?(i=e[0],d):i,d},z=()=>{const e=W();let a=(e,a,t,n,l)=>e[l],t=null,n=0;const l=(n,l)=>{const i=e.size(),d=e.offset(),r=new Float32Array(d+n*l*i);let o=0;for(let e=0;e<n;e++)for(let n=0;n<l;n++)for(let l=0;l<i;l++)r[d+o++]=a(t,e,n,l,o);return r},i=(a,t,i,d,r)=>{if(!(n>=r)){const o=l(r,d);e(a,t,i),a.bindBuffer(a.ARRAY_BUFFER,e.buffer()),a.bufferData(a.ARRAY_BUFFER,o,a.DYNAMIC_DRAW),n=r}};return i.value=(...e)=>e.length?(a=e[0],n=0,i):a,i.data=(...e)=>e.length?(t=e[0],n=0,i):t,V(i,e,E("buffer")),i},N=e=>{let a=e,t=!0,n=(e,t,n)=>{const l=e.getUniformLocation(t,n);if(a instanceof Array)switch(a.length){case 1:e.uniform1fv(l,a);break;case 2:e.uniform2fv(l,a);break;case 3:e.uniform3fv(l,a);break;case 4:e.uniform4fv(l,a);break;default:throw new Error(`Uniform supports up to 4 elements. ${a.length} provided.`);}else e.uniform1f(l,a)};const l=(e,a,l)=>{t&&(t=!1,n(e,a,l))};return l.bind=(...e)=>e.length?(n=e[0],l):n,l.data=(...e)=>e.length?(a=e[0],t=!0,l):a,l},Y=e=>{function a(e,a){e.push(a)}function t(e,a,t){const n=e.indexOf(t);e.splice(0<=n?n:e.length,0,a)}function n(e,a){const t=e.indexOf(a);-1===t&&e.push(a)}const l=[],i=[],d=()=>e(l.join("\n"),i.join("\n"));return d.appendHeader=e=>(a(l,e),d),d.insertHeader=(e,a)=>(t(l,e,a),d),d.appendHeaderIfNotExists=e=>(n(l,e),d),d.appendBody=e=>(a(i,e),d),d.insertBody=(e,a)=>(t(i,e,a),d),d.appendBodyIfNotExists=e=>(n(i,e),d),d};const G=(e,a)=>`
precision mediump float;

@@ -16,3 +16,3 @@ float inf = 1.0 / 0.0;

Fragment Shader : ${a}`)}return d}function t(e,a){const t=n.createShader(a);if(n.shaderSource(t,e),n.compileShader(t),!n.getShaderParameter(t,n.COMPILE_STATUS)){const a=n.getShaderInfoLog(t);throw n.deleteShader(t),new Error(`Failed to compile shader : ${a}
Shader : ${e}`)}return t}let n=null,l=null,i=null,d=null,r=D.TRIANGLES,o=Q(),h=1;const c=t=>{const c=i(),s=d();e(l,c,s)&&(n.isProgram(l)&&n.deleteProgram(l),l=a(c,s)),n.useProgram(l),o.uniform("uScreen",N([n.canvas.width,n.canvas.height])),o(n,l,h,t),n.drawArrays(r,0,t*h)};return c.context=(...e)=>e.length?(n=e[0],c):n,c.buffers=(...e)=>e.length?(o=e[0],c):o,c.vertexShader=(...e)=>e.length?(i=e[0],c):i,c.fragmentShader=(...e)=>e.length?(d=e[0],c):d,c.mode=(...e)=>e.length?(r=e[0],c):r,c.verticesPerElement=(...e)=>e.length?(h=e[0],c):h,c},_=()=>{let e=[0,1],a=[-1,1],t=0;const n=()=>{};return n.domain=(...a)=>a.length?(e=a[0],n):e,n.range=(...e)=>e.length?(a=e[0],n):a,n.coordinate=(...e)=>e.length?(t=e[0],n):t,n},F=()=>{function e(e){e.vertexShader().appendHeader(`uniform vec4 ${t()}Offset;`).appendHeader(`uniform vec4 ${t()}Scale;`),n.scaleComponent(e,"gl_Position")}const a=_(),t=()=>`linear${a.coordinate()}`,n=n=>{e(n);const l=a.domain()[1]-a.domain()[0],i=a.range()[1]-a.range()[0],d=a.range()[0]*(l/i)-a.domain()[0],r=[0,0,0,0],o=[1,1,1,1];r[a.coordinate()]=d,o[a.coordinate()]=i/l,n.buffers().uniform(`${t()}Offset`,N(r)).uniform(`${t()}Scale`,N(o))};return n.scaleComponent=(e,a)=>(e.vertexShader().appendBody(`${a} = ${a} + ${t()}Offset;`).appendBody(`${a} = ${a} * ${t()}Scale;`),n),V(n,a),n},M=()=>{function e(e,a){var t=Math.log10;return t(e)/t(a)}function a(e){e.vertexShader().appendHeader(`uniform vec4 ${l()}Offset;`).appendHeader(`uniform vec4 ${l()}Scale;`).appendHeader(`uniform vec4 ${l()}Include;`).appendHeader(`uniform float ${l()}Base;`),i.scaleComponent(e,"gl_Position")}const t=_();let n=10;const l=()=>`log${t.coordinate()}`,i=i=>{a(i);const d=e(t.domain()[1],n)-e(t.domain()[0],n),r=t.range()[1]-t.range()[0],o=r/d,h=t.range()[0]-o*e(t.domain()[0],n),c=[0,0,0,0],s=[0,0,0,0],u=[0,0,0,0];c[t.coordinate()]=h,s[t.coordinate()]=o,u[t.coordinate()]=1,i.buffers().uniform(`${l()}Offset`,N(c)).uniform(`${l()}Scale`,N(s)).uniform(`${l()}Include`,N(u)).uniform(`${l()}Base`,N(n))};return i.scaleComponent=(e,a)=>{const t=`${l()}Offset + (${l()}Scale * clamp(log(${a}) / log(${l()}Base), -inf, inf))`;return e.vertexShader().appendBody(`${a} = (${l()}Include * (${t})) + ((1.0 - ${l()}Include) * ${a});`),i},i.base=(...e)=>e.length?(n=e[0],i):n,V(i,t),i},U=()=>{function e(a,t){var e=Math.pow,n=Math.sign;return n(a)*e(p(a),t)}function a(e){e.vertexShader().appendHeader(`uniform vec4 ${l()}Offset;`).appendHeader(`uniform vec4 ${l()}Scale;`).appendHeader(`uniform vec4 ${l()}Include;`).appendHeader(`uniform float ${l()}Exp;`),i.scaleComponent(e,"gl_Position")}const t=_();let n=1;const l=()=>`pow${t.coordinate()}`,i=i=>{a(i);const d=e(t.domain()[1],n)-e(t.domain()[0],n),r=t.range()[1]-t.range()[0],o=r/d,h=t.range()[0]-o*e(t.domain()[0],n),c=[0,0,0,0],s=[0,0,0,0],u=[0,0,0,0];c[t.coordinate()]=h,s[t.coordinate()]=o,u[t.coordinate()]=1,i.buffers().uniform(`${l()}Offset`,N(c)).uniform(`${l()}Scale`,N(s)).uniform(`${l()}Include`,N(u)).uniform(`${l()}Exp`,N(n))};return i.scaleComponent=(e,a)=>{const t=`${l()}Offset + (${l()}Scale * sign(${a}) * pow(abs(gl_Position), vec4(${l()}Exp)))`;return e.vertexShader().appendBody(`${a} = (${l()}Include * (${t})) + ((1.0 - ${l()}Include) * ${a});`),i},i.exponent=(...e)=>e.length?(n=e[0],i):n,V(i,t),i},j=e=>{let a=y.scaleIdentity(),t=null;const n=e.copy.toString();return n===y.scaleLinear().copy.toString()?t=F().domain(e.domain()):n===y.scaleLog().copy.toString()?t=M().domain(e.domain()).base(e.base()):n===y.scalePow().copy.toString()?t=U().domain(e.domain()).exponent(e.exponent()):n===y.scaleTime().copy.toString()?t=F().domain(e.domain()):(t=F().domain(e.range()),a=e),{scale:a,glScale:t}};const q={header:`attribute float aXValue;
Shader : ${e}`)}return t}let n=null,l=null,i=null,d=null,r=D.TRIANGLES,o=Q(),h=1;const c=t=>{const c=i(),s=d();e(l,c,s)&&(n.isProgram(l)&&n.deleteProgram(l),l=a(c,s)),n.useProgram(l),o.uniform("uScreen",N([n.canvas.width,n.canvas.height])),o(n,l,h,t),n.drawArrays(r,0,t*h)};return c.context=(...e)=>e.length?(n=e[0],c):n,c.buffers=(...e)=>e.length?(o=e[0],c):o,c.vertexShader=(...e)=>e.length?(i=e[0],c):i,c.fragmentShader=(...e)=>e.length?(d=e[0],c):d,c.mode=(...e)=>e.length?(r=e[0],c):r,c.verticesPerElement=(...e)=>e.length?(h=e[0],c):h,c},_=()=>{let e=[0,1],a=[-1,1],t=0;const n=()=>{};return n.domain=(...a)=>a.length?(e=a[0],n):e,n.range=(...e)=>e.length?(a=e[0],n):a,n.coordinate=(...e)=>e.length?(t=e[0],n):t,n},F=()=>{function e(e){e.vertexShader().appendHeader(`uniform vec4 ${t()}Offset;`).appendHeader(`uniform vec4 ${t()}Scale;`),n.scaleComponent(e,"gl_Position")}const a=_(),t=()=>`linear${a.coordinate()}`,n=n=>{e(n);const l=a.domain()[1]-a.domain()[0],i=a.range()[1]-a.range()[0],d=a.range()[0]*(l/i)-a.domain()[0],r=[0,0,0,0],o=[1,1,1,1];r[a.coordinate()]=d,o[a.coordinate()]=i/l,n.buffers().uniform(`${t()}Offset`,N(r)).uniform(`${t()}Scale`,N(o))};return n.scaleComponent=(e,a)=>(e.vertexShader().appendBody(`${a} = ${a} + ${t()}Offset;`).appendBody(`${a} = ${a} * ${t()}Scale;`),n),V(n,a),n},M=()=>{function e(e,a){var t=Math.log10;return t(e)/t(a)}function a(e){e.vertexShader().appendHeader(`uniform vec4 ${l()}Offset;`).appendHeader(`uniform vec4 ${l()}Scale;`).appendHeader(`uniform vec4 ${l()}Include;`).appendHeader(`uniform float ${l()}Base;`),i.scaleComponent(e,"gl_Position")}const t=_();let n=10;const l=()=>`log${t.coordinate()}`,i=i=>{a(i);const d=e(t.domain()[1],n)-e(t.domain()[0],n),r=t.range()[1]-t.range()[0],o=r/d,h=t.range()[0]-o*e(t.domain()[0],n),c=[0,0,0,0],s=[0,0,0,0],u=[0,0,0,0];c[t.coordinate()]=h,s[t.coordinate()]=o,u[t.coordinate()]=1,i.buffers().uniform(`${l()}Offset`,N(c)).uniform(`${l()}Scale`,N(s)).uniform(`${l()}Include`,N(u)).uniform(`${l()}Base`,N(n))};return i.scaleComponent=(e,a)=>{const t=`${l()}Offset + (${l()}Scale * clamp(log(${a}) / log(${l()}Base), -inf, inf))`;return e.vertexShader().appendBody(`${a} = (${l()}Include * (${t})) + ((1.0 - ${l()}Include) * ${a});`),i},i.base=(...e)=>e.length?(n=e[0],i):n,V(i,t),i},U=()=>{function e(a,t){var e=Math.pow,n=Math.sign;return n(a)*e(p(a),t)}function a(e){e.vertexShader().appendHeader(`uniform vec4 ${l()}Offset;`).appendHeader(`uniform vec4 ${l()}Scale;`).appendHeader(`uniform vec4 ${l()}Include;`).appendHeader(`uniform float ${l()}Exp;`),i.scaleComponent(e,"gl_Position")}const t=_();let n=1;const l=()=>`pow${t.coordinate()}`,i=i=>{a(i);const d=e(t.domain()[1],n)-e(t.domain()[0],n),r=t.range()[1]-t.range()[0],o=r/d,h=t.range()[0]-o*e(t.domain()[0],n),c=[0,0,0,0],s=[0,0,0,0],u=[0,0,0,0];c[t.coordinate()]=h,s[t.coordinate()]=o,u[t.coordinate()]=1,i.buffers().uniform(`${l()}Offset`,N(c)).uniform(`${l()}Scale`,N(s)).uniform(`${l()}Include`,N(u)).uniform(`${l()}Exp`,N(n))};return i.scaleComponent=(e,a)=>{const t=`${l()}Offset + (${l()}Scale * sign(${a}) * pow(abs(gl_Position), vec4(${l()}Exp)))`;return e.vertexShader().appendBody(`${a} = (${l()}Include * (${t})) + ((1.0 - ${l()}Include) * ${a});`),i},i.exponent=(...e)=>e.length?(n=e[0],i):n,V(i,t),i},j=e=>{let a=m.scaleIdentity(),t=null;const n=e.copy.toString();return n===m.scaleLinear().copy.toString()?t=F().domain(e.domain()):n===m.scaleLog().copy.toString()?t=M().domain(e.domain()).base(e.base()):n===m.scalePow().copy.toString()?t=U().domain(e.domain()).exponent(e.exponent()):n===m.scaleTime().copy.toString()?t=F().domain(e.domain()):(t=F().domain(e.range()),a=e),{scale:a,glScale:t}};const q={header:`attribute float aXValue;
attribute float aYValue;

@@ -72,2 +72,11 @@ attribute float aSize;

gl_Position = vec4(aXValue, yValue, 0, 1);`},ee={header:`attribute float aXValue;
attribute float aYValue;
attribute float aXDirection;
attribute float aYDirection;
attribute float aBandwidth;
attribute float aColorIndicator;
varying float vColorIndicator;
uniform vec2 uScreen;
uniform float uLineWidth;`,body:`vColorIndicator = aColorIndicator;
gl_Position = vec4(aXValue, aYValue, 0, 1);`},ae={header:`attribute float aXValue;
attribute float aYValue;

@@ -78,3 +87,3 @@ attribute float aWidthValue;

vec4 width = vec4(aWidthValue, 0.0, 0.0, 0.0);
gl_Position.x += (width.x - origin.x) / 2.0 * aDirection;`},ae={header:`uniform float uLineWidth; // defines the width of the line
gl_Position.x += (width.x - origin.x) / 2.0 * aDirection;`},te={header:`uniform float uLineWidth; // defines the width of the line
uniform vec2 uScreen; // the screen space canvas size (for normalizing vectors)

@@ -90,3 +99,3 @@ attribute vec2 aCorner; // defines which vertex in the line join we are considering

vec4 next = vec4(aNextXValue, aNextYValue, 0, 0);
vec4 prev = vec4(aPrevXValue, aPrevYValue, 0, 0);`},te={body:`if (all(equal(gl_Position.xy, prev.xy))) {
vec4 prev = vec4(aPrevXValue, aPrevYValue, 0, 0);`},ne={body:`if (all(equal(gl_Position.xy, prev.xy))) {
prev.xy = gl_Position.xy + normalize(gl_Position.xy - next.xy);

@@ -108,3 +117,3 @@ }

gl_Position.xy = gl_Position.xy + (aCorner.x * miter * uLineWidth * miterLength) / uScreen.xy;
}`},ne={header:`attribute float aXValue;
}`},le={header:`attribute float aXValue;
attribute float aHighValue;

@@ -127,3 +136,3 @@ attribute float aLowValue;

float yModifier = (uLineWidth * lineWidthYDirection);
`},le={header:`attribute float aXValue;
`},ie={header:`attribute float aXValue;
attribute float aYValue;

@@ -164,3 +173,3 @@ attribute float aXPrevValue;

gl_Position.y += (1.0 - useIntercept) * (1.0 - aCorner.y) * ((aCorner.x * aYValue) + ((1.0 - aCorner.x) * aYPrevValue));
gl_Position.y += (1.0 - useIntercept) * aCorner.y * ((aCorner.x * aY0Value) + ((1.0 - aCorner.x) * aY0PrevValue));`},ie={header:`attribute float aXValue;
gl_Position.y += (1.0 - useIntercept) * aCorner.y * ((aCorner.x * aY0Value) + ((1.0 - aCorner.x) * aY0PrevValue));`},de={header:`attribute float aXValue;
attribute float aYValue;

@@ -171,8 +180,8 @@ attribute float aXDirection;

uniform vec2 uScreen;
uniform float uLineWidth;`,body:`gl_Position = vec4(aXValue, aYValue, 0, 1);`},de={header:`varying float vSize;`,body:`float distance = length(2.0 * gl_PointCoord - 1.0);
uniform float uLineWidth;`,body:`gl_Position = vec4(aXValue, aYValue, 0, 1);`},re={header:`varying float vSize;`,body:`float distance = length(2.0 * gl_PointCoord - 1.0);
if (distance > 1.0) {
discard;
return;
}`},re={header:`varying float vSize;`,body:`vec2 pointCoordTransform = 2.0 * gl_PointCoord - 1.0;
float distance = max(abs(pointCoordTransform.x), abs(pointCoordTransform.y));`},oe={header:`varying float vSize;`,body:`vec2 pointCoordTransform = 2.0 * gl_PointCoord - 1.0;
}`},oe={header:`varying float vSize;`,body:`vec2 pointCoordTransform = 2.0 * gl_PointCoord - 1.0;
float distance = max(abs(pointCoordTransform.x), abs(pointCoordTransform.y));`},he={header:`varying float vSize;`,body:`vec2 pointCoordTransform = 2.0 * gl_PointCoord - 1.0;
float topEdgesDistance = abs(pointCoordTransform.x) - ((pointCoordTransform.y - 0.6) / sqrt(3.0));

@@ -183,3 +192,3 @@ float bottomEdgeDistance = pointCoordTransform.y + 0.5;

discard;
}`},he={header:`varying float vSize;
}`},ce={header:`varying float vSize;
varying float vStrokeWidthRatio;`,body:`vec2 pointCoordTransform = 2.0 * gl_PointCoord - 1.0;

@@ -191,22 +200,25 @@ float innerCornerDistance = min(abs(pointCoordTransform.x), abs(pointCoordTransform.y)) + 0.66 - vStrokeWidthRatio;

discard;
}`},ce={header:`varying float vColorIndicator;`,body:`gl_FragColor = vec4(0.4, 0.8, 0, 1);
}`},se={header:`varying float vColorIndicator;`,body:`gl_FragColor = vec4(0.4, 0.8, 0, 1);
if (vColorIndicator < 0.0) {
gl_FragColor = vec4(0.8, 0.4, 0, 1);
}`},se={header:`varying float vDefined;`,body:`if (vDefined < 0.5) {
}`},ue={header:`varying float vColorIndicator;`,body:`gl_FragColor = vec4(0.4, 0.8, 0, 1);
if (vColorIndicator < 0.0) {
gl_FragColor = vec4(0.8, 0.4, 0, 1);
}`},ge={header:`varying float vDefined;`,body:`if (vDefined < 0.5) {
discard;
}
gl_FragColor = vec4(0.86, 0.86, 0.86, 1);`},ue={header:`varying float vDefined;`,body:`if (vDefined < 0.5) {
gl_FragColor = vec4(0.86, 0.86, 0.86, 1);`},fe={header:`varying float vDefined;`,body:`if (vDefined < 0.5) {
discard;
}`};var ge=()=>{const e=Y(G),a=Y(X);return e.appendHeader(q.header).appendBody(q.body),a.appendHeader(de.header).appendBody(de.body),{vertex:()=>e,fragment:()=>a}},fe=()=>{const e=Y(G),a=Y(X);return e.appendHeader(K.header).appendBody(K.body),a.appendHeader(re.header).appendBody(re.body),{vertex:()=>e,fragment:()=>a}},pe=()=>{const e=Y(G),a=Y(X);return e.appendHeader(J.header).appendBody(J.body),a.appendHeader(oe.header).appendBody(oe.body),{vertex:()=>e,fragment:()=>a}},me=()=>{const e=Y(G),a=Y(X);return e.appendHeader(Z.header).appendBody(Z.body),a.appendHeader(he.header).appendBody(he.body),{vertex:()=>e,fragment:()=>a}},ye=e=>{switch(e){case m.symbolCircle:return ge();case m.symbolSquare:return fe();case m.symbolTriangle:return pe();case m.symbolCross:return me();default:throw new Error(`Unrecognised symbol: ${e}`);}},ve=()=>{let e=1;const a=a=>{a.buffers().uniform("uLineWidth",N(e))};return a.lineWidth=(...t)=>t.length?(e=t[0],a):e,a},xe=()=>{let e=_(),a=_(),t=ge(),n=()=>{};const l=z().value((e,a)=>e[a]),i=z().value((e,a)=>e[a]),d=z().value((e,a)=>e[a]),r=O().mode(D.POINTS);r.buffers().attribute("aXValue",l).attribute("aYValue",i).attribute("aSize",d);const o=l=>{r.vertexShader(t.vertex()).fragmentShader(t.fragment()),e.coordinate(0),e(r),a.coordinate(1),a(r),n(r),r(l)};return o.xValues=e=>(l.data(e),o),o.yValues=e=>(i.data(e),o),o.sizes=e=>(d.data(e),o),o.decorate=(...e)=>e.length?(n=e[0],o):n,o.xScale=(...a)=>a.length?(e=a[0],o):e,o.yScale=(...e)=>e.length?(a=e[0],o):a,o.type=(...e)=>e.length?(t=e[0],o):t,b(o,r,"context"),o},Se=()=>{const e=Y(G),a=Y(X);return e.appendHeader(ae.header).appendBody(ae.body),a.appendHeader(ue.header).appendBody(ue.body),{vertex:()=>e,fragment:()=>a}},be=()=>{let e=_(),a=_(),t=()=>{};const n=ve(),l=z().value((e,a)=>e[a]),i=z().value((e,a)=>e[f(a+1,e.length-1)]),d=z().value((e,a)=>e[g(a-1,0)]),r=z().value((e,a)=>e[a]),o=z().value((e,a)=>e[f(a+1,e.length-1)]),h=z().value((e,a)=>e[g(a-1,0)]),c=z().size(2).data([[-1,-1],[1,-1],[-1,1],[1,1]]).value((e,a,t,n)=>e[t][n]),s=z().value((e,a,t)=>{const n=e[a];if(1>=t){const t=0===a?n:e[a-1];return n?t:n}else{const t=a===e.length-1?n:e[a+1];return n?t:n}}),u=O().mode(D.TRIANGLE_STRIP).verticesPerElement(4);u.buffers().attribute("aXValue",l).attribute("aNextXValue",i).attribute("aPrevXValue",d).attribute("aYValue",r).attribute("aNextYValue",o).attribute("aPrevYValue",h).attribute("aCorner",c).attribute("aDefined",s);const p=l=>{const i=Se();u.vertexShader(i.vertex()).fragmentShader(i.fragment()),e.coordinate(0),e(u),a.coordinate(1),a(u),e.scaleComponent(u,"next"),a.scaleComponent(u,"next"),e.scaleComponent(u,"prev"),a.scaleComponent(u,"prev"),u.vertexShader().appendBody(te.body),n(u),t(u),u(l)};return p.xValues=e=>(l.data(e),i.data(e),d.data(e),p),p.yValues=e=>(r.data(e),o.data(e),h.data(e),p),p.defined=e=>(s.data(e),p),p.decorate=(...e)=>e.length?(t=e[0],p):t,p.xScale=(...a)=>a.length?(e=a[0],p):e,p.yScale=(...e)=>e.length?(a=e[0],p):a,b(p,u,"context"),b(p,n,"lineWidth"),p},we=()=>{const e=Y(G),a=Y(X);return e.appendHeader($.header).appendBody($.body),a.appendHeader(ce.header).appendBody(ce.body),{vertex:()=>e,fragment:()=>a}},Ve=()=>{const e=O().verticesPerElement(18);let a=_(),t=_();const n=ve();let l=()=>{};const i=z().value((e,a)=>e[a]),d=z().data({open:null,high:null,low:null,close:null}).value((e,a,t)=>{if([6,7,8,9,10,11].includes(t))return e.open[a];if([2,4,5].includes(t))return e.high[a];if([0,1,3].includes(t))return e.low[a];if([12,13,14,15,16,17].includes(t))return e.close[a];throw new Error(`Invalid vertex ${t}`)}),r=z().data([1,-1,-1,1,1,-1,0,0,-1,0,-1,-1,0,0,1,0,1,1]).value((e,a,t)=>e[t]),o=z().data([0,0,0,0,0,0,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1]).value((e,a,t)=>e[t]),h=z().value((e,a,t)=>{if([8,10,11,14,16,17].includes(t)){const n=e[a];return[8,10,11].includes(t)?-n:n}return 0}),c=z().value((e,a)=>{const t=e.open[a],n=e.close[a];return t<n?1:-1}),s=s=>{const u=we();e.vertexShader(u.vertex()).fragmentShader(u.fragment()).mode(D.TRIANGLES),e.buffers().attribute("aXValue",i).attribute("aYValue",d).attribute("aXDirection",r).attribute("aYDirection",o).attribute("aBandwidth",h).attribute("aColorIndicator",c),a.coordinate(0),a(e),t.coordinate(1),t(e),n(e),e.vertexShader().appendBody(`
}`};var pe=()=>{const e=Y(G),a=Y(X);return e.appendHeader(q.header).appendBody(q.body),a.appendHeader(re.header).appendBody(re.body),{vertex:()=>e,fragment:()=>a}},ye=()=>{const e=Y(G),a=Y(X);return e.appendHeader(K.header).appendBody(K.body),a.appendHeader(oe.header).appendBody(oe.body),{vertex:()=>e,fragment:()=>a}},me=()=>{const e=Y(G),a=Y(X);return e.appendHeader(J.header).appendBody(J.body),a.appendHeader(he.header).appendBody(he.body),{vertex:()=>e,fragment:()=>a}},ve=()=>{const e=Y(G),a=Y(X);return e.appendHeader(Z.header).appendBody(Z.body),a.appendHeader(ce.header).appendBody(ce.body),{vertex:()=>e,fragment:()=>a}},xe=e=>{switch(e){case y.symbolCircle:return pe();case y.symbolSquare:return ye();case y.symbolTriangle:return me();case y.symbolCross:return ve();default:throw new Error(`Unrecognised symbol: ${e}`);}},Se=()=>{let e=1;const a=a=>{a.buffers().uniform("uLineWidth",N(e))};return a.lineWidth=(...t)=>t.length?(e=t[0],a):e,a},be=()=>{let e=_(),a=_(),t=pe(),n=()=>{};const l=z().value((e,a)=>e[a]),i=z().value((e,a)=>e[a]),d=z().value((e,a)=>e[a]),r=O().mode(D.POINTS);r.buffers().attribute("aXValue",l).attribute("aYValue",i).attribute("aSize",d);const o=l=>{r.vertexShader(t.vertex()).fragmentShader(t.fragment()),e.coordinate(0),e(r),a.coordinate(1),a(r),n(r),r(l)};return o.xValues=e=>(l.data(e),o),o.yValues=e=>(i.data(e),o),o.sizes=e=>(d.data(e),o),o.decorate=(...e)=>e.length?(n=e[0],o):n,o.xScale=(...a)=>a.length?(e=a[0],o):e,o.yScale=(...e)=>e.length?(a=e[0],o):a,o.type=(...e)=>e.length?(t=e[0],o):t,b(o,r,"context"),o},we=()=>{const e=Y(G),a=Y(X);return e.appendHeader(te.header).appendBody(te.body),a.appendHeader(fe.header).appendBody(fe.body),{vertex:()=>e,fragment:()=>a}},Ve=()=>{let e=_(),a=_(),t=()=>{};const n=Se(),l=z().value((e,a)=>e[a]),i=z().value((e,a)=>e[f(a+1,e.length-1)]),d=z().value((e,a)=>e[g(a-1,0)]),r=z().value((e,a)=>e[a]),o=z().value((e,a)=>e[f(a+1,e.length-1)]),h=z().value((e,a)=>e[g(a-1,0)]),c=z().size(2).data([[-1,-1],[1,-1],[-1,1],[1,1]]).value((e,a,t,n)=>e[t][n]),s=z().value((e,a,t)=>{const n=e[a];if(1>=t){const t=0===a?n:e[a-1];return n?t:n}else{const t=a===e.length-1?n:e[a+1];return n?t:n}}),u=O().mode(D.TRIANGLE_STRIP).verticesPerElement(4);u.buffers().attribute("aXValue",l).attribute("aNextXValue",i).attribute("aPrevXValue",d).attribute("aYValue",r).attribute("aNextYValue",o).attribute("aPrevYValue",h).attribute("aCorner",c).attribute("aDefined",s);const p=l=>{const i=we();u.vertexShader(i.vertex()).fragmentShader(i.fragment()),e.coordinate(0),e(u),a.coordinate(1),a(u),e.scaleComponent(u,"next"),a.scaleComponent(u,"next"),e.scaleComponent(u,"prev"),a.scaleComponent(u,"prev"),u.vertexShader().appendBody(ne.body),n(u),t(u),u(l)};return p.xValues=e=>(l.data(e),i.data(e),d.data(e),p),p.yValues=e=>(r.data(e),o.data(e),h.data(e),p),p.defined=e=>(s.data(e),p),p.decorate=(...e)=>e.length?(t=e[0],p):t,p.xScale=(...a)=>a.length?(e=a[0],p):e,p.yScale=(...e)=>e.length?(a=e[0],p):a,b(p,u,"context"),b(p,n,"lineWidth"),p},Te=()=>{const e=Y(G),a=Y(X);return e.appendHeader(ee.header).appendBody(ee.body),a.appendHeader(ue.header).appendBody(ue.body),{vertex:()=>e,fragment:()=>a}},Ee=()=>{const e=O().verticesPerElement(18);let a=_(),t=_();const n=Se();let l=()=>{};const i=z().value((e,a)=>e[a]),d=z().data({open:null,high:null,low:null,close:null}).value((e,a,t)=>{if([6,7,8,9,10,11].includes(t))return e.open[a];if([2,4,5].includes(t))return e.high[a];if([0,1,3].includes(t))return e.low[a];if([12,13,14,15,16,17].includes(t))return e.close[a];throw new Error(`Invalid vertex ${t}`)}),r=z().data([1,-1,-1,1,1,-1,0,0,-1,0,-1,-1,0,0,1,0,1,1]).value((e,a,t)=>e[t]),o=z().data([0,0,0,0,0,0,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1]).value((e,a,t)=>e[t]),h=z().value((e,a,t)=>{if([8,10,11,14,16,17].includes(t)){const n=e[a];return[8,10,11].includes(t)?-n:n}return 0}),c=z().value((e,a)=>{const t=e.open[a],n=e.close[a];return t<n?1:-1}),s=s=>{const u=Te();e.vertexShader(u.vertex()).fragmentShader(u.fragment()).mode(D.TRIANGLES),e.buffers().attribute("aXValue",i).attribute("aYValue",d).attribute("aXDirection",r).attribute("aYDirection",o).attribute("aBandwidth",h).attribute("aColorIndicator",c),a.coordinate(0),a(e),t.coordinate(1),t(e),n(e),e.vertexShader().appendBody(`
gl_Position.x += ((uLineWidth * aXDirection / 2.0) + (aBandwidth / 2.0)) / uScreen.x;
gl_Position.y += (uLineWidth * aYDirection / 2.0) / uScreen.y;
`),l(e),e(s)};return s.xValues=e=>(i.data(e),s),s.openValues=e=>{const a=d.data(),t={...a,open:e};return d.data(t),c.data(t),s},s.highValues=e=>{const a=d.data(),t={...a,high:e};return d.data(t),c.data(t),s},s.lowValues=e=>{const a=d.data(),t={...a,low:e};return d.data(t),c.data(t),s},s.closeValues=e=>{const a=d.data(),t={...a,close:e};return d.data(t),c.data(t),s},s.bandwidth=e=>(h.data(e),s),s.decorate=(...e)=>e.length?(l=e[0],s):l,s.xScale=(...e)=>e.length?(a=e[0],s):a,s.yScale=(...e)=>e.length?(t=e[0],s):t,b(s,e,"context"),b(s,n,"lineWidth"),s},Te=()=>{const e=Y(G),a=Y(X);return e.appendHeader(ee.header).appendBody(ee.body),{vertex:()=>e,fragment:()=>a}},Ee=()=>{const e=O().verticesPerElement(6);let a=null,t=null,n=()=>{};const l=z().value((e,a)=>e[a]),i=z().data([null,null]).value((e,a,t)=>{const n=[1,2,4].includes(t)?0:1;return e[n][a]}),d=z().value((e,a)=>e[a]),r=z().size(2).data([-1,-1,1,-1,1,1]).value((e,a,t)=>e[t]),o=o=>{const h=Te();e.vertexShader(h.vertex()).fragmentShader(h.fragment()).mode(D.TRIANGLES),e.buffers().attribute("aXValue",l).attribute("aYValue",i).attribute("aWidthValue",d).attribute("aDirection",r),a.coordinate(0),a(e),t.coordinate(1),t(e),a.scaleComponent(e,"origin"),a.scaleComponent(e,"width"),n(e),e(o)};return o.xScale=(...e)=>e.length?(a=e[0],o):a,o.yScale=(...e)=>e.length?(t=e[0],o):t,o.decorate=(...e)=>e.length?(n=e[0],o):n,o.xValues=e=>(l.data(e),o),o.y0Values=e=>(i.data([e,i.data()[1]]),o),o.yValues=e=>(i.data([i.data()[0],e]),o),o.widths=e=>(d.data(e),o),b(o,e,"context"),o},Pe=()=>{const e=Y(G),a=Y(X);return e.appendHeader(ne.header).appendBody(ne.body),{vertex:()=>e,fragment:()=>a}},ke=()=>{const e=O().verticesPerElement(18);let a=_(),t=_();const n=ve(),l=z().value((e,a)=>e[a]),i=z().value((e,a)=>e[a]),d=z().value((e,a)=>e[a]),r=z().value((e,a)=>e[a]),o=z().size(3).data([[0,1,1],[0,1,-1],[0,-1,-1],[0,1,1],[0,-1,1],[0,-1,-1],[1,-1,1],[1,-1,-1],[-1,-1,-1],[1,-1,1],[-1,-1,1],[-1,-1,-1],[-1,1,-1],[-1,1,1],[1,1,1],[-1,1,-1],[1,1,-1],[1,1,1]]).value((e,a,t,n)=>e[t][n]),h=h=>{const c=Pe();e.vertexShader(c.vertex()).fragmentShader(c.fragment()).mode(D.TRIANGLES),e.buffers().attribute("aXValue",l).attribute("aHighValue",i).attribute("aLowValue",d).attribute("aBandwidth",r).attribute("aCorner",o),a.coordinate(0),a(e),t.coordinate(1),t(e),n(e),e.vertexShader().appendBody(`
`),l(e),e(s)};return s.xValues=e=>(i.data(e),s),s.openValues=e=>{const a=d.data(),t={...a,open:e};return d.data(t),c.data(t),s},s.highValues=e=>{const a=d.data(),t={...a,high:e};return d.data(t),c.data(t),s},s.lowValues=e=>{const a=d.data(),t={...a,low:e};return d.data(t),c.data(t),s},s.closeValues=e=>{const a=d.data(),t={...a,close:e};return d.data(t),c.data(t),s},s.bandwidth=e=>(h.data(e),s),s.decorate=(...e)=>e.length?(l=e[0],s):l,s.xScale=(...e)=>e.length?(a=e[0],s):a,s.yScale=(...e)=>e.length?(t=e[0],s):t,b(s,e,"context"),b(s,n,"lineWidth"),s},Pe=()=>{const e=Y(G),a=Y(X);return e.appendHeader(ae.header).appendBody(ae.body),{vertex:()=>e,fragment:()=>a}},ke=()=>{const e=O().verticesPerElement(6);let a=null,t=null,n=()=>{};const l=z().value((e,a)=>e[a]),i=z().data([null,null]).value((e,a,t)=>{const n=[1,2,4].includes(t)?0:1;return e[n][a]}),d=z().value((e,a)=>e[a]),r=z().size(2).data([-1,-1,1,-1,1,1]).value((e,a,t)=>e[t]),o=o=>{const h=Pe();e.vertexShader(h.vertex()).fragmentShader(h.fragment()).mode(D.TRIANGLES),e.buffers().attribute("aXValue",l).attribute("aYValue",i).attribute("aWidthValue",d).attribute("aDirection",r),a.coordinate(0),a(e),t.coordinate(1),t(e),a.scaleComponent(e,"origin"),a.scaleComponent(e,"width"),n(e),e(o)};return o.xScale=(...e)=>e.length?(a=e[0],o):a,o.yScale=(...e)=>e.length?(t=e[0],o):t,o.decorate=(...e)=>e.length?(n=e[0],o):n,o.xValues=e=>(l.data(e),o),o.y0Values=e=>(i.data([e,i.data()[1]]),o),o.yValues=e=>(i.data([i.data()[0],e]),o),o.widths=e=>(d.data(e),o),b(o,e,"context"),o},Be=()=>{const e=Y(G),a=Y(X);return e.appendHeader(le.header).appendBody(le.body),{vertex:()=>e,fragment:()=>a}},Ae=()=>{const e=O().verticesPerElement(18);let a=_(),t=_();const n=Se(),l=z().value((e,a)=>e[a]),i=z().value((e,a)=>e[a]),d=z().value((e,a)=>e[a]),r=z().value((e,a)=>e[a]),o=z().size(3).data([[0,1,1],[0,1,-1],[0,-1,-1],[0,1,1],[0,-1,1],[0,-1,-1],[1,-1,1],[1,-1,-1],[-1,-1,-1],[1,-1,1],[-1,-1,1],[-1,-1,-1],[-1,1,-1],[-1,1,1],[1,1,1],[-1,1,-1],[1,1,-1],[1,1,1]]).value((e,a,t,n)=>e[t][n]),h=h=>{const c=Be();e.vertexShader(c.vertex()).fragmentShader(c.fragment()).mode(D.TRIANGLES),e.buffers().attribute("aXValue",l).attribute("aHighValue",i).attribute("aLowValue",d).attribute("aBandwidth",r).attribute("aCorner",o),a.coordinate(0),a(e),t.coordinate(1),t(e),n(e),e.vertexShader().appendBody(`
gl_Position.x += xModifier / uScreen.x;
gl_Position.y += yModifier / uScreen.y;
`),e(h)};return h.xValues=e=>(l.data(e),h),h.highValues=e=>(i.data(e),h),h.lowValues=e=>(d.data(e),h),h.bandwidth=e=>(r.data(e),h),h.xScale=(...e)=>e.length?(a=e[0],h):a,h.yScale=(...e)=>e.length?(t=e[0],h):t,b(h,e,"context"),b(h,n,"lineWidth"),h},Be=()=>{const e=Y(G),a=Y(X);return e.appendHeader(le.header).appendBody(le.body),a.appendHeader(se.header).appendBody(se.body),{vertex:()=>e,fragment:()=>a}},Ae=()=>{let e=_(),a=_(),t=()=>{};const n=z().value((e,a)=>e[f(a+1,e.length-1)]),l=z().value((e,a)=>e[a]),i=z().value((e,a)=>e[f(a+1,e.length-1)]),d=z().value((e,a)=>e[a]),r=z().value((e,a)=>e[f(a+1,e.length-1)]),o=z().value((e,a)=>e[a]),h=z().size(3).data([[0,0,0],[0,1,0],[1,1,1],[0,0,1],[1,0,0],[1,1,0]]).value((e,a,t,n)=>e[t][n]),c=z().value((e,a)=>{const t=e[a],n=a===e.length-1?0:e[a+1];return t?n:t}),s=O().mode(D.TRIANGLES).verticesPerElement(6);s.buffers().attribute("aXValue",n).attribute("aXPrevValue",l).attribute("aYValue",i).attribute("aYPrevValue",d).attribute("aY0Value",r).attribute("aY0PrevValue",o).attribute("aCorner",h).attribute("aDefined",c);const u=n=>{const l=Be();s.vertexShader(l.vertex()).fragmentShader(l.fragment()),e.coordinate(0),e(s),a.coordinate(1),a(s),t(s),s(n-1)};return u.xValues=e=>(n.data(e),l.data(e),u),u.yValues=e=>(i.data(e),d.data(e),u),u.y0Values=e=>(r.data(e),o.data(e),u),u.defined=e=>(c.data(e),u),u.decorate=(...e)=>e.length?(t=e[0],u):t,u.xScale=(...a)=>a.length?(e=a[0],u):e,u.yScale=(...e)=>e.length?(a=e[0],u):a,b(u,s,"context"),u},Ie=()=>{const e=O().verticesPerElement(12);let a=_(),t=_();const n=ve();let l=()=>{};const i=z().value((e,a)=>e[a]),d=z().value((e,a)=>e[a]),r=z().value((e,a)=>e[a]),o=z().value((e,a)=>e[a]),h=z().value((e,a)=>e[a]),c=z().value((e,a)=>e[a]),s=z().size(3).data([[0,2,1],[0,2,-1],[0,-2,-1],[0,2,1],[0,-2,1],[0,-2,-1],[1,-1,0],[-1,-1,0],[-1,1,0],[1,-1,0],[1,1,0],[-1,1,0]]).value((e,a,t,n)=>e[t][n]),u=u=>{const g=we();e.vertexShader(g.vertex()).fragmentShader(g.fragment()).mode(D.TRIANGLES),e.buffers().attribute("aXValue",i).attribute("aHigh",d).attribute("aOpen",r).attribute("aClose",o).attribute("aLow",h).attribute("aBandwidth",c).attribute("aCorner",s),a.coordinate(0),a(e),t.coordinate(1),t(e),n(e),e.vertexShader().appendBody(`
`),e(h)};return h.xValues=e=>(l.data(e),h),h.highValues=e=>(i.data(e),h),h.lowValues=e=>(d.data(e),h),h.bandwidth=e=>(r.data(e),h),h.xScale=(...e)=>e.length?(a=e[0],h):a,h.yScale=(...e)=>e.length?(t=e[0],h):t,b(h,e,"context"),b(h,n,"lineWidth"),h},Ie=()=>{const e=Y(G),a=Y(X);return e.appendHeader(ie.header).appendBody(ie.body),a.appendHeader(ge.header).appendBody(ge.body),{vertex:()=>e,fragment:()=>a}},Ce=()=>{let e=_(),a=_(),t=()=>{};const n=z().value((e,a)=>e[f(a+1,e.length-1)]),l=z().value((e,a)=>e[a]),i=z().value((e,a)=>e[f(a+1,e.length-1)]),d=z().value((e,a)=>e[a]),r=z().value((e,a)=>e[f(a+1,e.length-1)]),o=z().value((e,a)=>e[a]),h=z().size(3).data([[0,0,0],[0,1,0],[1,1,1],[0,0,1],[1,0,0],[1,1,0]]).value((e,a,t,n)=>e[t][n]),c=z().value((e,a)=>{const t=e[a],n=a===e.length-1?0:e[a+1];return t?n:t}),s=O().mode(D.TRIANGLES).verticesPerElement(6);s.buffers().attribute("aXValue",n).attribute("aXPrevValue",l).attribute("aYValue",i).attribute("aYPrevValue",d).attribute("aY0Value",r).attribute("aY0PrevValue",o).attribute("aCorner",h).attribute("aDefined",c);const u=n=>{const l=Ie();s.vertexShader(l.vertex()).fragmentShader(l.fragment()),e.coordinate(0),e(s),a.coordinate(1),a(s),t(s),s(n-1)};return u.xValues=e=>(n.data(e),l.data(e),u),u.yValues=e=>(i.data(e),d.data(e),u),u.y0Values=e=>(r.data(e),o.data(e),u),u.defined=e=>(c.data(e),u),u.decorate=(...e)=>e.length?(t=e[0],u):t,u.xScale=(...a)=>a.length?(e=a[0],u):e,u.yScale=(...e)=>e.length?(a=e[0],u):a,b(u,s,"context"),u},He=()=>{const e=Y(G),a=Y(X);return e.appendHeader($.header).appendBody($.body),a.appendHeader(se.header).appendBody(se.body),{vertex:()=>e,fragment:()=>a}},Le=()=>{const e=O().verticesPerElement(12);let a=_(),t=_();const n=Se();let l=()=>{};const i=z().value((e,a)=>e[a]),d=z().value((e,a)=>e[a]),r=z().value((e,a)=>e[a]),o=z().value((e,a)=>e[a]),h=z().value((e,a)=>e[a]),c=z().value((e,a)=>e[a]),s=z().size(3).data([[0,2,1],[0,2,-1],[0,-2,-1],[0,2,1],[0,-2,1],[0,-2,-1],[1,-1,0],[-1,-1,0],[-1,1,0],[1,-1,0],[1,1,0],[-1,1,0]]).value((e,a,t,n)=>e[t][n]),u=u=>{const g=He();e.vertexShader(g.vertex()).fragmentShader(g.fragment()).mode(D.TRIANGLES),e.buffers().attribute("aXValue",i).attribute("aHigh",d).attribute("aOpen",r).attribute("aClose",o).attribute("aLow",h).attribute("aBandwidth",c).attribute("aCorner",s),a.coordinate(0),a(e),t.coordinate(1),t(e),n(e),e.vertexShader().appendBody(`
gl_Position.x += xModifier / uScreen.x;
gl_Position.y += yModifier / uScreen.y;
`),l(e),e(u)};return u.xValues=e=>(i.data(e),u),u.openValues=e=>(r.data(e),u),u.highValues=e=>(d.data(e),u),u.lowValues=e=>(h.data(e),u),u.closeValues=e=>(o.data(e),u),u.bandwidth=e=>(c.data(e),u),u.decorate=(...e)=>e.length?(l=e[0],u):l,u.xScale=(...e)=>e.length?(a=e[0],u):a,u.yScale=(...e)=>e.length?(t=e[0],u):t,b(u,e,"context"),b(u,n,"lineWidth"),u},Ce=()=>{const e=Y(G),a=Y(X);return e.appendHeader(ie.header).appendBody(ie.body),{vertex:()=>e,fragment:()=>a}},He=()=>{const e=O().verticesPerElement(54);let a=_(),t=_();const n=ve(),l=z().value((e,a)=>e[a]),i=z().data({median:null,upperQuartile:null,lowerQuartile:null,high:null,low:null}).value((e,a,t)=>[18,19,20,21,22,23].includes(t)?e.median[a]:[8,10,11,12,13,14,15,16,17,30,31,33,36,37,39].includes(t)?e.upperQuartile[a]:[24,25,26,27,28,29,32,34,35,38,40,41,42,43,45].includes(t)?e.lowerQuartile[a]:[0,1,2,3,4,5,6,7,9].includes(t)?e.high[a]:[44,46,47,48,49,50,51,52,53].includes(t)?e.low[a]:0),d=z().data([0,0,0,0,0,0,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,0,0,0,0,0,0]).value((e,a,t)=>e[t]),r=z().data([1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1]).value((e,a,t)=>e[t]),o=z().data({bandwidth:null,capWidth:null}).value((e,a,t)=>{if(5>=t||48<=t){const n=e.capWidth[a];return[0,3,4,48,51,52].includes(t)?-n:n}if(11<t&&42>t){const n=e.bandwidth[a];return[12,15,16,18,21,22,24,27,28,30,31,32,33,34,35].includes(t)?-n:n}return 0}),h=h=>{const c=Ce();e.vertexShader(c.vertex()).fragmentShader(c.fragment()).mode(D.TRIANGLES),e.buffers().attribute("aXValue",l).attribute("aYValue",i).attribute("aXDirection",d).attribute("aYDirection",r).attribute("aBandwidth",o),a.coordinate(0),a(e),t.coordinate(1),t(e),n(e),e.vertexShader().appendBody(`
`),l(e),e(u)};return u.xValues=e=>(i.data(e),u),u.openValues=e=>(r.data(e),u),u.highValues=e=>(d.data(e),u),u.lowValues=e=>(h.data(e),u),u.closeValues=e=>(o.data(e),u),u.bandwidth=e=>(c.data(e),u),u.decorate=(...e)=>e.length?(l=e[0],u):l,u.xScale=(...e)=>e.length?(a=e[0],u):a,u.yScale=(...e)=>e.length?(t=e[0],u):t,b(u,e,"context"),b(u,n,"lineWidth"),u},Qe=()=>{const e=Y(G),a=Y(X);return e.appendHeader(de.header).appendBody(de.body),{vertex:()=>e,fragment:()=>a}},Re=()=>{const e=O().verticesPerElement(54);let a=_(),t=_();const n=Se(),l=z().value((e,a)=>e[a]),i=z().data({median:null,upperQuartile:null,lowerQuartile:null,high:null,low:null}).value((e,a,t)=>[18,19,20,21,22,23].includes(t)?e.median[a]:[8,10,11,12,13,14,15,16,17,30,31,33,36,37,39].includes(t)?e.upperQuartile[a]:[24,25,26,27,28,29,32,34,35,38,40,41,42,43,45].includes(t)?e.lowerQuartile[a]:[0,1,2,3,4,5,6,7,9].includes(t)?e.high[a]:[44,46,47,48,49,50,51,52,53].includes(t)?e.low[a]:0),d=z().data([0,0,0,0,0,0,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,0,0,0,0,0,0]).value((e,a,t)=>e[t]),r=z().data([1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1]).value((e,a,t)=>e[t]),o=z().data({bandwidth:null,capWidth:null}).value((e,a,t)=>{if(5>=t||48<=t){const n=e.capWidth[a];return[0,3,4,48,51,52].includes(t)?-n:n}if(11<t&&42>t){const n=e.bandwidth[a];return[12,15,16,18,21,22,24,27,28,30,31,32,33,34,35].includes(t)?-n:n}return 0}),h=h=>{const c=Qe();e.vertexShader(c.vertex()).fragmentShader(c.fragment()).mode(D.TRIANGLES),e.buffers().attribute("aXValue",l).attribute("aYValue",i).attribute("aXDirection",d).attribute("aYDirection",r).attribute("aBandwidth",o),a.coordinate(0),a(e),t.coordinate(1),t(e),n(e),e.vertexShader().appendBody(`
gl_Position.x += ((uLineWidth * aXDirection) + aBandwidth) / uScreen.x;
gl_Position.y += (uLineWidth * aYDirection) / uScreen.y;
`),e(h)};return h.xValues=e=>(l.data(e),h),h.medianValues=e=>{const a=i.data();return i.data({...a,median:e}),h},h.upperQuartileValues=e=>{const a=i.data();return i.data({...a,upperQuartile:e}),h},h.lowerQuartileValues=e=>{const a=i.data();return i.data({...a,lowerQuartile:e}),h},h.highValues=e=>{const a=i.data();return i.data({...a,high:e}),h},h.lowValues=e=>{const a=i.data();return i.data({...a,low:e}),h},h.bandwidth=e=>{const a=o.data();return o.data({...a,bandwidth:e}),h},h.capWidth=e=>{const a=o.data();return o.data({...a,capWidth:e}),h},h.xScale=(...e)=>e.length?(a=e[0],h):a,h.yScale=(...e)=>e.length?(t=e[0],h):t,b(h,e,"context"),b(h,n,"lineWidth"),h},Le=e=>"function"==typeof e?e:()=>e,Qe=()=>{let e=null,a=e=>e.date,t=e=>e.open,n=e=>e.high,r=e=>e.low,o=e=>e.close,h="vertical",c=Le(3);const s=function(i){const s=e||l.path();return i.forEach(function(e,l){const i=a(e,l),d=t(e,l),u=n(e,l),g=r(e,l),f=o(e,l),p=c(e,l)/2;"vertical"===h?(s.moveTo(i,g),s.lineTo(i,u),s.moveTo(i,d),s.lineTo(i-p,d),s.moveTo(i,f),s.lineTo(i+p,f)):(s.moveTo(g,i),s.lineTo(u,i),s.moveTo(d,i),s.lineTo(d,i+p),s.moveTo(f,i),s.lineTo(f,i-p))}),e?null:s.toString()};return s.context=(...a)=>a.length?(e=a[0],s):e,s.x=(...e)=>e.length?(a=Le(e[0]),s):a,s.open=(...e)=>e.length?(t=Le(e[0]),s):t,s.high=(...e)=>e.length?(n=Le(e[0]),s):n,s.low=(...e)=>e.length?(r=Le(e[0]),s):r,s.close=(...e)=>e.length?(o=Le(e[0]),s):o,s.width=(...e)=>e.length?(c=Le(e[0]),s):c,s.orient=(...e)=>e.length?(h=e[0],s):h,s},Re=()=>{let e=null,a=e=>e.x,t=e=>e.y,n="center",i="center",r=e=>e.height,o=Le(3);const h=function(d,h){const c=e||l.path();return d.forEach(function(e,l){const d=a.call(this,e,h||l),s=t.call(this,e,h||l),u=r.call(this,e,h||l),g=o.call(this,e,h||l);let f;switch(n){case"left":f=g;break;case"right":f=0;break;case"center":f=g/2;break;default:throw new Error("Invalid horizontal alignment "+n);}let p;switch(i){case"bottom":p=-u;break;case"top":p=0;break;case"center":p=u/2;break;default:throw new Error("Invalid vertical alignment "+i);}c.rect(d-f,s-p,g,u)},this),e?null:c.toString()};return h.context=(...a)=>a.length?(e=a[0],h):e,h.x=(...e)=>e.length?(a=Le(e[0]),h):a,h.y=(...e)=>e.length?(t=Le(e[0]),h):t,h.width=(...e)=>e.length?(o=Le(e[0]),h):o,h.horizontalAlign=(...e)=>e.length?(n=e[0],h):n,h.height=(...e)=>e.length?(r=Le(e[0]),h):r,h.verticalAlign=(...e)=>e.length?(i=e[0],h):i,h},We=()=>{let e=null,a=e=>e.date,t=e=>e.open,n=e=>e.high,r=e=>e.low,o=e=>e.close,h=Le(3);const c=function(i){const c=e||l.path();return i.forEach(function(e,l){const i=a(e,l),d=t(e,l),s=n(e,l),u=r(e,l),p=o(e,l),m=h(e,l);c.rect(i-m/2,d,m,p-d),c.moveTo(i,f(p,d)),c.lineTo(i,s),c.moveTo(i,g(p,d)),c.lineTo(i,u)}),e?null:c.toString()};return c.context=(...a)=>a.length?(e=a[0],c):e,c.x=(...e)=>e.length?(a=Le(e[0]),c):a,c.open=(...e)=>e.length?(t=Le(e[0]),c):t,c.high=(...e)=>e.length?(n=Le(e[0]),c):n,c.low=(...e)=>e.length?(r=Le(e[0]),c):r,c.close=(...e)=>e.length?(o=Le(e[0]),c):o,c.width=(...e)=>e.length?(h=Le(e[0]),c):h,c},ze=()=>{let e=null,a=e=>e.value,t=e=>e.median,n=e=>e.upperQuartile,r=e=>e.lowerQuartile,o=e=>e.high,h=e=>e.low,c="vertical",s=Le(5),u=Le(.5);const g=function(i){const g=e||l.path();return i.forEach(function(e,l){const i=a(e,l),d=s(e,l),f=d/2,p=d*u(e,l),m=p/2,y=o(e,l),v=n(e,l),x=t(e,l),S=r(e,l),b=h(e,l),w=S-v;"vertical"===c?(g.moveTo(i-m,y),g.lineTo(i+m,y),g.moveTo(i,y),g.lineTo(i,v),g.rect(i-f,v,d,w),g.moveTo(i-f,x),g.lineTo(i+f,x),g.moveTo(i,S),g.lineTo(i,b),g.moveTo(i-m,b),g.lineTo(i+m,b)):(g.moveTo(b,i-m),g.lineTo(b,i+m),g.moveTo(b,i),g.lineTo(S,i),g.rect(S,i-f,-w,d),g.moveTo(x,i-f),g.lineTo(x,i+f),g.moveTo(v,i),g.lineTo(y,i),g.moveTo(y,i-m),g.lineTo(y,i+m))}),e?null:g.toString()};return g.context=(...a)=>a.length?(e=a[0],g):e,g.value=(...e)=>e.length?(a=Le(e[0]),g):a,g.median=(...e)=>e.length?(t=Le(e[0]),g):t,g.upperQuartile=(...e)=>e.length?(n=Le(e[0]),g):n,g.lowerQuartile=(...e)=>e.length?(r=Le(e[0]),g):r,g.high=(...e)=>e.length?(o=Le(e[0]),g):o,g.low=(...e)=>e.length?(h=Le(e[0]),g):h,g.width=(...e)=>e.length?(s=Le(e[0]),g):s,g.orient=(...e)=>e.length?(c=e[0],g):c,g.cap=(...e)=>e.length?(u=Le(e[0]),g):u,g},Ne=()=>{let e=null,a=e=>e.x,t=e=>e.high,n=e=>e.low,r="vertical",o=Le(5);const h=function(i){const h=e||l.path();return i.forEach(function(e,l){const i=a(e,l),d=o(e,l),c=d/2,s=t(e,l),u=n(e,l);"vertical"===r?(h.moveTo(i-c,s),h.lineTo(i+c,s),h.moveTo(i,s),h.lineTo(i,u),h.moveTo(i-c,u),h.lineTo(i+c,u)):(h.moveTo(u,i-c),h.lineTo(u,i+c),h.moveTo(u,i),h.lineTo(s,i),h.moveTo(s,i-c),h.lineTo(s,i+c))}),e?null:h.toString()};return h.context=(...a)=>a.length?(e=a[0],h):e,h.value=(...e)=>e.length?(a=Le(e[0]),h):a,h.high=(...e)=>e.length?(t=Le(e[0]),h):t,h.low=(...e)=>e.length?(n=Le(e[0]),h):n,h.width=(...e)=>e.length?(o=Le(e[0]),h):o,h.orient=(...e)=>e.length?(r=e[0],h):r,h},Ye=function(){var e=function(e){return e.high},a=function(e){return e.low},t=function(e){return e.cross},l="vertical",r="center",h=function(){return 5},c=A({decorate:function(){},defined:function(n,l){return o(a,e,t)(n,l)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return c.values=function(n,d){var i=h(n,d),o=B(r,i),s=c.xScale(),u=c.yScale();if("vertical"===l){var g=u(e(n,d));return{origin:[s(t(n,d))+o,g],high:0,low:u(a(n,d))-g,width:i}}var f=s(a(n,d));return{origin:[f,u(t(n,d))+o],high:s(e(n,d))-f,low:0,width:i}},c.xValues=function(){return"vertical"===l?[t]:[e,a]},c.yValues=function(){return"vertical"===l?[e,a]:[t]},c.orient=function(){return arguments.length?(l=0>=arguments.length?void 0:arguments[0],c):l},c.lowValue=function(){return arguments.length?(a=k(0>=arguments.length?void 0:arguments[0]),c):a},c.highValue=function(){return arguments.length?(e=k(0>=arguments.length?void 0:arguments[0]),c):e},c.crossValue=function(){return arguments.length?(t=k(0>=arguments.length?void 0:arguments[0]),c):t},c.bandwidth=function(){return arguments.length?(h=k(0>=arguments.length?void 0:arguments[0]),c):h},c.align=function(){return arguments.length?(r=0>=arguments.length?void 0:arguments[0],c):r},c},Ge=function(){var e,a=function(e){return e.date},t=function(e){return e.open},l=function(e){return e.high},r=function(e){return e.low},h=function(e){return e.close},c=function(){return 5},s="center",u=function(t,n){return e.xScale()(a(t,n))};return e=A({decorate:function(){},defined:function(e,n){return o(a,t,r,l,h)(e,n)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()}),e.values=function(a,n){var i=h(a,n),d=t(a,n),o=c(a,n),g=B(s,o),f="";return i>d?f="up":i<d&&(f="down"),{cross:u(a,n)+g,open:e.yScale()(d),high:e.yScale()(l(a,n)),low:e.yScale()(r(a,n)),close:e.yScale()(i),width:o,direction:f}},e.xValues=function(){return[a]},e.yValues=function(){return[t,l,r,h]},e.crossValue=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],e):a},e.openValue=function(){return arguments.length?(t=0>=arguments.length?void 0:arguments[0],e):t},e.highValue=function(){return arguments.length?(l=0>=arguments.length?void 0:arguments[0],e):l},e.lowValue=function(){return arguments.length?(r=0>=arguments.length?void 0:arguments[0],e):r},e.yValue=e.closeValue=function(){return arguments.length?(h=0>=arguments.length?void 0:arguments[0],e):h},e.bandwidth=function(){return arguments.length?(c=k(0>=arguments.length?void 0:arguments[0]),e):c},e.align=function(){return arguments.length?(s=0>=arguments.length?void 0:arguments[0],e):s},e},Xe=function(e,a){var n=Ge(),l=x("g",a),r=function(e){return"translate("+e.cross+", "+e.high+")"},o=function(e){return function(a){return e.selection?a.transition(e):a}},h=function(i){i.selection&&l.transition(i);var h=o(i);i.each(function(i,d,o){var c=i.filter(n.defined()),s=l(t.select(o[d]),c);s.enter().attr("transform",function(e,a){return r(n.values(e,a))+" scale(1e-6, 1)"}).append("path"),s.each(function(l,d,i){var o=n.values(l,d),c="up"===o.direction?C.green:C.red,s=h(t.select(i[d])).attr("class",a+" "+o.direction).attr("stroke",c).attr("fill",c).attr("transform",function(){return r(o)+" scale(1)"});e.x(0).width(o.width).open(function(){return o.open-o.high}).high(0).low(function(){return o.low-o.high}).close(function(){return o.close-o.high}),s.select("path").attr("d",e([l]))}),n.decorate()(s,i,d)})};return b(h,l,"key"),V(h,n),h},De=function(e){var a=Ge(),t=function(t){var n=t.filter(a.defined()),l=e.context();n.forEach(function(t,n){l.save();var i=a.values(t,n);l.translate(i.cross,i.high),l.beginPath(),e.x(0).open(function(){return i.open-i.high}).width(i.width).high(0).low(function(){return i.low-i.high}).close(function(){return i.close-i.high})([t]);var d="up"===i.direction?C.green:C.red;l.strokeStyle=d,l.fillStyle=d,a.decorate()(l,t,n),l.fill(),l.stroke(),l.closePath(),l.restore()})};return b(t,e,"context"),V(t,a),t},Oe=function(e){var a=Ge(),t=function(t){var n=t.filter(a.defined()),l=j(a.xScale()),r=j(a.yScale()),o=new Float32Array(n.length),h=new Float32Array(n.length),c=new Float32Array(n.length),s=new Float32Array(n.length),u=new Float32Array(n.length),g=new Float32Array(n.length);n.forEach(function(e,t){o[t]=l.scale(a.crossValue()(e,t)),h[t]=r.scale(a.openValue()(e,t)),c[t]=r.scale(a.highValue()(e,t)),s[t]=r.scale(a.lowValue()(e,t)),u[t]=r.scale(a.closeValue()(e,t)),g[t]=a.bandwidth()(e,t)}),e.xValues(o).openValues(h).highValues(c).lowValues(s).closeValues(u).bandwidth(g).xScale(l.glScale).yScale(r.glScale).decorate(function(e){return a.decorate()(e,n,0)}),e(n.length)};return V(t,a,E("align")),b(t,e,"context","lineWidth"),t},_e=function(){var e=function(e){return e.upperQuartile},a=function(e){return e.lowerQuartile},t=function(e){return e.high},l=function(e){return e.low},r=function(e){return e.value},h=function(e){return e.median},c="vertical",s="center",u=function(){return 5},g=A({decorate:function(){},defined:function(n,d){return o(l,t,a,e,r,h)(n,d)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return g.values=function(n,d){var i=u(n,d),o=B(s,i),f=g.xScale(),p=g.yScale();if("vertical"===c){var m=p(t(n,d));return{origin:[f(r(n,d))+o,m],high:0,upperQuartile:p(e(n,d))-m,median:p(h(n,d))-m,lowerQuartile:p(a(n,d))-m,low:p(l(n,d))-m,width:i}}var y=f(l(n,d));return{origin:[y,p(r(n,d))+o],high:f(t(n,d))-y,upperQuartile:f(e(n,d))-y,median:f(h(n,d))-y,lowerQuartile:f(a(n,d))-y,low:0,width:i}},g.xValues=function(){return"vertical"===c?[r]:[e,a,t,l,h]},g.yValues=function(){return"vertical"===c?[e,a,t,l,h]:[r]},g.orient=function(){return arguments.length?(c=0>=arguments.length?void 0:arguments[0],g):c},g.lowerQuartileValue=function(){return arguments.length?(a=k(0>=arguments.length?void 0:arguments[0]),g):a},g.upperQuartileValue=function(){return arguments.length?(e=k(0>=arguments.length?void 0:arguments[0]),g):e},g.lowValue=function(){return arguments.length?(l=k(0>=arguments.length?void 0:arguments[0]),g):l},g.highValue=function(){return arguments.length?(t=k(0>=arguments.length?void 0:arguments[0]),g):t},g.crossValue=function(){return arguments.length?(r=k(0>=arguments.length?void 0:arguments[0]),g):r},g.medianValue=function(){return arguments.length?(h=k(0>=arguments.length?void 0:arguments[0]),g):h},g.bandwidth=function(){return arguments.length?(u=k(0>=arguments.length?void 0:arguments[0]),g):u},g.align=function(){return arguments.length?(s=0>=arguments.length?void 0:arguments[0],g):s},g},Fe=function(){var e=[],a=function(e){return e},t=function(e,a){return a},l=A({decorate:function(){},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return l.xValues=function(){return e.map(function(e){return e.xValues()}).reduce(function(e,a){return e.concat(a)})},l.yValues=function(){return e.map(function(e){return e.yValues()}).reduce(function(e,a){return e.concat(a)})},l.mapping=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],l):a},l.key=function(){return arguments.length?(t=0>=arguments.length?void 0:arguments[0],l):t},l.series=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],l):e},l},Me=function(){var e=Fe(),a=x("g"),n=x("g","multi"),l=function(l){l.selection&&(n.transition(l),a.transition(l));var i=e.mapping(),d=e.series(),r=e.xScale(),o=e.yScale();l.each(function(l,h,c){var s=n(t.select(c[h]),d);s.each(function(e,n,h){e.xScale(r).yScale(o);var c=i(l,n,d),s=a(t.select(h[n]),[c]);s.call(e)});var u=s.selection?s.selection():s;u.order(),e.decorate()(s,l,h)})};return V(l,e),b(l,n,"key"),l},Ue=function(){var e=null,a=Fe(),t=function(t){var n=a.mapping(),l=a.series(),i=a.xScale(),d=a.yScale();l.forEach(function(r,o){var h=n(t,o,l);r.context(e).xScale(i).yScale(d);var s;r.decorate?(s=r.decorate(),r.decorate(function(e,n,l){a.decorate()(e,t,o),s(e,n,l)})):a.decorate()(e,t,o),r(h),s&&r.decorate(s)})};return t.context=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],t):e},V(t,a),t},je=function(){var e=function(){return 50},a="center",t=n.scaleBand(),l=A({decorate:function(){},xScale:n.scaleLinear(),yScale:n.scaleLinear()});return l.offsetScaleForDatum=function(n,l,d){var i=e(l,d),o=B(a,i),h=i/2;return t.domain(r.range(0,n.length)).range([-h+o,h+o])},l.bandwidth=function(){return arguments.length?(e=k(0>=arguments.length?void 0:arguments[0]),l):e},l.align=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],l):a},V(l,t,P({paddingInner:"paddingOuter"})),l},qe=function(){var e="vertical",a=L(),t=Ue(),n=function(n){"vertical"===e?t.series(n[0].map(function(){return a})).mapping(function(e,a){return e.map(function(e){return e[a]})}):t.series(n.map(function(){return a})).mapping(function(e,a){return e[a]}),t(n)};return n.series=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],n):a},n.orient=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],n):e},V(n,t,E("series","mapping")),n},Ke=function(e){return e.sort(r.ascending).filter(function(e,a,t){return-1===t.indexOf(e,a+1)})},Je=function(){var e=function(e){return e.x},a=function(e){return e.y},t=function(e){return e.color},l=function(){return 5},h=function(){return 5},c=n.interpolateViridis,s=A({decorate:function(){},defined:function(n,l){return o(e,a,t)(n,l)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return s.pathGenerator=Re().x(0).y(0),s.colorScale=function(e){var a=e.map(t);return n.scaleLinear().domain([r.min(a),r.max(a)])},s.values=function(n,d){return{x:s.xScale()(e(n,d)),y:s.yScale()(a(n,d)),colorValue:t(n,d),width:h(n,d),height:l(n,d)}},s.xValues=function(){return[e]},s.yValues=function(){return[a]},s.xValue=function(){return arguments.length?(e=k(0>=arguments.length?void 0:arguments[0]),s):e},s.yValue=function(){return arguments.length?(a=k(0>=arguments.length?void 0:arguments[0]),s):a},s.colorValue=function(){return arguments.length?(t=k(0>=arguments.length?void 0:arguments[0]),s):t},s.colorInterpolate=function(){return arguments.length?(c=0>=arguments.length?void 0:arguments[0],s):c},s.xBandwidth=function(){return arguments.length?(h=k(0>=arguments.length?void 0:arguments[0]),s):h},s.yBandwidth=function(){return arguments.length?(l=k(0>=arguments.length?void 0:arguments[0]),s):l},V(s,s.pathGenerator,P({horizontalAlign:"xAlign",verticalAlign:"yAlign"})),s};e.autoBandwidth=function(e){var a=.75,n=function(e){if(1>=e.length)return 10;e=Ke(e);var t=r.pairs(e).map(function(e){return p(e[0]-e[1])}),n=r.min(t);return a*n},l=function(a,t,l){if(a.bandwidth)return a.bandwidth();var i,d=Array.isArray(t)?(i=[]).concat.apply(i,h(t)):t,r=d.filter(e.defined()).map(l()).map(a),o=n(r);return o},i=function(a){var n=function(a){if(e.xBandwidth&&e.yBandwidth)e.xBandwidth(l(e.xScale(),a,e.xValue)),e.yBandwidth(l(e.yScale(),a,e.yValue));else{var t=e.orient&&"horizontal"===e.orient()?e.yScale():e.xScale();e.bandwidth(l(t,a,e.crossValue))}};a instanceof t.selection?a.each(function(a,l,i){n(a),e(t.select(i[l]))}):(n(a),e(a))};return V(i,e),i.widthFraction=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],i):a},i},e.seriesCanvasArea=function(){var e=I(),t=a.area(),n=function(a){var n=t.context();t.defined(e.defined());var l=a.map(e.values);t.x(function(e,a){return l[a].transposedX}).y(function(e,a){return l[a].transposedY});var i="vertical"===e.orient()?"y":"x";t[i+"0"](function(e,a){return l[a].y0}),t[i+"1"](function(e,a){return l[a].y}),n.beginPath(),t(a),n.fillStyle=C.gray,n.strokeStyle="transparent",e.decorate()(n,a),n.fill(),n.stroke(),n.closePath()};return V(n,e,E("bandwidth","align")),b(n,t,"curve","context"),n},e.seriesCanvasBar=function(){var e=I(),a=Re().x(0).y(0),t=function(a){return"vertical"===e.orient()?a.height:a.width},n=function(a){return"vertical"===e.orient()?a.width:a.height},l=function(l){var d=a.context(),r=l.filter(e.defined()),o=r.map(e.values);"vertical"===e.orient()?(a.verticalAlign("top"),a.horizontalAlign("center")):(a.horizontalAlign("right"),a.verticalAlign("center")),o.forEach(function(l,r){d.save(),d.beginPath(),d.translate(l.origin[0],l.origin[1]),t(a)(-l.height),n(a)(l.width),a([l]),d.fillStyle=C.darkGray,d.strokeStyle="transparent",e.decorate()(d,l.d,r),d.fill(),d.stroke(),d.closePath(),d.restore()})};return V(l,e),b(l,a,"context"),l},e.seriesCanvasBoxPlot=function(){var e=_e(),a=ze().value(0),t=function(t){var n=t.filter(e.defined()),l=a.context();a.orient(e.orient()),n.forEach(function(t,n){l.save();var i=e.values(t,n);l.translate(i.origin[0],i.origin[1]),l.beginPath(),a.median(i.median).upperQuartile(i.upperQuartile).lowerQuartile(i.lowerQuartile).high(i.high).width(i.width).low(i.low)([t]),l.fillStyle=C.gray,l.strokeStyle=C.black,e.decorate()(l,t,n),l.fill(),l.stroke(),l.closePath(),l.restore()})};return V(t,e),b(t,a,"cap","context"),t},e.seriesCanvasCandlestick=function(){return De(We())},e.seriesCanvasErrorBar=function(){var e=Ye(),a=Ne().value(0),t=function(t){var n=t.filter(e.defined()),l=a.context();a.orient(e.orient()),n.forEach(function(t,n){l.save();var i=e.values(t,n);l.translate(i.origin[0],i.origin[1]),l.beginPath(),a.high(i.high).width(i.width).low(i.low)([t]),l.strokeStyle=C.black,l.fillStyle=C.gray,e.decorate()(l,t,n),l.fill(),l.stroke(),l.closePath(),l.restore()})};return V(t,e),b(t,a,"context"),t},e.seriesCanvasGrouped=function(e){var a=je(),t=function(t){t.forEach(function(n,l){var r="horizontal"!==e.orient(),o=function(e,n){var i=a.offsetScaleForDatum(t,e,n),d=r?a.xScale():a.yScale();return d(e)+i(l)+i.bandwidth()/2};r?(e.xScale(o),e.yScale(a.yScale())):(e.yScale(o),e.xScale(a.xScale())),e.bandwidth&&e.bandwidth(function(e,n){return a.offsetScaleForDatum(t,e,n).bandwidth()}),e.decorate(function(e,t){return a.decorate()(e,t,l)}),e(n)})};return V(t,e,E("decorate","xScale","yScale")),V(t,a,E("offsetScaleForDatum")),t},e.seriesCanvasHeatmap=function(){var e=Je(),a=function(a){var t=a.filter(e.defined()),n=e.colorInterpolate(),l=e.colorScale(t),r=e.pathGenerator.context();t.forEach(function(a,t){r.save(),r.beginPath();var i=e.values(a,t);r.translate(i.x,i.y),r.fillStyle=n(l(i.colorValue)),r.strokeStyle="transparent",e.pathGenerator.height(i.height).width(i.width)([a]),e.decorate()(r,a,t),r.fill(),r.stroke(),r.closePath(),r.restore()})};return b(a,e.pathGenerator,"context"),V(a,e),a},e.seriesCanvasLine=L,e.seriesCanvasMulti=Ue,e.seriesCanvasOhlc=function(){return De(Qe())},e.seriesCanvasPoint=function(){var e=a.symbol(),t=I(),n=function(a){var n=a.filter(t.defined()),l=e.context();n.forEach(function(a,n){l.save();var i=t.values(a,n);l.translate(i.origin[0],i.origin[1]),l.beginPath(),e(a,n),l.strokeStyle=C.black,l.fillStyle=C.gray,t.decorate()(l,a,n),l.fill(),l.stroke(),l.closePath(),l.restore()})};return V(n,t,E("baseValue","bandwidth","align")),b(n,e,"size","type","context"),n},e.seriesCanvasRepeat=qe,e.seriesSvgArea=function(){var e=I(),n=a.area(),l=x("path","area"),i=function(a){a.selection&&l.transition(a),n.defined(e.defined()),a.each(function(a,i,d){var r=a.map(e.values);n.x(function(e,a){return r[a].transposedX}).y(function(e,a){return r[a].transposedY});var o="vertical"===e.orient()?"y":"x";n[o+"0"](function(e,a){return r[a].y0}),n[o+"1"](function(e,a){return r[a].y});var h=l(t.select(d[i]),[a]);h.enter().attr("fill",C.gray),h.attr("d",n),e.decorate()(h,a,i)})};return V(i,e,E("bandwidth","align")),b(i,l,"key"),b(i,n,"curve"),i},e.seriesSvgBar=function(){var e=Re().x(0).y(0),a=I(),n=x("g","bar"),l=function(e){return"vertical"===a.orient()?e.height:e.width},r=function(e){return"vertical"===a.orient()?e.width:e.height},o=function(e){return"translate("+e[0]+", "+e[1]+")"},h=function(i){i.selection&&n.transition(i),i.each(function(i,d,h){var c=a.orient();if("vertical"!==c&&"horizontal"!==c)throw new Error("The bar series does not support an orientation of "+c);var s=i.filter(a.defined()),u=s.map(a.values);e.width(0).height(0),"vertical"===a.orient()?(e.verticalAlign("top"),e.horizontalAlign("center")):(e.horizontalAlign("right"),e.verticalAlign("center"));var f=n(t.select(h[d]),s);f.enter().attr("transform",function(e,a){return o(u[a].baseOrigin)}).attr("class","bar "+a.orient()).attr("fill",C.darkGray).append("path").attr("d",function(a,t){return r(e)(u[t].width),e([a])}),f.attr("transform",function(e,a){return o(u[a].origin)}).select("path").attr("d",function(a,t){return r(e)(u[t].width),l(e)(-u[t].height),e([a])}),a.decorate()(f,s,d)})};return V(h,a),b(h,n,"key"),h},e.seriesSvgBoxPlot=function(){var e=_e(),a=x("g","box-plot"),n=ze().value(0),l=function(e){return function(a){return e.selection?a.transition(e):a}},r=function(e){return"translate("+e.origin[0]+", "+e.origin[1]+")"},o=function(i){i.selection&&a.transition(i);var o=l(i);i.each(function(l,i,d){var h=l.filter(e.defined()),c=a(t.select(d[i]),h);c.enter().attr("stroke",C.black).attr("fill",C.gray).attr("transform",function(a,t){return r(e.values(a,t))+" scale(1e-6, 1)"}).append("path"),n.orient(e.orient()),c.each(function(a,l,i){var d=e.values(a,l);n.median(d.median).upperQuartile(d.upperQuartile).lowerQuartile(d.lowerQuartile).width(d.width).high(d.high).low(d.low),o(t.select(i[l])).attr("transform",r(d)).select("path").attr("d",n([a]))}),e.decorate()(c,l,i)})};return V(o,e),b(o,a,"key"),b(o,n,"cap"),o},e.seriesSvgCandlestick=function(){return Xe(We(),"candlestick")},e.seriesSvgErrorBar=function(){var e=Ye(),a=x("g","error-bar"),n=Ne().value(0),l=function(e){return function(a){return e.selection?a.transition(e):a}},r=function(e){return"translate("+e.origin[0]+", "+e.origin[1]+")"},o=function(i){i.selection&&a.transition(i);var o=l(i);i.each(function(l,i,d){var h=l.filter(e.defined()),c=h.map(e.values),s=a(t.select(d[i]),h);s.enter().attr("stroke",C.black).attr("fill",C.gray).attr("transform",function(a,t){return r(e.values(a,t))+" scale(1e-6, 1)"}).append("path"),n.orient(e.orient()),s.each(function(e,a,l){var i=c[a];n.high(i.high).low(i.low).width(i.width),o(t.select(l[a])).attr("transform",r(i)+" scale(1)").select("path").attr("d",n([e]))}),e.decorate()(s,l,i)})};return V(o,e),b(o,a,"key"),o},e.seriesSvgGrouped=function(e){var a=je(),n=x("g","grouped"),l=function(l){l.selection&&n.transition(l),l.each(function(l,i,d){var r=n(t.select(d[i]),l);r.enter().append("g"),r.select("g").each(function(n,r,o){var h=t.select(o[r]),c="horizontal"!==e.orient(),s=function(e,t){var n=a.offsetScaleForDatum(l,e,t),i=c?a.xScale():a.yScale();return i(e)+n(r)+n.bandwidth()/2};c?(e.xScale(s),e.yScale(a.yScale())):(e.yScale(s),e.xScale(a.xScale())),e.bandwidth&&e.bandwidth(function(e,t){return a.offsetScaleForDatum(l,e,t).bandwidth()}),e.decorate(function(e,t){return a.decorate()(e,t,r)}),h.call(e)})})};return V(l,e,E("decorate","xScale","yScale")),V(l,a,E("offsetScaleForDatum")),l},e.seriesSvgHeatmap=function(){var e=Je(),a=x("g","box"),n=function(e){return"translate("+e.x+", "+e.y+")"},l=function(l){l.each(function(l,i,d){var r=l.filter(e.defined()),o=e.colorValue(),h=e.colorInterpolate(),c=e.colorScale(r),s=a(t.select(d[i]),r);s.enter().append("path").attr("stroke","transparent"),s.attr("transform",function(a,t){return n(e.values(a,t))}).select("path").attr("d",function(a,t){return e.pathGenerator.width(e.values(a,t).width).height(e.values(a,t).height)([a])}).attr("fill",function(e,a){return h(c(o(e,a)))}),e.decorate()(s,l,i)})};return V(l,e),l},e.seriesSvgLine=H,e.seriesSvgMulti=Me,e.seriesSvgOhlc=function(){return Xe(Qe(),"ohlc")},e.seriesSvgPoint=function(){var e=a.symbol(),n=I(),l=x("g","point"),r=function(e){return"translate("+e[0]+", "+e[1]+")"},o=function(a){a.selection&&l.transition(a),a.each(function(a,i,d){var o=a.filter(n.defined()),h=l(t.select(d[i]),o);h.enter().attr("transform",function(e,a){return r(n.values(e,a).origin)}).attr("fill",C.gray).attr("stroke",C.black).append("path"),h.attr("transform",function(e,a){return r(n.values(e,a).origin)}).select("path").attr("d",e),n.decorate()(h,a,i)})};return V(o,n,E("baseValue","bandwidth","align")),b(o,l,"key"),b(o,e,"type","size"),o},e.seriesSvgRepeat=function(){var e="vertical",a=H(),n=Me(),l=function(l){return l.each(function(l,i,d){"vertical"===e?n.series(l[0].map(function(){return a})).mapping(function(e,a){return e.map(function(e){return e[a]})}):n.series(l.map(function(){return a})).mapping(function(e,a){return e[a]}),t.select(d[i]).call(n)})};return l.series=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],l):a},l.orient=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],l):e},V(l,n,E("series","mapping")),l},e.seriesWebglArea=function(){var e=I(),a=Ae(),t=function(t){var n=j(e.xScale()),l=j(e.yScale()),r=new Float32Array(t.length),o=new Float32Array(t.length),h=new Float32Array(t.length),c=new Float32Array(t.length);t.forEach(function(a,t){r[t]=n.scale(e.crossValue()(a,t)),o[t]=l.scale(e.mainValue()(a,t)),h[t]=l.scale(e.baseValue()(a,t)),c[t]=e.defined()(a,t)}),a.xValues(r).yValues(o).y0Values(h).defined(c).xScale(n.glScale).yScale(l.glScale).decorate(function(a){return e.decorate()(a,t,0)}),a(t.length)};return V(t,e,E("bandwidth","align")),b(t,a,"context"),t},e.seriesWebglBar=function(){var e=I(),a=Ee(),t=function(t){var n=t.filter(e.defined()),l=j(e.xScale()),r=j(e.yScale()),o=new Float32Array(n.length),h=new Float32Array(n.length),c=new Float32Array(n.length),s=new Float32Array(n.length);n.forEach(function(a,t){o[t]=l.scale(e.crossValue()(a,t)),h[t]=r.scale(e.baseValue()(a,t)),c[t]=r.scale(e.mainValue()(a,t)),s[t]=r.scale(e.bandwidth()(a,t))}),a.xValues(o).y0Values(h).yValues(c).widths(s).xScale(l.glScale).yScale(r.glScale).decorate(function(a){e.decorate()(a,n,0)}),a(n.length)};return V(t,e,E("align")),b(t,a,"context"),t},e.seriesWebglBoxPlot=function(){var e=_e(),a=k(.5),t=He(),n=function(n){var l=n.filter(e.defined()),r=j(e.xScale()),o=j(e.yScale()),h=new Float32Array(l.length),c=new Float32Array(l.length),s=new Float32Array(l.length),u=new Float32Array(l.length),g=new Float32Array(l.length),f=new Float32Array(l.length),p=new Float32Array(l.length),m=new Float32Array(l.length);l.forEach(function(t,n){h[n]=r.scale(e.crossValue()(t,n)),c[n]=o.scale(e.medianValue()(t,n)),s[n]=o.scale(e.upperQuartileValue()(t,n)),u[n]=r.scale(e.lowerQuartileValue()(t,n)),g[n]=o.scale(e.highValue()(t,n)),f[n]=o.scale(e.lowValue()(t,n)),p[n]=e.bandwidth()(t,n),m[n]=p[n]*a(t,n)}),t.xValues(h).medianValues(c).upperQuartileValues(s).lowerQuartileValues(u).highValues(g).lowValues(f).bandwidth(p).capWidth(m).xScale(r.glScale).yScale(o.glScale),t(l.length)};return n.cap=function(){return arguments.length?(a=k(0>=arguments.length?void 0:arguments[0]),n):a},V(n,e,E("align")),b(n,t,"context","lineWidth"),n},e.seriesWebglCandlestick=function(){return Oe(Ie())},e.seriesWebglErrorBar=function(){var e=Ye(),a=ke(),t=function(t){var n=t.filter(e.defined()),l=j(e.xScale()),r=j(e.yScale()),o=new Float32Array(n.length),h=new Float32Array(n.length),c=new Float32Array(n.length),s=new Float32Array(n.length);n.forEach(function(a,t){o[t]=l.scale(e.crossValue()(a,t)),h[t]=r.scale(e.highValue()(a,t)),c[t]=r.scale(e.lowValue()(a,t)),s[t]=e.bandwidth()(a,t)}),a.xValues(o).highValues(h).lowValues(c).bandwidth(s).xScale(l.glScale).yScale(r.glScale),a(n.length)};return V(t,e,E("align")),b(t,a,"context","lineWidth"),t},e.seriesWebglLine=function(){function e(){return"vertical"===a.orient()?{x:a.crossValue(),y:a.mainValue(),defined:a.defined()}:{x:a.mainValue(),y:a.crossValue(),defined:a.defined()}}var a=I(),t=be(),n=function(n){var l=j(a.xScale()),r=j(a.yScale()),o=e(),h=new Float32Array(n.length),c=new Float32Array(n.length),s=new Float32Array(n.length);n.forEach(function(e,a){h[a]=l.scale(o.x(e,a)),c[a]=r.scale(o.y(e,a)),s[a]=o.defined(e,a)}),t.xValues(h).yValues(c).defined(s).xScale(l.glScale).yScale(r.glScale).decorate(function(e){a.decorate()(e,n,0)}),t(n.length)};return V(n,a,E("baseValue","bandwidth","align")),b(n,t,"context","lineWidth"),n},e.seriesWebglMulti=Ue,e.seriesWebglOhlc=function(){return Oe(Ve())},e.seriesWebglPoint=function(){function e(){return"vertical"===a.orient()?{x:a.crossValue(),y:a.mainValue()}:{x:a.mainValue(),y:a.crossValue()}}var a=I(),t=64,n=m.symbolCircle,l=xe(),i=function(i){var d=i.filter(a.defined()),r=j(a.xScale()),o=j(a.yScale()),h=ye(n),c=e(),s=new Float32Array(d.length),u=new Float32Array(d.length),g=new Float32Array(d.length);d.forEach(function(e,a){var n="function"==typeof t?t:function(){return t};s[a]=r.scale(c.x(e,a)),u[a]=o.scale(c.y(e,a)),g[a]=n(e)}),l.xValues(s).yValues(u).sizes(g).xScale(r.glScale).yScale(o.glScale).type(h).decorate(function(e){return a.decorate()(e,d,0)}),l(d.length)};return i.size=function(){return arguments.length?(t=0>=arguments.length?void 0:arguments[0],i):t},i.type=function(){return arguments.length?(n=0>=arguments.length?void 0:arguments[0],i):n},V(i,a,E("baseValue","bandwidth","align")),b(i,l,"context"),i},e.seriesWebglRepeat=qe,Object.defineProperty(e,"__esModule",{value:!0})});
`),e(h)};return h.xValues=e=>(l.data(e),h),h.medianValues=e=>{const a=i.data();return i.data({...a,median:e}),h},h.upperQuartileValues=e=>{const a=i.data();return i.data({...a,upperQuartile:e}),h},h.lowerQuartileValues=e=>{const a=i.data();return i.data({...a,lowerQuartile:e}),h},h.highValues=e=>{const a=i.data();return i.data({...a,high:e}),h},h.lowValues=e=>{const a=i.data();return i.data({...a,low:e}),h},h.bandwidth=e=>{const a=o.data();return o.data({...a,bandwidth:e}),h},h.capWidth=e=>{const a=o.data();return o.data({...a,capWidth:e}),h},h.xScale=(...e)=>e.length?(a=e[0],h):a,h.yScale=(...e)=>e.length?(t=e[0],h):t,b(h,e,"context"),b(h,n,"lineWidth"),h},We=e=>"function"==typeof e?e:()=>e,ze=()=>{let e=null,a=e=>e.date,t=e=>e.open,n=e=>e.high,r=e=>e.low,o=e=>e.close,h="vertical",c=We(3);const s=function(i){const s=e||l.path();return i.forEach(function(e,l){const i=a(e,l),d=t(e,l),u=n(e,l),g=r(e,l),f=o(e,l),p=c(e,l)/2;"vertical"===h?(s.moveTo(i,g),s.lineTo(i,u),s.moveTo(i,d),s.lineTo(i-p,d),s.moveTo(i,f),s.lineTo(i+p,f)):(s.moveTo(g,i),s.lineTo(u,i),s.moveTo(d,i),s.lineTo(d,i+p),s.moveTo(f,i),s.lineTo(f,i-p))}),e?null:s.toString()};return s.context=(...a)=>a.length?(e=a[0],s):e,s.x=(...e)=>e.length?(a=We(e[0]),s):a,s.open=(...e)=>e.length?(t=We(e[0]),s):t,s.high=(...e)=>e.length?(n=We(e[0]),s):n,s.low=(...e)=>e.length?(r=We(e[0]),s):r,s.close=(...e)=>e.length?(o=We(e[0]),s):o,s.width=(...e)=>e.length?(c=We(e[0]),s):c,s.orient=(...e)=>e.length?(h=e[0],s):h,s},Ne=()=>{let e=null,a=e=>e.x,t=e=>e.y,n="center",i="center",r=e=>e.height,o=We(3);const h=function(d,h){const c=e||l.path();return d.forEach(function(e,l){const d=a.call(this,e,h||l),s=t.call(this,e,h||l),u=r.call(this,e,h||l),g=o.call(this,e,h||l);let f;switch(n){case"left":f=g;break;case"right":f=0;break;case"center":f=g/2;break;default:throw new Error("Invalid horizontal alignment "+n);}let p;switch(i){case"bottom":p=-u;break;case"top":p=0;break;case"center":p=u/2;break;default:throw new Error("Invalid vertical alignment "+i);}c.rect(d-f,s-p,g,u)},this),e?null:c.toString()};return h.context=(...a)=>a.length?(e=a[0],h):e,h.x=(...e)=>e.length?(a=We(e[0]),h):a,h.y=(...e)=>e.length?(t=We(e[0]),h):t,h.width=(...e)=>e.length?(o=We(e[0]),h):o,h.horizontalAlign=(...e)=>e.length?(n=e[0],h):n,h.height=(...e)=>e.length?(r=We(e[0]),h):r,h.verticalAlign=(...e)=>e.length?(i=e[0],h):i,h},Ye=()=>{let e=null,a=e=>e.date,t=e=>e.open,n=e=>e.high,r=e=>e.low,o=e=>e.close,h=We(3);const c=function(i){const c=e||l.path();return i.forEach(function(e,l){const i=a(e,l),d=t(e,l),s=n(e,l),u=r(e,l),p=o(e,l),y=h(e,l);c.rect(i-y/2,d,y,p-d),c.moveTo(i,f(p,d)),c.lineTo(i,s),c.moveTo(i,g(p,d)),c.lineTo(i,u)}),e?null:c.toString()};return c.context=(...a)=>a.length?(e=a[0],c):e,c.x=(...e)=>e.length?(a=We(e[0]),c):a,c.open=(...e)=>e.length?(t=We(e[0]),c):t,c.high=(...e)=>e.length?(n=We(e[0]),c):n,c.low=(...e)=>e.length?(r=We(e[0]),c):r,c.close=(...e)=>e.length?(o=We(e[0]),c):o,c.width=(...e)=>e.length?(h=We(e[0]),c):h,c},Ge=()=>{let e=null,a=e=>e.value,t=e=>e.median,n=e=>e.upperQuartile,r=e=>e.lowerQuartile,o=e=>e.high,h=e=>e.low,c="vertical",s=We(5),u=We(.5);const g=function(i){const g=e||l.path();return i.forEach(function(e,l){const i=a(e,l),d=s(e,l),f=d/2,p=d*u(e,l),y=p/2,m=o(e,l),v=n(e,l),x=t(e,l),S=r(e,l),b=h(e,l),w=S-v;"vertical"===c?(g.moveTo(i-y,m),g.lineTo(i+y,m),g.moveTo(i,m),g.lineTo(i,v),g.rect(i-f,v,d,w),g.moveTo(i-f,x),g.lineTo(i+f,x),g.moveTo(i,S),g.lineTo(i,b),g.moveTo(i-y,b),g.lineTo(i+y,b)):(g.moveTo(b,i-y),g.lineTo(b,i+y),g.moveTo(b,i),g.lineTo(S,i),g.rect(S,i-f,-w,d),g.moveTo(x,i-f),g.lineTo(x,i+f),g.moveTo(v,i),g.lineTo(m,i),g.moveTo(m,i-y),g.lineTo(m,i+y))}),e?null:g.toString()};return g.context=(...a)=>a.length?(e=a[0],g):e,g.value=(...e)=>e.length?(a=We(e[0]),g):a,g.median=(...e)=>e.length?(t=We(e[0]),g):t,g.upperQuartile=(...e)=>e.length?(n=We(e[0]),g):n,g.lowerQuartile=(...e)=>e.length?(r=We(e[0]),g):r,g.high=(...e)=>e.length?(o=We(e[0]),g):o,g.low=(...e)=>e.length?(h=We(e[0]),g):h,g.width=(...e)=>e.length?(s=We(e[0]),g):s,g.orient=(...e)=>e.length?(c=e[0],g):c,g.cap=(...e)=>e.length?(u=We(e[0]),g):u,g},Xe=()=>{let e=null,a=e=>e.x,t=e=>e.high,n=e=>e.low,r="vertical",o=We(5);const h=function(i){const h=e||l.path();return i.forEach(function(e,l){const i=a(e,l),d=o(e,l),c=d/2,s=t(e,l),u=n(e,l);"vertical"===r?(h.moveTo(i-c,s),h.lineTo(i+c,s),h.moveTo(i,s),h.lineTo(i,u),h.moveTo(i-c,u),h.lineTo(i+c,u)):(h.moveTo(u,i-c),h.lineTo(u,i+c),h.moveTo(u,i),h.lineTo(s,i),h.moveTo(s,i-c),h.lineTo(s,i+c))}),e?null:h.toString()};return h.context=(...a)=>a.length?(e=a[0],h):e,h.value=(...e)=>e.length?(a=We(e[0]),h):a,h.high=(...e)=>e.length?(t=We(e[0]),h):t,h.low=(...e)=>e.length?(n=We(e[0]),h):n,h.width=(...e)=>e.length?(o=We(e[0]),h):o,h.orient=(...e)=>e.length?(r=e[0],h):r,h},De=function(){var e=function(e){return e.high},a=function(e){return e.low},t=function(e){return e.cross},l="vertical",r="center",h=function(){return 5},c=A({decorate:function(){},defined:function(n,l){return o(a,e,t)(n,l)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return c.values=function(n,d){var i=h(n,d),o=B(r,i),s=c.xScale(),u=c.yScale();if("vertical"===l){var g=u(e(n,d));return{origin:[s(t(n,d))+o,g],high:0,low:u(a(n,d))-g,width:i}}var f=s(a(n,d));return{origin:[f,u(t(n,d))+o],high:s(e(n,d))-f,low:0,width:i}},c.xValues=function(){return"vertical"===l?[t]:[e,a]},c.yValues=function(){return"vertical"===l?[e,a]:[t]},c.orient=function(){return arguments.length?(l=0>=arguments.length?void 0:arguments[0],c):l},c.lowValue=function(){return arguments.length?(a=k(0>=arguments.length?void 0:arguments[0]),c):a},c.highValue=function(){return arguments.length?(e=k(0>=arguments.length?void 0:arguments[0]),c):e},c.crossValue=function(){return arguments.length?(t=k(0>=arguments.length?void 0:arguments[0]),c):t},c.bandwidth=function(){return arguments.length?(h=k(0>=arguments.length?void 0:arguments[0]),c):h},c.align=function(){return arguments.length?(r=0>=arguments.length?void 0:arguments[0],c):r},c},Oe=function(){var e,a=function(e){return e.date},t=function(e){return e.open},l=function(e){return e.high},r=function(e){return e.low},h=function(e){return e.close},c=function(){return 5},s="center",u=function(t,n){return e.xScale()(a(t,n))};return e=A({decorate:function(){},defined:function(e,n){return o(a,t,r,l,h)(e,n)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()}),e.values=function(a,n){var i=h(a,n),d=t(a,n),o=c(a,n),g=B(s,o),f="";return i>d?f="up":i<d&&(f="down"),{cross:u(a,n)+g,open:e.yScale()(d),high:e.yScale()(l(a,n)),low:e.yScale()(r(a,n)),close:e.yScale()(i),width:o,direction:f}},e.xValues=function(){return[a]},e.yValues=function(){return[t,l,r,h]},e.crossValue=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],e):a},e.openValue=function(){return arguments.length?(t=0>=arguments.length?void 0:arguments[0],e):t},e.highValue=function(){return arguments.length?(l=0>=arguments.length?void 0:arguments[0],e):l},e.lowValue=function(){return arguments.length?(r=0>=arguments.length?void 0:arguments[0],e):r},e.yValue=e.closeValue=function(){return arguments.length?(h=0>=arguments.length?void 0:arguments[0],e):h},e.bandwidth=function(){return arguments.length?(c=k(0>=arguments.length?void 0:arguments[0]),e):c},e.align=function(){return arguments.length?(s=0>=arguments.length?void 0:arguments[0],e):s},e},_e=function(e,a){var n=Oe(),l=x("g",a),r=function(e){return"translate("+e.cross+", "+e.high+")"},o=function(e){return function(a){return e.selection?a.transition(e):a}},h=function(i){i.selection&&l.transition(i);var h=o(i);i.each(function(i,d,o){var c=i.filter(n.defined()),s=l(t.select(o[d]),c);s.enter().attr("transform",function(e,a){return r(n.values(e,a))+" scale(1e-6, 1)"}).append("path"),s.each(function(l,d,i){var o=n.values(l,d),c="up"===o.direction?C.green:C.red,s=h(t.select(i[d])).attr("class",a+" "+o.direction).attr("stroke",c).attr("fill",c).attr("transform",function(){return r(o)+" scale(1)"});e.x(0).width(o.width).open(function(){return o.open-o.high}).high(0).low(function(){return o.low-o.high}).close(function(){return o.close-o.high}),s.select("path").attr("d",e([l]))}),n.decorate()(s,i,d)})};return b(h,l,"key"),V(h,n),h},Fe=function(e){var a=Oe(),t=function(t){var n=t.filter(a.defined()),l=e.context();n.forEach(function(t,n){l.save();var i=a.values(t,n);l.translate(i.cross,i.high),l.beginPath(),e.x(0).open(function(){return i.open-i.high}).width(i.width).high(0).low(function(){return i.low-i.high}).close(function(){return i.close-i.high})([t]);var d="up"===i.direction?C.green:C.red;l.strokeStyle=d,l.fillStyle=d,a.decorate()(l,t,n),l.fill(),l.stroke(),l.closePath(),l.restore()})};return b(t,e,"context"),V(t,a),t},Me=function(e){var a=Oe(),t=function(t){var n=t.filter(a.defined()),l=j(a.xScale()),r=j(a.yScale()),o=new Float32Array(n.length),h=new Float32Array(n.length),c=new Float32Array(n.length),s=new Float32Array(n.length),u=new Float32Array(n.length),g=new Float32Array(n.length);n.forEach(function(e,t){o[t]=l.scale(a.crossValue()(e,t)),h[t]=r.scale(a.openValue()(e,t)),c[t]=r.scale(a.highValue()(e,t)),s[t]=r.scale(a.lowValue()(e,t)),u[t]=r.scale(a.closeValue()(e,t)),g[t]=a.bandwidth()(e,t)}),e.xValues(o).openValues(h).highValues(c).lowValues(s).closeValues(u).bandwidth(g).xScale(l.glScale).yScale(r.glScale).decorate(function(e){return a.decorate()(e,n,0)}),e(n.length)};return V(t,a,E("align")),b(t,e,"context","lineWidth"),t},Ue=function(){var e=function(e){return e.upperQuartile},a=function(e){return e.lowerQuartile},t=function(e){return e.high},l=function(e){return e.low},r=function(e){return e.value},h=function(e){return e.median},c="vertical",s="center",u=function(){return 5},g=A({decorate:function(){},defined:function(n,d){return o(l,t,a,e,r,h)(n,d)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return g.values=function(n,d){var i=u(n,d),o=B(s,i),f=g.xScale(),p=g.yScale();if("vertical"===c){var m=p(t(n,d));return{origin:[f(r(n,d))+o,m],high:0,upperQuartile:p(e(n,d))-m,median:p(h(n,d))-m,lowerQuartile:p(a(n,d))-m,low:p(l(n,d))-m,width:i}}var y=f(l(n,d));return{origin:[y,p(r(n,d))+o],high:f(t(n,d))-y,upperQuartile:f(e(n,d))-y,median:f(h(n,d))-y,lowerQuartile:f(a(n,d))-y,low:0,width:i}},g.xValues=function(){return"vertical"===c?[r]:[e,a,t,l,h]},g.yValues=function(){return"vertical"===c?[e,a,t,l,h]:[r]},g.orient=function(){return arguments.length?(c=0>=arguments.length?void 0:arguments[0],g):c},g.lowerQuartileValue=function(){return arguments.length?(a=k(0>=arguments.length?void 0:arguments[0]),g):a},g.upperQuartileValue=function(){return arguments.length?(e=k(0>=arguments.length?void 0:arguments[0]),g):e},g.lowValue=function(){return arguments.length?(l=k(0>=arguments.length?void 0:arguments[0]),g):l},g.highValue=function(){return arguments.length?(t=k(0>=arguments.length?void 0:arguments[0]),g):t},g.crossValue=function(){return arguments.length?(r=k(0>=arguments.length?void 0:arguments[0]),g):r},g.medianValue=function(){return arguments.length?(h=k(0>=arguments.length?void 0:arguments[0]),g):h},g.bandwidth=function(){return arguments.length?(u=k(0>=arguments.length?void 0:arguments[0]),g):u},g.align=function(){return arguments.length?(s=0>=arguments.length?void 0:arguments[0],g):s},g},je=function(){var e=[],a=function(e){return e},t=function(e,a){return a},l=A({decorate:function(){},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return l.xValues=function(){return e.map(function(e){return e.xValues()}).reduce(function(e,a){return e.concat(a)})},l.yValues=function(){return e.map(function(e){return e.yValues()}).reduce(function(e,a){return e.concat(a)})},l.mapping=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],l):a},l.key=function(){return arguments.length?(t=0>=arguments.length?void 0:arguments[0],l):t},l.series=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],l):e},l},qe=function(){var e=je(),a=x("g"),n=x("g","multi"),l=function(l){l.selection&&(n.transition(l),a.transition(l));var i=e.mapping(),d=e.series(),r=e.xScale(),o=e.yScale();l.each(function(l,h,c){var s=n(t.select(c[h]),d);s.each(function(e,n,h){e.xScale(r).yScale(o);var c=i(l,n,d),s=a(t.select(h[n]),[c]);s.call(e)});var u=s.selection?s.selection():s;u.order(),e.decorate()(s,l,h)})};return V(l,e),b(l,n,"key"),l},Ke=function(){var e=null,a=je(),t=function(t){var n=a.mapping(),l=a.series(),i=a.xScale(),d=a.yScale();l.forEach(function(r,o){var h=n(t,o,l);r.context(e).xScale(i).yScale(d);var s;r.decorate?(s=r.decorate(),r.decorate(function(e,n,l){a.decorate()(e,t,o),s(e,n,l)})):a.decorate()(e,t,o),r(h),s&&r.decorate(s)})};return t.context=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],t):e},V(t,a),t},Je=function(){var e=function(){return 50},a="center",t=n.scaleBand(),l=A({decorate:function(){},xScale:n.scaleLinear(),yScale:n.scaleLinear()});return l.offsetScaleForDatum=function(n,l,d){var i=e(l,d),o=B(a,i),h=i/2;return t.domain(r.range(0,n.length)).range([-h+o,h+o])},l.bandwidth=function(){return arguments.length?(e=k(0>=arguments.length?void 0:arguments[0]),l):e},l.align=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],l):a},V(l,t,P({paddingInner:"paddingOuter"})),l},Ze=function(){var e="vertical",a=L(),t=Ke(),n=function(n){"vertical"===e?t.series(n[0].map(function(){return a})).mapping(function(e,a){return e.map(function(e){return e[a]})}):t.series(n.map(function(){return a})).mapping(function(e,a){return e[a]}),t(n)};return n.series=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],n):a},n.orient=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],n):e},V(n,t,E("series","mapping")),n},$e=function(e){return e.sort(r.ascending).filter(function(e,a,t){return-1===t.indexOf(e,a+1)})},ea=function(){var e=function(e){return e.x},a=function(e){return e.y},t=function(e){return e.color},l=function(){return 5},h=function(){return 5},c=n.interpolateViridis,s=A({decorate:function(){},defined:function(n,l){return o(e,a,t)(n,l)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return s.pathGenerator=Ne().x(0).y(0),s.colorScale=function(e){var a=e.map(t);return n.scaleLinear().domain([r.min(a),r.max(a)])},s.values=function(n,d){return{x:s.xScale()(e(n,d)),y:s.yScale()(a(n,d)),colorValue:t(n,d),width:h(n,d),height:l(n,d)}},s.xValues=function(){return[e]},s.yValues=function(){return[a]},s.xValue=function(){return arguments.length?(e=k(0>=arguments.length?void 0:arguments[0]),s):e},s.yValue=function(){return arguments.length?(a=k(0>=arguments.length?void 0:arguments[0]),s):a},s.colorValue=function(){return arguments.length?(t=k(0>=arguments.length?void 0:arguments[0]),s):t},s.colorInterpolate=function(){return arguments.length?(c=0>=arguments.length?void 0:arguments[0],s):c},s.xBandwidth=function(){return arguments.length?(h=k(0>=arguments.length?void 0:arguments[0]),s):h},s.yBandwidth=function(){return arguments.length?(l=k(0>=arguments.length?void 0:arguments[0]),s):l},V(s,s.pathGenerator,P({horizontalAlign:"xAlign",verticalAlign:"yAlign"})),s};e.autoBandwidth=function(e){var a=.75,n=function(e){if(1>=e.length)return 10;e=$e(e);var t=r.pairs(e).map(function(e){return p(e[0]-e[1])}),n=r.min(t);return a*n},l=function(a,t,l){if(a.bandwidth)return a.bandwidth();var i,d=Array.isArray(t)?(i=[]).concat.apply(i,h(t)):t,r=d.filter(e.defined()).map(l()).map(a),o=n(r);return o},i=function(a){var n=function(a){if(e.xBandwidth&&e.yBandwidth)e.xBandwidth(l(e.xScale(),a,e.xValue)),e.yBandwidth(l(e.yScale(),a,e.yValue));else{var t=e.orient&&"horizontal"===e.orient()?e.yScale():e.xScale();e.bandwidth(l(t,a,e.crossValue))}};a instanceof t.selection?a.each(function(a,l,i){n(a),e(t.select(i[l]))}):(n(a),e(a))};return V(i,e),i.widthFraction=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],i):a},i},e.seriesCanvasArea=function(){var e=I(),t=a.area(),n=function(a){var n=t.context();t.defined(e.defined());var l=a.map(e.values);t.x(function(e,a){return l[a].transposedX}).y(function(e,a){return l[a].transposedY});var i="vertical"===e.orient()?"y":"x";t[i+"0"](function(e,a){return l[a].y0}),t[i+"1"](function(e,a){return l[a].y}),n.beginPath(),t(a),n.fillStyle=C.gray,n.strokeStyle="transparent",e.decorate()(n,a),n.fill(),n.stroke(),n.closePath()};return V(n,e,E("bandwidth","align")),b(n,t,"curve","context"),n},e.seriesCanvasBar=function(){var e=I(),a=Ne().x(0).y(0),t=function(a){return"vertical"===e.orient()?a.height:a.width},n=function(a){return"vertical"===e.orient()?a.width:a.height},l=function(l){var d=a.context(),r=l.filter(e.defined()),o=r.map(e.values);"vertical"===e.orient()?(a.verticalAlign("top"),a.horizontalAlign("center")):(a.horizontalAlign("right"),a.verticalAlign("center")),o.forEach(function(l,r){d.save(),d.beginPath(),d.translate(l.origin[0],l.origin[1]),t(a)(-l.height),n(a)(l.width),a([l]),d.fillStyle=C.darkGray,d.strokeStyle="transparent",e.decorate()(d,l.d,r),d.fill(),d.stroke(),d.closePath(),d.restore()})};return V(l,e),b(l,a,"context"),l},e.seriesCanvasBoxPlot=function(){var e=Ue(),a=Ge().value(0),t=function(t){var n=t.filter(e.defined()),l=a.context();a.orient(e.orient()),n.forEach(function(t,n){l.save();var i=e.values(t,n);l.translate(i.origin[0],i.origin[1]),l.beginPath(),a.median(i.median).upperQuartile(i.upperQuartile).lowerQuartile(i.lowerQuartile).high(i.high).width(i.width).low(i.low)([t]),l.fillStyle=C.gray,l.strokeStyle=C.black,e.decorate()(l,t,n),l.fill(),l.stroke(),l.closePath(),l.restore()})};return V(t,e),b(t,a,"cap","context"),t},e.seriesCanvasCandlestick=function(){return Fe(Ye())},e.seriesCanvasErrorBar=function(){var e=De(),a=Xe().value(0),t=function(t){var n=t.filter(e.defined()),l=a.context();a.orient(e.orient()),n.forEach(function(t,n){l.save();var i=e.values(t,n);l.translate(i.origin[0],i.origin[1]),l.beginPath(),a.high(i.high).width(i.width).low(i.low)([t]),l.strokeStyle=C.black,l.fillStyle=C.gray,e.decorate()(l,t,n),l.fill(),l.stroke(),l.closePath(),l.restore()})};return V(t,e),b(t,a,"context"),t},e.seriesCanvasGrouped=function(e){var a=Je(),t=function(t){t.forEach(function(n,l){var r="horizontal"!==e.orient(),o=function(e,n){var i=a.offsetScaleForDatum(t,e,n),d=r?a.xScale():a.yScale();return d(e)+i(l)+i.bandwidth()/2};r?(e.xScale(o),e.yScale(a.yScale())):(e.yScale(o),e.xScale(a.xScale())),e.bandwidth&&e.bandwidth(function(e,n){return a.offsetScaleForDatum(t,e,n).bandwidth()}),e.decorate(function(e,t){return a.decorate()(e,t,l)}),e(n)})};return V(t,e,E("decorate","xScale","yScale")),V(t,a,E("offsetScaleForDatum")),t},e.seriesCanvasHeatmap=function(){var e=ea(),a=function(a){var t=a.filter(e.defined()),n=e.colorInterpolate(),l=e.colorScale(t),r=e.pathGenerator.context();t.forEach(function(a,t){r.save(),r.beginPath();var i=e.values(a,t);r.translate(i.x,i.y),r.fillStyle=n(l(i.colorValue)),r.strokeStyle="transparent",e.pathGenerator.height(i.height).width(i.width)([a]),e.decorate()(r,a,t),r.fill(),r.stroke(),r.closePath(),r.restore()})};return b(a,e.pathGenerator,"context"),V(a,e),a},e.seriesCanvasLine=L,e.seriesCanvasMulti=Ke,e.seriesCanvasOhlc=function(){return Fe(ze())},e.seriesCanvasPoint=function(){var e=a.symbol(),t=I(),n=function(a){var n=a.filter(t.defined()),l=e.context();n.forEach(function(a,n){l.save();var i=t.values(a,n);l.translate(i.origin[0],i.origin[1]),l.beginPath(),e(a,n),l.strokeStyle=C.black,l.fillStyle=C.gray,t.decorate()(l,a,n),l.fill(),l.stroke(),l.closePath(),l.restore()})};return V(n,t,E("baseValue","bandwidth","align")),b(n,e,"size","type","context"),n},e.seriesCanvasRepeat=Ze,e.seriesSvgArea=function(){var e=I(),n=a.area(),l=x("path","area"),i=function(a){a.selection&&l.transition(a),n.defined(e.defined()),a.each(function(a,i,d){var r=a.map(e.values);n.x(function(e,a){return r[a].transposedX}).y(function(e,a){return r[a].transposedY});var o="vertical"===e.orient()?"y":"x";n[o+"0"](function(e,a){return r[a].y0}),n[o+"1"](function(e,a){return r[a].y});var h=l(t.select(d[i]),[a]);h.enter().attr("fill",C.gray),h.attr("d",n),e.decorate()(h,a,i)})};return V(i,e,E("bandwidth","align")),b(i,l,"key"),b(i,n,"curve"),i},e.seriesSvgBar=function(){var e=Ne().x(0).y(0),a=I(),n=x("g","bar"),l=function(e){return"vertical"===a.orient()?e.height:e.width},r=function(e){return"vertical"===a.orient()?e.width:e.height},o=function(e){return"translate("+e[0]+", "+e[1]+")"},h=function(i){i.selection&&n.transition(i),i.each(function(i,d,h){var c=a.orient();if("vertical"!==c&&"horizontal"!==c)throw new Error("The bar series does not support an orientation of "+c);var s=i.filter(a.defined()),u=s.map(a.values);e.width(0).height(0),"vertical"===a.orient()?(e.verticalAlign("top"),e.horizontalAlign("center")):(e.horizontalAlign("right"),e.verticalAlign("center"));var f=n(t.select(h[d]),s);f.enter().attr("transform",function(e,a){return o(u[a].baseOrigin)}).attr("class","bar "+a.orient()).attr("fill",C.darkGray).append("path").attr("d",function(a,t){return r(e)(u[t].width),e([a])}),f.attr("transform",function(e,a){return o(u[a].origin)}).select("path").attr("d",function(a,t){return r(e)(u[t].width),l(e)(-u[t].height),e([a])}),a.decorate()(f,s,d)})};return V(h,a),b(h,n,"key"),h},e.seriesSvgBoxPlot=function(){var e=Ue(),a=x("g","box-plot"),n=Ge().value(0),l=function(e){return function(a){return e.selection?a.transition(e):a}},r=function(e){return"translate("+e.origin[0]+", "+e.origin[1]+")"},o=function(i){i.selection&&a.transition(i);var o=l(i);i.each(function(l,i,d){var h=l.filter(e.defined()),c=a(t.select(d[i]),h);c.enter().attr("stroke",C.black).attr("fill",C.gray).attr("transform",function(a,t){return r(e.values(a,t))+" scale(1e-6, 1)"}).append("path"),n.orient(e.orient()),c.each(function(a,l,i){var d=e.values(a,l);n.median(d.median).upperQuartile(d.upperQuartile).lowerQuartile(d.lowerQuartile).width(d.width).high(d.high).low(d.low),o(t.select(i[l])).attr("transform",r(d)).select("path").attr("d",n([a]))}),e.decorate()(c,l,i)})};return V(o,e),b(o,a,"key"),b(o,n,"cap"),o},e.seriesSvgCandlestick=function(){return _e(Ye(),"candlestick")},e.seriesSvgErrorBar=function(){var e=De(),a=x("g","error-bar"),n=Xe().value(0),l=function(e){return function(a){return e.selection?a.transition(e):a}},r=function(e){return"translate("+e.origin[0]+", "+e.origin[1]+")"},o=function(i){i.selection&&a.transition(i);var o=l(i);i.each(function(l,i,d){var h=l.filter(e.defined()),c=h.map(e.values),s=a(t.select(d[i]),h);s.enter().attr("stroke",C.black).attr("fill",C.gray).attr("transform",function(a,t){return r(e.values(a,t))+" scale(1e-6, 1)"}).append("path"),n.orient(e.orient()),s.each(function(e,a,l){var i=c[a];n.high(i.high).low(i.low).width(i.width),o(t.select(l[a])).attr("transform",r(i)+" scale(1)").select("path").attr("d",n([e]))}),e.decorate()(s,l,i)})};return V(o,e),b(o,a,"key"),o},e.seriesSvgGrouped=function(e){var a=Je(),n=x("g","grouped"),l=function(l){l.selection&&n.transition(l),l.each(function(l,i,d){var r=n(t.select(d[i]),l);r.enter().append("g"),r.select("g").each(function(n,r,o){var h=t.select(o[r]),c="horizontal"!==e.orient(),s=function(e,t){var n=a.offsetScaleForDatum(l,e,t),i=c?a.xScale():a.yScale();return i(e)+n(r)+n.bandwidth()/2};c?(e.xScale(s),e.yScale(a.yScale())):(e.yScale(s),e.xScale(a.xScale())),e.bandwidth&&e.bandwidth(function(e,t){return a.offsetScaleForDatum(l,e,t).bandwidth()}),e.decorate(function(e,t){return a.decorate()(e,t,r)}),h.call(e)})})};return V(l,e,E("decorate","xScale","yScale")),V(l,a,E("offsetScaleForDatum")),l},e.seriesSvgHeatmap=function(){var e=ea(),a=x("g","box"),n=function(e){return"translate("+e.x+", "+e.y+")"},l=function(l){l.each(function(l,i,d){var r=l.filter(e.defined()),o=e.colorValue(),h=e.colorInterpolate(),c=e.colorScale(r),s=a(t.select(d[i]),r);s.enter().append("path").attr("stroke","transparent"),s.attr("transform",function(a,t){return n(e.values(a,t))}).select("path").attr("d",function(a,t){return e.pathGenerator.width(e.values(a,t).width).height(e.values(a,t).height)([a])}).attr("fill",function(e,a){return h(c(o(e,a)))}),e.decorate()(s,l,i)})};return V(l,e),l},e.seriesSvgLine=H,e.seriesSvgMulti=qe,e.seriesSvgOhlc=function(){return _e(ze(),"ohlc")},e.seriesSvgPoint=function(){var e=a.symbol(),n=I(),l=x("g","point"),r=function(e){return"translate("+e[0]+", "+e[1]+")"},o=function(a){a.selection&&l.transition(a),a.each(function(a,i,d){var o=a.filter(n.defined()),h=l(t.select(d[i]),o);h.enter().attr("transform",function(e,a){return r(n.values(e,a).origin)}).attr("fill",C.gray).attr("stroke",C.black).append("path"),h.attr("transform",function(e,a){return r(n.values(e,a).origin)}).select("path").attr("d",e),n.decorate()(h,a,i)})};return V(o,n,E("baseValue","bandwidth","align")),b(o,l,"key"),b(o,e,"type","size"),o},e.seriesSvgRepeat=function(){var e="vertical",a=H(),n=qe(),l=function(l){return l.each(function(l,i,d){"vertical"===e?n.series(l[0].map(function(){return a})).mapping(function(e,a){return e.map(function(e){return e[a]})}):n.series(l.map(function(){return a})).mapping(function(e,a){return e[a]}),t.select(d[i]).call(n)})};return l.series=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],l):a},l.orient=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],l):e},V(l,n,E("series","mapping")),l},e.seriesWebglArea=function(){var e=I(),a=Ce(),t=function(t){var n=j(e.xScale()),l=j(e.yScale()),r=new Float32Array(t.length),o=new Float32Array(t.length),h=new Float32Array(t.length),c=new Float32Array(t.length);t.forEach(function(a,t){r[t]=n.scale(e.crossValue()(a,t)),o[t]=l.scale(e.mainValue()(a,t)),h[t]=l.scale(e.baseValue()(a,t)),c[t]=e.defined()(a,t)}),a.xValues(r).yValues(o).y0Values(h).defined(c).xScale(n.glScale).yScale(l.glScale).decorate(function(a){return e.decorate()(a,t,0)}),a(t.length)};return V(t,e,E("bandwidth","align")),b(t,a,"context"),t},e.seriesWebglBar=function(){var e=I(),a=ke(),t=function(t){var n=t.filter(e.defined()),l=j(e.xScale()),r=j(e.yScale()),o=new Float32Array(n.length),h=new Float32Array(n.length),c=new Float32Array(n.length),s=new Float32Array(n.length);n.forEach(function(a,t){o[t]=l.scale(e.crossValue()(a,t)),h[t]=r.scale(e.baseValue()(a,t)),c[t]=r.scale(e.mainValue()(a,t)),s[t]=r.scale(e.bandwidth()(a,t))}),a.xValues(o).y0Values(h).yValues(c).widths(s).xScale(l.glScale).yScale(r.glScale).decorate(function(a){e.decorate()(a,n,0)}),a(n.length)};return V(t,e,E("align")),b(t,a,"context"),t},e.seriesWebglBoxPlot=function(){var e=Ue(),a=k(.5),t=Re(),n=function(n){var l=n.filter(e.defined()),r=j(e.xScale()),o=j(e.yScale()),h=new Float32Array(l.length),c=new Float32Array(l.length),s=new Float32Array(l.length),u=new Float32Array(l.length),g=new Float32Array(l.length),f=new Float32Array(l.length),p=new Float32Array(l.length),y=new Float32Array(l.length);l.forEach(function(t,n){h[n]=r.scale(e.crossValue()(t,n)),c[n]=o.scale(e.medianValue()(t,n)),s[n]=o.scale(e.upperQuartileValue()(t,n)),u[n]=r.scale(e.lowerQuartileValue()(t,n)),g[n]=o.scale(e.highValue()(t,n)),f[n]=o.scale(e.lowValue()(t,n)),p[n]=e.bandwidth()(t,n),y[n]=p[n]*a(t,n)}),t.xValues(h).medianValues(c).upperQuartileValues(s).lowerQuartileValues(u).highValues(g).lowValues(f).bandwidth(p).capWidth(y).xScale(r.glScale).yScale(o.glScale),t(l.length)};return n.cap=function(){return arguments.length?(a=k(0>=arguments.length?void 0:arguments[0]),n):a},V(n,e,E("align")),b(n,t,"context","lineWidth"),n},e.seriesWebglCandlestick=function(){return Me(Le())},e.seriesWebglErrorBar=function(){var e=De(),a=Ae(),t=function(t){var n=t.filter(e.defined()),l=j(e.xScale()),r=j(e.yScale()),o=new Float32Array(n.length),h=new Float32Array(n.length),c=new Float32Array(n.length),s=new Float32Array(n.length);n.forEach(function(a,t){o[t]=l.scale(e.crossValue()(a,t)),h[t]=r.scale(e.highValue()(a,t)),c[t]=r.scale(e.lowValue()(a,t)),s[t]=e.bandwidth()(a,t)}),a.xValues(o).highValues(h).lowValues(c).bandwidth(s).xScale(l.glScale).yScale(r.glScale),a(n.length)};return V(t,e,E("align")),b(t,a,"context","lineWidth"),t},e.seriesWebglLine=function(){function e(){return"vertical"===a.orient()?{x:a.crossValue(),y:a.mainValue(),defined:a.defined()}:{x:a.mainValue(),y:a.crossValue(),defined:a.defined()}}var a=I(),t=Ve(),n=function(n){var l=j(a.xScale()),r=j(a.yScale()),o=e(),h=new Float32Array(n.length),c=new Float32Array(n.length),s=new Float32Array(n.length);n.forEach(function(e,a){h[a]=l.scale(o.x(e,a)),c[a]=r.scale(o.y(e,a)),s[a]=o.defined(e,a)}),t.xValues(h).yValues(c).defined(s).xScale(l.glScale).yScale(r.glScale).decorate(function(e){a.decorate()(e,n,0)}),t(n.length)};return V(n,a,E("baseValue","bandwidth","align")),b(n,t,"context","lineWidth"),n},e.seriesWebglMulti=Ke,e.seriesWebglOhlc=function(){return Me(Ee())},e.seriesWebglPoint=function(){function e(){return"vertical"===a.orient()?{x:a.crossValue(),y:a.mainValue()}:{x:a.mainValue(),y:a.crossValue()}}var a=I(),t=64,n=y.symbolCircle,l=be(),i=function(i){var d=i.filter(a.defined()),r=j(a.xScale()),o=j(a.yScale()),h=xe(n),c=e(),s=new Float32Array(d.length),u=new Float32Array(d.length),g=new Float32Array(d.length);d.forEach(function(e,a){var n="function"==typeof t?t:function(){return t};s[a]=r.scale(c.x(e,a)),u[a]=o.scale(c.y(e,a)),g[a]=n(e)}),l.xValues(s).yValues(u).sizes(g).xScale(r.glScale).yScale(o.glScale).type(h).decorate(function(e){return a.decorate()(e,d,0)}),l(d.length)};return i.size=function(){return arguments.length?(t=0>=arguments.length?void 0:arguments[0],i):t},i.type=function(){return arguments.length?(n=0>=arguments.length?void 0:arguments[0],i):n},V(i,a,E("baseValue","bandwidth","align")),b(i,l,"context"),i},e.seriesWebglRepeat=Ze,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -6,2 +6,10 @@ # Change Log

## [4.3.3](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-series@4.3.2...@d3fc/d3fc-series@4.3.3) (2020-01-20)
**Note:** Version bump only for package @d3fc/d3fc-series
## [4.3.2](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-series@4.3.1...@d3fc/d3fc-series@4.3.2) (2020-01-20)

@@ -8,0 +16,0 @@

{
"name": "@d3fc/d3fc-series",
"version": "4.3.2",
"version": "4.3.3",
"description": "A collection of components for rendering data series to SVG and canvas, including line, bar, OHLC, candlestick and more",

@@ -35,3 +35,3 @@ "license": "MIT",

"@d3fc/d3fc-shape": "^5.0.19",
"@d3fc/d3fc-webgl": "^1.2.2",
"@d3fc/d3fc-webgl": "^1.2.3",
"d3-array": "^1.0.0",

@@ -45,3 +45,3 @@ "d3-scale": "^1.0.1",

},
"gitHead": "ed03c14cf26bc2e7dd3fea024f3552ce3c6ec59f"
"gitHead": "0a21acc899fa3bfa938decd5fda616b97ff28d8d"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc