diff --git a/CHANGELOG.md b/CHANGELOG.md index f0c588ed316..631e73213ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,19 @@ To see all merged commits on the master branch that will be part of the next plo where X.Y.Z is the semver of most recent plotly.js release. +## [3.3.0] -- 2025-11-14 + +### Added +- Add `hovertemplate` for `candlestick` and `ohlc` traces [[#7619](https://github.com/plotly/plotly.js/pull/7619)] +- Generate list of ISO codes for provided topojson maps, update info for some disputed territories [[#7622](https://github.com/plotly/plotly.js/pull/7622)] + +### Changed +- Turn off borders for plot container in CSS reset [[#7617](https://github.com/plotly/plotly.js/pull/7617)] + +### Fixed +- Fix KDE sampling precision in violin trace to eliminate floating-point drift and prevent density underrun/overrun [[#7581](https://github.com/plotly/plotly.js/pull/7581)], with thanks to @Koookadooo for the contribution! + + ## [3.2.0] -- 2025-10-30 ### Added diff --git a/CITATION.cff b/CITATION.cff index 0adff8d2af8..3a34dccb1f4 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -9,7 +9,7 @@ authors: - family-names: "Samimi" given-names: "Mojtaba" title: "Open source Plotly charting library" -version: 3.2.0 +version: 3.3.0 doi: 10.5281/zenodo.13964707 -date-released: 2025-10-30 +date-released: 2025-11-14 url: "https://github.com/plotly/plotly.js" diff --git a/README.md b/README.md index 2bd9d5388b3..f3d48996df4 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo ```html
- + @@ -79,7 +79,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag. ```html ``` @@ -89,7 +89,7 @@ Fastly supports Plotly.js with free CDN service. Read more atp?1:c>=p?0:NaN}e.descending=function(c,p){return p =p.length)return S?S.call(c,N):A?N.sort(A):N;for(var W=-1,j=N.length,ee=p[G++],he,Te,te,oe=new b,ue;++W =0&&(x=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),ye.hasOwnProperty(x)?{space:ye[x],local:c}:c}},ge.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node();return c=e.ns.qualify(c),c.local?x.getAttributeNS(c.space,c.local):x.getAttribute(c)}for(p in c)this.each(we(p,c[p]));return this}return this.each(we(c,p))};function we(c,p){c=e.ns.qualify(c);function x(){this.removeAttribute(c)}function A(){this.removeAttributeNS(c.space,c.local)}function S(){this.setAttribute(c,p)}function L(){this.setAttributeNS(c.space,c.local,p)}function P(){var N=p.apply(this,arguments);N==null?this.removeAttribute(c):this.setAttribute(c,N)}function E(){var N=p.apply(this,arguments);N==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,N)}return p==null?c.local?A:x:typeof p=="function"?c.local?E:P:c.local?L:S}function pe(c){return c.trim().replace(/\s+/g," ")}ge.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node(),A=(c=Fe(c)).length,S=-1;if(p=x.classList){for(;++S=0;)(L=x[A])&&(S&&S!==L.nextSibling&&S.parentNode.insertBefore(L,S),S=L);return this},ge.sort=function(c){c=be.apply(this,arguments);for(var p=-1,x=this.length;++p p?1:c>=p?0:NaN}e.descending=function(c,p){return p =p.length)return S?S.call(c,N):A?N.sort(A):N;for(var W=-1,j=N.length,ee=p[G++],he,Te,te,oe=new b,ue;++W =0&&(x=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),ye.hasOwnProperty(x)?{space:ye[x],local:c}:c}},ge.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node();return c=e.ns.qualify(c),c.local?x.getAttributeNS(c.space,c.local):x.getAttribute(c)}for(p in c)this.each(we(p,c[p]));return this}return this.each(we(c,p))};function we(c,p){c=e.ns.qualify(c);function x(){this.removeAttribute(c)}function A(){this.removeAttributeNS(c.space,c.local)}function S(){this.setAttribute(c,p)}function L(){this.setAttributeNS(c.space,c.local,p)}function P(){var N=p.apply(this,arguments);N==null?this.removeAttribute(c):this.setAttribute(c,N)}function E(){var N=p.apply(this,arguments);N==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,N)}return p==null?c.local?A:x:typeof p=="function"?c.local?E:P:c.local?L:S}function pe(c){return c.trim().replace(/\s+/g," ")}ge.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node(),A=(c=Fe(c)).length,S=-1;if(p=x.classList){for(;++S=0;)(L=x[A])&&(S&&S!==L.nextSibling&&S.parentNode.insertBefore(L,S),S=L);return this},ge.sort=function(c){c=be.apply(this,arguments);for(var p=-1,x=this.length;++p le)E=E.L;else if(P=p-fN(E,x),P>le){if(!E.R){A=E;break}E=E.R}else{L>-le?(A=E.P,S=E):P>-le?(A=E,S=E.N):A=S=E;break}var N=j3(c);if(as.insert(A,N),!(!A&&!S)){if(A===S){is(A),S=j3(A.site),as.insert(N,S),N.edge=S.edge=Ru(A.site,N.site),ns(A),ns(S);return}if(!S){N.edge=Ru(A.site,N.site);return}is(A),is(S);var G=A.site,W=G.x,j=G.y,ee=c.x-W,he=c.y-j,Te=S.site,te=Te.x-W,oe=Te.y-j,ue=2*(ee*oe-he*te),xe=ee*ee+he*he,Ae=te*te+oe*oe,ve={x:(oe*xe-he*Ae)/ue+W,y:(ee*Ae-te*xe)/ue+j};Vc(S.edge,G,Te,ve),N.edge=Ru(G,c,null,ve),S.edge=Ru(c,Te,null,ve),ns(A),ns(S)}}function e5(c,p){var x=c.site,A=x.x,S=x.y,L=S-p;if(!L)return A;var P=c.P;if(!P)return-1/0;x=P.site;var E=x.x,N=x.y,G=N-p;if(!G)return E;var W=E-A,j=1/L-1/G,ee=W/G;return j?(-ee+Math.sqrt(ee*ee-2*j*(W*W/(-2*G)-N+G/2+S-L/2)))/j+A:(A+E)/2}function fN(c,p){var x=c.N;if(x)return e5(x,p);var A=c.site;return A.y===p?A.x:1/0}function r5(c){this.site=c,this.edges=[]}r5.prototype.prepare=function(){for(var c=this.edges,p=c.length,x;p--;)x=c[p].edge,(!x.b||!x.a)&&c.splice(p,1);return c.sort(t5),c.length};function cN(c){for(var p=c[0][0],x=c[1][0],A=c[0][1],S=c[1][1],L,P,E,N,G=Gl,W=G.length,j,ee,he,Te,te,oe;W--;)if(j=G[W],!(!j||!j.prepare()))for(he=j.edges,Te=he.length,ee=0;ee 1)if(W>ee){if(!A)A={x:(P-ue)/oe,y:P};else if(A.y>=E)return;x={x:(E-ue)/oe,y:E}}else{if(!A)A={x:(E-ue)/oe,y:E};else if(A.y =L)return;x={x:L,y:oe*L+ue}}else{if(!A)A={x:L,y:oe*L+ue};else if(A.x =0?c.slice(0,p):c,A=p>=0?c.slice(p+1):"in";return x=wN.get(x)||s5,A=TN.get(A)||J,MN(A(x.apply(null,r.call(arguments,1))))};function MN(c){return function(p){return p<=0?0:p>=1?1:c(p)}}function u5(c){return function(p){return 1-c(1-p)}}function f5(c){return function(p){return .5*(p<.5?c(2*p):2-c(2-2*p))}}function AN(c){return c*c}function kN(c){return c*c*c}function SN(c){if(c<=0)return 0;if(c>=1)return 1;var p=c*c,x=p*c;return 4*(c<.5?x:3*(c-p)+x-.75)}function CN(c){return function(p){return Math.pow(p,c)}}function LN(c){return 1-Math.cos(c*sr)}function qN(c){return Math.pow(2,10*(c-1))}function DN(c){return 1-Math.sqrt(1-c*c)}function EN(c,p){var x;return arguments.length<2&&(p=.45),arguments.length?x=p/ar*Math.asin(1/c):(c=1,x=p/4),function(A){return 1+c*Math.pow(2,-10*A)*Math.sin((A-x)*ar/p)}}function PN(c){return c||(c=1.70158),function(p){return p*p*((c+1)*p-c)}}function RN(c){return c<1/2.75?7.5625*c*c:c<2/2.75?7.5625*(c-=1.5/2.75)*c+.75:c<2.5/2.75?7.5625*(c-=2.25/2.75)*c+.9375:7.5625*(c-=2.625/2.75)*c+.984375}e.interpolateHcl=zN;function zN(c,p){c=e.hcl(c),p=e.hcl(p);var x=c.h,A=c.c,S=c.l,L=p.h-x,P=p.c-A,E=p.l-S;return isNaN(P)&&(P=0,A=isNaN(A)?p.c:A),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return mn(x+L*N,A+P*N,S+E*N)+""}}e.interpolateHsl=NN;function NN(c,p){c=e.hsl(c),p=e.hsl(p);var x=c.h,A=c.s,S=c.l,L=p.h-x,P=p.s-A,E=p.l-S;return isNaN(P)&&(P=0,A=isNaN(A)?p.s:A),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return pn(x+L*N,A+P*N,S+E*N)+""}}e.interpolateLab=FN;function FN(c,p){c=e.lab(c),p=e.lab(p);var x=c.l,A=c.a,S=c.b,L=p.l-x,P=p.a-A,E=p.b-S;return function(N){return zc(x+L*N,A+P*N,S+E*N)+""}}e.interpolateRound=c5;function c5(c,p){return p-=c,function(x){return Math.round(c+p*x)}}e.transform=function(c){var p=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(x){if(x!=null){p.setAttribute("transform",x);var A=p.transform.baseVal.consolidate()}return new v5(A?A.matrix:HN)})(c)};function v5(c){var p=[c.a,c.b],x=[c.c,c.d],A=d5(p),S=h5(p,x),L=d5(IN(x,p,-S))||0;p[0]*x[1] 0?L=ve:(x.c=null,x.t=NaN,x=null,p.end({type:"end",alpha:L=0})):ve>0&&(p.start({type:"start",alpha:L=ve}),x=Yc(c.tick)),c):L},c.start=function(){var ve,Ue=he.length,nr=Te.length,ur=A[0],ir=A[1],dr,pr;for(ve=0;ve le)E=E.L;else if(P=p-fN(E,x),P>le){if(!E.R){A=E;break}E=E.R}else{L>-le?(A=E.P,S=E):P>-le?(A=E,S=E.N):A=S=E;break}var N=j3(c);if(as.insert(A,N),!(!A&&!S)){if(A===S){is(A),S=j3(A.site),as.insert(N,S),N.edge=S.edge=Ru(A.site,N.site),ns(A),ns(S);return}if(!S){N.edge=Ru(A.site,N.site);return}is(A),is(S);var G=A.site,W=G.x,j=G.y,ee=c.x-W,he=c.y-j,Te=S.site,te=Te.x-W,oe=Te.y-j,ue=2*(ee*oe-he*te),xe=ee*ee+he*he,Ae=te*te+oe*oe,ve={x:(oe*xe-he*Ae)/ue+W,y:(ee*Ae-te*xe)/ue+j};Vc(S.edge,G,Te,ve),N.edge=Ru(G,c,null,ve),S.edge=Ru(c,Te,null,ve),ns(A),ns(S)}}function e5(c,p){var x=c.site,A=x.x,S=x.y,L=S-p;if(!L)return A;var P=c.P;if(!P)return-1/0;x=P.site;var E=x.x,N=x.y,G=N-p;if(!G)return E;var W=E-A,j=1/L-1/G,ee=W/G;return j?(-ee+Math.sqrt(ee*ee-2*j*(W*W/(-2*G)-N+G/2+S-L/2)))/j+A:(A+E)/2}function fN(c,p){var x=c.N;if(x)return e5(x,p);var A=c.site;return A.y===p?A.x:1/0}function r5(c){this.site=c,this.edges=[]}r5.prototype.prepare=function(){for(var c=this.edges,p=c.length,x;p--;)x=c[p].edge,(!x.b||!x.a)&&c.splice(p,1);return c.sort(t5),c.length};function cN(c){for(var p=c[0][0],x=c[1][0],A=c[0][1],S=c[1][1],L,P,E,N,G=Gl,W=G.length,j,ee,he,Te,te,oe;W--;)if(j=G[W],!(!j||!j.prepare()))for(he=j.edges,Te=he.length,ee=0;ee 1)if(W>ee){if(!A)A={x:(P-ue)/oe,y:P};else if(A.y>=E)return;x={x:(E-ue)/oe,y:E}}else{if(!A)A={x:(E-ue)/oe,y:E};else if(A.y =L)return;x={x:L,y:oe*L+ue}}else{if(!A)A={x:L,y:oe*L+ue};else if(A.x =0?c.slice(0,p):c,A=p>=0?c.slice(p+1):"in";return x=wN.get(x)||s5,A=TN.get(A)||J,MN(A(x.apply(null,r.call(arguments,1))))};function MN(c){return function(p){return p<=0?0:p>=1?1:c(p)}}function u5(c){return function(p){return 1-c(1-p)}}function f5(c){return function(p){return .5*(p<.5?c(2*p):2-c(2-2*p))}}function AN(c){return c*c}function kN(c){return c*c*c}function SN(c){if(c<=0)return 0;if(c>=1)return 1;var p=c*c,x=p*c;return 4*(c<.5?x:3*(c-p)+x-.75)}function CN(c){return function(p){return Math.pow(p,c)}}function LN(c){return 1-Math.cos(c*sr)}function qN(c){return Math.pow(2,10*(c-1))}function DN(c){return 1-Math.sqrt(1-c*c)}function EN(c,p){var x;return arguments.length<2&&(p=.45),arguments.length?x=p/ar*Math.asin(1/c):(c=1,x=p/4),function(A){return 1+c*Math.pow(2,-10*A)*Math.sin((A-x)*ar/p)}}function PN(c){return c||(c=1.70158),function(p){return p*p*((c+1)*p-c)}}function RN(c){return c<1/2.75?7.5625*c*c:c<2/2.75?7.5625*(c-=1.5/2.75)*c+.75:c<2.5/2.75?7.5625*(c-=2.25/2.75)*c+.9375:7.5625*(c-=2.625/2.75)*c+.984375}e.interpolateHcl=zN;function zN(c,p){c=e.hcl(c),p=e.hcl(p);var x=c.h,A=c.c,S=c.l,L=p.h-x,P=p.c-A,E=p.l-S;return isNaN(P)&&(P=0,A=isNaN(A)?p.c:A),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return mn(x+L*N,A+P*N,S+E*N)+""}}e.interpolateHsl=NN;function NN(c,p){c=e.hsl(c),p=e.hsl(p);var x=c.h,A=c.s,S=c.l,L=p.h-x,P=p.s-A,E=p.l-S;return isNaN(P)&&(P=0,A=isNaN(A)?p.s:A),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return pn(x+L*N,A+P*N,S+E*N)+""}}e.interpolateLab=FN;function FN(c,p){c=e.lab(c),p=e.lab(p);var x=c.l,A=c.a,S=c.b,L=p.l-x,P=p.a-A,E=p.b-S;return function(N){return zc(x+L*N,A+P*N,S+E*N)+""}}e.interpolateRound=c5;function c5(c,p){return p-=c,function(x){return Math.round(c+p*x)}}e.transform=function(c){var p=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(x){if(x!=null){p.setAttribute("transform",x);var A=p.transform.baseVal.consolidate()}return new v5(A?A.matrix:HN)})(c)};function v5(c){var p=[c.a,c.b],x=[c.c,c.d],A=d5(p),S=h5(p,x),L=d5(IN(x,p,-S))||0;p[0]*x[1] 0?L=ve:(x.c=null,x.t=NaN,x=null,p.end({type:"end",alpha:L=0})):ve>0&&(p.start({type:"start",alpha:L=ve}),x=Yc(c.tick)),c):L},c.start=function(){var ve,Ue=he.length,nr=Te.length,ur=A[0],ir=A[1],dr,pr;for(ve=0;ve>>1;c(p[L],x)<0?A=L+1:S=L}return A},right:function(p,x,A,S){for(arguments.length<3&&(A=0),arguments.length<4&&(S=p.length);A>>1;c(p[L],x)>0?S=L:A=L+1}return A}}}var y=m(v);e.bisectLeft=y.left,e.bisect=e.bisectRight=y.right,e.bisector=function(c){return m(c.length===1?function(p,x){return v(c(p),x)}:c)},e.shuffle=function(c,p,x){(A=arguments.length)<3&&(x=c.length,A<2&&(p=0));for(var A=x-p,S,L;A;)L=Math.random()*A--|0,S=c[A+p],c[A+p]=c[L+p],c[L+p]=S;return c},e.permute=function(c,p){for(var x=p.length,A=new Array(x);x--;)A[x]=c[p[x]];return A},e.pairs=function(c){for(var p=0,x=c.length-1,A,S=c[0],L=new Array(x<0?0:x);p0?1:c<0?-1:0}function it(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function _t(c){return c>1?0:c<-1?De:Math.acos(c)}function yt(c){return c>1?sr:c<-1?-sr:Math.asin(c)}function Dt(c){return((c=Math.exp(c))-1/c)/2}function Kt(c){return((c=Math.exp(c))+1/c)/2}function La(c){return((c=Math.exp(2*c))-1)/(c+1)}function sa(c){return(c=Math.sin(c/2))*c}var ua=Math.SQRT2,vr=2,lt=4;e.interpolateZoom=function(c,p){var x=c[0],A=c[1],S=c[2],L=p[0],P=p[1],E=p[2],N=L-x,G=P-A,W=N*N+G*G,j,ee;if(W>4,A=A>>4|A,S=N&240,S=S>>4|S,L=N&15,L=L<<4|L):c.length===7&&(A=(N&16711680)>>16,S=(N&65280)>>8,L=N&255)),p(A,S,L))}function jr(c,p,x){var A=Math.min(c/=255,p/=255,x/=255),S=Math.max(c,p,x),L=S-A,P,E,N=(S+A)/2;return L?(E=N<.5?L/(S+A):L/(2-S-A),c==S?P=(p-x)/L+(p>>1;c(p[L],x)<0?A=L+1:S=L}return A},right:function(p,x,A,S){for(arguments.length<3&&(A=0),arguments.length<4&&(S=p.length);A>>1;c(p[L],x)>0?S=L:A=L+1}return A}}}var y=m(v);e.bisectLeft=y.left,e.bisect=e.bisectRight=y.right,e.bisector=function(c){return m(c.length===1?function(p,x){return v(c(p),x)}:c)},e.shuffle=function(c,p,x){(A=arguments.length)<3&&(x=c.length,A<2&&(p=0));for(var A=x-p,S,L;A;)L=Math.random()*A--|0,S=c[A+p],c[A+p]=c[L+p],c[L+p]=S;return c},e.permute=function(c,p){for(var x=p.length,A=new Array(x);x--;)A[x]=c[p[x]];return A},e.pairs=function(c){for(var p=0,x=c.length-1,A,S=c[0],L=new Array(x<0?0:x);p0?1:c<0?-1:0}function it(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function _t(c){return c>1?0:c<-1?De:Math.acos(c)}function yt(c){return c>1?sr:c<-1?-sr:Math.asin(c)}function Dt(c){return((c=Math.exp(c))-1/c)/2}function Kt(c){return((c=Math.exp(c))+1/c)/2}function La(c){return((c=Math.exp(2*c))-1)/(c+1)}function sa(c){return(c=Math.sin(c/2))*c}var ua=Math.SQRT2,vr=2,lt=4;e.interpolateZoom=function(c,p){var x=c[0],A=c[1],S=c[2],L=p[0],P=p[1],E=p[2],N=L-x,G=P-A,W=N*N+G*G,j,ee;if(W>4,A=A>>4|A,S=N&240,S=S>>4|S,L=N&15,L=L<<4|L):c.length===7&&(A=(N&16711680)>>16,S=(N&65280)>>8,L=N&255)),p(A,S,L))}function jr(c,p,x){var A=Math.min(c/=255,p/=255,x/=255),S=Math.max(c,p,x),L=S-A,P,E,N=(S+A)/2;return L?(E=N<.5?L/(S+A):L/(2-S-A),c==S?P=(p-x)/L+(p=W&&ue.x<=ee&&ue.y>=j&&ue.y<=he?[[W,he],[ee,he],[ee,j],[W,j]]:[];xe.point=N[te]}),G}function E(N){return N.map(function(G,W){return{x:Math.round(A(G,W)/le)*le,y:Math.round(S(G,W)/le)*le,i:W}})}return P.links=function(N){return _1(E(N)).edges.filter(function(G){return G.l&&G.r}).map(function(G){return{source:N[G.l.i],target:N[G.r.i]}})},P.triangles=function(N){var G=[];return _1(E(N)).cells.forEach(function(W,j){for(var ee=W.site,he=W.edges.sort(t5),Te=-1,te=he.length,oe,ue,xe=he[te-1].edge,Ae=xe.l===ee?xe.r:xe.l;++Te0&&(R=0);break}return R>0?k.slice(0,R)+k.slice(z+1):k}var f;function v(k,q){var D=t(k,q);if(!D)return k+"";var R=D[0],z=D[1],F=z-(f=Math.max(-8,Math.min(8,Math.floor(z/3)))*3)+1,I=R.length;return F===I?R:F>I?R+new Array(F-I+1).join("0"):F>0?R.slice(0,F)+"."+R.slice(F):"0."+new Array(1-F).join("0")+t(k,Math.max(0,q+F-1))[0]}function h(k,q){var D=t(k,q);if(!D)return k+"";var R=D[0],z=D[1];return z<0?"0."+new Array(-z).join("0")+R:R.length>z+1?R.slice(0,z+1)+"."+R.slice(z+1):R+new Array(z-R.length+2).join("0")}var d={"%":function(k,q){return(k*100).toFixed(q)},b:function(k){return Math.round(k).toString(2)},c:function(k){return k+""},d:r,e:function(k,q){return k.toExponential(q)},f:function(k,q){return k.toFixed(q)},g:function(k,q){return k.toPrecision(q)},o:function(k){return Math.round(k).toString(8)},p:function(k,q){return h(k*100,q)},r:h,s:v,X:function(k){return Math.round(k).toString(16).toUpperCase()},x:function(k){return Math.round(k).toString(16)}};function m(k){return k}var y=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function _(k){var q=k.grouping===void 0||k.thousands===void 0?m:n(y.call(k.grouping,Number),k.thousands+""),D=k.currency===void 0?"":k.currency[0]+"",R=k.currency===void 0?"":k.currency[1]+"",z=k.decimal===void 0?".":k.decimal+"",F=k.numerals===void 0?m:i(y.call(k.numerals,String)),I=k.percent===void 0?"%":k.percent+"",H=k.minus===void 0?"-":k.minus+"",J=k.nan===void 0?"NaN":k.nan+"";function X(O){O=o(O);var V=O.fill,Q=O.align,K=O.sign,ne=O.symbol,me=O.zero,de=O.width,ke=O.comma,re=O.precision,Ce=O.trim,ce=O.type;ce==="n"?(ke=!0,ce="g"):d[ce]||(re===void 0&&(re=12),Ce=!0,ce="g"),(me||V==="0"&&Q==="=")&&(me=!0,V="0",Q="=");var _e=ne==="$"?D:ne==="#"&&/[boxX]/.test(ce)?"0"+ce.toLowerCase():"",se=ne==="$"?R:/[%p]/.test(ce)?I:"",ge=d[ce],B=/[defgprs%]/.test(ce);re=re===void 0?6:/[gprs]/.test(ce)?Math.max(1,Math.min(21,re)):Math.max(0,Math.min(20,re));function $(U){var ye=_e,we=se,pe,Re,Fe;if(ce==="c")we=ge(U)+we,U="";else{U=+U;var Ee=U<0||1/U<0;if(U=isNaN(U)?J:ge(Math.abs(U),re),Ce&&(U=u(U)),Ee&&+U==0&&K!=="+"&&(Ee=!1),ye=(Ee?K==="("?K:H:K==="-"||K==="("?"":K)+ye,we=(ce==="s"?g[8+f/3]:"")+we+(Ee&&K==="("?")":""),B){for(pe=-1,Re=U.length;++pe
>4,g[f++]=(h&15)<<4|d>>2,g[f++]=(d&3)<<6|m&63;return y};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var al=Z((Tie,xb)=>{"use strict";xb.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var an=Z(Un=>{"use strict";var fI=G1().decode,cI=al(),W1=Array.isArray,vI=ArrayBuffer,hI=DataView;function _b(e){return vI.isView(e)&&!(e instanceof hI)}Un.isTypedArray=_b;function pv(e){return W1(e)||_b(e)}Un.isArrayOrTypedArray=pv;function dI(e){return!pv(e[0])}Un.isArray1D=dI;Un.ensureArray=function(e,r){return W1(e)||(e=[]),e.length=r,e};var na={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};na.uint8c=na.u1c;na.uint8=na.u1;na.int8=na.i1;na.uint16=na.u2;na.int16=na.i2;na.uint32=na.u4;na.int32=na.i4;na.float32=na.f4;na.float64=na.f8;function Z1(e){return e.constructor===ArrayBuffer}Un.isArrayBuffer=Z1;Un.decodeTypedArraySpec=function(e){var r=[],t=pI(e),a=t.dtype,n=na[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,l=t.bdata;Z1(l)||(l=fI(l));var o=t.shape===void 0?[l.byteLength/i]:(""+t.shape).split(",");o.reverse();var s=o.length,u,f,v=+o[0],h=i*v,d=0;if(s===1)r=new n(l);else if(s===2)for(u=+o[1],f=0;f{"use strict";var Tb=Hr(),J1=an().isArrayOrTypedArray;Sb.exports=function(r,t){if(Tb(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,l,o;for(o=0;o
/g),f=0;f=W&&ue.x<=ee&&ue.y>=j&&ue.y<=he?[[W,he],[ee,he],[ee,j],[W,j]]:[];xe.point=N[te]}),G}function E(N){return N.map(function(G,W){return{x:Math.round(A(G,W)/le)*le,y:Math.round(S(G,W)/le)*le,i:W}})}return P.links=function(N){return _1(E(N)).edges.filter(function(G){return G.l&&G.r}).map(function(G){return{source:N[G.l.i],target:N[G.r.i]}})},P.triangles=function(N){var G=[];return _1(E(N)).cells.forEach(function(W,j){for(var ee=W.site,he=W.edges.sort(t5),Te=-1,te=he.length,oe,ue,xe=he[te-1].edge,Ae=xe.l===ee?xe.r:xe.l;++Te0&&(R=0);break}return R>0?k.slice(0,R)+k.slice(z+1):k}var f;function v(k,q){var D=t(k,q);if(!D)return k+"";var R=D[0],z=D[1],F=z-(f=Math.max(-8,Math.min(8,Math.floor(z/3)))*3)+1,I=R.length;return F===I?R:F>I?R+new Array(F-I+1).join("0"):F>0?R.slice(0,F)+"."+R.slice(F):"0."+new Array(1-F).join("0")+t(k,Math.max(0,q+F-1))[0]}function h(k,q){var D=t(k,q);if(!D)return k+"";var R=D[0],z=D[1];return z<0?"0."+new Array(-z).join("0")+R:R.length>z+1?R.slice(0,z+1)+"."+R.slice(z+1):R+new Array(z-R.length+2).join("0")}var d={"%":function(k,q){return(k*100).toFixed(q)},b:function(k){return Math.round(k).toString(2)},c:function(k){return k+""},d:r,e:function(k,q){return k.toExponential(q)},f:function(k,q){return k.toFixed(q)},g:function(k,q){return k.toPrecision(q)},o:function(k){return Math.round(k).toString(8)},p:function(k,q){return h(k*100,q)},r:h,s:v,X:function(k){return Math.round(k).toString(16).toUpperCase()},x:function(k){return Math.round(k).toString(16)}};function m(k){return k}var y=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function _(k){var q=k.grouping===void 0||k.thousands===void 0?m:n(y.call(k.grouping,Number),k.thousands+""),D=k.currency===void 0?"":k.currency[0]+"",R=k.currency===void 0?"":k.currency[1]+"",z=k.decimal===void 0?".":k.decimal+"",F=k.numerals===void 0?m:i(y.call(k.numerals,String)),I=k.percent===void 0?"%":k.percent+"",H=k.minus===void 0?"-":k.minus+"",J=k.nan===void 0?"NaN":k.nan+"";function X(O){O=o(O);var V=O.fill,Q=O.align,K=O.sign,ne=O.symbol,me=O.zero,de=O.width,ke=O.comma,re=O.precision,Ce=O.trim,ce=O.type;ce==="n"?(ke=!0,ce="g"):d[ce]||(re===void 0&&(re=12),Ce=!0,ce="g"),(me||V==="0"&&Q==="=")&&(me=!0,V="0",Q="=");var _e=ne==="$"?D:ne==="#"&&/[boxX]/.test(ce)?"0"+ce.toLowerCase():"",se=ne==="$"?R:/[%p]/.test(ce)?I:"",ge=d[ce],B=/[defgprs%]/.test(ce);re=re===void 0?6:/[gprs]/.test(ce)?Math.max(1,Math.min(21,re)):Math.max(0,Math.min(20,re));function $(U){var ye=_e,we=se,pe,Re,Fe;if(ce==="c")we=ge(U)+we,U="";else{U=+U;var Ee=U<0||1/U<0;if(U=isNaN(U)?J:ge(Math.abs(U),re),Ce&&(U=u(U)),Ee&&+U==0&&K!=="+"&&(Ee=!1),ye=(Ee?K==="("?K:H:K==="-"||K==="("?"":K)+ye,we=(ce==="s"?g[8+f/3]:"")+we+(Ee&&K==="("?")":""),B){for(pe=-1,Re=U.length;++pe
>4,g[f++]=(h&15)<<4|d>>2,g[f++]=(d&3)<<6|m&63;return y};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var al=Z((Tie,xb)=>{"use strict";xb.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var an=Z(Un=>{"use strict";var fI=G1().decode,cI=al(),W1=Array.isArray,vI=ArrayBuffer,hI=DataView;function _b(e){return vI.isView(e)&&!(e instanceof hI)}Un.isTypedArray=_b;function pv(e){return W1(e)||_b(e)}Un.isArrayOrTypedArray=pv;function dI(e){return!pv(e[0])}Un.isArray1D=dI;Un.ensureArray=function(e,r){return W1(e)||(e=[]),e.length=r,e};var na={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};na.uint8c=na.u1c;na.uint8=na.u1;na.int8=na.i1;na.uint16=na.u2;na.int16=na.i2;na.uint32=na.u4;na.int32=na.i4;na.float32=na.f4;na.float64=na.f8;function Z1(e){return e.constructor===ArrayBuffer}Un.isArrayBuffer=Z1;Un.decodeTypedArraySpec=function(e){var r=[],t=pI(e),a=t.dtype,n=na[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,l=t.bdata;Z1(l)||(l=fI(l));var o=t.shape===void 0?[l.byteLength/i]:(""+t.shape).split(",");o.reverse();var s=o.length,u,f,v=+o[0],h=i*v,d=0;if(s===1)r=new n(l);else if(s===2)for(u=+o[1],f=0;f{"use strict";var Tb=Hr(),J1=an().isArrayOrTypedArray;Sb.exports=function(r,t){if(Tb(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,l,o;for(o=0;o
/g),f=0;f