LocalCDN-Firefox-Chrome-Brave/resources/d3-legend/2.25.6/d3-legend.min.jsm

3 lines
89 KiB
JavaScript
Raw Normal View History

2020-06-07 17:47:22 +02:00
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,b){return a<b?-1:a>b?1:a>=b?0:NaN}function c(a){return 1===a.length&&(a=d(a)),{left:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function d(a){return function(c,d){return b(a(c),d)}}function e(a,b){return b<a?-1:b>a?1:b>=a?0:NaN}function f(a){return null===a?NaN:+a}function g(a,b){var c,d,e=a.length,g=0,h=0,i=-1,j=0;if(null==b)for(;++i<e;)isNaN(c=f(a[i]))||(d=c-g,g+=d/++j,h+=d*(c-g));else for(;++i<e;)isNaN(c=f(b(a[i],i,a)))||(d=c-g,g+=d/++j,h+=d*(c-g));if(j>1)return h/(j-1)}function h(a,b){var c=g(a,b);return c?Math.sqrt(c):c}function i(a,b){var c,d,e,f=-1,g=a.length;if(null==b){for(;++f<g;)if(null!=(d=a[f])&&d>=d){c=e=d;break}for(;++f<g;)null!=(d=a[f])&&(c>d&&(c=d),e<d&&(e=d))}else{for(;++f<g;)if(null!=(d=b(a[f],f,a))&&d>=d){c=e=d;break}for(;++f<g;)null!=(d=b(a[f],f,a))&&(c>d&&(c=d),e<d&&(e=d))}return[c,e]}function j(a){return function(){return a}}function k(a){return a}function l(a,b,c){a=+a,b=+b,c=(e=arguments.length)<2?(b=a,a=0,1):e<3?1:+c;for(var d=-1,e=0|Math.max(0,Math.ceil((b-a)/c)),f=new Array(e);++d<e;)f[d]=a+d*c;return f}function m(a,b,c){var d=n(a,b,c);return l(Math.ceil(a/d)*d,Math.floor(b/d)*d+d/2,d)}function n(a,b,c){var d=Math.abs(b-a)/Math.max(0,c),e=Math.pow(10,Math.floor(Math.log(d)/Math.LN10)),f=d/e;return f>=M?e*=10:f>=N?e*=5:f>=O&&(e*=2),b<a?-e:e}function o(a){return Math.ceil(Math.log(a.length)/Math.LN2)+1}function p(){function a(a){var e,f,g=a.length,h=new Array(g);for(e=0;e<g;++e)h[e]=b(a[e],e,a);var i=c(h),j=i[0],k=i[1],l=d(h,j,k);Array.isArray(l)||(l=m(j,k,l));for(var n=l.length;l[0]<=j;)l.shift(),--n;for(;l[n-1]>=k;)l.pop(),--n;var o,p=new Array(n+1);for(e=0;e<=n;++e)o=p[e]=[],o.x0=e>0?l[e-1]:j,o.x1=e<n?l[e]:k;for(e=0;e<g;++e)f=h[e],j<=f&&f<=k&&p[H(l,f,0,n)].push(a[e]);return p}var b=k,c=i,d=o;return a.value=function(c){return arguments.length?(b="function"==typeof c?c:j(c),a):b},a.domain=function(b){return arguments.length?(c="function"==typeof b?b:j([b[0],b[1]]),a):c},a.thresholds=function(b){return arguments.length?(d="function"==typeof b?b:j(Array.isArray(b)?K.call(b):b),a):d},a}function q(a,b,c){if(null==c&&(c=f),d=a.length){if((b=+b)<=0||d<2)return+c(a[0],0,a);if(b>=1)return+c(a[d-1],d-1,a);var d,e=(d-1)*b,g=Math.floor(e),h=+c(a[g],g,a),i=+c(a[g+1],g+1,a);return h+(i-h)*(e-g)}}function r(a,c,d){return a=L.call(a,f).sort(b),Math.ceil((d-c)/(2*(q(a,.75)-q(a,.25))*Math.pow(a.length,-1/3)))}function s(a,b,c){return Math.ceil((c-b)/(3.5*h(a)*Math.pow(a.length,-1/3)))}function t(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e<f;)if(null!=(d=a[e])&&d>=d){c=d;break}for(;++e<f;)null!=(d=a[e])&&d>c&&(c=d)}else{for(;++e<f;)if(null!=(d=b(a[e],e,a))&&d>=d){c=d;break}for(;++e<f;)null!=(d=b(a[e],e,a))&&d>c&&(c=d)}return c}function u(a,b){var c,d=0,e=a.length,g=-1,h=e;if(null==b)for(;++g<e;)isNaN(c=f(a[g]))?--h:d+=c;else for(;++g<e;)isNaN(c=f(b(a[g],g,a)))?--h:d+=c;if(h)return d/h}function v(a,c){var d,e=[],g=a.length,h=-1;if(null==c)for(;++h<g;)isNaN(d=f(a[h]))||e.push(d);else for(;++h<g;)isNaN(d=f(c(a[h],h,a)))||e.push(d);return q(e.sort(b),.5)}function w(a){for(var b,c,d,e=a.length,f=-1,g=0;++f<e;)g+=a[f].length;for(c=new Array(g);--e>=0;)for(d=a[e],b=d.length;--b>=0;)c[--g]=d[b];return c}function x(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e<f;)if(null!=(d=a[e])&&d>=d){c=d;break}fo
var a=f().length,e=h[1]<h[0],i=h[e-0],j=h[1-e];c=(j-i)/Math.max(1,a-l+2*m),k&&(c=Math.floor(c)),i+=(j-i-c*(a-l))*n,d=c*(1-l),k&&(i=Math.round(i),d=Math.round(d));var o=b.range(a).map(function(a){return i+c*a});return g(e?o.reverse():o)}var c,d,e=i().unknown(void 0),f=e.domain,g=e.range,h=[0,1],k=!1,l=0,m=0,n=.5;return delete e.unknown,e.domain=function(b){return arguments.length?(f(b),a()):f()},e.range=function(b){return arguments.length?(h=[+b[0],+b[1]],a()):h.slice()},e.rangeRound=function(b){return h=[+b[0],+b[1]],k=!0,a()},e.bandwidth=function(){return d},e.step=function(){return c},e.round=function(b){return arguments.length?(k=!!b,a()):k},e.padding=function(b){return arguments.length?(l=m=Math.max(0,Math.min(1,b)),a()):l},e.paddingInner=function(b){return arguments.length?(l=Math.max(0,Math.min(1,b)),a()):l},e.paddingOuter=function(b){return arguments.length?(m=Math.max(0,Math.min(1,b)),a()):m},e.align=function(b){return arguments.length?(n=Math.max(0,Math.min(1,b)),a()):n},e.copy=function(){return j().domain(f()).range(h).round(k).paddingInner(l).paddingOuter(m).align(n)},a()}function k(a){var b=a.copy;return a.padding=a.paddingOuter,delete a.paddingInner,delete a.paddingOuter,a.copy=function(){return k(b())},a}function l(){return k(j().paddingInner(1))}function m(a){return function(){return a}}function n(a){return+a}function o(a,b){return(b-=a=+a)?function(c){return(c-a)/b}:m(b)}function p(a){return function(b,c){var d=a(b=+b,c=+c);return function(a){return a<=b?0:a>=c?1:d(a)}}}function q(a){return function(b,c){var d=a(b=+b,c=+c);return function(a){return a<=0?b:a>=1?c:d(a)}}}function r(a,b,c,d){var e=a[0],f=a[1],g=b[0],h=b[1];return f<e?(e=c(f,e),g=d(h,g)):(e=c(e,f),g=d(g,h)),function(a){return g(e(a))}}function s(a,c,d,e){var f=Math.min(a.length,c.length)-1,g=new Array(f),h=new Array(f),i=-1;for(a[f]<a[0]&&(a=a.slice().reverse(),c=c.slice().reverse());++i<f;)g[i]=d(a[i],a[i+1]),h[i]=e(c[i],c[i+1]);return function(c){var d=b.bisect(a,c,1,f)-1;return h[d](g[d](c))}}function t(a,b){return b.domain(a.domain()).range(a.range()).interpolate(a.interpolate()).clamp(a.clamp())}function u(a,b){function c(){return f=Math.min(i.length,j.length)>2?s:r,g=h=null,e}function e(b){return(g||(g=f(i,j,l?p(a):a,k)))(+b)}var f,g,h,i=$,j=$,k=d.interpolate,l=!1;return e.invert=function(a){return(h||(h=f(j,i,o,l?q(b):b)))(+a)},e.domain=function(a){return arguments.length?(i=X.call(a,n),c()):i.slice()},e.range=function(a){return arguments.length?(j=Y.call(a),c()):j.slice()},e.rangeRound=function(a){return j=Y.call(a),k=d.interpolateRound,c()},e.clamp=function(a){return arguments.length?(l=!!a,c()):l},e.interpolate=function(a){return arguments.length?(k=a,c()):k},c()}function v(a,c,d){var f,g=a[0],h=a[a.length-1],i=b.tickStep(g,h,null==c?10:c);switch(d=e.formatSpecifier(null==d?",f":d),d.type){case"s":var j=Math.max(Math.abs(g),Math.abs(h));return null!=d.precision||isNaN(f=e.precisionPrefix(i,j))||(d.precision=f),e.formatPrefix(d,j);case"":case"e":case"g":case"p":case"r":null!=d.precision||isNaN(f=e.precisionRound(i,Math.max(Math.abs(g),Math.abs(h))))||(d.precision=f-("e"===d.type));break;case"f":case"%":null!=d.precision||isNaN(f=e.precisionFixed(i))||(d.precision=f-2*("%"===d.type))}return e.format(d)}function w(a){var c=a.domain;return a.ticks=function(a){var d=c();return b.ticks(d[0],d[d.length-1],null==a?10:a)},a.tickFormat=function(a,b){return v(c(),a,b)},a.nice=function(d){var e=c(),f=e.length-1,g=null==d?10:d,h=e[0],i=e[f],j=b.tickStep(h,i,g);return j&&(j=b.tickStep(Math.floor(h/j)*j,Math.ceil(i/j)*j,g),e[0]=Math.floor(h/j)*j,e[f]=Math.ceil(i/j)*j,c(e)),a},a}function x(){var a=u(o,d.interpolateNumber);return a.copy=function(){return t(a,x())},w(a)}function y(){function a(a){return+a}var b=[0,1];return a.invert=a,a.domain=a.range=function(c){return arguments.length?(b=X.call(c,n),a):b.slice()},a.copy=function(){return y().domain(b)},w(a)}function z(a,b){a=a.slice();var c,d=0,e=a.length-1,f=a[d],g=a[e];return g<f&&(c=d,d=e,e=c,c=f,f=g,g=c),a[d]=b.floor(f),a[e]=b.ceil(g),a}function A(a,b){return(b=Math.log(b/a))?function(c){retur
37===e){if(e=b.charAt(g++),f=La[e in da?b.charAt(g++):e],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function h(a,b,c){var d=za.exec(b.slice(c));return d?(a.p=Aa[d[0].toLowerCase()],c+d[0].length):-1}function _(a,b,c){var d=Da.exec(b.slice(c));return d?(a.w=Ea[d[0].toLowerCase()],c+d[0].length):-1}function aa(a,b,c){var d=Ba.exec(b.slice(c));return d?(a.w=Ca[d[0].toLowerCase()],c+d[0].length):-1}function ba(a,b,c){var d=Ha.exec(b.slice(c));return d?(a.m=Ia[d[0].toLowerCase()],c+d[0].length):-1}function ca(a,b,c){var d=Fa.exec(b.slice(c));return d?(a.m=Ga[d[0].toLowerCase()],c+d[0].length):-1}function ea(a,b,c){return g(a,ra,b,c)}function fa(a,b,c){return g(a,sa,b,c)}function ga(a,b,c){return g(a,ta,b,c)}function ha(a){return wa[a.getDay()]}function ia(a){return va[a.getDay()]}function ja(a){return ya[a.getMonth()]}function ka(a){return xa[a.getMonth()]}function la(a){return ua[+(a.getHours()>=12)]}function ma(a){return wa[a.getUTCDay()]}function na(a){return va[a.getUTCDay()]}function oa(a){return ya[a.getUTCMonth()]}function pa(a){return xa[a.getUTCMonth()]}function qa(a){return ua[+(a.getUTCHours()>=12)]}var ra=a.dateTime,sa=a.date,ta=a.time,ua=a.periods,va=a.days,wa=a.shortDays,xa=a.months,ya=a.shortMonths,za=i(ua),Aa=j(ua),Ba=i(va),Ca=j(va),Da=i(wa),Ea=j(wa),Fa=i(xa),Ga=j(xa),Ha=i(ya),Ia=j(ya),Ja={a:ha,A:ia,b:ja,B:ka,c:null,d:y,e:y,H:z,I:A,j:B,L:C,m:D,M:E,p:la,S:F,U:G,w:H,W:I,x:null,X:null,y:J,Y:K,Z:L,"%":$},Ka={a:ma,A:na,b:oa,B:pa,c:null,d:M,e:M,H:N,I:O,j:P,L:Q,m:R,M:S,p:qa,S:T,U:U,w:V,W:W,x:null,X:null,y:X,Y:Y,Z:Z,"%":$},La={a:_,A:aa,b:ba,B:ca,c:ea,d:r,e:r,H:t,I:t,j:s,L:w,m:q,M:u,p:h,S:v,U:l,w:k,W:m,x:fa,X:ga,y:o,Y:n,Z:p,"%":x};return Ja.x=b(sa,Ja),Ja.X=b(ta,Ja),Ja.c=b(ra,Ja),Ka.x=b(sa,Ka),Ka.X=b(ta,Ka),Ka.c=b(ra,Ka),{format:function(a){var c=b(a+="",Ja);return c.toString=function(){return a},c},parse:function(a){var b=f(a+="",c);return b.toString=function(){return a},b},utcFormat:function(a){var c=b(a+="",Ka);return c.toString=function(){return a},c},utcParse:function(a){var b=f(a,d);return b.toString=function(){return a},b}}}function g(a,b,c){var d=a<0?"-":"",e=(d?-a:a)+"",f=e.length;return d+(f<c?new Array(c-f+1).join(b)+e:e)}function h(a){return a.replace(ga,"\\$&")}function i(a){return new RegExp("^(?:"+a.map(h).join("|")+")","i")}function j(a){for(var b={},c=-1,d=a.length;++c<d;)b[a[c].toLowerCase()]=c;return b}function k(a,b,c){var d=ea.exec(b.slice(c,c+1));return d?(a.w=+d[0],c+d[0].length):-1}function l(a,b,c){var d=ea.exec(b.slice(c));return d?(a.U=+d[0],c+d[0].length):-1}function m(a,b,c){var d=ea.exec(b.slice(c));return d?(a.W=+d[0],c+d[0].length):-1}function n(a,b,c){var d=ea.exec(b.slice(c,c+4));return d?(a.y=+d[0],c+d[0].length):-1}function o(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.y=+d[0]+(+d[0]>68?1900:2e3),c+d[0].length):-1}function p(a,b,c){var d=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(b.slice(c,c+6));return d?(a.Z=d[1]?0:-(d[2]+(d[3]||"00")),c+d[0].length):-1}function q(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function r(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function s(a,b,c){var d=ea.exec(b.slice(c,c+3));return d?(a.m=0,a.d=+d[0],c+d[0].length):-1}function t(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function u(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function v(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function w(a,b,c){var d=ea.exec(b.slice(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function x(a,b,c){var d=fa.exec(b.slice(c,c+1));return d?c+d[0].length:-1}function y(a,b){return g(a.getDate(),b,2)}function z(a,b){return g(a.getHours(),b,2)}function A(a,b){return g(a.getHours()%12||12,b,2)}function B(a,c){return g(1+b.timeDay.count(b.timeYear(a),a),c,3)}function C(a,b){return g(a.getMilliseconds(),b,3)}function D(a,b){return g(a.getMonth()+1,b,2)}function E(a,b){return g(a.getMinutes(),b,2)}function F(a,b){return g(a.getSeconds(),b,2)}function G(a,c){return g(b.timeSunday.count(b.timeYe