From 3193fa872826b4c00aa1bb6d638ba71cc90b9223 Mon Sep 17 00:00:00 2001 From: Alexey Velikiy Date: Mon, 25 Oct 2021 22:15:18 +0300 Subject: [PATCH] license + dep to core --- LICENSE | 214 +++------------------------------------------- dist/index.js | 2 +- package-lock.json | 7 +- package.json | 4 +- 4 files changed, 20 insertions(+), 207 deletions(-) diff --git a/LICENSE b/LICENSE index 261eeb9..9e74c2b 100755 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,13 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Copyright 2020-2021 CorpGlory Inc. + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/dist/index.js b/dist/index.js index 69f0166..ce8b030 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e=n();for(var r in e)("object"==typeof exports?exports:t)[r]=e[r]}}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=4)}([function(t,n,e){window,t.exports=function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=214)}([function(t,n){var e=Array.isArray;t.exports=e},function(t,n,e){var r=e(94),i=e(55);t.exports=function(t,n){return null!=t&&i(t,n,r)}},function(t,n){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},function(t,n,e){var r=e(57),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,n,e){var r=e(29),i=e(86),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,n,e){var r=e(12),i=e(96),o=e(97),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?i(t):o(t)}},function(t,n,e){var r=e(104),i=e(107);t.exports=function(t,n){var e=i(t,n);return r(e)?e:void 0}},function(t,n,e){var r=e(34),i=e(38);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,n,e){var r=e(123);t.exports=function(t){return r(t,5)}},function(t,n,e){var r=e(29),i=e(81),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(3).Symbol;t.exports=r},function(t,n,e){var r=e(63),i=e(134),o=e(9);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,n){t.exports=function(t){return t}},function(t,n){t.exports=function(t,n){return t===n||t!=t&&n!=n}},function(t,n,e){var r=e(61),i=e(40);t.exports=function(t,n,e,o){var u=!e;e||(e={});for(var a=-1,c=n.length;++a-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}},function(t,n,e){var r=e(56),i=e(24);t.exports=function(t,n){for(var e=0,o=(n=r(n,t)).length;null!=t&&e1&&u(t,n[0],n[1])?n=[]:e>2&&u(n[0],n[1],n[2])&&(n=[n[0]]),i(t,r(n,1),[])}));t.exports=a},function(t,n,e){var r=e(56),i=e(23),o=e(0),u=e(37),a=e(38),c=e(24);t.exports=function(t,n,e){for(var f=-1,s=(n=r(n,t)).length,l=!1;++fs))return!1;var h=c.get(t),d=c.get(n);if(h&&d)return h==n&&d==t;var p=-1,v=!0,y=2&e?new r:void 0;for(c.set(t,n),c.set(n,t);++pn}},function(t,n,e){var r=e(157),i=e(158);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[t.i,i,""]]);var o,u=0,a={injectType:"lazyStyleTag",insert:"head",singleton:!1},c={};c.locals=i.locals||{},c.use=function(){return u++||(o=r(i,a)),c},c.unuse=function(){u>0&&!--u&&(o(),o=null)},t.exports=c},function(t,n,e){var r=e(172),i=e(9),o=e(176),u=e(177),a=e(179),c=Math.max;t.exports=function(t,n,e,f){t=i(t)?t:a(t),e=e&&!f?u(e):0;var s=t.length;return e<0&&(e=c(s+e,0)),o(t)?e<=s&&t.indexOf(n,e)>-1:!!s&&r(t,n,e)>-1}},function(t,n,e){t.exports=e(181)},function(t,n){t.exports=function(t){var n=null==t?0:t.length;return n?t[n-1]:void 0}},function(t,n,e){var r=e(201)((function(t,n){return t+n}),0);t.exports=r},function(t,n,e){var r=e(59);t.exports=function(){var t=arguments,n=r(t[0]);return t.length<3?n:n.replace(t[1],t[2])}},function(t,n,e){var r=e(2),i=e(213),o=e(80),u=Math.max,a=Math.min;t.exports=function(t,n,e){var c,f,s,l,h,d,p=0,v=!1,y=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function _(n){var e=c,r=f;return c=f=void 0,p=n,l=t.apply(r,e)}function b(t){return p=t,h=setTimeout(x,n),v?_(t):l}function m(t){var e=t-d;return void 0===d||e>=n||e<0||y&&t-p>=s}function x(){var t=i();if(m(t))return w(t);h=setTimeout(x,function(t){var e=n-(t-d);return y?a(e,s-(t-p)):e}(t))}function w(t){return h=void 0,g&&c?_(t):(c=f=void 0,l)}function M(){var t=i(),e=m(t);if(c=arguments,f=this,d=t,e){if(void 0===h)return b(d);if(y)return clearTimeout(h),h=setTimeout(x,n),_(d)}return void 0===h&&(h=setTimeout(x,n)),l}return n=o(n)||0,r(e)&&(v=!!e.leading,s=(y="maxWait"in e)?u(o(e.maxWait)||0,n):s,g="trailing"in e?!!e.trailing:g),M.cancel=function(){void 0!==h&&clearTimeout(h),p=0,c=d=f=h=void 0},M.flush=function(){return void 0===h?l:w(i())},M}},function(t,n){var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){var r=e(12),i=Object.prototype,o=i.hasOwnProperty,u=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var n=o.call(t,a),e=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=u.call(t);return r&&(n?t[a]=e:delete t[a]),i}},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},function(t,n,e){var r=e(99),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,u=r((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(i,(function(t,e,r,i){n.push(r?i.replace(o,"$1"):e||t)})),n}));t.exports=u},function(t,n,e){var r=e(100);t.exports=function(t){var n=r(t,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}},function(t,n,e){var r=e(33);function i(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new(i.Cache||r),e}i.Cache=r,t.exports=i},function(t,n,e){var r=e(102),i=e(20),o=e(35);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,n,e){var r=e(103),i=e(108),o=e(109),u=e(110),a=e(111);function c(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1}},function(t,n,e){var r=e(21);t.exports=function(t,n){var e=this.__data__,i=r(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this}},function(t,n,e){var r=e(22);t.exports=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}},function(t,n){t.exports=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).get(t)}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).has(t)}},function(t,n,e){var r=e(22);t.exports=function(t,n){var e=r(this,t),i=e.size;return e.set(t,n),this.size+=e.size==i?0:1,this}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,n,e){var r=e(25),i=e(129),o=e(61),u=e(130),a=e(136),c=e(65),f=e(66),s=e(139),l=e(141),h=e(69),d=e(142),p=e(28),v=e(147),y=e(148),g=e(73),_=e(0),b=e(26),m=e(153),x=e(2),w=e(155),M=e(13),A=e(17),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,t.exports=function t(n,e,C,k,E,T){var O,N=1&e,j=2&e,R=4&e;if(C&&(O=E?C(n,k,E,T):C(n)),void 0!==O)return O;if(!x(n))return n;var z=_(n);if(z){if(O=v(n),!N)return f(n,O)}else{var P=p(n),L="[object Function]"==P||"[object GeneratorFunction]"==P;if(b(n))return c(n,N);if("[object Object]"==P||"[object Arguments]"==P||L&&!E){if(O=j||L?{}:g(n),!N)return j?l(n,a(O,n)):s(n,u(O,n))}else{if(!S[P])return E?n:{};O=y(n,P,N)}}T||(T=new r);var I=T.get(n);if(I)return I;T.set(n,O),w(n)?n.forEach((function(r){O.add(t(r,e,C,r,n,T))})):m(n)&&n.forEach((function(r,i){O.set(i,t(r,e,C,i,n,T))}));var F=z?void 0:(R?j?d:h:j?A:M)(n);return i(F||n,(function(r,i){F&&(r=n[i=r]),o(O,i,t(r,e,C,i,n,T))})),O}},function(t,n,e){var r=e(20);t.exports=function(){this.__data__=new r,this.size=0}},function(t,n){t.exports=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e}},function(t,n){t.exports=function(t){return this.__data__.get(t)}},function(t,n){t.exports=function(t){return this.__data__.has(t)}},function(t,n,e){var r=e(20),i=e(35),o=e(33);t.exports=function(t,n){var e=this.__data__;if(e instanceof r){var u=e.__data__;if(!i||u.length<199)return u.push([t,n]),this.size=++e.size,this;e=this.__data__=new o(u)}return e.set(t,n),this.size=e.size,this}},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length;++e0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},function(t,n,e){var r=e(75),i=e(2);t.exports=function t(n,e,o,u,a,c){return i(n)&&i(e)&&(c.set(e,n),r(n,e,void 0,t,c),c.delete(e)),n}},function(t,n){t.exports=function(t){return function(n,e,r){for(var i=-1,o=Object(n),u=r(n),a=u.length;a--;){var c=u[t?a:++i];if(!1===e(o[c],c,o))break}return n}}},function(t,n,e){var r=e(76),i=e(65),o=e(72),u=e(66),a=e(73),c=e(23),f=e(0),s=e(168),l=e(26),h=e(34),d=e(2),p=e(169),v=e(42),y=e(78),g=e(170);t.exports=function(t,n,e,_,b,m,x){var w=y(t,e),M=y(n,e),A=x.get(M);if(A)r(t,e,A);else{var S=m?m(w,M,e+"",t,n,x):void 0,C=void 0===S;if(C){var k=f(M),E=!k&&l(M),T=!k&&!E&&v(M);S=M,k||E||T?f(w)?S=w:s(w)?S=u(w):E?(C=!1,S=i(M,!0)):T?(C=!1,S=o(M,!0)):S=[]:p(M)||c(M)?(S=w,c(w)?S=g(w):d(w)&&!h(w)||(S=a(M))):C=!1}C&&(x.set(M,S),b(S,M,_,m,x),x.delete(M)),r(t,e,S)}}},function(t,n,e){var r=e(9),i=e(4);t.exports=function(t){return i(t)&&r(t)}},function(t,n,e){var r=e(7),i=e(47),o=e(4),u=Function.prototype,a=Object.prototype,c=u.toString,f=a.hasOwnProperty,s=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var n=i(t);if(null===n)return!0;var e=f.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&c.call(e)==s}},function(t,n,e){var r=e(16),i=e(17);t.exports=function(t){return r(t,i(t))}},function(t,n,e){var r=e(49),i=e(79);t.exports=function(t){return r((function(n,e){var r=-1,o=e.length,u=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(u=t.length>3&&"function"==typeof u?(o--,u):void 0,a&&i(e[0],e[1],a)&&(u=o<3?void 0:u,o=1),n=Object(n);++r0&&o(s)?e>1?t(s,e-1,o,u,a):r(a,s):u||(a[a.length]=s)}return a}},function(t,n,e){var r=e(12),i=e(23),o=e(0),u=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(u&&t&&t[u])}},function(t,n,e){var r=e(36),i=e(39),o=e(50),u=e(206),a=e(210),c=e(27),f=e(211),s=e(14),l=e(0);t.exports=function(t,n,e){n=n.length?r(n,(function(t){return l(t)?function(n){return i(n,1===t.length?t[0]:t)}:t})):[s];var h=-1;n=r(n,c(o));var d=u(t,(function(t,e,i){return{criteria:r(n,(function(n){return n(t)})),index:++h,value:t}}));return a(d,(function(t,n){return f(t,n,e)}))}},function(t,n,e){var r=e(207),i=e(9);t.exports=function(t,n){var e=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++e]=n(t,r,i)})),o}},function(t,n,e){var r=e(208),i=e(209)(r);t.exports=i},function(t,n,e){var r=e(77),i=e(13);t.exports=function(t,n){return t&&r(t,n,i)}},function(t,n,e){var r=e(9);t.exports=function(t,n){return function(e,i){if(null==e)return e;if(!r(e))return t(e,i);for(var o=e.length,u=n?o:-1,a=Object(e);(n?u--:++u=c?f:f*("desc"==e[i]?-1:1)}return t.index-n.index}},function(t,n,e){var r=e(6);t.exports=function(t,n){if(t!==n){var e=void 0!==t,i=null===t,o=t==t,u=r(t),a=void 0!==n,c=null===n,f=n==n,s=r(n);if(!c&&!s&&!u&&t>n||u&&a&&f&&!c&&!s||i&&a&&f||!e&&f||!o)return 1;if(!i&&!u&&!s&&t0)for(var n=this.chartContainer.append("g").attr("class","legend-row"),e=function(e){if(E()(r.seriesTargetsWithBounds,r.series[e].target))return"continue";var i=0;null!==n.selectAll("text").node()&&(i=n.node().getBBox().width+25);var o=!1!==r.series[e].visible;n.append("foreignObject").attr("x",i).attr("y",r.legendRowPositionY-12).attr("width",13).attr("height",15).html("
").on("click",(function(){t.options.eventsCallbacks.onLegendClick(e)})),n.append("text").attr("x",i+20).attr("y",r.legendRowPositionY).attr("class","metric-legend-"+e).style("font-size","12px").style("fill",r.getSerieColor(e)).text(r.series[e].target).on("click",(function(){t.options.eventsCallbacks.onLegendLabelClick(e)}))},r=this,i=0;i.9*this.height)return;this.state.yValueRange=[l[0]-s*h,l[1]-s*h];var d=this.state.transform.y+s*f;this.state.transform={y:d};break;default:throw new Error("Unknown type of scroll pan orientation: "+r)}},t.prototype.onPanningEnd=function(){this.isPanning=!1,this.deltaYTransform=0,this.onMouseOut(),void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.panningEnd?this.options.eventsCallbacks.panningEnd([this.state.xValueRange,this.state.yValueRange,this.state.y1ValueRange]):console.log("on panning end, but there is no callback")},t.prototype.onBrush=function(){var t=this.d3.event.selection;if(this.options.zoomEvents.mouse.zoom.orientation===o.SQUARE&&null!==t){var n=this.getSelectionAttrs(t);void 0!==n&&this.chartContainer.select(".selection").attr("x",n.x).attr("y",n.y).attr("width",n.width).attr("height",n.height)}},t.prototype.getSelectionAttrs=function(t){if(null!==this.brushStartSelection&&null!=t){var n=this.brushStartSelection[0],e=this.brushStartSelection[1],r=t[0][0],i=t[1][0],o=t[0][1],u=i-r,a=t[1][1]-o,c=Math.min(u,a);return{x:r===n?n:n-c,y:o===e?e:e-c,width:c,height:c}}},t.prototype.onBrushStart=function(){this.isBrushing;var t=this.d3.event.selection;null!==t&&t.length>0&&(this.brushStartSelection=this.d3.event.selection[0]),this.onMouseOut()},t.prototype.onBrushEnd=function(){var t=this.d3.event.selection;if(this.isBrushing,!(null==t||t.length<2)){var n,e;switch(this.chartContainer.call(this.brush.move,null),this.options.zoomEvents.mouse.zoom.orientation){case o.HORIZONTAL:var r=this.xScale.invert(t[0]),i=this.xScale.invert(t[1]);if(Math.abs(i-r)0&&this.series[0].datapoints.length>1?this.series[0].datapoints[1][1]-this.series[0].datapoints[0][1]:void 0!==this.options.timeInterval&&void 0!==this.options.timeInterval.count?6e4*this.options.timeInterval.count:6e4},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xTickTransform",{get:function(){if(void 0===this.options.tickFormat||void 0===this.options.tickFormat.xTickOrientation)return"";switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:return"translate(-10px, 50px) rotate(-90deg)";case r.HORIZONTAL:return"";case r.DIAGONAL:return"translate(-30px, 30px) rotate(-45deg)";default:return""}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"extraMargin",{get:function(){var t={top:0,right:0,bottom:0,left:0};if(void 0!==this.options.tickFormat&&void 0!==this.options.tickFormat.xTickOrientation)switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:t.bottom+=80;break;case r.HORIZONTAL:break;case r.DIAGONAL:t.left+=15,t.bottom+=50,t.right+=10}return void 0!==this.options.labelFormat&&(void 0!==this.options.labelFormat.xAxis&&this.options.labelFormat.xAxis.length>0&&(t.bottom+=20),void 0!==this.options.labelFormat.yAxis&&this.options.labelFormat.yAxis.length>0&&(t.left+=20)),this.series.length>0&&(t.bottom+=25),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.d3Node.node().clientWidth-this.margin.left-this.margin.right},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.d3Node.node().clientHeight-this.margin.top-this.margin.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"legendRowPositionY",{get:function(){return this.height+this.margin.bottom-5},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margin",{get:function(){return void 0!==this.options.margin?this.options.margin:z()({},J,this.extraMargin,Y.a)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSeriesUnavailable",{get:function(){return void 0===this.series||0===this.series.length||0===B()(this.series.map((function(t){return t.datapoints.length})))},enumerable:!1,configurable:!0}),t.prototype.formatedBound=function(t,n){return $()(t,"$__metric_name",n)},t.prototype.clearScaleCache=function(t){void 0===t&&(t=!0),this._xScale=null,this._yScale=null,this._y1Scale=null,t&&(this.state.xValueRange=void 0,this.state.yValueRange=void 0,this.state.y1ValueRange=void 0,this.state.transform={x:0,y:0,k:1})},t.prototype.getSerieColor=function(t){if(void 0===this.series[t])throw new Error("Can't get color for unexisting serie: "+t+", there are only "+this.series.length+" series");var n=this.series[t].color;return void 0===n&&(n=A[t%A.length]),n},Object.defineProperty(t.prototype,"seriesTargetsWithBounds",{get:function(){var t=this;if(void 0===this.options.bounds||void 0===this.options.bounds.upper||void 0===this.options.bounds.lower)return[];var n=[];return this.series.forEach((function(e){n.push(t.formatedBound(t.options.bounds.upper,e.target)),n.push(t.formatedBound(t.options.bounds.lower,e.target))})),n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleSeries",{get:function(){return this.series.filter((function(t){return!1!==t.visible}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rectClipId",{get:function(){return 0===this._clipPathUID.length&&(this._clipPathUID=Math.random().toString(36).substr(2,12)),this._clipPathUID},enumerable:!1,configurable:!0}),t.prototype.isOutOfChart=function(){var t=this.d3.mouse(this.chartContainer.node()),n=t[0],e=t[1];return e>this.height+1||e<-1||n>this.width||n<0},t}()}])},function(t,n,e){(function(t,r){var i; +!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e=n();for(var r in e)("object"==typeof exports?exports:t)[r]=e[r]}}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=4)}([function(t,n,e){window,t.exports=function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=214)}([function(t,n){var e=Array.isArray;t.exports=e},function(t,n,e){var r=e(94),i=e(55);t.exports=function(t,n){return null!=t&&i(t,n,r)}},function(t,n){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},function(t,n,e){var r=e(57),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,n,e){var r=e(29),i=e(86),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,n,e){var r=e(12),i=e(96),o=e(97),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?i(t):o(t)}},function(t,n,e){var r=e(104),i=e(107);t.exports=function(t,n){var e=i(t,n);return r(e)?e:void 0}},function(t,n,e){var r=e(34),i=e(38);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,n,e){var r=e(123);t.exports=function(t){return r(t,5)}},function(t,n,e){var r=e(29),i=e(81),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(3).Symbol;t.exports=r},function(t,n,e){var r=e(63),i=e(134),o=e(9);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,n){t.exports=function(t){return t}},function(t,n){t.exports=function(t,n){return t===n||t!=t&&n!=n}},function(t,n,e){var r=e(61),i=e(40);t.exports=function(t,n,e,o){var u=!e;e||(e={});for(var a=-1,c=n.length;++a-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}},function(t,n,e){var r=e(56),i=e(24);t.exports=function(t,n){for(var e=0,o=(n=r(n,t)).length;null!=t&&e1&&u(t,n[0],n[1])?n=[]:e>2&&u(n[0],n[1],n[2])&&(n=[n[0]]),i(t,r(n,1),[])}));t.exports=a},function(t,n,e){var r=e(56),i=e(23),o=e(0),u=e(37),a=e(38),c=e(24);t.exports=function(t,n,e){for(var f=-1,s=(n=r(n,t)).length,l=!1;++fs))return!1;var h=c.get(t),d=c.get(n);if(h&&d)return h==n&&d==t;var p=-1,v=!0,y=2&e?new r:void 0;for(c.set(t,n),c.set(n,t);++pn}},function(t,n,e){var r=e(157),i=e(158);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[t.i,i,""]]);var o,u=0,a={injectType:"lazyStyleTag",insert:"head",singleton:!1},c={};c.locals=i.locals||{},c.use=function(){return u++||(o=r(i,a)),c},c.unuse=function(){u>0&&!--u&&(o(),o=null)},t.exports=c},function(t,n,e){var r=e(172),i=e(9),o=e(176),u=e(177),a=e(179),c=Math.max;t.exports=function(t,n,e,f){t=i(t)?t:a(t),e=e&&!f?u(e):0;var s=t.length;return e<0&&(e=c(s+e,0)),o(t)?e<=s&&t.indexOf(n,e)>-1:!!s&&r(t,n,e)>-1}},function(t,n,e){t.exports=e(181)},function(t,n){t.exports=function(t){var n=null==t?0:t.length;return n?t[n-1]:void 0}},function(t,n,e){var r=e(201)((function(t,n){return t+n}),0);t.exports=r},function(t,n,e){var r=e(59);t.exports=function(){var t=arguments,n=r(t[0]);return t.length<3?n:n.replace(t[1],t[2])}},function(t,n,e){var r=e(2),i=e(213),o=e(80),u=Math.max,a=Math.min;t.exports=function(t,n,e){var c,f,s,l,h,d,p=0,v=!1,y=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function _(n){var e=c,r=f;return c=f=void 0,p=n,l=t.apply(r,e)}function b(t){return p=t,h=setTimeout(x,n),v?_(t):l}function m(t){var e=t-d;return void 0===d||e>=n||e<0||y&&t-p>=s}function x(){var t=i();if(m(t))return w(t);h=setTimeout(x,function(t){var e=n-(t-d);return y?a(e,s-(t-p)):e}(t))}function w(t){return h=void 0,g&&c?_(t):(c=f=void 0,l)}function M(){var t=i(),e=m(t);if(c=arguments,f=this,d=t,e){if(void 0===h)return b(d);if(y)return clearTimeout(h),h=setTimeout(x,n),_(d)}return void 0===h&&(h=setTimeout(x,n)),l}return n=o(n)||0,r(e)&&(v=!!e.leading,s=(y="maxWait"in e)?u(o(e.maxWait)||0,n):s,g="trailing"in e?!!e.trailing:g),M.cancel=function(){void 0!==h&&clearTimeout(h),p=0,c=d=f=h=void 0},M.flush=function(){return void 0===h?l:w(i())},M}},function(t,n){var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){var r=e(12),i=Object.prototype,o=i.hasOwnProperty,u=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var n=o.call(t,a),e=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=u.call(t);return r&&(n?t[a]=e:delete t[a]),i}},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},function(t,n,e){var r=e(99),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,u=r((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(i,(function(t,e,r,i){n.push(r?i.replace(o,"$1"):e||t)})),n}));t.exports=u},function(t,n,e){var r=e(100);t.exports=function(t){var n=r(t,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}},function(t,n,e){var r=e(33);function i(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new(i.Cache||r),e}i.Cache=r,t.exports=i},function(t,n,e){var r=e(102),i=e(20),o=e(35);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,n,e){var r=e(103),i=e(108),o=e(109),u=e(110),a=e(111);function c(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1}},function(t,n,e){var r=e(21);t.exports=function(t,n){var e=this.__data__,i=r(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this}},function(t,n,e){var r=e(22);t.exports=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}},function(t,n){t.exports=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).get(t)}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).has(t)}},function(t,n,e){var r=e(22);t.exports=function(t,n){var e=r(this,t),i=e.size;return e.set(t,n),this.size+=e.size==i?0:1,this}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,n,e){var r=e(25),i=e(129),o=e(61),u=e(130),a=e(136),c=e(65),f=e(66),s=e(139),l=e(141),h=e(69),d=e(142),p=e(28),v=e(147),y=e(148),g=e(73),_=e(0),b=e(26),m=e(153),x=e(2),w=e(155),M=e(13),A=e(17),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,t.exports=function t(n,e,C,k,E,T){var O,N=1&e,j=2&e,R=4&e;if(C&&(O=E?C(n,k,E,T):C(n)),void 0!==O)return O;if(!x(n))return n;var z=_(n);if(z){if(O=v(n),!N)return f(n,O)}else{var P=p(n),L="[object Function]"==P||"[object GeneratorFunction]"==P;if(b(n))return c(n,N);if("[object Object]"==P||"[object Arguments]"==P||L&&!E){if(O=j||L?{}:g(n),!N)return j?l(n,a(O,n)):s(n,u(O,n))}else{if(!S[P])return E?n:{};O=y(n,P,N)}}T||(T=new r);var I=T.get(n);if(I)return I;T.set(n,O),w(n)?n.forEach((function(r){O.add(t(r,e,C,r,n,T))})):m(n)&&n.forEach((function(r,i){O.set(i,t(r,e,C,i,n,T))}));var F=z?void 0:(R?j?d:h:j?A:M)(n);return i(F||n,(function(r,i){F&&(r=n[i=r]),o(O,i,t(r,e,C,i,n,T))})),O}},function(t,n,e){var r=e(20);t.exports=function(){this.__data__=new r,this.size=0}},function(t,n){t.exports=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e}},function(t,n){t.exports=function(t){return this.__data__.get(t)}},function(t,n){t.exports=function(t){return this.__data__.has(t)}},function(t,n,e){var r=e(20),i=e(35),o=e(33);t.exports=function(t,n){var e=this.__data__;if(e instanceof r){var u=e.__data__;if(!i||u.length<199)return u.push([t,n]),this.size=++e.size,this;e=this.__data__=new o(u)}return e.set(t,n),this.size=e.size,this}},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length;++e0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},function(t,n,e){var r=e(75),i=e(2);t.exports=function t(n,e,o,u,a,c){return i(n)&&i(e)&&(c.set(e,n),r(n,e,void 0,t,c),c.delete(e)),n}},function(t,n){t.exports=function(t){return function(n,e,r){for(var i=-1,o=Object(n),u=r(n),a=u.length;a--;){var c=u[t?a:++i];if(!1===e(o[c],c,o))break}return n}}},function(t,n,e){var r=e(76),i=e(65),o=e(72),u=e(66),a=e(73),c=e(23),f=e(0),s=e(168),l=e(26),h=e(34),d=e(2),p=e(169),v=e(42),y=e(78),g=e(170);t.exports=function(t,n,e,_,b,m,x){var w=y(t,e),M=y(n,e),A=x.get(M);if(A)r(t,e,A);else{var S=m?m(w,M,e+"",t,n,x):void 0,C=void 0===S;if(C){var k=f(M),E=!k&&l(M),T=!k&&!E&&v(M);S=M,k||E||T?f(w)?S=w:s(w)?S=u(w):E?(C=!1,S=i(M,!0)):T?(C=!1,S=o(M,!0)):S=[]:p(M)||c(M)?(S=w,c(w)?S=g(w):d(w)&&!h(w)||(S=a(M))):C=!1}C&&(x.set(M,S),b(S,M,_,m,x),x.delete(M)),r(t,e,S)}}},function(t,n,e){var r=e(9),i=e(4);t.exports=function(t){return i(t)&&r(t)}},function(t,n,e){var r=e(7),i=e(47),o=e(4),u=Function.prototype,a=Object.prototype,c=u.toString,f=a.hasOwnProperty,s=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var n=i(t);if(null===n)return!0;var e=f.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&c.call(e)==s}},function(t,n,e){var r=e(16),i=e(17);t.exports=function(t){return r(t,i(t))}},function(t,n,e){var r=e(49),i=e(79);t.exports=function(t){return r((function(n,e){var r=-1,o=e.length,u=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(u=t.length>3&&"function"==typeof u?(o--,u):void 0,a&&i(e[0],e[1],a)&&(u=o<3?void 0:u,o=1),n=Object(n);++r0&&o(s)?e>1?t(s,e-1,o,u,a):r(a,s):u||(a[a.length]=s)}return a}},function(t,n,e){var r=e(12),i=e(23),o=e(0),u=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(u&&t&&t[u])}},function(t,n,e){var r=e(36),i=e(39),o=e(50),u=e(206),a=e(210),c=e(27),f=e(211),s=e(14),l=e(0);t.exports=function(t,n,e){n=n.length?r(n,(function(t){return l(t)?function(n){return i(n,1===t.length?t[0]:t)}:t})):[s];var h=-1;n=r(n,c(o));var d=u(t,(function(t,e,i){return{criteria:r(n,(function(n){return n(t)})),index:++h,value:t}}));return a(d,(function(t,n){return f(t,n,e)}))}},function(t,n,e){var r=e(207),i=e(9);t.exports=function(t,n){var e=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++e]=n(t,r,i)})),o}},function(t,n,e){var r=e(208),i=e(209)(r);t.exports=i},function(t,n,e){var r=e(77),i=e(13);t.exports=function(t,n){return t&&r(t,n,i)}},function(t,n,e){var r=e(9);t.exports=function(t,n){return function(e,i){if(null==e)return e;if(!r(e))return t(e,i);for(var o=e.length,u=n?o:-1,a=Object(e);(n?u--:++u=c?f:f*("desc"==e[i]?-1:1)}return t.index-n.index}},function(t,n,e){var r=e(6);t.exports=function(t,n){if(t!==n){var e=void 0!==t,i=null===t,o=t==t,u=r(t),a=void 0!==n,c=null===n,f=n==n,s=r(n);if(!c&&!s&&!u&&t>n||u&&a&&f&&!c&&!s||i&&a&&f||!e&&f||!o)return 1;if(!i&&!u&&!s&&t0)for(var n=this.chartContainer.append("g").attr("class","legend-row"),e=function(e){if(E()(r.seriesTargetsWithBounds,r.series[e].target))return"continue";var i=0;null!==n.selectAll("text").node()&&(i=n.node().getBBox().width+25);var o=!1!==r.series[e].visible;n.append("foreignObject").attr("x",i).attr("y",r.legendRowPositionY-12).attr("width",13).attr("height",15).html("
").on("click",(function(){t.options.eventsCallbacks.onLegendClick(e)})),n.append("text").attr("x",i+20).attr("y",r.legendRowPositionY).attr("class","metric-legend-"+e).style("font-size","12px").style("fill",r.getSerieColor(e)).text(r.series[e].target).on("click",(function(){t.options.eventsCallbacks.onLegendLabelClick(e)}))},r=this,i=0;i.9*this.height)return;this.state.yValueRange=[l[0]-s*h,l[1]-s*h];var d=this.state.transform.y+s*f;this.state.transform={y:d};break;default:throw new Error("Unknown type of scroll pan orientation: "+r)}},t.prototype.onPanningEnd=function(){this.isPanning=!1,this.deltaYTransform=0,this.onMouseOut(),void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.panningEnd?this.options.eventsCallbacks.panningEnd([this.state.xValueRange,this.state.yValueRange,this.state.y1ValueRange]):console.log("on panning end, but there is no callback")},t.prototype.onBrush=function(){var t=this.d3.event.selection;if(this.options.zoomEvents.mouse.zoom.orientation===o.SQUARE&&null!==t){var n=this.getSelectionAttrs(t);void 0!==n&&this.chartContainer.select(".selection").attr("x",n.x).attr("y",n.y).attr("width",n.width).attr("height",n.height)}},t.prototype.getSelectionAttrs=function(t){if(null!==this.brushStartSelection&&null!=t){var n=this.brushStartSelection[0],e=this.brushStartSelection[1],r=t[0][0],i=t[1][0],o=t[0][1],u=i-r,a=t[1][1]-o,c=Math.min(u,a);return{x:r===n?n:n-c,y:o===e?e:e-c,width:c,height:c}}},t.prototype.onBrushStart=function(){this.isBrushing;var t=this.d3.event.selection;null!==t&&t.length>0&&(this.brushStartSelection=this.d3.event.selection[0]),this.onMouseOut()},t.prototype.onBrushEnd=function(){var t=this.d3.event.selection;if(this.isBrushing,!(null==t||t.length<2)){var n,e;switch(this.chartContainer.call(this.brush.move,null),this.options.zoomEvents.mouse.zoom.orientation){case o.HORIZONTAL:var r=this.xScale.invert(t[0]),i=this.xScale.invert(t[1]);if(Math.abs(i-r)0&&this.series[0].datapoints.length>1?this.series[0].datapoints[1][1]-this.series[0].datapoints[0][1]:void 0!==this.options.timeInterval&&void 0!==this.options.timeInterval.count?6e4*this.options.timeInterval.count:6e4},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xTickTransform",{get:function(){if(void 0===this.options.tickFormat||void 0===this.options.tickFormat.xTickOrientation)return"";switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:return"translate(-10px, 50px) rotate(-90deg)";case r.HORIZONTAL:return"";case r.DIAGONAL:return"translate(-30px, 30px) rotate(-45deg)";default:return""}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"extraMargin",{get:function(){var t={top:0,right:0,bottom:0,left:0};if(void 0!==this.options.tickFormat&&void 0!==this.options.tickFormat.xTickOrientation)switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:t.bottom+=80;break;case r.HORIZONTAL:break;case r.DIAGONAL:t.left+=15,t.bottom+=50,t.right+=10}return void 0!==this.options.labelFormat&&(void 0!==this.options.labelFormat.xAxis&&this.options.labelFormat.xAxis.length>0&&(t.bottom+=20),void 0!==this.options.labelFormat.yAxis&&this.options.labelFormat.yAxis.length>0&&(t.left+=20)),this.series.length>0&&(t.bottom+=25),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.d3Node.node().clientWidth-this.margin.left-this.margin.right},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.d3Node.node().clientHeight-this.margin.top-this.margin.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"legendRowPositionY",{get:function(){return this.height+this.margin.bottom-5},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margin",{get:function(){return void 0!==this.options.margin?this.options.margin:z()({},J,this.extraMargin,Y.a)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSeriesUnavailable",{get:function(){return void 0===this.series||0===this.series.length||0===B()(this.series.map((function(t){return t.datapoints.length})))},enumerable:!1,configurable:!0}),t.prototype.formatedBound=function(t,n){return $()(t,"$__metric_name",n)},t.prototype.clearScaleCache=function(t){void 0===t&&(t=!0),this._xScale=null,this._yScale=null,this._y1Scale=null,t&&(this.state.xValueRange=void 0,this.state.yValueRange=void 0,this.state.y1ValueRange=void 0,this.state.transform={x:0,y:0,k:1})},t.prototype.getSerieColor=function(t){if(void 0===this.series[t])throw new Error("Can't get color for unexisting serie: "+t+", there are only "+this.series.length+" series");var n=this.series[t].color;return void 0===n&&(n=A[t%A.length]),n},Object.defineProperty(t.prototype,"seriesTargetsWithBounds",{get:function(){var t=this;if(void 0===this.options.bounds||void 0===this.options.bounds.upper||void 0===this.options.bounds.lower)return[];var n=[];return this.series.forEach((function(e){n.push(t.formatedBound(t.options.bounds.upper,e.target)),n.push(t.formatedBound(t.options.bounds.lower,e.target))})),n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleSeries",{get:function(){return this.series.filter((function(t){return!1!==t.visible}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rectClipId",{get:function(){return 0===this._clipPathUID.length&&(this._clipPathUID=Math.random().toString(36).substr(2,12)),this._clipPathUID},enumerable:!1,configurable:!0}),t.prototype.isOutOfChart=function(){var t=this.d3.mouse(this.chartContainer.node()),n=t[0],e=t[1];return e>this.height+1||e<-1||n>this.width||n<0},t}()}])},function(t,n,e){(function(t,r){var i; /** * @license * Lodash diff --git a/package-lock.json b/package-lock.json index 7ab7f66..6ff0bf0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,13 @@ { - "name": "@chartwerk/line-chart", + "name": "@chartwerk/line-pod", "version": "0.2.4", "lockfileVersion": 1, "requires": true, "dependencies": { "@chartwerk/core": { - "version": "github:chartwerk/core#6e41013932bf16b05da2bc2757bcfaacba3cdb21", - "from": "github:chartwerk/core#6e41013932bf16b05da2bc2757bcfaacba3cdb21" + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@chartwerk/core/-/core-0.1.1.tgz", + "integrity": "sha512-AgERJVR6agOXULOQsc7sQHM7INP8iaF+kGj2c08DYTZ6SmIUGJFWpcSVTTccZZ3Szf/ypiI60tC1bgTKaIchTg==" }, "@types/d3": { "version": "5.16.4", diff --git a/package.json b/package.json index 2803035..3d8fe9b 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,9 @@ "url": "https://gitlab.com/chartwerk/line-pod.git" }, "author": "CorpGlory", - "license": "Apache-2.0", + "license": "ISC", "dependencies": { - "@chartwerk/core": "github:chartwerk/core#6e41013932bf16b05da2bc2757bcfaacba3cdb21" + "@chartwerk/core": "^0.1.1" }, "devDependencies": { "@types/d3": "5.16.4",