UNPKG

22 kBJavaScriptView Raw
1/*!
2 * Copyright (c) 2017 ~ present NAVER Corp.
3 * billboard.js project is licensed under the MIT license
4 *
5 * billboard.js, JavaScript chart library
6 * http://naver.github.io/billboard.js/
7 *
8 * @version 1.12.1
9 * @requires billboard.js
10 * @summary billboard.js plugin
11 */
12(function webpackUniversalModuleDefinition(root, factory) {
13 if(typeof exports === 'object' && typeof module === 'object')
14 module.exports = factory(require("d3-selection"), require("d3-voronoi"), require("d3-polygon"));
15 else if(typeof define === 'function' && define.amd)
16 define("textoverlap", ["d3-selection", "d3-voronoi", "d3-polygon"], factory);
17 else if(typeof exports === 'object')
18 exports["textoverlap"] = factory(require("d3-selection"), require("d3-voronoi"), require("d3-polygon"));
19 else
20 root["bb"] = root["bb"] || {}, root["bb"]["plugin"] = root["bb"]["plugin"] || {}, root["bb"]["plugin"]["textoverlap"] = factory(root["d3"], root["d3"], root["d3"]);
21})(this, function(__WEBPACK_EXTERNAL_MODULE__8__, __WEBPACK_EXTERNAL_MODULE__17__, __WEBPACK_EXTERNAL_MODULE__18__) {
22return /******/ (function(modules) { // webpackBootstrap
23/******/ // The module cache
24/******/ var installedModules = {};
25/******/
26/******/ // The require function
27/******/ function __webpack_require__(moduleId) {
28/******/
29/******/ // Check if module is in cache
30/******/ if(installedModules[moduleId]) {
31/******/ return installedModules[moduleId].exports;
32/******/ }
33/******/ // Create a new module (and put it into the cache)
34/******/ var module = installedModules[moduleId] = {
35/******/ i: moduleId,
36/******/ l: false,
37/******/ exports: {}
38/******/ };
39/******/
40/******/ // Execute the module function
41/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
42/******/
43/******/ // Flag the module as loaded
44/******/ module.l = true;
45/******/
46/******/ // Return the exports of the module
47/******/ return module.exports;
48/******/ }
49/******/
50/******/
51/******/ // expose the modules object (__webpack_modules__)
52/******/ __webpack_require__.m = modules;
53/******/
54/******/ // expose the module cache
55/******/ __webpack_require__.c = installedModules;
56/******/
57/******/ // define getter function for harmony exports
58/******/ __webpack_require__.d = function(exports, name, getter) {
59/******/ if(!__webpack_require__.o(exports, name)) {
60/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
61/******/ }
62/******/ };
63/******/
64/******/ // define __esModule on exports
65/******/ __webpack_require__.r = function(exports) {
66/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
67/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
68/******/ }
69/******/ Object.defineProperty(exports, '__esModule', { value: true });
70/******/ };
71/******/
72/******/ // create a fake namespace object
73/******/ // mode & 1: value is a module id, require it
74/******/ // mode & 2: merge all properties of value into the ns
75/******/ // mode & 4: return value when already ns object
76/******/ // mode & 8|1: behave like require
77/******/ __webpack_require__.t = function(value, mode) {
78/******/ if(mode & 1) value = __webpack_require__(value);
79/******/ if(mode & 8) return value;
80/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
81/******/ var ns = Object.create(null);
82/******/ __webpack_require__.r(ns);
83/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
84/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
85/******/ return ns;
86/******/ };
87/******/
88/******/ // getDefaultExport function for compatibility with non-harmony modules
89/******/ __webpack_require__.n = function(module) {
90/******/ var getter = module && module.__esModule ?
91/******/ function getDefault() { return module['default']; } :
92/******/ function getModuleExports() { return module; };
93/******/ __webpack_require__.d(getter, 'a', getter);
94/******/ return getter;
95/******/ };
96/******/
97/******/ // Object.prototype.hasOwnProperty.call
98/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
99/******/
100/******/ // __webpack_public_path__
101/******/ __webpack_require__.p = "";
102/******/
103/******/
104/******/ // Load entry module and return exports
105/******/ return __webpack_require__(__webpack_require__.s = 21);
106/******/ })
107/************************************************************************/
108/******/ ([
109/* 0 */,
110/* 1 */
111/***/ (function(module, __webpack_exports__, __webpack_require__) {
112
113"use strict";
114/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
115function _classCallCheck(instance, Constructor) {
116 if (!(instance instanceof Constructor)) {
117 throw new TypeError("Cannot call a class as a function");
118 }
119}
120
121/***/ }),
122/* 2 */
123/***/ (function(module, __webpack_exports__, __webpack_require__) {
124
125"use strict";
126/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
127function _defineProperties(target, props) {
128 for (var i = 0; i < props.length; i++) {
129 var descriptor = props[i];
130 descriptor.enumerable = descriptor.enumerable || false;
131 descriptor.configurable = true;
132 if ("value" in descriptor) descriptor.writable = true;
133 Object.defineProperty(target, descriptor.key, descriptor);
134 }
135}
136
137function _createClass(Constructor, protoProps, staticProps) {
138 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
139 if (staticProps) _defineProperties(Constructor, staticProps);
140 return Constructor;
141}
142
143/***/ }),
144/* 3 */
145/***/ (function(module, __webpack_exports__, __webpack_require__) {
146
147"use strict";
148/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
149/* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
150/* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
151
152
153function _possibleConstructorReturn(self, call) {
154 if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
155 return call;
156 }
157
158 return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
159}
160
161/***/ }),
162/* 4 */
163/***/ (function(module, __webpack_exports__, __webpack_require__) {
164
165"use strict";
166/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
167function _typeof(obj) {
168 "@babel/helpers - typeof";
169
170 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
171 _typeof = function _typeof(obj) {
172 return typeof obj;
173 };
174 } else {
175 _typeof = function _typeof(obj) {
176 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
177 };
178 }
179
180 return _typeof(obj);
181}
182
183/***/ }),
184/* 5 */
185/***/ (function(module, __webpack_exports__, __webpack_require__) {
186
187"use strict";
188/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
189function _assertThisInitialized(self) {
190 if (self === void 0) {
191 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
192 }
193
194 return self;
195}
196
197/***/ }),
198/* 6 */
199/***/ (function(module, __webpack_exports__, __webpack_require__) {
200
201"use strict";
202/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
203function _getPrototypeOf(o) {
204 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
205 return o.__proto__ || Object.getPrototypeOf(o);
206 };
207 return _getPrototypeOf(o);
208}
209
210/***/ }),
211/* 7 */
212/***/ (function(module, __webpack_exports__, __webpack_require__) {
213
214"use strict";
215/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
216function _defineProperty(obj, key, value) {
217 if (key in obj) {
218 Object.defineProperty(obj, key, {
219 value: value,
220 enumerable: true,
221 configurable: true,
222 writable: true
223 });
224 } else {
225 obj[key] = value;
226 }
227
228 return obj;
229}
230
231/***/ }),
232/* 8 */
233/***/ (function(module, exports) {
234
235module.exports = __WEBPACK_EXTERNAL_MODULE__8__;
236
237/***/ }),
238/* 9 */
239/***/ (function(module, __webpack_exports__, __webpack_require__) {
240
241"use strict";
242/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Plugin; });
243/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
244/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
245/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
246
247
248
249
250/**
251 * Copyright (c) 2017 ~ present NAVER Corp.
252 * billboard.js project is licensed under the MIT license
253 */
254
255/**
256 * Base class to generate billboard.js plugin
257 * @class Plugin
258 */
259var Plugin = /*#__PURE__*/function () {
260 /**
261 * Version info string for plugin
262 * @name version
263 * @static
264 * @memberof Plugin
265 * @type {String}
266 * @example
267 * bb.plugin.stanford.version; // ex) 1.9.0
268 */
269
270 /**
271 * Constructor
272 * @param {Any} config config option object
273 * @private
274 */
275 function Plugin() {
276 var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
277 Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, Plugin), this.options = options;
278 }
279 /**
280 * Lifecycle hook for 'beforeInit' phase.
281 * @private
282 */
283
284
285 return Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Plugin, [{
286 key: "$beforeInit",
287 value: function $beforeInit() {}
288 /**
289 * Lifecycle hook for 'init' phase.
290 * @private
291 */
292
293 }, {
294 key: "$init",
295 value: function $init() {}
296 /**
297 * Lifecycle hook for 'afterInit' phase.
298 * @private
299 */
300
301 }, {
302 key: "$afterInit",
303 value: function $afterInit() {}
304 /**
305 * Lifecycle hook for 'redraw' phase.
306 * @private
307 */
308
309 }, {
310 key: "$redraw",
311 value: function $redraw() {}
312 /**
313 * Lifecycle hook for 'willDestroy' phase.
314 * @private
315 */
316
317 }, {
318 key: "$willDestroy",
319 value: function $willDestroy() {
320 var _this = this;
321
322 Object.keys(this).forEach(function (key) {
323 _this[key] = null, delete _this[key];
324 });
325 }
326 }]), Plugin;
327}();
328
329Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Plugin, "version", "1.12.1");
330
331
332
333/***/ }),
334/* 10 */,
335/* 11 */,
336/* 12 */,
337/* 13 */,
338/* 14 */,
339/* 15 */,
340/* 16 */,
341/* 17 */
342/***/ (function(module, exports) {
343
344module.exports = __WEBPACK_EXTERNAL_MODULE__17__;
345
346/***/ }),
347/* 18 */
348/***/ (function(module, exports) {
349
350module.exports = __WEBPACK_EXTERNAL_MODULE__18__;
351
352/***/ }),
353/* 19 */,
354/* 20 */
355/***/ (function(module, __webpack_exports__, __webpack_require__) {
356
357"use strict";
358
359// EXPORTS
360__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
361
362// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
363function _arrayWithHoles(arr) {
364 if (Array.isArray(arr)) return arr;
365}
366// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
367function _iterableToArrayLimit(arr, i) {
368 if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
369 return;
370 }
371
372 var _arr = [];
373 var _n = true;
374 var _d = false;
375 var _e = undefined;
376
377 try {
378 for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
379 _arr.push(_s.value);
380
381 if (i && _arr.length === i) break;
382 }
383 } catch (err) {
384 _d = true;
385 _e = err;
386 } finally {
387 try {
388 if (!_n && _i["return"] != null) _i["return"]();
389 } finally {
390 if (_d) throw _e;
391 }
392 }
393
394 return _arr;
395}
396// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
397function _nonIterableRest() {
398 throw new TypeError("Invalid attempt to destructure non-iterable instance");
399}
400// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
401
402
403
404function _slicedToArray(arr, i) {
405 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
406}
407
408/***/ }),
409/* 21 */
410/***/ (function(module, __webpack_exports__, __webpack_require__) {
411
412"use strict";
413// ESM COMPAT FLAG
414__webpack_require__.r(__webpack_exports__);
415
416// EXPORTS
417__webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ textoverlap_TextOverlap; });
418
419// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules
420var slicedToArray = __webpack_require__(20);
421
422// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
423var classCallCheck = __webpack_require__(1);
424
425// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
426var createClass = __webpack_require__(2);
427
428// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
429var possibleConstructorReturn = __webpack_require__(3);
430
431// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
432var getPrototypeOf = __webpack_require__(6);
433
434// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
435var assertThisInitialized = __webpack_require__(5);
436
437// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
438var inherits = __webpack_require__(22);
439
440// EXTERNAL MODULE: external {"commonjs":"d3-voronoi","commonjs2":"d3-voronoi","amd":"d3-voronoi","root":"d3"}
441var external_commonjs_d3_voronoi_commonjs2_d3_voronoi_amd_d3_voronoi_root_d3_ = __webpack_require__(17);
442
443// EXTERNAL MODULE: external {"commonjs":"d3-polygon","commonjs2":"d3-polygon","amd":"d3-polygon","root":"d3"}
444var external_commonjs_d3_polygon_commonjs2_d3_polygon_amd_d3_polygon_root_d3_ = __webpack_require__(18);
445
446// EXTERNAL MODULE: external {"commonjs":"d3-selection","commonjs2":"d3-selection","amd":"d3-selection","root":"d3"}
447var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_ = __webpack_require__(8);
448
449// EXTERNAL MODULE: ./src/plugin/Plugin.js
450var Plugin = __webpack_require__(9);
451
452// CONCATENATED MODULE: ./src/plugin/textoverlap/Options.js
453
454
455/**
456 * Copyright (c) 2017 ~ present NAVER Corp.
457 * billboard.js project is licensed under the MIT license
458 */
459
460/**
461 * TextOverlap plugin option class
462 * @class TextOverlapOptions
463 * @param {Options} options TextOverlap plugin options
464 * @extends Plugin
465 * @return {TextOverlapOptions}
466 * @private
467 */
468var Options_Options = function Options() {
469 return Object(classCallCheck["a" /* default */])(this, Options), {
470 /**
471 * Set selector string for target text nodes
472 * @name selector
473 * @memberof plugin-textoverlap
474 * @type {String}
475 * @default ".bb-texts text"
476 * @example
477 * // selector for data label text nodes
478 * selector: ".bb-texts text"
479 */
480 selector: ".bb-texts text",
481
482 /**
483 * Set extent of label overlap prevention
484 * @name extent
485 * @memberof plugin-textoverlap
486 * @type {Number}
487 * @default 1
488 * @example
489 * extent: 1
490 */
491 extent: 1,
492
493 /**
494 * Set minimum area needed to show a data label
495 * @name area
496 * @memberof plugin-textoverlap
497 * @type {Number}
498 * @default 0
499 * @example
500 * area: 0
501 */
502 area: 0
503 };
504};
505
506
507// CONCATENATED MODULE: ./src/plugin/textoverlap/index.js
508
509
510
511
512
513
514
515
516/**
517 * Copyright (c) 2017 ~ present NAVER Corp.
518 * billboard.js project is licensed under the MIT license
519 */
520
521
522
523
524
525/**
526 * TextOverlap plugin<br>
527 * Prevents label overlap using [Voronoi layout](https://en.wikipedia.org/wiki/Voronoi_diagram).
528 * - **NOTE:**
529 * - Plugins aren't built-in. Need to be loaded or imported to be used.
530 * - Non required modules from billboard.js core, need to be installed separately.
531 * - **Required modules:**
532 * - [d3-selection](https://github.com/d3/d3-selection)
533 * - [d3-polygon](https://github.com/d3/d3-polygon)
534 * - [d3-voronoi](https://github.com/d3/d3-voronoi)
535 * @class plugin-textoverlap
536 * @requires d3-selection
537 * @requires d3-polygon
538 * @requires d3-voronoi
539 * @param {Object} options TextOverlap plugin options
540 * @extends Plugin
541 * @return {TextOverlap}
542 * @example
543 * var chart = bb.generate({
544 * data: {
545 * columns: [ ... ]
546 * }
547 * ...
548 * plugins: [
549 * new bb.plugin.textoverlap({
550 * selector: ".bb-texts text",
551 * extent: 8,
552 * area: 3
553 * ]
554 * });
555 * @example
556 * import {bb} from "billboard.js";
557 * import TextOverlap from "billboard.js/dist/billboardjs-plugin-textoverlap";
558 *
559 * bb.generate({
560 * plugins: [
561 * new TextOverlap({ ... })
562 * ]
563 * })
564 */
565
566var textoverlap_TextOverlap = /*#__PURE__*/function (_Plugin) {
567 function TextOverlap(options) {
568 var _this;
569
570 return Object(classCallCheck["a" /* default */])(this, TextOverlap), _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(TextOverlap).call(this, options)), _this.config = new Options_Options(), Object(possibleConstructorReturn["a" /* default */])(_this, Object(assertThisInitialized["a" /* default */])(_this));
571 }
572
573 return Object(inherits["a" /* default */])(TextOverlap, _Plugin), Object(createClass["a" /* default */])(TextOverlap, [{
574 key: "$init",
575 value: function $init() {
576 var $$ = this.$$;
577 $$.loadConfig.bind(this)(this.options);
578 }
579 }, {
580 key: "$redraw",
581 value: function $redraw() {
582 var text = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_["selectAll"])(this.config.selector);
583 text.empty() || this.preventLabelOverlap(text);
584 }
585 /**
586 * Generates the voronoi layout for data labels
587 * @param {Object} data Indices values
588 * @returns {Object} Voronoi layout points and corresponding Data points
589 * @private
590 */
591
592 }, {
593 key: "generateVoronoi",
594 value: function generateVoronoi(data) {
595 var $$ = this.$$,
596 _map = ["x", "y"].map(function (v) {
597 return $$[v].domain();
598 }),
599 _map2 = Object(slicedToArray["a" /* default */])(_map, 2),
600 min = _map2[0],
601 max = _map2[1],
602 _ref = [max[0], min[1]];
603
604 return min[1] = _ref[0], max[0] = _ref[1], Object(external_commonjs_d3_voronoi_commonjs2_d3_voronoi_amd_d3_voronoi_root_d3_["voronoi"])().extent([min, max]).polygons(data);
605 }
606 /**
607 * Set text label's position to preventg overlap.
608 * @param {d3Selection} text target text selection
609 * @private
610 */
611
612 }, {
613 key: "preventLabelOverlap",
614 value: function preventLabelOverlap(text) {
615 var _this$config = this.config,
616 extent = _this$config.extent,
617 area = _this$config.area,
618 cells = this.generateVoronoi(text.data().map(function (v) {
619 return [v.x, v.value];
620 })),
621 i = 0;
622 text.each(function () {
623 var cell = cells[i++];
624
625 if (cell && this) {
626 var _cell$data = Object(slicedToArray["a" /* default */])(cell.data, 2),
627 x = _cell$data[0],
628 y = _cell$data[1],
629 _d3PolygonCentroid = Object(external_commonjs_d3_polygon_commonjs2_d3_polygon_amd_d3_polygon_root_d3_["polygonCentroid"])(cell),
630 _d3PolygonCentroid2 = Object(slicedToArray["a" /* default */])(_d3PolygonCentroid, 2),
631 cx = _d3PolygonCentroid2[0],
632 cy = _d3PolygonCentroid2[1],
633 angle = Math.round(Math.atan2(cy - y, cx - x) / Math.PI * 2),
634 xTranslate = extent * (angle === 0 ? 1 : -1),
635 yTranslate = angle === -1 ? -extent : extent + 5,
636 txtAnchor = Math.abs(angle) === 1 ? "middle" : angle === 0 ? "start" : "end";
637
638 Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_["select"])(this).attr("display", Object(external_commonjs_d3_polygon_commonjs2_d3_polygon_amd_d3_polygon_root_d3_["polygonArea"])(cell) < area ? "none" : null).attr("text-anchor", txtAnchor).attr("dy", "0.".concat(angle === 1 ? 71 : 35, "em")).attr("transform", "translate(".concat(xTranslate, ", ").concat(yTranslate, ")"));
639 }
640 });
641 }
642 }]), TextOverlap;
643}(Plugin["a" /* default */]);
644
645
646
647/***/ }),
648/* 22 */
649/***/ (function(module, __webpack_exports__, __webpack_require__) {
650
651"use strict";
652
653// EXPORTS
654__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
655
656// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
657function _setPrototypeOf(o, p) {
658 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
659 o.__proto__ = p;
660 return o;
661 };
662
663 return _setPrototypeOf(o, p);
664}
665// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
666
667function _inherits(subClass, superClass) {
668 if (typeof superClass !== "function" && superClass !== null) {
669 throw new TypeError("Super expression must either be null or a function");
670 }
671
672 subClass.prototype = Object.create(superClass && superClass.prototype, {
673 constructor: {
674 value: subClass,
675 writable: true,
676 configurable: true
677 }
678 });
679 if (superClass) _setPrototypeOf(subClass, superClass);
680}
681
682/***/ })
683/******/ ])["default"];
684});
\No newline at end of file