@vitus-labs/core 0.81.0 → 1.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/analysis/vitus-labs-core.module.js.html +85 -1418
- package/lib/index.d.ts +252 -17
- package/lib/types/compose.d.ts +9 -9
- package/lib/types/compose.d.ts.map +1 -1
- package/lib/types/config.d.ts +198 -22
- package/lib/types/config.d.ts.map +1 -1
- package/lib/types/context.d.ts +14 -14
- package/lib/types/html/htmlElementAttrs.d.ts +107 -107
- package/lib/types/html/htmlTags.d.ts +5 -5
- package/lib/types/html/index.d.ts +5 -5
- package/lib/types/html/index.d.ts.map +1 -1
- package/lib/types/index.d.ts +11 -11
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/isEmpty.d.ts +3 -3
- package/lib/types/render.d.ts +7 -7
- package/lib/types/types.d.ts +3 -3
- package/lib/types/types.d.ts.map +1 -1
- package/lib/vitus-labs-core.module.js +241 -239
- package/lib/vitus-labs-core.module.js.map +1 -1
- package/package.json +11 -11
- package/lib/analysis/vitus-labs-core.js.html +0 -6638
- package/lib/vitus-labs-core.js +0 -303
- package/lib/vitus-labs-core.js.map +0 -1
|
@@ -145,9 +145,9 @@ main {
|
|
|
145
145
|
var drawChart = (function (exports) {
|
|
146
146
|
'use strict';
|
|
147
147
|
|
|
148
|
-
var n,l$1,u$1,t$1,o$2,r$1,f$1={},e$1=[],c$2=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(n,l){for(var u in l)n[u]=l[u];return n}function a$2(n){var l=n.parentNode;l&&l.removeChild(n);}function h$1(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return v$1(l,f,t,o,null)}function v$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function p$1(n){return n.children}function d$1(n,l){this.props=n,this.context=l;}function _$2(n,l){if(null==l)return n.__?_$2(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?_$2(n):null}function k$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k$1(n)}}function b$1(n){(!n.__d&&(n.__d=!0)&&t$1.push(n)&&!g$1.__r++||o$2!==l$1.debounceRendering)&&((o$2=l$1.debounceRendering)||setTimeout)(g$1);}function g$1(){for(var n;g$1.__r=t$1.length;)n=t$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),t$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=s({},t)).__v=t.__v+1,j$1(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?_$2(t):o,t.__h),z$1(u,t),t.__e!=o&&k$1(t)));});}function w$1(n,l,u,i,t,o,r,c,s,a){var h,y,d,k,b,g,w,x=i&&i.__k||e$1,C=x.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(p$1,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=x[h])||d&&k.key==d.key&&k.type===d.type)x[h]=void 0;else for(y=0;y<C;y++){if((d=x[y])&&k.key==d.key&&k.type===d.type){x[y]=void 0;break}d=null;}j$1(n,k,d=d||f$1,t,o,r,c,s,a),b=k.__e,(y=k.ref)&&d.ref!=y&&(w||(w=[]),d.ref&&w.push(d.ref,null,k),w.push(y,k.__c||b,k)),null!=b?(null==g&&(g=b),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=m$2(k,s,n):s=A$1(n,k,d,x,b,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_$2(d));}for(u.__e=g,h=C;h--;)null!=x[h]&&N(x[h],x[h]);if(w)for(h=0;h<w.length;h++)M(w[h],w[++h],w[++h]);}function m$2(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?m$2(i,l,u):A$1(u,i,i,t,i.__e,l));return l}function A$1(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=1)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function C$1(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H(n,o,l[o],u[o],i);}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||c$2.test(l)?u:u+"px";}function H(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T$1:I,o):n.removeEventListener(l,o?T$1:I,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&-1==l.indexOf("-")?n.removeAttribute(l):n.setAttribute(l,u));}}function I(n){this.l[n.type+!1](l$1.event?l$1.event(n):n);}function T$1(n){this.l[n.type+!0](l$1.event?l$1.event(n):n);}function j$1(n,u,i,t,o,r,f,e,c){var a,h,v,y,_,k,b,g,m,x,A,C,$,H,I,T=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=l$1.__b)&&a(u);try{n:if("function"==typeof T){if(g=u.props,m=(a=T.contextType)&&t[a.__c],x=a?m?m.props.value:a.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in T&&T.prototype.render?u.__c=h=new T(g,x):(u.__c=h=new d$1(g,x),h.constructor=T,h.render=O),m&&m.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s({},h.__s)),s(h.__s,T.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==T.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){for(h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,k);});}if(h.context=x,h.props=g,h.__v=u,h.__P=n,C=l$1.__r,$=0,"prototype"in T&&T.prototype.render){for(h.state=h.__s,h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++$<25);h.state=h.__s,null!=h.getChildContext&&(t=s(s({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,_)),I=null!=a&&a.type===p$1&&null==a.key?a.props.children:a,w$1(n,Array.isArray(I)?I:[I],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,o,r,f,c);(a=l$1.diffed)&&a(u);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l$1.__e(n,u,i);}}function z$1(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function L(l,u,i,t,o,r,e,c){var s,h,v,y=i.props,p=u.props,d=u.type,k=0;if("svg"===d&&(o=!0),null!=r)for(;k<r.length;k++)if((s=r[k])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[k]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else {if(r=r&&n.call(l.childNodes),h=(y=i.props||f$1).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},k=0;k<l.attributes.length;k++)y[l.attributes[k].name]=l.attributes[k].value;(v||h)&&(v&&(h&&v.__html==h.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C$1(l,p,y,o,c),v)u.__k=[];else if(k=u.props.children,w$1(l,Array.isArray(k)?k:[k],u,i,t,o&&"foreignObject"!==d,r,e,r?r[0]:i.__k&&_$2(i,0),c),null!=r)for(k=r.length;k--;)null!=r[k]&&a$2(r[k]);c||("value"in p&&void 0!==(k=p.value)&&(k!==l.value||"progress"===d&&!k||"option"===d&&k!==y.value)&&H(l,"value",k,y.value,!1),"checked"in p&&void 0!==(k=p.checked)&&k!==l.checked&&H(l,"checked",k,y.checked,!1));}return l}function M(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function N(n,u,i){var t,o;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,i||"function"!=typeof n.type);i||null==n.__e||a$2(n.__e),n.__=n.__e=n.__d=void 0;}function O(n,l,u){return this.constructor(n,u)}function P(u,i,t){var o,r,e;l$1.__&&l$1.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,e=[],j$1(i,u=(!o&&t||i).__k=h$1(p$1,null,[u]),r||f$1,f$1,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,e,!o&&t?t:r?r.__e:i.firstChild,o),z$1(e,u);}function B$2(n,l){var u={__c:l="__cC"+r$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(b$1);},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=e$1.slice,l$1={__e:function(n,l,u,i){for(var t,o,r;l=l.__;)if((t=l.__c)&&!t.__)try{if((o=t.constructor)&&null!=o.getDerivedStateFromError&&(t.setState(o.getDerivedStateFromError(n)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),r=t.__d),r)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,d$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=s({},this.state),"function"==typeof n&&(n=n(s({},u),this.props)),n&&s(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),b$1(this));},d$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),b$1(this));},d$1.prototype.render=p$1,t$1=[],g$1.__r=0,r$1=0;
|
|
148
|
+
var n,l$1,u$1,t$1,o$2,r$1,f$1,e$1,c$2={},s$1=[],a$2=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v$1=Array.isArray;function h$1(n,l){for(var u in l)n[u]=l[u];return n}function p$1(n){var l=n.parentNode;l&&l.removeChild(n);}function y$2(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d$1(l,f,t,o,null)}function d$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function k$1(n){return n.children}function b$1(n,l){this.props=n,this.context=l;}function g$1(n,l){if(null==l)return n.__?g$1(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?g$1(n):null}function m$2(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return m$2(n)}}function w$1(n){(!n.__d&&(n.__d=!0)&&t$1.push(n)&&!x$2.__r++||o$2!==l$1.debounceRendering)&&((o$2=l$1.debounceRendering)||r$1)(x$2);}function x$2(){var n,l,u,i,o,r,e,c;for(t$1.sort(f$1);n=t$1.shift();)n.__d&&(l=t$1.length,i=void 0,o=void 0,e=(r=(u=n).__v).__e,(c=u.__P)&&(i=[],(o=h$1({},r)).__v=r.__v+1,L(c,r,o,u.__n,void 0!==c.ownerSVGElement,null!=r.__h?[e]:null,i,null==e?g$1(r):e,r.__h),M(i,r),r.__e!=e&&m$2(r)),t$1.length>l&&t$1.sort(f$1));x$2.__r=0;}function P(n,l,u,i,t,o,r,f,e,a){var h,p,y,_,b,m,w,x=i&&i.__k||s$1,P=x.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||"boolean"==typeof _||"function"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?d$1(null,_,null,null,_):v$1(_)?d$1(k$1,{children:_},null,null,null):_.__b>0?d$1(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(y=x[h])||y&&_.key==y.key&&_.type===y.type)x[h]=void 0;else for(p=0;p<P;p++){if((y=x[p])&&_.key==y.key&&_.type===y.type){x[p]=void 0;break}y=null;}L(n,_,y=y||c$2,t,o,r,f,e,a),b=_.__e,(p=_.ref)&&y.ref!=p&&(w||(w=[]),y.ref&&w.push(y.ref,null,_),w.push(p,_.__c||b,_)),null!=b?(null==m&&(m=b),"function"==typeof _.type&&_.__k===y.__k?_.__d=e=C(_,e,n):e=$(n,_,y,x,b,e),"function"==typeof u.type&&(u.__d=e)):e&&y.__e==e&&e.parentNode!=n&&(e=g$1(y));}for(u.__e=m,h=P;h--;)null!=x[h]&&("function"==typeof u.type&&null!=x[h].__e&&x[h].__e==u.__d&&(u.__d=A(i).nextSibling),q$1(x[h],x[h]));if(w)for(h=0;h<w.length;h++)O(w[h],w[++h],w[++h]);}function C(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?C(i,l,u):$(u,i,i,t,i.__e,l));return l}function $(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=1)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function A(n){var l,u,i;if(null==n.type||"string"==typeof n.type)return n.__e;if(n.__k)for(l=n.__k.length-1;l>=0;l--)if((u=n.__k[l])&&(i=A(u)))return i;return null}function H(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||T$1(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||T$1(n,o,l[o],u[o],i);}function I(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||a$2.test(l)?u:u+"px";}function T$1(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||I(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||I(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?z$1:j$1,o):n.removeEventListener(l,o?z$1:j$1,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==l&&"height"!==l&&"href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&"rowSpan"!==l&&"colSpan"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,u));}}function j$1(n){return this.l[n.type+!1](l$1.event?l$1.event(n):n)}function z$1(n){return this.l[n.type+!0](l$1.event?l$1.event(n):n)}function L(n,u,i,t,o,r,f,e,c){var s,a,p,y,d,_,g,m,w,x,C,S,$,A,H,I=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(s=l$1.__b)&&s(u);try{n:if("function"==typeof I){if(m=u.props,w=(s=I.contextType)&&t[s.__c],x=s?w?w.props.value:s.__:t,i.__c?g=(a=u.__c=i.__c).__=a.__E:("prototype"in I&&I.prototype.render?u.__c=a=new I(m,x):(u.__c=a=new b$1(m,x),a.constructor=I,a.render=B$1),w&&w.sub(a),a.props=m,a.state||(a.state={}),a.context=x,a.__n=t,p=a.__d=!0,a.__h=[],a._sb=[]),null==a.__s&&(a.__s=a.state),null!=I.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h$1({},a.__s)),h$1(a.__s,I.getDerivedStateFromProps(m,a.__s))),y=a.props,d=a.state,a.__v=u,p)null==I.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else {if(null==I.getDerivedStateFromProps&&m!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(m,x),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(m,a.__s,x)||u.__v===i.__v){for(u.__v!==i.__v&&(a.props=m,a.state=a.__s,a.__d=!1),a.__e=!1,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),C=0;C<a._sb.length;C++)a.__h.push(a._sb[C]);a._sb=[],a.__h.length&&f.push(a);break n}null!=a.componentWillUpdate&&a.componentWillUpdate(m,a.__s,x),null!=a.componentDidUpdate&&a.__h.push(function(){a.componentDidUpdate(y,d,_);});}if(a.context=x,a.props=m,a.__P=n,S=l$1.__r,$=0,"prototype"in I&&I.prototype.render){for(a.state=a.__s,a.__d=!1,S&&S(u),s=a.render(a.props,a.state,a.context),A=0;A<a._sb.length;A++)a.__h.push(a._sb[A]);a._sb=[];}else do{a.__d=!1,S&&S(u),s=a.render(a.props,a.state,a.context),a.state=a.__s;}while(a.__d&&++$<25);a.state=a.__s,null!=a.getChildContext&&(t=h$1(h$1({},t),a.getChildContext())),p||null==a.getSnapshotBeforeUpdate||(_=a.getSnapshotBeforeUpdate(y,d)),P(n,v$1(H=null!=s&&s.type===k$1&&null==s.key?s.props.children:s)?H:[H],u,i,t,o,r,f,e,c),a.base=u.__e,u.__h=null,a.__h.length&&f.push(a),g&&(a.__E=a.__=null),a.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=N(i.__e,u,i,t,o,r,f,c);(s=l$1.diffed)&&s(u);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l$1.__e(n,u,i);}}function M(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function N(l,u,i,t,o,r,f,e){var s,a,h,y=i.props,d=u.props,_=u.type,k=0;if("svg"===_&&(o=!0),null!=r)for(;k<r.length;k++)if((s=r[k])&&"setAttribute"in s==!!_&&(_?s.localName===_:3===s.nodeType)){l=s,r[k]=null;break}if(null==l){if(null===_)return document.createTextNode(d);l=o?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,d.is&&d),r=null,e=!1;}if(null===_)y===d||e&&l.data===d||(l.data=d);else {if(r=r&&n.call(l.childNodes),a=(y=i.props||c$2).dangerouslySetInnerHTML,h=d.dangerouslySetInnerHTML,!e){if(null!=r)for(y={},k=0;k<l.attributes.length;k++)y[l.attributes[k].name]=l.attributes[k].value;(h||a)&&(h&&(a&&h.__html==a.__html||h.__html===l.innerHTML)||(l.innerHTML=h&&h.__html||""));}if(H(l,d,y,o,e),h)u.__k=[];else if(P(l,v$1(k=u.props.children)?k:[k],u,i,t,o&&"foreignObject"!==_,r,f,r?r[0]:i.__k&&g$1(i,0),e),null!=r)for(k=r.length;k--;)null!=r[k]&&p$1(r[k]);e||("value"in d&&void 0!==(k=d.value)&&(k!==l.value||"progress"===_&&!k||"option"===_&&k!==y.value)&&T$1(l,"value",k,y.value,!1),"checked"in d&&void 0!==(k=d.checked)&&k!==l.checked&&T$1(l,"checked",k,y.checked,!1));}return l}function O(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function q$1(n,u,i){var t,o;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||O(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&q$1(t[o],u,i||"function"!=typeof n.type);i||null==n.__e||p$1(n.__e),n.__=n.__e=n.__d=void 0;}function B$1(n,l,u){return this.constructor(n,u)}function D(u,i,t){var o,r,f;l$1.__&&l$1.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,f=[],L(i,u=(!o&&t||i).__k=y$2(k$1,null,[u]),r||c$2,c$2,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,f,!o&&t?t:r?r.__e:i.firstChild,o),M(f,u);}function G(n,l){var u={__c:l="__cC"+e$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,w$1(n);});},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s$1.slice,l$1={__e:function(n,l,u,i){for(var t,o,r;l=l.__;)if((t=l.__c)&&!t.__)try{if((o=t.constructor)&&null!=o.getDerivedStateFromError&&(t.setState(o.getDerivedStateFromError(n)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),r=t.__d),r)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,b$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h$1({},this.state),"function"==typeof n&&(n=n(h$1({},u),this.props)),n&&h$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),w$1(this));},b$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),w$1(this));},b$1.prototype.render=k$1,t$1=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$1=function(n,l){return n.__v.__b-l.__v.__b},x$2.__r=0,e$1=0;
|
|
149
149
|
|
|
150
|
-
var _$1=0;function o$1(o,e,n,t,f){var
|
|
150
|
+
var _$1=0;function o$1(o,e,n,t,f,l){var s,u,a={};for(u in e)"ref"==u?s=e[u]:a[u]=e[u];var i={type:o,props:a,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--_$1,__source:f,__self:l};if("function"==typeof o&&(s=o.defaultProps))for(u in s)void 0===a[u]&&(a[u]=s[u]);return l$1.vnode&&l$1.vnode(i),i}
|
|
151
151
|
|
|
152
152
|
const LABELS = {
|
|
153
153
|
renderedLength: "Rendered",
|
|
@@ -165,7 +165,7 @@ var drawChart = (function (exports) {
|
|
|
165
165
|
return availableSizeProperties;
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
var t,r,u,i,o=0,f=[],c$1=[],e=l$1.__b,a$1=l$1.__r,v=l$1.diffed,l=l$1.__c,m$1=l$1.unmount;function d(t,u){l$1.__h&&l$1.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c$1}),i.__[t]}function
|
|
168
|
+
var t,r,u,i,o=0,f=[],c$1=[],e=l$1.__b,a$1=l$1.__r,v=l$1.diffed,l=l$1.__c,m$1=l$1.unmount;function d(t,u){l$1.__h&&l$1.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c$1}),i.__[t]}function h(n){return o=1,s(B,n)}function s(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u;}e&&e.call(this,n,t,r);},r.shouldComponentUpdate=f;}return o.__N||o.__}function p(u,i){var o=d(t++,3);!l$1.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o));}function _(n){return o=5,F(function(){return {current:n}},[])}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function q(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){r=null,e&&e(n);},l$1.__r=function(n){a$1&&a$1(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c$1,n.__N=n.i=void 0;})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[],t=0)),u=r;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c$1&&(n.__=n.__V),n.i=void 0,n.__V=c$1;})),u=r=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return !n.__||w(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m$1&&m$1(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var g="function"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r));}function k(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function w(n){var t=r;n.__c=n.__(),r=t;}function z(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return "function"==typeof t?t(n):t}
|
|
169
169
|
|
|
170
170
|
function ascending(a, b) {
|
|
171
171
|
return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
@@ -240,60 +240,62 @@ var drawChart = (function (exports) {
|
|
|
240
240
|
const ascendingBisect = bisector(ascending);
|
|
241
241
|
const bisectRight = ascendingBisect.right;
|
|
242
242
|
bisector(number$1).center;
|
|
243
|
+
var bisect = bisectRight;
|
|
243
244
|
|
|
244
|
-
|
|
245
|
+
const e10 = Math.sqrt(50),
|
|
245
246
|
e5 = Math.sqrt(10),
|
|
246
247
|
e2 = Math.sqrt(2);
|
|
247
248
|
|
|
248
|
-
function
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
249
|
+
function tickSpec(start, stop, count) {
|
|
250
|
+
const step = (stop - start) / Math.max(0, count),
|
|
251
|
+
power = Math.floor(Math.log10(step)),
|
|
252
|
+
error = step / Math.pow(10, power),
|
|
253
|
+
factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
|
|
254
|
+
let i1, i2, inc;
|
|
255
|
+
if (power < 0) {
|
|
256
|
+
inc = Math.pow(10, -power) / factor;
|
|
257
|
+
i1 = Math.round(start * inc);
|
|
258
|
+
i2 = Math.round(stop * inc);
|
|
259
|
+
if (i1 / inc < start) ++i1;
|
|
260
|
+
if (i2 / inc > stop) --i2;
|
|
261
|
+
inc = -inc;
|
|
262
|
+
} else {
|
|
263
|
+
inc = Math.pow(10, power) * factor;
|
|
264
|
+
i1 = Math.round(start / inc);
|
|
265
|
+
i2 = Math.round(stop / inc);
|
|
266
|
+
if (i1 * inc < start) ++i1;
|
|
267
|
+
if (i2 * inc > stop) --i2;
|
|
268
|
+
}
|
|
269
|
+
if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);
|
|
270
|
+
return [i1, i2, inc];
|
|
271
|
+
}
|
|
254
272
|
|
|
273
|
+
function ticks(start, stop, count) {
|
|
255
274
|
stop = +stop, start = +start, count = +count;
|
|
256
|
-
if (
|
|
257
|
-
if (
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
if (
|
|
263
|
-
|
|
264
|
-
ticks = new Array(n = r1 - r0 + 1);
|
|
265
|
-
while (++i < n) ticks[i] = (r0 + i) * step;
|
|
275
|
+
if (!(count > 0)) return [];
|
|
276
|
+
if (start === stop) return [start];
|
|
277
|
+
const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);
|
|
278
|
+
if (!(i2 >= i1)) return [];
|
|
279
|
+
const n = i2 - i1 + 1, ticks = new Array(n);
|
|
280
|
+
if (reverse) {
|
|
281
|
+
if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;
|
|
282
|
+
else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;
|
|
266
283
|
} else {
|
|
267
|
-
|
|
268
|
-
let
|
|
269
|
-
if (r0 / step < start) ++r0;
|
|
270
|
-
if (r1 / step > stop) --r1;
|
|
271
|
-
ticks = new Array(n = r1 - r0 + 1);
|
|
272
|
-
while (++i < n) ticks[i] = (r0 + i) / step;
|
|
284
|
+
if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;
|
|
285
|
+
else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;
|
|
273
286
|
}
|
|
274
|
-
|
|
275
|
-
if (reverse) ticks.reverse();
|
|
276
|
-
|
|
277
287
|
return ticks;
|
|
278
288
|
}
|
|
279
289
|
|
|
280
290
|
function tickIncrement(start, stop, count) {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
error = step / Math.pow(10, power);
|
|
284
|
-
return power >= 0
|
|
285
|
-
? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
|
|
286
|
-
: -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
|
|
291
|
+
stop = +stop, start = +start, count = +count;
|
|
292
|
+
return tickSpec(start, stop, count)[2];
|
|
287
293
|
}
|
|
288
294
|
|
|
289
295
|
function tickStep(start, stop, count) {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
if (error >= e10) step1 *= 10;
|
|
294
|
-
else if (error >= e5) step1 *= 5;
|
|
295
|
-
else if (error >= e2) step1 *= 2;
|
|
296
|
-
return stop < start ? -step1 : step1;
|
|
296
|
+
stop = +stop, start = +start, count = +count;
|
|
297
|
+
const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);
|
|
298
|
+
return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
|
|
297
299
|
}
|
|
298
300
|
|
|
299
301
|
function max(values, valueof) {
|
|
@@ -750,179 +752,6 @@ var drawChart = (function (exports) {
|
|
|
750
752
|
: m1) * 255;
|
|
751
753
|
}
|
|
752
754
|
|
|
753
|
-
const radians = Math.PI / 180;
|
|
754
|
-
const degrees = 180 / Math.PI;
|
|
755
|
-
|
|
756
|
-
// https://observablehq.com/@mbostock/lab-and-rgb
|
|
757
|
-
const K = 18,
|
|
758
|
-
Xn = 0.96422,
|
|
759
|
-
Yn = 1,
|
|
760
|
-
Zn = 0.82521,
|
|
761
|
-
t0$1 = 4 / 29,
|
|
762
|
-
t1$1 = 6 / 29,
|
|
763
|
-
t2 = 3 * t1$1 * t1$1,
|
|
764
|
-
t3 = t1$1 * t1$1 * t1$1;
|
|
765
|
-
|
|
766
|
-
function labConvert(o) {
|
|
767
|
-
if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
|
|
768
|
-
if (o instanceof Hcl) return hcl2lab(o);
|
|
769
|
-
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
|
770
|
-
var r = rgb2lrgb(o.r),
|
|
771
|
-
g = rgb2lrgb(o.g),
|
|
772
|
-
b = rgb2lrgb(o.b),
|
|
773
|
-
y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
|
|
774
|
-
if (r === g && g === b) x = z = y; else {
|
|
775
|
-
x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
|
|
776
|
-
z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
|
|
777
|
-
}
|
|
778
|
-
return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
function lab(l, a, b, opacity) {
|
|
782
|
-
return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
function Lab(l, a, b, opacity) {
|
|
786
|
-
this.l = +l;
|
|
787
|
-
this.a = +a;
|
|
788
|
-
this.b = +b;
|
|
789
|
-
this.opacity = +opacity;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
define(Lab, lab, extend(Color, {
|
|
793
|
-
brighter(k) {
|
|
794
|
-
return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
795
|
-
},
|
|
796
|
-
darker(k) {
|
|
797
|
-
return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
798
|
-
},
|
|
799
|
-
rgb() {
|
|
800
|
-
var y = (this.l + 16) / 116,
|
|
801
|
-
x = isNaN(this.a) ? y : y + this.a / 500,
|
|
802
|
-
z = isNaN(this.b) ? y : y - this.b / 200;
|
|
803
|
-
x = Xn * lab2xyz(x);
|
|
804
|
-
y = Yn * lab2xyz(y);
|
|
805
|
-
z = Zn * lab2xyz(z);
|
|
806
|
-
return new Rgb(
|
|
807
|
-
lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
|
|
808
|
-
lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
|
|
809
|
-
lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
|
|
810
|
-
this.opacity
|
|
811
|
-
);
|
|
812
|
-
}
|
|
813
|
-
}));
|
|
814
|
-
|
|
815
|
-
function xyz2lab(t) {
|
|
816
|
-
return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0$1;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
function lab2xyz(t) {
|
|
820
|
-
return t > t1$1 ? t * t * t : t2 * (t - t0$1);
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
function lrgb2rgb(x) {
|
|
824
|
-
return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
function rgb2lrgb(x) {
|
|
828
|
-
return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
function hclConvert(o) {
|
|
832
|
-
if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
|
|
833
|
-
if (!(o instanceof Lab)) o = labConvert(o);
|
|
834
|
-
if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
|
|
835
|
-
var h = Math.atan2(o.b, o.a) * degrees;
|
|
836
|
-
return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
function hcl(h, c, l, opacity) {
|
|
840
|
-
return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
function Hcl(h, c, l, opacity) {
|
|
844
|
-
this.h = +h;
|
|
845
|
-
this.c = +c;
|
|
846
|
-
this.l = +l;
|
|
847
|
-
this.opacity = +opacity;
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
function hcl2lab(o) {
|
|
851
|
-
if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
|
|
852
|
-
var h = o.h * radians;
|
|
853
|
-
return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
define(Hcl, hcl, extend(Color, {
|
|
857
|
-
brighter(k) {
|
|
858
|
-
return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
|
|
859
|
-
},
|
|
860
|
-
darker(k) {
|
|
861
|
-
return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
|
|
862
|
-
},
|
|
863
|
-
rgb() {
|
|
864
|
-
return hcl2lab(this).rgb();
|
|
865
|
-
}
|
|
866
|
-
}));
|
|
867
|
-
|
|
868
|
-
var A = -0.14861,
|
|
869
|
-
B = +1.78277,
|
|
870
|
-
C = -0.29227,
|
|
871
|
-
D = -0.90649,
|
|
872
|
-
E = +1.97294,
|
|
873
|
-
ED = E * D,
|
|
874
|
-
EB = E * B,
|
|
875
|
-
BC_DA = B * C - D * A;
|
|
876
|
-
|
|
877
|
-
function cubehelixConvert(o) {
|
|
878
|
-
if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
|
|
879
|
-
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
|
880
|
-
var r = o.r / 255,
|
|
881
|
-
g = o.g / 255,
|
|
882
|
-
b = o.b / 255,
|
|
883
|
-
l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
|
|
884
|
-
bl = b - l,
|
|
885
|
-
k = (E * (g - l) - C * bl) / D,
|
|
886
|
-
s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
|
|
887
|
-
h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;
|
|
888
|
-
return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
function cubehelix$1(h, s, l, opacity) {
|
|
892
|
-
return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
function Cubehelix(h, s, l, opacity) {
|
|
896
|
-
this.h = +h;
|
|
897
|
-
this.s = +s;
|
|
898
|
-
this.l = +l;
|
|
899
|
-
this.opacity = +opacity;
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
define(Cubehelix, cubehelix$1, extend(Color, {
|
|
903
|
-
brighter(k) {
|
|
904
|
-
k = k == null ? brighter : Math.pow(brighter, k);
|
|
905
|
-
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
|
906
|
-
},
|
|
907
|
-
darker(k) {
|
|
908
|
-
k = k == null ? darker : Math.pow(darker, k);
|
|
909
|
-
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
|
910
|
-
},
|
|
911
|
-
rgb() {
|
|
912
|
-
var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,
|
|
913
|
-
l = +this.l,
|
|
914
|
-
a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
|
|
915
|
-
cosh = Math.cos(h),
|
|
916
|
-
sinh = Math.sin(h);
|
|
917
|
-
return new Rgb(
|
|
918
|
-
255 * (l + a * (A * cosh + B * sinh)),
|
|
919
|
-
255 * (l + a * (C * cosh + D * sinh)),
|
|
920
|
-
255 * (l + a * (E * cosh)),
|
|
921
|
-
this.opacity
|
|
922
|
-
);
|
|
923
|
-
}
|
|
924
|
-
}));
|
|
925
|
-
|
|
926
755
|
var constant$1 = x => () => x;
|
|
927
756
|
|
|
928
757
|
function linear(a, d) {
|
|
@@ -937,11 +766,6 @@ var drawChart = (function (exports) {
|
|
|
937
766
|
};
|
|
938
767
|
}
|
|
939
768
|
|
|
940
|
-
function hue(a, b) {
|
|
941
|
-
var d = b - a;
|
|
942
|
-
return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant$1(isNaN(a) ? b : a);
|
|
943
|
-
}
|
|
944
|
-
|
|
945
769
|
function gamma(y) {
|
|
946
770
|
return (y = +y) === 1 ? nogamma : function(a, b) {
|
|
947
771
|
return b - a ? exponential(a, b, y) : constant$1(isNaN(a) ? b : a);
|
|
@@ -1123,105 +947,6 @@ var drawChart = (function (exports) {
|
|
|
1123
947
|
};
|
|
1124
948
|
}
|
|
1125
949
|
|
|
1126
|
-
var epsilon2 = 1e-12;
|
|
1127
|
-
|
|
1128
|
-
function cosh(x) {
|
|
1129
|
-
return ((x = Math.exp(x)) + 1 / x) / 2;
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
function sinh(x) {
|
|
1133
|
-
return ((x = Math.exp(x)) - 1 / x) / 2;
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
function tanh(x) {
|
|
1137
|
-
return ((x = Math.exp(2 * x)) - 1) / (x + 1);
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
((function zoomRho(rho, rho2, rho4) {
|
|
1141
|
-
|
|
1142
|
-
// p0 = [ux0, uy0, w0]
|
|
1143
|
-
// p1 = [ux1, uy1, w1]
|
|
1144
|
-
function zoom(p0, p1) {
|
|
1145
|
-
var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],
|
|
1146
|
-
ux1 = p1[0], uy1 = p1[1], w1 = p1[2],
|
|
1147
|
-
dx = ux1 - ux0,
|
|
1148
|
-
dy = uy1 - uy0,
|
|
1149
|
-
d2 = dx * dx + dy * dy,
|
|
1150
|
-
i,
|
|
1151
|
-
S;
|
|
1152
|
-
|
|
1153
|
-
// Special case for u0 ≅ u1.
|
|
1154
|
-
if (d2 < epsilon2) {
|
|
1155
|
-
S = Math.log(w1 / w0) / rho;
|
|
1156
|
-
i = function(t) {
|
|
1157
|
-
return [
|
|
1158
|
-
ux0 + t * dx,
|
|
1159
|
-
uy0 + t * dy,
|
|
1160
|
-
w0 * Math.exp(rho * t * S)
|
|
1161
|
-
];
|
|
1162
|
-
};
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
// General case.
|
|
1166
|
-
else {
|
|
1167
|
-
var d1 = Math.sqrt(d2),
|
|
1168
|
-
b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
|
|
1169
|
-
b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
|
|
1170
|
-
r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
|
|
1171
|
-
r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
|
|
1172
|
-
S = (r1 - r0) / rho;
|
|
1173
|
-
i = function(t) {
|
|
1174
|
-
var s = t * S,
|
|
1175
|
-
coshr0 = cosh(r0),
|
|
1176
|
-
u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
|
|
1177
|
-
return [
|
|
1178
|
-
ux0 + u * dx,
|
|
1179
|
-
uy0 + u * dy,
|
|
1180
|
-
w0 * coshr0 / cosh(rho * s + r0)
|
|
1181
|
-
];
|
|
1182
|
-
};
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
i.duration = S * 1000 * rho / Math.SQRT2;
|
|
1186
|
-
|
|
1187
|
-
return i;
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
zoom.rho = function(_) {
|
|
1191
|
-
var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;
|
|
1192
|
-
return zoomRho(_1, _2, _4);
|
|
1193
|
-
};
|
|
1194
|
-
|
|
1195
|
-
return zoom;
|
|
1196
|
-
}))(Math.SQRT2, 2, 4);
|
|
1197
|
-
|
|
1198
|
-
function cubehelix(hue) {
|
|
1199
|
-
return (function cubehelixGamma(y) {
|
|
1200
|
-
y = +y;
|
|
1201
|
-
|
|
1202
|
-
function cubehelix(start, end) {
|
|
1203
|
-
var h = hue((start = cubehelix$1(start)).h, (end = cubehelix$1(end)).h),
|
|
1204
|
-
s = nogamma(start.s, end.s),
|
|
1205
|
-
l = nogamma(start.l, end.l),
|
|
1206
|
-
opacity = nogamma(start.opacity, end.opacity);
|
|
1207
|
-
return function(t) {
|
|
1208
|
-
start.h = h(t);
|
|
1209
|
-
start.s = s(t);
|
|
1210
|
-
start.l = l(Math.pow(t, y));
|
|
1211
|
-
start.opacity = opacity(t);
|
|
1212
|
-
return start + "";
|
|
1213
|
-
};
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
cubehelix.gamma = cubehelixGamma;
|
|
1217
|
-
|
|
1218
|
-
return cubehelix;
|
|
1219
|
-
})(1);
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
cubehelix(hue);
|
|
1223
|
-
cubehelix(nogamma);
|
|
1224
|
-
|
|
1225
950
|
function constants$3(x) {
|
|
1226
951
|
return function() {
|
|
1227
952
|
return x;
|
|
@@ -1277,7 +1002,7 @@ var drawChart = (function (exports) {
|
|
|
1277
1002
|
}
|
|
1278
1003
|
|
|
1279
1004
|
return function(x) {
|
|
1280
|
-
var i =
|
|
1005
|
+
var i = bisect(domain, x, 1, j) - 1;
|
|
1281
1006
|
return r[i](d[i](x));
|
|
1282
1007
|
};
|
|
1283
1008
|
}
|
|
@@ -1509,7 +1234,7 @@ var drawChart = (function (exports) {
|
|
|
1509
1234
|
var map = Array.prototype.map,
|
|
1510
1235
|
prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
|
|
1511
1236
|
|
|
1512
|
-
function formatLocale
|
|
1237
|
+
function formatLocale(locale) {
|
|
1513
1238
|
var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""),
|
|
1514
1239
|
currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
|
|
1515
1240
|
currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
|
|
@@ -1646,21 +1371,21 @@ var drawChart = (function (exports) {
|
|
|
1646
1371
|
};
|
|
1647
1372
|
}
|
|
1648
1373
|
|
|
1649
|
-
var locale
|
|
1374
|
+
var locale;
|
|
1650
1375
|
var format;
|
|
1651
1376
|
var formatPrefix;
|
|
1652
1377
|
|
|
1653
|
-
defaultLocale
|
|
1378
|
+
defaultLocale({
|
|
1654
1379
|
thousands: ",",
|
|
1655
1380
|
grouping: [3],
|
|
1656
1381
|
currency: ["$", ""]
|
|
1657
1382
|
});
|
|
1658
1383
|
|
|
1659
|
-
function defaultLocale
|
|
1660
|
-
locale
|
|
1661
|
-
format = locale
|
|
1662
|
-
formatPrefix = locale
|
|
1663
|
-
return locale
|
|
1384
|
+
function defaultLocale(definition) {
|
|
1385
|
+
locale = formatLocale(definition);
|
|
1386
|
+
format = locale.format;
|
|
1387
|
+
formatPrefix = locale.formatPrefix;
|
|
1388
|
+
return locale;
|
|
1664
1389
|
}
|
|
1665
1390
|
|
|
1666
1391
|
function precisionFixed(step) {
|
|
@@ -1804,1055 +1529,6 @@ var drawChart = (function (exports) {
|
|
|
1804
1529
|
return pow.apply(null, arguments).exponent(0.5);
|
|
1805
1530
|
}
|
|
1806
1531
|
|
|
1807
|
-
const t0 = new Date, t1 = new Date;
|
|
1808
|
-
|
|
1809
|
-
function timeInterval(floori, offseti, count, field) {
|
|
1810
|
-
|
|
1811
|
-
function interval(date) {
|
|
1812
|
-
return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;
|
|
1813
|
-
}
|
|
1814
|
-
|
|
1815
|
-
interval.floor = (date) => {
|
|
1816
|
-
return floori(date = new Date(+date)), date;
|
|
1817
|
-
};
|
|
1818
|
-
|
|
1819
|
-
interval.ceil = (date) => {
|
|
1820
|
-
return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
|
|
1821
|
-
};
|
|
1822
|
-
|
|
1823
|
-
interval.round = (date) => {
|
|
1824
|
-
const d0 = interval(date), d1 = interval.ceil(date);
|
|
1825
|
-
return date - d0 < d1 - date ? d0 : d1;
|
|
1826
|
-
};
|
|
1827
|
-
|
|
1828
|
-
interval.offset = (date, step) => {
|
|
1829
|
-
return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;
|
|
1830
|
-
};
|
|
1831
|
-
|
|
1832
|
-
interval.range = (start, stop, step) => {
|
|
1833
|
-
const range = [];
|
|
1834
|
-
start = interval.ceil(start);
|
|
1835
|
-
step = step == null ? 1 : Math.floor(step);
|
|
1836
|
-
if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date
|
|
1837
|
-
let previous;
|
|
1838
|
-
do range.push(previous = new Date(+start)), offseti(start, step), floori(start);
|
|
1839
|
-
while (previous < start && start < stop);
|
|
1840
|
-
return range;
|
|
1841
|
-
};
|
|
1842
|
-
|
|
1843
|
-
interval.filter = (test) => {
|
|
1844
|
-
return timeInterval((date) => {
|
|
1845
|
-
if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);
|
|
1846
|
-
}, (date, step) => {
|
|
1847
|
-
if (date >= date) {
|
|
1848
|
-
if (step < 0) while (++step <= 0) {
|
|
1849
|
-
while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty
|
|
1850
|
-
} else while (--step >= 0) {
|
|
1851
|
-
while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
});
|
|
1855
|
-
};
|
|
1856
|
-
|
|
1857
|
-
if (count) {
|
|
1858
|
-
interval.count = (start, end) => {
|
|
1859
|
-
t0.setTime(+start), t1.setTime(+end);
|
|
1860
|
-
floori(t0), floori(t1);
|
|
1861
|
-
return Math.floor(count(t0, t1));
|
|
1862
|
-
};
|
|
1863
|
-
|
|
1864
|
-
interval.every = (step) => {
|
|
1865
|
-
step = Math.floor(step);
|
|
1866
|
-
return !isFinite(step) || !(step > 0) ? null
|
|
1867
|
-
: !(step > 1) ? interval
|
|
1868
|
-
: interval.filter(field
|
|
1869
|
-
? (d) => field(d) % step === 0
|
|
1870
|
-
: (d) => interval.count(0, d) % step === 0);
|
|
1871
|
-
};
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
return interval;
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
const millisecond = timeInterval(() => {
|
|
1878
|
-
// noop
|
|
1879
|
-
}, (date, step) => {
|
|
1880
|
-
date.setTime(+date + step);
|
|
1881
|
-
}, (start, end) => {
|
|
1882
|
-
return end - start;
|
|
1883
|
-
});
|
|
1884
|
-
|
|
1885
|
-
// An optimized implementation for this simple case.
|
|
1886
|
-
millisecond.every = (k) => {
|
|
1887
|
-
k = Math.floor(k);
|
|
1888
|
-
if (!isFinite(k) || !(k > 0)) return null;
|
|
1889
|
-
if (!(k > 1)) return millisecond;
|
|
1890
|
-
return timeInterval((date) => {
|
|
1891
|
-
date.setTime(Math.floor(date / k) * k);
|
|
1892
|
-
}, (date, step) => {
|
|
1893
|
-
date.setTime(+date + step * k);
|
|
1894
|
-
}, (start, end) => {
|
|
1895
|
-
return (end - start) / k;
|
|
1896
|
-
});
|
|
1897
|
-
};
|
|
1898
|
-
|
|
1899
|
-
millisecond.range;
|
|
1900
|
-
|
|
1901
|
-
const durationSecond = 1000;
|
|
1902
|
-
const durationMinute = durationSecond * 60;
|
|
1903
|
-
const durationHour = durationMinute * 60;
|
|
1904
|
-
const durationDay = durationHour * 24;
|
|
1905
|
-
const durationWeek = durationDay * 7;
|
|
1906
|
-
|
|
1907
|
-
const second = timeInterval((date) => {
|
|
1908
|
-
date.setTime(date - date.getMilliseconds());
|
|
1909
|
-
}, (date, step) => {
|
|
1910
|
-
date.setTime(+date + step * durationSecond);
|
|
1911
|
-
}, (start, end) => {
|
|
1912
|
-
return (end - start) / durationSecond;
|
|
1913
|
-
}, (date) => {
|
|
1914
|
-
return date.getUTCSeconds();
|
|
1915
|
-
});
|
|
1916
|
-
|
|
1917
|
-
second.range;
|
|
1918
|
-
|
|
1919
|
-
const timeMinute = timeInterval((date) => {
|
|
1920
|
-
date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);
|
|
1921
|
-
}, (date, step) => {
|
|
1922
|
-
date.setTime(+date + step * durationMinute);
|
|
1923
|
-
}, (start, end) => {
|
|
1924
|
-
return (end - start) / durationMinute;
|
|
1925
|
-
}, (date) => {
|
|
1926
|
-
return date.getMinutes();
|
|
1927
|
-
});
|
|
1928
|
-
|
|
1929
|
-
timeMinute.range;
|
|
1930
|
-
|
|
1931
|
-
const utcMinute = timeInterval((date) => {
|
|
1932
|
-
date.setUTCSeconds(0, 0);
|
|
1933
|
-
}, (date, step) => {
|
|
1934
|
-
date.setTime(+date + step * durationMinute);
|
|
1935
|
-
}, (start, end) => {
|
|
1936
|
-
return (end - start) / durationMinute;
|
|
1937
|
-
}, (date) => {
|
|
1938
|
-
return date.getUTCMinutes();
|
|
1939
|
-
});
|
|
1940
|
-
|
|
1941
|
-
utcMinute.range;
|
|
1942
|
-
|
|
1943
|
-
const timeHour = timeInterval((date) => {
|
|
1944
|
-
date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);
|
|
1945
|
-
}, (date, step) => {
|
|
1946
|
-
date.setTime(+date + step * durationHour);
|
|
1947
|
-
}, (start, end) => {
|
|
1948
|
-
return (end - start) / durationHour;
|
|
1949
|
-
}, (date) => {
|
|
1950
|
-
return date.getHours();
|
|
1951
|
-
});
|
|
1952
|
-
|
|
1953
|
-
timeHour.range;
|
|
1954
|
-
|
|
1955
|
-
const utcHour = timeInterval((date) => {
|
|
1956
|
-
date.setUTCMinutes(0, 0, 0);
|
|
1957
|
-
}, (date, step) => {
|
|
1958
|
-
date.setTime(+date + step * durationHour);
|
|
1959
|
-
}, (start, end) => {
|
|
1960
|
-
return (end - start) / durationHour;
|
|
1961
|
-
}, (date) => {
|
|
1962
|
-
return date.getUTCHours();
|
|
1963
|
-
});
|
|
1964
|
-
|
|
1965
|
-
utcHour.range;
|
|
1966
|
-
|
|
1967
|
-
const timeDay = timeInterval(
|
|
1968
|
-
date => date.setHours(0, 0, 0, 0),
|
|
1969
|
-
(date, step) => date.setDate(date.getDate() + step),
|
|
1970
|
-
(start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,
|
|
1971
|
-
date => date.getDate() - 1
|
|
1972
|
-
);
|
|
1973
|
-
|
|
1974
|
-
timeDay.range;
|
|
1975
|
-
|
|
1976
|
-
const utcDay = timeInterval((date) => {
|
|
1977
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
1978
|
-
}, (date, step) => {
|
|
1979
|
-
date.setUTCDate(date.getUTCDate() + step);
|
|
1980
|
-
}, (start, end) => {
|
|
1981
|
-
return (end - start) / durationDay;
|
|
1982
|
-
}, (date) => {
|
|
1983
|
-
return date.getUTCDate() - 1;
|
|
1984
|
-
});
|
|
1985
|
-
|
|
1986
|
-
utcDay.range;
|
|
1987
|
-
|
|
1988
|
-
const unixDay = timeInterval((date) => {
|
|
1989
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
1990
|
-
}, (date, step) => {
|
|
1991
|
-
date.setUTCDate(date.getUTCDate() + step);
|
|
1992
|
-
}, (start, end) => {
|
|
1993
|
-
return (end - start) / durationDay;
|
|
1994
|
-
}, (date) => {
|
|
1995
|
-
return Math.floor(date / durationDay);
|
|
1996
|
-
});
|
|
1997
|
-
|
|
1998
|
-
unixDay.range;
|
|
1999
|
-
|
|
2000
|
-
function timeWeekday(i) {
|
|
2001
|
-
return timeInterval((date) => {
|
|
2002
|
-
date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);
|
|
2003
|
-
date.setHours(0, 0, 0, 0);
|
|
2004
|
-
}, (date, step) => {
|
|
2005
|
-
date.setDate(date.getDate() + step * 7);
|
|
2006
|
-
}, (start, end) => {
|
|
2007
|
-
return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;
|
|
2008
|
-
});
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
|
-
const timeSunday = timeWeekday(0);
|
|
2012
|
-
const timeMonday = timeWeekday(1);
|
|
2013
|
-
const timeTuesday = timeWeekday(2);
|
|
2014
|
-
const timeWednesday = timeWeekday(3);
|
|
2015
|
-
const timeThursday = timeWeekday(4);
|
|
2016
|
-
const timeFriday = timeWeekday(5);
|
|
2017
|
-
const timeSaturday = timeWeekday(6);
|
|
2018
|
-
|
|
2019
|
-
timeSunday.range;
|
|
2020
|
-
timeMonday.range;
|
|
2021
|
-
timeTuesday.range;
|
|
2022
|
-
timeWednesday.range;
|
|
2023
|
-
timeThursday.range;
|
|
2024
|
-
timeFriday.range;
|
|
2025
|
-
timeSaturday.range;
|
|
2026
|
-
|
|
2027
|
-
function utcWeekday(i) {
|
|
2028
|
-
return timeInterval((date) => {
|
|
2029
|
-
date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);
|
|
2030
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
2031
|
-
}, (date, step) => {
|
|
2032
|
-
date.setUTCDate(date.getUTCDate() + step * 7);
|
|
2033
|
-
}, (start, end) => {
|
|
2034
|
-
return (end - start) / durationWeek;
|
|
2035
|
-
});
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
const utcSunday = utcWeekday(0);
|
|
2039
|
-
const utcMonday = utcWeekday(1);
|
|
2040
|
-
const utcTuesday = utcWeekday(2);
|
|
2041
|
-
const utcWednesday = utcWeekday(3);
|
|
2042
|
-
const utcThursday = utcWeekday(4);
|
|
2043
|
-
const utcFriday = utcWeekday(5);
|
|
2044
|
-
const utcSaturday = utcWeekday(6);
|
|
2045
|
-
|
|
2046
|
-
utcSunday.range;
|
|
2047
|
-
utcMonday.range;
|
|
2048
|
-
utcTuesday.range;
|
|
2049
|
-
utcWednesday.range;
|
|
2050
|
-
utcThursday.range;
|
|
2051
|
-
utcFriday.range;
|
|
2052
|
-
utcSaturday.range;
|
|
2053
|
-
|
|
2054
|
-
const timeMonth = timeInterval((date) => {
|
|
2055
|
-
date.setDate(1);
|
|
2056
|
-
date.setHours(0, 0, 0, 0);
|
|
2057
|
-
}, (date, step) => {
|
|
2058
|
-
date.setMonth(date.getMonth() + step);
|
|
2059
|
-
}, (start, end) => {
|
|
2060
|
-
return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
|
|
2061
|
-
}, (date) => {
|
|
2062
|
-
return date.getMonth();
|
|
2063
|
-
});
|
|
2064
|
-
|
|
2065
|
-
timeMonth.range;
|
|
2066
|
-
|
|
2067
|
-
const utcMonth = timeInterval((date) => {
|
|
2068
|
-
date.setUTCDate(1);
|
|
2069
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
2070
|
-
}, (date, step) => {
|
|
2071
|
-
date.setUTCMonth(date.getUTCMonth() + step);
|
|
2072
|
-
}, (start, end) => {
|
|
2073
|
-
return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
|
|
2074
|
-
}, (date) => {
|
|
2075
|
-
return date.getUTCMonth();
|
|
2076
|
-
});
|
|
2077
|
-
|
|
2078
|
-
utcMonth.range;
|
|
2079
|
-
|
|
2080
|
-
const timeYear = timeInterval((date) => {
|
|
2081
|
-
date.setMonth(0, 1);
|
|
2082
|
-
date.setHours(0, 0, 0, 0);
|
|
2083
|
-
}, (date, step) => {
|
|
2084
|
-
date.setFullYear(date.getFullYear() + step);
|
|
2085
|
-
}, (start, end) => {
|
|
2086
|
-
return end.getFullYear() - start.getFullYear();
|
|
2087
|
-
}, (date) => {
|
|
2088
|
-
return date.getFullYear();
|
|
2089
|
-
});
|
|
2090
|
-
|
|
2091
|
-
// An optimized implementation for this simple case.
|
|
2092
|
-
timeYear.every = (k) => {
|
|
2093
|
-
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {
|
|
2094
|
-
date.setFullYear(Math.floor(date.getFullYear() / k) * k);
|
|
2095
|
-
date.setMonth(0, 1);
|
|
2096
|
-
date.setHours(0, 0, 0, 0);
|
|
2097
|
-
}, (date, step) => {
|
|
2098
|
-
date.setFullYear(date.getFullYear() + step * k);
|
|
2099
|
-
});
|
|
2100
|
-
};
|
|
2101
|
-
|
|
2102
|
-
timeYear.range;
|
|
2103
|
-
|
|
2104
|
-
const utcYear = timeInterval((date) => {
|
|
2105
|
-
date.setUTCMonth(0, 1);
|
|
2106
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
2107
|
-
}, (date, step) => {
|
|
2108
|
-
date.setUTCFullYear(date.getUTCFullYear() + step);
|
|
2109
|
-
}, (start, end) => {
|
|
2110
|
-
return end.getUTCFullYear() - start.getUTCFullYear();
|
|
2111
|
-
}, (date) => {
|
|
2112
|
-
return date.getUTCFullYear();
|
|
2113
|
-
});
|
|
2114
|
-
|
|
2115
|
-
// An optimized implementation for this simple case.
|
|
2116
|
-
utcYear.every = (k) => {
|
|
2117
|
-
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {
|
|
2118
|
-
date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);
|
|
2119
|
-
date.setUTCMonth(0, 1);
|
|
2120
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
2121
|
-
}, (date, step) => {
|
|
2122
|
-
date.setUTCFullYear(date.getUTCFullYear() + step * k);
|
|
2123
|
-
});
|
|
2124
|
-
};
|
|
2125
|
-
|
|
2126
|
-
utcYear.range;
|
|
2127
|
-
|
|
2128
|
-
function localDate(d) {
|
|
2129
|
-
if (0 <= d.y && d.y < 100) {
|
|
2130
|
-
var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
|
|
2131
|
-
date.setFullYear(d.y);
|
|
2132
|
-
return date;
|
|
2133
|
-
}
|
|
2134
|
-
return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2137
|
-
function utcDate(d) {
|
|
2138
|
-
if (0 <= d.y && d.y < 100) {
|
|
2139
|
-
var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
|
|
2140
|
-
date.setUTCFullYear(d.y);
|
|
2141
|
-
return date;
|
|
2142
|
-
}
|
|
2143
|
-
return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
function newDate(y, m, d) {
|
|
2147
|
-
return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2150
|
-
function formatLocale(locale) {
|
|
2151
|
-
var locale_dateTime = locale.dateTime,
|
|
2152
|
-
locale_date = locale.date,
|
|
2153
|
-
locale_time = locale.time,
|
|
2154
|
-
locale_periods = locale.periods,
|
|
2155
|
-
locale_weekdays = locale.days,
|
|
2156
|
-
locale_shortWeekdays = locale.shortDays,
|
|
2157
|
-
locale_months = locale.months,
|
|
2158
|
-
locale_shortMonths = locale.shortMonths;
|
|
2159
|
-
|
|
2160
|
-
var periodRe = formatRe(locale_periods),
|
|
2161
|
-
periodLookup = formatLookup(locale_periods),
|
|
2162
|
-
weekdayRe = formatRe(locale_weekdays),
|
|
2163
|
-
weekdayLookup = formatLookup(locale_weekdays),
|
|
2164
|
-
shortWeekdayRe = formatRe(locale_shortWeekdays),
|
|
2165
|
-
shortWeekdayLookup = formatLookup(locale_shortWeekdays),
|
|
2166
|
-
monthRe = formatRe(locale_months),
|
|
2167
|
-
monthLookup = formatLookup(locale_months),
|
|
2168
|
-
shortMonthRe = formatRe(locale_shortMonths),
|
|
2169
|
-
shortMonthLookup = formatLookup(locale_shortMonths);
|
|
2170
|
-
|
|
2171
|
-
var formats = {
|
|
2172
|
-
"a": formatShortWeekday,
|
|
2173
|
-
"A": formatWeekday,
|
|
2174
|
-
"b": formatShortMonth,
|
|
2175
|
-
"B": formatMonth,
|
|
2176
|
-
"c": null,
|
|
2177
|
-
"d": formatDayOfMonth,
|
|
2178
|
-
"e": formatDayOfMonth,
|
|
2179
|
-
"f": formatMicroseconds,
|
|
2180
|
-
"g": formatYearISO,
|
|
2181
|
-
"G": formatFullYearISO,
|
|
2182
|
-
"H": formatHour24,
|
|
2183
|
-
"I": formatHour12,
|
|
2184
|
-
"j": formatDayOfYear,
|
|
2185
|
-
"L": formatMilliseconds,
|
|
2186
|
-
"m": formatMonthNumber,
|
|
2187
|
-
"M": formatMinutes,
|
|
2188
|
-
"p": formatPeriod,
|
|
2189
|
-
"q": formatQuarter,
|
|
2190
|
-
"Q": formatUnixTimestamp,
|
|
2191
|
-
"s": formatUnixTimestampSeconds,
|
|
2192
|
-
"S": formatSeconds,
|
|
2193
|
-
"u": formatWeekdayNumberMonday,
|
|
2194
|
-
"U": formatWeekNumberSunday,
|
|
2195
|
-
"V": formatWeekNumberISO,
|
|
2196
|
-
"w": formatWeekdayNumberSunday,
|
|
2197
|
-
"W": formatWeekNumberMonday,
|
|
2198
|
-
"x": null,
|
|
2199
|
-
"X": null,
|
|
2200
|
-
"y": formatYear,
|
|
2201
|
-
"Y": formatFullYear,
|
|
2202
|
-
"Z": formatZone,
|
|
2203
|
-
"%": formatLiteralPercent
|
|
2204
|
-
};
|
|
2205
|
-
|
|
2206
|
-
var utcFormats = {
|
|
2207
|
-
"a": formatUTCShortWeekday,
|
|
2208
|
-
"A": formatUTCWeekday,
|
|
2209
|
-
"b": formatUTCShortMonth,
|
|
2210
|
-
"B": formatUTCMonth,
|
|
2211
|
-
"c": null,
|
|
2212
|
-
"d": formatUTCDayOfMonth,
|
|
2213
|
-
"e": formatUTCDayOfMonth,
|
|
2214
|
-
"f": formatUTCMicroseconds,
|
|
2215
|
-
"g": formatUTCYearISO,
|
|
2216
|
-
"G": formatUTCFullYearISO,
|
|
2217
|
-
"H": formatUTCHour24,
|
|
2218
|
-
"I": formatUTCHour12,
|
|
2219
|
-
"j": formatUTCDayOfYear,
|
|
2220
|
-
"L": formatUTCMilliseconds,
|
|
2221
|
-
"m": formatUTCMonthNumber,
|
|
2222
|
-
"M": formatUTCMinutes,
|
|
2223
|
-
"p": formatUTCPeriod,
|
|
2224
|
-
"q": formatUTCQuarter,
|
|
2225
|
-
"Q": formatUnixTimestamp,
|
|
2226
|
-
"s": formatUnixTimestampSeconds,
|
|
2227
|
-
"S": formatUTCSeconds,
|
|
2228
|
-
"u": formatUTCWeekdayNumberMonday,
|
|
2229
|
-
"U": formatUTCWeekNumberSunday,
|
|
2230
|
-
"V": formatUTCWeekNumberISO,
|
|
2231
|
-
"w": formatUTCWeekdayNumberSunday,
|
|
2232
|
-
"W": formatUTCWeekNumberMonday,
|
|
2233
|
-
"x": null,
|
|
2234
|
-
"X": null,
|
|
2235
|
-
"y": formatUTCYear,
|
|
2236
|
-
"Y": formatUTCFullYear,
|
|
2237
|
-
"Z": formatUTCZone,
|
|
2238
|
-
"%": formatLiteralPercent
|
|
2239
|
-
};
|
|
2240
|
-
|
|
2241
|
-
var parses = {
|
|
2242
|
-
"a": parseShortWeekday,
|
|
2243
|
-
"A": parseWeekday,
|
|
2244
|
-
"b": parseShortMonth,
|
|
2245
|
-
"B": parseMonth,
|
|
2246
|
-
"c": parseLocaleDateTime,
|
|
2247
|
-
"d": parseDayOfMonth,
|
|
2248
|
-
"e": parseDayOfMonth,
|
|
2249
|
-
"f": parseMicroseconds,
|
|
2250
|
-
"g": parseYear,
|
|
2251
|
-
"G": parseFullYear,
|
|
2252
|
-
"H": parseHour24,
|
|
2253
|
-
"I": parseHour24,
|
|
2254
|
-
"j": parseDayOfYear,
|
|
2255
|
-
"L": parseMilliseconds,
|
|
2256
|
-
"m": parseMonthNumber,
|
|
2257
|
-
"M": parseMinutes,
|
|
2258
|
-
"p": parsePeriod,
|
|
2259
|
-
"q": parseQuarter,
|
|
2260
|
-
"Q": parseUnixTimestamp,
|
|
2261
|
-
"s": parseUnixTimestampSeconds,
|
|
2262
|
-
"S": parseSeconds,
|
|
2263
|
-
"u": parseWeekdayNumberMonday,
|
|
2264
|
-
"U": parseWeekNumberSunday,
|
|
2265
|
-
"V": parseWeekNumberISO,
|
|
2266
|
-
"w": parseWeekdayNumberSunday,
|
|
2267
|
-
"W": parseWeekNumberMonday,
|
|
2268
|
-
"x": parseLocaleDate,
|
|
2269
|
-
"X": parseLocaleTime,
|
|
2270
|
-
"y": parseYear,
|
|
2271
|
-
"Y": parseFullYear,
|
|
2272
|
-
"Z": parseZone,
|
|
2273
|
-
"%": parseLiteralPercent
|
|
2274
|
-
};
|
|
2275
|
-
|
|
2276
|
-
// These recursive directive definitions must be deferred.
|
|
2277
|
-
formats.x = newFormat(locale_date, formats);
|
|
2278
|
-
formats.X = newFormat(locale_time, formats);
|
|
2279
|
-
formats.c = newFormat(locale_dateTime, formats);
|
|
2280
|
-
utcFormats.x = newFormat(locale_date, utcFormats);
|
|
2281
|
-
utcFormats.X = newFormat(locale_time, utcFormats);
|
|
2282
|
-
utcFormats.c = newFormat(locale_dateTime, utcFormats);
|
|
2283
|
-
|
|
2284
|
-
function newFormat(specifier, formats) {
|
|
2285
|
-
return function(date) {
|
|
2286
|
-
var string = [],
|
|
2287
|
-
i = -1,
|
|
2288
|
-
j = 0,
|
|
2289
|
-
n = specifier.length,
|
|
2290
|
-
c,
|
|
2291
|
-
pad,
|
|
2292
|
-
format;
|
|
2293
|
-
|
|
2294
|
-
if (!(date instanceof Date)) date = new Date(+date);
|
|
2295
|
-
|
|
2296
|
-
while (++i < n) {
|
|
2297
|
-
if (specifier.charCodeAt(i) === 37) {
|
|
2298
|
-
string.push(specifier.slice(j, i));
|
|
2299
|
-
if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
|
|
2300
|
-
else pad = c === "e" ? " " : "0";
|
|
2301
|
-
if (format = formats[c]) c = format(date, pad);
|
|
2302
|
-
string.push(c);
|
|
2303
|
-
j = i + 1;
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
|
-
|
|
2307
|
-
string.push(specifier.slice(j, i));
|
|
2308
|
-
return string.join("");
|
|
2309
|
-
};
|
|
2310
|
-
}
|
|
2311
|
-
|
|
2312
|
-
function newParse(specifier, Z) {
|
|
2313
|
-
return function(string) {
|
|
2314
|
-
var d = newDate(1900, undefined, 1),
|
|
2315
|
-
i = parseSpecifier(d, specifier, string += "", 0),
|
|
2316
|
-
week, day;
|
|
2317
|
-
if (i != string.length) return null;
|
|
2318
|
-
|
|
2319
|
-
// If a UNIX timestamp is specified, return it.
|
|
2320
|
-
if ("Q" in d) return new Date(d.Q);
|
|
2321
|
-
if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0));
|
|
2322
|
-
|
|
2323
|
-
// If this is utcParse, never use the local timezone.
|
|
2324
|
-
if (Z && !("Z" in d)) d.Z = 0;
|
|
2325
|
-
|
|
2326
|
-
// The am-pm flag is 0 for AM, and 1 for PM.
|
|
2327
|
-
if ("p" in d) d.H = d.H % 12 + d.p * 12;
|
|
2328
|
-
|
|
2329
|
-
// If the month was not specified, inherit from the quarter.
|
|
2330
|
-
if (d.m === undefined) d.m = "q" in d ? d.q : 0;
|
|
2331
|
-
|
|
2332
|
-
// Convert day-of-week and week-of-year to day-of-year.
|
|
2333
|
-
if ("V" in d) {
|
|
2334
|
-
if (d.V < 1 || d.V > 53) return null;
|
|
2335
|
-
if (!("w" in d)) d.w = 1;
|
|
2336
|
-
if ("Z" in d) {
|
|
2337
|
-
week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();
|
|
2338
|
-
week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);
|
|
2339
|
-
week = utcDay.offset(week, (d.V - 1) * 7);
|
|
2340
|
-
d.y = week.getUTCFullYear();
|
|
2341
|
-
d.m = week.getUTCMonth();
|
|
2342
|
-
d.d = week.getUTCDate() + (d.w + 6) % 7;
|
|
2343
|
-
} else {
|
|
2344
|
-
week = localDate(newDate(d.y, 0, 1)), day = week.getDay();
|
|
2345
|
-
week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);
|
|
2346
|
-
week = timeDay.offset(week, (d.V - 1) * 7);
|
|
2347
|
-
d.y = week.getFullYear();
|
|
2348
|
-
d.m = week.getMonth();
|
|
2349
|
-
d.d = week.getDate() + (d.w + 6) % 7;
|
|
2350
|
-
}
|
|
2351
|
-
} else if ("W" in d || "U" in d) {
|
|
2352
|
-
if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
|
|
2353
|
-
day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
|
|
2354
|
-
d.m = 0;
|
|
2355
|
-
d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
|
|
2356
|
-
}
|
|
2357
|
-
|
|
2358
|
-
// If a time zone is specified, all fields are interpreted as UTC and then
|
|
2359
|
-
// offset according to the specified time zone.
|
|
2360
|
-
if ("Z" in d) {
|
|
2361
|
-
d.H += d.Z / 100 | 0;
|
|
2362
|
-
d.M += d.Z % 100;
|
|
2363
|
-
return utcDate(d);
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
// Otherwise, all fields are in local time.
|
|
2367
|
-
return localDate(d);
|
|
2368
|
-
};
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
function parseSpecifier(d, specifier, string, j) {
|
|
2372
|
-
var i = 0,
|
|
2373
|
-
n = specifier.length,
|
|
2374
|
-
m = string.length,
|
|
2375
|
-
c,
|
|
2376
|
-
parse;
|
|
2377
|
-
|
|
2378
|
-
while (i < n) {
|
|
2379
|
-
if (j >= m) return -1;
|
|
2380
|
-
c = specifier.charCodeAt(i++);
|
|
2381
|
-
if (c === 37) {
|
|
2382
|
-
c = specifier.charAt(i++);
|
|
2383
|
-
parse = parses[c in pads ? specifier.charAt(i++) : c];
|
|
2384
|
-
if (!parse || ((j = parse(d, string, j)) < 0)) return -1;
|
|
2385
|
-
} else if (c != string.charCodeAt(j++)) {
|
|
2386
|
-
return -1;
|
|
2387
|
-
}
|
|
2388
|
-
}
|
|
2389
|
-
|
|
2390
|
-
return j;
|
|
2391
|
-
}
|
|
2392
|
-
|
|
2393
|
-
function parsePeriod(d, string, i) {
|
|
2394
|
-
var n = periodRe.exec(string.slice(i));
|
|
2395
|
-
return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
|
|
2396
|
-
}
|
|
2397
|
-
|
|
2398
|
-
function parseShortWeekday(d, string, i) {
|
|
2399
|
-
var n = shortWeekdayRe.exec(string.slice(i));
|
|
2400
|
-
return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
|
|
2401
|
-
}
|
|
2402
|
-
|
|
2403
|
-
function parseWeekday(d, string, i) {
|
|
2404
|
-
var n = weekdayRe.exec(string.slice(i));
|
|
2405
|
-
return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
|
|
2406
|
-
}
|
|
2407
|
-
|
|
2408
|
-
function parseShortMonth(d, string, i) {
|
|
2409
|
-
var n = shortMonthRe.exec(string.slice(i));
|
|
2410
|
-
return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
|
|
2411
|
-
}
|
|
2412
|
-
|
|
2413
|
-
function parseMonth(d, string, i) {
|
|
2414
|
-
var n = monthRe.exec(string.slice(i));
|
|
2415
|
-
return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
|
-
function parseLocaleDateTime(d, string, i) {
|
|
2419
|
-
return parseSpecifier(d, locale_dateTime, string, i);
|
|
2420
|
-
}
|
|
2421
|
-
|
|
2422
|
-
function parseLocaleDate(d, string, i) {
|
|
2423
|
-
return parseSpecifier(d, locale_date, string, i);
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
function parseLocaleTime(d, string, i) {
|
|
2427
|
-
return parseSpecifier(d, locale_time, string, i);
|
|
2428
|
-
}
|
|
2429
|
-
|
|
2430
|
-
function formatShortWeekday(d) {
|
|
2431
|
-
return locale_shortWeekdays[d.getDay()];
|
|
2432
|
-
}
|
|
2433
|
-
|
|
2434
|
-
function formatWeekday(d) {
|
|
2435
|
-
return locale_weekdays[d.getDay()];
|
|
2436
|
-
}
|
|
2437
|
-
|
|
2438
|
-
function formatShortMonth(d) {
|
|
2439
|
-
return locale_shortMonths[d.getMonth()];
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
function formatMonth(d) {
|
|
2443
|
-
return locale_months[d.getMonth()];
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
function formatPeriod(d) {
|
|
2447
|
-
return locale_periods[+(d.getHours() >= 12)];
|
|
2448
|
-
}
|
|
2449
|
-
|
|
2450
|
-
function formatQuarter(d) {
|
|
2451
|
-
return 1 + ~~(d.getMonth() / 3);
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
function formatUTCShortWeekday(d) {
|
|
2455
|
-
return locale_shortWeekdays[d.getUTCDay()];
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
function formatUTCWeekday(d) {
|
|
2459
|
-
return locale_weekdays[d.getUTCDay()];
|
|
2460
|
-
}
|
|
2461
|
-
|
|
2462
|
-
function formatUTCShortMonth(d) {
|
|
2463
|
-
return locale_shortMonths[d.getUTCMonth()];
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
|
-
function formatUTCMonth(d) {
|
|
2467
|
-
return locale_months[d.getUTCMonth()];
|
|
2468
|
-
}
|
|
2469
|
-
|
|
2470
|
-
function formatUTCPeriod(d) {
|
|
2471
|
-
return locale_periods[+(d.getUTCHours() >= 12)];
|
|
2472
|
-
}
|
|
2473
|
-
|
|
2474
|
-
function formatUTCQuarter(d) {
|
|
2475
|
-
return 1 + ~~(d.getUTCMonth() / 3);
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
|
-
return {
|
|
2479
|
-
format: function(specifier) {
|
|
2480
|
-
var f = newFormat(specifier += "", formats);
|
|
2481
|
-
f.toString = function() { return specifier; };
|
|
2482
|
-
return f;
|
|
2483
|
-
},
|
|
2484
|
-
parse: function(specifier) {
|
|
2485
|
-
var p = newParse(specifier += "", false);
|
|
2486
|
-
p.toString = function() { return specifier; };
|
|
2487
|
-
return p;
|
|
2488
|
-
},
|
|
2489
|
-
utcFormat: function(specifier) {
|
|
2490
|
-
var f = newFormat(specifier += "", utcFormats);
|
|
2491
|
-
f.toString = function() { return specifier; };
|
|
2492
|
-
return f;
|
|
2493
|
-
},
|
|
2494
|
-
utcParse: function(specifier) {
|
|
2495
|
-
var p = newParse(specifier += "", true);
|
|
2496
|
-
p.toString = function() { return specifier; };
|
|
2497
|
-
return p;
|
|
2498
|
-
}
|
|
2499
|
-
};
|
|
2500
|
-
}
|
|
2501
|
-
|
|
2502
|
-
var pads = {"-": "", "_": " ", "0": "0"},
|
|
2503
|
-
numberRe = /^\s*\d+/, // note: ignores next directive
|
|
2504
|
-
percentRe = /^%/,
|
|
2505
|
-
requoteRe = /[\\^$*+?|[\]().{}]/g;
|
|
2506
|
-
|
|
2507
|
-
function pad(value, fill, width) {
|
|
2508
|
-
var sign = value < 0 ? "-" : "",
|
|
2509
|
-
string = (sign ? -value : value) + "",
|
|
2510
|
-
length = string.length;
|
|
2511
|
-
return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
|
|
2512
|
-
}
|
|
2513
|
-
|
|
2514
|
-
function requote(s) {
|
|
2515
|
-
return s.replace(requoteRe, "\\$&");
|
|
2516
|
-
}
|
|
2517
|
-
|
|
2518
|
-
function formatRe(names) {
|
|
2519
|
-
return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
|
|
2520
|
-
}
|
|
2521
|
-
|
|
2522
|
-
function formatLookup(names) {
|
|
2523
|
-
return new Map(names.map((name, i) => [name.toLowerCase(), i]));
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
function parseWeekdayNumberSunday(d, string, i) {
|
|
2527
|
-
var n = numberRe.exec(string.slice(i, i + 1));
|
|
2528
|
-
return n ? (d.w = +n[0], i + n[0].length) : -1;
|
|
2529
|
-
}
|
|
2530
|
-
|
|
2531
|
-
function parseWeekdayNumberMonday(d, string, i) {
|
|
2532
|
-
var n = numberRe.exec(string.slice(i, i + 1));
|
|
2533
|
-
return n ? (d.u = +n[0], i + n[0].length) : -1;
|
|
2534
|
-
}
|
|
2535
|
-
|
|
2536
|
-
function parseWeekNumberSunday(d, string, i) {
|
|
2537
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2538
|
-
return n ? (d.U = +n[0], i + n[0].length) : -1;
|
|
2539
|
-
}
|
|
2540
|
-
|
|
2541
|
-
function parseWeekNumberISO(d, string, i) {
|
|
2542
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2543
|
-
return n ? (d.V = +n[0], i + n[0].length) : -1;
|
|
2544
|
-
}
|
|
2545
|
-
|
|
2546
|
-
function parseWeekNumberMonday(d, string, i) {
|
|
2547
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2548
|
-
return n ? (d.W = +n[0], i + n[0].length) : -1;
|
|
2549
|
-
}
|
|
2550
|
-
|
|
2551
|
-
function parseFullYear(d, string, i) {
|
|
2552
|
-
var n = numberRe.exec(string.slice(i, i + 4));
|
|
2553
|
-
return n ? (d.y = +n[0], i + n[0].length) : -1;
|
|
2554
|
-
}
|
|
2555
|
-
|
|
2556
|
-
function parseYear(d, string, i) {
|
|
2557
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2558
|
-
return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;
|
|
2559
|
-
}
|
|
2560
|
-
|
|
2561
|
-
function parseZone(d, string, i) {
|
|
2562
|
-
var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
|
|
2563
|
-
return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
|
|
2564
|
-
}
|
|
2565
|
-
|
|
2566
|
-
function parseQuarter(d, string, i) {
|
|
2567
|
-
var n = numberRe.exec(string.slice(i, i + 1));
|
|
2568
|
-
return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
|
-
function parseMonthNumber(d, string, i) {
|
|
2572
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2573
|
-
return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2576
|
-
function parseDayOfMonth(d, string, i) {
|
|
2577
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2578
|
-
return n ? (d.d = +n[0], i + n[0].length) : -1;
|
|
2579
|
-
}
|
|
2580
|
-
|
|
2581
|
-
function parseDayOfYear(d, string, i) {
|
|
2582
|
-
var n = numberRe.exec(string.slice(i, i + 3));
|
|
2583
|
-
return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
|
|
2584
|
-
}
|
|
2585
|
-
|
|
2586
|
-
function parseHour24(d, string, i) {
|
|
2587
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2588
|
-
return n ? (d.H = +n[0], i + n[0].length) : -1;
|
|
2589
|
-
}
|
|
2590
|
-
|
|
2591
|
-
function parseMinutes(d, string, i) {
|
|
2592
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2593
|
-
return n ? (d.M = +n[0], i + n[0].length) : -1;
|
|
2594
|
-
}
|
|
2595
|
-
|
|
2596
|
-
function parseSeconds(d, string, i) {
|
|
2597
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2598
|
-
return n ? (d.S = +n[0], i + n[0].length) : -1;
|
|
2599
|
-
}
|
|
2600
|
-
|
|
2601
|
-
function parseMilliseconds(d, string, i) {
|
|
2602
|
-
var n = numberRe.exec(string.slice(i, i + 3));
|
|
2603
|
-
return n ? (d.L = +n[0], i + n[0].length) : -1;
|
|
2604
|
-
}
|
|
2605
|
-
|
|
2606
|
-
function parseMicroseconds(d, string, i) {
|
|
2607
|
-
var n = numberRe.exec(string.slice(i, i + 6));
|
|
2608
|
-
return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;
|
|
2609
|
-
}
|
|
2610
|
-
|
|
2611
|
-
function parseLiteralPercent(d, string, i) {
|
|
2612
|
-
var n = percentRe.exec(string.slice(i, i + 1));
|
|
2613
|
-
return n ? i + n[0].length : -1;
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
function parseUnixTimestamp(d, string, i) {
|
|
2617
|
-
var n = numberRe.exec(string.slice(i));
|
|
2618
|
-
return n ? (d.Q = +n[0], i + n[0].length) : -1;
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2621
|
-
function parseUnixTimestampSeconds(d, string, i) {
|
|
2622
|
-
var n = numberRe.exec(string.slice(i));
|
|
2623
|
-
return n ? (d.s = +n[0], i + n[0].length) : -1;
|
|
2624
|
-
}
|
|
2625
|
-
|
|
2626
|
-
function formatDayOfMonth(d, p) {
|
|
2627
|
-
return pad(d.getDate(), p, 2);
|
|
2628
|
-
}
|
|
2629
|
-
|
|
2630
|
-
function formatHour24(d, p) {
|
|
2631
|
-
return pad(d.getHours(), p, 2);
|
|
2632
|
-
}
|
|
2633
|
-
|
|
2634
|
-
function formatHour12(d, p) {
|
|
2635
|
-
return pad(d.getHours() % 12 || 12, p, 2);
|
|
2636
|
-
}
|
|
2637
|
-
|
|
2638
|
-
function formatDayOfYear(d, p) {
|
|
2639
|
-
return pad(1 + timeDay.count(timeYear(d), d), p, 3);
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2642
|
-
function formatMilliseconds(d, p) {
|
|
2643
|
-
return pad(d.getMilliseconds(), p, 3);
|
|
2644
|
-
}
|
|
2645
|
-
|
|
2646
|
-
function formatMicroseconds(d, p) {
|
|
2647
|
-
return formatMilliseconds(d, p) + "000";
|
|
2648
|
-
}
|
|
2649
|
-
|
|
2650
|
-
function formatMonthNumber(d, p) {
|
|
2651
|
-
return pad(d.getMonth() + 1, p, 2);
|
|
2652
|
-
}
|
|
2653
|
-
|
|
2654
|
-
function formatMinutes(d, p) {
|
|
2655
|
-
return pad(d.getMinutes(), p, 2);
|
|
2656
|
-
}
|
|
2657
|
-
|
|
2658
|
-
function formatSeconds(d, p) {
|
|
2659
|
-
return pad(d.getSeconds(), p, 2);
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
|
-
function formatWeekdayNumberMonday(d) {
|
|
2663
|
-
var day = d.getDay();
|
|
2664
|
-
return day === 0 ? 7 : day;
|
|
2665
|
-
}
|
|
2666
|
-
|
|
2667
|
-
function formatWeekNumberSunday(d, p) {
|
|
2668
|
-
return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);
|
|
2669
|
-
}
|
|
2670
|
-
|
|
2671
|
-
function dISO(d) {
|
|
2672
|
-
var day = d.getDay();
|
|
2673
|
-
return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);
|
|
2674
|
-
}
|
|
2675
|
-
|
|
2676
|
-
function formatWeekNumberISO(d, p) {
|
|
2677
|
-
d = dISO(d);
|
|
2678
|
-
return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);
|
|
2679
|
-
}
|
|
2680
|
-
|
|
2681
|
-
function formatWeekdayNumberSunday(d) {
|
|
2682
|
-
return d.getDay();
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
|
-
function formatWeekNumberMonday(d, p) {
|
|
2686
|
-
return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
function formatYear(d, p) {
|
|
2690
|
-
return pad(d.getFullYear() % 100, p, 2);
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2693
|
-
function formatYearISO(d, p) {
|
|
2694
|
-
d = dISO(d);
|
|
2695
|
-
return pad(d.getFullYear() % 100, p, 2);
|
|
2696
|
-
}
|
|
2697
|
-
|
|
2698
|
-
function formatFullYear(d, p) {
|
|
2699
|
-
return pad(d.getFullYear() % 10000, p, 4);
|
|
2700
|
-
}
|
|
2701
|
-
|
|
2702
|
-
function formatFullYearISO(d, p) {
|
|
2703
|
-
var day = d.getDay();
|
|
2704
|
-
d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);
|
|
2705
|
-
return pad(d.getFullYear() % 10000, p, 4);
|
|
2706
|
-
}
|
|
2707
|
-
|
|
2708
|
-
function formatZone(d) {
|
|
2709
|
-
var z = d.getTimezoneOffset();
|
|
2710
|
-
return (z > 0 ? "-" : (z *= -1, "+"))
|
|
2711
|
-
+ pad(z / 60 | 0, "0", 2)
|
|
2712
|
-
+ pad(z % 60, "0", 2);
|
|
2713
|
-
}
|
|
2714
|
-
|
|
2715
|
-
function formatUTCDayOfMonth(d, p) {
|
|
2716
|
-
return pad(d.getUTCDate(), p, 2);
|
|
2717
|
-
}
|
|
2718
|
-
|
|
2719
|
-
function formatUTCHour24(d, p) {
|
|
2720
|
-
return pad(d.getUTCHours(), p, 2);
|
|
2721
|
-
}
|
|
2722
|
-
|
|
2723
|
-
function formatUTCHour12(d, p) {
|
|
2724
|
-
return pad(d.getUTCHours() % 12 || 12, p, 2);
|
|
2725
|
-
}
|
|
2726
|
-
|
|
2727
|
-
function formatUTCDayOfYear(d, p) {
|
|
2728
|
-
return pad(1 + utcDay.count(utcYear(d), d), p, 3);
|
|
2729
|
-
}
|
|
2730
|
-
|
|
2731
|
-
function formatUTCMilliseconds(d, p) {
|
|
2732
|
-
return pad(d.getUTCMilliseconds(), p, 3);
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2735
|
-
function formatUTCMicroseconds(d, p) {
|
|
2736
|
-
return formatUTCMilliseconds(d, p) + "000";
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
|
-
function formatUTCMonthNumber(d, p) {
|
|
2740
|
-
return pad(d.getUTCMonth() + 1, p, 2);
|
|
2741
|
-
}
|
|
2742
|
-
|
|
2743
|
-
function formatUTCMinutes(d, p) {
|
|
2744
|
-
return pad(d.getUTCMinutes(), p, 2);
|
|
2745
|
-
}
|
|
2746
|
-
|
|
2747
|
-
function formatUTCSeconds(d, p) {
|
|
2748
|
-
return pad(d.getUTCSeconds(), p, 2);
|
|
2749
|
-
}
|
|
2750
|
-
|
|
2751
|
-
function formatUTCWeekdayNumberMonday(d) {
|
|
2752
|
-
var dow = d.getUTCDay();
|
|
2753
|
-
return dow === 0 ? 7 : dow;
|
|
2754
|
-
}
|
|
2755
|
-
|
|
2756
|
-
function formatUTCWeekNumberSunday(d, p) {
|
|
2757
|
-
return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);
|
|
2758
|
-
}
|
|
2759
|
-
|
|
2760
|
-
function UTCdISO(d) {
|
|
2761
|
-
var day = d.getUTCDay();
|
|
2762
|
-
return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);
|
|
2763
|
-
}
|
|
2764
|
-
|
|
2765
|
-
function formatUTCWeekNumberISO(d, p) {
|
|
2766
|
-
d = UTCdISO(d);
|
|
2767
|
-
return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);
|
|
2768
|
-
}
|
|
2769
|
-
|
|
2770
|
-
function formatUTCWeekdayNumberSunday(d) {
|
|
2771
|
-
return d.getUTCDay();
|
|
2772
|
-
}
|
|
2773
|
-
|
|
2774
|
-
function formatUTCWeekNumberMonday(d, p) {
|
|
2775
|
-
return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
function formatUTCYear(d, p) {
|
|
2779
|
-
return pad(d.getUTCFullYear() % 100, p, 2);
|
|
2780
|
-
}
|
|
2781
|
-
|
|
2782
|
-
function formatUTCYearISO(d, p) {
|
|
2783
|
-
d = UTCdISO(d);
|
|
2784
|
-
return pad(d.getUTCFullYear() % 100, p, 2);
|
|
2785
|
-
}
|
|
2786
|
-
|
|
2787
|
-
function formatUTCFullYear(d, p) {
|
|
2788
|
-
return pad(d.getUTCFullYear() % 10000, p, 4);
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
function formatUTCFullYearISO(d, p) {
|
|
2792
|
-
var day = d.getUTCDay();
|
|
2793
|
-
d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);
|
|
2794
|
-
return pad(d.getUTCFullYear() % 10000, p, 4);
|
|
2795
|
-
}
|
|
2796
|
-
|
|
2797
|
-
function formatUTCZone() {
|
|
2798
|
-
return "+0000";
|
|
2799
|
-
}
|
|
2800
|
-
|
|
2801
|
-
function formatLiteralPercent() {
|
|
2802
|
-
return "%";
|
|
2803
|
-
}
|
|
2804
|
-
|
|
2805
|
-
function formatUnixTimestamp(d) {
|
|
2806
|
-
return +d;
|
|
2807
|
-
}
|
|
2808
|
-
|
|
2809
|
-
function formatUnixTimestampSeconds(d) {
|
|
2810
|
-
return Math.floor(+d / 1000);
|
|
2811
|
-
}
|
|
2812
|
-
|
|
2813
|
-
var locale;
|
|
2814
|
-
var utcFormat;
|
|
2815
|
-
var utcParse;
|
|
2816
|
-
|
|
2817
|
-
defaultLocale({
|
|
2818
|
-
dateTime: "%x, %X",
|
|
2819
|
-
date: "%-m/%-d/%Y",
|
|
2820
|
-
time: "%-I:%M:%S %p",
|
|
2821
|
-
periods: ["AM", "PM"],
|
|
2822
|
-
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
|
2823
|
-
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
2824
|
-
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
|
2825
|
-
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
|
|
2826
|
-
});
|
|
2827
|
-
|
|
2828
|
-
function defaultLocale(definition) {
|
|
2829
|
-
locale = formatLocale(definition);
|
|
2830
|
-
locale.format;
|
|
2831
|
-
locale.parse;
|
|
2832
|
-
utcFormat = locale.utcFormat;
|
|
2833
|
-
utcParse = locale.utcParse;
|
|
2834
|
-
return locale;
|
|
2835
|
-
}
|
|
2836
|
-
|
|
2837
|
-
var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";
|
|
2838
|
-
|
|
2839
|
-
function formatIsoNative(date) {
|
|
2840
|
-
return date.toISOString();
|
|
2841
|
-
}
|
|
2842
|
-
|
|
2843
|
-
Date.prototype.toISOString
|
|
2844
|
-
? formatIsoNative
|
|
2845
|
-
: utcFormat(isoSpecifier);
|
|
2846
|
-
|
|
2847
|
-
function parseIsoNative(string) {
|
|
2848
|
-
var date = new Date(string);
|
|
2849
|
-
return isNaN(date) ? null : date;
|
|
2850
|
-
}
|
|
2851
|
-
|
|
2852
|
-
+new Date("2000-01-01T00:00:00.000Z")
|
|
2853
|
-
? parseIsoNative
|
|
2854
|
-
: utcParse(isoSpecifier);
|
|
2855
|
-
|
|
2856
1532
|
function transformer() {
|
|
2857
1533
|
var x0 = 0,
|
|
2858
1534
|
x1 = 1,
|
|
@@ -4103,12 +2779,6 @@ var drawChart = (function (exports) {
|
|
|
4103
2779
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
4104
2780
|
}
|
|
4105
2781
|
|
|
4106
|
-
var picomatchBrowserExports = {};
|
|
4107
|
-
var picomatchBrowser = {
|
|
4108
|
-
get exports(){ return picomatchBrowserExports; },
|
|
4109
|
-
set exports(v){ picomatchBrowserExports = v; },
|
|
4110
|
-
};
|
|
4111
|
-
|
|
4112
2782
|
var utils$3 = {};
|
|
4113
2783
|
|
|
4114
2784
|
const WIN_SLASH = '\\\\/';
|
|
@@ -4351,7 +3021,7 @@ var drawChart = (function (exports) {
|
|
|
4351
3021
|
} else {
|
|
4352
3022
|
return path.replace(/\/$/, '').replace(/.*\//, '');
|
|
4353
3023
|
}
|
|
4354
|
-
};
|
|
3024
|
+
};
|
|
4355
3025
|
} (utils$3));
|
|
4356
3026
|
|
|
4357
3027
|
const utils$2 = utils$3;
|
|
@@ -6148,12 +4818,9 @@ var drawChart = (function (exports) {
|
|
|
6148
4818
|
|
|
6149
4819
|
var picomatch_1 = picomatch;
|
|
6150
4820
|
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
module.exports = picomatch_1;
|
|
6154
|
-
} (picomatchBrowser));
|
|
4821
|
+
var picomatchBrowser = picomatch_1;
|
|
6155
4822
|
|
|
6156
|
-
var pm = /*@__PURE__*/getDefaultExportFromCjs(
|
|
4823
|
+
var pm = /*@__PURE__*/getDefaultExportFromCjs(picomatchBrowser);
|
|
6157
4824
|
|
|
6158
4825
|
function isArray(arg) {
|
|
6159
4826
|
return Array.isArray(arg);
|
|
@@ -6244,8 +4911,8 @@ var drawChart = (function (exports) {
|
|
|
6244
4911
|
}));
|
|
6245
4912
|
};
|
|
6246
4913
|
const useFilter = () => {
|
|
6247
|
-
const [includeFilter, setIncludeFilter] =
|
|
6248
|
-
const [excludeFilter, setExcludeFilter] =
|
|
4914
|
+
const [includeFilter, setIncludeFilter] = h("");
|
|
4915
|
+
const [excludeFilter, setExcludeFilter] = h("");
|
|
6249
4916
|
const setIncludeFilterTrottled = F(() => throttleFilter(setIncludeFilter, 200), []);
|
|
6250
4917
|
const setExcludeFilterTrottled = F(() => throttleFilter(setExcludeFilter, 200), []);
|
|
6251
4918
|
const isIncluded = F(() => createFilter(prepareFilter(includeFilter), prepareFilter(excludeFilter)), [includeFilter, excludeFilter]);
|
|
@@ -6263,8 +4930,8 @@ var drawChart = (function (exports) {
|
|
|
6263
4930
|
|
|
6264
4931
|
const PLACEHOLDER = "bundle-*:**/file/**,**/file**, bundle-*:";
|
|
6265
4932
|
const SideBar = ({ availableSizeProperties, sizeProperty, setSizeProperty, onExcludeChange, onIncludeChange, }) => {
|
|
6266
|
-
const [includeValue, setIncludeValue] =
|
|
6267
|
-
const [excludeValue, setExcludeValue] =
|
|
4933
|
+
const [includeValue, setIncludeValue] = h("");
|
|
4934
|
+
const [excludeValue, setExcludeValue] = h("");
|
|
6268
4935
|
const handleSizePropertyChange = (sizeProp) => () => {
|
|
6269
4936
|
if (sizeProp !== sizeProperty) {
|
|
6270
4937
|
setSizeProperty(sizeProp);
|
|
@@ -6280,11 +4947,11 @@ var drawChart = (function (exports) {
|
|
|
6280
4947
|
setExcludeValue(value);
|
|
6281
4948
|
onExcludeChange(value);
|
|
6282
4949
|
};
|
|
6283
|
-
return (o$1("aside",
|
|
4950
|
+
return (o$1("aside", { className: "sidebar", children: [o$1("div", { className: "size-selectors", children: availableSizeProperties.length > 1 &&
|
|
6284
4951
|
availableSizeProperties.map((sizeProp) => {
|
|
6285
4952
|
const id = `selector-${sizeProp}`;
|
|
6286
|
-
return (o$1("div",
|
|
6287
|
-
}) })
|
|
4953
|
+
return (o$1("div", { className: "size-selector", children: [o$1("input", { type: "radio", id: id, checked: sizeProp === sizeProperty, onChange: handleSizePropertyChange(sizeProp) }), o$1("label", { htmlFor: id, children: LABELS[sizeProp] })] }, sizeProp));
|
|
4954
|
+
}) }), o$1("div", { className: "module-filters", children: [o$1("div", { className: "module-filter", children: [o$1("label", { htmlFor: "module-filter-exclude", children: "Exclude" }), o$1("input", { type: "text", id: "module-filter-exclude", value: excludeValue, onInput: handleExcludeChange, placeholder: PLACEHOLDER })] }), o$1("div", { className: "module-filter", children: [o$1("label", { htmlFor: "module-filter-include", children: "Include" }), o$1("input", { type: "text", id: "module-filter-include", value: includeValue, onInput: handleIncludeChange, placeholder: PLACEHOLDER })] })] })] }));
|
|
6288
4955
|
};
|
|
6289
4956
|
|
|
6290
4957
|
const Tooltip_marginX = 10;
|
|
@@ -6292,11 +4959,11 @@ var drawChart = (function (exports) {
|
|
|
6292
4959
|
const Tooltip = ({ node, visible }) => {
|
|
6293
4960
|
const { data } = q(StaticContext);
|
|
6294
4961
|
const ref = _(null);
|
|
6295
|
-
const [style, setStyle] =
|
|
4962
|
+
const [style, setStyle] = h({});
|
|
6296
4963
|
const content = F(() => {
|
|
6297
4964
|
if (!node)
|
|
6298
4965
|
return null;
|
|
6299
|
-
return (o$1(
|
|
4966
|
+
return (o$1(k$1, { children: [o$1("div", { children: node.id }), node.uid && (o$1("div", { children: [o$1("div", { children: [o$1("b", { children: "Imported By" }), ":"] }), data.nodeMetas[node.uid].importedBy.map(({ uid }) => {
|
|
6300
4967
|
const { id } = data.nodeMetas[uid];
|
|
6301
4968
|
return o$1("div", { children: id }, id);
|
|
6302
4969
|
})] }))] }));
|
|
@@ -6319,7 +4986,7 @@ var drawChart = (function (exports) {
|
|
|
6319
4986
|
}
|
|
6320
4987
|
setStyle(pos);
|
|
6321
4988
|
};
|
|
6322
|
-
|
|
4989
|
+
p(() => {
|
|
6323
4990
|
const handleMouseMove = (event) => {
|
|
6324
4991
|
updatePosition({
|
|
6325
4992
|
x: event.pageX,
|
|
@@ -6331,7 +4998,7 @@ var drawChart = (function (exports) {
|
|
|
6331
4998
|
document.removeEventListener("mousemove", handleMouseMove, true);
|
|
6332
4999
|
};
|
|
6333
5000
|
}, []);
|
|
6334
|
-
return (o$1("div",
|
|
5001
|
+
return (o$1("div", { className: `tooltip ${visible ? "" : "tooltip-hidden"}`, ref: ref, style: style, children: content }));
|
|
6335
5002
|
};
|
|
6336
5003
|
|
|
6337
5004
|
class Transform {
|
|
@@ -6367,9 +5034,9 @@ var drawChart = (function (exports) {
|
|
|
6367
5034
|
};
|
|
6368
5035
|
const Network = ({ links, nodes, onNodeHover, onNodeDblClick, getColor, onCanvasClick, onNodeClick, }) => {
|
|
6369
5036
|
const { width, height } = q(StaticContext);
|
|
6370
|
-
const [transform, setTransform] =
|
|
5037
|
+
const [transform, setTransform] = h(identityTransform);
|
|
6371
5038
|
const startPosRef = _();
|
|
6372
|
-
const [dragging, setDragging] =
|
|
5039
|
+
const [dragging, setDragging] = h(false);
|
|
6373
5040
|
const handleMouseDown = (event) => {
|
|
6374
5041
|
if (event.ctrlKey || event.button) {
|
|
6375
5042
|
// context menu
|
|
@@ -6391,9 +5058,9 @@ var drawChart = (function (exports) {
|
|
|
6391
5058
|
return;
|
|
6392
5059
|
setDragging(false);
|
|
6393
5060
|
};
|
|
6394
|
-
return (o$1("svg",
|
|
5061
|
+
return (o$1("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: `${-width / 2} ${-height / 2} ${width} ${height}`, onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onClick: onCanvasClick, children: o$1("g", { transform: transform.toString(), children: [o$1("g", { stroke: "#fff", "stroke-opacity": "0.9", children: links.map((link) => {
|
|
6395
5062
|
return (o$1("line", { "stroke-width": "1", x1: link.source.x, y1: link.source.y, x2: link.target.x, y2: link.target.y }, `${link.source.uid} - ${link.target.uid}`));
|
|
6396
|
-
}) })
|
|
5063
|
+
}) }), o$1("g", { stroke: "#fff", "stroke-width": "1.5", children: nodes.map((node) => {
|
|
6397
5064
|
return (o$1("circle", { r: node.radius, fill: getColor(node), cx: node.x, cy: node.y, onMouseOver: (evt) => {
|
|
6398
5065
|
noEvent(evt);
|
|
6399
5066
|
onNodeHover(node);
|
|
@@ -6404,13 +5071,13 @@ var drawChart = (function (exports) {
|
|
|
6404
5071
|
noEvent(evt);
|
|
6405
5072
|
onNodeDblClick(node);
|
|
6406
5073
|
} }, node.uid));
|
|
6407
|
-
}) })
|
|
5074
|
+
}) })] }) }));
|
|
6408
5075
|
};
|
|
6409
5076
|
|
|
6410
5077
|
const Chart = ({ links, nodes, onNodeExclude, getColor, onNodeSelect, }) => {
|
|
6411
|
-
const [showTooltip, setShowTooltip] =
|
|
6412
|
-
const [tooltipNode, setTooltipNode] =
|
|
6413
|
-
|
|
5078
|
+
const [showTooltip, setShowTooltip] = h(false);
|
|
5079
|
+
const [tooltipNode, setTooltipNode] = h(undefined);
|
|
5080
|
+
p(() => {
|
|
6414
5081
|
const handleMouseOut = () => {
|
|
6415
5082
|
setShowTooltip(false);
|
|
6416
5083
|
};
|
|
@@ -6419,7 +5086,7 @@ var drawChart = (function (exports) {
|
|
|
6419
5086
|
document.removeEventListener("mouseover", handleMouseOut);
|
|
6420
5087
|
};
|
|
6421
5088
|
}, []);
|
|
6422
|
-
return (o$1(
|
|
5089
|
+
return (o$1(k$1, { children: [o$1(Network, { links: links, nodes: nodes, onNodeHover: (node) => {
|
|
6423
5090
|
setTooltipNode(node);
|
|
6424
5091
|
setShowTooltip(true);
|
|
6425
5092
|
}, onNodeDblClick: onNodeExclude, onNodeClick: (node) => onNodeSelect(node.uid), onCanvasClick: () => {
|
|
@@ -6456,8 +5123,8 @@ var drawChart = (function (exports) {
|
|
|
6456
5123
|
const getModuleColor = F(() => {
|
|
6457
5124
|
return createRainbowColor(groups);
|
|
6458
5125
|
}, [groups]);
|
|
6459
|
-
const [excludedNodes, setExcludedNodes] =
|
|
6460
|
-
const [selectedNode, setSelectedNode] =
|
|
5126
|
+
const [excludedNodes, setExcludedNodes] = h([]);
|
|
5127
|
+
const [selectedNode, setSelectedNode] = h();
|
|
6461
5128
|
const { getModuleFilterMultiplier, setExcludeFilter, setIncludeFilter } = useFilter();
|
|
6462
5129
|
const getColor = (node) => {
|
|
6463
5130
|
if (selectedNode != null) {
|
|
@@ -6506,8 +5173,8 @@ var drawChart = (function (exports) {
|
|
|
6506
5173
|
return source && target;
|
|
6507
5174
|
});
|
|
6508
5175
|
}, [data.nodeMetas, processedNodes]);
|
|
6509
|
-
const [animatedNodes, setAnimatedNodes] =
|
|
6510
|
-
|
|
5176
|
+
const [animatedNodes, setAnimatedNodes] = h([]);
|
|
5177
|
+
p(() => {
|
|
6511
5178
|
const simulation = forceSimulation()
|
|
6512
5179
|
.force("collision", forceCollide().radius((node) => node.radius))
|
|
6513
5180
|
.force("charge", forceManyBody().strength(-30))
|
|
@@ -6531,12 +5198,12 @@ var drawChart = (function (exports) {
|
|
|
6531
5198
|
simulation.alphaMin(0.03).restart();
|
|
6532
5199
|
return () => simulation.stop();
|
|
6533
5200
|
}, [nodeGroups, height, links, processedNodes, width]);
|
|
6534
|
-
return (o$1(
|
|
5201
|
+
return (o$1(k$1, { children: [o$1(SideBar, { sizeProperty: "renderedLength", availableSizeProperties: ["renderedLength"], setSizeProperty: () => { }, onExcludeChange: setExcludeFilter, onIncludeChange: setIncludeFilter }), o$1(Chart, { nodes: animatedNodes, onNodeExclude: (node) => setExcludedNodes([...excludedNodes, node.uid]), links: links, getColor: getColor, onNodeSelect: (uid) => setSelectedNode(uid === selectedNode ? undefined : uid) })] }));
|
|
6535
5202
|
};
|
|
6536
5203
|
|
|
6537
5204
|
const NODE_MODULES = /.*(?:\/|\\\\)?node_modules(?:\/|\\\\)([^/\\]+)(?:\/|\\\\).+/;
|
|
6538
5205
|
|
|
6539
|
-
const StaticContext =
|
|
5206
|
+
const StaticContext = G({});
|
|
6540
5207
|
const createNodeInfo = (data, availableSizeProperties, uid) => {
|
|
6541
5208
|
var _a, _b;
|
|
6542
5209
|
const meta = data.nodeMetas[uid];
|
|
@@ -6594,7 +5261,7 @@ var drawChart = (function (exports) {
|
|
|
6594
5261
|
}
|
|
6595
5262
|
groupLayers.push([...newLayer]);
|
|
6596
5263
|
}
|
|
6597
|
-
|
|
5264
|
+
D(o$1(StaticContext.Provider, { value: {
|
|
6598
5265
|
data,
|
|
6599
5266
|
width,
|
|
6600
5267
|
height,
|
|
@@ -6602,7 +5269,7 @@ var drawChart = (function (exports) {
|
|
|
6602
5269
|
nodeGroups,
|
|
6603
5270
|
groups,
|
|
6604
5271
|
groupLayers,
|
|
6605
|
-
}
|
|
5272
|
+
}, children: o$1(Main, {}) }), parentNode);
|
|
6606
5273
|
};
|
|
6607
5274
|
|
|
6608
5275
|
exports.StaticContext = StaticContext;
|
|
@@ -6618,7 +5285,7 @@ var drawChart = (function (exports) {
|
|
|
6618
5285
|
</script>
|
|
6619
5286
|
<script>
|
|
6620
5287
|
/*<!--*/
|
|
6621
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-core.module.js","children":[{"name":"src","children":[{"uid":"
|
|
5288
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-core.module.js","children":[{"name":"src","children":[{"uid":"ec9b-1","name":"config.ts"},{"uid":"ec9b-3","name":"isEmpty.ts"},{"uid":"ec9b-5","name":"context.tsx"},{"uid":"ec9b-7","name":"compose.ts"},{"uid":"ec9b-9","name":"render.ts"},{"name":"html/htmlTags.ts","uid":"ec9b-11"},{"uid":"ec9b-13","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"ec9b-1":{"renderedLength":649,"gzipLength":229,"brotliLength":0,"metaUid":"ec9b-0"},"ec9b-3":{"renderedLength":336,"gzipLength":175,"brotliLength":0,"metaUid":"ec9b-2"},"ec9b-5":{"renderedLength":647,"gzipLength":284,"brotliLength":0,"metaUid":"ec9b-4"},"ec9b-7":{"renderedLength":178,"gzipLength":142,"brotliLength":0,"metaUid":"ec9b-6"},"ec9b-9":{"renderedLength":773,"gzipLength":281,"brotliLength":0,"metaUid":"ec9b-8"},"ec9b-11":{"renderedLength":2052,"gzipLength":567,"brotliLength":0,"metaUid":"ec9b-10"},"ec9b-13":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"ec9b-12"}},"nodeMetas":{"ec9b-0":{"id":"/src/config.ts","moduleParts":{"vitus-labs-core.module.js":"ec9b-1"},"imported":[{"uid":"ec9b-17"}],"importedBy":[{"uid":"ec9b-12"},{"uid":"ec9b-4"}]},"ec9b-2":{"id":"/src/isEmpty.ts","moduleParts":{"vitus-labs-core.module.js":"ec9b-3"},"imported":[],"importedBy":[{"uid":"ec9b-12"},{"uid":"ec9b-4"},{"uid":"ec9b-8"}]},"ec9b-4":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-core.module.js":"ec9b-5"},"imported":[{"uid":"ec9b-18"},{"uid":"ec9b-0"},{"uid":"ec9b-2"}],"importedBy":[{"uid":"ec9b-12"}]},"ec9b-6":{"id":"/src/compose.ts","moduleParts":{"vitus-labs-core.module.js":"ec9b-7"},"imported":[],"importedBy":[{"uid":"ec9b-12"}]},"ec9b-8":{"id":"/src/render.ts","moduleParts":{"vitus-labs-core.module.js":"ec9b-9"},"imported":[{"uid":"ec9b-19"},{"uid":"ec9b-18"},{"uid":"ec9b-2"}],"importedBy":[{"uid":"ec9b-12"}]},"ec9b-10":{"id":"/src/html/htmlTags.ts","moduleParts":{"vitus-labs-core.module.js":"ec9b-11"},"imported":[],"importedBy":[{"uid":"ec9b-16"}]},"ec9b-12":{"id":"/src/index.ts","moduleParts":{"vitus-labs-core.module.js":"ec9b-13"},"imported":[{"uid":"ec9b-14"},{"uid":"ec9b-15"},{"uid":"ec9b-0"},{"uid":"ec9b-4"},{"uid":"ec9b-6"},{"uid":"ec9b-2"},{"uid":"ec9b-8"},{"uid":"ec9b-16"}],"importedBy":[],"isEntry":true},"ec9b-14":{"id":"lodash-es","moduleParts":{},"imported":[],"importedBy":[{"uid":"ec9b-12"}],"isExternal":true},"ec9b-15":{"id":"moize","moduleParts":{},"imported":[],"importedBy":[{"uid":"ec9b-12"}],"isExternal":true},"ec9b-16":{"id":"/src/html/index.ts","moduleParts":{},"imported":[{"uid":"ec9b-10"}],"importedBy":[{"uid":"ec9b-12"}]},"ec9b-17":{"id":"styled-components","moduleParts":{},"imported":[],"importedBy":[{"uid":"ec9b-0"}],"isExternal":true},"ec9b-18":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"ec9b-4"},{"uid":"ec9b-8"}],"isExternal":true},"ec9b-19":{"id":"react-is","moduleParts":{},"imported":[],"importedBy":[{"uid":"ec9b-8"}],"isExternal":true}},"env":{"rollup":"3.26.3"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
6622
5289
|
|
|
6623
5290
|
const run = () => {
|
|
6624
5291
|
const width = window.innerWidth;
|