!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.miniTooltip=n():(t.britecharts=t.britecharts||{},t.britecharts.miniTooltip=n())}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=102)}([,,function(t,n,e){"use strict";e.r(n);var r=function(t,n){return tn?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)<0?r=u+1:i=u}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)>0?i=u:r=u+1}return r}}};var u=i(r),o=u.right,a=u.left,c=o,s=function(t,n){null==n&&(n=l);for(var e=0,r=t.length-1,i=t[0],u=new Array(r<0?0:r);et?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,n){var e,r,i=t.length,u=0,o=-1,a=0,c=0;if(null==n)for(;++o1)return c/(u-1)},v=function(t,n){var e=p(t,n);return e?Math.sqrt(e):e},g=function(t,n){var e,r,i,u=t.length,o=-1;if(null==n){for(;++o=e)for(r=i=e;++oe&&(r=e),i=e)for(r=i=e;++oe&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/o),n=Math.floor(n/o),u=new Array(i=Math.ceil(n-t+1));++a=0?(u>=M?10:u>=O?5:u>=j?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(u>=M?10:u>=O?5:u>=j?2:1)}function k(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;return u>=M?i*=10:u>=O?i*=5:u>=j&&(i*=2),nf;)h.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?h[i-1]:l,p.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,u=Math.floor(i),o=+e(t[u],u,t);return o+(+e(t[u+1],u+1,t)-o)*(i-u)}},I=function(t,n,e){return t=w.call(t,d).sort(r),Math.ceil((e-n)/(2*(P(t,.75)-P(t,.25))*Math.pow(t.length,-1/3)))},C=function(t,n,e){return Math.ceil((e-n)/(3.5*v(t)*Math.pow(t.length,-1/3)))},q=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ur&&(r=e)}else for(;++u=e)for(r=e;++ur&&(r=e);return r},T=function(t,n){var e,r=t.length,i=r,u=-1,o=0;if(null==n)for(;++u=0;)for(n=(r=t[i]).length;--n>=0;)e[--o]=r[n];return e},X=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ue&&(r=e)}else for(;++u=e)for(r=e;++ue&&(r=e);return r},z=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},F=function(t,n){if(e=t.length){var e,i,u=0,o=0,a=t[o];for(null==n&&(n=r);++u>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new j(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new j(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=f.exec(t))?new j(n[1],n[2],n[3],1):(n=h.exec(t))?new j(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=d.exec(t))?x(n[1],n[2],n[3],n[4]):(n=p.exec(t))?x(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=v.exec(t))?E(n[1],n[2]/100,n[3]/100,1):(n=g.exec(t))?E(n[1],n[2]/100,n[3]/100,n[4]):y.hasOwnProperty(t)?_(y[t]):"transparent"===t?new j(NaN,NaN,NaN,0):null}function _(t){return new j(t>>16&255,t>>8&255,255&t,1)}function x(t,n,e,r){return r<=0&&(t=n=e=NaN),new j(t,n,e,r)}function M(t){return t instanceof i||(t=b(t)),t?new j((t=t.rgb()).r,t.g,t.b,t.opacity):new j}function O(t,n,e,r){return 1===arguments.length?M(t):new j(t,n,e,null==r?1:r)}function j(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function A(){return"#"+k(this.r)+k(this.g)+k(this.b)}function N(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function k(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function E(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new I(t,n,e,r)}function S(t){if(t instanceof I)return new I(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=b(t)),!t)return new I;if(t instanceof I)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,u=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,c=o-u,s=(o+u)/2;return c?(a=n===o?(e-r)/c+6*(e0&&s<1?0:a,new I(a,c,s,t.opacity)}function P(t,n,e,r){return 1===arguments.length?S(t):new I(t,n,e,null==r?1:r)}function I(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function C(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Object(r.a)(i,b,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:m,formatHex:m,formatHsl:function(){return S(this).formatHsl()},formatRgb:w,toString:w}),Object(r.a)(j,O,Object(r.b)(i,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new j(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?u:Math.pow(u,t),new j(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:A,formatHex:A,formatRgb:N,toString:N})),Object(r.a)(I,P,Object(r.b)(i,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new I(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?u:Math.pow(u,t),new I(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new j(C(t>=240?t-240:t+120,i,r),C(t,i,r),C(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}))},function(t,n,e){"use strict";var r=e(18);n.a=function(t){return(t=Object(r.a)(Math.abs(t)))?t[1]:NaN}},function(t,n,e){"use strict";var r=e(19),i=e(33),u=e(34),o=function(t){return new Array(t.length)};function a(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}a.prototype={constructor:a,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function c(t,n,e,r,i,u){for(var o,c=0,s=n.length,l=u.length;cn?1:t>=n?0:NaN}var f=e(20);function h(t){return function(){this.removeAttribute(t)}}function d(t){return function(){this.removeAttributeNS(t.space,t.local)}}function p(t,n){return function(){this.setAttribute(t,n)}}function v(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function g(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function y(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}var m=e(35);function w(t){return function(){delete this[t]}}function b(t,n){return function(){this[t]=n}}function _(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function x(t){return t.trim().split(/^|\s+/)}function M(t){return t.classList||new O(t)}function O(t){this._node=t,this._names=x(t.getAttribute("class")||"")}function j(t,n){for(var e=M(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function S(){this.textContent=""}function P(t){return function(){this.textContent=t}}function I(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function C(){this.innerHTML=""}function q(t){return function(){this.innerHTML=t}}function T(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function L(){this.nextSibling&&this.parentNode.appendChild(this)}function B(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}var X=e(12);function z(){return null}function F(){var t=this.parentNode;t&&t.removeChild(this)}function R(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function D(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var $=e(17),V=e(21);function Y(t,n,e){var r=Object(V.a)(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function H(t,n){return function(){return Y(this,t,n)}}function Q(t,n){return function(){return Y(this,t,n.apply(this,arguments))}}e.d(n,"c",(function(){return U})),e.d(n,"a",(function(){return G}));var U=[null];function G(t,n){this._groups=t,this._parents=n}function Z(){return new G([[document.documentElement]],U)}G.prototype=Z.prototype={constructor:G,select:function(t){"function"!=typeof t&&(t=Object(r.a)(t));for(var n=this._groups,e=n.length,i=new Array(e),u=0;u=M&&(M=x+1);!(_=w[M])&&++M=0;)(r=i[u])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=l);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u1?this.each((null==n?w:"function"==typeof n?_:b)(t,n)):this.node()[t]},classed:function(t,n){var e=x(t+"");if(arguments.length<2){for(var r=M(this.node()),i=-1,u=e.length;++i180||e<-180?e-360*Math.round(e/360):e):Object(r.a)(isNaN(t)?n:t)}function o(t){return 1==(t=+t)?a:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Object(r.a)(isNaN(n)?e:n)}}function a(t,n){var e=n-t;return e?i(t,e):Object(r.a)(isNaN(t)?n:t)}},function(t,n,e){"use strict";function r(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}e.d(n,"b",(function(){return r})),n.a=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t}},function(t,n,e){"use strict";var r=e(20),i=e(14);function u(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===i.b&&n.documentElement.namespaceURI===i.b?n.createElement(t):n.createElementNS(e,t)}}function o(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}n.a=function(t){var n=Object(r.a)(t);return(n.local?o:u)(n)}},function(t,n,e){"use strict";n.a=function(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}},function(t,n,e){"use strict";e.d(n,"b",(function(){return r}));var r="http://www.w3.org/1999/xhtml";n.a={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},,,function(t,n,e){"use strict";e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return l}));var r={},i=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(r={mouseenter:"mouseover",mouseleave:"mouseout"}));function u(t,n,e){return t=o(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function o(t,n,e){return function(r){var u=i;i=r;try{t.call(this,this.__data__,n,e)}finally{i=u}}}function a(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function c(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,u=n.length;r1?r[0]+r.slice(2):r,+t.slice(e+1)]}},function(t,n,e){"use strict";function r(){}n.a=function(t){return null==t?r:function(){return this.querySelector(t)}}},function(t,n,e){"use strict";var r=e(14);n.a=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),r.a.hasOwnProperty(n)?{space:r.a[n],local:t}:t}},function(t,n,e){"use strict";n.a=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}},function(t,n,e){"use strict";var r=e(17);n.a=function(){for(var t,n=r.c;t=n.sourceEvent;)n=t;return n}},function(t,n,e){"use strict";n.a=function(t){return function(){return t}}},function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"a",(function(){return u}));var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function i(t){if(!(n=r.exec(t)))throw new Error("invalid format: "+t);var n;return new u({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function u(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}i.prototype=u.prototype,u.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}},,function(t,n,e){"use strict";function r(t,n,e,r,i){var u=t*t,o=u*t;return((1-3*t+3*u-o)*n+(4-6*u+3*o)*e+(1+3*t+3*u-3*o)*r+o*i)/6}e.d(n,"a",(function(){return r})),n.b=function(t){var n=t.length-1;return function(e){var i=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),u=t[i],o=t[i+1],a=i>0?t[i-1]:2*u-o,c=i1?this.each((null==n?i:"function"==typeof n?o:u)(t,n,null==e?"":e)):a(this.node(),t)}},,function(t,n,e){"use strict";var r,i=e(8),u=e(24),o=e(18),a=function(t,n){var e=Object(o.a)(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},c={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return a(100*t,n)},r:a,s:function(t,n){var e=Object(o.a)(t,n);if(!e)return t+"";var i=e[0],u=e[1],a=u-(r=3*Math.max(-8,Math.min(8,Math.floor(u/3))))+1,c=i.length;return a===c?i:a>c?i+new Array(a-c+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Object(o.a)(t,Math.max(0,n+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},s=function(t){return t},l=Array.prototype.map,f=["y","z","a","f","p","n","ยต","m","","k","M","G","T","P","E","Z","Y"];n.a=function(t){var n,e,o=void 0===t.grouping||void 0===t.thousands?s:(n=l.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,u=[],o=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),u.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[o=(o+1)%n.length];return u.reverse().join(e)}),a=void 0===t.currency?"":t.currency[0]+"",h=void 0===t.currency?"":t.currency[1]+"",d=void 0===t.decimal?".":t.decimal+"",p=void 0===t.numerals?s:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(l.call(t.numerals,String)),v=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"-":t.minus+"",y=void 0===t.nan?"NaN":t.nan+"";function m(t){var n=(t=Object(u.b)(t)).fill,e=t.align,i=t.sign,s=t.symbol,l=t.zero,m=t.width,w=t.comma,b=t.precision,_=t.trim,x=t.type;"n"===x?(w=!0,x="g"):c[x]||(void 0===b&&(b=12),_=!0,x="g"),(l||"0"===n&&"="===e)&&(l=!0,n="0",e="=");var M="$"===s?a:"#"===s&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",O="$"===s?h:/[%p]/.test(x)?v:"",j=c[x],A=/[defgprs%]/.test(x);function N(t){var u,a,c,s=M,h=O;if("c"===x)h=j(t)+h,t="";else{var v=(t=+t)<0;if(t=isNaN(t)?y:j(Math.abs(t),b),_&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),v&&0==+t&&(v=!1),s=(v?"("===i?i:g:"-"===i||"("===i?"":i)+s,h=("s"===x?f[8+r/3]:"")+h+(v&&"("===i?")":""),A)for(u=-1,a=t.length;++u(c=t.charCodeAt(u))||c>57){h=(46===c?d+t.slice(u+1):t.slice(u))+h,t=t.slice(0,u);break}}w&&!l&&(t=o(t,1/0));var N=s.length+t.length+h.length,k=N>1)+s+t+h+k.slice(N);break;default:t=k+s+t+h}return p(t)}return b=void 0===b?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),N.toString=function(){return t+""},N}return{format:m,formatPrefix:function(t,n){var e=m(((t=Object(u.b)(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Object(i.a)(n)/3))),o=Math.pow(10,-r),a=f[8+r/3];return function(t){return e(o*t)+a}}}}},,function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"c",(function(){return s}));var r=e(7),i=e(26),u=e(53),o=e(10);function a(t){return function(n){var e,i,u=n.length,o=new Array(u),a=new Array(u),c=new Array(u);for(e=0;ec&&(a=n.slice(c,a),l[s]?l[s]+=a:l[++s]=a),(e=e[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,f.push({i:s,x:Object(r.a)(e,o)})),c=u.lastIndex;return c=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function a(t,n){for(var e,r=0,i=t.length;r0)for(var e,r,i=new Array(e),u=0;u=0&&n._call.call(null,t),n=n._next;--a}()}finally{a=0,function(){var t,n,e=r,u=1/0;for(;e;)e._call?(u>e._time&&(u=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:r=n);i=t,_(u)}(),f=0}}function b(){var t=d.now(),n=t-l;n>1e3&&(h-=n,l=t)}function _(t){a||(c&&(c=clearTimeout(c)),t-f>24?(t<1/0&&(c=setTimeout(w,t-d.now()-h)),s&&(s=clearInterval(s))):(s||(l=d.now(),s=setInterval(b,1e3)),a=1,p(w)))}y.prototype=m.prototype={constructor:y,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?v():+e)+(null==n?0:+n),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=e,_()},stop:function(){this._call&&(this._call=null,this._time=1/0,_())}};var x=function(t,n,e){var r=new y;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},M=Object(o.a)("start","end","cancel","interrupt"),O=[],j=function(t,n,e,r,i,u){var o=t.__transition;if(o){if(e in o)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function u(c){var s,l,f,h;if(1!==e.state)return a();for(s in i)if((h=i[s]).name===e.name){if(3===h.state)return x(u);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+s0)throw new Error("too late; already scheduled");return e}function N(t,n){var e=k(t,n);if(e.state>3)throw new Error("too late; already running");return e}function k(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var E=function(t,n){var e,r,i,u=t.__transition,o=!0;if(u){for(i in n=null==n?null:n+"",u)(e=u[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete u[i]):o=!1;o&&delete t.__transition}},S=e(74),P=e(20);function I(t,n){var e,r;return function(){var i=N(this,t),u=i.tween;if(u!==e)for(var o=0,a=(r=e=u).length;o=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?A:N;return function(){var o=u(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(n,e),o.on=i}}var rt=e(19),it=e(33),ut=u.b.prototype.constructor,ot=e(35);function at(t){return function(){this.style.removeProperty(t)}}function ct(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function st(t,n,e){var r,i;function u(){var u=n.apply(this,arguments);return u!==i&&(r=(i=u)&&ct(t,u,e)),r}return u._value=n,u}function lt(t){return function(n){this.textContent=t.call(this,n)}}function ft(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&<(r)),n}return r._value=t,r}var ht=0;function dt(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function pt(t){return Object(u.b)().transition(t)}function vt(){return++ht}var gt=u.b.prototype;dt.prototype=pt.prototype={constructor:dt,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Object(rt.a)(t));for(var r=this._groups,i=r.length,u=new Array(i),o=0;o1&&e.name===n)return new dt([[t]],wt,n,+r);return null};e.d(n,"transition",(function(){return pt})),e.d(n,"active",(function(){return bt})),e.d(n,"interrupt",(function(){return E}))},,function(t,n,e){"use strict";var r,i,u,o,a=e(5),c=180/Math.PI,s={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},l=function(t,n,e,r,i,u){var o,a,s;return(o=Math.sqrt(t*t+n*n))&&(t/=o,n/=o),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r180?n+=360:n-t>180&&(t+=360),u.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Object(a.a)(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(u.rotate,o.rotate,c,s),function(t,n,e,u){t!==n?u.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Object(a.a)(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(u.skewX,o.skewX,c,s),function(t,n,e,r,u,o){if(t!==e||n!==r){var c=u.push(i(u)+"scale(",null,",",null,")");o.push({i:c-4,x:Object(a.a)(t,e)},{i:c-2,x:Object(a.a)(n,r)})}else 1===e&&1===r||u.push(i(u)+"scale("+e+","+r+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,c,s),u=o=null,function(t){for(var n,e=-1,r=s.length;++e0}(f,o)?o+g:o-w-g-e,function(n,e){return n-t-a-b-e>0}(h,s)?s+v:s-b-v-a]}function j(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t[l]||"",e=t[f]||"",r=21,i=31.86,u="1em",o=0,a=void 0,c=void 0,h=void 0;p.selectAll("text").remove(),s&&(h=p.append("text").classed("mini-tooltip-title",!0).attr("dy",u).attr("y",0).style("fill","#666a73").style("font-size",14).text(s),o=r+o),e&&(c=p.append("text").classed("mini-tooltip-name",!0).attr("dy",u).attr("y",o||0).style("fill","#666a73").style("font-size",14).text(e),o=r+o),n&&(a=p.append("text").classed("mini-tooltip-value",!0).attr("dy",u).attr("y",o||0).style("fill","#45494E").style("font-size",27).style("font-weight",200).text(m(n)),o=i+o),w=M(c,h,a),b=o}function A(n,r,u){var o,s,l,f;j(n),o=O(r,u),s=i(o,2),l=s[0],f=s[1],_.transition().duration(200).ease(h).style("opacity",1).attr("height",b+t+a).attr("width",w+c+e).attr("transform","translate("+l+","+f+")"),d.attr("height",b+t+a).attr("width",w+c+e)}return x.hide=function(){return _.style("visibility","hidden"),this},x.nameLabel=function(t){return arguments.length?(f=t,this):f},x.numberFormat=function(t){return arguments.length?(y=t,this):y},x.valueFormatter=function(t){return arguments.length?(m=t,this):m},x.show=function(){var t;return j(t),_.style("visibility","visible").style("opacity",0),this},x.title=function(t){return arguments.length?(s=t,this):s},x.update=function(t,n,e){return A(t,n,e),this},x.valueLabel=function(t){return arguments.length?(l=t,this):l},x}}.call(n,e,n,t))||(t.exports=r)}])})); //# sourceMappingURL=miniTooltip.min.js.map