UNPKG

1.64 MBJavaScriptView 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 * https://naver.github.io/billboard.js/
7 *
8 * @version 3.6.3
9 *
10 * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
11 * - d3-axis ^3.0.0
12 * - d3-brush ^3.0.0
13 * - d3-drag ^3.0.0
14 * - d3-dsv ^3.0.1
15 * - d3-ease ^3.0.1
16 * - d3-interpolate ^3.0.1
17 * - d3-scale ^4.0.2
18 * - d3-selection ^3.0.0
19 * - d3-shape ^3.1.0
20 * - d3-time-format ^4.1.0
21 * - d3-transition ^3.0.1
22 * - d3-zoom ^3.0.0
23 */
24(function webpackUniversalModuleDefinition(root, factory) {
25 if(typeof exports === 'object' && typeof module === 'object')
26 module.exports = factory();
27 else if(typeof define === 'function' && define.amd)
28 define([], factory);
29 else {
30 var a = factory();
31 for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
32 }
33})(this, function() {
34return /******/ (function() { // webpackBootstrap
35/******/ var __webpack_modules__ = ([
36/* 0 */
37/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
38
39__webpack_require__(1);
40__webpack_require__(98);
41__webpack_require__(99);
42__webpack_require__(100);
43__webpack_require__(101);
44__webpack_require__(102);
45__webpack_require__(103);
46__webpack_require__(104);
47__webpack_require__(105);
48__webpack_require__(106);
49__webpack_require__(107);
50__webpack_require__(108);
51__webpack_require__(109);
52__webpack_require__(110);
53__webpack_require__(111);
54__webpack_require__(112);
55__webpack_require__(122);
56__webpack_require__(124);
57__webpack_require__(134);
58__webpack_require__(135);
59__webpack_require__(137);
60__webpack_require__(140);
61__webpack_require__(143);
62__webpack_require__(145);
63__webpack_require__(147);
64__webpack_require__(148);
65__webpack_require__(149);
66__webpack_require__(150);
67__webpack_require__(152);
68__webpack_require__(153);
69__webpack_require__(155);
70__webpack_require__(156);
71__webpack_require__(158);
72__webpack_require__(162);
73__webpack_require__(163);
74__webpack_require__(164);
75__webpack_require__(165);
76__webpack_require__(170);
77__webpack_require__(171);
78__webpack_require__(173);
79__webpack_require__(174);
80__webpack_require__(175);
81__webpack_require__(177);
82__webpack_require__(180);
83__webpack_require__(181);
84__webpack_require__(182);
85__webpack_require__(183);
86__webpack_require__(184);
87__webpack_require__(189);
88__webpack_require__(191);
89__webpack_require__(192);
90__webpack_require__(193);
91__webpack_require__(194);
92__webpack_require__(195);
93__webpack_require__(202);
94__webpack_require__(204);
95__webpack_require__(207);
96__webpack_require__(209);
97__webpack_require__(210);
98__webpack_require__(211);
99__webpack_require__(212);
100__webpack_require__(213);
101__webpack_require__(217);
102__webpack_require__(218);
103__webpack_require__(220);
104__webpack_require__(221);
105__webpack_require__(222);
106__webpack_require__(224);
107__webpack_require__(225);
108__webpack_require__(226);
109__webpack_require__(94);
110__webpack_require__(227);
111__webpack_require__(228);
112__webpack_require__(236);
113__webpack_require__(238);
114__webpack_require__(239);
115__webpack_require__(240);
116__webpack_require__(242);
117__webpack_require__(243);
118__webpack_require__(245);
119__webpack_require__(246);
120__webpack_require__(248);
121__webpack_require__(249);
122__webpack_require__(250);
123__webpack_require__(252);
124__webpack_require__(253);
125__webpack_require__(254);
126__webpack_require__(255);
127__webpack_require__(256);
128__webpack_require__(257);
129__webpack_require__(258);
130__webpack_require__(259);
131__webpack_require__(263);
132__webpack_require__(264);
133__webpack_require__(266);
134__webpack_require__(268);
135__webpack_require__(269);
136__webpack_require__(270);
137__webpack_require__(271);
138__webpack_require__(272);
139__webpack_require__(274);
140__webpack_require__(276);
141__webpack_require__(277);
142__webpack_require__(278);
143__webpack_require__(279);
144__webpack_require__(281);
145__webpack_require__(282);
146__webpack_require__(284);
147__webpack_require__(285);
148__webpack_require__(286);
149__webpack_require__(287);
150__webpack_require__(289);
151__webpack_require__(290);
152__webpack_require__(291);
153__webpack_require__(292);
154__webpack_require__(293);
155__webpack_require__(294);
156__webpack_require__(295);
157__webpack_require__(296);
158__webpack_require__(298);
159__webpack_require__(299);
160__webpack_require__(300);
161__webpack_require__(301);
162__webpack_require__(302);
163__webpack_require__(303);
164__webpack_require__(304);
165__webpack_require__(305);
166__webpack_require__(307);
167__webpack_require__(308);
168__webpack_require__(309);
169__webpack_require__(311);
170__webpack_require__(312);
171__webpack_require__(313);
172__webpack_require__(314);
173__webpack_require__(337);
174__webpack_require__(338);
175__webpack_require__(339);
176__webpack_require__(340);
177__webpack_require__(341);
178__webpack_require__(342);
179__webpack_require__(343);
180__webpack_require__(344);
181__webpack_require__(346);
182__webpack_require__(347);
183__webpack_require__(348);
184__webpack_require__(349);
185__webpack_require__(350);
186__webpack_require__(351);
187__webpack_require__(352);
188__webpack_require__(353);
189__webpack_require__(354);
190__webpack_require__(355);
191__webpack_require__(362);
192__webpack_require__(363);
193__webpack_require__(365);
194__webpack_require__(366);
195__webpack_require__(367);
196__webpack_require__(368);
197__webpack_require__(369);
198__webpack_require__(371);
199__webpack_require__(372);
200__webpack_require__(374);
201__webpack_require__(377);
202__webpack_require__(378);
203__webpack_require__(379);
204__webpack_require__(380);
205__webpack_require__(384);
206__webpack_require__(385);
207__webpack_require__(387);
208__webpack_require__(388);
209__webpack_require__(389);
210__webpack_require__(390);
211__webpack_require__(392);
212__webpack_require__(393);
213__webpack_require__(394);
214__webpack_require__(395);
215__webpack_require__(396);
216__webpack_require__(397);
217__webpack_require__(399);
218__webpack_require__(402);
219__webpack_require__(405);
220__webpack_require__(408);
221__webpack_require__(409);
222__webpack_require__(410);
223__webpack_require__(411);
224__webpack_require__(412);
225__webpack_require__(413);
226__webpack_require__(414);
227__webpack_require__(415);
228__webpack_require__(416);
229__webpack_require__(417);
230__webpack_require__(418);
231__webpack_require__(419);
232__webpack_require__(420);
233__webpack_require__(428);
234__webpack_require__(429);
235__webpack_require__(430);
236__webpack_require__(431);
237__webpack_require__(432);
238__webpack_require__(433);
239__webpack_require__(434);
240__webpack_require__(435);
241__webpack_require__(436);
242__webpack_require__(437);
243__webpack_require__(438);
244__webpack_require__(439);
245__webpack_require__(440);
246__webpack_require__(444);
247__webpack_require__(445);
248__webpack_require__(446);
249__webpack_require__(447);
250__webpack_require__(448);
251__webpack_require__(449);
252__webpack_require__(450);
253__webpack_require__(451);
254__webpack_require__(452);
255__webpack_require__(453);
256__webpack_require__(454);
257__webpack_require__(455);
258__webpack_require__(456);
259__webpack_require__(457);
260__webpack_require__(458);
261__webpack_require__(459);
262__webpack_require__(460);
263__webpack_require__(461);
264__webpack_require__(462);
265__webpack_require__(463);
266__webpack_require__(464);
267__webpack_require__(465);
268__webpack_require__(466);
269__webpack_require__(467);
270__webpack_require__(468);
271__webpack_require__(471);
272__webpack_require__(473);
273__webpack_require__(475);
274__webpack_require__(476);
275__webpack_require__(479);
276__webpack_require__(480);
277__webpack_require__(483);
278__webpack_require__(484);
279__webpack_require__(485);
280__webpack_require__(488);
281__webpack_require__(489);
282__webpack_require__(490);
283__webpack_require__(491);
284__webpack_require__(495);
285__webpack_require__(500);
286__webpack_require__(501);
287
288/* unused reexport */ __webpack_require__(82);
289
290
291/***/ }),
292/* 1 */
293/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
294
295// TODO: Remove this module from `core-js@4` since it's split to modules listed below
296__webpack_require__(2);
297__webpack_require__(91);
298__webpack_require__(93);
299__webpack_require__(94);
300__webpack_require__(97);
301
302
303/***/ }),
304/* 2 */
305/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
306
307"use strict";
308
309var $ = __webpack_require__(3);
310var global = __webpack_require__(4);
311var call = __webpack_require__(8);
312var uncurryThis = __webpack_require__(14);
313var IS_PURE = __webpack_require__(37);
314var DESCRIPTORS = __webpack_require__(6);
315var NATIVE_SYMBOL = __webpack_require__(28);
316var fails = __webpack_require__(7);
317var hasOwn = __webpack_require__(40);
318var isPrototypeOf = __webpack_require__(26);
319var anObject = __webpack_require__(48);
320var toIndexedObject = __webpack_require__(12);
321var toPropertyKey = __webpack_require__(19);
322var $toString = __webpack_require__(70);
323var createPropertyDescriptor = __webpack_require__(11);
324var nativeObjectCreate = __webpack_require__(73);
325var objectKeys = __webpack_require__(75);
326var getOwnPropertyNamesModule = __webpack_require__(59);
327var getOwnPropertyNamesExternal = __webpack_require__(77);
328var getOwnPropertySymbolsModule = __webpack_require__(68);
329var getOwnPropertyDescriptorModule = __webpack_require__(5);
330var definePropertyModule = __webpack_require__(46);
331var definePropertiesModule = __webpack_require__(74);
332var propertyIsEnumerableModule = __webpack_require__(10);
333var defineBuiltIn = __webpack_require__(49);
334var shared = __webpack_require__(36);
335var sharedKey = __webpack_require__(55);
336var hiddenKeys = __webpack_require__(56);
337var uid = __webpack_require__(42);
338var wellKnownSymbol = __webpack_require__(35);
339var wrappedWellKnownSymbolModule = __webpack_require__(80);
340var defineWellKnownSymbol = __webpack_require__(81);
341var defineSymbolToPrimitive = __webpack_require__(83);
342var setToStringTag = __webpack_require__(84);
343var InternalStateModule = __webpack_require__(53);
344var $forEach = (__webpack_require__(85).forEach);
345
346var HIDDEN = sharedKey('hidden');
347var SYMBOL = 'Symbol';
348var PROTOTYPE = 'prototype';
349
350var setInternalState = InternalStateModule.set;
351var getInternalState = InternalStateModule.getterFor(SYMBOL);
352
353var ObjectPrototype = Object[PROTOTYPE];
354var $Symbol = global.Symbol;
355var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];
356var TypeError = global.TypeError;
357var QObject = global.QObject;
358var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
359var nativeDefineProperty = definePropertyModule.f;
360var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
361var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
362var push = uncurryThis([].push);
363
364var AllSymbols = shared('symbols');
365var ObjectPrototypeSymbols = shared('op-symbols');
366var WellKnownSymbolsStore = shared('wks');
367
368// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
369var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
370
371// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
372var setSymbolDescriptor = DESCRIPTORS && fails(function () {
373 return nativeObjectCreate(nativeDefineProperty({}, 'a', {
374 get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
375 })).a != 7;
376}) ? function (O, P, Attributes) {
377 var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
378 if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
379 nativeDefineProperty(O, P, Attributes);
380 if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
381 nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
382 }
383} : nativeDefineProperty;
384
385var wrap = function (tag, description) {
386 var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);
387 setInternalState(symbol, {
388 type: SYMBOL,
389 tag: tag,
390 description: description
391 });
392 if (!DESCRIPTORS) symbol.description = description;
393 return symbol;
394};
395
396var $defineProperty = function defineProperty(O, P, Attributes) {
397 if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
398 anObject(O);
399 var key = toPropertyKey(P);
400 anObject(Attributes);
401 if (hasOwn(AllSymbols, key)) {
402 if (!Attributes.enumerable) {
403 if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
404 O[HIDDEN][key] = true;
405 } else {
406 if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
407 Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
408 } return setSymbolDescriptor(O, key, Attributes);
409 } return nativeDefineProperty(O, key, Attributes);
410};
411
412var $defineProperties = function defineProperties(O, Properties) {
413 anObject(O);
414 var properties = toIndexedObject(Properties);
415 var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
416 $forEach(keys, function (key) {
417 if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);
418 });
419 return O;
420};
421
422var $create = function create(O, Properties) {
423 return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
424};
425
426var $propertyIsEnumerable = function propertyIsEnumerable(V) {
427 var P = toPropertyKey(V);
428 var enumerable = call(nativePropertyIsEnumerable, this, P);
429 if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;
430 return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]
431 ? enumerable : true;
432};
433
434var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
435 var it = toIndexedObject(O);
436 var key = toPropertyKey(P);
437 if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;
438 var descriptor = nativeGetOwnPropertyDescriptor(it, key);
439 if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {
440 descriptor.enumerable = true;
441 }
442 return descriptor;
443};
444
445var $getOwnPropertyNames = function getOwnPropertyNames(O) {
446 var names = nativeGetOwnPropertyNames(toIndexedObject(O));
447 var result = [];
448 $forEach(names, function (key) {
449 if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key);
450 });
451 return result;
452};
453
454var $getOwnPropertySymbols = function (O) {
455 var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
456 var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
457 var result = [];
458 $forEach(names, function (key) {
459 if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {
460 push(result, AllSymbols[key]);
461 }
462 });
463 return result;
464};
465
466// `Symbol` constructor
467// https://tc39.es/ecma262/#sec-symbol-constructor
468if (!NATIVE_SYMBOL) {
469 $Symbol = function Symbol() {
470 if (isPrototypeOf(SymbolPrototype, this)) throw TypeError('Symbol is not a constructor');
471 var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);
472 var tag = uid(description);
473 var setter = function (value) {
474 if (this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);
475 if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
476 setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
477 };
478 if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
479 return wrap(tag, description);
480 };
481
482 SymbolPrototype = $Symbol[PROTOTYPE];
483
484 defineBuiltIn(SymbolPrototype, 'toString', function toString() {
485 return getInternalState(this).tag;
486 });
487
488 defineBuiltIn($Symbol, 'withoutSetter', function (description) {
489 return wrap(uid(description), description);
490 });
491
492 propertyIsEnumerableModule.f = $propertyIsEnumerable;
493 definePropertyModule.f = $defineProperty;
494 definePropertiesModule.f = $defineProperties;
495 getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
496 getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
497 getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
498
499 wrappedWellKnownSymbolModule.f = function (name) {
500 return wrap(wellKnownSymbol(name), name);
501 };
502
503 if (DESCRIPTORS) {
504 // https://github.com/tc39/proposal-Symbol-description
505 nativeDefineProperty(SymbolPrototype, 'description', {
506 configurable: true,
507 get: function description() {
508 return getInternalState(this).description;
509 }
510 });
511 if (!IS_PURE) {
512 defineBuiltIn(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
513 }
514 }
515}
516
517$({ global: true, constructor: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
518 Symbol: $Symbol
519});
520
521$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
522 defineWellKnownSymbol(name);
523});
524
525$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
526 useSetter: function () { USE_SETTER = true; },
527 useSimple: function () { USE_SETTER = false; }
528});
529
530$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
531 // `Object.create` method
532 // https://tc39.es/ecma262/#sec-object.create
533 create: $create,
534 // `Object.defineProperty` method
535 // https://tc39.es/ecma262/#sec-object.defineproperty
536 defineProperty: $defineProperty,
537 // `Object.defineProperties` method
538 // https://tc39.es/ecma262/#sec-object.defineproperties
539 defineProperties: $defineProperties,
540 // `Object.getOwnPropertyDescriptor` method
541 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
542 getOwnPropertyDescriptor: $getOwnPropertyDescriptor
543});
544
545$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
546 // `Object.getOwnPropertyNames` method
547 // https://tc39.es/ecma262/#sec-object.getownpropertynames
548 getOwnPropertyNames: $getOwnPropertyNames
549});
550
551// `Symbol.prototype[@@toPrimitive]` method
552// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
553defineSymbolToPrimitive();
554
555// `Symbol.prototype[@@toStringTag]` property
556// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
557setToStringTag($Symbol, SYMBOL);
558
559hiddenKeys[HIDDEN] = true;
560
561
562/***/ }),
563/* 3 */
564/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
565
566var global = __webpack_require__(4);
567var getOwnPropertyDescriptor = (__webpack_require__(5).f);
568var createNonEnumerableProperty = __webpack_require__(45);
569var defineBuiltIn = __webpack_require__(49);
570var defineGlobalProperty = __webpack_require__(39);
571var copyConstructorProperties = __webpack_require__(57);
572var isForced = __webpack_require__(69);
573
574/*
575 options.target - name of the target object
576 options.global - target is the global object
577 options.stat - export as static methods of target
578 options.proto - export as prototype methods of target
579 options.real - real prototype method for the `pure` version
580 options.forced - export even if the native feature is available
581 options.bind - bind methods to the target, required for the `pure` version
582 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
583 options.unsafe - use the simple assignment of property instead of delete + defineProperty
584 options.sham - add a flag to not completely full polyfills
585 options.enumerable - export as enumerable property
586 options.dontCallGetSet - prevent calling a getter on target
587 options.name - the .name of the function if it does not match the key
588*/
589module.exports = function (options, source) {
590 var TARGET = options.target;
591 var GLOBAL = options.global;
592 var STATIC = options.stat;
593 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
594 if (GLOBAL) {
595 target = global;
596 } else if (STATIC) {
597 target = global[TARGET] || defineGlobalProperty(TARGET, {});
598 } else {
599 target = (global[TARGET] || {}).prototype;
600 }
601 if (target) for (key in source) {
602 sourceProperty = source[key];
603 if (options.dontCallGetSet) {
604 descriptor = getOwnPropertyDescriptor(target, key);
605 targetProperty = descriptor && descriptor.value;
606 } else targetProperty = target[key];
607 FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
608 // contained in target
609 if (!FORCED && targetProperty !== undefined) {
610 if (typeof sourceProperty == typeof targetProperty) continue;
611 copyConstructorProperties(sourceProperty, targetProperty);
612 }
613 // add a flag to not completely full polyfills
614 if (options.sham || (targetProperty && targetProperty.sham)) {
615 createNonEnumerableProperty(sourceProperty, 'sham', true);
616 }
617 defineBuiltIn(target, key, sourceProperty, options);
618 }
619};
620
621
622/***/ }),
623/* 4 */
624/***/ (function(module) {
625
626var check = function (it) {
627 return it && it.Math == Math && it;
628};
629
630// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
631module.exports =
632 // eslint-disable-next-line es/no-global-this -- safe
633 check(typeof globalThis == 'object' && globalThis) ||
634 check(typeof window == 'object' && window) ||
635 // eslint-disable-next-line no-restricted-globals -- safe
636 check(typeof self == 'object' && self) ||
637 check(typeof global == 'object' && global) ||
638 // eslint-disable-next-line no-new-func -- fallback
639 (function () { return this; })() || Function('return this')();
640
641
642/***/ }),
643/* 5 */
644/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
645
646var DESCRIPTORS = __webpack_require__(6);
647var call = __webpack_require__(8);
648var propertyIsEnumerableModule = __webpack_require__(10);
649var createPropertyDescriptor = __webpack_require__(11);
650var toIndexedObject = __webpack_require__(12);
651var toPropertyKey = __webpack_require__(19);
652var hasOwn = __webpack_require__(40);
653var IE8_DOM_DEFINE = __webpack_require__(43);
654
655// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
656var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
657
658// `Object.getOwnPropertyDescriptor` method
659// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
660exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
661 O = toIndexedObject(O);
662 P = toPropertyKey(P);
663 if (IE8_DOM_DEFINE) try {
664 return $getOwnPropertyDescriptor(O, P);
665 } catch (error) { /* empty */ }
666 if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
667};
668
669
670/***/ }),
671/* 6 */
672/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
673
674var fails = __webpack_require__(7);
675
676// Detect IE8's incomplete defineProperty implementation
677module.exports = !fails(function () {
678 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
679 return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
680});
681
682
683/***/ }),
684/* 7 */
685/***/ (function(module) {
686
687module.exports = function (exec) {
688 try {
689 return !!exec();
690 } catch (error) {
691 return true;
692 }
693};
694
695
696/***/ }),
697/* 8 */
698/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
699
700var NATIVE_BIND = __webpack_require__(9);
701
702var call = Function.prototype.call;
703
704module.exports = NATIVE_BIND ? call.bind(call) : function () {
705 return call.apply(call, arguments);
706};
707
708
709/***/ }),
710/* 9 */
711/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
712
713var fails = __webpack_require__(7);
714
715module.exports = !fails(function () {
716 // eslint-disable-next-line es/no-function-prototype-bind -- safe
717 var test = (function () { /* empty */ }).bind();
718 // eslint-disable-next-line no-prototype-builtins -- safe
719 return typeof test != 'function' || test.hasOwnProperty('prototype');
720});
721
722
723/***/ }),
724/* 10 */
725/***/ (function(__unused_webpack_module, exports) {
726
727"use strict";
728
729var $propertyIsEnumerable = {}.propertyIsEnumerable;
730// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
731var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
732
733// Nashorn ~ JDK8 bug
734var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
735
736// `Object.prototype.propertyIsEnumerable` method implementation
737// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
738exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
739 var descriptor = getOwnPropertyDescriptor(this, V);
740 return !!descriptor && descriptor.enumerable;
741} : $propertyIsEnumerable;
742
743
744/***/ }),
745/* 11 */
746/***/ (function(module) {
747
748module.exports = function (bitmap, value) {
749 return {
750 enumerable: !(bitmap & 1),
751 configurable: !(bitmap & 2),
752 writable: !(bitmap & 4),
753 value: value
754 };
755};
756
757
758/***/ }),
759/* 12 */
760/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
761
762// toObject with fallback for non-array-like ES3 strings
763var IndexedObject = __webpack_require__(13);
764var requireObjectCoercible = __webpack_require__(17);
765
766module.exports = function (it) {
767 return IndexedObject(requireObjectCoercible(it));
768};
769
770
771/***/ }),
772/* 13 */
773/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
774
775var uncurryThis = __webpack_require__(14);
776var fails = __webpack_require__(7);
777var classof = __webpack_require__(15);
778
779var $Object = Object;
780var split = uncurryThis(''.split);
781
782// fallback for non-array-like ES3 and non-enumerable old V8 strings
783module.exports = fails(function () {
784 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
785 // eslint-disable-next-line no-prototype-builtins -- safe
786 return !$Object('z').propertyIsEnumerable(0);
787}) ? function (it) {
788 return classof(it) == 'String' ? split(it, '') : $Object(it);
789} : $Object;
790
791
792/***/ }),
793/* 14 */
794/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
795
796var classofRaw = __webpack_require__(15);
797var uncurryThisRaw = __webpack_require__(16);
798
799module.exports = function (fn) {
800 // Nashorn bug:
801 // https://github.com/zloirock/core-js/issues/1128
802 // https://github.com/zloirock/core-js/issues/1130
803 if (classofRaw(fn) === 'Function') return uncurryThisRaw(fn);
804};
805
806
807/***/ }),
808/* 15 */
809/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
810
811var uncurryThisRaw = __webpack_require__(16);
812
813var toString = uncurryThisRaw({}.toString);
814var stringSlice = uncurryThisRaw(''.slice);
815
816module.exports = function (it) {
817 return stringSlice(toString(it), 8, -1);
818};
819
820
821/***/ }),
822/* 16 */
823/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
824
825var NATIVE_BIND = __webpack_require__(9);
826
827var FunctionPrototype = Function.prototype;
828var call = FunctionPrototype.call;
829var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
830
831module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
832 return function () {
833 return call.apply(fn, arguments);
834 };
835};
836
837
838/***/ }),
839/* 17 */
840/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
841
842var isNullOrUndefined = __webpack_require__(18);
843
844var $TypeError = TypeError;
845
846// `RequireObjectCoercible` abstract operation
847// https://tc39.es/ecma262/#sec-requireobjectcoercible
848module.exports = function (it) {
849 if (isNullOrUndefined(it)) throw $TypeError("Can't call method on " + it);
850 return it;
851};
852
853
854/***/ }),
855/* 18 */
856/***/ (function(module) {
857
858// we can't use just `it == null` since of `document.all` special case
859// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
860module.exports = function (it) {
861 return it === null || it === undefined;
862};
863
864
865/***/ }),
866/* 19 */
867/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
868
869var toPrimitive = __webpack_require__(20);
870var isSymbol = __webpack_require__(24);
871
872// `ToPropertyKey` abstract operation
873// https://tc39.es/ecma262/#sec-topropertykey
874module.exports = function (argument) {
875 var key = toPrimitive(argument, 'string');
876 return isSymbol(key) ? key : key + '';
877};
878
879
880/***/ }),
881/* 20 */
882/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
883
884var call = __webpack_require__(8);
885var isObject = __webpack_require__(21);
886var isSymbol = __webpack_require__(24);
887var getMethod = __webpack_require__(31);
888var ordinaryToPrimitive = __webpack_require__(34);
889var wellKnownSymbol = __webpack_require__(35);
890
891var $TypeError = TypeError;
892var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
893
894// `ToPrimitive` abstract operation
895// https://tc39.es/ecma262/#sec-toprimitive
896module.exports = function (input, pref) {
897 if (!isObject(input) || isSymbol(input)) return input;
898 var exoticToPrim = getMethod(input, TO_PRIMITIVE);
899 var result;
900 if (exoticToPrim) {
901 if (pref === undefined) pref = 'default';
902 result = call(exoticToPrim, input, pref);
903 if (!isObject(result) || isSymbol(result)) return result;
904 throw $TypeError("Can't convert object to primitive value");
905 }
906 if (pref === undefined) pref = 'number';
907 return ordinaryToPrimitive(input, pref);
908};
909
910
911/***/ }),
912/* 21 */
913/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
914
915var isCallable = __webpack_require__(22);
916var $documentAll = __webpack_require__(23);
917
918var documentAll = $documentAll.all;
919
920module.exports = $documentAll.IS_HTMLDDA ? function (it) {
921 return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;
922} : function (it) {
923 return typeof it == 'object' ? it !== null : isCallable(it);
924};
925
926
927/***/ }),
928/* 22 */
929/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
930
931var $documentAll = __webpack_require__(23);
932
933var documentAll = $documentAll.all;
934
935// `IsCallable` abstract operation
936// https://tc39.es/ecma262/#sec-iscallable
937module.exports = $documentAll.IS_HTMLDDA ? function (argument) {
938 return typeof argument == 'function' || argument === documentAll;
939} : function (argument) {
940 return typeof argument == 'function';
941};
942
943
944/***/ }),
945/* 23 */
946/***/ (function(module) {
947
948var documentAll = typeof document == 'object' && document.all;
949
950// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
951var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
952
953module.exports = {
954 all: documentAll,
955 IS_HTMLDDA: IS_HTMLDDA
956};
957
958
959/***/ }),
960/* 24 */
961/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
962
963var getBuiltIn = __webpack_require__(25);
964var isCallable = __webpack_require__(22);
965var isPrototypeOf = __webpack_require__(26);
966var USE_SYMBOL_AS_UID = __webpack_require__(27);
967
968var $Object = Object;
969
970module.exports = USE_SYMBOL_AS_UID ? function (it) {
971 return typeof it == 'symbol';
972} : function (it) {
973 var $Symbol = getBuiltIn('Symbol');
974 return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
975};
976
977
978/***/ }),
979/* 25 */
980/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
981
982var global = __webpack_require__(4);
983var isCallable = __webpack_require__(22);
984
985var aFunction = function (argument) {
986 return isCallable(argument) ? argument : undefined;
987};
988
989module.exports = function (namespace, method) {
990 return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
991};
992
993
994/***/ }),
995/* 26 */
996/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
997
998var uncurryThis = __webpack_require__(14);
999
1000module.exports = uncurryThis({}.isPrototypeOf);
1001
1002
1003/***/ }),
1004/* 27 */
1005/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1006
1007/* eslint-disable es/no-symbol -- required for testing */
1008var NATIVE_SYMBOL = __webpack_require__(28);
1009
1010module.exports = NATIVE_SYMBOL
1011 && !Symbol.sham
1012 && typeof Symbol.iterator == 'symbol';
1013
1014
1015/***/ }),
1016/* 28 */
1017/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1018
1019/* eslint-disable es/no-symbol -- required for testing */
1020var V8_VERSION = __webpack_require__(29);
1021var fails = __webpack_require__(7);
1022
1023// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
1024module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
1025 var symbol = Symbol();
1026 // Chrome 38 Symbol has incorrect toString conversion
1027 // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
1028 return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
1029 // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
1030 !Symbol.sham && V8_VERSION && V8_VERSION < 41;
1031});
1032
1033
1034/***/ }),
1035/* 29 */
1036/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1037
1038var global = __webpack_require__(4);
1039var userAgent = __webpack_require__(30);
1040
1041var process = global.process;
1042var Deno = global.Deno;
1043var versions = process && process.versions || Deno && Deno.version;
1044var v8 = versions && versions.v8;
1045var match, version;
1046
1047if (v8) {
1048 match = v8.split('.');
1049 // in old Chrome, versions of V8 isn't V8 = Chrome / 10
1050 // but their correct versions are not interesting for us
1051 version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
1052}
1053
1054// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
1055// so check `userAgent` even if `.v8` exists, but 0
1056if (!version && userAgent) {
1057 match = userAgent.match(/Edge\/(\d+)/);
1058 if (!match || match[1] >= 74) {
1059 match = userAgent.match(/Chrome\/(\d+)/);
1060 if (match) version = +match[1];
1061 }
1062}
1063
1064module.exports = version;
1065
1066
1067/***/ }),
1068/* 30 */
1069/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1070
1071var getBuiltIn = __webpack_require__(25);
1072
1073module.exports = getBuiltIn('navigator', 'userAgent') || '';
1074
1075
1076/***/ }),
1077/* 31 */
1078/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1079
1080var aCallable = __webpack_require__(32);
1081var isNullOrUndefined = __webpack_require__(18);
1082
1083// `GetMethod` abstract operation
1084// https://tc39.es/ecma262/#sec-getmethod
1085module.exports = function (V, P) {
1086 var func = V[P];
1087 return isNullOrUndefined(func) ? undefined : aCallable(func);
1088};
1089
1090
1091/***/ }),
1092/* 32 */
1093/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1094
1095var isCallable = __webpack_require__(22);
1096var tryToString = __webpack_require__(33);
1097
1098var $TypeError = TypeError;
1099
1100// `Assert: IsCallable(argument) is true`
1101module.exports = function (argument) {
1102 if (isCallable(argument)) return argument;
1103 throw $TypeError(tryToString(argument) + ' is not a function');
1104};
1105
1106
1107/***/ }),
1108/* 33 */
1109/***/ (function(module) {
1110
1111var $String = String;
1112
1113module.exports = function (argument) {
1114 try {
1115 return $String(argument);
1116 } catch (error) {
1117 return 'Object';
1118 }
1119};
1120
1121
1122/***/ }),
1123/* 34 */
1124/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1125
1126var call = __webpack_require__(8);
1127var isCallable = __webpack_require__(22);
1128var isObject = __webpack_require__(21);
1129
1130var $TypeError = TypeError;
1131
1132// `OrdinaryToPrimitive` abstract operation
1133// https://tc39.es/ecma262/#sec-ordinarytoprimitive
1134module.exports = function (input, pref) {
1135 var fn, val;
1136 if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
1137 if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
1138 if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
1139 throw $TypeError("Can't convert object to primitive value");
1140};
1141
1142
1143/***/ }),
1144/* 35 */
1145/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1146
1147var global = __webpack_require__(4);
1148var shared = __webpack_require__(36);
1149var hasOwn = __webpack_require__(40);
1150var uid = __webpack_require__(42);
1151var NATIVE_SYMBOL = __webpack_require__(28);
1152var USE_SYMBOL_AS_UID = __webpack_require__(27);
1153
1154var WellKnownSymbolsStore = shared('wks');
1155var Symbol = global.Symbol;
1156var symbolFor = Symbol && Symbol['for'];
1157var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
1158
1159module.exports = function (name) {
1160 if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
1161 var description = 'Symbol.' + name;
1162 if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {
1163 WellKnownSymbolsStore[name] = Symbol[name];
1164 } else if (USE_SYMBOL_AS_UID && symbolFor) {
1165 WellKnownSymbolsStore[name] = symbolFor(description);
1166 } else {
1167 WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
1168 }
1169 } return WellKnownSymbolsStore[name];
1170};
1171
1172
1173/***/ }),
1174/* 36 */
1175/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1176
1177var IS_PURE = __webpack_require__(37);
1178var store = __webpack_require__(38);
1179
1180(module.exports = function (key, value) {
1181 return store[key] || (store[key] = value !== undefined ? value : {});
1182})('versions', []).push({
1183 version: '3.26.0',
1184 mode: IS_PURE ? 'pure' : 'global',
1185 copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
1186 license: 'https://github.com/zloirock/core-js/blob/v3.26.0/LICENSE',
1187 source: 'https://github.com/zloirock/core-js'
1188});
1189
1190
1191/***/ }),
1192/* 37 */
1193/***/ (function(module) {
1194
1195module.exports = false;
1196
1197
1198/***/ }),
1199/* 38 */
1200/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1201
1202var global = __webpack_require__(4);
1203var defineGlobalProperty = __webpack_require__(39);
1204
1205var SHARED = '__core-js_shared__';
1206var store = global[SHARED] || defineGlobalProperty(SHARED, {});
1207
1208module.exports = store;
1209
1210
1211/***/ }),
1212/* 39 */
1213/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1214
1215var global = __webpack_require__(4);
1216
1217// eslint-disable-next-line es/no-object-defineproperty -- safe
1218var defineProperty = Object.defineProperty;
1219
1220module.exports = function (key, value) {
1221 try {
1222 defineProperty(global, key, { value: value, configurable: true, writable: true });
1223 } catch (error) {
1224 global[key] = value;
1225 } return value;
1226};
1227
1228
1229/***/ }),
1230/* 40 */
1231/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1232
1233var uncurryThis = __webpack_require__(14);
1234var toObject = __webpack_require__(41);
1235
1236var hasOwnProperty = uncurryThis({}.hasOwnProperty);
1237
1238// `HasOwnProperty` abstract operation
1239// https://tc39.es/ecma262/#sec-hasownproperty
1240// eslint-disable-next-line es/no-object-hasown -- safe
1241module.exports = Object.hasOwn || function hasOwn(it, key) {
1242 return hasOwnProperty(toObject(it), key);
1243};
1244
1245
1246/***/ }),
1247/* 41 */
1248/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1249
1250var requireObjectCoercible = __webpack_require__(17);
1251
1252var $Object = Object;
1253
1254// `ToObject` abstract operation
1255// https://tc39.es/ecma262/#sec-toobject
1256module.exports = function (argument) {
1257 return $Object(requireObjectCoercible(argument));
1258};
1259
1260
1261/***/ }),
1262/* 42 */
1263/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1264
1265var uncurryThis = __webpack_require__(14);
1266
1267var id = 0;
1268var postfix = Math.random();
1269var toString = uncurryThis(1.0.toString);
1270
1271module.exports = function (key) {
1272 return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
1273};
1274
1275
1276/***/ }),
1277/* 43 */
1278/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1279
1280var DESCRIPTORS = __webpack_require__(6);
1281var fails = __webpack_require__(7);
1282var createElement = __webpack_require__(44);
1283
1284// Thanks to IE8 for its funny defineProperty
1285module.exports = !DESCRIPTORS && !fails(function () {
1286 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1287 return Object.defineProperty(createElement('div'), 'a', {
1288 get: function () { return 7; }
1289 }).a != 7;
1290});
1291
1292
1293/***/ }),
1294/* 44 */
1295/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1296
1297var global = __webpack_require__(4);
1298var isObject = __webpack_require__(21);
1299
1300var document = global.document;
1301// typeof document.createElement is 'object' in old IE
1302var EXISTS = isObject(document) && isObject(document.createElement);
1303
1304module.exports = function (it) {
1305 return EXISTS ? document.createElement(it) : {};
1306};
1307
1308
1309/***/ }),
1310/* 45 */
1311/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1312
1313var DESCRIPTORS = __webpack_require__(6);
1314var definePropertyModule = __webpack_require__(46);
1315var createPropertyDescriptor = __webpack_require__(11);
1316
1317module.exports = DESCRIPTORS ? function (object, key, value) {
1318 return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
1319} : function (object, key, value) {
1320 object[key] = value;
1321 return object;
1322};
1323
1324
1325/***/ }),
1326/* 46 */
1327/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1328
1329var DESCRIPTORS = __webpack_require__(6);
1330var IE8_DOM_DEFINE = __webpack_require__(43);
1331var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(47);
1332var anObject = __webpack_require__(48);
1333var toPropertyKey = __webpack_require__(19);
1334
1335var $TypeError = TypeError;
1336// eslint-disable-next-line es/no-object-defineproperty -- safe
1337var $defineProperty = Object.defineProperty;
1338// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1339var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1340var ENUMERABLE = 'enumerable';
1341var CONFIGURABLE = 'configurable';
1342var WRITABLE = 'writable';
1343
1344// `Object.defineProperty` method
1345// https://tc39.es/ecma262/#sec-object.defineproperty
1346exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
1347 anObject(O);
1348 P = toPropertyKey(P);
1349 anObject(Attributes);
1350 if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
1351 var current = $getOwnPropertyDescriptor(O, P);
1352 if (current && current[WRITABLE]) {
1353 O[P] = Attributes.value;
1354 Attributes = {
1355 configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
1356 enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
1357 writable: false
1358 };
1359 }
1360 } return $defineProperty(O, P, Attributes);
1361} : $defineProperty : function defineProperty(O, P, Attributes) {
1362 anObject(O);
1363 P = toPropertyKey(P);
1364 anObject(Attributes);
1365 if (IE8_DOM_DEFINE) try {
1366 return $defineProperty(O, P, Attributes);
1367 } catch (error) { /* empty */ }
1368 if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
1369 if ('value' in Attributes) O[P] = Attributes.value;
1370 return O;
1371};
1372
1373
1374/***/ }),
1375/* 47 */
1376/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1377
1378var DESCRIPTORS = __webpack_require__(6);
1379var fails = __webpack_require__(7);
1380
1381// V8 ~ Chrome 36-
1382// https://bugs.chromium.org/p/v8/issues/detail?id=3334
1383module.exports = DESCRIPTORS && fails(function () {
1384 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1385 return Object.defineProperty(function () { /* empty */ }, 'prototype', {
1386 value: 42,
1387 writable: false
1388 }).prototype != 42;
1389});
1390
1391
1392/***/ }),
1393/* 48 */
1394/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1395
1396var isObject = __webpack_require__(21);
1397
1398var $String = String;
1399var $TypeError = TypeError;
1400
1401// `Assert: Type(argument) is Object`
1402module.exports = function (argument) {
1403 if (isObject(argument)) return argument;
1404 throw $TypeError($String(argument) + ' is not an object');
1405};
1406
1407
1408/***/ }),
1409/* 49 */
1410/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1411
1412var isCallable = __webpack_require__(22);
1413var definePropertyModule = __webpack_require__(46);
1414var makeBuiltIn = __webpack_require__(50);
1415var defineGlobalProperty = __webpack_require__(39);
1416
1417module.exports = function (O, key, value, options) {
1418 if (!options) options = {};
1419 var simple = options.enumerable;
1420 var name = options.name !== undefined ? options.name : key;
1421 if (isCallable(value)) makeBuiltIn(value, name, options);
1422 if (options.global) {
1423 if (simple) O[key] = value;
1424 else defineGlobalProperty(key, value);
1425 } else {
1426 try {
1427 if (!options.unsafe) delete O[key];
1428 else if (O[key]) simple = true;
1429 } catch (error) { /* empty */ }
1430 if (simple) O[key] = value;
1431 else definePropertyModule.f(O, key, {
1432 value: value,
1433 enumerable: false,
1434 configurable: !options.nonConfigurable,
1435 writable: !options.nonWritable
1436 });
1437 } return O;
1438};
1439
1440
1441/***/ }),
1442/* 50 */
1443/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1444
1445var fails = __webpack_require__(7);
1446var isCallable = __webpack_require__(22);
1447var hasOwn = __webpack_require__(40);
1448var DESCRIPTORS = __webpack_require__(6);
1449var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(51).CONFIGURABLE);
1450var inspectSource = __webpack_require__(52);
1451var InternalStateModule = __webpack_require__(53);
1452
1453var enforceInternalState = InternalStateModule.enforce;
1454var getInternalState = InternalStateModule.get;
1455// eslint-disable-next-line es/no-object-defineproperty -- safe
1456var defineProperty = Object.defineProperty;
1457
1458var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
1459 return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
1460});
1461
1462var TEMPLATE = String(String).split('String');
1463
1464var makeBuiltIn = module.exports = function (value, name, options) {
1465 if (String(name).slice(0, 7) === 'Symbol(') {
1466 name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
1467 }
1468 if (options && options.getter) name = 'get ' + name;
1469 if (options && options.setter) name = 'set ' + name;
1470 if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
1471 if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
1472 else value.name = name;
1473 }
1474 if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
1475 defineProperty(value, 'length', { value: options.arity });
1476 }
1477 try {
1478 if (options && hasOwn(options, 'constructor') && options.constructor) {
1479 if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
1480 // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
1481 } else if (value.prototype) value.prototype = undefined;
1482 } catch (error) { /* empty */ }
1483 var state = enforceInternalState(value);
1484 if (!hasOwn(state, 'source')) {
1485 state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
1486 } return value;
1487};
1488
1489// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
1490// eslint-disable-next-line no-extend-native -- required
1491Function.prototype.toString = makeBuiltIn(function toString() {
1492 return isCallable(this) && getInternalState(this).source || inspectSource(this);
1493}, 'toString');
1494
1495
1496/***/ }),
1497/* 51 */
1498/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1499
1500var DESCRIPTORS = __webpack_require__(6);
1501var hasOwn = __webpack_require__(40);
1502
1503var FunctionPrototype = Function.prototype;
1504// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1505var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
1506
1507var EXISTS = hasOwn(FunctionPrototype, 'name');
1508// additional protection from minified / mangled / dropped function names
1509var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
1510var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
1511
1512module.exports = {
1513 EXISTS: EXISTS,
1514 PROPER: PROPER,
1515 CONFIGURABLE: CONFIGURABLE
1516};
1517
1518
1519/***/ }),
1520/* 52 */
1521/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1522
1523var uncurryThis = __webpack_require__(14);
1524var isCallable = __webpack_require__(22);
1525var store = __webpack_require__(38);
1526
1527var functionToString = uncurryThis(Function.toString);
1528
1529// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
1530if (!isCallable(store.inspectSource)) {
1531 store.inspectSource = function (it) {
1532 return functionToString(it);
1533 };
1534}
1535
1536module.exports = store.inspectSource;
1537
1538
1539/***/ }),
1540/* 53 */
1541/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1542
1543var NATIVE_WEAK_MAP = __webpack_require__(54);
1544var global = __webpack_require__(4);
1545var isObject = __webpack_require__(21);
1546var createNonEnumerableProperty = __webpack_require__(45);
1547var hasOwn = __webpack_require__(40);
1548var shared = __webpack_require__(38);
1549var sharedKey = __webpack_require__(55);
1550var hiddenKeys = __webpack_require__(56);
1551
1552var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
1553var TypeError = global.TypeError;
1554var WeakMap = global.WeakMap;
1555var set, get, has;
1556
1557var enforce = function (it) {
1558 return has(it) ? get(it) : set(it, {});
1559};
1560
1561var getterFor = function (TYPE) {
1562 return function (it) {
1563 var state;
1564 if (!isObject(it) || (state = get(it)).type !== TYPE) {
1565 throw TypeError('Incompatible receiver, ' + TYPE + ' required');
1566 } return state;
1567 };
1568};
1569
1570if (NATIVE_WEAK_MAP || shared.state) {
1571 var store = shared.state || (shared.state = new WeakMap());
1572 /* eslint-disable no-self-assign -- prototype methods protection */
1573 store.get = store.get;
1574 store.has = store.has;
1575 store.set = store.set;
1576 /* eslint-enable no-self-assign -- prototype methods protection */
1577 set = function (it, metadata) {
1578 if (store.has(it)) throw TypeError(OBJECT_ALREADY_INITIALIZED);
1579 metadata.facade = it;
1580 store.set(it, metadata);
1581 return metadata;
1582 };
1583 get = function (it) {
1584 return store.get(it) || {};
1585 };
1586 has = function (it) {
1587 return store.has(it);
1588 };
1589} else {
1590 var STATE = sharedKey('state');
1591 hiddenKeys[STATE] = true;
1592 set = function (it, metadata) {
1593 if (hasOwn(it, STATE)) throw TypeError(OBJECT_ALREADY_INITIALIZED);
1594 metadata.facade = it;
1595 createNonEnumerableProperty(it, STATE, metadata);
1596 return metadata;
1597 };
1598 get = function (it) {
1599 return hasOwn(it, STATE) ? it[STATE] : {};
1600 };
1601 has = function (it) {
1602 return hasOwn(it, STATE);
1603 };
1604}
1605
1606module.exports = {
1607 set: set,
1608 get: get,
1609 has: has,
1610 enforce: enforce,
1611 getterFor: getterFor
1612};
1613
1614
1615/***/ }),
1616/* 54 */
1617/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1618
1619var global = __webpack_require__(4);
1620var isCallable = __webpack_require__(22);
1621
1622var WeakMap = global.WeakMap;
1623
1624module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
1625
1626
1627/***/ }),
1628/* 55 */
1629/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1630
1631var shared = __webpack_require__(36);
1632var uid = __webpack_require__(42);
1633
1634var keys = shared('keys');
1635
1636module.exports = function (key) {
1637 return keys[key] || (keys[key] = uid(key));
1638};
1639
1640
1641/***/ }),
1642/* 56 */
1643/***/ (function(module) {
1644
1645module.exports = {};
1646
1647
1648/***/ }),
1649/* 57 */
1650/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1651
1652var hasOwn = __webpack_require__(40);
1653var ownKeys = __webpack_require__(58);
1654var getOwnPropertyDescriptorModule = __webpack_require__(5);
1655var definePropertyModule = __webpack_require__(46);
1656
1657module.exports = function (target, source, exceptions) {
1658 var keys = ownKeys(source);
1659 var defineProperty = definePropertyModule.f;
1660 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1661 for (var i = 0; i < keys.length; i++) {
1662 var key = keys[i];
1663 if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
1664 defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1665 }
1666 }
1667};
1668
1669
1670/***/ }),
1671/* 58 */
1672/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1673
1674var getBuiltIn = __webpack_require__(25);
1675var uncurryThis = __webpack_require__(14);
1676var getOwnPropertyNamesModule = __webpack_require__(59);
1677var getOwnPropertySymbolsModule = __webpack_require__(68);
1678var anObject = __webpack_require__(48);
1679
1680var concat = uncurryThis([].concat);
1681
1682// all object keys, includes non-enumerable and symbols
1683module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1684 var keys = getOwnPropertyNamesModule.f(anObject(it));
1685 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1686 return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
1687};
1688
1689
1690/***/ }),
1691/* 59 */
1692/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1693
1694var internalObjectKeys = __webpack_require__(60);
1695var enumBugKeys = __webpack_require__(67);
1696
1697var hiddenKeys = enumBugKeys.concat('length', 'prototype');
1698
1699// `Object.getOwnPropertyNames` method
1700// https://tc39.es/ecma262/#sec-object.getownpropertynames
1701// eslint-disable-next-line es/no-object-getownpropertynames -- safe
1702exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1703 return internalObjectKeys(O, hiddenKeys);
1704};
1705
1706
1707/***/ }),
1708/* 60 */
1709/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1710
1711var uncurryThis = __webpack_require__(14);
1712var hasOwn = __webpack_require__(40);
1713var toIndexedObject = __webpack_require__(12);
1714var indexOf = (__webpack_require__(61).indexOf);
1715var hiddenKeys = __webpack_require__(56);
1716
1717var push = uncurryThis([].push);
1718
1719module.exports = function (object, names) {
1720 var O = toIndexedObject(object);
1721 var i = 0;
1722 var result = [];
1723 var key;
1724 for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
1725 // Don't enum bug & hidden keys
1726 while (names.length > i) if (hasOwn(O, key = names[i++])) {
1727 ~indexOf(result, key) || push(result, key);
1728 }
1729 return result;
1730};
1731
1732
1733/***/ }),
1734/* 61 */
1735/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1736
1737var toIndexedObject = __webpack_require__(12);
1738var toAbsoluteIndex = __webpack_require__(62);
1739var lengthOfArrayLike = __webpack_require__(65);
1740
1741// `Array.prototype.{ indexOf, includes }` methods implementation
1742var createMethod = function (IS_INCLUDES) {
1743 return function ($this, el, fromIndex) {
1744 var O = toIndexedObject($this);
1745 var length = lengthOfArrayLike(O);
1746 var index = toAbsoluteIndex(fromIndex, length);
1747 var value;
1748 // Array#includes uses SameValueZero equality algorithm
1749 // eslint-disable-next-line no-self-compare -- NaN check
1750 if (IS_INCLUDES && el != el) while (length > index) {
1751 value = O[index++];
1752 // eslint-disable-next-line no-self-compare -- NaN check
1753 if (value != value) return true;
1754 // Array#indexOf ignores holes, Array#includes - not
1755 } else for (;length > index; index++) {
1756 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
1757 } return !IS_INCLUDES && -1;
1758 };
1759};
1760
1761module.exports = {
1762 // `Array.prototype.includes` method
1763 // https://tc39.es/ecma262/#sec-array.prototype.includes
1764 includes: createMethod(true),
1765 // `Array.prototype.indexOf` method
1766 // https://tc39.es/ecma262/#sec-array.prototype.indexof
1767 indexOf: createMethod(false)
1768};
1769
1770
1771/***/ }),
1772/* 62 */
1773/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1774
1775var toIntegerOrInfinity = __webpack_require__(63);
1776
1777var max = Math.max;
1778var min = Math.min;
1779
1780// Helper for a popular repeating case of the spec:
1781// Let integer be ? ToInteger(index).
1782// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
1783module.exports = function (index, length) {
1784 var integer = toIntegerOrInfinity(index);
1785 return integer < 0 ? max(integer + length, 0) : min(integer, length);
1786};
1787
1788
1789/***/ }),
1790/* 63 */
1791/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1792
1793var trunc = __webpack_require__(64);
1794
1795// `ToIntegerOrInfinity` abstract operation
1796// https://tc39.es/ecma262/#sec-tointegerorinfinity
1797module.exports = function (argument) {
1798 var number = +argument;
1799 // eslint-disable-next-line no-self-compare -- NaN check
1800 return number !== number || number === 0 ? 0 : trunc(number);
1801};
1802
1803
1804/***/ }),
1805/* 64 */
1806/***/ (function(module) {
1807
1808var ceil = Math.ceil;
1809var floor = Math.floor;
1810
1811// `Math.trunc` method
1812// https://tc39.es/ecma262/#sec-math.trunc
1813// eslint-disable-next-line es/no-math-trunc -- safe
1814module.exports = Math.trunc || function trunc(x) {
1815 var n = +x;
1816 return (n > 0 ? floor : ceil)(n);
1817};
1818
1819
1820/***/ }),
1821/* 65 */
1822/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1823
1824var toLength = __webpack_require__(66);
1825
1826// `LengthOfArrayLike` abstract operation
1827// https://tc39.es/ecma262/#sec-lengthofarraylike
1828module.exports = function (obj) {
1829 return toLength(obj.length);
1830};
1831
1832
1833/***/ }),
1834/* 66 */
1835/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1836
1837var toIntegerOrInfinity = __webpack_require__(63);
1838
1839var min = Math.min;
1840
1841// `ToLength` abstract operation
1842// https://tc39.es/ecma262/#sec-tolength
1843module.exports = function (argument) {
1844 return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
1845};
1846
1847
1848/***/ }),
1849/* 67 */
1850/***/ (function(module) {
1851
1852// IE8- don't enum bug keys
1853module.exports = [
1854 'constructor',
1855 'hasOwnProperty',
1856 'isPrototypeOf',
1857 'propertyIsEnumerable',
1858 'toLocaleString',
1859 'toString',
1860 'valueOf'
1861];
1862
1863
1864/***/ }),
1865/* 68 */
1866/***/ (function(__unused_webpack_module, exports) {
1867
1868// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1869exports.f = Object.getOwnPropertySymbols;
1870
1871
1872/***/ }),
1873/* 69 */
1874/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1875
1876var fails = __webpack_require__(7);
1877var isCallable = __webpack_require__(22);
1878
1879var replacement = /#|\.prototype\./;
1880
1881var isForced = function (feature, detection) {
1882 var value = data[normalize(feature)];
1883 return value == POLYFILL ? true
1884 : value == NATIVE ? false
1885 : isCallable(detection) ? fails(detection)
1886 : !!detection;
1887};
1888
1889var normalize = isForced.normalize = function (string) {
1890 return String(string).replace(replacement, '.').toLowerCase();
1891};
1892
1893var data = isForced.data = {};
1894var NATIVE = isForced.NATIVE = 'N';
1895var POLYFILL = isForced.POLYFILL = 'P';
1896
1897module.exports = isForced;
1898
1899
1900/***/ }),
1901/* 70 */
1902/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1903
1904var classof = __webpack_require__(71);
1905
1906var $String = String;
1907
1908module.exports = function (argument) {
1909 if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1910 return $String(argument);
1911};
1912
1913
1914/***/ }),
1915/* 71 */
1916/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1917
1918var TO_STRING_TAG_SUPPORT = __webpack_require__(72);
1919var isCallable = __webpack_require__(22);
1920var classofRaw = __webpack_require__(15);
1921var wellKnownSymbol = __webpack_require__(35);
1922
1923var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1924var $Object = Object;
1925
1926// ES3 wrong here
1927var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1928
1929// fallback for IE11 Script Access Denied error
1930var tryGet = function (it, key) {
1931 try {
1932 return it[key];
1933 } catch (error) { /* empty */ }
1934};
1935
1936// getting tag from ES6+ `Object.prototype.toString`
1937module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1938 var O, tag, result;
1939 return it === undefined ? 'Undefined' : it === null ? 'Null'
1940 // @@toStringTag case
1941 : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1942 // builtinTag case
1943 : CORRECT_ARGUMENTS ? classofRaw(O)
1944 // ES3 arguments fallback
1945 : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
1946};
1947
1948
1949/***/ }),
1950/* 72 */
1951/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1952
1953var wellKnownSymbol = __webpack_require__(35);
1954
1955var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1956var test = {};
1957
1958test[TO_STRING_TAG] = 'z';
1959
1960module.exports = String(test) === '[object z]';
1961
1962
1963/***/ }),
1964/* 73 */
1965/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1966
1967/* global ActiveXObject -- old IE, WSH */
1968var anObject = __webpack_require__(48);
1969var definePropertiesModule = __webpack_require__(74);
1970var enumBugKeys = __webpack_require__(67);
1971var hiddenKeys = __webpack_require__(56);
1972var html = __webpack_require__(76);
1973var documentCreateElement = __webpack_require__(44);
1974var sharedKey = __webpack_require__(55);
1975
1976var GT = '>';
1977var LT = '<';
1978var PROTOTYPE = 'prototype';
1979var SCRIPT = 'script';
1980var IE_PROTO = sharedKey('IE_PROTO');
1981
1982var EmptyConstructor = function () { /* empty */ };
1983
1984var scriptTag = function (content) {
1985 return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1986};
1987
1988// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1989var NullProtoObjectViaActiveX = function (activeXDocument) {
1990 activeXDocument.write(scriptTag(''));
1991 activeXDocument.close();
1992 var temp = activeXDocument.parentWindow.Object;
1993 activeXDocument = null; // avoid memory leak
1994 return temp;
1995};
1996
1997// Create object with fake `null` prototype: use iframe Object with cleared prototype
1998var NullProtoObjectViaIFrame = function () {
1999 // Thrash, waste and sodomy: IE GC bug
2000 var iframe = documentCreateElement('iframe');
2001 var JS = 'java' + SCRIPT + ':';
2002 var iframeDocument;
2003 iframe.style.display = 'none';
2004 html.appendChild(iframe);
2005 // https://github.com/zloirock/core-js/issues/475
2006 iframe.src = String(JS);
2007 iframeDocument = iframe.contentWindow.document;
2008 iframeDocument.open();
2009 iframeDocument.write(scriptTag('document.F=Object'));
2010 iframeDocument.close();
2011 return iframeDocument.F;
2012};
2013
2014// Check for document.domain and active x support
2015// No need to use active x approach when document.domain is not set
2016// see https://github.com/es-shims/es5-shim/issues/150
2017// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
2018// avoid IE GC bug
2019var activeXDocument;
2020var NullProtoObject = function () {
2021 try {
2022 activeXDocument = new ActiveXObject('htmlfile');
2023 } catch (error) { /* ignore */ }
2024 NullProtoObject = typeof document != 'undefined'
2025 ? document.domain && activeXDocument
2026 ? NullProtoObjectViaActiveX(activeXDocument) // old IE
2027 : NullProtoObjectViaIFrame()
2028 : NullProtoObjectViaActiveX(activeXDocument); // WSH
2029 var length = enumBugKeys.length;
2030 while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
2031 return NullProtoObject();
2032};
2033
2034hiddenKeys[IE_PROTO] = true;
2035
2036// `Object.create` method
2037// https://tc39.es/ecma262/#sec-object.create
2038// eslint-disable-next-line es/no-object-create -- safe
2039module.exports = Object.create || function create(O, Properties) {
2040 var result;
2041 if (O !== null) {
2042 EmptyConstructor[PROTOTYPE] = anObject(O);
2043 result = new EmptyConstructor();
2044 EmptyConstructor[PROTOTYPE] = null;
2045 // add "__proto__" for Object.getPrototypeOf polyfill
2046 result[IE_PROTO] = O;
2047 } else result = NullProtoObject();
2048 return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
2049};
2050
2051
2052/***/ }),
2053/* 74 */
2054/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2055
2056var DESCRIPTORS = __webpack_require__(6);
2057var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(47);
2058var definePropertyModule = __webpack_require__(46);
2059var anObject = __webpack_require__(48);
2060var toIndexedObject = __webpack_require__(12);
2061var objectKeys = __webpack_require__(75);
2062
2063// `Object.defineProperties` method
2064// https://tc39.es/ecma262/#sec-object.defineproperties
2065// eslint-disable-next-line es/no-object-defineproperties -- safe
2066exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
2067 anObject(O);
2068 var props = toIndexedObject(Properties);
2069 var keys = objectKeys(Properties);
2070 var length = keys.length;
2071 var index = 0;
2072 var key;
2073 while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
2074 return O;
2075};
2076
2077
2078/***/ }),
2079/* 75 */
2080/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2081
2082var internalObjectKeys = __webpack_require__(60);
2083var enumBugKeys = __webpack_require__(67);
2084
2085// `Object.keys` method
2086// https://tc39.es/ecma262/#sec-object.keys
2087// eslint-disable-next-line es/no-object-keys -- safe
2088module.exports = Object.keys || function keys(O) {
2089 return internalObjectKeys(O, enumBugKeys);
2090};
2091
2092
2093/***/ }),
2094/* 76 */
2095/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2096
2097var getBuiltIn = __webpack_require__(25);
2098
2099module.exports = getBuiltIn('document', 'documentElement');
2100
2101
2102/***/ }),
2103/* 77 */
2104/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2105
2106/* eslint-disable es/no-object-getownpropertynames -- safe */
2107var classof = __webpack_require__(15);
2108var toIndexedObject = __webpack_require__(12);
2109var $getOwnPropertyNames = (__webpack_require__(59).f);
2110var arraySlice = __webpack_require__(78);
2111
2112var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
2113 ? Object.getOwnPropertyNames(window) : [];
2114
2115var getWindowNames = function (it) {
2116 try {
2117 return $getOwnPropertyNames(it);
2118 } catch (error) {
2119 return arraySlice(windowNames);
2120 }
2121};
2122
2123// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
2124module.exports.f = function getOwnPropertyNames(it) {
2125 return windowNames && classof(it) == 'Window'
2126 ? getWindowNames(it)
2127 : $getOwnPropertyNames(toIndexedObject(it));
2128};
2129
2130
2131/***/ }),
2132/* 78 */
2133/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2134
2135var toAbsoluteIndex = __webpack_require__(62);
2136var lengthOfArrayLike = __webpack_require__(65);
2137var createProperty = __webpack_require__(79);
2138
2139var $Array = Array;
2140var max = Math.max;
2141
2142module.exports = function (O, start, end) {
2143 var length = lengthOfArrayLike(O);
2144 var k = toAbsoluteIndex(start, length);
2145 var fin = toAbsoluteIndex(end === undefined ? length : end, length);
2146 var result = $Array(max(fin - k, 0));
2147 for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
2148 result.length = n;
2149 return result;
2150};
2151
2152
2153/***/ }),
2154/* 79 */
2155/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2156
2157"use strict";
2158
2159var toPropertyKey = __webpack_require__(19);
2160var definePropertyModule = __webpack_require__(46);
2161var createPropertyDescriptor = __webpack_require__(11);
2162
2163module.exports = function (object, key, value) {
2164 var propertyKey = toPropertyKey(key);
2165 if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
2166 else object[propertyKey] = value;
2167};
2168
2169
2170/***/ }),
2171/* 80 */
2172/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2173
2174var wellKnownSymbol = __webpack_require__(35);
2175
2176exports.f = wellKnownSymbol;
2177
2178
2179/***/ }),
2180/* 81 */
2181/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2182
2183var path = __webpack_require__(82);
2184var hasOwn = __webpack_require__(40);
2185var wrappedWellKnownSymbolModule = __webpack_require__(80);
2186var defineProperty = (__webpack_require__(46).f);
2187
2188module.exports = function (NAME) {
2189 var Symbol = path.Symbol || (path.Symbol = {});
2190 if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {
2191 value: wrappedWellKnownSymbolModule.f(NAME)
2192 });
2193};
2194
2195
2196/***/ }),
2197/* 82 */
2198/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2199
2200var global = __webpack_require__(4);
2201
2202module.exports = global;
2203
2204
2205/***/ }),
2206/* 83 */
2207/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2208
2209var call = __webpack_require__(8);
2210var getBuiltIn = __webpack_require__(25);
2211var wellKnownSymbol = __webpack_require__(35);
2212var defineBuiltIn = __webpack_require__(49);
2213
2214module.exports = function () {
2215 var Symbol = getBuiltIn('Symbol');
2216 var SymbolPrototype = Symbol && Symbol.prototype;
2217 var valueOf = SymbolPrototype && SymbolPrototype.valueOf;
2218 var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
2219
2220 if (SymbolPrototype && !SymbolPrototype[TO_PRIMITIVE]) {
2221 // `Symbol.prototype[@@toPrimitive]` method
2222 // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
2223 // eslint-disable-next-line no-unused-vars -- required for .length
2224 defineBuiltIn(SymbolPrototype, TO_PRIMITIVE, function (hint) {
2225 return call(valueOf, this);
2226 }, { arity: 1 });
2227 }
2228};
2229
2230
2231/***/ }),
2232/* 84 */
2233/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2234
2235var defineProperty = (__webpack_require__(46).f);
2236var hasOwn = __webpack_require__(40);
2237var wellKnownSymbol = __webpack_require__(35);
2238
2239var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2240
2241module.exports = function (target, TAG, STATIC) {
2242 if (target && !STATIC) target = target.prototype;
2243 if (target && !hasOwn(target, TO_STRING_TAG)) {
2244 defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
2245 }
2246};
2247
2248
2249/***/ }),
2250/* 85 */
2251/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2252
2253var bind = __webpack_require__(86);
2254var uncurryThis = __webpack_require__(14);
2255var IndexedObject = __webpack_require__(13);
2256var toObject = __webpack_require__(41);
2257var lengthOfArrayLike = __webpack_require__(65);
2258var arraySpeciesCreate = __webpack_require__(87);
2259
2260var push = uncurryThis([].push);
2261
2262// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
2263var createMethod = function (TYPE) {
2264 var IS_MAP = TYPE == 1;
2265 var IS_FILTER = TYPE == 2;
2266 var IS_SOME = TYPE == 3;
2267 var IS_EVERY = TYPE == 4;
2268 var IS_FIND_INDEX = TYPE == 6;
2269 var IS_FILTER_REJECT = TYPE == 7;
2270 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
2271 return function ($this, callbackfn, that, specificCreate) {
2272 var O = toObject($this);
2273 var self = IndexedObject(O);
2274 var boundFunction = bind(callbackfn, that);
2275 var length = lengthOfArrayLike(self);
2276 var index = 0;
2277 var create = specificCreate || arraySpeciesCreate;
2278 var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
2279 var value, result;
2280 for (;length > index; index++) if (NO_HOLES || index in self) {
2281 value = self[index];
2282 result = boundFunction(value, index, O);
2283 if (TYPE) {
2284 if (IS_MAP) target[index] = result; // map
2285 else if (result) switch (TYPE) {
2286 case 3: return true; // some
2287 case 5: return value; // find
2288 case 6: return index; // findIndex
2289 case 2: push(target, value); // filter
2290 } else switch (TYPE) {
2291 case 4: return false; // every
2292 case 7: push(target, value); // filterReject
2293 }
2294 }
2295 }
2296 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
2297 };
2298};
2299
2300module.exports = {
2301 // `Array.prototype.forEach` method
2302 // https://tc39.es/ecma262/#sec-array.prototype.foreach
2303 forEach: createMethod(0),
2304 // `Array.prototype.map` method
2305 // https://tc39.es/ecma262/#sec-array.prototype.map
2306 map: createMethod(1),
2307 // `Array.prototype.filter` method
2308 // https://tc39.es/ecma262/#sec-array.prototype.filter
2309 filter: createMethod(2),
2310 // `Array.prototype.some` method
2311 // https://tc39.es/ecma262/#sec-array.prototype.some
2312 some: createMethod(3),
2313 // `Array.prototype.every` method
2314 // https://tc39.es/ecma262/#sec-array.prototype.every
2315 every: createMethod(4),
2316 // `Array.prototype.find` method
2317 // https://tc39.es/ecma262/#sec-array.prototype.find
2318 find: createMethod(5),
2319 // `Array.prototype.findIndex` method
2320 // https://tc39.es/ecma262/#sec-array.prototype.findIndex
2321 findIndex: createMethod(6),
2322 // `Array.prototype.filterReject` method
2323 // https://github.com/tc39/proposal-array-filtering
2324 filterReject: createMethod(7)
2325};
2326
2327
2328/***/ }),
2329/* 86 */
2330/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2331
2332var uncurryThis = __webpack_require__(14);
2333var aCallable = __webpack_require__(32);
2334var NATIVE_BIND = __webpack_require__(9);
2335
2336var bind = uncurryThis(uncurryThis.bind);
2337
2338// optional / simple context binding
2339module.exports = function (fn, that) {
2340 aCallable(fn);
2341 return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
2342 return fn.apply(that, arguments);
2343 };
2344};
2345
2346
2347/***/ }),
2348/* 87 */
2349/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2350
2351var arraySpeciesConstructor = __webpack_require__(88);
2352
2353// `ArraySpeciesCreate` abstract operation
2354// https://tc39.es/ecma262/#sec-arrayspeciescreate
2355module.exports = function (originalArray, length) {
2356 return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
2357};
2358
2359
2360/***/ }),
2361/* 88 */
2362/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2363
2364var isArray = __webpack_require__(89);
2365var isConstructor = __webpack_require__(90);
2366var isObject = __webpack_require__(21);
2367var wellKnownSymbol = __webpack_require__(35);
2368
2369var SPECIES = wellKnownSymbol('species');
2370var $Array = Array;
2371
2372// a part of `ArraySpeciesCreate` abstract operation
2373// https://tc39.es/ecma262/#sec-arrayspeciescreate
2374module.exports = function (originalArray) {
2375 var C;
2376 if (isArray(originalArray)) {
2377 C = originalArray.constructor;
2378 // cross-realm fallback
2379 if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
2380 else if (isObject(C)) {
2381 C = C[SPECIES];
2382 if (C === null) C = undefined;
2383 }
2384 } return C === undefined ? $Array : C;
2385};
2386
2387
2388/***/ }),
2389/* 89 */
2390/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2391
2392var classof = __webpack_require__(15);
2393
2394// `IsArray` abstract operation
2395// https://tc39.es/ecma262/#sec-isarray
2396// eslint-disable-next-line es/no-array-isarray -- safe
2397module.exports = Array.isArray || function isArray(argument) {
2398 return classof(argument) == 'Array';
2399};
2400
2401
2402/***/ }),
2403/* 90 */
2404/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2405
2406var uncurryThis = __webpack_require__(14);
2407var fails = __webpack_require__(7);
2408var isCallable = __webpack_require__(22);
2409var classof = __webpack_require__(71);
2410var getBuiltIn = __webpack_require__(25);
2411var inspectSource = __webpack_require__(52);
2412
2413var noop = function () { /* empty */ };
2414var empty = [];
2415var construct = getBuiltIn('Reflect', 'construct');
2416var constructorRegExp = /^\s*(?:class|function)\b/;
2417var exec = uncurryThis(constructorRegExp.exec);
2418var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
2419
2420var isConstructorModern = function isConstructor(argument) {
2421 if (!isCallable(argument)) return false;
2422 try {
2423 construct(noop, empty, argument);
2424 return true;
2425 } catch (error) {
2426 return false;
2427 }
2428};
2429
2430var isConstructorLegacy = function isConstructor(argument) {
2431 if (!isCallable(argument)) return false;
2432 switch (classof(argument)) {
2433 case 'AsyncFunction':
2434 case 'GeneratorFunction':
2435 case 'AsyncGeneratorFunction': return false;
2436 }
2437 try {
2438 // we can't check .prototype since constructors produced by .bind haven't it
2439 // `Function#toString` throws on some built-it function in some legacy engines
2440 // (for example, `DOMQuad` and similar in FF41-)
2441 return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
2442 } catch (error) {
2443 return true;
2444 }
2445};
2446
2447isConstructorLegacy.sham = true;
2448
2449// `IsConstructor` abstract operation
2450// https://tc39.es/ecma262/#sec-isconstructor
2451module.exports = !construct || fails(function () {
2452 var called;
2453 return isConstructorModern(isConstructorModern.call)
2454 || !isConstructorModern(Object)
2455 || !isConstructorModern(function () { called = true; })
2456 || called;
2457}) ? isConstructorLegacy : isConstructorModern;
2458
2459
2460/***/ }),
2461/* 91 */
2462/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2463
2464var $ = __webpack_require__(3);
2465var getBuiltIn = __webpack_require__(25);
2466var hasOwn = __webpack_require__(40);
2467var toString = __webpack_require__(70);
2468var shared = __webpack_require__(36);
2469var NATIVE_SYMBOL_REGISTRY = __webpack_require__(92);
2470
2471var StringToSymbolRegistry = shared('string-to-symbol-registry');
2472var SymbolToStringRegistry = shared('symbol-to-string-registry');
2473
2474// `Symbol.for` method
2475// https://tc39.es/ecma262/#sec-symbol.for
2476$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {
2477 'for': function (key) {
2478 var string = toString(key);
2479 if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
2480 var symbol = getBuiltIn('Symbol')(string);
2481 StringToSymbolRegistry[string] = symbol;
2482 SymbolToStringRegistry[symbol] = string;
2483 return symbol;
2484 }
2485});
2486
2487
2488/***/ }),
2489/* 92 */
2490/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2491
2492var NATIVE_SYMBOL = __webpack_require__(28);
2493
2494/* eslint-disable es/no-symbol -- safe */
2495module.exports = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor;
2496
2497
2498/***/ }),
2499/* 93 */
2500/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2501
2502var $ = __webpack_require__(3);
2503var hasOwn = __webpack_require__(40);
2504var isSymbol = __webpack_require__(24);
2505var tryToString = __webpack_require__(33);
2506var shared = __webpack_require__(36);
2507var NATIVE_SYMBOL_REGISTRY = __webpack_require__(92);
2508
2509var SymbolToStringRegistry = shared('symbol-to-string-registry');
2510
2511// `Symbol.keyFor` method
2512// https://tc39.es/ecma262/#sec-symbol.keyfor
2513$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {
2514 keyFor: function keyFor(sym) {
2515 if (!isSymbol(sym)) throw TypeError(tryToString(sym) + ' is not a symbol');
2516 if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
2517 }
2518});
2519
2520
2521/***/ }),
2522/* 94 */
2523/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2524
2525var $ = __webpack_require__(3);
2526var getBuiltIn = __webpack_require__(25);
2527var apply = __webpack_require__(95);
2528var call = __webpack_require__(8);
2529var uncurryThis = __webpack_require__(14);
2530var fails = __webpack_require__(7);
2531var isArray = __webpack_require__(89);
2532var isCallable = __webpack_require__(22);
2533var isObject = __webpack_require__(21);
2534var isSymbol = __webpack_require__(24);
2535var arraySlice = __webpack_require__(96);
2536var NATIVE_SYMBOL = __webpack_require__(28);
2537
2538var $stringify = getBuiltIn('JSON', 'stringify');
2539var exec = uncurryThis(/./.exec);
2540var charAt = uncurryThis(''.charAt);
2541var charCodeAt = uncurryThis(''.charCodeAt);
2542var replace = uncurryThis(''.replace);
2543var numberToString = uncurryThis(1.0.toString);
2544
2545var tester = /[\uD800-\uDFFF]/g;
2546var low = /^[\uD800-\uDBFF]$/;
2547var hi = /^[\uDC00-\uDFFF]$/;
2548
2549var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {
2550 var symbol = getBuiltIn('Symbol')();
2551 // MS Edge converts symbol values to JSON as {}
2552 return $stringify([symbol]) != '[null]'
2553 // WebKit converts symbol values to JSON as null
2554 || $stringify({ a: symbol }) != '{}'
2555 // V8 throws on boxed symbols
2556 || $stringify(Object(symbol)) != '{}';
2557});
2558
2559// https://github.com/tc39/proposal-well-formed-stringify
2560var ILL_FORMED_UNICODE = fails(function () {
2561 return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
2562 || $stringify('\uDEAD') !== '"\\udead"';
2563});
2564
2565var stringifyWithSymbolsFix = function (it, replacer) {
2566 var args = arraySlice(arguments);
2567 var $replacer = replacer;
2568 if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
2569 if (!isArray(replacer)) replacer = function (key, value) {
2570 if (isCallable($replacer)) value = call($replacer, this, key, value);
2571 if (!isSymbol(value)) return value;
2572 };
2573 args[1] = replacer;
2574 return apply($stringify, null, args);
2575};
2576
2577var fixIllFormed = function (match, offset, string) {
2578 var prev = charAt(string, offset - 1);
2579 var next = charAt(string, offset + 1);
2580 if ((exec(low, match) && !exec(hi, next)) || (exec(hi, match) && !exec(low, prev))) {
2581 return '\\u' + numberToString(charCodeAt(match, 0), 16);
2582 } return match;
2583};
2584
2585if ($stringify) {
2586 // `JSON.stringify` method
2587 // https://tc39.es/ecma262/#sec-json.stringify
2588 $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
2589 // eslint-disable-next-line no-unused-vars -- required for `.length`
2590 stringify: function stringify(it, replacer, space) {
2591 var args = arraySlice(arguments);
2592 var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
2593 return ILL_FORMED_UNICODE && typeof result == 'string' ? replace(result, tester, fixIllFormed) : result;
2594 }
2595 });
2596}
2597
2598
2599/***/ }),
2600/* 95 */
2601/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2602
2603var NATIVE_BIND = __webpack_require__(9);
2604
2605var FunctionPrototype = Function.prototype;
2606var apply = FunctionPrototype.apply;
2607var call = FunctionPrototype.call;
2608
2609// eslint-disable-next-line es/no-reflect -- safe
2610module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
2611 return call.apply(apply, arguments);
2612});
2613
2614
2615/***/ }),
2616/* 96 */
2617/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2618
2619var uncurryThis = __webpack_require__(14);
2620
2621module.exports = uncurryThis([].slice);
2622
2623
2624/***/ }),
2625/* 97 */
2626/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2627
2628var $ = __webpack_require__(3);
2629var NATIVE_SYMBOL = __webpack_require__(28);
2630var fails = __webpack_require__(7);
2631var getOwnPropertySymbolsModule = __webpack_require__(68);
2632var toObject = __webpack_require__(41);
2633
2634// V8 ~ Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
2635// https://bugs.chromium.org/p/v8/issues/detail?id=3443
2636var FORCED = !NATIVE_SYMBOL || fails(function () { getOwnPropertySymbolsModule.f(1); });
2637
2638// `Object.getOwnPropertySymbols` method
2639// https://tc39.es/ecma262/#sec-object.getownpropertysymbols
2640$({ target: 'Object', stat: true, forced: FORCED }, {
2641 getOwnPropertySymbols: function getOwnPropertySymbols(it) {
2642 var $getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
2643 return $getOwnPropertySymbols ? $getOwnPropertySymbols(toObject(it)) : [];
2644 }
2645});
2646
2647
2648/***/ }),
2649/* 98 */
2650/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2651
2652"use strict";
2653// `Symbol.prototype.description` getter
2654// https://tc39.es/ecma262/#sec-symbol.prototype.description
2655
2656var $ = __webpack_require__(3);
2657var DESCRIPTORS = __webpack_require__(6);
2658var global = __webpack_require__(4);
2659var uncurryThis = __webpack_require__(14);
2660var hasOwn = __webpack_require__(40);
2661var isCallable = __webpack_require__(22);
2662var isPrototypeOf = __webpack_require__(26);
2663var toString = __webpack_require__(70);
2664var defineProperty = (__webpack_require__(46).f);
2665var copyConstructorProperties = __webpack_require__(57);
2666
2667var NativeSymbol = global.Symbol;
2668var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
2669
2670if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
2671 // Safari 12 bug
2672 NativeSymbol().description !== undefined
2673)) {
2674 var EmptyStringDescriptionStore = {};
2675 // wrap Symbol constructor for correct work with undefined description
2676 var SymbolWrapper = function Symbol() {
2677 var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
2678 var result = isPrototypeOf(SymbolPrototype, this)
2679 ? new NativeSymbol(description)
2680 // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
2681 : description === undefined ? NativeSymbol() : NativeSymbol(description);
2682 if (description === '') EmptyStringDescriptionStore[result] = true;
2683 return result;
2684 };
2685
2686 copyConstructorProperties(SymbolWrapper, NativeSymbol);
2687 SymbolWrapper.prototype = SymbolPrototype;
2688 SymbolPrototype.constructor = SymbolWrapper;
2689
2690 var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
2691 var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf);
2692 var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString);
2693 var regexp = /^Symbol\((.*)\)[^)]+$/;
2694 var replace = uncurryThis(''.replace);
2695 var stringSlice = uncurryThis(''.slice);
2696
2697 defineProperty(SymbolPrototype, 'description', {
2698 configurable: true,
2699 get: function description() {
2700 var symbol = thisSymbolValue(this);
2701 if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
2702 var string = symbolDescriptiveString(symbol);
2703 var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
2704 return desc === '' ? undefined : desc;
2705 }
2706 });
2707
2708 $({ global: true, constructor: true, forced: true }, {
2709 Symbol: SymbolWrapper
2710 });
2711}
2712
2713
2714/***/ }),
2715/* 99 */
2716/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2717
2718var defineWellKnownSymbol = __webpack_require__(81);
2719
2720// `Symbol.asyncIterator` well-known symbol
2721// https://tc39.es/ecma262/#sec-symbol.asynciterator
2722defineWellKnownSymbol('asyncIterator');
2723
2724
2725/***/ }),
2726/* 100 */
2727/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2728
2729var defineWellKnownSymbol = __webpack_require__(81);
2730
2731// `Symbol.hasInstance` well-known symbol
2732// https://tc39.es/ecma262/#sec-symbol.hasinstance
2733defineWellKnownSymbol('hasInstance');
2734
2735
2736/***/ }),
2737/* 101 */
2738/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2739
2740var defineWellKnownSymbol = __webpack_require__(81);
2741
2742// `Symbol.isConcatSpreadable` well-known symbol
2743// https://tc39.es/ecma262/#sec-symbol.isconcatspreadable
2744defineWellKnownSymbol('isConcatSpreadable');
2745
2746
2747/***/ }),
2748/* 102 */
2749/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2750
2751var defineWellKnownSymbol = __webpack_require__(81);
2752
2753// `Symbol.iterator` well-known symbol
2754// https://tc39.es/ecma262/#sec-symbol.iterator
2755defineWellKnownSymbol('iterator');
2756
2757
2758/***/ }),
2759/* 103 */
2760/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2761
2762var defineWellKnownSymbol = __webpack_require__(81);
2763
2764// `Symbol.match` well-known symbol
2765// https://tc39.es/ecma262/#sec-symbol.match
2766defineWellKnownSymbol('match');
2767
2768
2769/***/ }),
2770/* 104 */
2771/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2772
2773var defineWellKnownSymbol = __webpack_require__(81);
2774
2775// `Symbol.matchAll` well-known symbol
2776// https://tc39.es/ecma262/#sec-symbol.matchall
2777defineWellKnownSymbol('matchAll');
2778
2779
2780/***/ }),
2781/* 105 */
2782/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2783
2784var defineWellKnownSymbol = __webpack_require__(81);
2785
2786// `Symbol.replace` well-known symbol
2787// https://tc39.es/ecma262/#sec-symbol.replace
2788defineWellKnownSymbol('replace');
2789
2790
2791/***/ }),
2792/* 106 */
2793/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2794
2795var defineWellKnownSymbol = __webpack_require__(81);
2796
2797// `Symbol.search` well-known symbol
2798// https://tc39.es/ecma262/#sec-symbol.search
2799defineWellKnownSymbol('search');
2800
2801
2802/***/ }),
2803/* 107 */
2804/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2805
2806var defineWellKnownSymbol = __webpack_require__(81);
2807
2808// `Symbol.species` well-known symbol
2809// https://tc39.es/ecma262/#sec-symbol.species
2810defineWellKnownSymbol('species');
2811
2812
2813/***/ }),
2814/* 108 */
2815/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2816
2817var defineWellKnownSymbol = __webpack_require__(81);
2818
2819// `Symbol.split` well-known symbol
2820// https://tc39.es/ecma262/#sec-symbol.split
2821defineWellKnownSymbol('split');
2822
2823
2824/***/ }),
2825/* 109 */
2826/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2827
2828var defineWellKnownSymbol = __webpack_require__(81);
2829var defineSymbolToPrimitive = __webpack_require__(83);
2830
2831// `Symbol.toPrimitive` well-known symbol
2832// https://tc39.es/ecma262/#sec-symbol.toprimitive
2833defineWellKnownSymbol('toPrimitive');
2834
2835// `Symbol.prototype[@@toPrimitive]` method
2836// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
2837defineSymbolToPrimitive();
2838
2839
2840/***/ }),
2841/* 110 */
2842/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2843
2844var getBuiltIn = __webpack_require__(25);
2845var defineWellKnownSymbol = __webpack_require__(81);
2846var setToStringTag = __webpack_require__(84);
2847
2848// `Symbol.toStringTag` well-known symbol
2849// https://tc39.es/ecma262/#sec-symbol.tostringtag
2850defineWellKnownSymbol('toStringTag');
2851
2852// `Symbol.prototype[@@toStringTag]` property
2853// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
2854setToStringTag(getBuiltIn('Symbol'), 'Symbol');
2855
2856
2857/***/ }),
2858/* 111 */
2859/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2860
2861var defineWellKnownSymbol = __webpack_require__(81);
2862
2863// `Symbol.unscopables` well-known symbol
2864// https://tc39.es/ecma262/#sec-symbol.unscopables
2865defineWellKnownSymbol('unscopables');
2866
2867
2868/***/ }),
2869/* 112 */
2870/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2871
2872/* eslint-disable no-unused-vars -- required for functions `.length` */
2873var $ = __webpack_require__(3);
2874var global = __webpack_require__(4);
2875var apply = __webpack_require__(95);
2876var wrapErrorConstructorWithCause = __webpack_require__(113);
2877
2878var WEB_ASSEMBLY = 'WebAssembly';
2879var WebAssembly = global[WEB_ASSEMBLY];
2880
2881var FORCED = Error('e', { cause: 7 }).cause !== 7;
2882
2883var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
2884 var O = {};
2885 O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);
2886 $({ global: true, constructor: true, arity: 1, forced: FORCED }, O);
2887};
2888
2889var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
2890 if (WebAssembly && WebAssembly[ERROR_NAME]) {
2891 var O = {};
2892 O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);
2893 $({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O);
2894 }
2895};
2896
2897// https://github.com/tc39/proposal-error-cause
2898exportGlobalErrorCauseWrapper('Error', function (init) {
2899 return function Error(message) { return apply(init, this, arguments); };
2900});
2901exportGlobalErrorCauseWrapper('EvalError', function (init) {
2902 return function EvalError(message) { return apply(init, this, arguments); };
2903});
2904exportGlobalErrorCauseWrapper('RangeError', function (init) {
2905 return function RangeError(message) { return apply(init, this, arguments); };
2906});
2907exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
2908 return function ReferenceError(message) { return apply(init, this, arguments); };
2909});
2910exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
2911 return function SyntaxError(message) { return apply(init, this, arguments); };
2912});
2913exportGlobalErrorCauseWrapper('TypeError', function (init) {
2914 return function TypeError(message) { return apply(init, this, arguments); };
2915});
2916exportGlobalErrorCauseWrapper('URIError', function (init) {
2917 return function URIError(message) { return apply(init, this, arguments); };
2918});
2919exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
2920 return function CompileError(message) { return apply(init, this, arguments); };
2921});
2922exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
2923 return function LinkError(message) { return apply(init, this, arguments); };
2924});
2925exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
2926 return function RuntimeError(message) { return apply(init, this, arguments); };
2927});
2928
2929
2930/***/ }),
2931/* 113 */
2932/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2933
2934"use strict";
2935
2936var getBuiltIn = __webpack_require__(25);
2937var hasOwn = __webpack_require__(40);
2938var createNonEnumerableProperty = __webpack_require__(45);
2939var isPrototypeOf = __webpack_require__(26);
2940var setPrototypeOf = __webpack_require__(114);
2941var copyConstructorProperties = __webpack_require__(57);
2942var proxyAccessor = __webpack_require__(116);
2943var inheritIfRequired = __webpack_require__(117);
2944var normalizeStringArgument = __webpack_require__(118);
2945var installErrorCause = __webpack_require__(119);
2946var clearErrorStack = __webpack_require__(120);
2947var ERROR_STACK_INSTALLABLE = __webpack_require__(121);
2948var DESCRIPTORS = __webpack_require__(6);
2949var IS_PURE = __webpack_require__(37);
2950
2951module.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
2952 var STACK_TRACE_LIMIT = 'stackTraceLimit';
2953 var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
2954 var path = FULL_NAME.split('.');
2955 var ERROR_NAME = path[path.length - 1];
2956 var OriginalError = getBuiltIn.apply(null, path);
2957
2958 if (!OriginalError) return;
2959
2960 var OriginalErrorPrototype = OriginalError.prototype;
2961
2962 // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
2963 if (!IS_PURE && hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
2964
2965 if (!FORCED) return OriginalError;
2966
2967 var BaseError = getBuiltIn('Error');
2968
2969 var WrappedError = wrapper(function (a, b) {
2970 var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
2971 var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
2972 if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
2973 if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(result, 'stack', clearErrorStack(result.stack, 2));
2974 if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
2975 if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
2976 return result;
2977 });
2978
2979 WrappedError.prototype = OriginalErrorPrototype;
2980
2981 if (ERROR_NAME !== 'Error') {
2982 if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
2983 else copyConstructorProperties(WrappedError, BaseError, { name: true });
2984 } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
2985 proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
2986 proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
2987 }
2988
2989 copyConstructorProperties(WrappedError, OriginalError);
2990
2991 if (!IS_PURE) try {
2992 // Safari 13- bug: WebAssembly errors does not have a proper `.name`
2993 if (OriginalErrorPrototype.name !== ERROR_NAME) {
2994 createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
2995 }
2996 OriginalErrorPrototype.constructor = WrappedError;
2997 } catch (error) { /* empty */ }
2998
2999 return WrappedError;
3000};
3001
3002
3003/***/ }),
3004/* 114 */
3005/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3006
3007/* eslint-disable no-proto -- safe */
3008var uncurryThis = __webpack_require__(14);
3009var anObject = __webpack_require__(48);
3010var aPossiblePrototype = __webpack_require__(115);
3011
3012// `Object.setPrototypeOf` method
3013// https://tc39.es/ecma262/#sec-object.setprototypeof
3014// Works with __proto__ only. Old v8 can't work with null proto objects.
3015// eslint-disable-next-line es/no-object-setprototypeof -- safe
3016module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
3017 var CORRECT_SETTER = false;
3018 var test = {};
3019 var setter;
3020 try {
3021 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
3022 setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
3023 setter(test, []);
3024 CORRECT_SETTER = test instanceof Array;
3025 } catch (error) { /* empty */ }
3026 return function setPrototypeOf(O, proto) {
3027 anObject(O);
3028 aPossiblePrototype(proto);
3029 if (CORRECT_SETTER) setter(O, proto);
3030 else O.__proto__ = proto;
3031 return O;
3032 };
3033}() : undefined);
3034
3035
3036/***/ }),
3037/* 115 */
3038/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3039
3040var isCallable = __webpack_require__(22);
3041
3042var $String = String;
3043var $TypeError = TypeError;
3044
3045module.exports = function (argument) {
3046 if (typeof argument == 'object' || isCallable(argument)) return argument;
3047 throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
3048};
3049
3050
3051/***/ }),
3052/* 116 */
3053/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3054
3055var defineProperty = (__webpack_require__(46).f);
3056
3057module.exports = function (Target, Source, key) {
3058 key in Target || defineProperty(Target, key, {
3059 configurable: true,
3060 get: function () { return Source[key]; },
3061 set: function (it) { Source[key] = it; }
3062 });
3063};
3064
3065
3066/***/ }),
3067/* 117 */
3068/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3069
3070var isCallable = __webpack_require__(22);
3071var isObject = __webpack_require__(21);
3072var setPrototypeOf = __webpack_require__(114);
3073
3074// makes subclassing work correct for wrapped built-ins
3075module.exports = function ($this, dummy, Wrapper) {
3076 var NewTarget, NewTargetPrototype;
3077 if (
3078 // it can work only with native `setPrototypeOf`
3079 setPrototypeOf &&
3080 // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
3081 isCallable(NewTarget = dummy.constructor) &&
3082 NewTarget !== Wrapper &&
3083 isObject(NewTargetPrototype = NewTarget.prototype) &&
3084 NewTargetPrototype !== Wrapper.prototype
3085 ) setPrototypeOf($this, NewTargetPrototype);
3086 return $this;
3087};
3088
3089
3090/***/ }),
3091/* 118 */
3092/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3093
3094var toString = __webpack_require__(70);
3095
3096module.exports = function (argument, $default) {
3097 return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
3098};
3099
3100
3101/***/ }),
3102/* 119 */
3103/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3104
3105var isObject = __webpack_require__(21);
3106var createNonEnumerableProperty = __webpack_require__(45);
3107
3108// `InstallErrorCause` abstract operation
3109// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
3110module.exports = function (O, options) {
3111 if (isObject(options) && 'cause' in options) {
3112 createNonEnumerableProperty(O, 'cause', options.cause);
3113 }
3114};
3115
3116
3117/***/ }),
3118/* 120 */
3119/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3120
3121var uncurryThis = __webpack_require__(14);
3122
3123var $Error = Error;
3124var replace = uncurryThis(''.replace);
3125
3126var TEST = (function (arg) { return String($Error(arg).stack); })('zxcasd');
3127var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
3128var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
3129
3130module.exports = function (stack, dropEntries) {
3131 if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
3132 while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
3133 } return stack;
3134};
3135
3136
3137/***/ }),
3138/* 121 */
3139/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3140
3141var fails = __webpack_require__(7);
3142var createPropertyDescriptor = __webpack_require__(11);
3143
3144module.exports = !fails(function () {
3145 var error = Error('a');
3146 if (!('stack' in error)) return true;
3147 // eslint-disable-next-line es/no-object-defineproperty -- safe
3148 Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
3149 return error.stack !== 7;
3150});
3151
3152
3153/***/ }),
3154/* 122 */
3155/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3156
3157var defineBuiltIn = __webpack_require__(49);
3158var errorToString = __webpack_require__(123);
3159
3160var ErrorPrototype = Error.prototype;
3161
3162// `Error.prototype.toString` method fix
3163// https://tc39.es/ecma262/#sec-error.prototype.tostring
3164if (ErrorPrototype.toString !== errorToString) {
3165 defineBuiltIn(ErrorPrototype, 'toString', errorToString);
3166}
3167
3168
3169/***/ }),
3170/* 123 */
3171/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3172
3173"use strict";
3174
3175var DESCRIPTORS = __webpack_require__(6);
3176var fails = __webpack_require__(7);
3177var anObject = __webpack_require__(48);
3178var create = __webpack_require__(73);
3179var normalizeStringArgument = __webpack_require__(118);
3180
3181var nativeErrorToString = Error.prototype.toString;
3182
3183var INCORRECT_TO_STRING = fails(function () {
3184 if (DESCRIPTORS) {
3185 // Chrome 32- incorrectly call accessor
3186 // eslint-disable-next-line es/no-object-defineproperty -- safe
3187 var object = create(Object.defineProperty({}, 'name', { get: function () {
3188 return this === object;
3189 } }));
3190 if (nativeErrorToString.call(object) !== 'true') return true;
3191 }
3192 // FF10- does not properly handle non-strings
3193 return nativeErrorToString.call({ message: 1, name: 2 }) !== '2: 1'
3194 // IE8 does not properly handle defaults
3195 || nativeErrorToString.call({}) !== 'Error';
3196});
3197
3198module.exports = INCORRECT_TO_STRING ? function toString() {
3199 var O = anObject(this);
3200 var name = normalizeStringArgument(O.name, 'Error');
3201 var message = normalizeStringArgument(O.message);
3202 return !name ? message : !message ? name : name + ': ' + message;
3203} : nativeErrorToString;
3204
3205
3206/***/ }),
3207/* 124 */
3208/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3209
3210// TODO: Remove this module from `core-js@4` since it's replaced to module below
3211__webpack_require__(125);
3212
3213
3214/***/ }),
3215/* 125 */
3216/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3217
3218"use strict";
3219
3220var $ = __webpack_require__(3);
3221var isPrototypeOf = __webpack_require__(26);
3222var getPrototypeOf = __webpack_require__(126);
3223var setPrototypeOf = __webpack_require__(114);
3224var copyConstructorProperties = __webpack_require__(57);
3225var create = __webpack_require__(73);
3226var createNonEnumerableProperty = __webpack_require__(45);
3227var createPropertyDescriptor = __webpack_require__(11);
3228var clearErrorStack = __webpack_require__(120);
3229var installErrorCause = __webpack_require__(119);
3230var iterate = __webpack_require__(128);
3231var normalizeStringArgument = __webpack_require__(118);
3232var wellKnownSymbol = __webpack_require__(35);
3233var ERROR_STACK_INSTALLABLE = __webpack_require__(121);
3234
3235var TO_STRING_TAG = wellKnownSymbol('toStringTag');
3236var $Error = Error;
3237var push = [].push;
3238
3239var $AggregateError = function AggregateError(errors, message /* , options */) {
3240 var options = arguments.length > 2 ? arguments[2] : undefined;
3241 var isInstance = isPrototypeOf(AggregateErrorPrototype, this);
3242 var that;
3243 if (setPrototypeOf) {
3244 that = setPrototypeOf($Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);
3245 } else {
3246 that = isInstance ? this : create(AggregateErrorPrototype);
3247 createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');
3248 }
3249 if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));
3250 if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1));
3251 installErrorCause(that, options);
3252 var errorsArray = [];
3253 iterate(errors, push, { that: errorsArray });
3254 createNonEnumerableProperty(that, 'errors', errorsArray);
3255 return that;
3256};
3257
3258if (setPrototypeOf) setPrototypeOf($AggregateError, $Error);
3259else copyConstructorProperties($AggregateError, $Error, { name: true });
3260
3261var AggregateErrorPrototype = $AggregateError.prototype = create($Error.prototype, {
3262 constructor: createPropertyDescriptor(1, $AggregateError),
3263 message: createPropertyDescriptor(1, ''),
3264 name: createPropertyDescriptor(1, 'AggregateError')
3265});
3266
3267// `AggregateError` constructor
3268// https://tc39.es/ecma262/#sec-aggregate-error-constructor
3269$({ global: true, constructor: true, arity: 2 }, {
3270 AggregateError: $AggregateError
3271});
3272
3273
3274/***/ }),
3275/* 126 */
3276/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3277
3278var hasOwn = __webpack_require__(40);
3279var isCallable = __webpack_require__(22);
3280var toObject = __webpack_require__(41);
3281var sharedKey = __webpack_require__(55);
3282var CORRECT_PROTOTYPE_GETTER = __webpack_require__(127);
3283
3284var IE_PROTO = sharedKey('IE_PROTO');
3285var $Object = Object;
3286var ObjectPrototype = $Object.prototype;
3287
3288// `Object.getPrototypeOf` method
3289// https://tc39.es/ecma262/#sec-object.getprototypeof
3290// eslint-disable-next-line es/no-object-getprototypeof -- safe
3291module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
3292 var object = toObject(O);
3293 if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
3294 var constructor = object.constructor;
3295 if (isCallable(constructor) && object instanceof constructor) {
3296 return constructor.prototype;
3297 } return object instanceof $Object ? ObjectPrototype : null;
3298};
3299
3300
3301/***/ }),
3302/* 127 */
3303/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3304
3305var fails = __webpack_require__(7);
3306
3307module.exports = !fails(function () {
3308 function F() { /* empty */ }
3309 F.prototype.constructor = null;
3310 // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
3311 return Object.getPrototypeOf(new F()) !== F.prototype;
3312});
3313
3314
3315/***/ }),
3316/* 128 */
3317/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3318
3319var bind = __webpack_require__(86);
3320var call = __webpack_require__(8);
3321var anObject = __webpack_require__(48);
3322var tryToString = __webpack_require__(33);
3323var isArrayIteratorMethod = __webpack_require__(129);
3324var lengthOfArrayLike = __webpack_require__(65);
3325var isPrototypeOf = __webpack_require__(26);
3326var getIterator = __webpack_require__(131);
3327var getIteratorMethod = __webpack_require__(132);
3328var iteratorClose = __webpack_require__(133);
3329
3330var $TypeError = TypeError;
3331
3332var Result = function (stopped, result) {
3333 this.stopped = stopped;
3334 this.result = result;
3335};
3336
3337var ResultPrototype = Result.prototype;
3338
3339module.exports = function (iterable, unboundFunction, options) {
3340 var that = options && options.that;
3341 var AS_ENTRIES = !!(options && options.AS_ENTRIES);
3342 var IS_RECORD = !!(options && options.IS_RECORD);
3343 var IS_ITERATOR = !!(options && options.IS_ITERATOR);
3344 var INTERRUPTED = !!(options && options.INTERRUPTED);
3345 var fn = bind(unboundFunction, that);
3346 var iterator, iterFn, index, length, result, next, step;
3347
3348 var stop = function (condition) {
3349 if (iterator) iteratorClose(iterator, 'normal', condition);
3350 return new Result(true, condition);
3351 };
3352
3353 var callFn = function (value) {
3354 if (AS_ENTRIES) {
3355 anObject(value);
3356 return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
3357 } return INTERRUPTED ? fn(value, stop) : fn(value);
3358 };
3359
3360 if (IS_RECORD) {
3361 iterator = iterable.iterator;
3362 } else if (IS_ITERATOR) {
3363 iterator = iterable;
3364 } else {
3365 iterFn = getIteratorMethod(iterable);
3366 if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');
3367 // optimisation for array iterators
3368 if (isArrayIteratorMethod(iterFn)) {
3369 for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
3370 result = callFn(iterable[index]);
3371 if (result && isPrototypeOf(ResultPrototype, result)) return result;
3372 } return new Result(false);
3373 }
3374 iterator = getIterator(iterable, iterFn);
3375 }
3376
3377 next = IS_RECORD ? iterable.next : iterator.next;
3378 while (!(step = call(next, iterator)).done) {
3379 try {
3380 result = callFn(step.value);
3381 } catch (error) {
3382 iteratorClose(iterator, 'throw', error);
3383 }
3384 if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
3385 } return new Result(false);
3386};
3387
3388
3389/***/ }),
3390/* 129 */
3391/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3392
3393var wellKnownSymbol = __webpack_require__(35);
3394var Iterators = __webpack_require__(130);
3395
3396var ITERATOR = wellKnownSymbol('iterator');
3397var ArrayPrototype = Array.prototype;
3398
3399// check on default Array iterator
3400module.exports = function (it) {
3401 return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
3402};
3403
3404
3405/***/ }),
3406/* 130 */
3407/***/ (function(module) {
3408
3409module.exports = {};
3410
3411
3412/***/ }),
3413/* 131 */
3414/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3415
3416var call = __webpack_require__(8);
3417var aCallable = __webpack_require__(32);
3418var anObject = __webpack_require__(48);
3419var tryToString = __webpack_require__(33);
3420var getIteratorMethod = __webpack_require__(132);
3421
3422var $TypeError = TypeError;
3423
3424module.exports = function (argument, usingIterator) {
3425 var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
3426 if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));
3427 throw $TypeError(tryToString(argument) + ' is not iterable');
3428};
3429
3430
3431/***/ }),
3432/* 132 */
3433/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3434
3435var classof = __webpack_require__(71);
3436var getMethod = __webpack_require__(31);
3437var isNullOrUndefined = __webpack_require__(18);
3438var Iterators = __webpack_require__(130);
3439var wellKnownSymbol = __webpack_require__(35);
3440
3441var ITERATOR = wellKnownSymbol('iterator');
3442
3443module.exports = function (it) {
3444 if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)
3445 || getMethod(it, '@@iterator')
3446 || Iterators[classof(it)];
3447};
3448
3449
3450/***/ }),
3451/* 133 */
3452/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3453
3454var call = __webpack_require__(8);
3455var anObject = __webpack_require__(48);
3456var getMethod = __webpack_require__(31);
3457
3458module.exports = function (iterator, kind, value) {
3459 var innerResult, innerError;
3460 anObject(iterator);
3461 try {
3462 innerResult = getMethod(iterator, 'return');
3463 if (!innerResult) {
3464 if (kind === 'throw') throw value;
3465 return value;
3466 }
3467 innerResult = call(innerResult, iterator);
3468 } catch (error) {
3469 innerError = true;
3470 innerResult = error;
3471 }
3472 if (kind === 'throw') throw value;
3473 if (innerError) throw innerResult;
3474 anObject(innerResult);
3475 return value;
3476};
3477
3478
3479/***/ }),
3480/* 134 */
3481/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3482
3483var $ = __webpack_require__(3);
3484var getBuiltIn = __webpack_require__(25);
3485var apply = __webpack_require__(95);
3486var fails = __webpack_require__(7);
3487var wrapErrorConstructorWithCause = __webpack_require__(113);
3488
3489var AGGREGATE_ERROR = 'AggregateError';
3490var $AggregateError = getBuiltIn(AGGREGATE_ERROR);
3491
3492var FORCED = !fails(function () {
3493 return $AggregateError([1]).errors[0] !== 1;
3494}) && fails(function () {
3495 return $AggregateError([1], AGGREGATE_ERROR, { cause: 7 }).cause !== 7;
3496});
3497
3498// https://github.com/tc39/proposal-error-cause
3499$({ global: true, constructor: true, arity: 2, forced: FORCED }, {
3500 AggregateError: wrapErrorConstructorWithCause(AGGREGATE_ERROR, function (init) {
3501 // eslint-disable-next-line no-unused-vars -- required for functions `.length`
3502 return function AggregateError(errors, message) { return apply(init, this, arguments); };
3503 }, FORCED, true)
3504});
3505
3506
3507/***/ }),
3508/* 135 */
3509/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3510
3511"use strict";
3512
3513var $ = __webpack_require__(3);
3514var toObject = __webpack_require__(41);
3515var lengthOfArrayLike = __webpack_require__(65);
3516var toIntegerOrInfinity = __webpack_require__(63);
3517var addToUnscopables = __webpack_require__(136);
3518
3519// `Array.prototype.at` method
3520// https://github.com/tc39/proposal-relative-indexing-method
3521$({ target: 'Array', proto: true }, {
3522 at: function at(index) {
3523 var O = toObject(this);
3524 var len = lengthOfArrayLike(O);
3525 var relativeIndex = toIntegerOrInfinity(index);
3526 var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
3527 return (k < 0 || k >= len) ? undefined : O[k];
3528 }
3529});
3530
3531addToUnscopables('at');
3532
3533
3534/***/ }),
3535/* 136 */
3536/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3537
3538var wellKnownSymbol = __webpack_require__(35);
3539var create = __webpack_require__(73);
3540var defineProperty = (__webpack_require__(46).f);
3541
3542var UNSCOPABLES = wellKnownSymbol('unscopables');
3543var ArrayPrototype = Array.prototype;
3544
3545// Array.prototype[@@unscopables]
3546// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3547if (ArrayPrototype[UNSCOPABLES] == undefined) {
3548 defineProperty(ArrayPrototype, UNSCOPABLES, {
3549 configurable: true,
3550 value: create(null)
3551 });
3552}
3553
3554// add a key to Array.prototype[@@unscopables]
3555module.exports = function (key) {
3556 ArrayPrototype[UNSCOPABLES][key] = true;
3557};
3558
3559
3560/***/ }),
3561/* 137 */
3562/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3563
3564"use strict";
3565
3566var $ = __webpack_require__(3);
3567var fails = __webpack_require__(7);
3568var isArray = __webpack_require__(89);
3569var isObject = __webpack_require__(21);
3570var toObject = __webpack_require__(41);
3571var lengthOfArrayLike = __webpack_require__(65);
3572var doesNotExceedSafeInteger = __webpack_require__(138);
3573var createProperty = __webpack_require__(79);
3574var arraySpeciesCreate = __webpack_require__(87);
3575var arrayMethodHasSpeciesSupport = __webpack_require__(139);
3576var wellKnownSymbol = __webpack_require__(35);
3577var V8_VERSION = __webpack_require__(29);
3578
3579var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
3580
3581// We can't use this feature detection in V8 since it causes
3582// deoptimization and serious performance degradation
3583// https://github.com/zloirock/core-js/issues/679
3584var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
3585 var array = [];
3586 array[IS_CONCAT_SPREADABLE] = false;
3587 return array.concat()[0] !== array;
3588});
3589
3590var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
3591
3592var isConcatSpreadable = function (O) {
3593 if (!isObject(O)) return false;
3594 var spreadable = O[IS_CONCAT_SPREADABLE];
3595 return spreadable !== undefined ? !!spreadable : isArray(O);
3596};
3597
3598var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
3599
3600// `Array.prototype.concat` method
3601// https://tc39.es/ecma262/#sec-array.prototype.concat
3602// with adding support of @@isConcatSpreadable and @@species
3603$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
3604 // eslint-disable-next-line no-unused-vars -- required for `.length`
3605 concat: function concat(arg) {
3606 var O = toObject(this);
3607 var A = arraySpeciesCreate(O, 0);
3608 var n = 0;
3609 var i, k, length, len, E;
3610 for (i = -1, length = arguments.length; i < length; i++) {
3611 E = i === -1 ? O : arguments[i];
3612 if (isConcatSpreadable(E)) {
3613 len = lengthOfArrayLike(E);
3614 doesNotExceedSafeInteger(n + len);
3615 for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
3616 } else {
3617 doesNotExceedSafeInteger(n + 1);
3618 createProperty(A, n++, E);
3619 }
3620 }
3621 A.length = n;
3622 return A;
3623 }
3624});
3625
3626
3627/***/ }),
3628/* 138 */
3629/***/ (function(module) {
3630
3631var $TypeError = TypeError;
3632var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
3633
3634module.exports = function (it) {
3635 if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
3636 return it;
3637};
3638
3639
3640/***/ }),
3641/* 139 */
3642/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3643
3644var fails = __webpack_require__(7);
3645var wellKnownSymbol = __webpack_require__(35);
3646var V8_VERSION = __webpack_require__(29);
3647
3648var SPECIES = wellKnownSymbol('species');
3649
3650module.exports = function (METHOD_NAME) {
3651 // We can't use this feature detection in V8 since it causes
3652 // deoptimization and serious performance degradation
3653 // https://github.com/zloirock/core-js/issues/677
3654 return V8_VERSION >= 51 || !fails(function () {
3655 var array = [];
3656 var constructor = array.constructor = {};
3657 constructor[SPECIES] = function () {
3658 return { foo: 1 };
3659 };
3660 return array[METHOD_NAME](Boolean).foo !== 1;
3661 });
3662};
3663
3664
3665/***/ }),
3666/* 140 */
3667/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3668
3669var $ = __webpack_require__(3);
3670var copyWithin = __webpack_require__(141);
3671var addToUnscopables = __webpack_require__(136);
3672
3673// `Array.prototype.copyWithin` method
3674// https://tc39.es/ecma262/#sec-array.prototype.copywithin
3675$({ target: 'Array', proto: true }, {
3676 copyWithin: copyWithin
3677});
3678
3679// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3680addToUnscopables('copyWithin');
3681
3682
3683/***/ }),
3684/* 141 */
3685/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3686
3687"use strict";
3688
3689var toObject = __webpack_require__(41);
3690var toAbsoluteIndex = __webpack_require__(62);
3691var lengthOfArrayLike = __webpack_require__(65);
3692var deletePropertyOrThrow = __webpack_require__(142);
3693
3694var min = Math.min;
3695
3696// `Array.prototype.copyWithin` method implementation
3697// https://tc39.es/ecma262/#sec-array.prototype.copywithin
3698// eslint-disable-next-line es/no-array-prototype-copywithin -- safe
3699module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
3700 var O = toObject(this);
3701 var len = lengthOfArrayLike(O);
3702 var to = toAbsoluteIndex(target, len);
3703 var from = toAbsoluteIndex(start, len);
3704 var end = arguments.length > 2 ? arguments[2] : undefined;
3705 var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
3706 var inc = 1;
3707 if (from < to && to < from + count) {
3708 inc = -1;
3709 from += count - 1;
3710 to += count - 1;
3711 }
3712 while (count-- > 0) {
3713 if (from in O) O[to] = O[from];
3714 else deletePropertyOrThrow(O, to);
3715 to += inc;
3716 from += inc;
3717 } return O;
3718};
3719
3720
3721/***/ }),
3722/* 142 */
3723/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3724
3725"use strict";
3726
3727var tryToString = __webpack_require__(33);
3728
3729var $TypeError = TypeError;
3730
3731module.exports = function (O, P) {
3732 if (!delete O[P]) throw $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
3733};
3734
3735
3736/***/ }),
3737/* 143 */
3738/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3739
3740"use strict";
3741
3742var $ = __webpack_require__(3);
3743var $every = (__webpack_require__(85).every);
3744var arrayMethodIsStrict = __webpack_require__(144);
3745
3746var STRICT_METHOD = arrayMethodIsStrict('every');
3747
3748// `Array.prototype.every` method
3749// https://tc39.es/ecma262/#sec-array.prototype.every
3750$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
3751 every: function every(callbackfn /* , thisArg */) {
3752 return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3753 }
3754});
3755
3756
3757/***/ }),
3758/* 144 */
3759/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3760
3761"use strict";
3762
3763var fails = __webpack_require__(7);
3764
3765module.exports = function (METHOD_NAME, argument) {
3766 var method = [][METHOD_NAME];
3767 return !!method && fails(function () {
3768 // eslint-disable-next-line no-useless-call -- required for testing
3769 method.call(null, argument || function () { return 1; }, 1);
3770 });
3771};
3772
3773
3774/***/ }),
3775/* 145 */
3776/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3777
3778var $ = __webpack_require__(3);
3779var fill = __webpack_require__(146);
3780var addToUnscopables = __webpack_require__(136);
3781
3782// `Array.prototype.fill` method
3783// https://tc39.es/ecma262/#sec-array.prototype.fill
3784$({ target: 'Array', proto: true }, {
3785 fill: fill
3786});
3787
3788// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3789addToUnscopables('fill');
3790
3791
3792/***/ }),
3793/* 146 */
3794/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3795
3796"use strict";
3797
3798var toObject = __webpack_require__(41);
3799var toAbsoluteIndex = __webpack_require__(62);
3800var lengthOfArrayLike = __webpack_require__(65);
3801
3802// `Array.prototype.fill` method implementation
3803// https://tc39.es/ecma262/#sec-array.prototype.fill
3804module.exports = function fill(value /* , start = 0, end = @length */) {
3805 var O = toObject(this);
3806 var length = lengthOfArrayLike(O);
3807 var argumentsLength = arguments.length;
3808 var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
3809 var end = argumentsLength > 2 ? arguments[2] : undefined;
3810 var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
3811 while (endPos > index) O[index++] = value;
3812 return O;
3813};
3814
3815
3816/***/ }),
3817/* 147 */
3818/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3819
3820"use strict";
3821
3822var $ = __webpack_require__(3);
3823var $filter = (__webpack_require__(85).filter);
3824var arrayMethodHasSpeciesSupport = __webpack_require__(139);
3825
3826var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
3827
3828// `Array.prototype.filter` method
3829// https://tc39.es/ecma262/#sec-array.prototype.filter
3830// with adding support of @@species
3831$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
3832 filter: function filter(callbackfn /* , thisArg */) {
3833 return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3834 }
3835});
3836
3837
3838/***/ }),
3839/* 148 */
3840/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3841
3842"use strict";
3843
3844var $ = __webpack_require__(3);
3845var $find = (__webpack_require__(85).find);
3846var addToUnscopables = __webpack_require__(136);
3847
3848var FIND = 'find';
3849var SKIPS_HOLES = true;
3850
3851// Shouldn't skip holes
3852if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
3853
3854// `Array.prototype.find` method
3855// https://tc39.es/ecma262/#sec-array.prototype.find
3856$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
3857 find: function find(callbackfn /* , that = undefined */) {
3858 return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3859 }
3860});
3861
3862// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3863addToUnscopables(FIND);
3864
3865
3866/***/ }),
3867/* 149 */
3868/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3869
3870"use strict";
3871
3872var $ = __webpack_require__(3);
3873var $findIndex = (__webpack_require__(85).findIndex);
3874var addToUnscopables = __webpack_require__(136);
3875
3876var FIND_INDEX = 'findIndex';
3877var SKIPS_HOLES = true;
3878
3879// Shouldn't skip holes
3880if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });
3881
3882// `Array.prototype.findIndex` method
3883// https://tc39.es/ecma262/#sec-array.prototype.findindex
3884$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
3885 findIndex: function findIndex(callbackfn /* , that = undefined */) {
3886 return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3887 }
3888});
3889
3890// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3891addToUnscopables(FIND_INDEX);
3892
3893
3894/***/ }),
3895/* 150 */
3896/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3897
3898"use strict";
3899
3900var $ = __webpack_require__(3);
3901var $findLast = (__webpack_require__(151).findLast);
3902var addToUnscopables = __webpack_require__(136);
3903
3904// `Array.prototype.findLast` method
3905// https://github.com/tc39/proposal-array-find-from-last
3906$({ target: 'Array', proto: true }, {
3907 findLast: function findLast(callbackfn /* , that = undefined */) {
3908 return $findLast(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3909 }
3910});
3911
3912addToUnscopables('findLast');
3913
3914
3915/***/ }),
3916/* 151 */
3917/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3918
3919var bind = __webpack_require__(86);
3920var IndexedObject = __webpack_require__(13);
3921var toObject = __webpack_require__(41);
3922var lengthOfArrayLike = __webpack_require__(65);
3923
3924// `Array.prototype.{ findLast, findLastIndex }` methods implementation
3925var createMethod = function (TYPE) {
3926 var IS_FIND_LAST_INDEX = TYPE == 1;
3927 return function ($this, callbackfn, that) {
3928 var O = toObject($this);
3929 var self = IndexedObject(O);
3930 var boundFunction = bind(callbackfn, that);
3931 var index = lengthOfArrayLike(self);
3932 var value, result;
3933 while (index-- > 0) {
3934 value = self[index];
3935 result = boundFunction(value, index, O);
3936 if (result) switch (TYPE) {
3937 case 0: return value; // findLast
3938 case 1: return index; // findLastIndex
3939 }
3940 }
3941 return IS_FIND_LAST_INDEX ? -1 : undefined;
3942 };
3943};
3944
3945module.exports = {
3946 // `Array.prototype.findLast` method
3947 // https://github.com/tc39/proposal-array-find-from-last
3948 findLast: createMethod(0),
3949 // `Array.prototype.findLastIndex` method
3950 // https://github.com/tc39/proposal-array-find-from-last
3951 findLastIndex: createMethod(1)
3952};
3953
3954
3955/***/ }),
3956/* 152 */
3957/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3958
3959"use strict";
3960
3961var $ = __webpack_require__(3);
3962var $findLastIndex = (__webpack_require__(151).findLastIndex);
3963var addToUnscopables = __webpack_require__(136);
3964
3965// `Array.prototype.findLastIndex` method
3966// https://github.com/tc39/proposal-array-find-from-last
3967$({ target: 'Array', proto: true }, {
3968 findLastIndex: function findLastIndex(callbackfn /* , that = undefined */) {
3969 return $findLastIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3970 }
3971});
3972
3973addToUnscopables('findLastIndex');
3974
3975
3976/***/ }),
3977/* 153 */
3978/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3979
3980"use strict";
3981
3982var $ = __webpack_require__(3);
3983var flattenIntoArray = __webpack_require__(154);
3984var toObject = __webpack_require__(41);
3985var lengthOfArrayLike = __webpack_require__(65);
3986var toIntegerOrInfinity = __webpack_require__(63);
3987var arraySpeciesCreate = __webpack_require__(87);
3988
3989// `Array.prototype.flat` method
3990// https://tc39.es/ecma262/#sec-array.prototype.flat
3991$({ target: 'Array', proto: true }, {
3992 flat: function flat(/* depthArg = 1 */) {
3993 var depthArg = arguments.length ? arguments[0] : undefined;
3994 var O = toObject(this);
3995 var sourceLen = lengthOfArrayLike(O);
3996 var A = arraySpeciesCreate(O, 0);
3997 A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
3998 return A;
3999 }
4000});
4001
4002
4003/***/ }),
4004/* 154 */
4005/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4006
4007"use strict";
4008
4009var isArray = __webpack_require__(89);
4010var lengthOfArrayLike = __webpack_require__(65);
4011var doesNotExceedSafeInteger = __webpack_require__(138);
4012var bind = __webpack_require__(86);
4013
4014// `FlattenIntoArray` abstract operation
4015// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
4016var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
4017 var targetIndex = start;
4018 var sourceIndex = 0;
4019 var mapFn = mapper ? bind(mapper, thisArg) : false;
4020 var element, elementLen;
4021
4022 while (sourceIndex < sourceLen) {
4023 if (sourceIndex in source) {
4024 element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
4025
4026 if (depth > 0 && isArray(element)) {
4027 elementLen = lengthOfArrayLike(element);
4028 targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;
4029 } else {
4030 doesNotExceedSafeInteger(targetIndex + 1);
4031 target[targetIndex] = element;
4032 }
4033
4034 targetIndex++;
4035 }
4036 sourceIndex++;
4037 }
4038 return targetIndex;
4039};
4040
4041module.exports = flattenIntoArray;
4042
4043
4044/***/ }),
4045/* 155 */
4046/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4047
4048"use strict";
4049
4050var $ = __webpack_require__(3);
4051var flattenIntoArray = __webpack_require__(154);
4052var aCallable = __webpack_require__(32);
4053var toObject = __webpack_require__(41);
4054var lengthOfArrayLike = __webpack_require__(65);
4055var arraySpeciesCreate = __webpack_require__(87);
4056
4057// `Array.prototype.flatMap` method
4058// https://tc39.es/ecma262/#sec-array.prototype.flatmap
4059$({ target: 'Array', proto: true }, {
4060 flatMap: function flatMap(callbackfn /* , thisArg */) {
4061 var O = toObject(this);
4062 var sourceLen = lengthOfArrayLike(O);
4063 var A;
4064 aCallable(callbackfn);
4065 A = arraySpeciesCreate(O, 0);
4066 A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
4067 return A;
4068 }
4069});
4070
4071
4072/***/ }),
4073/* 156 */
4074/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4075
4076"use strict";
4077
4078var $ = __webpack_require__(3);
4079var forEach = __webpack_require__(157);
4080
4081// `Array.prototype.forEach` method
4082// https://tc39.es/ecma262/#sec-array.prototype.foreach
4083// eslint-disable-next-line es/no-array-prototype-foreach -- safe
4084$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
4085 forEach: forEach
4086});
4087
4088
4089/***/ }),
4090/* 157 */
4091/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4092
4093"use strict";
4094
4095var $forEach = (__webpack_require__(85).forEach);
4096var arrayMethodIsStrict = __webpack_require__(144);
4097
4098var STRICT_METHOD = arrayMethodIsStrict('forEach');
4099
4100// `Array.prototype.forEach` method implementation
4101// https://tc39.es/ecma262/#sec-array.prototype.foreach
4102module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
4103 return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
4104// eslint-disable-next-line es/no-array-prototype-foreach -- safe
4105} : [].forEach;
4106
4107
4108/***/ }),
4109/* 158 */
4110/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4111
4112var $ = __webpack_require__(3);
4113var from = __webpack_require__(159);
4114var checkCorrectnessOfIteration = __webpack_require__(161);
4115
4116var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
4117 // eslint-disable-next-line es/no-array-from -- required for testing
4118 Array.from(iterable);
4119});
4120
4121// `Array.from` method
4122// https://tc39.es/ecma262/#sec-array.from
4123$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
4124 from: from
4125});
4126
4127
4128/***/ }),
4129/* 159 */
4130/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4131
4132"use strict";
4133
4134var bind = __webpack_require__(86);
4135var call = __webpack_require__(8);
4136var toObject = __webpack_require__(41);
4137var callWithSafeIterationClosing = __webpack_require__(160);
4138var isArrayIteratorMethod = __webpack_require__(129);
4139var isConstructor = __webpack_require__(90);
4140var lengthOfArrayLike = __webpack_require__(65);
4141var createProperty = __webpack_require__(79);
4142var getIterator = __webpack_require__(131);
4143var getIteratorMethod = __webpack_require__(132);
4144
4145var $Array = Array;
4146
4147// `Array.from` method implementation
4148// https://tc39.es/ecma262/#sec-array.from
4149module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
4150 var O = toObject(arrayLike);
4151 var IS_CONSTRUCTOR = isConstructor(this);
4152 var argumentsLength = arguments.length;
4153 var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
4154 var mapping = mapfn !== undefined;
4155 if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
4156 var iteratorMethod = getIteratorMethod(O);
4157 var index = 0;
4158 var length, result, step, iterator, next, value;
4159 // if the target is not iterable or it's an array with the default iterator - use a simple case
4160 if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {
4161 iterator = getIterator(O, iteratorMethod);
4162 next = iterator.next;
4163 result = IS_CONSTRUCTOR ? new this() : [];
4164 for (;!(step = call(next, iterator)).done; index++) {
4165 value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
4166 createProperty(result, index, value);
4167 }
4168 } else {
4169 length = lengthOfArrayLike(O);
4170 result = IS_CONSTRUCTOR ? new this(length) : $Array(length);
4171 for (;length > index; index++) {
4172 value = mapping ? mapfn(O[index], index) : O[index];
4173 createProperty(result, index, value);
4174 }
4175 }
4176 result.length = index;
4177 return result;
4178};
4179
4180
4181/***/ }),
4182/* 160 */
4183/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4184
4185var anObject = __webpack_require__(48);
4186var iteratorClose = __webpack_require__(133);
4187
4188// call something on iterator step with safe closing on error
4189module.exports = function (iterator, fn, value, ENTRIES) {
4190 try {
4191 return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
4192 } catch (error) {
4193 iteratorClose(iterator, 'throw', error);
4194 }
4195};
4196
4197
4198/***/ }),
4199/* 161 */
4200/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4201
4202var wellKnownSymbol = __webpack_require__(35);
4203
4204var ITERATOR = wellKnownSymbol('iterator');
4205var SAFE_CLOSING = false;
4206
4207try {
4208 var called = 0;
4209 var iteratorWithReturn = {
4210 next: function () {
4211 return { done: !!called++ };
4212 },
4213 'return': function () {
4214 SAFE_CLOSING = true;
4215 }
4216 };
4217 iteratorWithReturn[ITERATOR] = function () {
4218 return this;
4219 };
4220 // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
4221 Array.from(iteratorWithReturn, function () { throw 2; });
4222} catch (error) { /* empty */ }
4223
4224module.exports = function (exec, SKIP_CLOSING) {
4225 if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
4226 var ITERATION_SUPPORT = false;
4227 try {
4228 var object = {};
4229 object[ITERATOR] = function () {
4230 return {
4231 next: function () {
4232 return { done: ITERATION_SUPPORT = true };
4233 }
4234 };
4235 };
4236 exec(object);
4237 } catch (error) { /* empty */ }
4238 return ITERATION_SUPPORT;
4239};
4240
4241
4242/***/ }),
4243/* 162 */
4244/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4245
4246"use strict";
4247
4248var $ = __webpack_require__(3);
4249var $includes = (__webpack_require__(61).includes);
4250var fails = __webpack_require__(7);
4251var addToUnscopables = __webpack_require__(136);
4252
4253// FF99+ bug
4254var BROKEN_ON_SPARSE = fails(function () {
4255 return !Array(1).includes();
4256});
4257
4258// `Array.prototype.includes` method
4259// https://tc39.es/ecma262/#sec-array.prototype.includes
4260$({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
4261 includes: function includes(el /* , fromIndex = 0 */) {
4262 return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
4263 }
4264});
4265
4266// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
4267addToUnscopables('includes');
4268
4269
4270/***/ }),
4271/* 163 */
4272/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4273
4274"use strict";
4275
4276/* eslint-disable es/no-array-prototype-indexof -- required for testing */
4277var $ = __webpack_require__(3);
4278var uncurryThis = __webpack_require__(14);
4279var $indexOf = (__webpack_require__(61).indexOf);
4280var arrayMethodIsStrict = __webpack_require__(144);
4281
4282var nativeIndexOf = uncurryThis([].indexOf);
4283
4284var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
4285var STRICT_METHOD = arrayMethodIsStrict('indexOf');
4286
4287// `Array.prototype.indexOf` method
4288// https://tc39.es/ecma262/#sec-array.prototype.indexof
4289$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
4290 indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
4291 var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
4292 return NEGATIVE_ZERO
4293 // convert -0 to +0
4294 ? nativeIndexOf(this, searchElement, fromIndex) || 0
4295 : $indexOf(this, searchElement, fromIndex);
4296 }
4297});
4298
4299
4300/***/ }),
4301/* 164 */
4302/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4303
4304var $ = __webpack_require__(3);
4305var isArray = __webpack_require__(89);
4306
4307// `Array.isArray` method
4308// https://tc39.es/ecma262/#sec-array.isarray
4309$({ target: 'Array', stat: true }, {
4310 isArray: isArray
4311});
4312
4313
4314/***/ }),
4315/* 165 */
4316/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4317
4318"use strict";
4319
4320var toIndexedObject = __webpack_require__(12);
4321var addToUnscopables = __webpack_require__(136);
4322var Iterators = __webpack_require__(130);
4323var InternalStateModule = __webpack_require__(53);
4324var defineProperty = (__webpack_require__(46).f);
4325var defineIterator = __webpack_require__(166);
4326var createIterResultObject = __webpack_require__(169);
4327var IS_PURE = __webpack_require__(37);
4328var DESCRIPTORS = __webpack_require__(6);
4329
4330var ARRAY_ITERATOR = 'Array Iterator';
4331var setInternalState = InternalStateModule.set;
4332var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
4333
4334// `Array.prototype.entries` method
4335// https://tc39.es/ecma262/#sec-array.prototype.entries
4336// `Array.prototype.keys` method
4337// https://tc39.es/ecma262/#sec-array.prototype.keys
4338// `Array.prototype.values` method
4339// https://tc39.es/ecma262/#sec-array.prototype.values
4340// `Array.prototype[@@iterator]` method
4341// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
4342// `CreateArrayIterator` internal method
4343// https://tc39.es/ecma262/#sec-createarrayiterator
4344module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
4345 setInternalState(this, {
4346 type: ARRAY_ITERATOR,
4347 target: toIndexedObject(iterated), // target
4348 index: 0, // next index
4349 kind: kind // kind
4350 });
4351// `%ArrayIteratorPrototype%.next` method
4352// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
4353}, function () {
4354 var state = getInternalState(this);
4355 var target = state.target;
4356 var kind = state.kind;
4357 var index = state.index++;
4358 if (!target || index >= target.length) {
4359 state.target = undefined;
4360 return createIterResultObject(undefined, true);
4361 }
4362 if (kind == 'keys') return createIterResultObject(index, false);
4363 if (kind == 'values') return createIterResultObject(target[index], false);
4364 return createIterResultObject([index, target[index]], false);
4365}, 'values');
4366
4367// argumentsList[@@iterator] is %ArrayProto_values%
4368// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
4369// https://tc39.es/ecma262/#sec-createmappedargumentsobject
4370var values = Iterators.Arguments = Iterators.Array;
4371
4372// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
4373addToUnscopables('keys');
4374addToUnscopables('values');
4375addToUnscopables('entries');
4376
4377// V8 ~ Chrome 45- bug
4378if (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {
4379 defineProperty(values, 'name', { value: 'values' });
4380} catch (error) { /* empty */ }
4381
4382
4383/***/ }),
4384/* 166 */
4385/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4386
4387"use strict";
4388
4389var $ = __webpack_require__(3);
4390var call = __webpack_require__(8);
4391var IS_PURE = __webpack_require__(37);
4392var FunctionName = __webpack_require__(51);
4393var isCallable = __webpack_require__(22);
4394var createIteratorConstructor = __webpack_require__(167);
4395var getPrototypeOf = __webpack_require__(126);
4396var setPrototypeOf = __webpack_require__(114);
4397var setToStringTag = __webpack_require__(84);
4398var createNonEnumerableProperty = __webpack_require__(45);
4399var defineBuiltIn = __webpack_require__(49);
4400var wellKnownSymbol = __webpack_require__(35);
4401var Iterators = __webpack_require__(130);
4402var IteratorsCore = __webpack_require__(168);
4403
4404var PROPER_FUNCTION_NAME = FunctionName.PROPER;
4405var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
4406var IteratorPrototype = IteratorsCore.IteratorPrototype;
4407var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
4408var ITERATOR = wellKnownSymbol('iterator');
4409var KEYS = 'keys';
4410var VALUES = 'values';
4411var ENTRIES = 'entries';
4412
4413var returnThis = function () { return this; };
4414
4415module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
4416 createIteratorConstructor(IteratorConstructor, NAME, next);
4417
4418 var getIterationMethod = function (KIND) {
4419 if (KIND === DEFAULT && defaultIterator) return defaultIterator;
4420 if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
4421 switch (KIND) {
4422 case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
4423 case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
4424 case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
4425 } return function () { return new IteratorConstructor(this); };
4426 };
4427
4428 var TO_STRING_TAG = NAME + ' Iterator';
4429 var INCORRECT_VALUES_NAME = false;
4430 var IterablePrototype = Iterable.prototype;
4431 var nativeIterator = IterablePrototype[ITERATOR]
4432 || IterablePrototype['@@iterator']
4433 || DEFAULT && IterablePrototype[DEFAULT];
4434 var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
4435 var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
4436 var CurrentIteratorPrototype, methods, KEY;
4437
4438 // fix native
4439 if (anyNativeIterator) {
4440 CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
4441 if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
4442 if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
4443 if (setPrototypeOf) {
4444 setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
4445 } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {
4446 defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);
4447 }
4448 }
4449 // Set @@toStringTag to native iterators
4450 setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
4451 if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
4452 }
4453 }
4454
4455 // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
4456 if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
4457 if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {
4458 createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
4459 } else {
4460 INCORRECT_VALUES_NAME = true;
4461 defaultIterator = function values() { return call(nativeIterator, this); };
4462 }
4463 }
4464
4465 // export additional methods
4466 if (DEFAULT) {
4467 methods = {
4468 values: getIterationMethod(VALUES),
4469 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
4470 entries: getIterationMethod(ENTRIES)
4471 };
4472 if (FORCED) for (KEY in methods) {
4473 if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
4474 defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
4475 }
4476 } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
4477 }
4478
4479 // define iterator
4480 if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
4481 defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });
4482 }
4483 Iterators[NAME] = defaultIterator;
4484
4485 return methods;
4486};
4487
4488
4489/***/ }),
4490/* 167 */
4491/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4492
4493"use strict";
4494
4495var IteratorPrototype = (__webpack_require__(168).IteratorPrototype);
4496var create = __webpack_require__(73);
4497var createPropertyDescriptor = __webpack_require__(11);
4498var setToStringTag = __webpack_require__(84);
4499var Iterators = __webpack_require__(130);
4500
4501var returnThis = function () { return this; };
4502
4503module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
4504 var TO_STRING_TAG = NAME + ' Iterator';
4505 IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
4506 setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
4507 Iterators[TO_STRING_TAG] = returnThis;
4508 return IteratorConstructor;
4509};
4510
4511
4512/***/ }),
4513/* 168 */
4514/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4515
4516"use strict";
4517
4518var fails = __webpack_require__(7);
4519var isCallable = __webpack_require__(22);
4520var isObject = __webpack_require__(21);
4521var create = __webpack_require__(73);
4522var getPrototypeOf = __webpack_require__(126);
4523var defineBuiltIn = __webpack_require__(49);
4524var wellKnownSymbol = __webpack_require__(35);
4525var IS_PURE = __webpack_require__(37);
4526
4527var ITERATOR = wellKnownSymbol('iterator');
4528var BUGGY_SAFARI_ITERATORS = false;
4529
4530// `%IteratorPrototype%` object
4531// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
4532var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
4533
4534/* eslint-disable es/no-array-prototype-keys -- safe */
4535if ([].keys) {
4536 arrayIterator = [].keys();
4537 // Safari 8 has buggy iterators w/o `next`
4538 if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
4539 else {
4540 PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
4541 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
4542 }
4543}
4544
4545var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {
4546 var test = {};
4547 // FF44- legacy iterators case
4548 return IteratorPrototype[ITERATOR].call(test) !== test;
4549});
4550
4551if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
4552else if (IS_PURE) IteratorPrototype = create(IteratorPrototype);
4553
4554// `%IteratorPrototype%[@@iterator]()` method
4555// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
4556if (!isCallable(IteratorPrototype[ITERATOR])) {
4557 defineBuiltIn(IteratorPrototype, ITERATOR, function () {
4558 return this;
4559 });
4560}
4561
4562module.exports = {
4563 IteratorPrototype: IteratorPrototype,
4564 BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
4565};
4566
4567
4568/***/ }),
4569/* 169 */
4570/***/ (function(module) {
4571
4572// `CreateIterResultObject` abstract operation
4573// https://tc39.es/ecma262/#sec-createiterresultobject
4574module.exports = function (value, done) {
4575 return { value: value, done: done };
4576};
4577
4578
4579/***/ }),
4580/* 170 */
4581/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4582
4583"use strict";
4584
4585var $ = __webpack_require__(3);
4586var uncurryThis = __webpack_require__(14);
4587var IndexedObject = __webpack_require__(13);
4588var toIndexedObject = __webpack_require__(12);
4589var arrayMethodIsStrict = __webpack_require__(144);
4590
4591var nativeJoin = uncurryThis([].join);
4592
4593var ES3_STRINGS = IndexedObject != Object;
4594var STRICT_METHOD = arrayMethodIsStrict('join', ',');
4595
4596// `Array.prototype.join` method
4597// https://tc39.es/ecma262/#sec-array.prototype.join
4598$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
4599 join: function join(separator) {
4600 return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
4601 }
4602});
4603
4604
4605/***/ }),
4606/* 171 */
4607/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4608
4609var $ = __webpack_require__(3);
4610var lastIndexOf = __webpack_require__(172);
4611
4612// `Array.prototype.lastIndexOf` method
4613// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
4614// eslint-disable-next-line es/no-array-prototype-lastindexof -- required for testing
4615$({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {
4616 lastIndexOf: lastIndexOf
4617});
4618
4619
4620/***/ }),
4621/* 172 */
4622/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4623
4624"use strict";
4625
4626/* eslint-disable es/no-array-prototype-lastindexof -- safe */
4627var apply = __webpack_require__(95);
4628var toIndexedObject = __webpack_require__(12);
4629var toIntegerOrInfinity = __webpack_require__(63);
4630var lengthOfArrayLike = __webpack_require__(65);
4631var arrayMethodIsStrict = __webpack_require__(144);
4632
4633var min = Math.min;
4634var $lastIndexOf = [].lastIndexOf;
4635var NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
4636var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
4637var FORCED = NEGATIVE_ZERO || !STRICT_METHOD;
4638
4639// `Array.prototype.lastIndexOf` method implementation
4640// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
4641module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
4642 // convert -0 to +0
4643 if (NEGATIVE_ZERO) return apply($lastIndexOf, this, arguments) || 0;
4644 var O = toIndexedObject(this);
4645 var length = lengthOfArrayLike(O);
4646 var index = length - 1;
4647 if (arguments.length > 1) index = min(index, toIntegerOrInfinity(arguments[1]));
4648 if (index < 0) index = length + index;
4649 for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
4650 return -1;
4651} : $lastIndexOf;
4652
4653
4654/***/ }),
4655/* 173 */
4656/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4657
4658"use strict";
4659
4660var $ = __webpack_require__(3);
4661var $map = (__webpack_require__(85).map);
4662var arrayMethodHasSpeciesSupport = __webpack_require__(139);
4663
4664var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
4665
4666// `Array.prototype.map` method
4667// https://tc39.es/ecma262/#sec-array.prototype.map
4668// with adding support of @@species
4669$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
4670 map: function map(callbackfn /* , thisArg */) {
4671 return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
4672 }
4673});
4674
4675
4676/***/ }),
4677/* 174 */
4678/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4679
4680"use strict";
4681
4682var $ = __webpack_require__(3);
4683var fails = __webpack_require__(7);
4684var isConstructor = __webpack_require__(90);
4685var createProperty = __webpack_require__(79);
4686
4687var $Array = Array;
4688
4689var ISNT_GENERIC = fails(function () {
4690 function F() { /* empty */ }
4691 // eslint-disable-next-line es/no-array-of -- safe
4692 return !($Array.of.call(F) instanceof F);
4693});
4694
4695// `Array.of` method
4696// https://tc39.es/ecma262/#sec-array.of
4697// WebKit Array.of isn't generic
4698$({ target: 'Array', stat: true, forced: ISNT_GENERIC }, {
4699 of: function of(/* ...args */) {
4700 var index = 0;
4701 var argumentsLength = arguments.length;
4702 var result = new (isConstructor(this) ? this : $Array)(argumentsLength);
4703 while (argumentsLength > index) createProperty(result, index, arguments[index++]);
4704 result.length = argumentsLength;
4705 return result;
4706 }
4707});
4708
4709
4710/***/ }),
4711/* 175 */
4712/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4713
4714"use strict";
4715
4716var $ = __webpack_require__(3);
4717var toObject = __webpack_require__(41);
4718var lengthOfArrayLike = __webpack_require__(65);
4719var setArrayLength = __webpack_require__(176);
4720var doesNotExceedSafeInteger = __webpack_require__(138);
4721var fails = __webpack_require__(7);
4722
4723var INCORRECT_TO_LENGTH = fails(function () {
4724 return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
4725});
4726
4727// V8 and Safari <= 15.4, FF < 23 throws InternalError
4728// https://bugs.chromium.org/p/v8/issues/detail?id=12681
4729var SILENT_ON_NON_WRITABLE_LENGTH = !function () {
4730 try {
4731 // eslint-disable-next-line es/no-object-defineproperty -- safe
4732 Object.defineProperty([], 'length', { writable: false }).push();
4733 } catch (error) {
4734 return error instanceof TypeError;
4735 }
4736}();
4737
4738// `Array.prototype.push` method
4739// https://tc39.es/ecma262/#sec-array.prototype.push
4740$({ target: 'Array', proto: true, arity: 1, forced: INCORRECT_TO_LENGTH || SILENT_ON_NON_WRITABLE_LENGTH }, {
4741 // eslint-disable-next-line no-unused-vars -- required for `.length`
4742 push: function push(item) {
4743 var O = toObject(this);
4744 var len = lengthOfArrayLike(O);
4745 var argCount = arguments.length;
4746 doesNotExceedSafeInteger(len + argCount);
4747 for (var i = 0; i < argCount; i++) {
4748 O[len] = arguments[i];
4749 len++;
4750 }
4751 setArrayLength(O, len);
4752 return len;
4753 }
4754});
4755
4756
4757/***/ }),
4758/* 176 */
4759/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4760
4761"use strict";
4762
4763var DESCRIPTORS = __webpack_require__(6);
4764var isArray = __webpack_require__(89);
4765
4766var $TypeError = TypeError;
4767// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
4768var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
4769
4770// Safari < 13 does not throw an error in this case
4771var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
4772 // makes no sense without proper strict mode support
4773 if (this !== undefined) return true;
4774 try {
4775 // eslint-disable-next-line es/no-object-defineproperty -- safe
4776 Object.defineProperty([], 'length', { writable: false }).length = 1;
4777 } catch (error) {
4778 return error instanceof TypeError;
4779 }
4780}();
4781
4782module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
4783 if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
4784 throw $TypeError('Cannot set read only .length');
4785 } return O.length = length;
4786} : function (O, length) {
4787 return O.length = length;
4788};
4789
4790
4791/***/ }),
4792/* 177 */
4793/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4794
4795"use strict";
4796
4797var $ = __webpack_require__(3);
4798var $reduce = (__webpack_require__(178).left);
4799var arrayMethodIsStrict = __webpack_require__(144);
4800var CHROME_VERSION = __webpack_require__(29);
4801var IS_NODE = __webpack_require__(179);
4802
4803var STRICT_METHOD = arrayMethodIsStrict('reduce');
4804// Chrome 80-82 has a critical bug
4805// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
4806var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
4807
4808// `Array.prototype.reduce` method
4809// https://tc39.es/ecma262/#sec-array.prototype.reduce
4810$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
4811 reduce: function reduce(callbackfn /* , initialValue */) {
4812 var length = arguments.length;
4813 return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
4814 }
4815});
4816
4817
4818/***/ }),
4819/* 178 */
4820/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4821
4822var aCallable = __webpack_require__(32);
4823var toObject = __webpack_require__(41);
4824var IndexedObject = __webpack_require__(13);
4825var lengthOfArrayLike = __webpack_require__(65);
4826
4827var $TypeError = TypeError;
4828
4829// `Array.prototype.{ reduce, reduceRight }` methods implementation
4830var createMethod = function (IS_RIGHT) {
4831 return function (that, callbackfn, argumentsLength, memo) {
4832 aCallable(callbackfn);
4833 var O = toObject(that);
4834 var self = IndexedObject(O);
4835 var length = lengthOfArrayLike(O);
4836 var index = IS_RIGHT ? length - 1 : 0;
4837 var i = IS_RIGHT ? -1 : 1;
4838 if (argumentsLength < 2) while (true) {
4839 if (index in self) {
4840 memo = self[index];
4841 index += i;
4842 break;
4843 }
4844 index += i;
4845 if (IS_RIGHT ? index < 0 : length <= index) {
4846 throw $TypeError('Reduce of empty array with no initial value');
4847 }
4848 }
4849 for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
4850 memo = callbackfn(memo, self[index], index, O);
4851 }
4852 return memo;
4853 };
4854};
4855
4856module.exports = {
4857 // `Array.prototype.reduce` method
4858 // https://tc39.es/ecma262/#sec-array.prototype.reduce
4859 left: createMethod(false),
4860 // `Array.prototype.reduceRight` method
4861 // https://tc39.es/ecma262/#sec-array.prototype.reduceright
4862 right: createMethod(true)
4863};
4864
4865
4866/***/ }),
4867/* 179 */
4868/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4869
4870var classof = __webpack_require__(15);
4871var global = __webpack_require__(4);
4872
4873module.exports = classof(global.process) == 'process';
4874
4875
4876/***/ }),
4877/* 180 */
4878/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4879
4880"use strict";
4881
4882var $ = __webpack_require__(3);
4883var $reduceRight = (__webpack_require__(178).right);
4884var arrayMethodIsStrict = __webpack_require__(144);
4885var CHROME_VERSION = __webpack_require__(29);
4886var IS_NODE = __webpack_require__(179);
4887
4888var STRICT_METHOD = arrayMethodIsStrict('reduceRight');
4889// Chrome 80-82 has a critical bug
4890// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
4891var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
4892
4893// `Array.prototype.reduceRight` method
4894// https://tc39.es/ecma262/#sec-array.prototype.reduceright
4895$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
4896 reduceRight: function reduceRight(callbackfn /* , initialValue */) {
4897 return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
4898 }
4899});
4900
4901
4902/***/ }),
4903/* 181 */
4904/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4905
4906"use strict";
4907
4908var $ = __webpack_require__(3);
4909var uncurryThis = __webpack_require__(14);
4910var isArray = __webpack_require__(89);
4911
4912var nativeReverse = uncurryThis([].reverse);
4913var test = [1, 2];
4914
4915// `Array.prototype.reverse` method
4916// https://tc39.es/ecma262/#sec-array.prototype.reverse
4917// fix for Safari 12.0 bug
4918// https://bugs.webkit.org/show_bug.cgi?id=188794
4919$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
4920 reverse: function reverse() {
4921 // eslint-disable-next-line no-self-assign -- dirty hack
4922 if (isArray(this)) this.length = this.length;
4923 return nativeReverse(this);
4924 }
4925});
4926
4927
4928/***/ }),
4929/* 182 */
4930/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4931
4932"use strict";
4933
4934var $ = __webpack_require__(3);
4935var isArray = __webpack_require__(89);
4936var isConstructor = __webpack_require__(90);
4937var isObject = __webpack_require__(21);
4938var toAbsoluteIndex = __webpack_require__(62);
4939var lengthOfArrayLike = __webpack_require__(65);
4940var toIndexedObject = __webpack_require__(12);
4941var createProperty = __webpack_require__(79);
4942var wellKnownSymbol = __webpack_require__(35);
4943var arrayMethodHasSpeciesSupport = __webpack_require__(139);
4944var nativeSlice = __webpack_require__(96);
4945
4946var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
4947
4948var SPECIES = wellKnownSymbol('species');
4949var $Array = Array;
4950var max = Math.max;
4951
4952// `Array.prototype.slice` method
4953// https://tc39.es/ecma262/#sec-array.prototype.slice
4954// fallback for not array-like ES3 strings and DOM objects
4955$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
4956 slice: function slice(start, end) {
4957 var O = toIndexedObject(this);
4958 var length = lengthOfArrayLike(O);
4959 var k = toAbsoluteIndex(start, length);
4960 var fin = toAbsoluteIndex(end === undefined ? length : end, length);
4961 // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
4962 var Constructor, result, n;
4963 if (isArray(O)) {
4964 Constructor = O.constructor;
4965 // cross-realm fallback
4966 if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) {
4967 Constructor = undefined;
4968 } else if (isObject(Constructor)) {
4969 Constructor = Constructor[SPECIES];
4970 if (Constructor === null) Constructor = undefined;
4971 }
4972 if (Constructor === $Array || Constructor === undefined) {
4973 return nativeSlice(O, k, fin);
4974 }
4975 }
4976 result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0));
4977 for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
4978 result.length = n;
4979 return result;
4980 }
4981});
4982
4983
4984/***/ }),
4985/* 183 */
4986/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4987
4988"use strict";
4989
4990var $ = __webpack_require__(3);
4991var $some = (__webpack_require__(85).some);
4992var arrayMethodIsStrict = __webpack_require__(144);
4993
4994var STRICT_METHOD = arrayMethodIsStrict('some');
4995
4996// `Array.prototype.some` method
4997// https://tc39.es/ecma262/#sec-array.prototype.some
4998$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
4999 some: function some(callbackfn /* , thisArg */) {
5000 return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
5001 }
5002});
5003
5004
5005/***/ }),
5006/* 184 */
5007/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
5008
5009"use strict";
5010
5011var $ = __webpack_require__(3);
5012var uncurryThis = __webpack_require__(14);
5013var aCallable = __webpack_require__(32);
5014var toObject = __webpack_require__(41);
5015var lengthOfArrayLike = __webpack_require__(65);
5016var deletePropertyOrThrow = __webpack_require__(142);
5017var toString = __webpack_require__(70);
5018var fails = __webpack_require__(7);
5019var internalSort = __webpack_require__(185);
5020var arrayMethodIsStrict = __webpack_require__(144);
5021var FF = __webpack_require__(186);
5022var IE_OR_EDGE = __webpack_require__(187);
5023var V8 = __webpack_require__(29);
5024var WEBKIT = __webpack_require__(188);
5025
5026var test = [];
5027var nativeSort = uncurryThis(test.sort);
5028var push = uncurryThis(test.push);
5029
5030// IE8-
5031var FAILS_ON_UNDEFINED = fails(function () {
5032 test.sort(undefined);
5033});
5034// V8 bug
5035var FAILS_ON_NULL = fails(function () {
5036 test.sort(null);
5037});
5038// Old WebKit
5039var STRICT_METHOD = arrayMethodIsStrict('sort');
5040
5041var STABLE_SORT = !fails(function () {
5042 // feature detection can be too slow, so check engines versions
5043 if (V8) return V8 < 70;
5044 if (FF && FF > 3) return;
5045 if (IE_OR_EDGE) return true;
5046 if (WEBKIT) return WEBKIT < 603;
5047
5048 var result = '';
5049 var code, chr, value, index;
5050
5051 // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
5052 for (code = 65; code < 76; code++) {
5053 chr = String.fromCharCode(code);
5054
5055 switch (code) {
5056 case 66: case 69: case 70: case 72: value = 3; break;
5057 case 68: case 71: value = 4; break;
5058 default: value = 2;
5059 }
5060
5061 for (index = 0; index < 47; index++) {
5062 test.push({ k: chr + index, v: value });
5063 }
5064 }
5065
5066 test.sort(function (a, b) { return b.v - a.v; });
5067
5068 for (index = 0; index < test.length; index++) {
5069 chr = test[index].k.charAt(0);
5070 if (result.charAt(result.length - 1) !== chr) result += chr;
5071 }
5072
5073 return result !== 'DGBEFHACIJK';
5074});
5075
5076var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
5077
5078var getSortCompare = function (comparefn) {
5079 return function (x, y) {
5080 if (y === undefined) return -1;
5081 if (x === undefined) return 1;
5082 if (comparefn !== undefined) return +comparefn(x, y) || 0;
5083 return toString(x) > toString(y) ? 1 : -1;
5084 };
5085};
5086
5087// `Array.prototype.sort` method
5088// https://tc39.es/ecma262/#sec-array.prototype.sort
5089$({ target: 'Array', proto: true, forced: FORCED }, {
5090 sort: function sort(comparefn) {
5091 if (comparefn !== undefined) aCallable(comparefn);
5092
5093 var array = toObject(this);
5094
5095 if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
5096
5097 var items = [];
5098 var arrayLength = lengthOfArrayLike(array);
5099 var itemsLength, index;
5100
5101 for (index = 0; index < arrayLength; index++) {
5102 if (index in array) push(items, array[index]);
5103 }
5104
5105 internalSort(items, getSortCompare(comparefn));
5106
5107 itemsLength = lengthOfArrayLike(items);
5108 index = 0;
5109
5110 while (index < itemsLength) array[index] = items[index++];
5111 while (index < arrayLength) deletePropertyOrThrow(array, index++);
5112
5113 return array;
5114 }
5115});
5116
5117
5118/***/ }),
5119/* 185 */
5120/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5121
5122var arraySlice = __webpack_require__(78);
5123
5124var floor = Math.floor;
5125
5126var mergeSort = function (array, comparefn) {
5127 var length = array.length;
5128 var middle = floor(length / 2);
5129 return length < 8 ? insertionSort(array, comparefn) : merge(
5130 array,
5131 mergeSort(arraySlice(array, 0, middle), comparefn),
5132 mergeSort(arraySlice(array, middle), comparefn),
5133 comparefn
5134 );
5135};
5136
5137var insertionSort = function (array, comparefn) {
5138 var length = array.length;
5139 var i = 1;
5140 var element, j;
5141
5142 while (i < length) {
5143 j = i;
5144 element = array[i];
5145 while (j && comparefn(array[j - 1], element) > 0) {
5146 array[j] = array[--j];
5147 }
5148 if (j !== i++) array[j] = element;
5149 } return array;
5150};
5151
5152var merge = function (array, left, right, comparefn) {
5153 var llength = left.length;
5154 var rlength = right.length;
5155 var lindex = 0;
5156 var rindex = 0;
5157
5158 while (lindex < llength || rindex < rlength) {
5159 array[lindex + rindex] = (lindex < llength && rindex < rlength)
5160 ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
5161 : lindex < llength ? left[lindex++] : right[rindex++];
5162 } return array;
5163};
5164
5165module.exports = mergeSort;
5166
5167
5168/***/ }),
5169/* 186 */
5170/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5171
5172var userAgent = __webpack_require__(30);
5173
5174var firefox = userAgent.match(/firefox\/(\d+)/i);
5175
5176module.exports = !!firefox && +firefox[1];
5177
5178
5179/***/ }),
5180/* 187 */
5181/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5182
5183var UA = __webpack_require__(30);
5184
5185module.exports = /MSIE|Trident/.test(UA);
5186
5187
5188/***/ }),
5189/* 188 */
5190/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5191
5192var userAgent = __webpack_require__(30);
5193
5194var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
5195
5196module.exports = !!webkit && +webkit[1];
5197
5198
5199/***/ }),
5200/* 189 */
5201/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
5202
5203var setSpecies = __webpack_require__(190);
5204
5205// `Array[@@species]` getter
5206// https://tc39.es/ecma262/#sec-get-array-@@species
5207setSpecies('Array');
5208
5209
5210/***/ }),
5211/* 190 */
5212/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5213
5214"use strict";
5215
5216var getBuiltIn = __webpack_require__(25);
5217var definePropertyModule = __webpack_require__(46);
5218var wellKnownSymbol = __webpack_require__(35);
5219var DESCRIPTORS = __webpack_require__(6);
5220
5221var SPECIES = wellKnownSymbol('species');
5222
5223module.exports = function (CONSTRUCTOR_NAME) {
5224 var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
5225 var defineProperty = definePropertyModule.f;
5226
5227 if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
5228 defineProperty(Constructor, SPECIES, {
5229 configurable: true,
5230 get: function () { return this; }
5231 });
5232 }
5233};
5234
5235
5236/***/ }),
5237/* 191 */
5238/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
5239
5240"use strict";
5241
5242var $ = __webpack_require__(3);
5243var toObject = __webpack_require__(41);
5244var toAbsoluteIndex = __webpack_require__(62);
5245var toIntegerOrInfinity = __webpack_require__(63);
5246var lengthOfArrayLike = __webpack_require__(65);
5247var setArrayLength = __webpack_require__(176);
5248var doesNotExceedSafeInteger = __webpack_require__(138);
5249var arraySpeciesCreate = __webpack_require__(87);
5250var createProperty = __webpack_require__(79);
5251var deletePropertyOrThrow = __webpack_require__(142);
5252var arrayMethodHasSpeciesSupport = __webpack_require__(139);
5253
5254var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
5255
5256var max = Math.max;
5257var min = Math.min;
5258
5259// `Array.prototype.splice` method
5260// https://tc39.es/ecma262/#sec-array.prototype.splice
5261// with adding support of @@species
5262$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
5263 splice: function splice(start, deleteCount /* , ...items */) {
5264 var O = toObject(this);
5265 var len = lengthOfArrayLike(O);
5266 var actualStart = toAbsoluteIndex(start, len);
5267 var argumentsLength = arguments.length;
5268 var insertCount, actualDeleteCount, A, k, from, to;
5269 if (argumentsLength === 0) {
5270 insertCount = actualDeleteCount = 0;
5271 } else if (argumentsLength === 1) {
5272 insertCount = 0;
5273 actualDeleteCount = len - actualStart;
5274 } else {
5275 insertCount = argumentsLength - 2;
5276 actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
5277 }
5278 doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);
5279 A = arraySpeciesCreate(O, actualDeleteCount);
5280 for (k = 0; k < actualDeleteCount; k++) {
5281 from = actualStart + k;
5282 if (from in O) createProperty(A, k, O[from]);
5283 }
5284 A.length = actualDeleteCount;
5285 if (insertCount < actualDeleteCount) {
5286 for (k = actualStart; k < len - actualDeleteCount; k++) {
5287 from = k + actualDeleteCount;
5288 to = k + insertCount;
5289 if (from in O) O[to] = O[from];
5290 else deletePropertyOrThrow(O, to);
5291 }
5292 for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);
5293 } else if (insertCount > actualDeleteCount) {
5294 for (k = len - actualDeleteCount; k > actualStart; k--) {
5295 from = k + actualDeleteCount - 1;
5296 to = k + insertCount - 1;
5297 if (from in O) O[to] = O[from];
5298 else deletePropertyOrThrow(O, to);
5299 }
5300 }
5301 for (k = 0; k < insertCount; k++) {
5302 O[k + actualStart] = arguments[k + 2];
5303 }
5304 setArrayLength(O, len - actualDeleteCount + insertCount);
5305 return A;
5306 }
5307});
5308
5309
5310/***/ }),
5311/* 192 */
5312/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
5313
5314// this method was added to unscopables after implementation
5315// in popular engines, so it's moved to a separate module
5316var addToUnscopables = __webpack_require__(136);
5317
5318// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
5319addToUnscopables('flat');
5320
5321
5322/***/ }),
5323/* 193 */
5324/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
5325
5326// this method was added to unscopables after implementation
5327// in popular engines, so it's moved to a separate module
5328var addToUnscopables = __webpack_require__(136);
5329
5330// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
5331addToUnscopables('flatMap');
5332
5333
5334/***/ }),
5335/* 194 */
5336/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
5337
5338"use strict";
5339
5340var $ = __webpack_require__(3);
5341var toObject = __webpack_require__(41);
5342var lengthOfArrayLike = __webpack_require__(65);
5343var setArrayLength = __webpack_require__(176);
5344var deletePropertyOrThrow = __webpack_require__(142);
5345var doesNotExceedSafeInteger = __webpack_require__(138);
5346
5347// IE8-
5348var INCORRECT_RESULT = [].unshift(0) !== 1;
5349
5350// V8 ~ Chrome < 71 and Safari <= 15.4, FF < 23 throws InternalError
5351var SILENT_ON_NON_WRITABLE_LENGTH = !function () {
5352 try {
5353 // eslint-disable-next-line es/no-object-defineproperty -- safe
5354 Object.defineProperty([], 'length', { writable: false }).unshift();
5355 } catch (error) {
5356 return error instanceof TypeError;
5357 }
5358}();
5359
5360// `Array.prototype.unshift` method
5361// https://tc39.es/ecma262/#sec-array.prototype.unshift
5362$({ target: 'Array', proto: true, arity: 1, forced: INCORRECT_RESULT || SILENT_ON_NON_WRITABLE_LENGTH }, {
5363 // eslint-disable-next-line no-unused-vars -- required for `.length`
5364 unshift: function unshift(item) {
5365 var O = toObject(this);
5366 var len = lengthOfArrayLike(O);
5367 var argCount = arguments.length;
5368 if (argCount) {
5369 doesNotExceedSafeInteger(len + argCount);
5370 var k = len;
5371 while (k--) {
5372 var to = k + argCount;
5373 if (k in O) O[to] = O[k];
5374 else deletePropertyOrThrow(O, to);
5375 }
5376 for (var j = 0; j < argCount; j++) {
5377 O[j] = arguments[j];
5378 }
5379 } return setArrayLength(O, len + argCount);
5380 }
5381});
5382
5383
5384/***/ }),
5385/* 195 */
5386/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
5387
5388"use strict";
5389
5390var $ = __webpack_require__(3);
5391var global = __webpack_require__(4);
5392var arrayBufferModule = __webpack_require__(196);
5393var setSpecies = __webpack_require__(190);
5394
5395var ARRAY_BUFFER = 'ArrayBuffer';
5396var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];
5397var NativeArrayBuffer = global[ARRAY_BUFFER];
5398
5399// `ArrayBuffer` constructor
5400// https://tc39.es/ecma262/#sec-arraybuffer-constructor
5401$({ global: true, constructor: true, forced: NativeArrayBuffer !== ArrayBuffer }, {
5402 ArrayBuffer: ArrayBuffer
5403});
5404
5405setSpecies(ARRAY_BUFFER);
5406
5407
5408/***/ }),
5409/* 196 */
5410/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5411
5412"use strict";
5413
5414var global = __webpack_require__(4);
5415var uncurryThis = __webpack_require__(14);
5416var DESCRIPTORS = __webpack_require__(6);
5417var NATIVE_ARRAY_BUFFER = __webpack_require__(197);
5418var FunctionName = __webpack_require__(51);
5419var createNonEnumerableProperty = __webpack_require__(45);
5420var defineBuiltIns = __webpack_require__(198);
5421var fails = __webpack_require__(7);
5422var anInstance = __webpack_require__(199);
5423var toIntegerOrInfinity = __webpack_require__(63);
5424var toLength = __webpack_require__(66);
5425var toIndex = __webpack_require__(200);
5426var IEEE754 = __webpack_require__(201);
5427var getPrototypeOf = __webpack_require__(126);
5428var setPrototypeOf = __webpack_require__(114);
5429var getOwnPropertyNames = (__webpack_require__(59).f);
5430var defineProperty = (__webpack_require__(46).f);
5431var arrayFill = __webpack_require__(146);
5432var arraySlice = __webpack_require__(78);
5433var setToStringTag = __webpack_require__(84);
5434var InternalStateModule = __webpack_require__(53);
5435
5436var PROPER_FUNCTION_NAME = FunctionName.PROPER;
5437var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
5438var getInternalState = InternalStateModule.get;
5439var setInternalState = InternalStateModule.set;
5440var ARRAY_BUFFER = 'ArrayBuffer';
5441var DATA_VIEW = 'DataView';
5442var PROTOTYPE = 'prototype';
5443var WRONG_LENGTH = 'Wrong length';
5444var WRONG_INDEX = 'Wrong index';
5445var NativeArrayBuffer = global[ARRAY_BUFFER];
5446var $ArrayBuffer = NativeArrayBuffer;
5447var ArrayBufferPrototype = $ArrayBuffer && $ArrayBuffer[PROTOTYPE];
5448var $DataView = global[DATA_VIEW];
5449var DataViewPrototype = $DataView && $DataView[PROTOTYPE];
5450var ObjectPrototype = Object.prototype;
5451var Array = global.Array;
5452var RangeError = global.RangeError;
5453var fill = uncurryThis(arrayFill);
5454var reverse = uncurryThis([].reverse);
5455
5456var packIEEE754 = IEEE754.pack;
5457var unpackIEEE754 = IEEE754.unpack;
5458
5459var packInt8 = function (number) {
5460 return [number & 0xFF];
5461};
5462
5463var packInt16 = function (number) {
5464 return [number & 0xFF, number >> 8 & 0xFF];
5465};
5466
5467var packInt32 = function (number) {
5468 return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];
5469};
5470
5471var unpackInt32 = function (buffer) {
5472 return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
5473};
5474
5475var packFloat32 = function (number) {
5476 return packIEEE754(number, 23, 4);
5477};
5478
5479var packFloat64 = function (number) {
5480 return packIEEE754(number, 52, 8);
5481};
5482
5483var addGetter = function (Constructor, key) {
5484 defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });
5485};
5486
5487var get = function (view, count, index, isLittleEndian) {
5488 var intIndex = toIndex(index);
5489 var store = getInternalState(view);
5490 if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
5491 var bytes = getInternalState(store.buffer).bytes;
5492 var start = intIndex + store.byteOffset;
5493 var pack = arraySlice(bytes, start, start + count);
5494 return isLittleEndian ? pack : reverse(pack);
5495};
5496
5497var set = function (view, count, index, conversion, value, isLittleEndian) {
5498 var intIndex = toIndex(index);
5499 var store = getInternalState(view);
5500 if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
5501 var bytes = getInternalState(store.buffer).bytes;
5502 var start = intIndex + store.byteOffset;
5503 var pack = conversion(+value);
5504 for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
5505};
5506
5507if (!NATIVE_ARRAY_BUFFER) {
5508 $ArrayBuffer = function ArrayBuffer(length) {
5509 anInstance(this, ArrayBufferPrototype);
5510 var byteLength = toIndex(length);
5511 setInternalState(this, {
5512 bytes: fill(Array(byteLength), 0),
5513 byteLength: byteLength
5514 });
5515 if (!DESCRIPTORS) this.byteLength = byteLength;
5516 };
5517
5518 ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE];
5519
5520 $DataView = function DataView(buffer, byteOffset, byteLength) {
5521 anInstance(this, DataViewPrototype);
5522 anInstance(buffer, ArrayBufferPrototype);
5523 var bufferLength = getInternalState(buffer).byteLength;
5524 var offset = toIntegerOrInfinity(byteOffset);
5525 if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');
5526 byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
5527 if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
5528 setInternalState(this, {
5529 buffer: buffer,
5530 byteLength: byteLength,
5531 byteOffset: offset
5532 });
5533 if (!DESCRIPTORS) {
5534 this.buffer = buffer;
5535 this.byteLength = byteLength;
5536 this.byteOffset = offset;
5537 }
5538 };
5539
5540 DataViewPrototype = $DataView[PROTOTYPE];
5541
5542 if (DESCRIPTORS) {
5543 addGetter($ArrayBuffer, 'byteLength');
5544 addGetter($DataView, 'buffer');
5545 addGetter($DataView, 'byteLength');
5546 addGetter($DataView, 'byteOffset');
5547 }
5548
5549 defineBuiltIns(DataViewPrototype, {
5550 getInt8: function getInt8(byteOffset) {
5551 return get(this, 1, byteOffset)[0] << 24 >> 24;
5552 },
5553 getUint8: function getUint8(byteOffset) {
5554 return get(this, 1, byteOffset)[0];
5555 },
5556 getInt16: function getInt16(byteOffset /* , littleEndian */) {
5557 var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
5558 return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
5559 },
5560 getUint16: function getUint16(byteOffset /* , littleEndian */) {
5561 var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
5562 return bytes[1] << 8 | bytes[0];
5563 },
5564 getInt32: function getInt32(byteOffset /* , littleEndian */) {
5565 return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
5566 },
5567 getUint32: function getUint32(byteOffset /* , littleEndian */) {
5568 return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
5569 },
5570 getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
5571 return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
5572 },
5573 getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
5574 return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
5575 },
5576 setInt8: function setInt8(byteOffset, value) {
5577 set(this, 1, byteOffset, packInt8, value);
5578 },
5579 setUint8: function setUint8(byteOffset, value) {
5580 set(this, 1, byteOffset, packInt8, value);
5581 },
5582 setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
5583 set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
5584 },
5585 setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
5586 set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
5587 },
5588 setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
5589 set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
5590 },
5591 setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
5592 set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
5593 },
5594 setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
5595 set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
5596 },
5597 setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
5598 set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
5599 }
5600 });
5601} else {
5602 var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;
5603 /* eslint-disable no-new -- required for testing */
5604 if (!fails(function () {
5605 NativeArrayBuffer(1);
5606 }) || !fails(function () {
5607 new NativeArrayBuffer(-1);
5608 }) || fails(function () {
5609 new NativeArrayBuffer();
5610 new NativeArrayBuffer(1.5);
5611 new NativeArrayBuffer(NaN);
5612 return NativeArrayBuffer.length != 1 || INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;
5613 })) {
5614 /* eslint-enable no-new -- required for testing */
5615 $ArrayBuffer = function ArrayBuffer(length) {
5616 anInstance(this, ArrayBufferPrototype);
5617 return new NativeArrayBuffer(toIndex(length));
5618 };
5619
5620 $ArrayBuffer[PROTOTYPE] = ArrayBufferPrototype;
5621
5622 for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {
5623 if (!((key = keys[j++]) in $ArrayBuffer)) {
5624 createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);
5625 }
5626 }
5627
5628 ArrayBufferPrototype.constructor = $ArrayBuffer;
5629 } else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {
5630 createNonEnumerableProperty(NativeArrayBuffer, 'name', ARRAY_BUFFER);
5631 }
5632
5633 // WebKit bug - the same parent prototype for typed arrays and data view
5634 if (setPrototypeOf && getPrototypeOf(DataViewPrototype) !== ObjectPrototype) {
5635 setPrototypeOf(DataViewPrototype, ObjectPrototype);
5636 }
5637
5638 // iOS Safari 7.x bug
5639 var testView = new $DataView(new $ArrayBuffer(2));
5640 var $setInt8 = uncurryThis(DataViewPrototype.setInt8);
5641 testView.setInt8(0, 2147483648);
5642 testView.setInt8(1, 2147483649);
5643 if (testView.getInt8(0) || !testView.getInt8(1)) defineBuiltIns(DataViewPrototype, {
5644 setInt8: function setInt8(byteOffset, value) {
5645 $setInt8(this, byteOffset, value << 24 >> 24);
5646 },
5647 setUint8: function setUint8(byteOffset, value) {
5648 $setInt8(this, byteOffset, value << 24 >> 24);
5649 }
5650 }, { unsafe: true });
5651}
5652
5653setToStringTag($ArrayBuffer, ARRAY_BUFFER);
5654setToStringTag($DataView, DATA_VIEW);
5655
5656module.exports = {
5657 ArrayBuffer: $ArrayBuffer,
5658 DataView: $DataView
5659};
5660
5661
5662/***/ }),
5663/* 197 */
5664/***/ (function(module) {
5665
5666// eslint-disable-next-line es/no-typed-arrays -- safe
5667module.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
5668
5669
5670/***/ }),
5671/* 198 */
5672/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5673
5674var defineBuiltIn = __webpack_require__(49);
5675
5676module.exports = function (target, src, options) {
5677 for (var key in src) defineBuiltIn(target, key, src[key], options);
5678 return target;
5679};
5680
5681
5682/***/ }),
5683/* 199 */
5684/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5685
5686var isPrototypeOf = __webpack_require__(26);
5687
5688var $TypeError = TypeError;
5689
5690module.exports = function (it, Prototype) {
5691 if (isPrototypeOf(Prototype, it)) return it;
5692 throw $TypeError('Incorrect invocation');
5693};
5694
5695
5696/***/ }),
5697/* 200 */
5698/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5699
5700var toIntegerOrInfinity = __webpack_require__(63);
5701var toLength = __webpack_require__(66);
5702
5703var $RangeError = RangeError;
5704
5705// `ToIndex` abstract operation
5706// https://tc39.es/ecma262/#sec-toindex
5707module.exports = function (it) {
5708 if (it === undefined) return 0;
5709 var number = toIntegerOrInfinity(it);
5710 var length = toLength(number);
5711 if (number !== length) throw $RangeError('Wrong length or index');
5712 return length;
5713};
5714
5715
5716/***/ }),
5717/* 201 */
5718/***/ (function(module) {
5719
5720// IEEE754 conversions based on https://github.com/feross/ieee754
5721var $Array = Array;
5722var abs = Math.abs;
5723var pow = Math.pow;
5724var floor = Math.floor;
5725var log = Math.log;
5726var LN2 = Math.LN2;
5727
5728var pack = function (number, mantissaLength, bytes) {
5729 var buffer = $Array(bytes);
5730 var exponentLength = bytes * 8 - mantissaLength - 1;
5731 var eMax = (1 << exponentLength) - 1;
5732 var eBias = eMax >> 1;
5733 var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;
5734 var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;
5735 var index = 0;
5736 var exponent, mantissa, c;
5737 number = abs(number);
5738 // eslint-disable-next-line no-self-compare -- NaN check
5739 if (number != number || number === Infinity) {
5740 // eslint-disable-next-line no-self-compare -- NaN check
5741 mantissa = number != number ? 1 : 0;
5742 exponent = eMax;
5743 } else {
5744 exponent = floor(log(number) / LN2);
5745 c = pow(2, -exponent);
5746 if (number * c < 1) {
5747 exponent--;
5748 c *= 2;
5749 }
5750 if (exponent + eBias >= 1) {
5751 number += rt / c;
5752 } else {
5753 number += rt * pow(2, 1 - eBias);
5754 }
5755 if (number * c >= 2) {
5756 exponent++;
5757 c /= 2;
5758 }
5759 if (exponent + eBias >= eMax) {
5760 mantissa = 0;
5761 exponent = eMax;
5762 } else if (exponent + eBias >= 1) {
5763 mantissa = (number * c - 1) * pow(2, mantissaLength);
5764 exponent = exponent + eBias;
5765 } else {
5766 mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);
5767 exponent = 0;
5768 }
5769 }
5770 while (mantissaLength >= 8) {
5771 buffer[index++] = mantissa & 255;
5772 mantissa /= 256;
5773 mantissaLength -= 8;
5774 }
5775 exponent = exponent << mantissaLength | mantissa;
5776 exponentLength += mantissaLength;
5777 while (exponentLength > 0) {
5778 buffer[index++] = exponent & 255;
5779 exponent /= 256;
5780 exponentLength -= 8;
5781 }
5782 buffer[--index] |= sign * 128;
5783 return buffer;
5784};
5785
5786var unpack = function (buffer, mantissaLength) {
5787 var bytes = buffer.length;
5788 var exponentLength = bytes * 8 - mantissaLength - 1;
5789 var eMax = (1 << exponentLength) - 1;
5790 var eBias = eMax >> 1;
5791 var nBits = exponentLength - 7;
5792 var index = bytes - 1;
5793 var sign = buffer[index--];
5794 var exponent = sign & 127;
5795 var mantissa;
5796 sign >>= 7;
5797 while (nBits > 0) {
5798 exponent = exponent * 256 + buffer[index--];
5799 nBits -= 8;
5800 }
5801 mantissa = exponent & (1 << -nBits) - 1;
5802 exponent >>= -nBits;
5803 nBits += mantissaLength;
5804 while (nBits > 0) {
5805 mantissa = mantissa * 256 + buffer[index--];
5806 nBits -= 8;
5807 }
5808 if (exponent === 0) {
5809 exponent = 1 - eBias;
5810 } else if (exponent === eMax) {
5811 return mantissa ? NaN : sign ? -Infinity : Infinity;
5812 } else {
5813 mantissa = mantissa + pow(2, mantissaLength);
5814 exponent = exponent - eBias;
5815 } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
5816};
5817
5818module.exports = {
5819 pack: pack,
5820 unpack: unpack
5821};
5822
5823
5824/***/ }),
5825/* 202 */
5826/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
5827
5828var $ = __webpack_require__(3);
5829var ArrayBufferViewCore = __webpack_require__(203);
5830
5831var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
5832
5833// `ArrayBuffer.isView` method
5834// https://tc39.es/ecma262/#sec-arraybuffer.isview
5835$({ target: 'ArrayBuffer', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
5836 isView: ArrayBufferViewCore.isView
5837});
5838
5839
5840/***/ }),
5841/* 203 */
5842/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5843
5844"use strict";
5845
5846var NATIVE_ARRAY_BUFFER = __webpack_require__(197);
5847var DESCRIPTORS = __webpack_require__(6);
5848var global = __webpack_require__(4);
5849var isCallable = __webpack_require__(22);
5850var isObject = __webpack_require__(21);
5851var hasOwn = __webpack_require__(40);
5852var classof = __webpack_require__(71);
5853var tryToString = __webpack_require__(33);
5854var createNonEnumerableProperty = __webpack_require__(45);
5855var defineBuiltIn = __webpack_require__(49);
5856var defineProperty = (__webpack_require__(46).f);
5857var isPrototypeOf = __webpack_require__(26);
5858var getPrototypeOf = __webpack_require__(126);
5859var setPrototypeOf = __webpack_require__(114);
5860var wellKnownSymbol = __webpack_require__(35);
5861var uid = __webpack_require__(42);
5862var InternalStateModule = __webpack_require__(53);
5863
5864var enforceInternalState = InternalStateModule.enforce;
5865var getInternalState = InternalStateModule.get;
5866var Int8Array = global.Int8Array;
5867var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
5868var Uint8ClampedArray = global.Uint8ClampedArray;
5869var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
5870var TypedArray = Int8Array && getPrototypeOf(Int8Array);
5871var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
5872var ObjectPrototype = Object.prototype;
5873var TypeError = global.TypeError;
5874
5875var TO_STRING_TAG = wellKnownSymbol('toStringTag');
5876var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
5877var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
5878// Fixing native typed arrays in Opera Presto crashes the browser, see #595
5879var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
5880var TYPED_ARRAY_TAG_REQUIRED = false;
5881var NAME, Constructor, Prototype;
5882
5883var TypedArrayConstructorsList = {
5884 Int8Array: 1,
5885 Uint8Array: 1,
5886 Uint8ClampedArray: 1,
5887 Int16Array: 2,
5888 Uint16Array: 2,
5889 Int32Array: 4,
5890 Uint32Array: 4,
5891 Float32Array: 4,
5892 Float64Array: 8
5893};
5894
5895var BigIntArrayConstructorsList = {
5896 BigInt64Array: 8,
5897 BigUint64Array: 8
5898};
5899
5900var isView = function isView(it) {
5901 if (!isObject(it)) return false;
5902 var klass = classof(it);
5903 return klass === 'DataView'
5904 || hasOwn(TypedArrayConstructorsList, klass)
5905 || hasOwn(BigIntArrayConstructorsList, klass);
5906};
5907
5908var getTypedArrayConstructor = function (it) {
5909 var proto = getPrototypeOf(it);
5910 if (!isObject(proto)) return;
5911 var state = getInternalState(proto);
5912 return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);
5913};
5914
5915var isTypedArray = function (it) {
5916 if (!isObject(it)) return false;
5917 var klass = classof(it);
5918 return hasOwn(TypedArrayConstructorsList, klass)
5919 || hasOwn(BigIntArrayConstructorsList, klass);
5920};
5921
5922var aTypedArray = function (it) {
5923 if (isTypedArray(it)) return it;
5924 throw TypeError('Target is not a typed array');
5925};
5926
5927var aTypedArrayConstructor = function (C) {
5928 if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;
5929 throw TypeError(tryToString(C) + ' is not a typed array constructor');
5930};
5931
5932var exportTypedArrayMethod = function (KEY, property, forced, options) {
5933 if (!DESCRIPTORS) return;
5934 if (forced) for (var ARRAY in TypedArrayConstructorsList) {
5935 var TypedArrayConstructor = global[ARRAY];
5936 if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {
5937 delete TypedArrayConstructor.prototype[KEY];
5938 } catch (error) {
5939 // old WebKit bug - some methods are non-configurable
5940 try {
5941 TypedArrayConstructor.prototype[KEY] = property;
5942 } catch (error2) { /* empty */ }
5943 }
5944 }
5945 if (!TypedArrayPrototype[KEY] || forced) {
5946 defineBuiltIn(TypedArrayPrototype, KEY, forced ? property
5947 : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
5948 }
5949};
5950
5951var exportTypedArrayStaticMethod = function (KEY, property, forced) {
5952 var ARRAY, TypedArrayConstructor;
5953 if (!DESCRIPTORS) return;
5954 if (setPrototypeOf) {
5955 if (forced) for (ARRAY in TypedArrayConstructorsList) {
5956 TypedArrayConstructor = global[ARRAY];
5957 if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {
5958 delete TypedArrayConstructor[KEY];
5959 } catch (error) { /* empty */ }
5960 }
5961 if (!TypedArray[KEY] || forced) {
5962 // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
5963 try {
5964 return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
5965 } catch (error) { /* empty */ }
5966 } else return;
5967 }
5968 for (ARRAY in TypedArrayConstructorsList) {
5969 TypedArrayConstructor = global[ARRAY];
5970 if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
5971 defineBuiltIn(TypedArrayConstructor, KEY, property);
5972 }
5973 }
5974};
5975
5976for (NAME in TypedArrayConstructorsList) {
5977 Constructor = global[NAME];
5978 Prototype = Constructor && Constructor.prototype;
5979 if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
5980 else NATIVE_ARRAY_BUFFER_VIEWS = false;
5981}
5982
5983for (NAME in BigIntArrayConstructorsList) {
5984 Constructor = global[NAME];
5985 Prototype = Constructor && Constructor.prototype;
5986 if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
5987}
5988
5989// WebKit bug - typed arrays constructors prototype is Object.prototype
5990if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
5991 // eslint-disable-next-line no-shadow -- safe
5992 TypedArray = function TypedArray() {
5993 throw TypeError('Incorrect invocation');
5994 };
5995 if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
5996 if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
5997 }
5998}
5999
6000if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
6001 TypedArrayPrototype = TypedArray.prototype;
6002 if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
6003 if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
6004 }
6005}
6006
6007// WebKit bug - one more object in Uint8ClampedArray prototype chain
6008if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
6009 setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
6010}
6011
6012if (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {
6013 TYPED_ARRAY_TAG_REQUIRED = true;
6014 defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {
6015 return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
6016 } });
6017 for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
6018 createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
6019 }
6020}
6021
6022module.exports = {
6023 NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
6024 TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
6025 aTypedArray: aTypedArray,
6026 aTypedArrayConstructor: aTypedArrayConstructor,
6027 exportTypedArrayMethod: exportTypedArrayMethod,
6028 exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
6029 getTypedArrayConstructor: getTypedArrayConstructor,
6030 isView: isView,
6031 isTypedArray: isTypedArray,
6032 TypedArray: TypedArray,
6033 TypedArrayPrototype: TypedArrayPrototype
6034};
6035
6036
6037/***/ }),
6038/* 204 */
6039/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6040
6041"use strict";
6042
6043var $ = __webpack_require__(3);
6044var uncurryThis = __webpack_require__(14);
6045var fails = __webpack_require__(7);
6046var ArrayBufferModule = __webpack_require__(196);
6047var anObject = __webpack_require__(48);
6048var toAbsoluteIndex = __webpack_require__(62);
6049var toLength = __webpack_require__(66);
6050var speciesConstructor = __webpack_require__(205);
6051
6052var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
6053var DataView = ArrayBufferModule.DataView;
6054var DataViewPrototype = DataView.prototype;
6055var nativeArrayBufferSlice = uncurryThis(ArrayBuffer.prototype.slice);
6056var getUint8 = uncurryThis(DataViewPrototype.getUint8);
6057var setUint8 = uncurryThis(DataViewPrototype.setUint8);
6058
6059var INCORRECT_SLICE = fails(function () {
6060 return !new ArrayBuffer(2).slice(1, undefined).byteLength;
6061});
6062
6063// `ArrayBuffer.prototype.slice` method
6064// https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice
6065$({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SLICE }, {
6066 slice: function slice(start, end) {
6067 if (nativeArrayBufferSlice && end === undefined) {
6068 return nativeArrayBufferSlice(anObject(this), start); // FF fix
6069 }
6070 var length = anObject(this).byteLength;
6071 var first = toAbsoluteIndex(start, length);
6072 var fin = toAbsoluteIndex(end === undefined ? length : end, length);
6073 var result = new (speciesConstructor(this, ArrayBuffer))(toLength(fin - first));
6074 var viewSource = new DataView(this);
6075 var viewTarget = new DataView(result);
6076 var index = 0;
6077 while (first < fin) {
6078 setUint8(viewTarget, index++, getUint8(viewSource, first++));
6079 } return result;
6080 }
6081});
6082
6083
6084/***/ }),
6085/* 205 */
6086/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6087
6088var anObject = __webpack_require__(48);
6089var aConstructor = __webpack_require__(206);
6090var isNullOrUndefined = __webpack_require__(18);
6091var wellKnownSymbol = __webpack_require__(35);
6092
6093var SPECIES = wellKnownSymbol('species');
6094
6095// `SpeciesConstructor` abstract operation
6096// https://tc39.es/ecma262/#sec-speciesconstructor
6097module.exports = function (O, defaultConstructor) {
6098 var C = anObject(O).constructor;
6099 var S;
6100 return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES]) ? defaultConstructor : aConstructor(S);
6101};
6102
6103
6104/***/ }),
6105/* 206 */
6106/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6107
6108var isConstructor = __webpack_require__(90);
6109var tryToString = __webpack_require__(33);
6110
6111var $TypeError = TypeError;
6112
6113// `Assert: IsConstructor(argument) is true`
6114module.exports = function (argument) {
6115 if (isConstructor(argument)) return argument;
6116 throw $TypeError(tryToString(argument) + ' is not a constructor');
6117};
6118
6119
6120/***/ }),
6121/* 207 */
6122/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6123
6124// TODO: Remove this module from `core-js@4` since it's replaced to module below
6125__webpack_require__(208);
6126
6127
6128/***/ }),
6129/* 208 */
6130/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6131
6132var $ = __webpack_require__(3);
6133var ArrayBufferModule = __webpack_require__(196);
6134var NATIVE_ARRAY_BUFFER = __webpack_require__(197);
6135
6136// `DataView` constructor
6137// https://tc39.es/ecma262/#sec-dataview-constructor
6138$({ global: true, constructor: true, forced: !NATIVE_ARRAY_BUFFER }, {
6139 DataView: ArrayBufferModule.DataView
6140});
6141
6142
6143/***/ }),
6144/* 209 */
6145/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6146
6147"use strict";
6148
6149var $ = __webpack_require__(3);
6150var uncurryThis = __webpack_require__(14);
6151var fails = __webpack_require__(7);
6152
6153var FORCED = fails(function () {
6154 return new Date(16e11).getYear() !== 120;
6155});
6156
6157var getFullYear = uncurryThis(Date.prototype.getFullYear);
6158
6159// `Date.prototype.getYear` method
6160// https://tc39.es/ecma262/#sec-date.prototype.getyear
6161$({ target: 'Date', proto: true, forced: FORCED }, {
6162 getYear: function getYear() {
6163 return getFullYear(this) - 1900;
6164 }
6165});
6166
6167
6168/***/ }),
6169/* 210 */
6170/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6171
6172// TODO: Remove from `core-js@4`
6173var $ = __webpack_require__(3);
6174var uncurryThis = __webpack_require__(14);
6175
6176var $Date = Date;
6177var thisTimeValue = uncurryThis($Date.prototype.getTime);
6178
6179// `Date.now` method
6180// https://tc39.es/ecma262/#sec-date.now
6181$({ target: 'Date', stat: true }, {
6182 now: function now() {
6183 return thisTimeValue(new $Date());
6184 }
6185});
6186
6187
6188/***/ }),
6189/* 211 */
6190/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6191
6192"use strict";
6193
6194var $ = __webpack_require__(3);
6195var uncurryThis = __webpack_require__(14);
6196var toIntegerOrInfinity = __webpack_require__(63);
6197
6198var DatePrototype = Date.prototype;
6199var thisTimeValue = uncurryThis(DatePrototype.getTime);
6200var setFullYear = uncurryThis(DatePrototype.setFullYear);
6201
6202// `Date.prototype.setYear` method
6203// https://tc39.es/ecma262/#sec-date.prototype.setyear
6204$({ target: 'Date', proto: true }, {
6205 setYear: function setYear(year) {
6206 // validate
6207 thisTimeValue(this);
6208 var yi = toIntegerOrInfinity(year);
6209 var yyyy = 0 <= yi && yi <= 99 ? yi + 1900 : yi;
6210 return setFullYear(this, yyyy);
6211 }
6212});
6213
6214
6215/***/ }),
6216/* 212 */
6217/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6218
6219var $ = __webpack_require__(3);
6220
6221// `Date.prototype.toGMTString` method
6222// https://tc39.es/ecma262/#sec-date.prototype.togmtstring
6223$({ target: 'Date', proto: true }, {
6224 toGMTString: Date.prototype.toUTCString
6225});
6226
6227
6228/***/ }),
6229/* 213 */
6230/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6231
6232var $ = __webpack_require__(3);
6233var toISOString = __webpack_require__(214);
6234
6235// `Date.prototype.toISOString` method
6236// https://tc39.es/ecma262/#sec-date.prototype.toisostring
6237// PhantomJS / old WebKit has a broken implementations
6238$({ target: 'Date', proto: true, forced: Date.prototype.toISOString !== toISOString }, {
6239 toISOString: toISOString
6240});
6241
6242
6243/***/ }),
6244/* 214 */
6245/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6246
6247"use strict";
6248
6249var uncurryThis = __webpack_require__(14);
6250var fails = __webpack_require__(7);
6251var padStart = (__webpack_require__(215).start);
6252
6253var $RangeError = RangeError;
6254var $isFinite = isFinite;
6255var abs = Math.abs;
6256var DatePrototype = Date.prototype;
6257var nativeDateToISOString = DatePrototype.toISOString;
6258var thisTimeValue = uncurryThis(DatePrototype.getTime);
6259var getUTCDate = uncurryThis(DatePrototype.getUTCDate);
6260var getUTCFullYear = uncurryThis(DatePrototype.getUTCFullYear);
6261var getUTCHours = uncurryThis(DatePrototype.getUTCHours);
6262var getUTCMilliseconds = uncurryThis(DatePrototype.getUTCMilliseconds);
6263var getUTCMinutes = uncurryThis(DatePrototype.getUTCMinutes);
6264var getUTCMonth = uncurryThis(DatePrototype.getUTCMonth);
6265var getUTCSeconds = uncurryThis(DatePrototype.getUTCSeconds);
6266
6267// `Date.prototype.toISOString` method implementation
6268// https://tc39.es/ecma262/#sec-date.prototype.toisostring
6269// PhantomJS / old WebKit fails here:
6270module.exports = (fails(function () {
6271 return nativeDateToISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
6272}) || !fails(function () {
6273 nativeDateToISOString.call(new Date(NaN));
6274})) ? function toISOString() {
6275 if (!$isFinite(thisTimeValue(this))) throw $RangeError('Invalid time value');
6276 var date = this;
6277 var year = getUTCFullYear(date);
6278 var milliseconds = getUTCMilliseconds(date);
6279 var sign = year < 0 ? '-' : year > 9999 ? '+' : '';
6280 return sign + padStart(abs(year), sign ? 6 : 4, 0) +
6281 '-' + padStart(getUTCMonth(date) + 1, 2, 0) +
6282 '-' + padStart(getUTCDate(date), 2, 0) +
6283 'T' + padStart(getUTCHours(date), 2, 0) +
6284 ':' + padStart(getUTCMinutes(date), 2, 0) +
6285 ':' + padStart(getUTCSeconds(date), 2, 0) +
6286 '.' + padStart(milliseconds, 3, 0) +
6287 'Z';
6288} : nativeDateToISOString;
6289
6290
6291/***/ }),
6292/* 215 */
6293/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6294
6295// https://github.com/tc39/proposal-string-pad-start-end
6296var uncurryThis = __webpack_require__(14);
6297var toLength = __webpack_require__(66);
6298var toString = __webpack_require__(70);
6299var $repeat = __webpack_require__(216);
6300var requireObjectCoercible = __webpack_require__(17);
6301
6302var repeat = uncurryThis($repeat);
6303var stringSlice = uncurryThis(''.slice);
6304var ceil = Math.ceil;
6305
6306// `String.prototype.{ padStart, padEnd }` methods implementation
6307var createMethod = function (IS_END) {
6308 return function ($this, maxLength, fillString) {
6309 var S = toString(requireObjectCoercible($this));
6310 var intMaxLength = toLength(maxLength);
6311 var stringLength = S.length;
6312 var fillStr = fillString === undefined ? ' ' : toString(fillString);
6313 var fillLen, stringFiller;
6314 if (intMaxLength <= stringLength || fillStr == '') return S;
6315 fillLen = intMaxLength - stringLength;
6316 stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));
6317 if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);
6318 return IS_END ? S + stringFiller : stringFiller + S;
6319 };
6320};
6321
6322module.exports = {
6323 // `String.prototype.padStart` method
6324 // https://tc39.es/ecma262/#sec-string.prototype.padstart
6325 start: createMethod(false),
6326 // `String.prototype.padEnd` method
6327 // https://tc39.es/ecma262/#sec-string.prototype.padend
6328 end: createMethod(true)
6329};
6330
6331
6332/***/ }),
6333/* 216 */
6334/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6335
6336"use strict";
6337
6338var toIntegerOrInfinity = __webpack_require__(63);
6339var toString = __webpack_require__(70);
6340var requireObjectCoercible = __webpack_require__(17);
6341
6342var $RangeError = RangeError;
6343
6344// `String.prototype.repeat` method implementation
6345// https://tc39.es/ecma262/#sec-string.prototype.repeat
6346module.exports = function repeat(count) {
6347 var str = toString(requireObjectCoercible(this));
6348 var result = '';
6349 var n = toIntegerOrInfinity(count);
6350 if (n < 0 || n == Infinity) throw $RangeError('Wrong number of repetitions');
6351 for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
6352 return result;
6353};
6354
6355
6356/***/ }),
6357/* 217 */
6358/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6359
6360"use strict";
6361
6362var $ = __webpack_require__(3);
6363var fails = __webpack_require__(7);
6364var toObject = __webpack_require__(41);
6365var toPrimitive = __webpack_require__(20);
6366
6367var FORCED = fails(function () {
6368 return new Date(NaN).toJSON() !== null
6369 || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
6370});
6371
6372// `Date.prototype.toJSON` method
6373// https://tc39.es/ecma262/#sec-date.prototype.tojson
6374$({ target: 'Date', proto: true, arity: 1, forced: FORCED }, {
6375 // eslint-disable-next-line no-unused-vars -- required for `.length`
6376 toJSON: function toJSON(key) {
6377 var O = toObject(this);
6378 var pv = toPrimitive(O, 'number');
6379 return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
6380 }
6381});
6382
6383
6384/***/ }),
6385/* 218 */
6386/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6387
6388var hasOwn = __webpack_require__(40);
6389var defineBuiltIn = __webpack_require__(49);
6390var dateToPrimitive = __webpack_require__(219);
6391var wellKnownSymbol = __webpack_require__(35);
6392
6393var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
6394var DatePrototype = Date.prototype;
6395
6396// `Date.prototype[@@toPrimitive]` method
6397// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
6398if (!hasOwn(DatePrototype, TO_PRIMITIVE)) {
6399 defineBuiltIn(DatePrototype, TO_PRIMITIVE, dateToPrimitive);
6400}
6401
6402
6403/***/ }),
6404/* 219 */
6405/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6406
6407"use strict";
6408
6409var anObject = __webpack_require__(48);
6410var ordinaryToPrimitive = __webpack_require__(34);
6411
6412var $TypeError = TypeError;
6413
6414// `Date.prototype[@@toPrimitive](hint)` method implementation
6415// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
6416module.exports = function (hint) {
6417 anObject(this);
6418 if (hint === 'string' || hint === 'default') hint = 'string';
6419 else if (hint !== 'number') throw $TypeError('Incorrect hint');
6420 return ordinaryToPrimitive(this, hint);
6421};
6422
6423
6424/***/ }),
6425/* 220 */
6426/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6427
6428// TODO: Remove from `core-js@4`
6429var uncurryThis = __webpack_require__(14);
6430var defineBuiltIn = __webpack_require__(49);
6431
6432var DatePrototype = Date.prototype;
6433var INVALID_DATE = 'Invalid Date';
6434var TO_STRING = 'toString';
6435var nativeDateToString = uncurryThis(DatePrototype[TO_STRING]);
6436var thisTimeValue = uncurryThis(DatePrototype.getTime);
6437
6438// `Date.prototype.toString` method
6439// https://tc39.es/ecma262/#sec-date.prototype.tostring
6440if (String(new Date(NaN)) != INVALID_DATE) {
6441 defineBuiltIn(DatePrototype, TO_STRING, function toString() {
6442 var value = thisTimeValue(this);
6443 // eslint-disable-next-line no-self-compare -- NaN check
6444 return value === value ? nativeDateToString(this) : INVALID_DATE;
6445 });
6446}
6447
6448
6449/***/ }),
6450/* 221 */
6451/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6452
6453"use strict";
6454
6455var $ = __webpack_require__(3);
6456var uncurryThis = __webpack_require__(14);
6457var toString = __webpack_require__(70);
6458
6459var charAt = uncurryThis(''.charAt);
6460var charCodeAt = uncurryThis(''.charCodeAt);
6461var exec = uncurryThis(/./.exec);
6462var numberToString = uncurryThis(1.0.toString);
6463var toUpperCase = uncurryThis(''.toUpperCase);
6464
6465var raw = /[\w*+\-./@]/;
6466
6467var hex = function (code, length) {
6468 var result = numberToString(code, 16);
6469 while (result.length < length) result = '0' + result;
6470 return result;
6471};
6472
6473// `escape` method
6474// https://tc39.es/ecma262/#sec-escape-string
6475$({ global: true }, {
6476 escape: function escape(string) {
6477 var str = toString(string);
6478 var result = '';
6479 var length = str.length;
6480 var index = 0;
6481 var chr, code;
6482 while (index < length) {
6483 chr = charAt(str, index++);
6484 if (exec(raw, chr)) {
6485 result += chr;
6486 } else {
6487 code = charCodeAt(chr, 0);
6488 if (code < 256) {
6489 result += '%' + hex(code, 2);
6490 } else {
6491 result += '%u' + toUpperCase(hex(code, 4));
6492 }
6493 }
6494 } return result;
6495 }
6496});
6497
6498
6499/***/ }),
6500/* 222 */
6501/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6502
6503// TODO: Remove from `core-js@4`
6504var $ = __webpack_require__(3);
6505var bind = __webpack_require__(223);
6506
6507// `Function.prototype.bind` method
6508// https://tc39.es/ecma262/#sec-function.prototype.bind
6509$({ target: 'Function', proto: true, forced: Function.bind !== bind }, {
6510 bind: bind
6511});
6512
6513
6514/***/ }),
6515/* 223 */
6516/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6517
6518"use strict";
6519
6520var uncurryThis = __webpack_require__(14);
6521var aCallable = __webpack_require__(32);
6522var isObject = __webpack_require__(21);
6523var hasOwn = __webpack_require__(40);
6524var arraySlice = __webpack_require__(96);
6525var NATIVE_BIND = __webpack_require__(9);
6526
6527var $Function = Function;
6528var concat = uncurryThis([].concat);
6529var join = uncurryThis([].join);
6530var factories = {};
6531
6532var construct = function (C, argsLength, args) {
6533 if (!hasOwn(factories, argsLength)) {
6534 for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
6535 factories[argsLength] = $Function('C,a', 'return new C(' + join(list, ',') + ')');
6536 } return factories[argsLength](C, args);
6537};
6538
6539// `Function.prototype.bind` method implementation
6540// https://tc39.es/ecma262/#sec-function.prototype.bind
6541module.exports = NATIVE_BIND ? $Function.bind : function bind(that /* , ...args */) {
6542 var F = aCallable(this);
6543 var Prototype = F.prototype;
6544 var partArgs = arraySlice(arguments, 1);
6545 var boundFunction = function bound(/* args... */) {
6546 var args = concat(partArgs, arraySlice(arguments));
6547 return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);
6548 };
6549 if (isObject(Prototype)) boundFunction.prototype = Prototype;
6550 return boundFunction;
6551};
6552
6553
6554/***/ }),
6555/* 224 */
6556/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6557
6558"use strict";
6559
6560var isCallable = __webpack_require__(22);
6561var isObject = __webpack_require__(21);
6562var definePropertyModule = __webpack_require__(46);
6563var getPrototypeOf = __webpack_require__(126);
6564var wellKnownSymbol = __webpack_require__(35);
6565var makeBuiltIn = __webpack_require__(50);
6566
6567var HAS_INSTANCE = wellKnownSymbol('hasInstance');
6568var FunctionPrototype = Function.prototype;
6569
6570// `Function.prototype[@@hasInstance]` method
6571// https://tc39.es/ecma262/#sec-function.prototype-@@hasinstance
6572if (!(HAS_INSTANCE in FunctionPrototype)) {
6573 definePropertyModule.f(FunctionPrototype, HAS_INSTANCE, { value: makeBuiltIn(function (O) {
6574 if (!isCallable(this) || !isObject(O)) return false;
6575 var P = this.prototype;
6576 if (!isObject(P)) return O instanceof this;
6577 // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
6578 while (O = getPrototypeOf(O)) if (P === O) return true;
6579 return false;
6580 }, HAS_INSTANCE) });
6581}
6582
6583
6584/***/ }),
6585/* 225 */
6586/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6587
6588var DESCRIPTORS = __webpack_require__(6);
6589var FUNCTION_NAME_EXISTS = (__webpack_require__(51).EXISTS);
6590var uncurryThis = __webpack_require__(14);
6591var defineProperty = (__webpack_require__(46).f);
6592
6593var FunctionPrototype = Function.prototype;
6594var functionToString = uncurryThis(FunctionPrototype.toString);
6595var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/;
6596var regExpExec = uncurryThis(nameRE.exec);
6597var NAME = 'name';
6598
6599// Function instances `.name` property
6600// https://tc39.es/ecma262/#sec-function-instances-name
6601if (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {
6602 defineProperty(FunctionPrototype, NAME, {
6603 configurable: true,
6604 get: function () {
6605 try {
6606 return regExpExec(nameRE, functionToString(this))[1];
6607 } catch (error) {
6608 return '';
6609 }
6610 }
6611 });
6612}
6613
6614
6615/***/ }),
6616/* 226 */
6617/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6618
6619var $ = __webpack_require__(3);
6620var global = __webpack_require__(4);
6621
6622// `globalThis` object
6623// https://tc39.es/ecma262/#sec-globalthis
6624$({ global: true, forced: global.globalThis !== global }, {
6625 globalThis: global
6626});
6627
6628
6629/***/ }),
6630/* 227 */
6631/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6632
6633var global = __webpack_require__(4);
6634var setToStringTag = __webpack_require__(84);
6635
6636// JSON[@@toStringTag] property
6637// https://tc39.es/ecma262/#sec-json-@@tostringtag
6638setToStringTag(global.JSON, 'JSON', true);
6639
6640
6641/***/ }),
6642/* 228 */
6643/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6644
6645// TODO: Remove this module from `core-js@4` since it's replaced to module below
6646__webpack_require__(229);
6647
6648
6649/***/ }),
6650/* 229 */
6651/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6652
6653"use strict";
6654
6655var collection = __webpack_require__(230);
6656var collectionStrong = __webpack_require__(235);
6657
6658// `Map` constructor
6659// https://tc39.es/ecma262/#sec-map-objects
6660collection('Map', function (init) {
6661 return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
6662}, collectionStrong);
6663
6664
6665/***/ }),
6666/* 230 */
6667/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6668
6669"use strict";
6670
6671var $ = __webpack_require__(3);
6672var global = __webpack_require__(4);
6673var uncurryThis = __webpack_require__(14);
6674var isForced = __webpack_require__(69);
6675var defineBuiltIn = __webpack_require__(49);
6676var InternalMetadataModule = __webpack_require__(231);
6677var iterate = __webpack_require__(128);
6678var anInstance = __webpack_require__(199);
6679var isCallable = __webpack_require__(22);
6680var isNullOrUndefined = __webpack_require__(18);
6681var isObject = __webpack_require__(21);
6682var fails = __webpack_require__(7);
6683var checkCorrectnessOfIteration = __webpack_require__(161);
6684var setToStringTag = __webpack_require__(84);
6685var inheritIfRequired = __webpack_require__(117);
6686
6687module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
6688 var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
6689 var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
6690 var ADDER = IS_MAP ? 'set' : 'add';
6691 var NativeConstructor = global[CONSTRUCTOR_NAME];
6692 var NativePrototype = NativeConstructor && NativeConstructor.prototype;
6693 var Constructor = NativeConstructor;
6694 var exported = {};
6695
6696 var fixMethod = function (KEY) {
6697 var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]);
6698 defineBuiltIn(NativePrototype, KEY,
6699 KEY == 'add' ? function add(value) {
6700 uncurriedNativeMethod(this, value === 0 ? 0 : value);
6701 return this;
6702 } : KEY == 'delete' ? function (key) {
6703 return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
6704 } : KEY == 'get' ? function get(key) {
6705 return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);
6706 } : KEY == 'has' ? function has(key) {
6707 return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
6708 } : function set(key, value) {
6709 uncurriedNativeMethod(this, key === 0 ? 0 : key, value);
6710 return this;
6711 }
6712 );
6713 };
6714
6715 var REPLACE = isForced(
6716 CONSTRUCTOR_NAME,
6717 !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
6718 new NativeConstructor().entries().next();
6719 }))
6720 );
6721
6722 if (REPLACE) {
6723 // create collection constructor
6724 Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
6725 InternalMetadataModule.enable();
6726 } else if (isForced(CONSTRUCTOR_NAME, true)) {
6727 var instance = new Constructor();
6728 // early implementations not supports chaining
6729 var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
6730 // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
6731 var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
6732 // most early implementations doesn't supports iterables, most modern - not close it correctly
6733 // eslint-disable-next-line no-new -- required for testing
6734 var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
6735 // for early implementations -0 and +0 not the same
6736 var BUGGY_ZERO = !IS_WEAK && fails(function () {
6737 // V8 ~ Chromium 42- fails only with 5+ elements
6738 var $instance = new NativeConstructor();
6739 var index = 5;
6740 while (index--) $instance[ADDER](index, index);
6741 return !$instance.has(-0);
6742 });
6743
6744 if (!ACCEPT_ITERABLES) {
6745 Constructor = wrapper(function (dummy, iterable) {
6746 anInstance(dummy, NativePrototype);
6747 var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
6748 if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
6749 return that;
6750 });
6751 Constructor.prototype = NativePrototype;
6752 NativePrototype.constructor = Constructor;
6753 }
6754
6755 if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
6756 fixMethod('delete');
6757 fixMethod('has');
6758 IS_MAP && fixMethod('get');
6759 }
6760
6761 if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
6762
6763 // weak collections should not contains .clear method
6764 if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
6765 }
6766
6767 exported[CONSTRUCTOR_NAME] = Constructor;
6768 $({ global: true, constructor: true, forced: Constructor != NativeConstructor }, exported);
6769
6770 setToStringTag(Constructor, CONSTRUCTOR_NAME);
6771
6772 if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
6773
6774 return Constructor;
6775};
6776
6777
6778/***/ }),
6779/* 231 */
6780/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6781
6782var $ = __webpack_require__(3);
6783var uncurryThis = __webpack_require__(14);
6784var hiddenKeys = __webpack_require__(56);
6785var isObject = __webpack_require__(21);
6786var hasOwn = __webpack_require__(40);
6787var defineProperty = (__webpack_require__(46).f);
6788var getOwnPropertyNamesModule = __webpack_require__(59);
6789var getOwnPropertyNamesExternalModule = __webpack_require__(77);
6790var isExtensible = __webpack_require__(232);
6791var uid = __webpack_require__(42);
6792var FREEZING = __webpack_require__(234);
6793
6794var REQUIRED = false;
6795var METADATA = uid('meta');
6796var id = 0;
6797
6798var setMetadata = function (it) {
6799 defineProperty(it, METADATA, { value: {
6800 objectID: 'O' + id++, // object ID
6801 weakData: {} // weak collections IDs
6802 } });
6803};
6804
6805var fastKey = function (it, create) {
6806 // return a primitive with prefix
6807 if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
6808 if (!hasOwn(it, METADATA)) {
6809 // can't set metadata to uncaught frozen object
6810 if (!isExtensible(it)) return 'F';
6811 // not necessary to add metadata
6812 if (!create) return 'E';
6813 // add missing metadata
6814 setMetadata(it);
6815 // return object ID
6816 } return it[METADATA].objectID;
6817};
6818
6819var getWeakData = function (it, create) {
6820 if (!hasOwn(it, METADATA)) {
6821 // can't set metadata to uncaught frozen object
6822 if (!isExtensible(it)) return true;
6823 // not necessary to add metadata
6824 if (!create) return false;
6825 // add missing metadata
6826 setMetadata(it);
6827 // return the store of weak collections IDs
6828 } return it[METADATA].weakData;
6829};
6830
6831// add metadata on freeze-family methods calling
6832var onFreeze = function (it) {
6833 if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it);
6834 return it;
6835};
6836
6837var enable = function () {
6838 meta.enable = function () { /* empty */ };
6839 REQUIRED = true;
6840 var getOwnPropertyNames = getOwnPropertyNamesModule.f;
6841 var splice = uncurryThis([].splice);
6842 var test = {};
6843 test[METADATA] = 1;
6844
6845 // prevent exposing of metadata key
6846 if (getOwnPropertyNames(test).length) {
6847 getOwnPropertyNamesModule.f = function (it) {
6848 var result = getOwnPropertyNames(it);
6849 for (var i = 0, length = result.length; i < length; i++) {
6850 if (result[i] === METADATA) {
6851 splice(result, i, 1);
6852 break;
6853 }
6854 } return result;
6855 };
6856
6857 $({ target: 'Object', stat: true, forced: true }, {
6858 getOwnPropertyNames: getOwnPropertyNamesExternalModule.f
6859 });
6860 }
6861};
6862
6863var meta = module.exports = {
6864 enable: enable,
6865 fastKey: fastKey,
6866 getWeakData: getWeakData,
6867 onFreeze: onFreeze
6868};
6869
6870hiddenKeys[METADATA] = true;
6871
6872
6873/***/ }),
6874/* 232 */
6875/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6876
6877var fails = __webpack_require__(7);
6878var isObject = __webpack_require__(21);
6879var classof = __webpack_require__(15);
6880var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(233);
6881
6882// eslint-disable-next-line es/no-object-isextensible -- safe
6883var $isExtensible = Object.isExtensible;
6884var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });
6885
6886// `Object.isExtensible` method
6887// https://tc39.es/ecma262/#sec-object.isextensible
6888module.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {
6889 if (!isObject(it)) return false;
6890 if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return false;
6891 return $isExtensible ? $isExtensible(it) : true;
6892} : $isExtensible;
6893
6894
6895/***/ }),
6896/* 233 */
6897/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6898
6899// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it
6900var fails = __webpack_require__(7);
6901
6902module.exports = fails(function () {
6903 if (typeof ArrayBuffer == 'function') {
6904 var buffer = new ArrayBuffer(8);
6905 // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe
6906 if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });
6907 }
6908});
6909
6910
6911/***/ }),
6912/* 234 */
6913/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6914
6915var fails = __webpack_require__(7);
6916
6917module.exports = !fails(function () {
6918 // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
6919 return Object.isExtensible(Object.preventExtensions({}));
6920});
6921
6922
6923/***/ }),
6924/* 235 */
6925/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6926
6927"use strict";
6928
6929var defineProperty = (__webpack_require__(46).f);
6930var create = __webpack_require__(73);
6931var defineBuiltIns = __webpack_require__(198);
6932var bind = __webpack_require__(86);
6933var anInstance = __webpack_require__(199);
6934var isNullOrUndefined = __webpack_require__(18);
6935var iterate = __webpack_require__(128);
6936var defineIterator = __webpack_require__(166);
6937var createIterResultObject = __webpack_require__(169);
6938var setSpecies = __webpack_require__(190);
6939var DESCRIPTORS = __webpack_require__(6);
6940var fastKey = (__webpack_require__(231).fastKey);
6941var InternalStateModule = __webpack_require__(53);
6942
6943var setInternalState = InternalStateModule.set;
6944var internalStateGetterFor = InternalStateModule.getterFor;
6945
6946module.exports = {
6947 getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
6948 var Constructor = wrapper(function (that, iterable) {
6949 anInstance(that, Prototype);
6950 setInternalState(that, {
6951 type: CONSTRUCTOR_NAME,
6952 index: create(null),
6953 first: undefined,
6954 last: undefined,
6955 size: 0
6956 });
6957 if (!DESCRIPTORS) that.size = 0;
6958 if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
6959 });
6960
6961 var Prototype = Constructor.prototype;
6962
6963 var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
6964
6965 var define = function (that, key, value) {
6966 var state = getInternalState(that);
6967 var entry = getEntry(that, key);
6968 var previous, index;
6969 // change existing entry
6970 if (entry) {
6971 entry.value = value;
6972 // create new entry
6973 } else {
6974 state.last = entry = {
6975 index: index = fastKey(key, true),
6976 key: key,
6977 value: value,
6978 previous: previous = state.last,
6979 next: undefined,
6980 removed: false
6981 };
6982 if (!state.first) state.first = entry;
6983 if (previous) previous.next = entry;
6984 if (DESCRIPTORS) state.size++;
6985 else that.size++;
6986 // add to index
6987 if (index !== 'F') state.index[index] = entry;
6988 } return that;
6989 };
6990
6991 var getEntry = function (that, key) {
6992 var state = getInternalState(that);
6993 // fast case
6994 var index = fastKey(key);
6995 var entry;
6996 if (index !== 'F') return state.index[index];
6997 // frozen object case
6998 for (entry = state.first; entry; entry = entry.next) {
6999 if (entry.key == key) return entry;
7000 }
7001 };
7002
7003 defineBuiltIns(Prototype, {
7004 // `{ Map, Set }.prototype.clear()` methods
7005 // https://tc39.es/ecma262/#sec-map.prototype.clear
7006 // https://tc39.es/ecma262/#sec-set.prototype.clear
7007 clear: function clear() {
7008 var that = this;
7009 var state = getInternalState(that);
7010 var data = state.index;
7011 var entry = state.first;
7012 while (entry) {
7013 entry.removed = true;
7014 if (entry.previous) entry.previous = entry.previous.next = undefined;
7015 delete data[entry.index];
7016 entry = entry.next;
7017 }
7018 state.first = state.last = undefined;
7019 if (DESCRIPTORS) state.size = 0;
7020 else that.size = 0;
7021 },
7022 // `{ Map, Set }.prototype.delete(key)` methods
7023 // https://tc39.es/ecma262/#sec-map.prototype.delete
7024 // https://tc39.es/ecma262/#sec-set.prototype.delete
7025 'delete': function (key) {
7026 var that = this;
7027 var state = getInternalState(that);
7028 var entry = getEntry(that, key);
7029 if (entry) {
7030 var next = entry.next;
7031 var prev = entry.previous;
7032 delete state.index[entry.index];
7033 entry.removed = true;
7034 if (prev) prev.next = next;
7035 if (next) next.previous = prev;
7036 if (state.first == entry) state.first = next;
7037 if (state.last == entry) state.last = prev;
7038 if (DESCRIPTORS) state.size--;
7039 else that.size--;
7040 } return !!entry;
7041 },
7042 // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
7043 // https://tc39.es/ecma262/#sec-map.prototype.foreach
7044 // https://tc39.es/ecma262/#sec-set.prototype.foreach
7045 forEach: function forEach(callbackfn /* , that = undefined */) {
7046 var state = getInternalState(this);
7047 var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
7048 var entry;
7049 while (entry = entry ? entry.next : state.first) {
7050 boundFunction(entry.value, entry.key, this);
7051 // revert to the last existing entry
7052 while (entry && entry.removed) entry = entry.previous;
7053 }
7054 },
7055 // `{ Map, Set}.prototype.has(key)` methods
7056 // https://tc39.es/ecma262/#sec-map.prototype.has
7057 // https://tc39.es/ecma262/#sec-set.prototype.has
7058 has: function has(key) {
7059 return !!getEntry(this, key);
7060 }
7061 });
7062
7063 defineBuiltIns(Prototype, IS_MAP ? {
7064 // `Map.prototype.get(key)` method
7065 // https://tc39.es/ecma262/#sec-map.prototype.get
7066 get: function get(key) {
7067 var entry = getEntry(this, key);
7068 return entry && entry.value;
7069 },
7070 // `Map.prototype.set(key, value)` method
7071 // https://tc39.es/ecma262/#sec-map.prototype.set
7072 set: function set(key, value) {
7073 return define(this, key === 0 ? 0 : key, value);
7074 }
7075 } : {
7076 // `Set.prototype.add(value)` method
7077 // https://tc39.es/ecma262/#sec-set.prototype.add
7078 add: function add(value) {
7079 return define(this, value = value === 0 ? 0 : value, value);
7080 }
7081 });
7082 if (DESCRIPTORS) defineProperty(Prototype, 'size', {
7083 get: function () {
7084 return getInternalState(this).size;
7085 }
7086 });
7087 return Constructor;
7088 },
7089 setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {
7090 var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
7091 var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
7092 var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
7093 // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods
7094 // https://tc39.es/ecma262/#sec-map.prototype.entries
7095 // https://tc39.es/ecma262/#sec-map.prototype.keys
7096 // https://tc39.es/ecma262/#sec-map.prototype.values
7097 // https://tc39.es/ecma262/#sec-map.prototype-@@iterator
7098 // https://tc39.es/ecma262/#sec-set.prototype.entries
7099 // https://tc39.es/ecma262/#sec-set.prototype.keys
7100 // https://tc39.es/ecma262/#sec-set.prototype.values
7101 // https://tc39.es/ecma262/#sec-set.prototype-@@iterator
7102 defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {
7103 setInternalState(this, {
7104 type: ITERATOR_NAME,
7105 target: iterated,
7106 state: getInternalCollectionState(iterated),
7107 kind: kind,
7108 last: undefined
7109 });
7110 }, function () {
7111 var state = getInternalIteratorState(this);
7112 var kind = state.kind;
7113 var entry = state.last;
7114 // revert to the last existing entry
7115 while (entry && entry.removed) entry = entry.previous;
7116 // get next entry
7117 if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
7118 // or finish the iteration
7119 state.target = undefined;
7120 return createIterResultObject(undefined, true);
7121 }
7122 // return step by kind
7123 if (kind == 'keys') return createIterResultObject(entry.key, false);
7124 if (kind == 'values') return createIterResultObject(entry.value, false);
7125 return createIterResultObject([entry.key, entry.value], false);
7126 }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
7127
7128 // `{ Map, Set }.prototype[@@species]` accessors
7129 // https://tc39.es/ecma262/#sec-get-map-@@species
7130 // https://tc39.es/ecma262/#sec-get-set-@@species
7131 setSpecies(CONSTRUCTOR_NAME);
7132 }
7133};
7134
7135
7136/***/ }),
7137/* 236 */
7138/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7139
7140var $ = __webpack_require__(3);
7141var log1p = __webpack_require__(237);
7142
7143// eslint-disable-next-line es/no-math-acosh -- required for testing
7144var $acosh = Math.acosh;
7145var log = Math.log;
7146var sqrt = Math.sqrt;
7147var LN2 = Math.LN2;
7148
7149var FORCED = !$acosh
7150 // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
7151 || Math.floor($acosh(Number.MAX_VALUE)) != 710
7152 // Tor Browser bug: Math.acosh(Infinity) -> NaN
7153 || $acosh(Infinity) != Infinity;
7154
7155// `Math.acosh` method
7156// https://tc39.es/ecma262/#sec-math.acosh
7157$({ target: 'Math', stat: true, forced: FORCED }, {
7158 acosh: function acosh(x) {
7159 var n = +x;
7160 return n < 1 ? NaN : n > 94906265.62425156
7161 ? log(n) + LN2
7162 : log1p(n - 1 + sqrt(n - 1) * sqrt(n + 1));
7163 }
7164});
7165
7166
7167/***/ }),
7168/* 237 */
7169/***/ (function(module) {
7170
7171var log = Math.log;
7172
7173// `Math.log1p` method implementation
7174// https://tc39.es/ecma262/#sec-math.log1p
7175// eslint-disable-next-line es/no-math-log1p -- safe
7176module.exports = Math.log1p || function log1p(x) {
7177 var n = +x;
7178 return n > -1e-8 && n < 1e-8 ? n - n * n / 2 : log(1 + n);
7179};
7180
7181
7182/***/ }),
7183/* 238 */
7184/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7185
7186var $ = __webpack_require__(3);
7187
7188// eslint-disable-next-line es/no-math-asinh -- required for testing
7189var $asinh = Math.asinh;
7190var log = Math.log;
7191var sqrt = Math.sqrt;
7192
7193function asinh(x) {
7194 var n = +x;
7195 return !isFinite(n) || n == 0 ? n : n < 0 ? -asinh(-n) : log(n + sqrt(n * n + 1));
7196}
7197
7198// `Math.asinh` method
7199// https://tc39.es/ecma262/#sec-math.asinh
7200// Tor Browser bug: Math.asinh(0) -> -0
7201$({ target: 'Math', stat: true, forced: !($asinh && 1 / $asinh(0) > 0) }, {
7202 asinh: asinh
7203});
7204
7205
7206/***/ }),
7207/* 239 */
7208/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7209
7210var $ = __webpack_require__(3);
7211
7212// eslint-disable-next-line es/no-math-atanh -- required for testing
7213var $atanh = Math.atanh;
7214var log = Math.log;
7215
7216// `Math.atanh` method
7217// https://tc39.es/ecma262/#sec-math.atanh
7218// Tor Browser bug: Math.atanh(-0) -> 0
7219$({ target: 'Math', stat: true, forced: !($atanh && 1 / $atanh(-0) < 0) }, {
7220 atanh: function atanh(x) {
7221 var n = +x;
7222 return n == 0 ? n : log((1 + n) / (1 - n)) / 2;
7223 }
7224});
7225
7226
7227/***/ }),
7228/* 240 */
7229/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7230
7231var $ = __webpack_require__(3);
7232var sign = __webpack_require__(241);
7233
7234var abs = Math.abs;
7235var pow = Math.pow;
7236
7237// `Math.cbrt` method
7238// https://tc39.es/ecma262/#sec-math.cbrt
7239$({ target: 'Math', stat: true }, {
7240 cbrt: function cbrt(x) {
7241 var n = +x;
7242 return sign(n) * pow(abs(n), 1 / 3);
7243 }
7244});
7245
7246
7247/***/ }),
7248/* 241 */
7249/***/ (function(module) {
7250
7251// `Math.sign` method implementation
7252// https://tc39.es/ecma262/#sec-math.sign
7253// eslint-disable-next-line es/no-math-sign -- safe
7254module.exports = Math.sign || function sign(x) {
7255 var n = +x;
7256 // eslint-disable-next-line no-self-compare -- NaN check
7257 return n == 0 || n != n ? n : n < 0 ? -1 : 1;
7258};
7259
7260
7261/***/ }),
7262/* 242 */
7263/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7264
7265var $ = __webpack_require__(3);
7266
7267var floor = Math.floor;
7268var log = Math.log;
7269var LOG2E = Math.LOG2E;
7270
7271// `Math.clz32` method
7272// https://tc39.es/ecma262/#sec-math.clz32
7273$({ target: 'Math', stat: true }, {
7274 clz32: function clz32(x) {
7275 var n = x >>> 0;
7276 return n ? 31 - floor(log(n + 0.5) * LOG2E) : 32;
7277 }
7278});
7279
7280
7281/***/ }),
7282/* 243 */
7283/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7284
7285var $ = __webpack_require__(3);
7286var expm1 = __webpack_require__(244);
7287
7288// eslint-disable-next-line es/no-math-cosh -- required for testing
7289var $cosh = Math.cosh;
7290var abs = Math.abs;
7291var E = Math.E;
7292
7293// `Math.cosh` method
7294// https://tc39.es/ecma262/#sec-math.cosh
7295$({ target: 'Math', stat: true, forced: !$cosh || $cosh(710) === Infinity }, {
7296 cosh: function cosh(x) {
7297 var t = expm1(abs(x) - 1) + 1;
7298 return (t + 1 / (t * E * E)) * (E / 2);
7299 }
7300});
7301
7302
7303/***/ }),
7304/* 244 */
7305/***/ (function(module) {
7306
7307// eslint-disable-next-line es/no-math-expm1 -- safe
7308var $expm1 = Math.expm1;
7309var exp = Math.exp;
7310
7311// `Math.expm1` method implementation
7312// https://tc39.es/ecma262/#sec-math.expm1
7313module.exports = (!$expm1
7314 // Old FF bug
7315 || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
7316 // Tor Browser bug
7317 || $expm1(-2e-17) != -2e-17
7318) ? function expm1(x) {
7319 var n = +x;
7320 return n == 0 ? n : n > -1e-6 && n < 1e-6 ? n + n * n / 2 : exp(n) - 1;
7321} : $expm1;
7322
7323
7324/***/ }),
7325/* 245 */
7326/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7327
7328var $ = __webpack_require__(3);
7329var expm1 = __webpack_require__(244);
7330
7331// `Math.expm1` method
7332// https://tc39.es/ecma262/#sec-math.expm1
7333// eslint-disable-next-line es/no-math-expm1 -- required for testing
7334$({ target: 'Math', stat: true, forced: expm1 != Math.expm1 }, { expm1: expm1 });
7335
7336
7337/***/ }),
7338/* 246 */
7339/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7340
7341var $ = __webpack_require__(3);
7342var fround = __webpack_require__(247);
7343
7344// `Math.fround` method
7345// https://tc39.es/ecma262/#sec-math.fround
7346$({ target: 'Math', stat: true }, { fround: fround });
7347
7348
7349/***/ }),
7350/* 247 */
7351/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
7352
7353var sign = __webpack_require__(241);
7354
7355var abs = Math.abs;
7356var pow = Math.pow;
7357var EPSILON = pow(2, -52);
7358var EPSILON32 = pow(2, -23);
7359var MAX32 = pow(2, 127) * (2 - EPSILON32);
7360var MIN32 = pow(2, -126);
7361
7362var roundTiesToEven = function (n) {
7363 return n + 1 / EPSILON - 1 / EPSILON;
7364};
7365
7366// `Math.fround` method implementation
7367// https://tc39.es/ecma262/#sec-math.fround
7368// eslint-disable-next-line es/no-math-fround -- safe
7369module.exports = Math.fround || function fround(x) {
7370 var n = +x;
7371 var $abs = abs(n);
7372 var $sign = sign(n);
7373 var a, result;
7374 if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
7375 a = (1 + EPSILON32 / EPSILON) * $abs;
7376 result = a - (a - $abs);
7377 // eslint-disable-next-line no-self-compare -- NaN check
7378 if (result > MAX32 || result != result) return $sign * Infinity;
7379 return $sign * result;
7380};
7381
7382
7383/***/ }),
7384/* 248 */
7385/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7386
7387var $ = __webpack_require__(3);
7388
7389// eslint-disable-next-line es/no-math-hypot -- required for testing
7390var $hypot = Math.hypot;
7391var abs = Math.abs;
7392var sqrt = Math.sqrt;
7393
7394// Chrome 77 bug
7395// https://bugs.chromium.org/p/v8/issues/detail?id=9546
7396var BUGGY = !!$hypot && $hypot(Infinity, NaN) !== Infinity;
7397
7398// `Math.hypot` method
7399// https://tc39.es/ecma262/#sec-math.hypot
7400$({ target: 'Math', stat: true, arity: 2, forced: BUGGY }, {
7401 // eslint-disable-next-line no-unused-vars -- required for `.length`
7402 hypot: function hypot(value1, value2) {
7403 var sum = 0;
7404 var i = 0;
7405 var aLen = arguments.length;
7406 var larg = 0;
7407 var arg, div;
7408 while (i < aLen) {
7409 arg = abs(arguments[i++]);
7410 if (larg < arg) {
7411 div = larg / arg;
7412 sum = sum * div * div + 1;
7413 larg = arg;
7414 } else if (arg > 0) {
7415 div = arg / larg;
7416 sum += div * div;
7417 } else sum += arg;
7418 }
7419 return larg === Infinity ? Infinity : larg * sqrt(sum);
7420 }
7421});
7422
7423
7424/***/ }),
7425/* 249 */
7426/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7427
7428var $ = __webpack_require__(3);
7429var fails = __webpack_require__(7);
7430
7431// eslint-disable-next-line es/no-math-imul -- required for testing
7432var $imul = Math.imul;
7433
7434var FORCED = fails(function () {
7435 return $imul(0xFFFFFFFF, 5) != -5 || $imul.length != 2;
7436});
7437
7438// `Math.imul` method
7439// https://tc39.es/ecma262/#sec-math.imul
7440// some WebKit versions fails with big numbers, some has wrong arity
7441$({ target: 'Math', stat: true, forced: FORCED }, {
7442 imul: function imul(x, y) {
7443 var UINT16 = 0xFFFF;
7444 var xn = +x;
7445 var yn = +y;
7446 var xl = UINT16 & xn;
7447 var yl = UINT16 & yn;
7448 return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
7449 }
7450});
7451
7452
7453/***/ }),
7454/* 250 */
7455/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7456
7457var $ = __webpack_require__(3);
7458var log10 = __webpack_require__(251);
7459
7460// `Math.log10` method
7461// https://tc39.es/ecma262/#sec-math.log10
7462$({ target: 'Math', stat: true }, {
7463 log10: log10
7464});
7465
7466
7467/***/ }),
7468/* 251 */
7469/***/ (function(module) {
7470
7471var log = Math.log;
7472var LOG10E = Math.LOG10E;
7473
7474// eslint-disable-next-line es/no-math-log10 -- safe
7475module.exports = Math.log10 || function log10(x) {
7476 return log(x) * LOG10E;
7477};
7478
7479
7480/***/ }),
7481/* 252 */
7482/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7483
7484var $ = __webpack_require__(3);
7485var log1p = __webpack_require__(237);
7486
7487// `Math.log1p` method
7488// https://tc39.es/ecma262/#sec-math.log1p
7489$({ target: 'Math', stat: true }, { log1p: log1p });
7490
7491
7492/***/ }),
7493/* 253 */
7494/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7495
7496var $ = __webpack_require__(3);
7497
7498var log = Math.log;
7499var LN2 = Math.LN2;
7500
7501// `Math.log2` method
7502// https://tc39.es/ecma262/#sec-math.log2
7503$({ target: 'Math', stat: true }, {
7504 log2: function log2(x) {
7505 return log(x) / LN2;
7506 }
7507});
7508
7509
7510/***/ }),
7511/* 254 */
7512/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7513
7514var $ = __webpack_require__(3);
7515var sign = __webpack_require__(241);
7516
7517// `Math.sign` method
7518// https://tc39.es/ecma262/#sec-math.sign
7519$({ target: 'Math', stat: true }, {
7520 sign: sign
7521});
7522
7523
7524/***/ }),
7525/* 255 */
7526/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7527
7528var $ = __webpack_require__(3);
7529var fails = __webpack_require__(7);
7530var expm1 = __webpack_require__(244);
7531
7532var abs = Math.abs;
7533var exp = Math.exp;
7534var E = Math.E;
7535
7536var FORCED = fails(function () {
7537 // eslint-disable-next-line es/no-math-sinh -- required for testing
7538 return Math.sinh(-2e-17) != -2e-17;
7539});
7540
7541// `Math.sinh` method
7542// https://tc39.es/ecma262/#sec-math.sinh
7543// V8 near Chromium 38 has a problem with very small numbers
7544$({ target: 'Math', stat: true, forced: FORCED }, {
7545 sinh: function sinh(x) {
7546 var n = +x;
7547 return abs(n) < 1 ? (expm1(n) - expm1(-n)) / 2 : (exp(n - 1) - exp(-n - 1)) * (E / 2);
7548 }
7549});
7550
7551
7552/***/ }),
7553/* 256 */
7554/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7555
7556var $ = __webpack_require__(3);
7557var expm1 = __webpack_require__(244);
7558
7559var exp = Math.exp;
7560
7561// `Math.tanh` method
7562// https://tc39.es/ecma262/#sec-math.tanh
7563$({ target: 'Math', stat: true }, {
7564 tanh: function tanh(x) {
7565 var n = +x;
7566 var a = expm1(n);
7567 var b = expm1(-n);
7568 return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(n) + exp(-n));
7569 }
7570});
7571
7572
7573/***/ }),
7574/* 257 */
7575/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7576
7577var setToStringTag = __webpack_require__(84);
7578
7579// Math[@@toStringTag] property
7580// https://tc39.es/ecma262/#sec-math-@@tostringtag
7581setToStringTag(Math, 'Math', true);
7582
7583
7584/***/ }),
7585/* 258 */
7586/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7587
7588var $ = __webpack_require__(3);
7589var trunc = __webpack_require__(64);
7590
7591// `Math.trunc` method
7592// https://tc39.es/ecma262/#sec-math.trunc
7593$({ target: 'Math', stat: true }, {
7594 trunc: trunc
7595});
7596
7597
7598/***/ }),
7599/* 259 */
7600/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7601
7602"use strict";
7603
7604var DESCRIPTORS = __webpack_require__(6);
7605var global = __webpack_require__(4);
7606var uncurryThis = __webpack_require__(14);
7607var isForced = __webpack_require__(69);
7608var defineBuiltIn = __webpack_require__(49);
7609var hasOwn = __webpack_require__(40);
7610var inheritIfRequired = __webpack_require__(117);
7611var isPrototypeOf = __webpack_require__(26);
7612var isSymbol = __webpack_require__(24);
7613var toPrimitive = __webpack_require__(20);
7614var fails = __webpack_require__(7);
7615var getOwnPropertyNames = (__webpack_require__(59).f);
7616var getOwnPropertyDescriptor = (__webpack_require__(5).f);
7617var defineProperty = (__webpack_require__(46).f);
7618var thisNumberValue = __webpack_require__(260);
7619var trim = (__webpack_require__(261).trim);
7620
7621var NUMBER = 'Number';
7622var NativeNumber = global[NUMBER];
7623var NumberPrototype = NativeNumber.prototype;
7624var TypeError = global.TypeError;
7625var arraySlice = uncurryThis(''.slice);
7626var charCodeAt = uncurryThis(''.charCodeAt);
7627
7628// `ToNumeric` abstract operation
7629// https://tc39.es/ecma262/#sec-tonumeric
7630var toNumeric = function (value) {
7631 var primValue = toPrimitive(value, 'number');
7632 return typeof primValue == 'bigint' ? primValue : toNumber(primValue);
7633};
7634
7635// `ToNumber` abstract operation
7636// https://tc39.es/ecma262/#sec-tonumber
7637var toNumber = function (argument) {
7638 var it = toPrimitive(argument, 'number');
7639 var first, third, radix, maxCode, digits, length, index, code;
7640 if (isSymbol(it)) throw TypeError('Cannot convert a Symbol value to a number');
7641 if (typeof it == 'string' && it.length > 2) {
7642 it = trim(it);
7643 first = charCodeAt(it, 0);
7644 if (first === 43 || first === 45) {
7645 third = charCodeAt(it, 2);
7646 if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
7647 } else if (first === 48) {
7648 switch (charCodeAt(it, 1)) {
7649 case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
7650 case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
7651 default: return +it;
7652 }
7653 digits = arraySlice(it, 2);
7654 length = digits.length;
7655 for (index = 0; index < length; index++) {
7656 code = charCodeAt(digits, index);
7657 // parseInt parses a string to a first unavailable symbol
7658 // but ToNumber should return NaN if a string contains unavailable symbols
7659 if (code < 48 || code > maxCode) return NaN;
7660 } return parseInt(digits, radix);
7661 }
7662 } return +it;
7663};
7664
7665// `Number` constructor
7666// https://tc39.es/ecma262/#sec-number-constructor
7667if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
7668 var NumberWrapper = function Number(value) {
7669 var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));
7670 var dummy = this;
7671 // check on 1..constructor(foo) case
7672 return isPrototypeOf(NumberPrototype, dummy) && fails(function () { thisNumberValue(dummy); })
7673 ? inheritIfRequired(Object(n), dummy, NumberWrapper) : n;
7674 };
7675 for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (
7676 // ES3:
7677 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
7678 // ES2015 (in case, if modules with ES2015 Number statics required before):
7679 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' +
7680 // ESNext
7681 'fromString,range'
7682 ).split(','), j = 0, key; keys.length > j; j++) {
7683 if (hasOwn(NativeNumber, key = keys[j]) && !hasOwn(NumberWrapper, key)) {
7684 defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
7685 }
7686 }
7687 NumberWrapper.prototype = NumberPrototype;
7688 NumberPrototype.constructor = NumberWrapper;
7689 defineBuiltIn(global, NUMBER, NumberWrapper, { constructor: true });
7690}
7691
7692
7693/***/ }),
7694/* 260 */
7695/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
7696
7697var uncurryThis = __webpack_require__(14);
7698
7699// `thisNumberValue` abstract operation
7700// https://tc39.es/ecma262/#sec-thisnumbervalue
7701module.exports = uncurryThis(1.0.valueOf);
7702
7703
7704/***/ }),
7705/* 261 */
7706/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
7707
7708var uncurryThis = __webpack_require__(14);
7709var requireObjectCoercible = __webpack_require__(17);
7710var toString = __webpack_require__(70);
7711var whitespaces = __webpack_require__(262);
7712
7713var replace = uncurryThis(''.replace);
7714var whitespace = '[' + whitespaces + ']';
7715var ltrim = RegExp('^' + whitespace + whitespace + '*');
7716var rtrim = RegExp(whitespace + whitespace + '*$');
7717
7718// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
7719var createMethod = function (TYPE) {
7720 return function ($this) {
7721 var string = toString(requireObjectCoercible($this));
7722 if (TYPE & 1) string = replace(string, ltrim, '');
7723 if (TYPE & 2) string = replace(string, rtrim, '');
7724 return string;
7725 };
7726};
7727
7728module.exports = {
7729 // `String.prototype.{ trimLeft, trimStart }` methods
7730 // https://tc39.es/ecma262/#sec-string.prototype.trimstart
7731 start: createMethod(1),
7732 // `String.prototype.{ trimRight, trimEnd }` methods
7733 // https://tc39.es/ecma262/#sec-string.prototype.trimend
7734 end: createMethod(2),
7735 // `String.prototype.trim` method
7736 // https://tc39.es/ecma262/#sec-string.prototype.trim
7737 trim: createMethod(3)
7738};
7739
7740
7741/***/ }),
7742/* 262 */
7743/***/ (function(module) {
7744
7745// a string of all valid unicode whitespaces
7746module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
7747 '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
7748
7749
7750/***/ }),
7751/* 263 */
7752/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7753
7754var $ = __webpack_require__(3);
7755
7756// `Number.EPSILON` constant
7757// https://tc39.es/ecma262/#sec-number.epsilon
7758$({ target: 'Number', stat: true, nonConfigurable: true, nonWritable: true }, {
7759 EPSILON: Math.pow(2, -52)
7760});
7761
7762
7763/***/ }),
7764/* 264 */
7765/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7766
7767var $ = __webpack_require__(3);
7768var numberIsFinite = __webpack_require__(265);
7769
7770// `Number.isFinite` method
7771// https://tc39.es/ecma262/#sec-number.isfinite
7772$({ target: 'Number', stat: true }, { isFinite: numberIsFinite });
7773
7774
7775/***/ }),
7776/* 265 */
7777/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
7778
7779var global = __webpack_require__(4);
7780
7781var globalIsFinite = global.isFinite;
7782
7783// `Number.isFinite` method
7784// https://tc39.es/ecma262/#sec-number.isfinite
7785// eslint-disable-next-line es/no-number-isfinite -- safe
7786module.exports = Number.isFinite || function isFinite(it) {
7787 return typeof it == 'number' && globalIsFinite(it);
7788};
7789
7790
7791/***/ }),
7792/* 266 */
7793/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7794
7795var $ = __webpack_require__(3);
7796var isIntegralNumber = __webpack_require__(267);
7797
7798// `Number.isInteger` method
7799// https://tc39.es/ecma262/#sec-number.isinteger
7800$({ target: 'Number', stat: true }, {
7801 isInteger: isIntegralNumber
7802});
7803
7804
7805/***/ }),
7806/* 267 */
7807/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
7808
7809var isObject = __webpack_require__(21);
7810
7811var floor = Math.floor;
7812
7813// `IsIntegralNumber` abstract operation
7814// https://tc39.es/ecma262/#sec-isintegralnumber
7815// eslint-disable-next-line es/no-number-isinteger -- safe
7816module.exports = Number.isInteger || function isInteger(it) {
7817 return !isObject(it) && isFinite(it) && floor(it) === it;
7818};
7819
7820
7821/***/ }),
7822/* 268 */
7823/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7824
7825var $ = __webpack_require__(3);
7826
7827// `Number.isNaN` method
7828// https://tc39.es/ecma262/#sec-number.isnan
7829$({ target: 'Number', stat: true }, {
7830 isNaN: function isNaN(number) {
7831 // eslint-disable-next-line no-self-compare -- NaN check
7832 return number != number;
7833 }
7834});
7835
7836
7837/***/ }),
7838/* 269 */
7839/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7840
7841var $ = __webpack_require__(3);
7842var isIntegralNumber = __webpack_require__(267);
7843
7844var abs = Math.abs;
7845
7846// `Number.isSafeInteger` method
7847// https://tc39.es/ecma262/#sec-number.issafeinteger
7848$({ target: 'Number', stat: true }, {
7849 isSafeInteger: function isSafeInteger(number) {
7850 return isIntegralNumber(number) && abs(number) <= 0x1FFFFFFFFFFFFF;
7851 }
7852});
7853
7854
7855/***/ }),
7856/* 270 */
7857/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7858
7859var $ = __webpack_require__(3);
7860
7861// `Number.MAX_SAFE_INTEGER` constant
7862// https://tc39.es/ecma262/#sec-number.max_safe_integer
7863$({ target: 'Number', stat: true, nonConfigurable: true, nonWritable: true }, {
7864 MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF
7865});
7866
7867
7868/***/ }),
7869/* 271 */
7870/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7871
7872var $ = __webpack_require__(3);
7873
7874// `Number.MIN_SAFE_INTEGER` constant
7875// https://tc39.es/ecma262/#sec-number.min_safe_integer
7876$({ target: 'Number', stat: true, nonConfigurable: true, nonWritable: true }, {
7877 MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF
7878});
7879
7880
7881/***/ }),
7882/* 272 */
7883/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7884
7885var $ = __webpack_require__(3);
7886var parseFloat = __webpack_require__(273);
7887
7888// `Number.parseFloat` method
7889// https://tc39.es/ecma262/#sec-number.parseFloat
7890// eslint-disable-next-line es/no-number-parsefloat -- required for testing
7891$({ target: 'Number', stat: true, forced: Number.parseFloat != parseFloat }, {
7892 parseFloat: parseFloat
7893});
7894
7895
7896/***/ }),
7897/* 273 */
7898/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
7899
7900var global = __webpack_require__(4);
7901var fails = __webpack_require__(7);
7902var uncurryThis = __webpack_require__(14);
7903var toString = __webpack_require__(70);
7904var trim = (__webpack_require__(261).trim);
7905var whitespaces = __webpack_require__(262);
7906
7907var charAt = uncurryThis(''.charAt);
7908var $parseFloat = global.parseFloat;
7909var Symbol = global.Symbol;
7910var ITERATOR = Symbol && Symbol.iterator;
7911var FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity
7912 // MS Edge 18- broken with boxed symbols
7913 || (ITERATOR && !fails(function () { $parseFloat(Object(ITERATOR)); }));
7914
7915// `parseFloat` method
7916// https://tc39.es/ecma262/#sec-parsefloat-string
7917module.exports = FORCED ? function parseFloat(string) {
7918 var trimmedString = trim(toString(string));
7919 var result = $parseFloat(trimmedString);
7920 return result === 0 && charAt(trimmedString, 0) == '-' ? -0 : result;
7921} : $parseFloat;
7922
7923
7924/***/ }),
7925/* 274 */
7926/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7927
7928var $ = __webpack_require__(3);
7929var parseInt = __webpack_require__(275);
7930
7931// `Number.parseInt` method
7932// https://tc39.es/ecma262/#sec-number.parseint
7933// eslint-disable-next-line es/no-number-parseint -- required for testing
7934$({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, {
7935 parseInt: parseInt
7936});
7937
7938
7939/***/ }),
7940/* 275 */
7941/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
7942
7943var global = __webpack_require__(4);
7944var fails = __webpack_require__(7);
7945var uncurryThis = __webpack_require__(14);
7946var toString = __webpack_require__(70);
7947var trim = (__webpack_require__(261).trim);
7948var whitespaces = __webpack_require__(262);
7949
7950var $parseInt = global.parseInt;
7951var Symbol = global.Symbol;
7952var ITERATOR = Symbol && Symbol.iterator;
7953var hex = /^[+-]?0x/i;
7954var exec = uncurryThis(hex.exec);
7955var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22
7956 // MS Edge 18- broken with boxed symbols
7957 || (ITERATOR && !fails(function () { $parseInt(Object(ITERATOR)); }));
7958
7959// `parseInt` method
7960// https://tc39.es/ecma262/#sec-parseint-string-radix
7961module.exports = FORCED ? function parseInt(string, radix) {
7962 var S = trim(toString(string));
7963 return $parseInt(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
7964} : $parseInt;
7965
7966
7967/***/ }),
7968/* 276 */
7969/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
7970
7971"use strict";
7972
7973var $ = __webpack_require__(3);
7974var uncurryThis = __webpack_require__(14);
7975var toIntegerOrInfinity = __webpack_require__(63);
7976var thisNumberValue = __webpack_require__(260);
7977var $repeat = __webpack_require__(216);
7978var log10 = __webpack_require__(251);
7979var fails = __webpack_require__(7);
7980
7981var $RangeError = RangeError;
7982var $String = String;
7983var $isFinite = isFinite;
7984var abs = Math.abs;
7985var floor = Math.floor;
7986var pow = Math.pow;
7987var round = Math.round;
7988var nativeToExponential = uncurryThis(1.0.toExponential);
7989var repeat = uncurryThis($repeat);
7990var stringSlice = uncurryThis(''.slice);
7991
7992// Edge 17-
7993var ROUNDS_PROPERLY = nativeToExponential(-6.9e-11, 4) === '-6.9000e-11'
7994 // IE11- && Edge 14-
7995 && nativeToExponential(1.255, 2) === '1.25e+0'
7996 // FF86-, V8 ~ Chrome 49-50
7997 && nativeToExponential(12345, 3) === '1.235e+4'
7998 // FF86-, V8 ~ Chrome 49-50
7999 && nativeToExponential(25, 0) === '3e+1';
8000
8001// IE8-
8002var THROWS_ON_INFINITY_FRACTION = fails(function () {
8003 nativeToExponential(1, Infinity);
8004}) && fails(function () {
8005 nativeToExponential(1, -Infinity);
8006});
8007
8008// Safari <11 && FF <50
8009var PROPER_NON_FINITE_THIS_CHECK = !fails(function () {
8010 nativeToExponential(Infinity, Infinity);
8011}) && !fails(function () {
8012 nativeToExponential(NaN, Infinity);
8013});
8014
8015var FORCED = !ROUNDS_PROPERLY || !THROWS_ON_INFINITY_FRACTION || !PROPER_NON_FINITE_THIS_CHECK;
8016
8017// `Number.prototype.toExponential` method
8018// https://tc39.es/ecma262/#sec-number.prototype.toexponential
8019$({ target: 'Number', proto: true, forced: FORCED }, {
8020 toExponential: function toExponential(fractionDigits) {
8021 var x = thisNumberValue(this);
8022 if (fractionDigits === undefined) return nativeToExponential(x);
8023 var f = toIntegerOrInfinity(fractionDigits);
8024 if (!$isFinite(x)) return String(x);
8025 // TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation
8026 if (f < 0 || f > 20) throw $RangeError('Incorrect fraction digits');
8027 if (ROUNDS_PROPERLY) return nativeToExponential(x, f);
8028 var s = '';
8029 var m = '';
8030 var e = 0;
8031 var c = '';
8032 var d = '';
8033 if (x < 0) {
8034 s = '-';
8035 x = -x;
8036 }
8037 if (x === 0) {
8038 e = 0;
8039 m = repeat('0', f + 1);
8040 } else {
8041 // this block is based on https://gist.github.com/SheetJSDev/1100ad56b9f856c95299ed0e068eea08
8042 // TODO: improve accuracy with big fraction digits
8043 var l = log10(x);
8044 e = floor(l);
8045 var n = 0;
8046 var w = pow(10, e - f);
8047 n = round(x / w);
8048 if (2 * x >= (2 * n + 1) * w) {
8049 n += 1;
8050 }
8051 if (n >= pow(10, f + 1)) {
8052 n /= 10;
8053 e += 1;
8054 }
8055 m = $String(n);
8056 }
8057 if (f !== 0) {
8058 m = stringSlice(m, 0, 1) + '.' + stringSlice(m, 1);
8059 }
8060 if (e === 0) {
8061 c = '+';
8062 d = '0';
8063 } else {
8064 c = e > 0 ? '+' : '-';
8065 d = $String(abs(e));
8066 }
8067 m += 'e' + c + d;
8068 return s + m;
8069 }
8070});
8071
8072
8073/***/ }),
8074/* 277 */
8075/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8076
8077"use strict";
8078
8079var $ = __webpack_require__(3);
8080var uncurryThis = __webpack_require__(14);
8081var toIntegerOrInfinity = __webpack_require__(63);
8082var thisNumberValue = __webpack_require__(260);
8083var $repeat = __webpack_require__(216);
8084var fails = __webpack_require__(7);
8085
8086var $RangeError = RangeError;
8087var $String = String;
8088var floor = Math.floor;
8089var repeat = uncurryThis($repeat);
8090var stringSlice = uncurryThis(''.slice);
8091var nativeToFixed = uncurryThis(1.0.toFixed);
8092
8093var pow = function (x, n, acc) {
8094 return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
8095};
8096
8097var log = function (x) {
8098 var n = 0;
8099 var x2 = x;
8100 while (x2 >= 4096) {
8101 n += 12;
8102 x2 /= 4096;
8103 }
8104 while (x2 >= 2) {
8105 n += 1;
8106 x2 /= 2;
8107 } return n;
8108};
8109
8110var multiply = function (data, n, c) {
8111 var index = -1;
8112 var c2 = c;
8113 while (++index < 6) {
8114 c2 += n * data[index];
8115 data[index] = c2 % 1e7;
8116 c2 = floor(c2 / 1e7);
8117 }
8118};
8119
8120var divide = function (data, n) {
8121 var index = 6;
8122 var c = 0;
8123 while (--index >= 0) {
8124 c += data[index];
8125 data[index] = floor(c / n);
8126 c = (c % n) * 1e7;
8127 }
8128};
8129
8130var dataToString = function (data) {
8131 var index = 6;
8132 var s = '';
8133 while (--index >= 0) {
8134 if (s !== '' || index === 0 || data[index] !== 0) {
8135 var t = $String(data[index]);
8136 s = s === '' ? t : s + repeat('0', 7 - t.length) + t;
8137 }
8138 } return s;
8139};
8140
8141var FORCED = fails(function () {
8142 return nativeToFixed(0.00008, 3) !== '0.000' ||
8143 nativeToFixed(0.9, 0) !== '1' ||
8144 nativeToFixed(1.255, 2) !== '1.25' ||
8145 nativeToFixed(1000000000000000128.0, 0) !== '1000000000000000128';
8146}) || !fails(function () {
8147 // V8 ~ Android 4.3-
8148 nativeToFixed({});
8149});
8150
8151// `Number.prototype.toFixed` method
8152// https://tc39.es/ecma262/#sec-number.prototype.tofixed
8153$({ target: 'Number', proto: true, forced: FORCED }, {
8154 toFixed: function toFixed(fractionDigits) {
8155 var number = thisNumberValue(this);
8156 var fractDigits = toIntegerOrInfinity(fractionDigits);
8157 var data = [0, 0, 0, 0, 0, 0];
8158 var sign = '';
8159 var result = '0';
8160 var e, z, j, k;
8161
8162 // TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation
8163 if (fractDigits < 0 || fractDigits > 20) throw $RangeError('Incorrect fraction digits');
8164 // eslint-disable-next-line no-self-compare -- NaN check
8165 if (number != number) return 'NaN';
8166 if (number <= -1e21 || number >= 1e21) return $String(number);
8167 if (number < 0) {
8168 sign = '-';
8169 number = -number;
8170 }
8171 if (number > 1e-21) {
8172 e = log(number * pow(2, 69, 1)) - 69;
8173 z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);
8174 z *= 0x10000000000000;
8175 e = 52 - e;
8176 if (e > 0) {
8177 multiply(data, 0, z);
8178 j = fractDigits;
8179 while (j >= 7) {
8180 multiply(data, 1e7, 0);
8181 j -= 7;
8182 }
8183 multiply(data, pow(10, j, 1), 0);
8184 j = e - 1;
8185 while (j >= 23) {
8186 divide(data, 1 << 23);
8187 j -= 23;
8188 }
8189 divide(data, 1 << j);
8190 multiply(data, 1, 1);
8191 divide(data, 2);
8192 result = dataToString(data);
8193 } else {
8194 multiply(data, 0, z);
8195 multiply(data, 1 << -e, 0);
8196 result = dataToString(data) + repeat('0', fractDigits);
8197 }
8198 }
8199 if (fractDigits > 0) {
8200 k = result.length;
8201 result = sign + (k <= fractDigits
8202 ? '0.' + repeat('0', fractDigits - k) + result
8203 : stringSlice(result, 0, k - fractDigits) + '.' + stringSlice(result, k - fractDigits));
8204 } else {
8205 result = sign + result;
8206 } return result;
8207 }
8208});
8209
8210
8211/***/ }),
8212/* 278 */
8213/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8214
8215"use strict";
8216
8217var $ = __webpack_require__(3);
8218var uncurryThis = __webpack_require__(14);
8219var fails = __webpack_require__(7);
8220var thisNumberValue = __webpack_require__(260);
8221
8222var nativeToPrecision = uncurryThis(1.0.toPrecision);
8223
8224var FORCED = fails(function () {
8225 // IE7-
8226 return nativeToPrecision(1, undefined) !== '1';
8227}) || !fails(function () {
8228 // V8 ~ Android 4.3-
8229 nativeToPrecision({});
8230});
8231
8232// `Number.prototype.toPrecision` method
8233// https://tc39.es/ecma262/#sec-number.prototype.toprecision
8234$({ target: 'Number', proto: true, forced: FORCED }, {
8235 toPrecision: function toPrecision(precision) {
8236 return precision === undefined
8237 ? nativeToPrecision(thisNumberValue(this))
8238 : nativeToPrecision(thisNumberValue(this), precision);
8239 }
8240});
8241
8242
8243/***/ }),
8244/* 279 */
8245/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8246
8247var $ = __webpack_require__(3);
8248var assign = __webpack_require__(280);
8249
8250// `Object.assign` method
8251// https://tc39.es/ecma262/#sec-object.assign
8252// eslint-disable-next-line es/no-object-assign -- required for testing
8253$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
8254 assign: assign
8255});
8256
8257
8258/***/ }),
8259/* 280 */
8260/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
8261
8262"use strict";
8263
8264var DESCRIPTORS = __webpack_require__(6);
8265var uncurryThis = __webpack_require__(14);
8266var call = __webpack_require__(8);
8267var fails = __webpack_require__(7);
8268var objectKeys = __webpack_require__(75);
8269var getOwnPropertySymbolsModule = __webpack_require__(68);
8270var propertyIsEnumerableModule = __webpack_require__(10);
8271var toObject = __webpack_require__(41);
8272var IndexedObject = __webpack_require__(13);
8273
8274// eslint-disable-next-line es/no-object-assign -- safe
8275var $assign = Object.assign;
8276// eslint-disable-next-line es/no-object-defineproperty -- required for testing
8277var defineProperty = Object.defineProperty;
8278var concat = uncurryThis([].concat);
8279
8280// `Object.assign` method
8281// https://tc39.es/ecma262/#sec-object.assign
8282module.exports = !$assign || fails(function () {
8283 // should have correct order of operations (Edge bug)
8284 if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
8285 enumerable: true,
8286 get: function () {
8287 defineProperty(this, 'b', {
8288 value: 3,
8289 enumerable: false
8290 });
8291 }
8292 }), { b: 2 })).b !== 1) return true;
8293 // should work with symbols and should have deterministic property order (V8 bug)
8294 var A = {};
8295 var B = {};
8296 // eslint-disable-next-line es/no-symbol -- safe
8297 var symbol = Symbol();
8298 var alphabet = 'abcdefghijklmnopqrst';
8299 A[symbol] = 7;
8300 alphabet.split('').forEach(function (chr) { B[chr] = chr; });
8301 return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
8302}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
8303 var T = toObject(target);
8304 var argumentsLength = arguments.length;
8305 var index = 1;
8306 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
8307 var propertyIsEnumerable = propertyIsEnumerableModule.f;
8308 while (argumentsLength > index) {
8309 var S = IndexedObject(arguments[index++]);
8310 var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
8311 var length = keys.length;
8312 var j = 0;
8313 var key;
8314 while (length > j) {
8315 key = keys[j++];
8316 if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
8317 }
8318 } return T;
8319} : $assign;
8320
8321
8322/***/ }),
8323/* 281 */
8324/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8325
8326// TODO: Remove from `core-js@4`
8327var $ = __webpack_require__(3);
8328var DESCRIPTORS = __webpack_require__(6);
8329var create = __webpack_require__(73);
8330
8331// `Object.create` method
8332// https://tc39.es/ecma262/#sec-object.create
8333$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
8334 create: create
8335});
8336
8337
8338/***/ }),
8339/* 282 */
8340/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8341
8342"use strict";
8343
8344var $ = __webpack_require__(3);
8345var DESCRIPTORS = __webpack_require__(6);
8346var FORCED = __webpack_require__(283);
8347var aCallable = __webpack_require__(32);
8348var toObject = __webpack_require__(41);
8349var definePropertyModule = __webpack_require__(46);
8350
8351// `Object.prototype.__defineGetter__` method
8352// https://tc39.es/ecma262/#sec-object.prototype.__defineGetter__
8353if (DESCRIPTORS) {
8354 $({ target: 'Object', proto: true, forced: FORCED }, {
8355 __defineGetter__: function __defineGetter__(P, getter) {
8356 definePropertyModule.f(toObject(this), P, { get: aCallable(getter), enumerable: true, configurable: true });
8357 }
8358 });
8359}
8360
8361
8362/***/ }),
8363/* 283 */
8364/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
8365
8366"use strict";
8367
8368var IS_PURE = __webpack_require__(37);
8369var global = __webpack_require__(4);
8370var fails = __webpack_require__(7);
8371var WEBKIT = __webpack_require__(188);
8372
8373// Forced replacement object prototype accessors methods
8374module.exports = IS_PURE || !fails(function () {
8375 // This feature detection crashes old WebKit
8376 // https://github.com/zloirock/core-js/issues/232
8377 if (WEBKIT && WEBKIT < 535) return;
8378 var key = Math.random();
8379 // In FF throws only define methods
8380 // eslint-disable-next-line no-undef, no-useless-call, es/no-legacy-object-prototype-accessor-methods -- required for testing
8381 __defineSetter__.call(null, key, function () { /* empty */ });
8382 delete global[key];
8383});
8384
8385
8386/***/ }),
8387/* 284 */
8388/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8389
8390var $ = __webpack_require__(3);
8391var DESCRIPTORS = __webpack_require__(6);
8392var defineProperties = (__webpack_require__(74).f);
8393
8394// `Object.defineProperties` method
8395// https://tc39.es/ecma262/#sec-object.defineproperties
8396// eslint-disable-next-line es/no-object-defineproperties -- safe
8397$({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProperties, sham: !DESCRIPTORS }, {
8398 defineProperties: defineProperties
8399});
8400
8401
8402/***/ }),
8403/* 285 */
8404/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8405
8406var $ = __webpack_require__(3);
8407var DESCRIPTORS = __webpack_require__(6);
8408var defineProperty = (__webpack_require__(46).f);
8409
8410// `Object.defineProperty` method
8411// https://tc39.es/ecma262/#sec-object.defineproperty
8412// eslint-disable-next-line es/no-object-defineproperty -- safe
8413$({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, {
8414 defineProperty: defineProperty
8415});
8416
8417
8418/***/ }),
8419/* 286 */
8420/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8421
8422"use strict";
8423
8424var $ = __webpack_require__(3);
8425var DESCRIPTORS = __webpack_require__(6);
8426var FORCED = __webpack_require__(283);
8427var aCallable = __webpack_require__(32);
8428var toObject = __webpack_require__(41);
8429var definePropertyModule = __webpack_require__(46);
8430
8431// `Object.prototype.__defineSetter__` method
8432// https://tc39.es/ecma262/#sec-object.prototype.__defineSetter__
8433if (DESCRIPTORS) {
8434 $({ target: 'Object', proto: true, forced: FORCED }, {
8435 __defineSetter__: function __defineSetter__(P, setter) {
8436 definePropertyModule.f(toObject(this), P, { set: aCallable(setter), enumerable: true, configurable: true });
8437 }
8438 });
8439}
8440
8441
8442/***/ }),
8443/* 287 */
8444/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8445
8446var $ = __webpack_require__(3);
8447var $entries = (__webpack_require__(288).entries);
8448
8449// `Object.entries` method
8450// https://tc39.es/ecma262/#sec-object.entries
8451$({ target: 'Object', stat: true }, {
8452 entries: function entries(O) {
8453 return $entries(O);
8454 }
8455});
8456
8457
8458/***/ }),
8459/* 288 */
8460/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
8461
8462var DESCRIPTORS = __webpack_require__(6);
8463var uncurryThis = __webpack_require__(14);
8464var objectKeys = __webpack_require__(75);
8465var toIndexedObject = __webpack_require__(12);
8466var $propertyIsEnumerable = (__webpack_require__(10).f);
8467
8468var propertyIsEnumerable = uncurryThis($propertyIsEnumerable);
8469var push = uncurryThis([].push);
8470
8471// `Object.{ entries, values }` methods implementation
8472var createMethod = function (TO_ENTRIES) {
8473 return function (it) {
8474 var O = toIndexedObject(it);
8475 var keys = objectKeys(O);
8476 var length = keys.length;
8477 var i = 0;
8478 var result = [];
8479 var key;
8480 while (length > i) {
8481 key = keys[i++];
8482 if (!DESCRIPTORS || propertyIsEnumerable(O, key)) {
8483 push(result, TO_ENTRIES ? [key, O[key]] : O[key]);
8484 }
8485 }
8486 return result;
8487 };
8488};
8489
8490module.exports = {
8491 // `Object.entries` method
8492 // https://tc39.es/ecma262/#sec-object.entries
8493 entries: createMethod(true),
8494 // `Object.values` method
8495 // https://tc39.es/ecma262/#sec-object.values
8496 values: createMethod(false)
8497};
8498
8499
8500/***/ }),
8501/* 289 */
8502/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8503
8504var $ = __webpack_require__(3);
8505var FREEZING = __webpack_require__(234);
8506var fails = __webpack_require__(7);
8507var isObject = __webpack_require__(21);
8508var onFreeze = (__webpack_require__(231).onFreeze);
8509
8510// eslint-disable-next-line es/no-object-freeze -- safe
8511var $freeze = Object.freeze;
8512var FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); });
8513
8514// `Object.freeze` method
8515// https://tc39.es/ecma262/#sec-object.freeze
8516$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
8517 freeze: function freeze(it) {
8518 return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it;
8519 }
8520});
8521
8522
8523/***/ }),
8524/* 290 */
8525/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8526
8527var $ = __webpack_require__(3);
8528var iterate = __webpack_require__(128);
8529var createProperty = __webpack_require__(79);
8530
8531// `Object.fromEntries` method
8532// https://github.com/tc39/proposal-object-from-entries
8533$({ target: 'Object', stat: true }, {
8534 fromEntries: function fromEntries(iterable) {
8535 var obj = {};
8536 iterate(iterable, function (k, v) {
8537 createProperty(obj, k, v);
8538 }, { AS_ENTRIES: true });
8539 return obj;
8540 }
8541});
8542
8543
8544/***/ }),
8545/* 291 */
8546/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8547
8548var $ = __webpack_require__(3);
8549var fails = __webpack_require__(7);
8550var toIndexedObject = __webpack_require__(12);
8551var nativeGetOwnPropertyDescriptor = (__webpack_require__(5).f);
8552var DESCRIPTORS = __webpack_require__(6);
8553
8554var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
8555var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
8556
8557// `Object.getOwnPropertyDescriptor` method
8558// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
8559$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
8560 getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
8561 return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
8562 }
8563});
8564
8565
8566/***/ }),
8567/* 292 */
8568/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8569
8570var $ = __webpack_require__(3);
8571var DESCRIPTORS = __webpack_require__(6);
8572var ownKeys = __webpack_require__(58);
8573var toIndexedObject = __webpack_require__(12);
8574var getOwnPropertyDescriptorModule = __webpack_require__(5);
8575var createProperty = __webpack_require__(79);
8576
8577// `Object.getOwnPropertyDescriptors` method
8578// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
8579$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
8580 getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
8581 var O = toIndexedObject(object);
8582 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
8583 var keys = ownKeys(O);
8584 var result = {};
8585 var index = 0;
8586 var key, descriptor;
8587 while (keys.length > index) {
8588 descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
8589 if (descriptor !== undefined) createProperty(result, key, descriptor);
8590 }
8591 return result;
8592 }
8593});
8594
8595
8596/***/ }),
8597/* 293 */
8598/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8599
8600var $ = __webpack_require__(3);
8601var fails = __webpack_require__(7);
8602var getOwnPropertyNames = (__webpack_require__(77).f);
8603
8604// eslint-disable-next-line es/no-object-getownpropertynames -- required for testing
8605var FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });
8606
8607// `Object.getOwnPropertyNames` method
8608// https://tc39.es/ecma262/#sec-object.getownpropertynames
8609$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
8610 getOwnPropertyNames: getOwnPropertyNames
8611});
8612
8613
8614/***/ }),
8615/* 294 */
8616/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8617
8618var $ = __webpack_require__(3);
8619var fails = __webpack_require__(7);
8620var toObject = __webpack_require__(41);
8621var nativeGetPrototypeOf = __webpack_require__(126);
8622var CORRECT_PROTOTYPE_GETTER = __webpack_require__(127);
8623
8624var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });
8625
8626// `Object.getPrototypeOf` method
8627// https://tc39.es/ecma262/#sec-object.getprototypeof
8628$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
8629 getPrototypeOf: function getPrototypeOf(it) {
8630 return nativeGetPrototypeOf(toObject(it));
8631 }
8632});
8633
8634
8635
8636/***/ }),
8637/* 295 */
8638/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8639
8640var $ = __webpack_require__(3);
8641var hasOwn = __webpack_require__(40);
8642
8643// `Object.hasOwn` method
8644// https://github.com/tc39/proposal-accessible-object-hasownproperty
8645$({ target: 'Object', stat: true }, {
8646 hasOwn: hasOwn
8647});
8648
8649
8650/***/ }),
8651/* 296 */
8652/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8653
8654var $ = __webpack_require__(3);
8655var is = __webpack_require__(297);
8656
8657// `Object.is` method
8658// https://tc39.es/ecma262/#sec-object.is
8659$({ target: 'Object', stat: true }, {
8660 is: is
8661});
8662
8663
8664/***/ }),
8665/* 297 */
8666/***/ (function(module) {
8667
8668// `SameValue` abstract operation
8669// https://tc39.es/ecma262/#sec-samevalue
8670// eslint-disable-next-line es/no-object-is -- safe
8671module.exports = Object.is || function is(x, y) {
8672 // eslint-disable-next-line no-self-compare -- NaN check
8673 return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
8674};
8675
8676
8677/***/ }),
8678/* 298 */
8679/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8680
8681var $ = __webpack_require__(3);
8682var $isExtensible = __webpack_require__(232);
8683
8684// `Object.isExtensible` method
8685// https://tc39.es/ecma262/#sec-object.isextensible
8686// eslint-disable-next-line es/no-object-isextensible -- safe
8687$({ target: 'Object', stat: true, forced: Object.isExtensible !== $isExtensible }, {
8688 isExtensible: $isExtensible
8689});
8690
8691
8692/***/ }),
8693/* 299 */
8694/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8695
8696var $ = __webpack_require__(3);
8697var fails = __webpack_require__(7);
8698var isObject = __webpack_require__(21);
8699var classof = __webpack_require__(15);
8700var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(233);
8701
8702// eslint-disable-next-line es/no-object-isfrozen -- safe
8703var $isFrozen = Object.isFrozen;
8704var FAILS_ON_PRIMITIVES = fails(function () { $isFrozen(1); });
8705
8706// `Object.isFrozen` method
8707// https://tc39.es/ecma262/#sec-object.isfrozen
8708$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE }, {
8709 isFrozen: function isFrozen(it) {
8710 if (!isObject(it)) return true;
8711 if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return true;
8712 return $isFrozen ? $isFrozen(it) : false;
8713 }
8714});
8715
8716
8717/***/ }),
8718/* 300 */
8719/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8720
8721var $ = __webpack_require__(3);
8722var fails = __webpack_require__(7);
8723var isObject = __webpack_require__(21);
8724var classof = __webpack_require__(15);
8725var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(233);
8726
8727// eslint-disable-next-line es/no-object-issealed -- safe
8728var $isSealed = Object.isSealed;
8729var FAILS_ON_PRIMITIVES = fails(function () { $isSealed(1); });
8730
8731// `Object.isSealed` method
8732// https://tc39.es/ecma262/#sec-object.issealed
8733$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE }, {
8734 isSealed: function isSealed(it) {
8735 if (!isObject(it)) return true;
8736 if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return true;
8737 return $isSealed ? $isSealed(it) : false;
8738 }
8739});
8740
8741
8742/***/ }),
8743/* 301 */
8744/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8745
8746var $ = __webpack_require__(3);
8747var toObject = __webpack_require__(41);
8748var nativeKeys = __webpack_require__(75);
8749var fails = __webpack_require__(7);
8750
8751var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
8752
8753// `Object.keys` method
8754// https://tc39.es/ecma262/#sec-object.keys
8755$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
8756 keys: function keys(it) {
8757 return nativeKeys(toObject(it));
8758 }
8759});
8760
8761
8762/***/ }),
8763/* 302 */
8764/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8765
8766"use strict";
8767
8768var $ = __webpack_require__(3);
8769var DESCRIPTORS = __webpack_require__(6);
8770var FORCED = __webpack_require__(283);
8771var toObject = __webpack_require__(41);
8772var toPropertyKey = __webpack_require__(19);
8773var getPrototypeOf = __webpack_require__(126);
8774var getOwnPropertyDescriptor = (__webpack_require__(5).f);
8775
8776// `Object.prototype.__lookupGetter__` method
8777// https://tc39.es/ecma262/#sec-object.prototype.__lookupGetter__
8778if (DESCRIPTORS) {
8779 $({ target: 'Object', proto: true, forced: FORCED }, {
8780 __lookupGetter__: function __lookupGetter__(P) {
8781 var O = toObject(this);
8782 var key = toPropertyKey(P);
8783 var desc;
8784 do {
8785 if (desc = getOwnPropertyDescriptor(O, key)) return desc.get;
8786 } while (O = getPrototypeOf(O));
8787 }
8788 });
8789}
8790
8791
8792/***/ }),
8793/* 303 */
8794/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8795
8796"use strict";
8797
8798var $ = __webpack_require__(3);
8799var DESCRIPTORS = __webpack_require__(6);
8800var FORCED = __webpack_require__(283);
8801var toObject = __webpack_require__(41);
8802var toPropertyKey = __webpack_require__(19);
8803var getPrototypeOf = __webpack_require__(126);
8804var getOwnPropertyDescriptor = (__webpack_require__(5).f);
8805
8806// `Object.prototype.__lookupSetter__` method
8807// https://tc39.es/ecma262/#sec-object.prototype.__lookupSetter__
8808if (DESCRIPTORS) {
8809 $({ target: 'Object', proto: true, forced: FORCED }, {
8810 __lookupSetter__: function __lookupSetter__(P) {
8811 var O = toObject(this);
8812 var key = toPropertyKey(P);
8813 var desc;
8814 do {
8815 if (desc = getOwnPropertyDescriptor(O, key)) return desc.set;
8816 } while (O = getPrototypeOf(O));
8817 }
8818 });
8819}
8820
8821
8822/***/ }),
8823/* 304 */
8824/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8825
8826var $ = __webpack_require__(3);
8827var isObject = __webpack_require__(21);
8828var onFreeze = (__webpack_require__(231).onFreeze);
8829var FREEZING = __webpack_require__(234);
8830var fails = __webpack_require__(7);
8831
8832// eslint-disable-next-line es/no-object-preventextensions -- safe
8833var $preventExtensions = Object.preventExtensions;
8834var FAILS_ON_PRIMITIVES = fails(function () { $preventExtensions(1); });
8835
8836// `Object.preventExtensions` method
8837// https://tc39.es/ecma262/#sec-object.preventextensions
8838$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
8839 preventExtensions: function preventExtensions(it) {
8840 return $preventExtensions && isObject(it) ? $preventExtensions(onFreeze(it)) : it;
8841 }
8842});
8843
8844
8845/***/ }),
8846/* 305 */
8847/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8848
8849"use strict";
8850
8851var DESCRIPTORS = __webpack_require__(6);
8852var defineBuiltInAccessor = __webpack_require__(306);
8853var isObject = __webpack_require__(21);
8854var toObject = __webpack_require__(41);
8855var requireObjectCoercible = __webpack_require__(17);
8856
8857// eslint-disable-next-line es/no-object-getprototypeof -- safe
8858var getPrototypeOf = Object.getPrototypeOf;
8859// eslint-disable-next-line es/no-object-setprototypeof -- safe
8860var setPrototypeOf = Object.setPrototypeOf;
8861var ObjectPrototype = Object.prototype;
8862var PROTO = '__proto__';
8863
8864// `Object.prototype.__proto__` accessor
8865// https://tc39.es/ecma262/#sec-object.prototype.__proto__
8866if (DESCRIPTORS && getPrototypeOf && setPrototypeOf && !(PROTO in ObjectPrototype)) try {
8867 defineBuiltInAccessor(ObjectPrototype, PROTO, {
8868 configurable: true,
8869 get: function __proto__() {
8870 return getPrototypeOf(toObject(this));
8871 },
8872 set: function __proto__(proto) {
8873 var O = requireObjectCoercible(this);
8874 if (!isObject(proto) && proto !== null || !isObject(O)) return;
8875 setPrototypeOf(O, proto);
8876 }
8877 });
8878} catch (error) { /* empty */ }
8879
8880
8881/***/ }),
8882/* 306 */
8883/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
8884
8885var makeBuiltIn = __webpack_require__(50);
8886var defineProperty = __webpack_require__(46);
8887
8888module.exports = function (target, name, descriptor) {
8889 if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
8890 if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
8891 return defineProperty.f(target, name, descriptor);
8892};
8893
8894
8895/***/ }),
8896/* 307 */
8897/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8898
8899var $ = __webpack_require__(3);
8900var isObject = __webpack_require__(21);
8901var onFreeze = (__webpack_require__(231).onFreeze);
8902var FREEZING = __webpack_require__(234);
8903var fails = __webpack_require__(7);
8904
8905// eslint-disable-next-line es/no-object-seal -- safe
8906var $seal = Object.seal;
8907var FAILS_ON_PRIMITIVES = fails(function () { $seal(1); });
8908
8909// `Object.seal` method
8910// https://tc39.es/ecma262/#sec-object.seal
8911$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
8912 seal: function seal(it) {
8913 return $seal && isObject(it) ? $seal(onFreeze(it)) : it;
8914 }
8915});
8916
8917
8918/***/ }),
8919/* 308 */
8920/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8921
8922var $ = __webpack_require__(3);
8923var setPrototypeOf = __webpack_require__(114);
8924
8925// `Object.setPrototypeOf` method
8926// https://tc39.es/ecma262/#sec-object.setprototypeof
8927$({ target: 'Object', stat: true }, {
8928 setPrototypeOf: setPrototypeOf
8929});
8930
8931
8932/***/ }),
8933/* 309 */
8934/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8935
8936var TO_STRING_TAG_SUPPORT = __webpack_require__(72);
8937var defineBuiltIn = __webpack_require__(49);
8938var toString = __webpack_require__(310);
8939
8940// `Object.prototype.toString` method
8941// https://tc39.es/ecma262/#sec-object.prototype.tostring
8942if (!TO_STRING_TAG_SUPPORT) {
8943 defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });
8944}
8945
8946
8947/***/ }),
8948/* 310 */
8949/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
8950
8951"use strict";
8952
8953var TO_STRING_TAG_SUPPORT = __webpack_require__(72);
8954var classof = __webpack_require__(71);
8955
8956// `Object.prototype.toString` method implementation
8957// https://tc39.es/ecma262/#sec-object.prototype.tostring
8958module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
8959 return '[object ' + classof(this) + ']';
8960};
8961
8962
8963/***/ }),
8964/* 311 */
8965/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8966
8967var $ = __webpack_require__(3);
8968var $values = (__webpack_require__(288).values);
8969
8970// `Object.values` method
8971// https://tc39.es/ecma262/#sec-object.values
8972$({ target: 'Object', stat: true }, {
8973 values: function values(O) {
8974 return $values(O);
8975 }
8976});
8977
8978
8979/***/ }),
8980/* 312 */
8981/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8982
8983var $ = __webpack_require__(3);
8984var $parseFloat = __webpack_require__(273);
8985
8986// `parseFloat` method
8987// https://tc39.es/ecma262/#sec-parsefloat-string
8988$({ global: true, forced: parseFloat != $parseFloat }, {
8989 parseFloat: $parseFloat
8990});
8991
8992
8993/***/ }),
8994/* 313 */
8995/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
8996
8997var $ = __webpack_require__(3);
8998var $parseInt = __webpack_require__(275);
8999
9000// `parseInt` method
9001// https://tc39.es/ecma262/#sec-parseint-string-radix
9002$({ global: true, forced: parseInt != $parseInt }, {
9003 parseInt: $parseInt
9004});
9005
9006
9007/***/ }),
9008/* 314 */
9009/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
9010
9011// TODO: Remove this module from `core-js@4` since it's split to modules listed below
9012__webpack_require__(315);
9013__webpack_require__(330);
9014__webpack_require__(332);
9015__webpack_require__(333);
9016__webpack_require__(334);
9017__webpack_require__(335);
9018
9019
9020/***/ }),
9021/* 315 */
9022/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
9023
9024"use strict";
9025
9026var $ = __webpack_require__(3);
9027var IS_PURE = __webpack_require__(37);
9028var IS_NODE = __webpack_require__(179);
9029var global = __webpack_require__(4);
9030var call = __webpack_require__(8);
9031var defineBuiltIn = __webpack_require__(49);
9032var setPrototypeOf = __webpack_require__(114);
9033var setToStringTag = __webpack_require__(84);
9034var setSpecies = __webpack_require__(190);
9035var aCallable = __webpack_require__(32);
9036var isCallable = __webpack_require__(22);
9037var isObject = __webpack_require__(21);
9038var anInstance = __webpack_require__(199);
9039var speciesConstructor = __webpack_require__(205);
9040var task = (__webpack_require__(316).set);
9041var microtask = __webpack_require__(319);
9042var hostReportErrors = __webpack_require__(322);
9043var perform = __webpack_require__(323);
9044var Queue = __webpack_require__(324);
9045var InternalStateModule = __webpack_require__(53);
9046var NativePromiseConstructor = __webpack_require__(325);
9047var PromiseConstructorDetection = __webpack_require__(326);
9048var newPromiseCapabilityModule = __webpack_require__(329);
9049
9050var PROMISE = 'Promise';
9051var FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR;
9052var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
9053var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
9054var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
9055var setInternalState = InternalStateModule.set;
9056var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
9057var PromiseConstructor = NativePromiseConstructor;
9058var PromisePrototype = NativePromisePrototype;
9059var TypeError = global.TypeError;
9060var document = global.document;
9061var process = global.process;
9062var newPromiseCapability = newPromiseCapabilityModule.f;
9063var newGenericPromiseCapability = newPromiseCapability;
9064
9065var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
9066var UNHANDLED_REJECTION = 'unhandledrejection';
9067var REJECTION_HANDLED = 'rejectionhandled';
9068var PENDING = 0;
9069var FULFILLED = 1;
9070var REJECTED = 2;
9071var HANDLED = 1;
9072var UNHANDLED = 2;
9073
9074var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
9075
9076// helpers
9077var isThenable = function (it) {
9078 var then;
9079 return isObject(it) && isCallable(then = it.then) ? then : false;
9080};
9081
9082var callReaction = function (reaction, state) {
9083 var value = state.value;
9084 var ok = state.state == FULFILLED;
9085 var handler = ok ? reaction.ok : reaction.fail;
9086 var resolve = reaction.resolve;
9087 var reject = reaction.reject;
9088 var domain = reaction.domain;
9089 var result, then, exited;
9090 try {
9091 if (handler) {
9092 if (!ok) {
9093 if (state.rejection === UNHANDLED) onHandleUnhandled(state);
9094 state.rejection = HANDLED;
9095 }
9096 if (handler === true) result = value;
9097 else {
9098 if (domain) domain.enter();
9099 result = handler(value); // can throw
9100 if (domain) {
9101 domain.exit();
9102 exited = true;
9103 }
9104 }
9105 if (result === reaction.promise) {
9106 reject(TypeError('Promise-chain cycle'));
9107 } else if (then = isThenable(result)) {
9108 call(then, result, resolve, reject);
9109 } else resolve(result);
9110 } else reject(value);
9111 } catch (error) {
9112 if (domain && !exited) domain.exit();
9113 reject(error);
9114 }
9115};
9116
9117var notify = function (state, isReject) {
9118 if (state.notified) return;
9119 state.notified = true;
9120 microtask(function () {
9121 var reactions = state.reactions;
9122 var reaction;
9123 while (reaction = reactions.get()) {
9124 callReaction(reaction, state);
9125 }
9126 state.notified = false;
9127 if (isReject && !state.rejection) onUnhandled(state);
9128 });
9129};
9130
9131var dispatchEvent = function (name, promise, reason) {
9132 var event, handler;
9133 if (DISPATCH_EVENT) {
9134 event = document.createEvent('Event');
9135 event.promise = promise;
9136 event.reason = reason;
9137 event.initEvent(name, false, true);
9138 global.dispatchEvent(event);
9139 } else event = { promise: promise, reason: reason };
9140 if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
9141 else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
9142};
9143
9144var onUnhandled = function (state) {
9145 call(task, global, function () {
9146 var promise = state.facade;
9147 var value = state.value;
9148 var IS_UNHANDLED = isUnhandled(state);
9149 var result;
9150 if (IS_UNHANDLED) {
9151 result = perform(function () {
9152 if (IS_NODE) {
9153 process.emit('unhandledRejection', value, promise);
9154 } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
9155 });
9156 // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
9157 state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
9158 if (result.error) throw result.value;
9159 }
9160 });
9161};
9162
9163var isUnhandled = function (state) {
9164 return state.rejection !== HANDLED && !state.parent;
9165};
9166
9167var onHandleUnhandled = function (state) {
9168 call(task, global, function () {
9169 var promise = state.facade;
9170 if (IS_NODE) {
9171 process.emit('rejectionHandled', promise);
9172 } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
9173 });
9174};
9175
9176var bind = function (fn, state, unwrap) {
9177 return function (value) {
9178 fn(state, value, unwrap);
9179 };
9180};
9181
9182var internalReject = function (state, value, unwrap) {
9183 if (state.done) return;
9184 state.done = true;
9185 if (unwrap) state = unwrap;
9186 state.value = value;
9187 state.state = REJECTED;
9188 notify(state, true);
9189};
9190
9191var internalResolve = function (state, value, unwrap) {
9192 if (state.done) return;
9193 state.done = true;
9194 if (unwrap) state = unwrap;
9195 try {
9196 if (state.facade === value) throw TypeError("Promise can't be resolved itself");
9197 var then = isThenable(value);
9198 if (then) {
9199 microtask(function () {
9200 var wrapper = { done: false };
9201 try {
9202 call(then, value,
9203 bind(internalResolve, wrapper, state),
9204 bind(internalReject, wrapper, state)
9205 );
9206 } catch (error) {
9207 internalReject(wrapper, error, state);
9208 }
9209 });
9210 } else {
9211 state.value = value;
9212 state.state = FULFILLED;
9213 notify(state, false);
9214 }
9215 } catch (error) {
9216 internalReject({ done: false }, error, state);
9217 }
9218};
9219
9220// constructor polyfill
9221if (FORCED_PROMISE_CONSTRUCTOR) {
9222 // 25.4.3.1 Promise(executor)
9223 PromiseConstructor = function Promise(executor) {
9224 anInstance(this, PromisePrototype);
9225 aCallable(executor);
9226 call(Internal, this);
9227 var state = getInternalPromiseState(this);
9228 try {
9229 executor(bind(internalResolve, state), bind(internalReject, state));
9230 } catch (error) {
9231 internalReject(state, error);
9232 }
9233 };
9234
9235 PromisePrototype = PromiseConstructor.prototype;
9236
9237 // eslint-disable-next-line no-unused-vars -- required for `.length`
9238 Internal = function Promise(executor) {
9239 setInternalState(this, {
9240 type: PROMISE,
9241 done: false,
9242 notified: false,
9243 parent: false,
9244 reactions: new Queue(),
9245 rejection: false,
9246 state: PENDING,
9247 value: undefined
9248 });
9249 };
9250
9251 // `Promise.prototype.then` method
9252 // https://tc39.es/ecma262/#sec-promise.prototype.then
9253 Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
9254 var state = getInternalPromiseState(this);
9255 var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
9256 state.parent = true;
9257 reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
9258 reaction.fail = isCallable(onRejected) && onRejected;
9259 reaction.domain = IS_NODE ? process.domain : undefined;
9260 if (state.state == PENDING) state.reactions.add(reaction);
9261 else microtask(function () {
9262 callReaction(reaction, state);
9263 });
9264 return reaction.promise;
9265 });
9266
9267 OwnPromiseCapability = function () {
9268 var promise = new Internal();
9269 var state = getInternalPromiseState(promise);
9270 this.promise = promise;
9271 this.resolve = bind(internalResolve, state);
9272 this.reject = bind(internalReject, state);
9273 };
9274
9275 newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
9276 return C === PromiseConstructor || C === PromiseWrapper
9277 ? new OwnPromiseCapability(C)
9278 : newGenericPromiseCapability(C);
9279 };
9280
9281 if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {
9282 nativeThen = NativePromisePrototype.then;
9283
9284 if (!NATIVE_PROMISE_SUBCLASSING) {
9285 // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
9286 defineBuiltIn(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
9287 var that = this;
9288 return new PromiseConstructor(function (resolve, reject) {
9289 call(nativeThen, that, resolve, reject);
9290 }).then(onFulfilled, onRejected);
9291 // https://github.com/zloirock/core-js/issues/640
9292 }, { unsafe: true });
9293 }
9294
9295 // make `.constructor === Promise` work for native promise-based APIs
9296 try {
9297 delete NativePromisePrototype.constructor;
9298 } catch (error) { /* empty */ }
9299
9300 // make `instanceof Promise` work for native promise-based APIs
9301 if (setPrototypeOf) {
9302 setPrototypeOf(NativePromisePrototype, PromisePrototype);
9303 }
9304 }
9305}
9306
9307$({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
9308 Promise: PromiseConstructor
9309});
9310
9311setToStringTag(PromiseConstructor, PROMISE, false, true);
9312setSpecies(PROMISE);
9313
9314
9315/***/ }),
9316/* 316 */
9317/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9318
9319var global = __webpack_require__(4);
9320var apply = __webpack_require__(95);
9321var bind = __webpack_require__(86);
9322var isCallable = __webpack_require__(22);
9323var hasOwn = __webpack_require__(40);
9324var fails = __webpack_require__(7);
9325var html = __webpack_require__(76);
9326var arraySlice = __webpack_require__(96);
9327var createElement = __webpack_require__(44);
9328var validateArgumentsLength = __webpack_require__(317);
9329var IS_IOS = __webpack_require__(318);
9330var IS_NODE = __webpack_require__(179);
9331
9332var set = global.setImmediate;
9333var clear = global.clearImmediate;
9334var process = global.process;
9335var Dispatch = global.Dispatch;
9336var Function = global.Function;
9337var MessageChannel = global.MessageChannel;
9338var String = global.String;
9339var counter = 0;
9340var queue = {};
9341var ONREADYSTATECHANGE = 'onreadystatechange';
9342var $location, defer, channel, port;
9343
9344try {
9345 // Deno throws a ReferenceError on `location` access without `--location` flag
9346 $location = global.location;
9347} catch (error) { /* empty */ }
9348
9349var run = function (id) {
9350 if (hasOwn(queue, id)) {
9351 var fn = queue[id];
9352 delete queue[id];
9353 fn();
9354 }
9355};
9356
9357var runner = function (id) {
9358 return function () {
9359 run(id);
9360 };
9361};
9362
9363var listener = function (event) {
9364 run(event.data);
9365};
9366
9367var post = function (id) {
9368 // old engines have not location.origin
9369 global.postMessage(String(id), $location.protocol + '//' + $location.host);
9370};
9371
9372// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
9373if (!set || !clear) {
9374 set = function setImmediate(handler) {
9375 validateArgumentsLength(arguments.length, 1);
9376 var fn = isCallable(handler) ? handler : Function(handler);
9377 var args = arraySlice(arguments, 1);
9378 queue[++counter] = function () {
9379 apply(fn, undefined, args);
9380 };
9381 defer(counter);
9382 return counter;
9383 };
9384 clear = function clearImmediate(id) {
9385 delete queue[id];
9386 };
9387 // Node.js 0.8-
9388 if (IS_NODE) {
9389 defer = function (id) {
9390 process.nextTick(runner(id));
9391 };
9392 // Sphere (JS game engine) Dispatch API
9393 } else if (Dispatch && Dispatch.now) {
9394 defer = function (id) {
9395 Dispatch.now(runner(id));
9396 };
9397 // Browsers with MessageChannel, includes WebWorkers
9398 // except iOS - https://github.com/zloirock/core-js/issues/624
9399 } else if (MessageChannel && !IS_IOS) {
9400 channel = new MessageChannel();
9401 port = channel.port2;
9402 channel.port1.onmessage = listener;
9403 defer = bind(port.postMessage, port);
9404 // Browsers with postMessage, skip WebWorkers
9405 // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
9406 } else if (
9407 global.addEventListener &&
9408 isCallable(global.postMessage) &&
9409 !global.importScripts &&
9410 $location && $location.protocol !== 'file:' &&
9411 !fails(post)
9412 ) {
9413 defer = post;
9414 global.addEventListener('message', listener, false);
9415 // IE8-
9416 } else if (ONREADYSTATECHANGE in createElement('script')) {
9417 defer = function (id) {
9418 html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
9419 html.removeChild(this);
9420 run(id);
9421 };
9422 };
9423 // Rest old browsers
9424 } else {
9425 defer = function (id) {
9426 setTimeout(runner(id), 0);
9427 };
9428 }
9429}
9430
9431module.exports = {
9432 set: set,
9433 clear: clear
9434};
9435
9436
9437/***/ }),
9438/* 317 */
9439/***/ (function(module) {
9440
9441var $TypeError = TypeError;
9442
9443module.exports = function (passed, required) {
9444 if (passed < required) throw $TypeError('Not enough arguments');
9445 return passed;
9446};
9447
9448
9449/***/ }),
9450/* 318 */
9451/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9452
9453var userAgent = __webpack_require__(30);
9454
9455module.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);
9456
9457
9458/***/ }),
9459/* 319 */
9460/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9461
9462var global = __webpack_require__(4);
9463var bind = __webpack_require__(86);
9464var getOwnPropertyDescriptor = (__webpack_require__(5).f);
9465var macrotask = (__webpack_require__(316).set);
9466var IS_IOS = __webpack_require__(318);
9467var IS_IOS_PEBBLE = __webpack_require__(320);
9468var IS_WEBOS_WEBKIT = __webpack_require__(321);
9469var IS_NODE = __webpack_require__(179);
9470
9471var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
9472var document = global.document;
9473var process = global.process;
9474var Promise = global.Promise;
9475// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
9476var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
9477var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
9478
9479var flush, head, last, notify, toggle, node, promise, then;
9480
9481// modern engines have queueMicrotask method
9482if (!queueMicrotask) {
9483 flush = function () {
9484 var parent, fn;
9485 if (IS_NODE && (parent = process.domain)) parent.exit();
9486 while (head) {
9487 fn = head.fn;
9488 head = head.next;
9489 try {
9490 fn();
9491 } catch (error) {
9492 if (head) notify();
9493 else last = undefined;
9494 throw error;
9495 }
9496 } last = undefined;
9497 if (parent) parent.enter();
9498 };
9499
9500 // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
9501 // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
9502 if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
9503 toggle = true;
9504 node = document.createTextNode('');
9505 new MutationObserver(flush).observe(node, { characterData: true });
9506 notify = function () {
9507 node.data = toggle = !toggle;
9508 };
9509 // environments with maybe non-completely correct, but existent Promise
9510 } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {
9511 // Promise.resolve without an argument throws an error in LG WebOS 2
9512 promise = Promise.resolve(undefined);
9513 // workaround of WebKit ~ iOS Safari 10.1 bug
9514 promise.constructor = Promise;
9515 then = bind(promise.then, promise);
9516 notify = function () {
9517 then(flush);
9518 };
9519 // Node.js without promises
9520 } else if (IS_NODE) {
9521 notify = function () {
9522 process.nextTick(flush);
9523 };
9524 // for other environments - macrotask based on:
9525 // - setImmediate
9526 // - MessageChannel
9527 // - window.postMessage
9528 // - onreadystatechange
9529 // - setTimeout
9530 } else {
9531 // strange IE + webpack dev server bug - use .bind(global)
9532 macrotask = bind(macrotask, global);
9533 notify = function () {
9534 macrotask(flush);
9535 };
9536 }
9537}
9538
9539module.exports = queueMicrotask || function (fn) {
9540 var task = { fn: fn, next: undefined };
9541 if (last) last.next = task;
9542 if (!head) {
9543 head = task;
9544 notify();
9545 } last = task;
9546};
9547
9548
9549/***/ }),
9550/* 320 */
9551/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9552
9553var userAgent = __webpack_require__(30);
9554var global = __webpack_require__(4);
9555
9556module.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefined;
9557
9558
9559/***/ }),
9560/* 321 */
9561/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9562
9563var userAgent = __webpack_require__(30);
9564
9565module.exports = /web0s(?!.*chrome)/i.test(userAgent);
9566
9567
9568/***/ }),
9569/* 322 */
9570/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9571
9572var global = __webpack_require__(4);
9573
9574module.exports = function (a, b) {
9575 var console = global.console;
9576 if (console && console.error) {
9577 arguments.length == 1 ? console.error(a) : console.error(a, b);
9578 }
9579};
9580
9581
9582/***/ }),
9583/* 323 */
9584/***/ (function(module) {
9585
9586module.exports = function (exec) {
9587 try {
9588 return { error: false, value: exec() };
9589 } catch (error) {
9590 return { error: true, value: error };
9591 }
9592};
9593
9594
9595/***/ }),
9596/* 324 */
9597/***/ (function(module) {
9598
9599var Queue = function () {
9600 this.head = null;
9601 this.tail = null;
9602};
9603
9604Queue.prototype = {
9605 add: function (item) {
9606 var entry = { item: item, next: null };
9607 if (this.head) this.tail.next = entry;
9608 else this.head = entry;
9609 this.tail = entry;
9610 },
9611 get: function () {
9612 var entry = this.head;
9613 if (entry) {
9614 this.head = entry.next;
9615 if (this.tail === entry) this.tail = null;
9616 return entry.item;
9617 }
9618 }
9619};
9620
9621module.exports = Queue;
9622
9623
9624/***/ }),
9625/* 325 */
9626/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9627
9628var global = __webpack_require__(4);
9629
9630module.exports = global.Promise;
9631
9632
9633/***/ }),
9634/* 326 */
9635/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9636
9637var global = __webpack_require__(4);
9638var NativePromiseConstructor = __webpack_require__(325);
9639var isCallable = __webpack_require__(22);
9640var isForced = __webpack_require__(69);
9641var inspectSource = __webpack_require__(52);
9642var wellKnownSymbol = __webpack_require__(35);
9643var IS_BROWSER = __webpack_require__(327);
9644var IS_DENO = __webpack_require__(328);
9645var IS_PURE = __webpack_require__(37);
9646var V8_VERSION = __webpack_require__(29);
9647
9648var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
9649var SPECIES = wellKnownSymbol('species');
9650var SUBCLASSING = false;
9651var NATIVE_PROMISE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);
9652
9653var FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () {
9654 var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor);
9655 var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor);
9656 // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
9657 // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
9658 // We can't detect it synchronously, so just check versions
9659 if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
9660 // We need Promise#{ catch, finally } in the pure version for preventing prototype pollution
9661 if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true;
9662 // We can't use @@species feature detection in V8 since it causes
9663 // deoptimization and performance degradation
9664 // https://github.com/zloirock/core-js/issues/679
9665 if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
9666 // Detect correctness of subclassing with @@species support
9667 var promise = new NativePromiseConstructor(function (resolve) { resolve(1); });
9668 var FakePromise = function (exec) {
9669 exec(function () { /* empty */ }, function () { /* empty */ });
9670 };
9671 var constructor = promise.constructor = {};
9672 constructor[SPECIES] = FakePromise;
9673 SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
9674 if (!SUBCLASSING) return true;
9675 // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
9676 } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT;
9677});
9678
9679module.exports = {
9680 CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,
9681 REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,
9682 SUBCLASSING: SUBCLASSING
9683};
9684
9685
9686/***/ }),
9687/* 327 */
9688/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9689
9690var IS_DENO = __webpack_require__(328);
9691var IS_NODE = __webpack_require__(179);
9692
9693module.exports = !IS_DENO && !IS_NODE
9694 && typeof window == 'object'
9695 && typeof document == 'object';
9696
9697
9698/***/ }),
9699/* 328 */
9700/***/ (function(module) {
9701
9702/* global Deno -- Deno case */
9703module.exports = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
9704
9705
9706/***/ }),
9707/* 329 */
9708/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9709
9710"use strict";
9711
9712var aCallable = __webpack_require__(32);
9713
9714var $TypeError = TypeError;
9715
9716var PromiseCapability = function (C) {
9717 var resolve, reject;
9718 this.promise = new C(function ($$resolve, $$reject) {
9719 if (resolve !== undefined || reject !== undefined) throw $TypeError('Bad Promise constructor');
9720 resolve = $$resolve;
9721 reject = $$reject;
9722 });
9723 this.resolve = aCallable(resolve);
9724 this.reject = aCallable(reject);
9725};
9726
9727// `NewPromiseCapability` abstract operation
9728// https://tc39.es/ecma262/#sec-newpromisecapability
9729module.exports.f = function (C) {
9730 return new PromiseCapability(C);
9731};
9732
9733
9734/***/ }),
9735/* 330 */
9736/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
9737
9738"use strict";
9739
9740var $ = __webpack_require__(3);
9741var call = __webpack_require__(8);
9742var aCallable = __webpack_require__(32);
9743var newPromiseCapabilityModule = __webpack_require__(329);
9744var perform = __webpack_require__(323);
9745var iterate = __webpack_require__(128);
9746var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(331);
9747
9748// `Promise.all` method
9749// https://tc39.es/ecma262/#sec-promise.all
9750$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
9751 all: function all(iterable) {
9752 var C = this;
9753 var capability = newPromiseCapabilityModule.f(C);
9754 var resolve = capability.resolve;
9755 var reject = capability.reject;
9756 var result = perform(function () {
9757 var $promiseResolve = aCallable(C.resolve);
9758 var values = [];
9759 var counter = 0;
9760 var remaining = 1;
9761 iterate(iterable, function (promise) {
9762 var index = counter++;
9763 var alreadyCalled = false;
9764 remaining++;
9765 call($promiseResolve, C, promise).then(function (value) {
9766 if (alreadyCalled) return;
9767 alreadyCalled = true;
9768 values[index] = value;
9769 --remaining || resolve(values);
9770 }, reject);
9771 });
9772 --remaining || resolve(values);
9773 });
9774 if (result.error) reject(result.value);
9775 return capability.promise;
9776 }
9777});
9778
9779
9780/***/ }),
9781/* 331 */
9782/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9783
9784var NativePromiseConstructor = __webpack_require__(325);
9785var checkCorrectnessOfIteration = __webpack_require__(161);
9786var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(326).CONSTRUCTOR);
9787
9788module.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) {
9789 NativePromiseConstructor.all(iterable).then(undefined, function () { /* empty */ });
9790});
9791
9792
9793/***/ }),
9794/* 332 */
9795/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
9796
9797"use strict";
9798
9799var $ = __webpack_require__(3);
9800var IS_PURE = __webpack_require__(37);
9801var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(326).CONSTRUCTOR);
9802var NativePromiseConstructor = __webpack_require__(325);
9803var getBuiltIn = __webpack_require__(25);
9804var isCallable = __webpack_require__(22);
9805var defineBuiltIn = __webpack_require__(49);
9806
9807var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
9808
9809// `Promise.prototype.catch` method
9810// https://tc39.es/ecma262/#sec-promise.prototype.catch
9811$({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR, real: true }, {
9812 'catch': function (onRejected) {
9813 return this.then(undefined, onRejected);
9814 }
9815});
9816
9817// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
9818if (!IS_PURE && isCallable(NativePromiseConstructor)) {
9819 var method = getBuiltIn('Promise').prototype['catch'];
9820 if (NativePromisePrototype['catch'] !== method) {
9821 defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
9822 }
9823}
9824
9825
9826/***/ }),
9827/* 333 */
9828/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
9829
9830"use strict";
9831
9832var $ = __webpack_require__(3);
9833var call = __webpack_require__(8);
9834var aCallable = __webpack_require__(32);
9835var newPromiseCapabilityModule = __webpack_require__(329);
9836var perform = __webpack_require__(323);
9837var iterate = __webpack_require__(128);
9838var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(331);
9839
9840// `Promise.race` method
9841// https://tc39.es/ecma262/#sec-promise.race
9842$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
9843 race: function race(iterable) {
9844 var C = this;
9845 var capability = newPromiseCapabilityModule.f(C);
9846 var reject = capability.reject;
9847 var result = perform(function () {
9848 var $promiseResolve = aCallable(C.resolve);
9849 iterate(iterable, function (promise) {
9850 call($promiseResolve, C, promise).then(capability.resolve, reject);
9851 });
9852 });
9853 if (result.error) reject(result.value);
9854 return capability.promise;
9855 }
9856});
9857
9858
9859/***/ }),
9860/* 334 */
9861/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
9862
9863"use strict";
9864
9865var $ = __webpack_require__(3);
9866var call = __webpack_require__(8);
9867var newPromiseCapabilityModule = __webpack_require__(329);
9868var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(326).CONSTRUCTOR);
9869
9870// `Promise.reject` method
9871// https://tc39.es/ecma262/#sec-promise.reject
9872$({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
9873 reject: function reject(r) {
9874 var capability = newPromiseCapabilityModule.f(this);
9875 call(capability.reject, undefined, r);
9876 return capability.promise;
9877 }
9878});
9879
9880
9881/***/ }),
9882/* 335 */
9883/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
9884
9885"use strict";
9886
9887var $ = __webpack_require__(3);
9888var getBuiltIn = __webpack_require__(25);
9889var IS_PURE = __webpack_require__(37);
9890var NativePromiseConstructor = __webpack_require__(325);
9891var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(326).CONSTRUCTOR);
9892var promiseResolve = __webpack_require__(336);
9893
9894var PromiseConstructorWrapper = getBuiltIn('Promise');
9895var CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;
9896
9897// `Promise.resolve` method
9898// https://tc39.es/ecma262/#sec-promise.resolve
9899$({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {
9900 resolve: function resolve(x) {
9901 return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);
9902 }
9903});
9904
9905
9906/***/ }),
9907/* 336 */
9908/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9909
9910var anObject = __webpack_require__(48);
9911var isObject = __webpack_require__(21);
9912var newPromiseCapability = __webpack_require__(329);
9913
9914module.exports = function (C, x) {
9915 anObject(C);
9916 if (isObject(x) && x.constructor === C) return x;
9917 var promiseCapability = newPromiseCapability.f(C);
9918 var resolve = promiseCapability.resolve;
9919 resolve(x);
9920 return promiseCapability.promise;
9921};
9922
9923
9924/***/ }),
9925/* 337 */
9926/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
9927
9928"use strict";
9929
9930var $ = __webpack_require__(3);
9931var call = __webpack_require__(8);
9932var aCallable = __webpack_require__(32);
9933var newPromiseCapabilityModule = __webpack_require__(329);
9934var perform = __webpack_require__(323);
9935var iterate = __webpack_require__(128);
9936
9937// `Promise.allSettled` method
9938// https://tc39.es/ecma262/#sec-promise.allsettled
9939$({ target: 'Promise', stat: true }, {
9940 allSettled: function allSettled(iterable) {
9941 var C = this;
9942 var capability = newPromiseCapabilityModule.f(C);
9943 var resolve = capability.resolve;
9944 var reject = capability.reject;
9945 var result = perform(function () {
9946 var promiseResolve = aCallable(C.resolve);
9947 var values = [];
9948 var counter = 0;
9949 var remaining = 1;
9950 iterate(iterable, function (promise) {
9951 var index = counter++;
9952 var alreadyCalled = false;
9953 remaining++;
9954 call(promiseResolve, C, promise).then(function (value) {
9955 if (alreadyCalled) return;
9956 alreadyCalled = true;
9957 values[index] = { status: 'fulfilled', value: value };
9958 --remaining || resolve(values);
9959 }, function (error) {
9960 if (alreadyCalled) return;
9961 alreadyCalled = true;
9962 values[index] = { status: 'rejected', reason: error };
9963 --remaining || resolve(values);
9964 });
9965 });
9966 --remaining || resolve(values);
9967 });
9968 if (result.error) reject(result.value);
9969 return capability.promise;
9970 }
9971});
9972
9973
9974/***/ }),
9975/* 338 */
9976/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
9977
9978"use strict";
9979
9980var $ = __webpack_require__(3);
9981var call = __webpack_require__(8);
9982var aCallable = __webpack_require__(32);
9983var getBuiltIn = __webpack_require__(25);
9984var newPromiseCapabilityModule = __webpack_require__(329);
9985var perform = __webpack_require__(323);
9986var iterate = __webpack_require__(128);
9987
9988var PROMISE_ANY_ERROR = 'No one promise resolved';
9989
9990// `Promise.any` method
9991// https://tc39.es/ecma262/#sec-promise.any
9992$({ target: 'Promise', stat: true }, {
9993 any: function any(iterable) {
9994 var C = this;
9995 var AggregateError = getBuiltIn('AggregateError');
9996 var capability = newPromiseCapabilityModule.f(C);
9997 var resolve = capability.resolve;
9998 var reject = capability.reject;
9999 var result = perform(function () {
10000 var promiseResolve = aCallable(C.resolve);
10001 var errors = [];
10002 var counter = 0;
10003 var remaining = 1;
10004 var alreadyResolved = false;
10005 iterate(iterable, function (promise) {
10006 var index = counter++;
10007 var alreadyRejected = false;
10008 remaining++;
10009 call(promiseResolve, C, promise).then(function (value) {
10010 if (alreadyRejected || alreadyResolved) return;
10011 alreadyResolved = true;
10012 resolve(value);
10013 }, function (error) {
10014 if (alreadyRejected || alreadyResolved) return;
10015 alreadyRejected = true;
10016 errors[index] = error;
10017 --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
10018 });
10019 });
10020 --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
10021 });
10022 if (result.error) reject(result.value);
10023 return capability.promise;
10024 }
10025});
10026
10027
10028/***/ }),
10029/* 339 */
10030/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10031
10032"use strict";
10033
10034var $ = __webpack_require__(3);
10035var IS_PURE = __webpack_require__(37);
10036var NativePromiseConstructor = __webpack_require__(325);
10037var fails = __webpack_require__(7);
10038var getBuiltIn = __webpack_require__(25);
10039var isCallable = __webpack_require__(22);
10040var speciesConstructor = __webpack_require__(205);
10041var promiseResolve = __webpack_require__(336);
10042var defineBuiltIn = __webpack_require__(49);
10043
10044var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
10045
10046// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
10047var NON_GENERIC = !!NativePromiseConstructor && fails(function () {
10048 // eslint-disable-next-line unicorn/no-thenable -- required for testing
10049 NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
10050});
10051
10052// `Promise.prototype.finally` method
10053// https://tc39.es/ecma262/#sec-promise.prototype.finally
10054$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
10055 'finally': function (onFinally) {
10056 var C = speciesConstructor(this, getBuiltIn('Promise'));
10057 var isFunction = isCallable(onFinally);
10058 return this.then(
10059 isFunction ? function (x) {
10060 return promiseResolve(C, onFinally()).then(function () { return x; });
10061 } : onFinally,
10062 isFunction ? function (e) {
10063 return promiseResolve(C, onFinally()).then(function () { throw e; });
10064 } : onFinally
10065 );
10066 }
10067});
10068
10069// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
10070if (!IS_PURE && isCallable(NativePromiseConstructor)) {
10071 var method = getBuiltIn('Promise').prototype['finally'];
10072 if (NativePromisePrototype['finally'] !== method) {
10073 defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true });
10074 }
10075}
10076
10077
10078/***/ }),
10079/* 340 */
10080/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10081
10082var $ = __webpack_require__(3);
10083var functionApply = __webpack_require__(95);
10084var aCallable = __webpack_require__(32);
10085var anObject = __webpack_require__(48);
10086var fails = __webpack_require__(7);
10087
10088// MS Edge argumentsList argument is optional
10089var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
10090 // eslint-disable-next-line es/no-reflect -- required for testing
10091 Reflect.apply(function () { /* empty */ });
10092});
10093
10094// `Reflect.apply` method
10095// https://tc39.es/ecma262/#sec-reflect.apply
10096$({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
10097 apply: function apply(target, thisArgument, argumentsList) {
10098 return functionApply(aCallable(target), thisArgument, anObject(argumentsList));
10099 }
10100});
10101
10102
10103/***/ }),
10104/* 341 */
10105/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10106
10107var $ = __webpack_require__(3);
10108var getBuiltIn = __webpack_require__(25);
10109var apply = __webpack_require__(95);
10110var bind = __webpack_require__(223);
10111var aConstructor = __webpack_require__(206);
10112var anObject = __webpack_require__(48);
10113var isObject = __webpack_require__(21);
10114var create = __webpack_require__(73);
10115var fails = __webpack_require__(7);
10116
10117var nativeConstruct = getBuiltIn('Reflect', 'construct');
10118var ObjectPrototype = Object.prototype;
10119var push = [].push;
10120
10121// `Reflect.construct` method
10122// https://tc39.es/ecma262/#sec-reflect.construct
10123// MS Edge supports only 2 arguments and argumentsList argument is optional
10124// FF Nightly sets third argument as `new.target`, but does not create `this` from it
10125var NEW_TARGET_BUG = fails(function () {
10126 function F() { /* empty */ }
10127 return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
10128});
10129
10130var ARGS_BUG = !fails(function () {
10131 nativeConstruct(function () { /* empty */ });
10132});
10133
10134var FORCED = NEW_TARGET_BUG || ARGS_BUG;
10135
10136$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
10137 construct: function construct(Target, args /* , newTarget */) {
10138 aConstructor(Target);
10139 anObject(args);
10140 var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]);
10141 if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
10142 if (Target == newTarget) {
10143 // w/o altered newTarget, optimization for 0-4 arguments
10144 switch (args.length) {
10145 case 0: return new Target();
10146 case 1: return new Target(args[0]);
10147 case 2: return new Target(args[0], args[1]);
10148 case 3: return new Target(args[0], args[1], args[2]);
10149 case 4: return new Target(args[0], args[1], args[2], args[3]);
10150 }
10151 // w/o altered newTarget, lot of arguments case
10152 var $args = [null];
10153 apply(push, $args, args);
10154 return new (apply(bind, Target, $args))();
10155 }
10156 // with altered newTarget, not support built-in constructors
10157 var proto = newTarget.prototype;
10158 var instance = create(isObject(proto) ? proto : ObjectPrototype);
10159 var result = apply(Target, instance, args);
10160 return isObject(result) ? result : instance;
10161 }
10162});
10163
10164
10165/***/ }),
10166/* 342 */
10167/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10168
10169var $ = __webpack_require__(3);
10170var DESCRIPTORS = __webpack_require__(6);
10171var anObject = __webpack_require__(48);
10172var toPropertyKey = __webpack_require__(19);
10173var definePropertyModule = __webpack_require__(46);
10174var fails = __webpack_require__(7);
10175
10176// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
10177var ERROR_INSTEAD_OF_FALSE = fails(function () {
10178 // eslint-disable-next-line es/no-reflect -- required for testing
10179 Reflect.defineProperty(definePropertyModule.f({}, 1, { value: 1 }), 1, { value: 2 });
10180});
10181
10182// `Reflect.defineProperty` method
10183// https://tc39.es/ecma262/#sec-reflect.defineproperty
10184$({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !DESCRIPTORS }, {
10185 defineProperty: function defineProperty(target, propertyKey, attributes) {
10186 anObject(target);
10187 var key = toPropertyKey(propertyKey);
10188 anObject(attributes);
10189 try {
10190 definePropertyModule.f(target, key, attributes);
10191 return true;
10192 } catch (error) {
10193 return false;
10194 }
10195 }
10196});
10197
10198
10199/***/ }),
10200/* 343 */
10201/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10202
10203var $ = __webpack_require__(3);
10204var anObject = __webpack_require__(48);
10205var getOwnPropertyDescriptor = (__webpack_require__(5).f);
10206
10207// `Reflect.deleteProperty` method
10208// https://tc39.es/ecma262/#sec-reflect.deleteproperty
10209$({ target: 'Reflect', stat: true }, {
10210 deleteProperty: function deleteProperty(target, propertyKey) {
10211 var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);
10212 return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
10213 }
10214});
10215
10216
10217/***/ }),
10218/* 344 */
10219/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10220
10221var $ = __webpack_require__(3);
10222var call = __webpack_require__(8);
10223var isObject = __webpack_require__(21);
10224var anObject = __webpack_require__(48);
10225var isDataDescriptor = __webpack_require__(345);
10226var getOwnPropertyDescriptorModule = __webpack_require__(5);
10227var getPrototypeOf = __webpack_require__(126);
10228
10229// `Reflect.get` method
10230// https://tc39.es/ecma262/#sec-reflect.get
10231function get(target, propertyKey /* , receiver */) {
10232 var receiver = arguments.length < 3 ? target : arguments[2];
10233 var descriptor, prototype;
10234 if (anObject(target) === receiver) return target[propertyKey];
10235 descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey);
10236 if (descriptor) return isDataDescriptor(descriptor)
10237 ? descriptor.value
10238 : descriptor.get === undefined ? undefined : call(descriptor.get, receiver);
10239 if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver);
10240}
10241
10242$({ target: 'Reflect', stat: true }, {
10243 get: get
10244});
10245
10246
10247/***/ }),
10248/* 345 */
10249/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10250
10251var hasOwn = __webpack_require__(40);
10252
10253module.exports = function (descriptor) {
10254 return descriptor !== undefined && (hasOwn(descriptor, 'value') || hasOwn(descriptor, 'writable'));
10255};
10256
10257
10258/***/ }),
10259/* 346 */
10260/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10261
10262var $ = __webpack_require__(3);
10263var DESCRIPTORS = __webpack_require__(6);
10264var anObject = __webpack_require__(48);
10265var getOwnPropertyDescriptorModule = __webpack_require__(5);
10266
10267// `Reflect.getOwnPropertyDescriptor` method
10268// https://tc39.es/ecma262/#sec-reflect.getownpropertydescriptor
10269$({ target: 'Reflect', stat: true, sham: !DESCRIPTORS }, {
10270 getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
10271 return getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
10272 }
10273});
10274
10275
10276/***/ }),
10277/* 347 */
10278/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10279
10280var $ = __webpack_require__(3);
10281var anObject = __webpack_require__(48);
10282var objectGetPrototypeOf = __webpack_require__(126);
10283var CORRECT_PROTOTYPE_GETTER = __webpack_require__(127);
10284
10285// `Reflect.getPrototypeOf` method
10286// https://tc39.es/ecma262/#sec-reflect.getprototypeof
10287$({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {
10288 getPrototypeOf: function getPrototypeOf(target) {
10289 return objectGetPrototypeOf(anObject(target));
10290 }
10291});
10292
10293
10294/***/ }),
10295/* 348 */
10296/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10297
10298var $ = __webpack_require__(3);
10299
10300// `Reflect.has` method
10301// https://tc39.es/ecma262/#sec-reflect.has
10302$({ target: 'Reflect', stat: true }, {
10303 has: function has(target, propertyKey) {
10304 return propertyKey in target;
10305 }
10306});
10307
10308
10309/***/ }),
10310/* 349 */
10311/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10312
10313var $ = __webpack_require__(3);
10314var anObject = __webpack_require__(48);
10315var $isExtensible = __webpack_require__(232);
10316
10317// `Reflect.isExtensible` method
10318// https://tc39.es/ecma262/#sec-reflect.isextensible
10319$({ target: 'Reflect', stat: true }, {
10320 isExtensible: function isExtensible(target) {
10321 anObject(target);
10322 return $isExtensible(target);
10323 }
10324});
10325
10326
10327/***/ }),
10328/* 350 */
10329/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10330
10331var $ = __webpack_require__(3);
10332var ownKeys = __webpack_require__(58);
10333
10334// `Reflect.ownKeys` method
10335// https://tc39.es/ecma262/#sec-reflect.ownkeys
10336$({ target: 'Reflect', stat: true }, {
10337 ownKeys: ownKeys
10338});
10339
10340
10341/***/ }),
10342/* 351 */
10343/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10344
10345var $ = __webpack_require__(3);
10346var getBuiltIn = __webpack_require__(25);
10347var anObject = __webpack_require__(48);
10348var FREEZING = __webpack_require__(234);
10349
10350// `Reflect.preventExtensions` method
10351// https://tc39.es/ecma262/#sec-reflect.preventextensions
10352$({ target: 'Reflect', stat: true, sham: !FREEZING }, {
10353 preventExtensions: function preventExtensions(target) {
10354 anObject(target);
10355 try {
10356 var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions');
10357 if (objectPreventExtensions) objectPreventExtensions(target);
10358 return true;
10359 } catch (error) {
10360 return false;
10361 }
10362 }
10363});
10364
10365
10366/***/ }),
10367/* 352 */
10368/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10369
10370var $ = __webpack_require__(3);
10371var call = __webpack_require__(8);
10372var anObject = __webpack_require__(48);
10373var isObject = __webpack_require__(21);
10374var isDataDescriptor = __webpack_require__(345);
10375var fails = __webpack_require__(7);
10376var definePropertyModule = __webpack_require__(46);
10377var getOwnPropertyDescriptorModule = __webpack_require__(5);
10378var getPrototypeOf = __webpack_require__(126);
10379var createPropertyDescriptor = __webpack_require__(11);
10380
10381// `Reflect.set` method
10382// https://tc39.es/ecma262/#sec-reflect.set
10383function set(target, propertyKey, V /* , receiver */) {
10384 var receiver = arguments.length < 4 ? target : arguments[3];
10385 var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
10386 var existingDescriptor, prototype, setter;
10387 if (!ownDescriptor) {
10388 if (isObject(prototype = getPrototypeOf(target))) {
10389 return set(prototype, propertyKey, V, receiver);
10390 }
10391 ownDescriptor = createPropertyDescriptor(0);
10392 }
10393 if (isDataDescriptor(ownDescriptor)) {
10394 if (ownDescriptor.writable === false || !isObject(receiver)) return false;
10395 if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) {
10396 if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
10397 existingDescriptor.value = V;
10398 definePropertyModule.f(receiver, propertyKey, existingDescriptor);
10399 } else definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V));
10400 } else {
10401 setter = ownDescriptor.set;
10402 if (setter === undefined) return false;
10403 call(setter, receiver, V);
10404 } return true;
10405}
10406
10407// MS Edge 17-18 Reflect.set allows setting the property to object
10408// with non-writable property on the prototype
10409var MS_EDGE_BUG = fails(function () {
10410 var Constructor = function () { /* empty */ };
10411 var object = definePropertyModule.f(new Constructor(), 'a', { configurable: true });
10412 // eslint-disable-next-line es/no-reflect -- required for testing
10413 return Reflect.set(Constructor.prototype, 'a', 1, object) !== false;
10414});
10415
10416$({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {
10417 set: set
10418});
10419
10420
10421/***/ }),
10422/* 353 */
10423/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10424
10425var $ = __webpack_require__(3);
10426var anObject = __webpack_require__(48);
10427var aPossiblePrototype = __webpack_require__(115);
10428var objectSetPrototypeOf = __webpack_require__(114);
10429
10430// `Reflect.setPrototypeOf` method
10431// https://tc39.es/ecma262/#sec-reflect.setprototypeof
10432if (objectSetPrototypeOf) $({ target: 'Reflect', stat: true }, {
10433 setPrototypeOf: function setPrototypeOf(target, proto) {
10434 anObject(target);
10435 aPossiblePrototype(proto);
10436 try {
10437 objectSetPrototypeOf(target, proto);
10438 return true;
10439 } catch (error) {
10440 return false;
10441 }
10442 }
10443});
10444
10445
10446/***/ }),
10447/* 354 */
10448/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10449
10450var $ = __webpack_require__(3);
10451var global = __webpack_require__(4);
10452var setToStringTag = __webpack_require__(84);
10453
10454$({ global: true }, { Reflect: {} });
10455
10456// Reflect[@@toStringTag] property
10457// https://tc39.es/ecma262/#sec-reflect-@@tostringtag
10458setToStringTag(global.Reflect, 'Reflect', true);
10459
10460
10461/***/ }),
10462/* 355 */
10463/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10464
10465var DESCRIPTORS = __webpack_require__(6);
10466var global = __webpack_require__(4);
10467var uncurryThis = __webpack_require__(14);
10468var isForced = __webpack_require__(69);
10469var inheritIfRequired = __webpack_require__(117);
10470var createNonEnumerableProperty = __webpack_require__(45);
10471var getOwnPropertyNames = (__webpack_require__(59).f);
10472var isPrototypeOf = __webpack_require__(26);
10473var isRegExp = __webpack_require__(356);
10474var toString = __webpack_require__(70);
10475var getRegExpFlags = __webpack_require__(357);
10476var stickyHelpers = __webpack_require__(359);
10477var proxyAccessor = __webpack_require__(116);
10478var defineBuiltIn = __webpack_require__(49);
10479var fails = __webpack_require__(7);
10480var hasOwn = __webpack_require__(40);
10481var enforceInternalState = (__webpack_require__(53).enforce);
10482var setSpecies = __webpack_require__(190);
10483var wellKnownSymbol = __webpack_require__(35);
10484var UNSUPPORTED_DOT_ALL = __webpack_require__(360);
10485var UNSUPPORTED_NCG = __webpack_require__(361);
10486
10487var MATCH = wellKnownSymbol('match');
10488var NativeRegExp = global.RegExp;
10489var RegExpPrototype = NativeRegExp.prototype;
10490var SyntaxError = global.SyntaxError;
10491var exec = uncurryThis(RegExpPrototype.exec);
10492var charAt = uncurryThis(''.charAt);
10493var replace = uncurryThis(''.replace);
10494var stringIndexOf = uncurryThis(''.indexOf);
10495var stringSlice = uncurryThis(''.slice);
10496// TODO: Use only proper RegExpIdentifierName
10497var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;
10498var re1 = /a/g;
10499var re2 = /a/g;
10500
10501// "new" should create a new object, old webkit bug
10502var CORRECT_NEW = new NativeRegExp(re1) !== re1;
10503
10504var MISSED_STICKY = stickyHelpers.MISSED_STICKY;
10505var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
10506
10507var BASE_FORCED = DESCRIPTORS &&
10508 (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG || fails(function () {
10509 re2[MATCH] = false;
10510 // RegExp constructor can alter flags and IsRegExp works correct with @@match
10511 return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
10512 }));
10513
10514var handleDotAll = function (string) {
10515 var length = string.length;
10516 var index = 0;
10517 var result = '';
10518 var brackets = false;
10519 var chr;
10520 for (; index <= length; index++) {
10521 chr = charAt(string, index);
10522 if (chr === '\\') {
10523 result += chr + charAt(string, ++index);
10524 continue;
10525 }
10526 if (!brackets && chr === '.') {
10527 result += '[\\s\\S]';
10528 } else {
10529 if (chr === '[') {
10530 brackets = true;
10531 } else if (chr === ']') {
10532 brackets = false;
10533 } result += chr;
10534 }
10535 } return result;
10536};
10537
10538var handleNCG = function (string) {
10539 var length = string.length;
10540 var index = 0;
10541 var result = '';
10542 var named = [];
10543 var names = {};
10544 var brackets = false;
10545 var ncg = false;
10546 var groupid = 0;
10547 var groupname = '';
10548 var chr;
10549 for (; index <= length; index++) {
10550 chr = charAt(string, index);
10551 if (chr === '\\') {
10552 chr = chr + charAt(string, ++index);
10553 } else if (chr === ']') {
10554 brackets = false;
10555 } else if (!brackets) switch (true) {
10556 case chr === '[':
10557 brackets = true;
10558 break;
10559 case chr === '(':
10560 if (exec(IS_NCG, stringSlice(string, index + 1))) {
10561 index += 2;
10562 ncg = true;
10563 }
10564 result += chr;
10565 groupid++;
10566 continue;
10567 case chr === '>' && ncg:
10568 if (groupname === '' || hasOwn(names, groupname)) {
10569 throw new SyntaxError('Invalid capture group name');
10570 }
10571 names[groupname] = true;
10572 named[named.length] = [groupname, groupid];
10573 ncg = false;
10574 groupname = '';
10575 continue;
10576 }
10577 if (ncg) groupname += chr;
10578 else result += chr;
10579 } return [result, named];
10580};
10581
10582// `RegExp` constructor
10583// https://tc39.es/ecma262/#sec-regexp-constructor
10584if (isForced('RegExp', BASE_FORCED)) {
10585 var RegExpWrapper = function RegExp(pattern, flags) {
10586 var thisIsRegExp = isPrototypeOf(RegExpPrototype, this);
10587 var patternIsRegExp = isRegExp(pattern);
10588 var flagsAreUndefined = flags === undefined;
10589 var groups = [];
10590 var rawPattern = pattern;
10591 var rawFlags, dotAll, sticky, handled, result, state;
10592
10593 if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) {
10594 return pattern;
10595 }
10596
10597 if (patternIsRegExp || isPrototypeOf(RegExpPrototype, pattern)) {
10598 pattern = pattern.source;
10599 if (flagsAreUndefined) flags = getRegExpFlags(rawPattern);
10600 }
10601
10602 pattern = pattern === undefined ? '' : toString(pattern);
10603 flags = flags === undefined ? '' : toString(flags);
10604 rawPattern = pattern;
10605
10606 if (UNSUPPORTED_DOT_ALL && 'dotAll' in re1) {
10607 dotAll = !!flags && stringIndexOf(flags, 's') > -1;
10608 if (dotAll) flags = replace(flags, /s/g, '');
10609 }
10610
10611 rawFlags = flags;
10612
10613 if (MISSED_STICKY && 'sticky' in re1) {
10614 sticky = !!flags && stringIndexOf(flags, 'y') > -1;
10615 if (sticky && UNSUPPORTED_Y) flags = replace(flags, /y/g, '');
10616 }
10617
10618 if (UNSUPPORTED_NCG) {
10619 handled = handleNCG(pattern);
10620 pattern = handled[0];
10621 groups = handled[1];
10622 }
10623
10624 result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype, RegExpWrapper);
10625
10626 if (dotAll || sticky || groups.length) {
10627 state = enforceInternalState(result);
10628 if (dotAll) {
10629 state.dotAll = true;
10630 state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags);
10631 }
10632 if (sticky) state.sticky = true;
10633 if (groups.length) state.groups = groups;
10634 }
10635
10636 if (pattern !== rawPattern) try {
10637 // fails in old engines, but we have no alternatives for unsupported regex syntax
10638 createNonEnumerableProperty(result, 'source', rawPattern === '' ? '(?:)' : rawPattern);
10639 } catch (error) { /* empty */ }
10640
10641 return result;
10642 };
10643
10644 for (var keys = getOwnPropertyNames(NativeRegExp), index = 0; keys.length > index;) {
10645 proxyAccessor(RegExpWrapper, NativeRegExp, keys[index++]);
10646 }
10647
10648 RegExpPrototype.constructor = RegExpWrapper;
10649 RegExpWrapper.prototype = RegExpPrototype;
10650 defineBuiltIn(global, 'RegExp', RegExpWrapper, { constructor: true });
10651}
10652
10653// https://tc39.es/ecma262/#sec-get-regexp-@@species
10654setSpecies('RegExp');
10655
10656
10657/***/ }),
10658/* 356 */
10659/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10660
10661var isObject = __webpack_require__(21);
10662var classof = __webpack_require__(15);
10663var wellKnownSymbol = __webpack_require__(35);
10664
10665var MATCH = wellKnownSymbol('match');
10666
10667// `IsRegExp` abstract operation
10668// https://tc39.es/ecma262/#sec-isregexp
10669module.exports = function (it) {
10670 var isRegExp;
10671 return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
10672};
10673
10674
10675/***/ }),
10676/* 357 */
10677/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10678
10679var call = __webpack_require__(8);
10680var hasOwn = __webpack_require__(40);
10681var isPrototypeOf = __webpack_require__(26);
10682var regExpFlags = __webpack_require__(358);
10683
10684var RegExpPrototype = RegExp.prototype;
10685
10686module.exports = function (R) {
10687 var flags = R.flags;
10688 return flags === undefined && !('flags' in RegExpPrototype) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype, R)
10689 ? call(regExpFlags, R) : flags;
10690};
10691
10692
10693/***/ }),
10694/* 358 */
10695/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10696
10697"use strict";
10698
10699var anObject = __webpack_require__(48);
10700
10701// `RegExp.prototype.flags` getter implementation
10702// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
10703module.exports = function () {
10704 var that = anObject(this);
10705 var result = '';
10706 if (that.hasIndices) result += 'd';
10707 if (that.global) result += 'g';
10708 if (that.ignoreCase) result += 'i';
10709 if (that.multiline) result += 'm';
10710 if (that.dotAll) result += 's';
10711 if (that.unicode) result += 'u';
10712 if (that.unicodeSets) result += 'v';
10713 if (that.sticky) result += 'y';
10714 return result;
10715};
10716
10717
10718/***/ }),
10719/* 359 */
10720/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10721
10722var fails = __webpack_require__(7);
10723var global = __webpack_require__(4);
10724
10725// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
10726var $RegExp = global.RegExp;
10727
10728var UNSUPPORTED_Y = fails(function () {
10729 var re = $RegExp('a', 'y');
10730 re.lastIndex = 2;
10731 return re.exec('abcd') != null;
10732});
10733
10734// UC Browser bug
10735// https://github.com/zloirock/core-js/issues/1008
10736var MISSED_STICKY = UNSUPPORTED_Y || fails(function () {
10737 return !$RegExp('a', 'y').sticky;
10738});
10739
10740var BROKEN_CARET = UNSUPPORTED_Y || fails(function () {
10741 // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
10742 var re = $RegExp('^r', 'gy');
10743 re.lastIndex = 2;
10744 return re.exec('str') != null;
10745});
10746
10747module.exports = {
10748 BROKEN_CARET: BROKEN_CARET,
10749 MISSED_STICKY: MISSED_STICKY,
10750 UNSUPPORTED_Y: UNSUPPORTED_Y
10751};
10752
10753
10754/***/ }),
10755/* 360 */
10756/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10757
10758var fails = __webpack_require__(7);
10759var global = __webpack_require__(4);
10760
10761// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
10762var $RegExp = global.RegExp;
10763
10764module.exports = fails(function () {
10765 var re = $RegExp('.', 's');
10766 return !(re.dotAll && re.exec('\n') && re.flags === 's');
10767});
10768
10769
10770/***/ }),
10771/* 361 */
10772/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10773
10774var fails = __webpack_require__(7);
10775var global = __webpack_require__(4);
10776
10777// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
10778var $RegExp = global.RegExp;
10779
10780module.exports = fails(function () {
10781 var re = $RegExp('(?<a>b)', 'g');
10782 return re.exec('b').groups.a !== 'b' ||
10783 'b'.replace(re, '$<a>c') !== 'bc';
10784});
10785
10786
10787/***/ }),
10788/* 362 */
10789/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10790
10791var DESCRIPTORS = __webpack_require__(6);
10792var UNSUPPORTED_DOT_ALL = __webpack_require__(360);
10793var classof = __webpack_require__(15);
10794var defineBuiltInAccessor = __webpack_require__(306);
10795var getInternalState = (__webpack_require__(53).get);
10796
10797var RegExpPrototype = RegExp.prototype;
10798var $TypeError = TypeError;
10799
10800// `RegExp.prototype.dotAll` getter
10801// https://tc39.es/ecma262/#sec-get-regexp.prototype.dotall
10802if (DESCRIPTORS && UNSUPPORTED_DOT_ALL) {
10803 defineBuiltInAccessor(RegExpPrototype, 'dotAll', {
10804 configurable: true,
10805 get: function dotAll() {
10806 if (this === RegExpPrototype) return undefined;
10807 // We can't use InternalStateModule.getterFor because
10808 // we don't add metadata for regexps created by a literal.
10809 if (classof(this) === 'RegExp') {
10810 return !!getInternalState(this).dotAll;
10811 }
10812 throw $TypeError('Incompatible receiver, RegExp required');
10813 }
10814 });
10815}
10816
10817
10818/***/ }),
10819/* 363 */
10820/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10821
10822"use strict";
10823
10824var $ = __webpack_require__(3);
10825var exec = __webpack_require__(364);
10826
10827// `RegExp.prototype.exec` method
10828// https://tc39.es/ecma262/#sec-regexp.prototype.exec
10829$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
10830 exec: exec
10831});
10832
10833
10834/***/ }),
10835/* 364 */
10836/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10837
10838"use strict";
10839
10840/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
10841/* eslint-disable regexp/no-useless-quantifier -- testing */
10842var call = __webpack_require__(8);
10843var uncurryThis = __webpack_require__(14);
10844var toString = __webpack_require__(70);
10845var regexpFlags = __webpack_require__(358);
10846var stickyHelpers = __webpack_require__(359);
10847var shared = __webpack_require__(36);
10848var create = __webpack_require__(73);
10849var getInternalState = (__webpack_require__(53).get);
10850var UNSUPPORTED_DOT_ALL = __webpack_require__(360);
10851var UNSUPPORTED_NCG = __webpack_require__(361);
10852
10853var nativeReplace = shared('native-string-replace', String.prototype.replace);
10854var nativeExec = RegExp.prototype.exec;
10855var patchedExec = nativeExec;
10856var charAt = uncurryThis(''.charAt);
10857var indexOf = uncurryThis(''.indexOf);
10858var replace = uncurryThis(''.replace);
10859var stringSlice = uncurryThis(''.slice);
10860
10861var UPDATES_LAST_INDEX_WRONG = (function () {
10862 var re1 = /a/;
10863 var re2 = /b*/g;
10864 call(nativeExec, re1, 'a');
10865 call(nativeExec, re2, 'a');
10866 return re1.lastIndex !== 0 || re2.lastIndex !== 0;
10867})();
10868
10869var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
10870
10871// nonparticipating capturing group, copied from es5-shim's String#split patch.
10872var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
10873
10874var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
10875
10876if (PATCH) {
10877 patchedExec = function exec(string) {
10878 var re = this;
10879 var state = getInternalState(re);
10880 var str = toString(string);
10881 var raw = state.raw;
10882 var result, reCopy, lastIndex, match, i, object, group;
10883
10884 if (raw) {
10885 raw.lastIndex = re.lastIndex;
10886 result = call(patchedExec, raw, str);
10887 re.lastIndex = raw.lastIndex;
10888 return result;
10889 }
10890
10891 var groups = state.groups;
10892 var sticky = UNSUPPORTED_Y && re.sticky;
10893 var flags = call(regexpFlags, re);
10894 var source = re.source;
10895 var charsAdded = 0;
10896 var strCopy = str;
10897
10898 if (sticky) {
10899 flags = replace(flags, 'y', '');
10900 if (indexOf(flags, 'g') === -1) {
10901 flags += 'g';
10902 }
10903
10904 strCopy = stringSlice(str, re.lastIndex);
10905 // Support anchored sticky behavior.
10906 if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
10907 source = '(?: ' + source + ')';
10908 strCopy = ' ' + strCopy;
10909 charsAdded++;
10910 }
10911 // ^(? + rx + ) is needed, in combination with some str slicing, to
10912 // simulate the 'y' flag.
10913 reCopy = new RegExp('^(?:' + source + ')', flags);
10914 }
10915
10916 if (NPCG_INCLUDED) {
10917 reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
10918 }
10919 if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
10920
10921 match = call(nativeExec, sticky ? reCopy : re, strCopy);
10922
10923 if (sticky) {
10924 if (match) {
10925 match.input = stringSlice(match.input, charsAdded);
10926 match[0] = stringSlice(match[0], charsAdded);
10927 match.index = re.lastIndex;
10928 re.lastIndex += match[0].length;
10929 } else re.lastIndex = 0;
10930 } else if (UPDATES_LAST_INDEX_WRONG && match) {
10931 re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
10932 }
10933 if (NPCG_INCLUDED && match && match.length > 1) {
10934 // Fix browsers whose `exec` methods don't consistently return `undefined`
10935 // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
10936 call(nativeReplace, match[0], reCopy, function () {
10937 for (i = 1; i < arguments.length - 2; i++) {
10938 if (arguments[i] === undefined) match[i] = undefined;
10939 }
10940 });
10941 }
10942
10943 if (match && groups) {
10944 match.groups = object = create(null);
10945 for (i = 0; i < groups.length; i++) {
10946 group = groups[i];
10947 object[group[0]] = match[group[1]];
10948 }
10949 }
10950
10951 return match;
10952 };
10953}
10954
10955module.exports = patchedExec;
10956
10957
10958/***/ }),
10959/* 365 */
10960/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
10961
10962var global = __webpack_require__(4);
10963var DESCRIPTORS = __webpack_require__(6);
10964var defineBuiltInAccessor = __webpack_require__(306);
10965var regExpFlags = __webpack_require__(358);
10966var fails = __webpack_require__(7);
10967
10968// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError
10969var RegExp = global.RegExp;
10970var RegExpPrototype = RegExp.prototype;
10971
10972var FORCED = DESCRIPTORS && fails(function () {
10973 var INDICES_SUPPORT = true;
10974 try {
10975 RegExp('.', 'd');
10976 } catch (error) {
10977 INDICES_SUPPORT = false;
10978 }
10979
10980 var O = {};
10981 // modern V8 bug
10982 var calls = '';
10983 var expected = INDICES_SUPPORT ? 'dgimsy' : 'gimsy';
10984
10985 var addGetter = function (key, chr) {
10986 // eslint-disable-next-line es/no-object-defineproperty -- safe
10987 Object.defineProperty(O, key, { get: function () {
10988 calls += chr;
10989 return true;
10990 } });
10991 };
10992
10993 var pairs = {
10994 dotAll: 's',
10995 global: 'g',
10996 ignoreCase: 'i',
10997 multiline: 'm',
10998 sticky: 'y'
10999 };
11000
11001 if (INDICES_SUPPORT) pairs.hasIndices = 'd';
11002
11003 for (var key in pairs) addGetter(key, pairs[key]);
11004
11005 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
11006 var result = Object.getOwnPropertyDescriptor(RegExpPrototype, 'flags').get.call(O);
11007
11008 return result !== expected || calls !== expected;
11009});
11010
11011// `RegExp.prototype.flags` getter
11012// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
11013if (FORCED) defineBuiltInAccessor(RegExpPrototype, 'flags', {
11014 configurable: true,
11015 get: regExpFlags
11016});
11017
11018
11019/***/ }),
11020/* 366 */
11021/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11022
11023var DESCRIPTORS = __webpack_require__(6);
11024var MISSED_STICKY = (__webpack_require__(359).MISSED_STICKY);
11025var classof = __webpack_require__(15);
11026var defineBuiltInAccessor = __webpack_require__(306);
11027var getInternalState = (__webpack_require__(53).get);
11028
11029var RegExpPrototype = RegExp.prototype;
11030var $TypeError = TypeError;
11031
11032// `RegExp.prototype.sticky` getter
11033// https://tc39.es/ecma262/#sec-get-regexp.prototype.sticky
11034if (DESCRIPTORS && MISSED_STICKY) {
11035 defineBuiltInAccessor(RegExpPrototype, 'sticky', {
11036 configurable: true,
11037 get: function sticky() {
11038 if (this === RegExpPrototype) return undefined;
11039 // We can't use InternalStateModule.getterFor because
11040 // we don't add metadata for regexps created by a literal.
11041 if (classof(this) === 'RegExp') {
11042 return !!getInternalState(this).sticky;
11043 }
11044 throw $TypeError('Incompatible receiver, RegExp required');
11045 }
11046 });
11047}
11048
11049
11050/***/ }),
11051/* 367 */
11052/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11053
11054"use strict";
11055
11056// TODO: Remove from `core-js@4` since it's moved to entry points
11057__webpack_require__(363);
11058var $ = __webpack_require__(3);
11059var call = __webpack_require__(8);
11060var isCallable = __webpack_require__(22);
11061var anObject = __webpack_require__(48);
11062var toString = __webpack_require__(70);
11063
11064var DELEGATES_TO_EXEC = function () {
11065 var execCalled = false;
11066 var re = /[ac]/;
11067 re.exec = function () {
11068 execCalled = true;
11069 return /./.exec.apply(this, arguments);
11070 };
11071 return re.test('abc') === true && execCalled;
11072}();
11073
11074var nativeTest = /./.test;
11075
11076// `RegExp.prototype.test` method
11077// https://tc39.es/ecma262/#sec-regexp.prototype.test
11078$({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
11079 test: function (S) {
11080 var R = anObject(this);
11081 var string = toString(S);
11082 var exec = R.exec;
11083 if (!isCallable(exec)) return call(nativeTest, R, string);
11084 var result = call(exec, R, string);
11085 if (result === null) return false;
11086 anObject(result);
11087 return true;
11088 }
11089});
11090
11091
11092/***/ }),
11093/* 368 */
11094/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11095
11096"use strict";
11097
11098var PROPER_FUNCTION_NAME = (__webpack_require__(51).PROPER);
11099var defineBuiltIn = __webpack_require__(49);
11100var anObject = __webpack_require__(48);
11101var $toString = __webpack_require__(70);
11102var fails = __webpack_require__(7);
11103var getRegExpFlags = __webpack_require__(357);
11104
11105var TO_STRING = 'toString';
11106var RegExpPrototype = RegExp.prototype;
11107var nativeToString = RegExpPrototype[TO_STRING];
11108
11109var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
11110// FF44- RegExp#toString has a wrong name
11111var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;
11112
11113// `RegExp.prototype.toString` method
11114// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
11115if (NOT_GENERIC || INCORRECT_NAME) {
11116 defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
11117 var R = anObject(this);
11118 var pattern = $toString(R.source);
11119 var flags = $toString(getRegExpFlags(R));
11120 return '/' + pattern + '/' + flags;
11121 }, { unsafe: true });
11122}
11123
11124
11125/***/ }),
11126/* 369 */
11127/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11128
11129// TODO: Remove this module from `core-js@4` since it's replaced to module below
11130__webpack_require__(370);
11131
11132
11133/***/ }),
11134/* 370 */
11135/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11136
11137"use strict";
11138
11139var collection = __webpack_require__(230);
11140var collectionStrong = __webpack_require__(235);
11141
11142// `Set` constructor
11143// https://tc39.es/ecma262/#sec-set-objects
11144collection('Set', function (init) {
11145 return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
11146}, collectionStrong);
11147
11148
11149/***/ }),
11150/* 371 */
11151/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11152
11153"use strict";
11154
11155var $ = __webpack_require__(3);
11156var uncurryThis = __webpack_require__(14);
11157var requireObjectCoercible = __webpack_require__(17);
11158var toIntegerOrInfinity = __webpack_require__(63);
11159var toString = __webpack_require__(70);
11160var fails = __webpack_require__(7);
11161
11162var charAt = uncurryThis(''.charAt);
11163
11164var FORCED = fails(function () {
11165 // eslint-disable-next-line es/no-array-string-prototype-at -- safe
11166 return '𠮷'.at(-2) !== '\uD842';
11167});
11168
11169// `String.prototype.at` method
11170// https://github.com/tc39/proposal-relative-indexing-method
11171$({ target: 'String', proto: true, forced: FORCED }, {
11172 at: function at(index) {
11173 var S = toString(requireObjectCoercible(this));
11174 var len = S.length;
11175 var relativeIndex = toIntegerOrInfinity(index);
11176 var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
11177 return (k < 0 || k >= len) ? undefined : charAt(S, k);
11178 }
11179});
11180
11181
11182/***/ }),
11183/* 372 */
11184/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11185
11186"use strict";
11187
11188var $ = __webpack_require__(3);
11189var codeAt = (__webpack_require__(373).codeAt);
11190
11191// `String.prototype.codePointAt` method
11192// https://tc39.es/ecma262/#sec-string.prototype.codepointat
11193$({ target: 'String', proto: true }, {
11194 codePointAt: function codePointAt(pos) {
11195 return codeAt(this, pos);
11196 }
11197});
11198
11199
11200/***/ }),
11201/* 373 */
11202/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11203
11204var uncurryThis = __webpack_require__(14);
11205var toIntegerOrInfinity = __webpack_require__(63);
11206var toString = __webpack_require__(70);
11207var requireObjectCoercible = __webpack_require__(17);
11208
11209var charAt = uncurryThis(''.charAt);
11210var charCodeAt = uncurryThis(''.charCodeAt);
11211var stringSlice = uncurryThis(''.slice);
11212
11213var createMethod = function (CONVERT_TO_STRING) {
11214 return function ($this, pos) {
11215 var S = toString(requireObjectCoercible($this));
11216 var position = toIntegerOrInfinity(pos);
11217 var size = S.length;
11218 var first, second;
11219 if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
11220 first = charCodeAt(S, position);
11221 return first < 0xD800 || first > 0xDBFF || position + 1 === size
11222 || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
11223 ? CONVERT_TO_STRING
11224 ? charAt(S, position)
11225 : first
11226 : CONVERT_TO_STRING
11227 ? stringSlice(S, position, position + 2)
11228 : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
11229 };
11230};
11231
11232module.exports = {
11233 // `String.prototype.codePointAt` method
11234 // https://tc39.es/ecma262/#sec-string.prototype.codepointat
11235 codeAt: createMethod(false),
11236 // `String.prototype.at` method
11237 // https://github.com/mathiasbynens/String.prototype.at
11238 charAt: createMethod(true)
11239};
11240
11241
11242/***/ }),
11243/* 374 */
11244/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11245
11246"use strict";
11247
11248var $ = __webpack_require__(3);
11249var uncurryThis = __webpack_require__(14);
11250var getOwnPropertyDescriptor = (__webpack_require__(5).f);
11251var toLength = __webpack_require__(66);
11252var toString = __webpack_require__(70);
11253var notARegExp = __webpack_require__(375);
11254var requireObjectCoercible = __webpack_require__(17);
11255var correctIsRegExpLogic = __webpack_require__(376);
11256var IS_PURE = __webpack_require__(37);
11257
11258// eslint-disable-next-line es/no-string-prototype-endswith -- safe
11259var nativeEndsWith = uncurryThis(''.endsWith);
11260var slice = uncurryThis(''.slice);
11261var min = Math.min;
11262
11263var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');
11264// https://github.com/zloirock/core-js/pull/702
11265var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
11266 var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');
11267 return descriptor && !descriptor.writable;
11268}();
11269
11270// `String.prototype.endsWith` method
11271// https://tc39.es/ecma262/#sec-string.prototype.endswith
11272$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
11273 endsWith: function endsWith(searchString /* , endPosition = @length */) {
11274 var that = toString(requireObjectCoercible(this));
11275 notARegExp(searchString);
11276 var endPosition = arguments.length > 1 ? arguments[1] : undefined;
11277 var len = that.length;
11278 var end = endPosition === undefined ? len : min(toLength(endPosition), len);
11279 var search = toString(searchString);
11280 return nativeEndsWith
11281 ? nativeEndsWith(that, search, end)
11282 : slice(that, end - search.length, end) === search;
11283 }
11284});
11285
11286
11287/***/ }),
11288/* 375 */
11289/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11290
11291var isRegExp = __webpack_require__(356);
11292
11293var $TypeError = TypeError;
11294
11295module.exports = function (it) {
11296 if (isRegExp(it)) {
11297 throw $TypeError("The method doesn't accept regular expressions");
11298 } return it;
11299};
11300
11301
11302/***/ }),
11303/* 376 */
11304/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11305
11306var wellKnownSymbol = __webpack_require__(35);
11307
11308var MATCH = wellKnownSymbol('match');
11309
11310module.exports = function (METHOD_NAME) {
11311 var regexp = /./;
11312 try {
11313 '/./'[METHOD_NAME](regexp);
11314 } catch (error1) {
11315 try {
11316 regexp[MATCH] = false;
11317 return '/./'[METHOD_NAME](regexp);
11318 } catch (error2) { /* empty */ }
11319 } return false;
11320};
11321
11322
11323/***/ }),
11324/* 377 */
11325/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11326
11327var $ = __webpack_require__(3);
11328var uncurryThis = __webpack_require__(14);
11329var toAbsoluteIndex = __webpack_require__(62);
11330
11331var $RangeError = RangeError;
11332var fromCharCode = String.fromCharCode;
11333// eslint-disable-next-line es/no-string-fromcodepoint -- required for testing
11334var $fromCodePoint = String.fromCodePoint;
11335var join = uncurryThis([].join);
11336
11337// length should be 1, old FF problem
11338var INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length != 1;
11339
11340// `String.fromCodePoint` method
11341// https://tc39.es/ecma262/#sec-string.fromcodepoint
11342$({ target: 'String', stat: true, arity: 1, forced: INCORRECT_LENGTH }, {
11343 // eslint-disable-next-line no-unused-vars -- required for `.length`
11344 fromCodePoint: function fromCodePoint(x) {
11345 var elements = [];
11346 var length = arguments.length;
11347 var i = 0;
11348 var code;
11349 while (length > i) {
11350 code = +arguments[i++];
11351 if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw $RangeError(code + ' is not a valid code point');
11352 elements[i] = code < 0x10000
11353 ? fromCharCode(code)
11354 : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00);
11355 } return join(elements, '');
11356 }
11357});
11358
11359
11360/***/ }),
11361/* 378 */
11362/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11363
11364"use strict";
11365
11366var $ = __webpack_require__(3);
11367var uncurryThis = __webpack_require__(14);
11368var notARegExp = __webpack_require__(375);
11369var requireObjectCoercible = __webpack_require__(17);
11370var toString = __webpack_require__(70);
11371var correctIsRegExpLogic = __webpack_require__(376);
11372
11373var stringIndexOf = uncurryThis(''.indexOf);
11374
11375// `String.prototype.includes` method
11376// https://tc39.es/ecma262/#sec-string.prototype.includes
11377$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
11378 includes: function includes(searchString /* , position = 0 */) {
11379 return !!~stringIndexOf(
11380 toString(requireObjectCoercible(this)),
11381 toString(notARegExp(searchString)),
11382 arguments.length > 1 ? arguments[1] : undefined
11383 );
11384 }
11385});
11386
11387
11388/***/ }),
11389/* 379 */
11390/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11391
11392"use strict";
11393
11394var charAt = (__webpack_require__(373).charAt);
11395var toString = __webpack_require__(70);
11396var InternalStateModule = __webpack_require__(53);
11397var defineIterator = __webpack_require__(166);
11398var createIterResultObject = __webpack_require__(169);
11399
11400var STRING_ITERATOR = 'String Iterator';
11401var setInternalState = InternalStateModule.set;
11402var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
11403
11404// `String.prototype[@@iterator]` method
11405// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
11406defineIterator(String, 'String', function (iterated) {
11407 setInternalState(this, {
11408 type: STRING_ITERATOR,
11409 string: toString(iterated),
11410 index: 0
11411 });
11412// `%StringIteratorPrototype%.next` method
11413// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
11414}, function next() {
11415 var state = getInternalState(this);
11416 var string = state.string;
11417 var index = state.index;
11418 var point;
11419 if (index >= string.length) return createIterResultObject(undefined, true);
11420 point = charAt(string, index);
11421 state.index += point.length;
11422 return createIterResultObject(point, false);
11423});
11424
11425
11426/***/ }),
11427/* 380 */
11428/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11429
11430"use strict";
11431
11432var call = __webpack_require__(8);
11433var fixRegExpWellKnownSymbolLogic = __webpack_require__(381);
11434var anObject = __webpack_require__(48);
11435var isNullOrUndefined = __webpack_require__(18);
11436var toLength = __webpack_require__(66);
11437var toString = __webpack_require__(70);
11438var requireObjectCoercible = __webpack_require__(17);
11439var getMethod = __webpack_require__(31);
11440var advanceStringIndex = __webpack_require__(382);
11441var regExpExec = __webpack_require__(383);
11442
11443// @@match logic
11444fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
11445 return [
11446 // `String.prototype.match` method
11447 // https://tc39.es/ecma262/#sec-string.prototype.match
11448 function match(regexp) {
11449 var O = requireObjectCoercible(this);
11450 var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);
11451 return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));
11452 },
11453 // `RegExp.prototype[@@match]` method
11454 // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
11455 function (string) {
11456 var rx = anObject(this);
11457 var S = toString(string);
11458 var res = maybeCallNative(nativeMatch, rx, S);
11459
11460 if (res.done) return res.value;
11461
11462 if (!rx.global) return regExpExec(rx, S);
11463
11464 var fullUnicode = rx.unicode;
11465 rx.lastIndex = 0;
11466 var A = [];
11467 var n = 0;
11468 var result;
11469 while ((result = regExpExec(rx, S)) !== null) {
11470 var matchStr = toString(result[0]);
11471 A[n] = matchStr;
11472 if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
11473 n++;
11474 }
11475 return n === 0 ? null : A;
11476 }
11477 ];
11478});
11479
11480
11481/***/ }),
11482/* 381 */
11483/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11484
11485"use strict";
11486
11487// TODO: Remove from `core-js@4` since it's moved to entry points
11488__webpack_require__(363);
11489var uncurryThis = __webpack_require__(14);
11490var defineBuiltIn = __webpack_require__(49);
11491var regexpExec = __webpack_require__(364);
11492var fails = __webpack_require__(7);
11493var wellKnownSymbol = __webpack_require__(35);
11494var createNonEnumerableProperty = __webpack_require__(45);
11495
11496var SPECIES = wellKnownSymbol('species');
11497var RegExpPrototype = RegExp.prototype;
11498
11499module.exports = function (KEY, exec, FORCED, SHAM) {
11500 var SYMBOL = wellKnownSymbol(KEY);
11501
11502 var DELEGATES_TO_SYMBOL = !fails(function () {
11503 // String methods call symbol-named RegEp methods
11504 var O = {};
11505 O[SYMBOL] = function () { return 7; };
11506 return ''[KEY](O) != 7;
11507 });
11508
11509 var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
11510 // Symbol-named RegExp methods call .exec
11511 var execCalled = false;
11512 var re = /a/;
11513
11514 if (KEY === 'split') {
11515 // We can't use real regex here since it causes deoptimization
11516 // and serious performance degradation in V8
11517 // https://github.com/zloirock/core-js/issues/306
11518 re = {};
11519 // RegExp[@@split] doesn't call the regex's exec method, but first creates
11520 // a new one. We need to return the patched regex when creating the new one.
11521 re.constructor = {};
11522 re.constructor[SPECIES] = function () { return re; };
11523 re.flags = '';
11524 re[SYMBOL] = /./[SYMBOL];
11525 }
11526
11527 re.exec = function () { execCalled = true; return null; };
11528
11529 re[SYMBOL]('');
11530 return !execCalled;
11531 });
11532
11533 if (
11534 !DELEGATES_TO_SYMBOL ||
11535 !DELEGATES_TO_EXEC ||
11536 FORCED
11537 ) {
11538 var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]);
11539 var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
11540 var uncurriedNativeMethod = uncurryThis(nativeMethod);
11541 var $exec = regexp.exec;
11542 if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
11543 if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
11544 // The native String method already delegates to @@method (this
11545 // polyfilled function), leasing to infinite recursion.
11546 // We avoid it by directly calling the native @@method method.
11547 return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
11548 }
11549 return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
11550 }
11551 return { done: false };
11552 });
11553
11554 defineBuiltIn(String.prototype, KEY, methods[0]);
11555 defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
11556 }
11557
11558 if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
11559};
11560
11561
11562/***/ }),
11563/* 382 */
11564/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11565
11566"use strict";
11567
11568var charAt = (__webpack_require__(373).charAt);
11569
11570// `AdvanceStringIndex` abstract operation
11571// https://tc39.es/ecma262/#sec-advancestringindex
11572module.exports = function (S, index, unicode) {
11573 return index + (unicode ? charAt(S, index).length : 1);
11574};
11575
11576
11577/***/ }),
11578/* 383 */
11579/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11580
11581var call = __webpack_require__(8);
11582var anObject = __webpack_require__(48);
11583var isCallable = __webpack_require__(22);
11584var classof = __webpack_require__(15);
11585var regexpExec = __webpack_require__(364);
11586
11587var $TypeError = TypeError;
11588
11589// `RegExpExec` abstract operation
11590// https://tc39.es/ecma262/#sec-regexpexec
11591module.exports = function (R, S) {
11592 var exec = R.exec;
11593 if (isCallable(exec)) {
11594 var result = call(exec, R, S);
11595 if (result !== null) anObject(result);
11596 return result;
11597 }
11598 if (classof(R) === 'RegExp') return call(regexpExec, R, S);
11599 throw $TypeError('RegExp#exec called on incompatible receiver');
11600};
11601
11602
11603/***/ }),
11604/* 384 */
11605/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11606
11607"use strict";
11608
11609/* eslint-disable es/no-string-prototype-matchall -- safe */
11610var $ = __webpack_require__(3);
11611var call = __webpack_require__(8);
11612var uncurryThis = __webpack_require__(14);
11613var createIteratorConstructor = __webpack_require__(167);
11614var createIterResultObject = __webpack_require__(169);
11615var requireObjectCoercible = __webpack_require__(17);
11616var toLength = __webpack_require__(66);
11617var toString = __webpack_require__(70);
11618var anObject = __webpack_require__(48);
11619var isNullOrUndefined = __webpack_require__(18);
11620var classof = __webpack_require__(15);
11621var isRegExp = __webpack_require__(356);
11622var getRegExpFlags = __webpack_require__(357);
11623var getMethod = __webpack_require__(31);
11624var defineBuiltIn = __webpack_require__(49);
11625var fails = __webpack_require__(7);
11626var wellKnownSymbol = __webpack_require__(35);
11627var speciesConstructor = __webpack_require__(205);
11628var advanceStringIndex = __webpack_require__(382);
11629var regExpExec = __webpack_require__(383);
11630var InternalStateModule = __webpack_require__(53);
11631var IS_PURE = __webpack_require__(37);
11632
11633var MATCH_ALL = wellKnownSymbol('matchAll');
11634var REGEXP_STRING = 'RegExp String';
11635var REGEXP_STRING_ITERATOR = REGEXP_STRING + ' Iterator';
11636var setInternalState = InternalStateModule.set;
11637var getInternalState = InternalStateModule.getterFor(REGEXP_STRING_ITERATOR);
11638var RegExpPrototype = RegExp.prototype;
11639var $TypeError = TypeError;
11640var stringIndexOf = uncurryThis(''.indexOf);
11641var nativeMatchAll = uncurryThis(''.matchAll);
11642
11643var WORKS_WITH_NON_GLOBAL_REGEX = !!nativeMatchAll && !fails(function () {
11644 nativeMatchAll('a', /./);
11645});
11646
11647var $RegExpStringIterator = createIteratorConstructor(function RegExpStringIterator(regexp, string, $global, fullUnicode) {
11648 setInternalState(this, {
11649 type: REGEXP_STRING_ITERATOR,
11650 regexp: regexp,
11651 string: string,
11652 global: $global,
11653 unicode: fullUnicode,
11654 done: false
11655 });
11656}, REGEXP_STRING, function next() {
11657 var state = getInternalState(this);
11658 if (state.done) return createIterResultObject(undefined, true);
11659 var R = state.regexp;
11660 var S = state.string;
11661 var match = regExpExec(R, S);
11662 if (match === null) {
11663 state.done = true;
11664 return createIterResultObject(undefined, true);
11665 }
11666 if (state.global) {
11667 if (toString(match[0]) === '') R.lastIndex = advanceStringIndex(S, toLength(R.lastIndex), state.unicode);
11668 return createIterResultObject(match, false);
11669 }
11670 state.done = true;
11671 return createIterResultObject(match, false);
11672});
11673
11674var $matchAll = function (string) {
11675 var R = anObject(this);
11676 var S = toString(string);
11677 var C = speciesConstructor(R, RegExp);
11678 var flags = toString(getRegExpFlags(R));
11679 var matcher, $global, fullUnicode;
11680 matcher = new C(C === RegExp ? R.source : R, flags);
11681 $global = !!~stringIndexOf(flags, 'g');
11682 fullUnicode = !!~stringIndexOf(flags, 'u');
11683 matcher.lastIndex = toLength(R.lastIndex);
11684 return new $RegExpStringIterator(matcher, S, $global, fullUnicode);
11685};
11686
11687// `String.prototype.matchAll` method
11688// https://tc39.es/ecma262/#sec-string.prototype.matchall
11689$({ target: 'String', proto: true, forced: WORKS_WITH_NON_GLOBAL_REGEX }, {
11690 matchAll: function matchAll(regexp) {
11691 var O = requireObjectCoercible(this);
11692 var flags, S, matcher, rx;
11693 if (!isNullOrUndefined(regexp)) {
11694 if (isRegExp(regexp)) {
11695 flags = toString(requireObjectCoercible(getRegExpFlags(regexp)));
11696 if (!~stringIndexOf(flags, 'g')) throw $TypeError('`.matchAll` does not allow non-global regexes');
11697 }
11698 if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll(O, regexp);
11699 matcher = getMethod(regexp, MATCH_ALL);
11700 if (matcher === undefined && IS_PURE && classof(regexp) == 'RegExp') matcher = $matchAll;
11701 if (matcher) return call(matcher, regexp, O);
11702 } else if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll(O, regexp);
11703 S = toString(O);
11704 rx = new RegExp(regexp, 'g');
11705 return IS_PURE ? call($matchAll, rx, S) : rx[MATCH_ALL](S);
11706 }
11707});
11708
11709IS_PURE || MATCH_ALL in RegExpPrototype || defineBuiltIn(RegExpPrototype, MATCH_ALL, $matchAll);
11710
11711
11712/***/ }),
11713/* 385 */
11714/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11715
11716"use strict";
11717
11718var $ = __webpack_require__(3);
11719var $padEnd = (__webpack_require__(215).end);
11720var WEBKIT_BUG = __webpack_require__(386);
11721
11722// `String.prototype.padEnd` method
11723// https://tc39.es/ecma262/#sec-string.prototype.padend
11724$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
11725 padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
11726 return $padEnd(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);
11727 }
11728});
11729
11730
11731/***/ }),
11732/* 386 */
11733/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11734
11735// https://github.com/zloirock/core-js/issues/280
11736var userAgent = __webpack_require__(30);
11737
11738module.exports = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent);
11739
11740
11741/***/ }),
11742/* 387 */
11743/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11744
11745"use strict";
11746
11747var $ = __webpack_require__(3);
11748var $padStart = (__webpack_require__(215).start);
11749var WEBKIT_BUG = __webpack_require__(386);
11750
11751// `String.prototype.padStart` method
11752// https://tc39.es/ecma262/#sec-string.prototype.padstart
11753$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
11754 padStart: function padStart(maxLength /* , fillString = ' ' */) {
11755 return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);
11756 }
11757});
11758
11759
11760/***/ }),
11761/* 388 */
11762/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11763
11764var $ = __webpack_require__(3);
11765var uncurryThis = __webpack_require__(14);
11766var toIndexedObject = __webpack_require__(12);
11767var toObject = __webpack_require__(41);
11768var toString = __webpack_require__(70);
11769var lengthOfArrayLike = __webpack_require__(65);
11770
11771var push = uncurryThis([].push);
11772var join = uncurryThis([].join);
11773
11774// `String.raw` method
11775// https://tc39.es/ecma262/#sec-string.raw
11776$({ target: 'String', stat: true }, {
11777 raw: function raw(template) {
11778 var rawTemplate = toIndexedObject(toObject(template).raw);
11779 var literalSegments = lengthOfArrayLike(rawTemplate);
11780 var argumentsLength = arguments.length;
11781 var elements = [];
11782 var i = 0;
11783 while (literalSegments > i) {
11784 push(elements, toString(rawTemplate[i++]));
11785 if (i === literalSegments) return join(elements, '');
11786 if (i < argumentsLength) push(elements, toString(arguments[i]));
11787 }
11788 }
11789});
11790
11791
11792/***/ }),
11793/* 389 */
11794/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11795
11796var $ = __webpack_require__(3);
11797var repeat = __webpack_require__(216);
11798
11799// `String.prototype.repeat` method
11800// https://tc39.es/ecma262/#sec-string.prototype.repeat
11801$({ target: 'String', proto: true }, {
11802 repeat: repeat
11803});
11804
11805
11806/***/ }),
11807/* 390 */
11808/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
11809
11810"use strict";
11811
11812var apply = __webpack_require__(95);
11813var call = __webpack_require__(8);
11814var uncurryThis = __webpack_require__(14);
11815var fixRegExpWellKnownSymbolLogic = __webpack_require__(381);
11816var fails = __webpack_require__(7);
11817var anObject = __webpack_require__(48);
11818var isCallable = __webpack_require__(22);
11819var isNullOrUndefined = __webpack_require__(18);
11820var toIntegerOrInfinity = __webpack_require__(63);
11821var toLength = __webpack_require__(66);
11822var toString = __webpack_require__(70);
11823var requireObjectCoercible = __webpack_require__(17);
11824var advanceStringIndex = __webpack_require__(382);
11825var getMethod = __webpack_require__(31);
11826var getSubstitution = __webpack_require__(391);
11827var regExpExec = __webpack_require__(383);
11828var wellKnownSymbol = __webpack_require__(35);
11829
11830var REPLACE = wellKnownSymbol('replace');
11831var max = Math.max;
11832var min = Math.min;
11833var concat = uncurryThis([].concat);
11834var push = uncurryThis([].push);
11835var stringIndexOf = uncurryThis(''.indexOf);
11836var stringSlice = uncurryThis(''.slice);
11837
11838var maybeToString = function (it) {
11839 return it === undefined ? it : String(it);
11840};
11841
11842// IE <= 11 replaces $0 with the whole match, as if it was $&
11843// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
11844var REPLACE_KEEPS_$0 = (function () {
11845 // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
11846 return 'a'.replace(/./, '$0') === '$0';
11847})();
11848
11849// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
11850var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
11851 if (/./[REPLACE]) {
11852 return /./[REPLACE]('a', '$0') === '';
11853 }
11854 return false;
11855})();
11856
11857var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
11858 var re = /./;
11859 re.exec = function () {
11860 var result = [];
11861 result.groups = { a: '7' };
11862 return result;
11863 };
11864 // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
11865 return ''.replace(re, '$<a>') !== '7';
11866});
11867
11868// @@replace logic
11869fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
11870 var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
11871
11872 return [
11873 // `String.prototype.replace` method
11874 // https://tc39.es/ecma262/#sec-string.prototype.replace
11875 function replace(searchValue, replaceValue) {
11876 var O = requireObjectCoercible(this);
11877 var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
11878 return replacer
11879 ? call(replacer, searchValue, O, replaceValue)
11880 : call(nativeReplace, toString(O), searchValue, replaceValue);
11881 },
11882 // `RegExp.prototype[@@replace]` method
11883 // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
11884 function (string, replaceValue) {
11885 var rx = anObject(this);
11886 var S = toString(string);
11887
11888 if (
11889 typeof replaceValue == 'string' &&
11890 stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
11891 stringIndexOf(replaceValue, '$<') === -1
11892 ) {
11893 var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
11894 if (res.done) return res.value;
11895 }
11896
11897 var functionalReplace = isCallable(replaceValue);
11898 if (!functionalReplace) replaceValue = toString(replaceValue);
11899
11900 var global = rx.global;
11901 if (global) {
11902 var fullUnicode = rx.unicode;
11903 rx.lastIndex = 0;
11904 }
11905 var results = [];
11906 while (true) {
11907 var result = regExpExec(rx, S);
11908 if (result === null) break;
11909
11910 push(results, result);
11911 if (!global) break;
11912
11913 var matchStr = toString(result[0]);
11914 if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
11915 }
11916
11917 var accumulatedResult = '';
11918 var nextSourcePosition = 0;
11919 for (var i = 0; i < results.length; i++) {
11920 result = results[i];
11921
11922 var matched = toString(result[0]);
11923 var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
11924 var captures = [];
11925 // NOTE: This is equivalent to
11926 // captures = result.slice(1).map(maybeToString)
11927 // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
11928 // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
11929 // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
11930 for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
11931 var namedCaptures = result.groups;
11932 if (functionalReplace) {
11933 var replacerArgs = concat([matched], captures, position, S);
11934 if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
11935 var replacement = toString(apply(replaceValue, undefined, replacerArgs));
11936 } else {
11937 replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
11938 }
11939 if (position >= nextSourcePosition) {
11940 accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
11941 nextSourcePosition = position + matched.length;
11942 }
11943 }
11944 return accumulatedResult + stringSlice(S, nextSourcePosition);
11945 }
11946 ];
11947}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
11948
11949
11950/***/ }),
11951/* 391 */
11952/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11953
11954var uncurryThis = __webpack_require__(14);
11955var toObject = __webpack_require__(41);
11956
11957var floor = Math.floor;
11958var charAt = uncurryThis(''.charAt);
11959var replace = uncurryThis(''.replace);
11960var stringSlice = uncurryThis(''.slice);
11961var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
11962var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
11963
11964// `GetSubstitution` abstract operation
11965// https://tc39.es/ecma262/#sec-getsubstitution
11966module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
11967 var tailPos = position + matched.length;
11968 var m = captures.length;
11969 var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
11970 if (namedCaptures !== undefined) {
11971 namedCaptures = toObject(namedCaptures);
11972 symbols = SUBSTITUTION_SYMBOLS;
11973 }
11974 return replace(replacement, symbols, function (match, ch) {
11975 var capture;
11976 switch (charAt(ch, 0)) {
11977 case '$': return '$';
11978 case '&': return matched;
11979 case '`': return stringSlice(str, 0, position);
11980 case "'": return stringSlice(str, tailPos);
11981 case '<':
11982 capture = namedCaptures[stringSlice(ch, 1, -1)];
11983 break;
11984 default: // \d\d?
11985 var n = +ch;
11986 if (n === 0) return match;
11987 if (n > m) {
11988 var f = floor(n / 10);
11989 if (f === 0) return match;
11990 if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
11991 return match;
11992 }
11993 capture = captures[n - 1];
11994 }
11995 return capture === undefined ? '' : capture;
11996 });
11997};
11998
11999
12000/***/ }),
12001/* 392 */
12002/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12003
12004"use strict";
12005
12006var $ = __webpack_require__(3);
12007var call = __webpack_require__(8);
12008var uncurryThis = __webpack_require__(14);
12009var requireObjectCoercible = __webpack_require__(17);
12010var isCallable = __webpack_require__(22);
12011var isNullOrUndefined = __webpack_require__(18);
12012var isRegExp = __webpack_require__(356);
12013var toString = __webpack_require__(70);
12014var getMethod = __webpack_require__(31);
12015var getRegExpFlags = __webpack_require__(357);
12016var getSubstitution = __webpack_require__(391);
12017var wellKnownSymbol = __webpack_require__(35);
12018var IS_PURE = __webpack_require__(37);
12019
12020var REPLACE = wellKnownSymbol('replace');
12021var $TypeError = TypeError;
12022var indexOf = uncurryThis(''.indexOf);
12023var replace = uncurryThis(''.replace);
12024var stringSlice = uncurryThis(''.slice);
12025var max = Math.max;
12026
12027var stringIndexOf = function (string, searchValue, fromIndex) {
12028 if (fromIndex > string.length) return -1;
12029 if (searchValue === '') return fromIndex;
12030 return indexOf(string, searchValue, fromIndex);
12031};
12032
12033// `String.prototype.replaceAll` method
12034// https://tc39.es/ecma262/#sec-string.prototype.replaceall
12035$({ target: 'String', proto: true }, {
12036 replaceAll: function replaceAll(searchValue, replaceValue) {
12037 var O = requireObjectCoercible(this);
12038 var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, replacement;
12039 var position = 0;
12040 var endOfLastMatch = 0;
12041 var result = '';
12042 if (!isNullOrUndefined(searchValue)) {
12043 IS_REG_EXP = isRegExp(searchValue);
12044 if (IS_REG_EXP) {
12045 flags = toString(requireObjectCoercible(getRegExpFlags(searchValue)));
12046 if (!~indexOf(flags, 'g')) throw $TypeError('`.replaceAll` does not allow non-global regexes');
12047 }
12048 replacer = getMethod(searchValue, REPLACE);
12049 if (replacer) {
12050 return call(replacer, searchValue, O, replaceValue);
12051 } else if (IS_PURE && IS_REG_EXP) {
12052 return replace(toString(O), searchValue, replaceValue);
12053 }
12054 }
12055 string = toString(O);
12056 searchString = toString(searchValue);
12057 functionalReplace = isCallable(replaceValue);
12058 if (!functionalReplace) replaceValue = toString(replaceValue);
12059 searchLength = searchString.length;
12060 advanceBy = max(1, searchLength);
12061 position = stringIndexOf(string, searchString, 0);
12062 while (position !== -1) {
12063 replacement = functionalReplace
12064 ? toString(replaceValue(searchString, position, string))
12065 : getSubstitution(searchString, string, position, [], undefined, replaceValue);
12066 result += stringSlice(string, endOfLastMatch, position) + replacement;
12067 endOfLastMatch = position + searchLength;
12068 position = stringIndexOf(string, searchString, position + advanceBy);
12069 }
12070 if (endOfLastMatch < string.length) {
12071 result += stringSlice(string, endOfLastMatch);
12072 }
12073 return result;
12074 }
12075});
12076
12077
12078/***/ }),
12079/* 393 */
12080/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12081
12082"use strict";
12083
12084var call = __webpack_require__(8);
12085var fixRegExpWellKnownSymbolLogic = __webpack_require__(381);
12086var anObject = __webpack_require__(48);
12087var isNullOrUndefined = __webpack_require__(18);
12088var requireObjectCoercible = __webpack_require__(17);
12089var sameValue = __webpack_require__(297);
12090var toString = __webpack_require__(70);
12091var getMethod = __webpack_require__(31);
12092var regExpExec = __webpack_require__(383);
12093
12094// @@search logic
12095fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
12096 return [
12097 // `String.prototype.search` method
12098 // https://tc39.es/ecma262/#sec-string.prototype.search
12099 function search(regexp) {
12100 var O = requireObjectCoercible(this);
12101 var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);
12102 return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
12103 },
12104 // `RegExp.prototype[@@search]` method
12105 // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
12106 function (string) {
12107 var rx = anObject(this);
12108 var S = toString(string);
12109 var res = maybeCallNative(nativeSearch, rx, S);
12110
12111 if (res.done) return res.value;
12112
12113 var previousLastIndex = rx.lastIndex;
12114 if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
12115 var result = regExpExec(rx, S);
12116 if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
12117 return result === null ? -1 : result.index;
12118 }
12119 ];
12120});
12121
12122
12123/***/ }),
12124/* 394 */
12125/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12126
12127"use strict";
12128
12129var apply = __webpack_require__(95);
12130var call = __webpack_require__(8);
12131var uncurryThis = __webpack_require__(14);
12132var fixRegExpWellKnownSymbolLogic = __webpack_require__(381);
12133var anObject = __webpack_require__(48);
12134var isNullOrUndefined = __webpack_require__(18);
12135var isRegExp = __webpack_require__(356);
12136var requireObjectCoercible = __webpack_require__(17);
12137var speciesConstructor = __webpack_require__(205);
12138var advanceStringIndex = __webpack_require__(382);
12139var toLength = __webpack_require__(66);
12140var toString = __webpack_require__(70);
12141var getMethod = __webpack_require__(31);
12142var arraySlice = __webpack_require__(78);
12143var callRegExpExec = __webpack_require__(383);
12144var regexpExec = __webpack_require__(364);
12145var stickyHelpers = __webpack_require__(359);
12146var fails = __webpack_require__(7);
12147
12148var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
12149var MAX_UINT32 = 0xFFFFFFFF;
12150var min = Math.min;
12151var $push = [].push;
12152var exec = uncurryThis(/./.exec);
12153var push = uncurryThis($push);
12154var stringSlice = uncurryThis(''.slice);
12155
12156// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
12157// Weex JS has frozen built-in prototypes, so use try / catch wrapper
12158var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
12159 // eslint-disable-next-line regexp/no-empty-group -- required for testing
12160 var re = /(?:)/;
12161 var originalExec = re.exec;
12162 re.exec = function () { return originalExec.apply(this, arguments); };
12163 var result = 'ab'.split(re);
12164 return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
12165});
12166
12167// @@split logic
12168fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
12169 var internalSplit;
12170 if (
12171 'abbc'.split(/(b)*/)[1] == 'c' ||
12172 // eslint-disable-next-line regexp/no-empty-group -- required for testing
12173 'test'.split(/(?:)/, -1).length != 4 ||
12174 'ab'.split(/(?:ab)*/).length != 2 ||
12175 '.'.split(/(.?)(.?)/).length != 4 ||
12176 // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
12177 '.'.split(/()()/).length > 1 ||
12178 ''.split(/.?/).length
12179 ) {
12180 // based on es5-shim implementation, need to rework it
12181 internalSplit = function (separator, limit) {
12182 var string = toString(requireObjectCoercible(this));
12183 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
12184 if (lim === 0) return [];
12185 if (separator === undefined) return [string];
12186 // If `separator` is not a regex, use native split
12187 if (!isRegExp(separator)) {
12188 return call(nativeSplit, string, separator, lim);
12189 }
12190 var output = [];
12191 var flags = (separator.ignoreCase ? 'i' : '') +
12192 (separator.multiline ? 'm' : '') +
12193 (separator.unicode ? 'u' : '') +
12194 (separator.sticky ? 'y' : '');
12195 var lastLastIndex = 0;
12196 // Make `global` and avoid `lastIndex` issues by working with a copy
12197 var separatorCopy = new RegExp(separator.source, flags + 'g');
12198 var match, lastIndex, lastLength;
12199 while (match = call(regexpExec, separatorCopy, string)) {
12200 lastIndex = separatorCopy.lastIndex;
12201 if (lastIndex > lastLastIndex) {
12202 push(output, stringSlice(string, lastLastIndex, match.index));
12203 if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1));
12204 lastLength = match[0].length;
12205 lastLastIndex = lastIndex;
12206 if (output.length >= lim) break;
12207 }
12208 if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
12209 }
12210 if (lastLastIndex === string.length) {
12211 if (lastLength || !exec(separatorCopy, '')) push(output, '');
12212 } else push(output, stringSlice(string, lastLastIndex));
12213 return output.length > lim ? arraySlice(output, 0, lim) : output;
12214 };
12215 // Chakra, V8
12216 } else if ('0'.split(undefined, 0).length) {
12217 internalSplit = function (separator, limit) {
12218 return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);
12219 };
12220 } else internalSplit = nativeSplit;
12221
12222 return [
12223 // `String.prototype.split` method
12224 // https://tc39.es/ecma262/#sec-string.prototype.split
12225 function split(separator, limit) {
12226 var O = requireObjectCoercible(this);
12227 var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT);
12228 return splitter
12229 ? call(splitter, separator, O, limit)
12230 : call(internalSplit, toString(O), separator, limit);
12231 },
12232 // `RegExp.prototype[@@split]` method
12233 // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
12234 //
12235 // NOTE: This cannot be properly polyfilled in engines that don't support
12236 // the 'y' flag.
12237 function (string, limit) {
12238 var rx = anObject(this);
12239 var S = toString(string);
12240 var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
12241
12242 if (res.done) return res.value;
12243
12244 var C = speciesConstructor(rx, RegExp);
12245
12246 var unicodeMatching = rx.unicode;
12247 var flags = (rx.ignoreCase ? 'i' : '') +
12248 (rx.multiline ? 'm' : '') +
12249 (rx.unicode ? 'u' : '') +
12250 (UNSUPPORTED_Y ? 'g' : 'y');
12251
12252 // ^(? + rx + ) is needed, in combination with some S slicing, to
12253 // simulate the 'y' flag.
12254 var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
12255 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
12256 if (lim === 0) return [];
12257 if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
12258 var p = 0;
12259 var q = 0;
12260 var A = [];
12261 while (q < S.length) {
12262 splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
12263 var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
12264 var e;
12265 if (
12266 z === null ||
12267 (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
12268 ) {
12269 q = advanceStringIndex(S, q, unicodeMatching);
12270 } else {
12271 push(A, stringSlice(S, p, q));
12272 if (A.length === lim) return A;
12273 for (var i = 1; i <= z.length - 1; i++) {
12274 push(A, z[i]);
12275 if (A.length === lim) return A;
12276 }
12277 q = p = e;
12278 }
12279 }
12280 push(A, stringSlice(S, p));
12281 return A;
12282 }
12283 ];
12284}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
12285
12286
12287/***/ }),
12288/* 395 */
12289/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12290
12291"use strict";
12292
12293var $ = __webpack_require__(3);
12294var uncurryThis = __webpack_require__(14);
12295var getOwnPropertyDescriptor = (__webpack_require__(5).f);
12296var toLength = __webpack_require__(66);
12297var toString = __webpack_require__(70);
12298var notARegExp = __webpack_require__(375);
12299var requireObjectCoercible = __webpack_require__(17);
12300var correctIsRegExpLogic = __webpack_require__(376);
12301var IS_PURE = __webpack_require__(37);
12302
12303// eslint-disable-next-line es/no-string-prototype-startswith -- safe
12304var nativeStartsWith = uncurryThis(''.startsWith);
12305var stringSlice = uncurryThis(''.slice);
12306var min = Math.min;
12307
12308var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
12309// https://github.com/zloirock/core-js/pull/702
12310var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
12311 var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
12312 return descriptor && !descriptor.writable;
12313}();
12314
12315// `String.prototype.startsWith` method
12316// https://tc39.es/ecma262/#sec-string.prototype.startswith
12317$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
12318 startsWith: function startsWith(searchString /* , position = 0 */) {
12319 var that = toString(requireObjectCoercible(this));
12320 notARegExp(searchString);
12321 var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
12322 var search = toString(searchString);
12323 return nativeStartsWith
12324 ? nativeStartsWith(that, search, index)
12325 : stringSlice(that, index, index + search.length) === search;
12326 }
12327});
12328
12329
12330/***/ }),
12331/* 396 */
12332/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12333
12334"use strict";
12335
12336var $ = __webpack_require__(3);
12337var uncurryThis = __webpack_require__(14);
12338var requireObjectCoercible = __webpack_require__(17);
12339var toIntegerOrInfinity = __webpack_require__(63);
12340var toString = __webpack_require__(70);
12341
12342var stringSlice = uncurryThis(''.slice);
12343var max = Math.max;
12344var min = Math.min;
12345
12346// eslint-disable-next-line unicorn/prefer-string-slice, es/no-string-prototype-substr -- required for testing
12347var FORCED = !''.substr || 'ab'.substr(-1) !== 'b';
12348
12349// `String.prototype.substr` method
12350// https://tc39.es/ecma262/#sec-string.prototype.substr
12351$({ target: 'String', proto: true, forced: FORCED }, {
12352 substr: function substr(start, length) {
12353 var that = toString(requireObjectCoercible(this));
12354 var size = that.length;
12355 var intStart = toIntegerOrInfinity(start);
12356 var intLength, intEnd;
12357 if (intStart === Infinity) intStart = 0;
12358 if (intStart < 0) intStart = max(size + intStart, 0);
12359 intLength = length === undefined ? size : toIntegerOrInfinity(length);
12360 if (intLength <= 0 || intLength === Infinity) return '';
12361 intEnd = min(intStart + intLength, size);
12362 return intStart >= intEnd ? '' : stringSlice(that, intStart, intEnd);
12363 }
12364});
12365
12366
12367/***/ }),
12368/* 397 */
12369/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12370
12371"use strict";
12372
12373var $ = __webpack_require__(3);
12374var $trim = (__webpack_require__(261).trim);
12375var forcedStringTrimMethod = __webpack_require__(398);
12376
12377// `String.prototype.trim` method
12378// https://tc39.es/ecma262/#sec-string.prototype.trim
12379$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
12380 trim: function trim() {
12381 return $trim(this);
12382 }
12383});
12384
12385
12386/***/ }),
12387/* 398 */
12388/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
12389
12390var PROPER_FUNCTION_NAME = (__webpack_require__(51).PROPER);
12391var fails = __webpack_require__(7);
12392var whitespaces = __webpack_require__(262);
12393
12394var non = '\u200B\u0085\u180E';
12395
12396// check that a method works with the correct list
12397// of whitespaces and has a correct name
12398module.exports = function (METHOD_NAME) {
12399 return fails(function () {
12400 return !!whitespaces[METHOD_NAME]()
12401 || non[METHOD_NAME]() !== non
12402 || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
12403 });
12404};
12405
12406
12407/***/ }),
12408/* 399 */
12409/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12410
12411// TODO: Remove this line from `core-js@4`
12412__webpack_require__(400);
12413var $ = __webpack_require__(3);
12414var trimEnd = __webpack_require__(401);
12415
12416// `String.prototype.trimEnd` method
12417// https://tc39.es/ecma262/#sec-string.prototype.trimend
12418// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
12419$({ target: 'String', proto: true, name: 'trimEnd', forced: ''.trimEnd !== trimEnd }, {
12420 trimEnd: trimEnd
12421});
12422
12423
12424/***/ }),
12425/* 400 */
12426/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12427
12428var $ = __webpack_require__(3);
12429var trimEnd = __webpack_require__(401);
12430
12431// `String.prototype.trimRight` method
12432// https://tc39.es/ecma262/#sec-string.prototype.trimend
12433// eslint-disable-next-line es/no-string-prototype-trimleft-trimright -- safe
12434$({ target: 'String', proto: true, name: 'trimEnd', forced: ''.trimRight !== trimEnd }, {
12435 trimRight: trimEnd
12436});
12437
12438
12439/***/ }),
12440/* 401 */
12441/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
12442
12443"use strict";
12444
12445var $trimEnd = (__webpack_require__(261).end);
12446var forcedStringTrimMethod = __webpack_require__(398);
12447
12448// `String.prototype.{ trimEnd, trimRight }` method
12449// https://tc39.es/ecma262/#sec-string.prototype.trimend
12450// https://tc39.es/ecma262/#String.prototype.trimright
12451module.exports = forcedStringTrimMethod('trimEnd') ? function trimEnd() {
12452 return $trimEnd(this);
12453// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
12454} : ''.trimEnd;
12455
12456
12457/***/ }),
12458/* 402 */
12459/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12460
12461// TODO: Remove this line from `core-js@4`
12462__webpack_require__(403);
12463var $ = __webpack_require__(3);
12464var trimStart = __webpack_require__(404);
12465
12466// `String.prototype.trimStart` method
12467// https://tc39.es/ecma262/#sec-string.prototype.trimstart
12468// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
12469$({ target: 'String', proto: true, name: 'trimStart', forced: ''.trimStart !== trimStart }, {
12470 trimStart: trimStart
12471});
12472
12473
12474/***/ }),
12475/* 403 */
12476/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12477
12478var $ = __webpack_require__(3);
12479var trimStart = __webpack_require__(404);
12480
12481// `String.prototype.trimLeft` method
12482// https://tc39.es/ecma262/#sec-string.prototype.trimleft
12483// eslint-disable-next-line es/no-string-prototype-trimleft-trimright -- safe
12484$({ target: 'String', proto: true, name: 'trimStart', forced: ''.trimLeft !== trimStart }, {
12485 trimLeft: trimStart
12486});
12487
12488
12489/***/ }),
12490/* 404 */
12491/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
12492
12493"use strict";
12494
12495var $trimStart = (__webpack_require__(261).start);
12496var forcedStringTrimMethod = __webpack_require__(398);
12497
12498// `String.prototype.{ trimStart, trimLeft }` method
12499// https://tc39.es/ecma262/#sec-string.prototype.trimstart
12500// https://tc39.es/ecma262/#String.prototype.trimleft
12501module.exports = forcedStringTrimMethod('trimStart') ? function trimStart() {
12502 return $trimStart(this);
12503// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
12504} : ''.trimStart;
12505
12506
12507/***/ }),
12508/* 405 */
12509/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12510
12511"use strict";
12512
12513var $ = __webpack_require__(3);
12514var createHTML = __webpack_require__(406);
12515var forcedStringHTMLMethod = __webpack_require__(407);
12516
12517// `String.prototype.anchor` method
12518// https://tc39.es/ecma262/#sec-string.prototype.anchor
12519$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, {
12520 anchor: function anchor(name) {
12521 return createHTML(this, 'a', 'name', name);
12522 }
12523});
12524
12525
12526/***/ }),
12527/* 406 */
12528/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
12529
12530var uncurryThis = __webpack_require__(14);
12531var requireObjectCoercible = __webpack_require__(17);
12532var toString = __webpack_require__(70);
12533
12534var quot = /"/g;
12535var replace = uncurryThis(''.replace);
12536
12537// `CreateHTML` abstract operation
12538// https://tc39.es/ecma262/#sec-createhtml
12539module.exports = function (string, tag, attribute, value) {
12540 var S = toString(requireObjectCoercible(string));
12541 var p1 = '<' + tag;
12542 if (attribute !== '') p1 += ' ' + attribute + '="' + replace(toString(value), quot, '&quot;') + '"';
12543 return p1 + '>' + S + '</' + tag + '>';
12544};
12545
12546
12547/***/ }),
12548/* 407 */
12549/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
12550
12551var fails = __webpack_require__(7);
12552
12553// check the existence of a method, lowercase
12554// of a tag and escaping quotes in arguments
12555module.exports = function (METHOD_NAME) {
12556 return fails(function () {
12557 var test = ''[METHOD_NAME]('"');
12558 return test !== test.toLowerCase() || test.split('"').length > 3;
12559 });
12560};
12561
12562
12563/***/ }),
12564/* 408 */
12565/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12566
12567"use strict";
12568
12569var $ = __webpack_require__(3);
12570var createHTML = __webpack_require__(406);
12571var forcedStringHTMLMethod = __webpack_require__(407);
12572
12573// `String.prototype.big` method
12574// https://tc39.es/ecma262/#sec-string.prototype.big
12575$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('big') }, {
12576 big: function big() {
12577 return createHTML(this, 'big', '', '');
12578 }
12579});
12580
12581
12582/***/ }),
12583/* 409 */
12584/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12585
12586"use strict";
12587
12588var $ = __webpack_require__(3);
12589var createHTML = __webpack_require__(406);
12590var forcedStringHTMLMethod = __webpack_require__(407);
12591
12592// `String.prototype.blink` method
12593// https://tc39.es/ecma262/#sec-string.prototype.blink
12594$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('blink') }, {
12595 blink: function blink() {
12596 return createHTML(this, 'blink', '', '');
12597 }
12598});
12599
12600
12601/***/ }),
12602/* 410 */
12603/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12604
12605"use strict";
12606
12607var $ = __webpack_require__(3);
12608var createHTML = __webpack_require__(406);
12609var forcedStringHTMLMethod = __webpack_require__(407);
12610
12611// `String.prototype.bold` method
12612// https://tc39.es/ecma262/#sec-string.prototype.bold
12613$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('bold') }, {
12614 bold: function bold() {
12615 return createHTML(this, 'b', '', '');
12616 }
12617});
12618
12619
12620/***/ }),
12621/* 411 */
12622/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12623
12624"use strict";
12625
12626var $ = __webpack_require__(3);
12627var createHTML = __webpack_require__(406);
12628var forcedStringHTMLMethod = __webpack_require__(407);
12629
12630// `String.prototype.fixed` method
12631// https://tc39.es/ecma262/#sec-string.prototype.fixed
12632$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, {
12633 fixed: function fixed() {
12634 return createHTML(this, 'tt', '', '');
12635 }
12636});
12637
12638
12639/***/ }),
12640/* 412 */
12641/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12642
12643"use strict";
12644
12645var $ = __webpack_require__(3);
12646var createHTML = __webpack_require__(406);
12647var forcedStringHTMLMethod = __webpack_require__(407);
12648
12649// `String.prototype.fontcolor` method
12650// https://tc39.es/ecma262/#sec-string.prototype.fontcolor
12651$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontcolor') }, {
12652 fontcolor: function fontcolor(color) {
12653 return createHTML(this, 'font', 'color', color);
12654 }
12655});
12656
12657
12658/***/ }),
12659/* 413 */
12660/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12661
12662"use strict";
12663
12664var $ = __webpack_require__(3);
12665var createHTML = __webpack_require__(406);
12666var forcedStringHTMLMethod = __webpack_require__(407);
12667
12668// `String.prototype.fontsize` method
12669// https://tc39.es/ecma262/#sec-string.prototype.fontsize
12670$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontsize') }, {
12671 fontsize: function fontsize(size) {
12672 return createHTML(this, 'font', 'size', size);
12673 }
12674});
12675
12676
12677/***/ }),
12678/* 414 */
12679/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12680
12681"use strict";
12682
12683var $ = __webpack_require__(3);
12684var createHTML = __webpack_require__(406);
12685var forcedStringHTMLMethod = __webpack_require__(407);
12686
12687// `String.prototype.italics` method
12688// https://tc39.es/ecma262/#sec-string.prototype.italics
12689$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, {
12690 italics: function italics() {
12691 return createHTML(this, 'i', '', '');
12692 }
12693});
12694
12695
12696/***/ }),
12697/* 415 */
12698/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12699
12700"use strict";
12701
12702var $ = __webpack_require__(3);
12703var createHTML = __webpack_require__(406);
12704var forcedStringHTMLMethod = __webpack_require__(407);
12705
12706// `String.prototype.link` method
12707// https://tc39.es/ecma262/#sec-string.prototype.link
12708$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {
12709 link: function link(url) {
12710 return createHTML(this, 'a', 'href', url);
12711 }
12712});
12713
12714
12715/***/ }),
12716/* 416 */
12717/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12718
12719"use strict";
12720
12721var $ = __webpack_require__(3);
12722var createHTML = __webpack_require__(406);
12723var forcedStringHTMLMethod = __webpack_require__(407);
12724
12725// `String.prototype.small` method
12726// https://tc39.es/ecma262/#sec-string.prototype.small
12727$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, {
12728 small: function small() {
12729 return createHTML(this, 'small', '', '');
12730 }
12731});
12732
12733
12734/***/ }),
12735/* 417 */
12736/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12737
12738"use strict";
12739
12740var $ = __webpack_require__(3);
12741var createHTML = __webpack_require__(406);
12742var forcedStringHTMLMethod = __webpack_require__(407);
12743
12744// `String.prototype.strike` method
12745// https://tc39.es/ecma262/#sec-string.prototype.strike
12746$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, {
12747 strike: function strike() {
12748 return createHTML(this, 'strike', '', '');
12749 }
12750});
12751
12752
12753/***/ }),
12754/* 418 */
12755/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12756
12757"use strict";
12758
12759var $ = __webpack_require__(3);
12760var createHTML = __webpack_require__(406);
12761var forcedStringHTMLMethod = __webpack_require__(407);
12762
12763// `String.prototype.sub` method
12764// https://tc39.es/ecma262/#sec-string.prototype.sub
12765$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sub') }, {
12766 sub: function sub() {
12767 return createHTML(this, 'sub', '', '');
12768 }
12769});
12770
12771
12772/***/ }),
12773/* 419 */
12774/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12775
12776"use strict";
12777
12778var $ = __webpack_require__(3);
12779var createHTML = __webpack_require__(406);
12780var forcedStringHTMLMethod = __webpack_require__(407);
12781
12782// `String.prototype.sup` method
12783// https://tc39.es/ecma262/#sec-string.prototype.sup
12784$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sup') }, {
12785 sup: function sup() {
12786 return createHTML(this, 'sup', '', '');
12787 }
12788});
12789
12790
12791/***/ }),
12792/* 420 */
12793/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12794
12795var createTypedArrayConstructor = __webpack_require__(421);
12796
12797// `Float32Array` constructor
12798// https://tc39.es/ecma262/#sec-typedarray-objects
12799createTypedArrayConstructor('Float32', function (init) {
12800 return function Float32Array(data, byteOffset, length) {
12801 return init(this, data, byteOffset, length);
12802 };
12803});
12804
12805
12806/***/ }),
12807/* 421 */
12808/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
12809
12810"use strict";
12811
12812var $ = __webpack_require__(3);
12813var global = __webpack_require__(4);
12814var call = __webpack_require__(8);
12815var DESCRIPTORS = __webpack_require__(6);
12816var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(422);
12817var ArrayBufferViewCore = __webpack_require__(203);
12818var ArrayBufferModule = __webpack_require__(196);
12819var anInstance = __webpack_require__(199);
12820var createPropertyDescriptor = __webpack_require__(11);
12821var createNonEnumerableProperty = __webpack_require__(45);
12822var isIntegralNumber = __webpack_require__(267);
12823var toLength = __webpack_require__(66);
12824var toIndex = __webpack_require__(200);
12825var toOffset = __webpack_require__(423);
12826var toPropertyKey = __webpack_require__(19);
12827var hasOwn = __webpack_require__(40);
12828var classof = __webpack_require__(71);
12829var isObject = __webpack_require__(21);
12830var isSymbol = __webpack_require__(24);
12831var create = __webpack_require__(73);
12832var isPrototypeOf = __webpack_require__(26);
12833var setPrototypeOf = __webpack_require__(114);
12834var getOwnPropertyNames = (__webpack_require__(59).f);
12835var typedArrayFrom = __webpack_require__(425);
12836var forEach = (__webpack_require__(85).forEach);
12837var setSpecies = __webpack_require__(190);
12838var definePropertyModule = __webpack_require__(46);
12839var getOwnPropertyDescriptorModule = __webpack_require__(5);
12840var InternalStateModule = __webpack_require__(53);
12841var inheritIfRequired = __webpack_require__(117);
12842
12843var getInternalState = InternalStateModule.get;
12844var setInternalState = InternalStateModule.set;
12845var enforceInternalState = InternalStateModule.enforce;
12846var nativeDefineProperty = definePropertyModule.f;
12847var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
12848var round = Math.round;
12849var RangeError = global.RangeError;
12850var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
12851var ArrayBufferPrototype = ArrayBuffer.prototype;
12852var DataView = ArrayBufferModule.DataView;
12853var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
12854var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;
12855var TypedArray = ArrayBufferViewCore.TypedArray;
12856var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;
12857var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
12858var isTypedArray = ArrayBufferViewCore.isTypedArray;
12859var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
12860var WRONG_LENGTH = 'Wrong length';
12861
12862var fromList = function (C, list) {
12863 aTypedArrayConstructor(C);
12864 var index = 0;
12865 var length = list.length;
12866 var result = new C(length);
12867 while (length > index) result[index] = list[index++];
12868 return result;
12869};
12870
12871var addGetter = function (it, key) {
12872 nativeDefineProperty(it, key, { get: function () {
12873 return getInternalState(this)[key];
12874 } });
12875};
12876
12877var isArrayBuffer = function (it) {
12878 var klass;
12879 return isPrototypeOf(ArrayBufferPrototype, it) || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
12880};
12881
12882var isTypedArrayIndex = function (target, key) {
12883 return isTypedArray(target)
12884 && !isSymbol(key)
12885 && key in target
12886 && isIntegralNumber(+key)
12887 && key >= 0;
12888};
12889
12890var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {
12891 key = toPropertyKey(key);
12892 return isTypedArrayIndex(target, key)
12893 ? createPropertyDescriptor(2, target[key])
12894 : nativeGetOwnPropertyDescriptor(target, key);
12895};
12896
12897var wrappedDefineProperty = function defineProperty(target, key, descriptor) {
12898 key = toPropertyKey(key);
12899 if (isTypedArrayIndex(target, key)
12900 && isObject(descriptor)
12901 && hasOwn(descriptor, 'value')
12902 && !hasOwn(descriptor, 'get')
12903 && !hasOwn(descriptor, 'set')
12904 // TODO: add validation descriptor w/o calling accessors
12905 && !descriptor.configurable
12906 && (!hasOwn(descriptor, 'writable') || descriptor.writable)
12907 && (!hasOwn(descriptor, 'enumerable') || descriptor.enumerable)
12908 ) {
12909 target[key] = descriptor.value;
12910 return target;
12911 } return nativeDefineProperty(target, key, descriptor);
12912};
12913
12914if (DESCRIPTORS) {
12915 if (!NATIVE_ARRAY_BUFFER_VIEWS) {
12916 getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;
12917 definePropertyModule.f = wrappedDefineProperty;
12918 addGetter(TypedArrayPrototype, 'buffer');
12919 addGetter(TypedArrayPrototype, 'byteOffset');
12920 addGetter(TypedArrayPrototype, 'byteLength');
12921 addGetter(TypedArrayPrototype, 'length');
12922 }
12923
12924 $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
12925 getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
12926 defineProperty: wrappedDefineProperty
12927 });
12928
12929 module.exports = function (TYPE, wrapper, CLAMPED) {
12930 var BYTES = TYPE.match(/\d+$/)[0] / 8;
12931 var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';
12932 var GETTER = 'get' + TYPE;
12933 var SETTER = 'set' + TYPE;
12934 var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];
12935 var TypedArrayConstructor = NativeTypedArrayConstructor;
12936 var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;
12937 var exported = {};
12938
12939 var getter = function (that, index) {
12940 var data = getInternalState(that);
12941 return data.view[GETTER](index * BYTES + data.byteOffset, true);
12942 };
12943
12944 var setter = function (that, index, value) {
12945 var data = getInternalState(that);
12946 if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;
12947 data.view[SETTER](index * BYTES + data.byteOffset, value, true);
12948 };
12949
12950 var addElement = function (that, index) {
12951 nativeDefineProperty(that, index, {
12952 get: function () {
12953 return getter(this, index);
12954 },
12955 set: function (value) {
12956 return setter(this, index, value);
12957 },
12958 enumerable: true
12959 });
12960 };
12961
12962 if (!NATIVE_ARRAY_BUFFER_VIEWS) {
12963 TypedArrayConstructor = wrapper(function (that, data, offset, $length) {
12964 anInstance(that, TypedArrayConstructorPrototype);
12965 var index = 0;
12966 var byteOffset = 0;
12967 var buffer, byteLength, length;
12968 if (!isObject(data)) {
12969 length = toIndex(data);
12970 byteLength = length * BYTES;
12971 buffer = new ArrayBuffer(byteLength);
12972 } else if (isArrayBuffer(data)) {
12973 buffer = data;
12974 byteOffset = toOffset(offset, BYTES);
12975 var $len = data.byteLength;
12976 if ($length === undefined) {
12977 if ($len % BYTES) throw RangeError(WRONG_LENGTH);
12978 byteLength = $len - byteOffset;
12979 if (byteLength < 0) throw RangeError(WRONG_LENGTH);
12980 } else {
12981 byteLength = toLength($length) * BYTES;
12982 if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);
12983 }
12984 length = byteLength / BYTES;
12985 } else if (isTypedArray(data)) {
12986 return fromList(TypedArrayConstructor, data);
12987 } else {
12988 return call(typedArrayFrom, TypedArrayConstructor, data);
12989 }
12990 setInternalState(that, {
12991 buffer: buffer,
12992 byteOffset: byteOffset,
12993 byteLength: byteLength,
12994 length: length,
12995 view: new DataView(buffer)
12996 });
12997 while (index < length) addElement(that, index++);
12998 });
12999
13000 if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
13001 TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);
13002 } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {
13003 TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {
13004 anInstance(dummy, TypedArrayConstructorPrototype);
13005 return inheritIfRequired(function () {
13006 if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));
13007 if (isArrayBuffer(data)) return $length !== undefined
13008 ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)
13009 : typedArrayOffset !== undefined
13010 ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))
13011 : new NativeTypedArrayConstructor(data);
13012 if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);
13013 return call(typedArrayFrom, TypedArrayConstructor, data);
13014 }(), dummy, TypedArrayConstructor);
13015 });
13016
13017 if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
13018 forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {
13019 if (!(key in TypedArrayConstructor)) {
13020 createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);
13021 }
13022 });
13023 TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;
13024 }
13025
13026 if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {
13027 createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);
13028 }
13029
13030 enforceInternalState(TypedArrayConstructorPrototype).TypedArrayConstructor = TypedArrayConstructor;
13031
13032 if (TYPED_ARRAY_TAG) {
13033 createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
13034 }
13035
13036 var FORCED = TypedArrayConstructor != NativeTypedArrayConstructor;
13037
13038 exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
13039
13040 $({ global: true, constructor: true, forced: FORCED, sham: !NATIVE_ARRAY_BUFFER_VIEWS }, exported);
13041
13042 if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
13043 createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
13044 }
13045
13046 if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {
13047 createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);
13048 }
13049
13050 setSpecies(CONSTRUCTOR_NAME);
13051 };
13052} else module.exports = function () { /* empty */ };
13053
13054
13055/***/ }),
13056/* 422 */
13057/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
13058
13059/* eslint-disable no-new -- required for testing */
13060var global = __webpack_require__(4);
13061var fails = __webpack_require__(7);
13062var checkCorrectnessOfIteration = __webpack_require__(161);
13063var NATIVE_ARRAY_BUFFER_VIEWS = (__webpack_require__(203).NATIVE_ARRAY_BUFFER_VIEWS);
13064
13065var ArrayBuffer = global.ArrayBuffer;
13066var Int8Array = global.Int8Array;
13067
13068module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
13069 Int8Array(1);
13070}) || !fails(function () {
13071 new Int8Array(-1);
13072}) || !checkCorrectnessOfIteration(function (iterable) {
13073 new Int8Array();
13074 new Int8Array(null);
13075 new Int8Array(1.5);
13076 new Int8Array(iterable);
13077}, true) || fails(function () {
13078 // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
13079 return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;
13080});
13081
13082
13083/***/ }),
13084/* 423 */
13085/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
13086
13087var toPositiveInteger = __webpack_require__(424);
13088
13089var $RangeError = RangeError;
13090
13091module.exports = function (it, BYTES) {
13092 var offset = toPositiveInteger(it);
13093 if (offset % BYTES) throw $RangeError('Wrong offset');
13094 return offset;
13095};
13096
13097
13098/***/ }),
13099/* 424 */
13100/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
13101
13102var toIntegerOrInfinity = __webpack_require__(63);
13103
13104var $RangeError = RangeError;
13105
13106module.exports = function (it) {
13107 var result = toIntegerOrInfinity(it);
13108 if (result < 0) throw $RangeError("The argument can't be less than 0");
13109 return result;
13110};
13111
13112
13113/***/ }),
13114/* 425 */
13115/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
13116
13117var bind = __webpack_require__(86);
13118var call = __webpack_require__(8);
13119var aConstructor = __webpack_require__(206);
13120var toObject = __webpack_require__(41);
13121var lengthOfArrayLike = __webpack_require__(65);
13122var getIterator = __webpack_require__(131);
13123var getIteratorMethod = __webpack_require__(132);
13124var isArrayIteratorMethod = __webpack_require__(129);
13125var isBigIntArray = __webpack_require__(426);
13126var aTypedArrayConstructor = (__webpack_require__(203).aTypedArrayConstructor);
13127var toBigInt = __webpack_require__(427);
13128
13129module.exports = function from(source /* , mapfn, thisArg */) {
13130 var C = aConstructor(this);
13131 var O = toObject(source);
13132 var argumentsLength = arguments.length;
13133 var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
13134 var mapping = mapfn !== undefined;
13135 var iteratorMethod = getIteratorMethod(O);
13136 var i, length, result, thisIsBigIntArray, value, step, iterator, next;
13137 if (iteratorMethod && !isArrayIteratorMethod(iteratorMethod)) {
13138 iterator = getIterator(O, iteratorMethod);
13139 next = iterator.next;
13140 O = [];
13141 while (!(step = call(next, iterator)).done) {
13142 O.push(step.value);
13143 }
13144 }
13145 if (mapping && argumentsLength > 2) {
13146 mapfn = bind(mapfn, arguments[2]);
13147 }
13148 length = lengthOfArrayLike(O);
13149 result = new (aTypedArrayConstructor(C))(length);
13150 thisIsBigIntArray = isBigIntArray(result);
13151 for (i = 0; length > i; i++) {
13152 value = mapping ? mapfn(O[i], i) : O[i];
13153 // FF30- typed arrays doesn't properly convert objects to typed array values
13154 result[i] = thisIsBigIntArray ? toBigInt(value) : +value;
13155 }
13156 return result;
13157};
13158
13159
13160/***/ }),
13161/* 426 */
13162/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
13163
13164var classof = __webpack_require__(71);
13165var uncurryThis = __webpack_require__(14);
13166
13167var slice = uncurryThis(''.slice);
13168
13169module.exports = function (it) {
13170 return slice(classof(it), 0, 3) === 'Big';
13171};
13172
13173
13174/***/ }),
13175/* 427 */
13176/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
13177
13178var toPrimitive = __webpack_require__(20);
13179
13180var $TypeError = TypeError;
13181
13182// `ToBigInt` abstract operation
13183// https://tc39.es/ecma262/#sec-tobigint
13184module.exports = function (argument) {
13185 var prim = toPrimitive(argument, 'number');
13186 if (typeof prim == 'number') throw $TypeError("Can't convert number to bigint");
13187 // eslint-disable-next-line es/no-bigint -- safe
13188 return BigInt(prim);
13189};
13190
13191
13192/***/ }),
13193/* 428 */
13194/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13195
13196var createTypedArrayConstructor = __webpack_require__(421);
13197
13198// `Float64Array` constructor
13199// https://tc39.es/ecma262/#sec-typedarray-objects
13200createTypedArrayConstructor('Float64', function (init) {
13201 return function Float64Array(data, byteOffset, length) {
13202 return init(this, data, byteOffset, length);
13203 };
13204});
13205
13206
13207/***/ }),
13208/* 429 */
13209/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13210
13211var createTypedArrayConstructor = __webpack_require__(421);
13212
13213// `Int8Array` constructor
13214// https://tc39.es/ecma262/#sec-typedarray-objects
13215createTypedArrayConstructor('Int8', function (init) {
13216 return function Int8Array(data, byteOffset, length) {
13217 return init(this, data, byteOffset, length);
13218 };
13219});
13220
13221
13222/***/ }),
13223/* 430 */
13224/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13225
13226var createTypedArrayConstructor = __webpack_require__(421);
13227
13228// `Int16Array` constructor
13229// https://tc39.es/ecma262/#sec-typedarray-objects
13230createTypedArrayConstructor('Int16', function (init) {
13231 return function Int16Array(data, byteOffset, length) {
13232 return init(this, data, byteOffset, length);
13233 };
13234});
13235
13236
13237/***/ }),
13238/* 431 */
13239/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13240
13241var createTypedArrayConstructor = __webpack_require__(421);
13242
13243// `Int32Array` constructor
13244// https://tc39.es/ecma262/#sec-typedarray-objects
13245createTypedArrayConstructor('Int32', function (init) {
13246 return function Int32Array(data, byteOffset, length) {
13247 return init(this, data, byteOffset, length);
13248 };
13249});
13250
13251
13252/***/ }),
13253/* 432 */
13254/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13255
13256var createTypedArrayConstructor = __webpack_require__(421);
13257
13258// `Uint8Array` constructor
13259// https://tc39.es/ecma262/#sec-typedarray-objects
13260createTypedArrayConstructor('Uint8', function (init) {
13261 return function Uint8Array(data, byteOffset, length) {
13262 return init(this, data, byteOffset, length);
13263 };
13264});
13265
13266
13267/***/ }),
13268/* 433 */
13269/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13270
13271var createTypedArrayConstructor = __webpack_require__(421);
13272
13273// `Uint8ClampedArray` constructor
13274// https://tc39.es/ecma262/#sec-typedarray-objects
13275createTypedArrayConstructor('Uint8', function (init) {
13276 return function Uint8ClampedArray(data, byteOffset, length) {
13277 return init(this, data, byteOffset, length);
13278 };
13279}, true);
13280
13281
13282/***/ }),
13283/* 434 */
13284/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13285
13286var createTypedArrayConstructor = __webpack_require__(421);
13287
13288// `Uint16Array` constructor
13289// https://tc39.es/ecma262/#sec-typedarray-objects
13290createTypedArrayConstructor('Uint16', function (init) {
13291 return function Uint16Array(data, byteOffset, length) {
13292 return init(this, data, byteOffset, length);
13293 };
13294});
13295
13296
13297/***/ }),
13298/* 435 */
13299/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13300
13301var createTypedArrayConstructor = __webpack_require__(421);
13302
13303// `Uint32Array` constructor
13304// https://tc39.es/ecma262/#sec-typedarray-objects
13305createTypedArrayConstructor('Uint32', function (init) {
13306 return function Uint32Array(data, byteOffset, length) {
13307 return init(this, data, byteOffset, length);
13308 };
13309});
13310
13311
13312/***/ }),
13313/* 436 */
13314/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13315
13316"use strict";
13317
13318var ArrayBufferViewCore = __webpack_require__(203);
13319var lengthOfArrayLike = __webpack_require__(65);
13320var toIntegerOrInfinity = __webpack_require__(63);
13321
13322var aTypedArray = ArrayBufferViewCore.aTypedArray;
13323var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13324
13325// `%TypedArray%.prototype.at` method
13326// https://github.com/tc39/proposal-relative-indexing-method
13327exportTypedArrayMethod('at', function at(index) {
13328 var O = aTypedArray(this);
13329 var len = lengthOfArrayLike(O);
13330 var relativeIndex = toIntegerOrInfinity(index);
13331 var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
13332 return (k < 0 || k >= len) ? undefined : O[k];
13333});
13334
13335
13336/***/ }),
13337/* 437 */
13338/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13339
13340"use strict";
13341
13342var uncurryThis = __webpack_require__(14);
13343var ArrayBufferViewCore = __webpack_require__(203);
13344var $ArrayCopyWithin = __webpack_require__(141);
13345
13346var u$ArrayCopyWithin = uncurryThis($ArrayCopyWithin);
13347var aTypedArray = ArrayBufferViewCore.aTypedArray;
13348var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13349
13350// `%TypedArray%.prototype.copyWithin` method
13351// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
13352exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {
13353 return u$ArrayCopyWithin(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
13354});
13355
13356
13357/***/ }),
13358/* 438 */
13359/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13360
13361"use strict";
13362
13363var ArrayBufferViewCore = __webpack_require__(203);
13364var $every = (__webpack_require__(85).every);
13365
13366var aTypedArray = ArrayBufferViewCore.aTypedArray;
13367var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13368
13369// `%TypedArray%.prototype.every` method
13370// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
13371exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {
13372 return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
13373});
13374
13375
13376/***/ }),
13377/* 439 */
13378/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13379
13380"use strict";
13381
13382var ArrayBufferViewCore = __webpack_require__(203);
13383var $fill = __webpack_require__(146);
13384var toBigInt = __webpack_require__(427);
13385var classof = __webpack_require__(71);
13386var call = __webpack_require__(8);
13387var uncurryThis = __webpack_require__(14);
13388var fails = __webpack_require__(7);
13389
13390var aTypedArray = ArrayBufferViewCore.aTypedArray;
13391var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13392var slice = uncurryThis(''.slice);
13393
13394// V8 ~ Chrome < 59, Safari < 14.1, FF < 55, Edge <=18
13395var CONVERSION_BUG = fails(function () {
13396 var count = 0;
13397 // eslint-disable-next-line es/no-typed-arrays -- safe
13398 new Int8Array(2).fill({ valueOf: function () { return count++; } });
13399 return count !== 1;
13400});
13401
13402// `%TypedArray%.prototype.fill` method
13403// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
13404exportTypedArrayMethod('fill', function fill(value /* , start, end */) {
13405 var length = arguments.length;
13406 aTypedArray(this);
13407 var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value;
13408 return call($fill, this, actualValue, length > 1 ? arguments[1] : undefined, length > 2 ? arguments[2] : undefined);
13409}, CONVERSION_BUG);
13410
13411
13412/***/ }),
13413/* 440 */
13414/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13415
13416"use strict";
13417
13418var ArrayBufferViewCore = __webpack_require__(203);
13419var $filter = (__webpack_require__(85).filter);
13420var fromSpeciesAndList = __webpack_require__(441);
13421
13422var aTypedArray = ArrayBufferViewCore.aTypedArray;
13423var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13424
13425// `%TypedArray%.prototype.filter` method
13426// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
13427exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {
13428 var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
13429 return fromSpeciesAndList(this, list);
13430});
13431
13432
13433/***/ }),
13434/* 441 */
13435/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
13436
13437var arrayFromConstructorAndList = __webpack_require__(442);
13438var typedArraySpeciesConstructor = __webpack_require__(443);
13439
13440module.exports = function (instance, list) {
13441 return arrayFromConstructorAndList(typedArraySpeciesConstructor(instance), list);
13442};
13443
13444
13445/***/ }),
13446/* 442 */
13447/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
13448
13449var lengthOfArrayLike = __webpack_require__(65);
13450
13451module.exports = function (Constructor, list) {
13452 var index = 0;
13453 var length = lengthOfArrayLike(list);
13454 var result = new Constructor(length);
13455 while (length > index) result[index] = list[index++];
13456 return result;
13457};
13458
13459
13460/***/ }),
13461/* 443 */
13462/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
13463
13464var ArrayBufferViewCore = __webpack_require__(203);
13465var speciesConstructor = __webpack_require__(205);
13466
13467var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
13468var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
13469
13470// a part of `TypedArraySpeciesCreate` abstract operation
13471// https://tc39.es/ecma262/#typedarray-species-create
13472module.exports = function (originalArray) {
13473 return aTypedArrayConstructor(speciesConstructor(originalArray, getTypedArrayConstructor(originalArray)));
13474};
13475
13476
13477/***/ }),
13478/* 444 */
13479/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13480
13481"use strict";
13482
13483var ArrayBufferViewCore = __webpack_require__(203);
13484var $find = (__webpack_require__(85).find);
13485
13486var aTypedArray = ArrayBufferViewCore.aTypedArray;
13487var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13488
13489// `%TypedArray%.prototype.find` method
13490// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
13491exportTypedArrayMethod('find', function find(predicate /* , thisArg */) {
13492 return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
13493});
13494
13495
13496/***/ }),
13497/* 445 */
13498/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13499
13500"use strict";
13501
13502var ArrayBufferViewCore = __webpack_require__(203);
13503var $findIndex = (__webpack_require__(85).findIndex);
13504
13505var aTypedArray = ArrayBufferViewCore.aTypedArray;
13506var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13507
13508// `%TypedArray%.prototype.findIndex` method
13509// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
13510exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {
13511 return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
13512});
13513
13514
13515/***/ }),
13516/* 446 */
13517/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13518
13519"use strict";
13520
13521var ArrayBufferViewCore = __webpack_require__(203);
13522var $findLast = (__webpack_require__(151).findLast);
13523
13524var aTypedArray = ArrayBufferViewCore.aTypedArray;
13525var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13526
13527// `%TypedArray%.prototype.findLast` method
13528// https://github.com/tc39/proposal-array-find-from-last
13529exportTypedArrayMethod('findLast', function findLast(predicate /* , thisArg */) {
13530 return $findLast(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
13531});
13532
13533
13534/***/ }),
13535/* 447 */
13536/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13537
13538"use strict";
13539
13540var ArrayBufferViewCore = __webpack_require__(203);
13541var $findLastIndex = (__webpack_require__(151).findLastIndex);
13542
13543var aTypedArray = ArrayBufferViewCore.aTypedArray;
13544var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13545
13546// `%TypedArray%.prototype.findLastIndex` method
13547// https://github.com/tc39/proposal-array-find-from-last
13548exportTypedArrayMethod('findLastIndex', function findLastIndex(predicate /* , thisArg */) {
13549 return $findLastIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
13550});
13551
13552
13553/***/ }),
13554/* 448 */
13555/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13556
13557"use strict";
13558
13559var ArrayBufferViewCore = __webpack_require__(203);
13560var $forEach = (__webpack_require__(85).forEach);
13561
13562var aTypedArray = ArrayBufferViewCore.aTypedArray;
13563var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13564
13565// `%TypedArray%.prototype.forEach` method
13566// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
13567exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {
13568 $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
13569});
13570
13571
13572/***/ }),
13573/* 449 */
13574/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13575
13576"use strict";
13577
13578var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(422);
13579var exportTypedArrayStaticMethod = (__webpack_require__(203).exportTypedArrayStaticMethod);
13580var typedArrayFrom = __webpack_require__(425);
13581
13582// `%TypedArray%.from` method
13583// https://tc39.es/ecma262/#sec-%typedarray%.from
13584exportTypedArrayStaticMethod('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);
13585
13586
13587/***/ }),
13588/* 450 */
13589/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13590
13591"use strict";
13592
13593var ArrayBufferViewCore = __webpack_require__(203);
13594var $includes = (__webpack_require__(61).includes);
13595
13596var aTypedArray = ArrayBufferViewCore.aTypedArray;
13597var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13598
13599// `%TypedArray%.prototype.includes` method
13600// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
13601exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {
13602 return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
13603});
13604
13605
13606/***/ }),
13607/* 451 */
13608/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13609
13610"use strict";
13611
13612var ArrayBufferViewCore = __webpack_require__(203);
13613var $indexOf = (__webpack_require__(61).indexOf);
13614
13615var aTypedArray = ArrayBufferViewCore.aTypedArray;
13616var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13617
13618// `%TypedArray%.prototype.indexOf` method
13619// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
13620exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {
13621 return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
13622});
13623
13624
13625/***/ }),
13626/* 452 */
13627/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13628
13629"use strict";
13630
13631var global = __webpack_require__(4);
13632var fails = __webpack_require__(7);
13633var uncurryThis = __webpack_require__(14);
13634var ArrayBufferViewCore = __webpack_require__(203);
13635var ArrayIterators = __webpack_require__(165);
13636var wellKnownSymbol = __webpack_require__(35);
13637
13638var ITERATOR = wellKnownSymbol('iterator');
13639var Uint8Array = global.Uint8Array;
13640var arrayValues = uncurryThis(ArrayIterators.values);
13641var arrayKeys = uncurryThis(ArrayIterators.keys);
13642var arrayEntries = uncurryThis(ArrayIterators.entries);
13643var aTypedArray = ArrayBufferViewCore.aTypedArray;
13644var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13645var TypedArrayPrototype = Uint8Array && Uint8Array.prototype;
13646
13647var GENERIC = !fails(function () {
13648 TypedArrayPrototype[ITERATOR].call([1]);
13649});
13650
13651var ITERATOR_IS_VALUES = !!TypedArrayPrototype
13652 && TypedArrayPrototype.values
13653 && TypedArrayPrototype[ITERATOR] === TypedArrayPrototype.values
13654 && TypedArrayPrototype.values.name === 'values';
13655
13656var typedArrayValues = function values() {
13657 return arrayValues(aTypedArray(this));
13658};
13659
13660// `%TypedArray%.prototype.entries` method
13661// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
13662exportTypedArrayMethod('entries', function entries() {
13663 return arrayEntries(aTypedArray(this));
13664}, GENERIC);
13665// `%TypedArray%.prototype.keys` method
13666// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
13667exportTypedArrayMethod('keys', function keys() {
13668 return arrayKeys(aTypedArray(this));
13669}, GENERIC);
13670// `%TypedArray%.prototype.values` method
13671// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
13672exportTypedArrayMethod('values', typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });
13673// `%TypedArray%.prototype[@@iterator]` method
13674// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
13675exportTypedArrayMethod(ITERATOR, typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });
13676
13677
13678/***/ }),
13679/* 453 */
13680/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13681
13682"use strict";
13683
13684var ArrayBufferViewCore = __webpack_require__(203);
13685var uncurryThis = __webpack_require__(14);
13686
13687var aTypedArray = ArrayBufferViewCore.aTypedArray;
13688var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13689var $join = uncurryThis([].join);
13690
13691// `%TypedArray%.prototype.join` method
13692// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
13693exportTypedArrayMethod('join', function join(separator) {
13694 return $join(aTypedArray(this), separator);
13695});
13696
13697
13698/***/ }),
13699/* 454 */
13700/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13701
13702"use strict";
13703
13704var ArrayBufferViewCore = __webpack_require__(203);
13705var apply = __webpack_require__(95);
13706var $lastIndexOf = __webpack_require__(172);
13707
13708var aTypedArray = ArrayBufferViewCore.aTypedArray;
13709var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13710
13711// `%TypedArray%.prototype.lastIndexOf` method
13712// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
13713exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
13714 var length = arguments.length;
13715 return apply($lastIndexOf, aTypedArray(this), length > 1 ? [searchElement, arguments[1]] : [searchElement]);
13716});
13717
13718
13719/***/ }),
13720/* 455 */
13721/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13722
13723"use strict";
13724
13725var ArrayBufferViewCore = __webpack_require__(203);
13726var $map = (__webpack_require__(85).map);
13727var typedArraySpeciesConstructor = __webpack_require__(443);
13728
13729var aTypedArray = ArrayBufferViewCore.aTypedArray;
13730var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13731
13732// `%TypedArray%.prototype.map` method
13733// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
13734exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {
13735 return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
13736 return new (typedArraySpeciesConstructor(O))(length);
13737 });
13738});
13739
13740
13741/***/ }),
13742/* 456 */
13743/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13744
13745"use strict";
13746
13747var ArrayBufferViewCore = __webpack_require__(203);
13748var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(422);
13749
13750var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
13751var exportTypedArrayStaticMethod = ArrayBufferViewCore.exportTypedArrayStaticMethod;
13752
13753// `%TypedArray%.of` method
13754// https://tc39.es/ecma262/#sec-%typedarray%.of
13755exportTypedArrayStaticMethod('of', function of(/* ...items */) {
13756 var index = 0;
13757 var length = arguments.length;
13758 var result = new (aTypedArrayConstructor(this))(length);
13759 while (length > index) result[index] = arguments[index++];
13760 return result;
13761}, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);
13762
13763
13764/***/ }),
13765/* 457 */
13766/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13767
13768"use strict";
13769
13770var ArrayBufferViewCore = __webpack_require__(203);
13771var $reduce = (__webpack_require__(178).left);
13772
13773var aTypedArray = ArrayBufferViewCore.aTypedArray;
13774var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13775
13776// `%TypedArray%.prototype.reduce` method
13777// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
13778exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {
13779 var length = arguments.length;
13780 return $reduce(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined);
13781});
13782
13783
13784/***/ }),
13785/* 458 */
13786/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13787
13788"use strict";
13789
13790var ArrayBufferViewCore = __webpack_require__(203);
13791var $reduceRight = (__webpack_require__(178).right);
13792
13793var aTypedArray = ArrayBufferViewCore.aTypedArray;
13794var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13795
13796// `%TypedArray%.prototype.reduceRight` method
13797// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
13798exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
13799 var length = arguments.length;
13800 return $reduceRight(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined);
13801});
13802
13803
13804/***/ }),
13805/* 459 */
13806/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13807
13808"use strict";
13809
13810var ArrayBufferViewCore = __webpack_require__(203);
13811
13812var aTypedArray = ArrayBufferViewCore.aTypedArray;
13813var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13814var floor = Math.floor;
13815
13816// `%TypedArray%.prototype.reverse` method
13817// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
13818exportTypedArrayMethod('reverse', function reverse() {
13819 var that = this;
13820 var length = aTypedArray(that).length;
13821 var middle = floor(length / 2);
13822 var index = 0;
13823 var value;
13824 while (index < middle) {
13825 value = that[index];
13826 that[index++] = that[--length];
13827 that[length] = value;
13828 } return that;
13829});
13830
13831
13832/***/ }),
13833/* 460 */
13834/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13835
13836"use strict";
13837
13838var global = __webpack_require__(4);
13839var call = __webpack_require__(8);
13840var ArrayBufferViewCore = __webpack_require__(203);
13841var lengthOfArrayLike = __webpack_require__(65);
13842var toOffset = __webpack_require__(423);
13843var toIndexedObject = __webpack_require__(41);
13844var fails = __webpack_require__(7);
13845
13846var RangeError = global.RangeError;
13847var Int8Array = global.Int8Array;
13848var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
13849var $set = Int8ArrayPrototype && Int8ArrayPrototype.set;
13850var aTypedArray = ArrayBufferViewCore.aTypedArray;
13851var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13852
13853var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {
13854 // eslint-disable-next-line es/no-typed-arrays -- required for testing
13855 var array = new Uint8ClampedArray(2);
13856 call($set, array, { length: 1, 0: 3 }, 1);
13857 return array[1] !== 3;
13858});
13859
13860// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other
13861var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
13862 var array = new Int8Array(2);
13863 array.set(1);
13864 array.set('2', 1);
13865 return array[0] !== 0 || array[1] !== 2;
13866});
13867
13868// `%TypedArray%.prototype.set` method
13869// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
13870exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
13871 aTypedArray(this);
13872 var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
13873 var src = toIndexedObject(arrayLike);
13874 if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);
13875 var length = this.length;
13876 var len = lengthOfArrayLike(src);
13877 var index = 0;
13878 if (len + offset > length) throw RangeError('Wrong length');
13879 while (index < len) this[offset + index] = src[index++];
13880}, !WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);
13881
13882
13883/***/ }),
13884/* 461 */
13885/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13886
13887"use strict";
13888
13889var ArrayBufferViewCore = __webpack_require__(203);
13890var typedArraySpeciesConstructor = __webpack_require__(443);
13891var fails = __webpack_require__(7);
13892var arraySlice = __webpack_require__(96);
13893
13894var aTypedArray = ArrayBufferViewCore.aTypedArray;
13895var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13896
13897var FORCED = fails(function () {
13898 // eslint-disable-next-line es/no-typed-arrays -- required for testing
13899 new Int8Array(1).slice();
13900});
13901
13902// `%TypedArray%.prototype.slice` method
13903// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
13904exportTypedArrayMethod('slice', function slice(start, end) {
13905 var list = arraySlice(aTypedArray(this), start, end);
13906 var C = typedArraySpeciesConstructor(this);
13907 var index = 0;
13908 var length = list.length;
13909 var result = new C(length);
13910 while (length > index) result[index] = list[index++];
13911 return result;
13912}, FORCED);
13913
13914
13915/***/ }),
13916/* 462 */
13917/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13918
13919"use strict";
13920
13921var ArrayBufferViewCore = __webpack_require__(203);
13922var $some = (__webpack_require__(85).some);
13923
13924var aTypedArray = ArrayBufferViewCore.aTypedArray;
13925var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13926
13927// `%TypedArray%.prototype.some` method
13928// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
13929exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {
13930 return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
13931});
13932
13933
13934/***/ }),
13935/* 463 */
13936/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
13937
13938"use strict";
13939
13940var global = __webpack_require__(4);
13941var uncurryThis = __webpack_require__(14);
13942var fails = __webpack_require__(7);
13943var aCallable = __webpack_require__(32);
13944var internalSort = __webpack_require__(185);
13945var ArrayBufferViewCore = __webpack_require__(203);
13946var FF = __webpack_require__(186);
13947var IE_OR_EDGE = __webpack_require__(187);
13948var V8 = __webpack_require__(29);
13949var WEBKIT = __webpack_require__(188);
13950
13951var aTypedArray = ArrayBufferViewCore.aTypedArray;
13952var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13953var Uint16Array = global.Uint16Array;
13954var nativeSort = Uint16Array && uncurryThis(Uint16Array.prototype.sort);
13955
13956// WebKit
13957var ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !(fails(function () {
13958 nativeSort(new Uint16Array(2), null);
13959}) && fails(function () {
13960 nativeSort(new Uint16Array(2), {});
13961}));
13962
13963var STABLE_SORT = !!nativeSort && !fails(function () {
13964 // feature detection can be too slow, so check engines versions
13965 if (V8) return V8 < 74;
13966 if (FF) return FF < 67;
13967 if (IE_OR_EDGE) return true;
13968 if (WEBKIT) return WEBKIT < 602;
13969
13970 var array = new Uint16Array(516);
13971 var expected = Array(516);
13972 var index, mod;
13973
13974 for (index = 0; index < 516; index++) {
13975 mod = index % 4;
13976 array[index] = 515 - index;
13977 expected[index] = index - 2 * mod + 3;
13978 }
13979
13980 nativeSort(array, function (a, b) {
13981 return (a / 4 | 0) - (b / 4 | 0);
13982 });
13983
13984 for (index = 0; index < 516; index++) {
13985 if (array[index] !== expected[index]) return true;
13986 }
13987});
13988
13989var getSortCompare = function (comparefn) {
13990 return function (x, y) {
13991 if (comparefn !== undefined) return +comparefn(x, y) || 0;
13992 // eslint-disable-next-line no-self-compare -- NaN check
13993 if (y !== y) return -1;
13994 // eslint-disable-next-line no-self-compare -- NaN check
13995 if (x !== x) return 1;
13996 if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;
13997 return x > y;
13998 };
13999};
14000
14001// `%TypedArray%.prototype.sort` method
14002// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
14003exportTypedArrayMethod('sort', function sort(comparefn) {
14004 if (comparefn !== undefined) aCallable(comparefn);
14005 if (STABLE_SORT) return nativeSort(this, comparefn);
14006
14007 return internalSort(aTypedArray(this), getSortCompare(comparefn));
14008}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);
14009
14010
14011/***/ }),
14012/* 464 */
14013/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14014
14015"use strict";
14016
14017var ArrayBufferViewCore = __webpack_require__(203);
14018var toLength = __webpack_require__(66);
14019var toAbsoluteIndex = __webpack_require__(62);
14020var typedArraySpeciesConstructor = __webpack_require__(443);
14021
14022var aTypedArray = ArrayBufferViewCore.aTypedArray;
14023var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
14024
14025// `%TypedArray%.prototype.subarray` method
14026// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
14027exportTypedArrayMethod('subarray', function subarray(begin, end) {
14028 var O = aTypedArray(this);
14029 var length = O.length;
14030 var beginIndex = toAbsoluteIndex(begin, length);
14031 var C = typedArraySpeciesConstructor(O);
14032 return new C(
14033 O.buffer,
14034 O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,
14035 toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)
14036 );
14037});
14038
14039
14040/***/ }),
14041/* 465 */
14042/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14043
14044"use strict";
14045
14046var global = __webpack_require__(4);
14047var apply = __webpack_require__(95);
14048var ArrayBufferViewCore = __webpack_require__(203);
14049var fails = __webpack_require__(7);
14050var arraySlice = __webpack_require__(96);
14051
14052var Int8Array = global.Int8Array;
14053var aTypedArray = ArrayBufferViewCore.aTypedArray;
14054var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
14055var $toLocaleString = [].toLocaleString;
14056
14057// iOS Safari 6.x fails here
14058var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {
14059 $toLocaleString.call(new Int8Array(1));
14060});
14061
14062var FORCED = fails(function () {
14063 return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();
14064}) || !fails(function () {
14065 Int8Array.prototype.toLocaleString.call([1, 2]);
14066});
14067
14068// `%TypedArray%.prototype.toLocaleString` method
14069// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
14070exportTypedArrayMethod('toLocaleString', function toLocaleString() {
14071 return apply(
14072 $toLocaleString,
14073 TO_LOCALE_STRING_BUG ? arraySlice(aTypedArray(this)) : aTypedArray(this),
14074 arraySlice(arguments)
14075 );
14076}, FORCED);
14077
14078
14079/***/ }),
14080/* 466 */
14081/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14082
14083"use strict";
14084
14085var exportTypedArrayMethod = (__webpack_require__(203).exportTypedArrayMethod);
14086var fails = __webpack_require__(7);
14087var global = __webpack_require__(4);
14088var uncurryThis = __webpack_require__(14);
14089
14090var Uint8Array = global.Uint8Array;
14091var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};
14092var arrayToString = [].toString;
14093var join = uncurryThis([].join);
14094
14095if (fails(function () { arrayToString.call({}); })) {
14096 arrayToString = function toString() {
14097 return join(this);
14098 };
14099}
14100
14101var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
14102
14103// `%TypedArray%.prototype.toString` method
14104// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
14105exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);
14106
14107
14108/***/ }),
14109/* 467 */
14110/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14111
14112"use strict";
14113
14114var $ = __webpack_require__(3);
14115var uncurryThis = __webpack_require__(14);
14116var toString = __webpack_require__(70);
14117
14118var fromCharCode = String.fromCharCode;
14119var charAt = uncurryThis(''.charAt);
14120var exec = uncurryThis(/./.exec);
14121var stringSlice = uncurryThis(''.slice);
14122
14123var hex2 = /^[\da-f]{2}$/i;
14124var hex4 = /^[\da-f]{4}$/i;
14125
14126// `unescape` method
14127// https://tc39.es/ecma262/#sec-unescape-string
14128$({ global: true }, {
14129 unescape: function unescape(string) {
14130 var str = toString(string);
14131 var result = '';
14132 var length = str.length;
14133 var index = 0;
14134 var chr, part;
14135 while (index < length) {
14136 chr = charAt(str, index++);
14137 if (chr === '%') {
14138 if (charAt(str, index) === 'u') {
14139 part = stringSlice(str, index + 1, index + 5);
14140 if (exec(hex4, part)) {
14141 result += fromCharCode(parseInt(part, 16));
14142 index += 5;
14143 continue;
14144 }
14145 } else {
14146 part = stringSlice(str, index, index + 2);
14147 if (exec(hex2, part)) {
14148 result += fromCharCode(parseInt(part, 16));
14149 index += 2;
14150 continue;
14151 }
14152 }
14153 }
14154 result += chr;
14155 } return result;
14156 }
14157});
14158
14159
14160/***/ }),
14161/* 468 */
14162/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14163
14164// TODO: Remove this module from `core-js@4` since it's replaced to module below
14165__webpack_require__(469);
14166
14167
14168/***/ }),
14169/* 469 */
14170/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14171
14172"use strict";
14173
14174var global = __webpack_require__(4);
14175var uncurryThis = __webpack_require__(14);
14176var defineBuiltIns = __webpack_require__(198);
14177var InternalMetadataModule = __webpack_require__(231);
14178var collection = __webpack_require__(230);
14179var collectionWeak = __webpack_require__(470);
14180var isObject = __webpack_require__(21);
14181var isExtensible = __webpack_require__(232);
14182var enforceInternalState = (__webpack_require__(53).enforce);
14183var NATIVE_WEAK_MAP = __webpack_require__(54);
14184
14185var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
14186var InternalWeakMap;
14187
14188var wrapper = function (init) {
14189 return function WeakMap() {
14190 return init(this, arguments.length ? arguments[0] : undefined);
14191 };
14192};
14193
14194// `WeakMap` constructor
14195// https://tc39.es/ecma262/#sec-weakmap-constructor
14196var $WeakMap = collection('WeakMap', wrapper, collectionWeak);
14197
14198// IE11 WeakMap frozen keys fix
14199// We can't use feature detection because it crash some old IE builds
14200// https://github.com/zloirock/core-js/issues/485
14201if (NATIVE_WEAK_MAP && IS_IE11) {
14202 InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);
14203 InternalMetadataModule.enable();
14204 var WeakMapPrototype = $WeakMap.prototype;
14205 var nativeDelete = uncurryThis(WeakMapPrototype['delete']);
14206 var nativeHas = uncurryThis(WeakMapPrototype.has);
14207 var nativeGet = uncurryThis(WeakMapPrototype.get);
14208 var nativeSet = uncurryThis(WeakMapPrototype.set);
14209 defineBuiltIns(WeakMapPrototype, {
14210 'delete': function (key) {
14211 if (isObject(key) && !isExtensible(key)) {
14212 var state = enforceInternalState(this);
14213 if (!state.frozen) state.frozen = new InternalWeakMap();
14214 return nativeDelete(this, key) || state.frozen['delete'](key);
14215 } return nativeDelete(this, key);
14216 },
14217 has: function has(key) {
14218 if (isObject(key) && !isExtensible(key)) {
14219 var state = enforceInternalState(this);
14220 if (!state.frozen) state.frozen = new InternalWeakMap();
14221 return nativeHas(this, key) || state.frozen.has(key);
14222 } return nativeHas(this, key);
14223 },
14224 get: function get(key) {
14225 if (isObject(key) && !isExtensible(key)) {
14226 var state = enforceInternalState(this);
14227 if (!state.frozen) state.frozen = new InternalWeakMap();
14228 return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);
14229 } return nativeGet(this, key);
14230 },
14231 set: function set(key, value) {
14232 if (isObject(key) && !isExtensible(key)) {
14233 var state = enforceInternalState(this);
14234 if (!state.frozen) state.frozen = new InternalWeakMap();
14235 nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);
14236 } else nativeSet(this, key, value);
14237 return this;
14238 }
14239 });
14240}
14241
14242
14243/***/ }),
14244/* 470 */
14245/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
14246
14247"use strict";
14248
14249var uncurryThis = __webpack_require__(14);
14250var defineBuiltIns = __webpack_require__(198);
14251var getWeakData = (__webpack_require__(231).getWeakData);
14252var anInstance = __webpack_require__(199);
14253var anObject = __webpack_require__(48);
14254var isNullOrUndefined = __webpack_require__(18);
14255var isObject = __webpack_require__(21);
14256var iterate = __webpack_require__(128);
14257var ArrayIterationModule = __webpack_require__(85);
14258var hasOwn = __webpack_require__(40);
14259var InternalStateModule = __webpack_require__(53);
14260
14261var setInternalState = InternalStateModule.set;
14262var internalStateGetterFor = InternalStateModule.getterFor;
14263var find = ArrayIterationModule.find;
14264var findIndex = ArrayIterationModule.findIndex;
14265var splice = uncurryThis([].splice);
14266var id = 0;
14267
14268// fallback for uncaught frozen keys
14269var uncaughtFrozenStore = function (store) {
14270 return store.frozen || (store.frozen = new UncaughtFrozenStore());
14271};
14272
14273var UncaughtFrozenStore = function () {
14274 this.entries = [];
14275};
14276
14277var findUncaughtFrozen = function (store, key) {
14278 return find(store.entries, function (it) {
14279 return it[0] === key;
14280 });
14281};
14282
14283UncaughtFrozenStore.prototype = {
14284 get: function (key) {
14285 var entry = findUncaughtFrozen(this, key);
14286 if (entry) return entry[1];
14287 },
14288 has: function (key) {
14289 return !!findUncaughtFrozen(this, key);
14290 },
14291 set: function (key, value) {
14292 var entry = findUncaughtFrozen(this, key);
14293 if (entry) entry[1] = value;
14294 else this.entries.push([key, value]);
14295 },
14296 'delete': function (key) {
14297 var index = findIndex(this.entries, function (it) {
14298 return it[0] === key;
14299 });
14300 if (~index) splice(this.entries, index, 1);
14301 return !!~index;
14302 }
14303};
14304
14305module.exports = {
14306 getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
14307 var Constructor = wrapper(function (that, iterable) {
14308 anInstance(that, Prototype);
14309 setInternalState(that, {
14310 type: CONSTRUCTOR_NAME,
14311 id: id++,
14312 frozen: undefined
14313 });
14314 if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
14315 });
14316
14317 var Prototype = Constructor.prototype;
14318
14319 var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
14320
14321 var define = function (that, key, value) {
14322 var state = getInternalState(that);
14323 var data = getWeakData(anObject(key), true);
14324 if (data === true) uncaughtFrozenStore(state).set(key, value);
14325 else data[state.id] = value;
14326 return that;
14327 };
14328
14329 defineBuiltIns(Prototype, {
14330 // `{ WeakMap, WeakSet }.prototype.delete(key)` methods
14331 // https://tc39.es/ecma262/#sec-weakmap.prototype.delete
14332 // https://tc39.es/ecma262/#sec-weakset.prototype.delete
14333 'delete': function (key) {
14334 var state = getInternalState(this);
14335 if (!isObject(key)) return false;
14336 var data = getWeakData(key);
14337 if (data === true) return uncaughtFrozenStore(state)['delete'](key);
14338 return data && hasOwn(data, state.id) && delete data[state.id];
14339 },
14340 // `{ WeakMap, WeakSet }.prototype.has(key)` methods
14341 // https://tc39.es/ecma262/#sec-weakmap.prototype.has
14342 // https://tc39.es/ecma262/#sec-weakset.prototype.has
14343 has: function has(key) {
14344 var state = getInternalState(this);
14345 if (!isObject(key)) return false;
14346 var data = getWeakData(key);
14347 if (data === true) return uncaughtFrozenStore(state).has(key);
14348 return data && hasOwn(data, state.id);
14349 }
14350 });
14351
14352 defineBuiltIns(Prototype, IS_MAP ? {
14353 // `WeakMap.prototype.get(key)` method
14354 // https://tc39.es/ecma262/#sec-weakmap.prototype.get
14355 get: function get(key) {
14356 var state = getInternalState(this);
14357 if (isObject(key)) {
14358 var data = getWeakData(key);
14359 if (data === true) return uncaughtFrozenStore(state).get(key);
14360 return data ? data[state.id] : undefined;
14361 }
14362 },
14363 // `WeakMap.prototype.set(key, value)` method
14364 // https://tc39.es/ecma262/#sec-weakmap.prototype.set
14365 set: function set(key, value) {
14366 return define(this, key, value);
14367 }
14368 } : {
14369 // `WeakSet.prototype.add(value)` method
14370 // https://tc39.es/ecma262/#sec-weakset.prototype.add
14371 add: function add(value) {
14372 return define(this, value, true);
14373 }
14374 });
14375
14376 return Constructor;
14377 }
14378};
14379
14380
14381/***/ }),
14382/* 471 */
14383/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14384
14385// TODO: Remove this module from `core-js@4` since it's replaced to module below
14386__webpack_require__(472);
14387
14388
14389/***/ }),
14390/* 472 */
14391/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14392
14393"use strict";
14394
14395var collection = __webpack_require__(230);
14396var collectionWeak = __webpack_require__(470);
14397
14398// `WeakSet` constructor
14399// https://tc39.es/ecma262/#sec-weakset-constructor
14400collection('WeakSet', function (init) {
14401 return function WeakSet() { return init(this, arguments.length ? arguments[0] : undefined); };
14402}, collectionWeak);
14403
14404
14405/***/ }),
14406/* 473 */
14407/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14408
14409var $ = __webpack_require__(3);
14410var getBuiltIn = __webpack_require__(25);
14411var uncurryThis = __webpack_require__(14);
14412var fails = __webpack_require__(7);
14413var toString = __webpack_require__(70);
14414var hasOwn = __webpack_require__(40);
14415var validateArgumentsLength = __webpack_require__(317);
14416var ctoi = (__webpack_require__(474).ctoi);
14417
14418var disallowed = /[^\d+/a-z]/i;
14419var whitespaces = /[\t\n\f\r ]+/g;
14420var finalEq = /[=]+$/;
14421
14422var $atob = getBuiltIn('atob');
14423var fromCharCode = String.fromCharCode;
14424var charAt = uncurryThis(''.charAt);
14425var replace = uncurryThis(''.replace);
14426var exec = uncurryThis(disallowed.exec);
14427
14428var NO_SPACES_IGNORE = fails(function () {
14429 return $atob(' ') !== '';
14430});
14431
14432var NO_ENCODING_CHECK = !fails(function () {
14433 $atob('a');
14434});
14435
14436var NO_ARG_RECEIVING_CHECK = !NO_SPACES_IGNORE && !NO_ENCODING_CHECK && !fails(function () {
14437 $atob();
14438});
14439
14440var WRONG_ARITY = !NO_SPACES_IGNORE && !NO_ENCODING_CHECK && $atob.length !== 1;
14441
14442// `atob` method
14443// https://html.spec.whatwg.org/multipage/webappapis.html#dom-atob
14444$({ global: true, enumerable: true, forced: NO_SPACES_IGNORE || NO_ENCODING_CHECK || NO_ARG_RECEIVING_CHECK || WRONG_ARITY }, {
14445 atob: function atob(data) {
14446 validateArgumentsLength(arguments.length, 1);
14447 if (NO_ARG_RECEIVING_CHECK || WRONG_ARITY) return $atob(data);
14448 var string = replace(toString(data), whitespaces, '');
14449 var output = '';
14450 var position = 0;
14451 var bc = 0;
14452 var chr, bs;
14453 if (string.length % 4 == 0) {
14454 string = replace(string, finalEq, '');
14455 }
14456 if (string.length % 4 == 1 || exec(disallowed, string)) {
14457 throw new (getBuiltIn('DOMException'))('The string is not correctly encoded', 'InvalidCharacterError');
14458 }
14459 while (chr = charAt(string, position++)) {
14460 if (hasOwn(ctoi, chr)) {
14461 bs = bc % 4 ? bs * 64 + ctoi[chr] : ctoi[chr];
14462 if (bc++ % 4) output += fromCharCode(255 & bs >> (-2 * bc & 6));
14463 }
14464 } return output;
14465 }
14466});
14467
14468
14469/***/ }),
14470/* 474 */
14471/***/ (function(module) {
14472
14473var itoc = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
14474var ctoi = {};
14475
14476for (var index = 0; index < 66; index++) ctoi[itoc.charAt(index)] = index;
14477
14478module.exports = {
14479 itoc: itoc,
14480 ctoi: ctoi
14481};
14482
14483
14484/***/ }),
14485/* 475 */
14486/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14487
14488var $ = __webpack_require__(3);
14489var getBuiltIn = __webpack_require__(25);
14490var uncurryThis = __webpack_require__(14);
14491var fails = __webpack_require__(7);
14492var toString = __webpack_require__(70);
14493var validateArgumentsLength = __webpack_require__(317);
14494var itoc = (__webpack_require__(474).itoc);
14495
14496var $btoa = getBuiltIn('btoa');
14497var charAt = uncurryThis(''.charAt);
14498var charCodeAt = uncurryThis(''.charCodeAt);
14499
14500var NO_ARG_RECEIVING_CHECK = !!$btoa && !fails(function () {
14501 $btoa();
14502});
14503
14504var WRONG_ARG_CONVERSION = !!$btoa && fails(function () {
14505 return $btoa(null) !== 'bnVsbA==';
14506});
14507
14508var WRONG_ARITY = !!$btoa && $btoa.length !== 1;
14509
14510// `btoa` method
14511// https://html.spec.whatwg.org/multipage/webappapis.html#dom-btoa
14512$({ global: true, enumerable: true, forced: NO_ARG_RECEIVING_CHECK || WRONG_ARG_CONVERSION || WRONG_ARITY }, {
14513 btoa: function btoa(data) {
14514 validateArgumentsLength(arguments.length, 1);
14515 if (NO_ARG_RECEIVING_CHECK || WRONG_ARG_CONVERSION || WRONG_ARITY) return $btoa(toString(data));
14516 var string = toString(data);
14517 var output = '';
14518 var position = 0;
14519 var map = itoc;
14520 var block, charCode;
14521 while (charAt(string, position) || (map = '=', position % 1)) {
14522 charCode = charCodeAt(string, position += 3 / 4);
14523 if (charCode > 0xFF) {
14524 throw new (getBuiltIn('DOMException'))('The string contains characters outside of the Latin1 range', 'InvalidCharacterError');
14525 }
14526 block = block << 8 | charCode;
14527 output += charAt(map, 63 & block >> 8 - position % 1 * 8);
14528 } return output;
14529 }
14530});
14531
14532
14533/***/ }),
14534/* 476 */
14535/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14536
14537var global = __webpack_require__(4);
14538var DOMIterables = __webpack_require__(477);
14539var DOMTokenListPrototype = __webpack_require__(478);
14540var forEach = __webpack_require__(157);
14541var createNonEnumerableProperty = __webpack_require__(45);
14542
14543var handlePrototype = function (CollectionPrototype) {
14544 // some Chrome versions have non-configurable methods on DOMTokenList
14545 if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
14546 createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
14547 } catch (error) {
14548 CollectionPrototype.forEach = forEach;
14549 }
14550};
14551
14552for (var COLLECTION_NAME in DOMIterables) {
14553 if (DOMIterables[COLLECTION_NAME]) {
14554 handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
14555 }
14556}
14557
14558handlePrototype(DOMTokenListPrototype);
14559
14560
14561/***/ }),
14562/* 477 */
14563/***/ (function(module) {
14564
14565// iterable DOM collections
14566// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
14567module.exports = {
14568 CSSRuleList: 0,
14569 CSSStyleDeclaration: 0,
14570 CSSValueList: 0,
14571 ClientRectList: 0,
14572 DOMRectList: 0,
14573 DOMStringList: 0,
14574 DOMTokenList: 1,
14575 DataTransferItemList: 0,
14576 FileList: 0,
14577 HTMLAllCollection: 0,
14578 HTMLCollection: 0,
14579 HTMLFormElement: 0,
14580 HTMLSelectElement: 0,
14581 MediaList: 0,
14582 MimeTypeArray: 0,
14583 NamedNodeMap: 0,
14584 NodeList: 1,
14585 PaintRequestList: 0,
14586 Plugin: 0,
14587 PluginArray: 0,
14588 SVGLengthList: 0,
14589 SVGNumberList: 0,
14590 SVGPathSegList: 0,
14591 SVGPointList: 0,
14592 SVGStringList: 0,
14593 SVGTransformList: 0,
14594 SourceBufferList: 0,
14595 StyleSheetList: 0,
14596 TextTrackCueList: 0,
14597 TextTrackList: 0,
14598 TouchList: 0
14599};
14600
14601
14602/***/ }),
14603/* 478 */
14604/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
14605
14606// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
14607var documentCreateElement = __webpack_require__(44);
14608
14609var classList = documentCreateElement('span').classList;
14610var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
14611
14612module.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
14613
14614
14615/***/ }),
14616/* 479 */
14617/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14618
14619var global = __webpack_require__(4);
14620var DOMIterables = __webpack_require__(477);
14621var DOMTokenListPrototype = __webpack_require__(478);
14622var ArrayIteratorMethods = __webpack_require__(165);
14623var createNonEnumerableProperty = __webpack_require__(45);
14624var wellKnownSymbol = __webpack_require__(35);
14625
14626var ITERATOR = wellKnownSymbol('iterator');
14627var TO_STRING_TAG = wellKnownSymbol('toStringTag');
14628var ArrayValues = ArrayIteratorMethods.values;
14629
14630var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
14631 if (CollectionPrototype) {
14632 // some Chrome versions have non-configurable methods on DOMTokenList
14633 if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
14634 createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
14635 } catch (error) {
14636 CollectionPrototype[ITERATOR] = ArrayValues;
14637 }
14638 if (!CollectionPrototype[TO_STRING_TAG]) {
14639 createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
14640 }
14641 if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
14642 // some Chrome versions have non-configurable methods on DOMTokenList
14643 if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
14644 createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
14645 } catch (error) {
14646 CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
14647 }
14648 }
14649 }
14650};
14651
14652for (var COLLECTION_NAME in DOMIterables) {
14653 handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);
14654}
14655
14656handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
14657
14658
14659/***/ }),
14660/* 480 */
14661/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14662
14663"use strict";
14664
14665var $ = __webpack_require__(3);
14666var tryNodeRequire = __webpack_require__(481);
14667var getBuiltIn = __webpack_require__(25);
14668var fails = __webpack_require__(7);
14669var create = __webpack_require__(73);
14670var createPropertyDescriptor = __webpack_require__(11);
14671var defineProperty = (__webpack_require__(46).f);
14672var defineBuiltIn = __webpack_require__(49);
14673var defineBuiltInAccessor = __webpack_require__(306);
14674var hasOwn = __webpack_require__(40);
14675var anInstance = __webpack_require__(199);
14676var anObject = __webpack_require__(48);
14677var errorToString = __webpack_require__(123);
14678var normalizeStringArgument = __webpack_require__(118);
14679var DOMExceptionConstants = __webpack_require__(482);
14680var clearErrorStack = __webpack_require__(120);
14681var InternalStateModule = __webpack_require__(53);
14682var DESCRIPTORS = __webpack_require__(6);
14683var IS_PURE = __webpack_require__(37);
14684
14685var DOM_EXCEPTION = 'DOMException';
14686var DATA_CLONE_ERR = 'DATA_CLONE_ERR';
14687var Error = getBuiltIn('Error');
14688// NodeJS < 17.0 does not expose `DOMException` to global
14689var NativeDOMException = getBuiltIn(DOM_EXCEPTION) || (function () {
14690 try {
14691 // NodeJS < 15.0 does not expose `MessageChannel` to global
14692 var MessageChannel = getBuiltIn('MessageChannel') || tryNodeRequire('worker_threads').MessageChannel;
14693 // eslint-disable-next-line es/no-weak-map, unicorn/require-post-message-target-origin -- safe
14694 new MessageChannel().port1.postMessage(new WeakMap());
14695 } catch (error) {
14696 if (error.name == DATA_CLONE_ERR && error.code == 25) return error.constructor;
14697 }
14698})();
14699var NativeDOMExceptionPrototype = NativeDOMException && NativeDOMException.prototype;
14700var ErrorPrototype = Error.prototype;
14701var setInternalState = InternalStateModule.set;
14702var getInternalState = InternalStateModule.getterFor(DOM_EXCEPTION);
14703var HAS_STACK = 'stack' in Error(DOM_EXCEPTION);
14704
14705var codeFor = function (name) {
14706 return hasOwn(DOMExceptionConstants, name) && DOMExceptionConstants[name].m ? DOMExceptionConstants[name].c : 0;
14707};
14708
14709var $DOMException = function DOMException() {
14710 anInstance(this, DOMExceptionPrototype);
14711 var argumentsLength = arguments.length;
14712 var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);
14713 var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');
14714 var code = codeFor(name);
14715 setInternalState(this, {
14716 type: DOM_EXCEPTION,
14717 name: name,
14718 message: message,
14719 code: code
14720 });
14721 if (!DESCRIPTORS) {
14722 this.name = name;
14723 this.message = message;
14724 this.code = code;
14725 }
14726 if (HAS_STACK) {
14727 var error = Error(message);
14728 error.name = DOM_EXCEPTION;
14729 defineProperty(this, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));
14730 }
14731};
14732
14733var DOMExceptionPrototype = $DOMException.prototype = create(ErrorPrototype);
14734
14735var createGetterDescriptor = function (get) {
14736 return { enumerable: true, configurable: true, get: get };
14737};
14738
14739var getterFor = function (key) {
14740 return createGetterDescriptor(function () {
14741 return getInternalState(this)[key];
14742 });
14743};
14744
14745if (DESCRIPTORS) {
14746 defineBuiltInAccessor(DOMExceptionPrototype, 'code', getterFor('code'));
14747 defineBuiltInAccessor(DOMExceptionPrototype, 'message', getterFor('message'));
14748 defineBuiltInAccessor(DOMExceptionPrototype, 'name', getterFor('name'));
14749}
14750
14751defineProperty(DOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, $DOMException));
14752
14753// FF36- DOMException is a function, but can't be constructed
14754var INCORRECT_CONSTRUCTOR = fails(function () {
14755 return !(new NativeDOMException() instanceof Error);
14756});
14757
14758// Safari 10.1 / Chrome 32- / IE8- DOMException.prototype.toString bugs
14759var INCORRECT_TO_STRING = INCORRECT_CONSTRUCTOR || fails(function () {
14760 return ErrorPrototype.toString !== errorToString || String(new NativeDOMException(1, 2)) !== '2: 1';
14761});
14762
14763// Deno 1.6.3- DOMException.prototype.code just missed
14764var INCORRECT_CODE = INCORRECT_CONSTRUCTOR || fails(function () {
14765 return new NativeDOMException(1, 'DataCloneError').code !== 25;
14766});
14767
14768// Deno 1.6.3- DOMException constants just missed
14769var MISSED_CONSTANTS = INCORRECT_CONSTRUCTOR
14770 || NativeDOMException[DATA_CLONE_ERR] !== 25
14771 || NativeDOMExceptionPrototype[DATA_CLONE_ERR] !== 25;
14772
14773var FORCED_CONSTRUCTOR = IS_PURE ? INCORRECT_TO_STRING || INCORRECT_CODE || MISSED_CONSTANTS : INCORRECT_CONSTRUCTOR;
14774
14775// `DOMException` constructor
14776// https://webidl.spec.whatwg.org/#idl-DOMException
14777$({ global: true, constructor: true, forced: FORCED_CONSTRUCTOR }, {
14778 DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
14779});
14780
14781var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);
14782var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;
14783
14784if (INCORRECT_TO_STRING && (IS_PURE || NativeDOMException === PolyfilledDOMException)) {
14785 defineBuiltIn(PolyfilledDOMExceptionPrototype, 'toString', errorToString);
14786}
14787
14788if (INCORRECT_CODE && DESCRIPTORS && NativeDOMException === PolyfilledDOMException) {
14789 defineBuiltInAccessor(PolyfilledDOMExceptionPrototype, 'code', createGetterDescriptor(function () {
14790 return codeFor(anObject(this).name);
14791 }));
14792}
14793
14794for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {
14795 var constant = DOMExceptionConstants[key];
14796 var constantName = constant.s;
14797 var descriptor = createPropertyDescriptor(6, constant.c);
14798 if (!hasOwn(PolyfilledDOMException, constantName)) {
14799 defineProperty(PolyfilledDOMException, constantName, descriptor);
14800 }
14801 if (!hasOwn(PolyfilledDOMExceptionPrototype, constantName)) {
14802 defineProperty(PolyfilledDOMExceptionPrototype, constantName, descriptor);
14803 }
14804}
14805
14806
14807/***/ }),
14808/* 481 */
14809/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
14810
14811var IS_NODE = __webpack_require__(179);
14812
14813module.exports = function (name) {
14814 try {
14815 // eslint-disable-next-line no-new-func -- safe
14816 if (IS_NODE) return Function('return require("' + name + '")')();
14817 } catch (error) { /* empty */ }
14818};
14819
14820
14821/***/ }),
14822/* 482 */
14823/***/ (function(module) {
14824
14825module.exports = {
14826 IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },
14827 DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },
14828 HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },
14829 WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },
14830 InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },
14831 NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },
14832 NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },
14833 NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },
14834 NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },
14835 InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },
14836 InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },
14837 SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },
14838 InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },
14839 NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },
14840 InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },
14841 ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },
14842 TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },
14843 SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },
14844 NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },
14845 AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },
14846 URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },
14847 QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },
14848 TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },
14849 InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },
14850 DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }
14851};
14852
14853
14854/***/ }),
14855/* 483 */
14856/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14857
14858"use strict";
14859
14860var $ = __webpack_require__(3);
14861var global = __webpack_require__(4);
14862var getBuiltIn = __webpack_require__(25);
14863var createPropertyDescriptor = __webpack_require__(11);
14864var defineProperty = (__webpack_require__(46).f);
14865var hasOwn = __webpack_require__(40);
14866var anInstance = __webpack_require__(199);
14867var inheritIfRequired = __webpack_require__(117);
14868var normalizeStringArgument = __webpack_require__(118);
14869var DOMExceptionConstants = __webpack_require__(482);
14870var clearErrorStack = __webpack_require__(120);
14871var DESCRIPTORS = __webpack_require__(6);
14872var IS_PURE = __webpack_require__(37);
14873
14874var DOM_EXCEPTION = 'DOMException';
14875var Error = getBuiltIn('Error');
14876var NativeDOMException = getBuiltIn(DOM_EXCEPTION);
14877
14878var $DOMException = function DOMException() {
14879 anInstance(this, DOMExceptionPrototype);
14880 var argumentsLength = arguments.length;
14881 var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);
14882 var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');
14883 var that = new NativeDOMException(message, name);
14884 var error = Error(message);
14885 error.name = DOM_EXCEPTION;
14886 defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));
14887 inheritIfRequired(that, this, $DOMException);
14888 return that;
14889};
14890
14891var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;
14892
14893var ERROR_HAS_STACK = 'stack' in Error(DOM_EXCEPTION);
14894var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);
14895
14896// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
14897var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(global, DOM_EXCEPTION);
14898
14899// Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it
14900// https://github.com/Jarred-Sumner/bun/issues/399
14901var BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable);
14902
14903var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;
14904
14905// `DOMException` constructor patch for `.stack` where it's required
14906// https://webidl.spec.whatwg.org/#es-DOMException-specialness
14907$({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic
14908 DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
14909});
14910
14911var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);
14912var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;
14913
14914if (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) {
14915 if (!IS_PURE) {
14916 defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException));
14917 }
14918
14919 for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {
14920 var constant = DOMExceptionConstants[key];
14921 var constantName = constant.s;
14922 if (!hasOwn(PolyfilledDOMException, constantName)) {
14923 defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c));
14924 }
14925 }
14926}
14927
14928
14929/***/ }),
14930/* 484 */
14931/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14932
14933var getBuiltIn = __webpack_require__(25);
14934var setToStringTag = __webpack_require__(84);
14935
14936var DOM_EXCEPTION = 'DOMException';
14937
14938setToStringTag(getBuiltIn(DOM_EXCEPTION), DOM_EXCEPTION);
14939
14940
14941/***/ }),
14942/* 485 */
14943/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14944
14945// TODO: Remove this module from `core-js@4` since it's split to modules listed below
14946__webpack_require__(486);
14947__webpack_require__(487);
14948
14949
14950/***/ }),
14951/* 486 */
14952/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14953
14954var $ = __webpack_require__(3);
14955var global = __webpack_require__(4);
14956var clearImmediate = (__webpack_require__(316).clear);
14957
14958// `clearImmediate` method
14959// http://w3c.github.io/setImmediate/#si-clearImmediate
14960$({ global: true, bind: true, enumerable: true, forced: global.clearImmediate !== clearImmediate }, {
14961 clearImmediate: clearImmediate
14962});
14963
14964
14965/***/ }),
14966/* 487 */
14967/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14968
14969var $ = __webpack_require__(3);
14970var global = __webpack_require__(4);
14971var setImmediate = (__webpack_require__(316).set);
14972
14973// `setImmediate` method
14974// http://w3c.github.io/setImmediate/#si-setImmediate
14975$({ global: true, bind: true, enumerable: true, forced: global.setImmediate !== setImmediate }, {
14976 setImmediate: setImmediate
14977});
14978
14979
14980/***/ }),
14981/* 488 */
14982/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14983
14984var $ = __webpack_require__(3);
14985var global = __webpack_require__(4);
14986var microtask = __webpack_require__(319);
14987var aCallable = __webpack_require__(32);
14988var validateArgumentsLength = __webpack_require__(317);
14989var IS_NODE = __webpack_require__(179);
14990
14991var process = global.process;
14992
14993// `queueMicrotask` method
14994// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask
14995$({ global: true, enumerable: true, dontCallGetSet: true }, {
14996 queueMicrotask: function queueMicrotask(fn) {
14997 validateArgumentsLength(arguments.length, 1);
14998 aCallable(fn);
14999 var domain = IS_NODE && process.domain;
15000 microtask(domain ? domain.bind(fn) : fn);
15001 }
15002});
15003
15004
15005/***/ }),
15006/* 489 */
15007/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
15008
15009"use strict";
15010
15011var $ = __webpack_require__(3);
15012var global = __webpack_require__(4);
15013var defineBuiltInAccessor = __webpack_require__(306);
15014var DESCRIPTORS = __webpack_require__(6);
15015
15016var $TypeError = TypeError;
15017// eslint-disable-next-line es/no-object-defineproperty -- safe
15018var defineProperty = Object.defineProperty;
15019var INCORRECT_VALUE = global.self !== global;
15020
15021// `self` getter
15022// https://html.spec.whatwg.org/multipage/window-object.html#dom-self
15023try {
15024 if (DESCRIPTORS) {
15025 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
15026 var descriptor = Object.getOwnPropertyDescriptor(global, 'self');
15027 // some engines have `self`, but with incorrect descriptor
15028 // https://github.com/denoland/deno/issues/15765
15029 if (INCORRECT_VALUE || !descriptor || !descriptor.get || !descriptor.enumerable) {
15030 defineBuiltInAccessor(global, 'self', {
15031 get: function self() {
15032 return global;
15033 },
15034 set: function self(value) {
15035 if (this !== global) throw $TypeError('Illegal invocation');
15036 defineProperty(global, 'self', {
15037 value: value,
15038 writable: true,
15039 configurable: true,
15040 enumerable: true
15041 });
15042 },
15043 configurable: true,
15044 enumerable: true
15045 });
15046 }
15047 } else $({ global: true, simple: true, forced: INCORRECT_VALUE }, {
15048 self: global
15049 });
15050} catch (error) { /* empty */ }
15051
15052
15053/***/ }),
15054/* 490 */
15055/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
15056
15057var IS_PURE = __webpack_require__(37);
15058var $ = __webpack_require__(3);
15059var global = __webpack_require__(4);
15060var getBuiltin = __webpack_require__(25);
15061var uncurryThis = __webpack_require__(14);
15062var fails = __webpack_require__(7);
15063var uid = __webpack_require__(42);
15064var isCallable = __webpack_require__(22);
15065var isConstructor = __webpack_require__(90);
15066var isNullOrUndefined = __webpack_require__(18);
15067var isObject = __webpack_require__(21);
15068var isSymbol = __webpack_require__(24);
15069var iterate = __webpack_require__(128);
15070var anObject = __webpack_require__(48);
15071var classof = __webpack_require__(71);
15072var hasOwn = __webpack_require__(40);
15073var createProperty = __webpack_require__(79);
15074var createNonEnumerableProperty = __webpack_require__(45);
15075var lengthOfArrayLike = __webpack_require__(65);
15076var validateArgumentsLength = __webpack_require__(317);
15077var getRegExpFlags = __webpack_require__(357);
15078var ERROR_STACK_INSTALLABLE = __webpack_require__(121);
15079var V8 = __webpack_require__(29);
15080var IS_BROWSER = __webpack_require__(327);
15081var IS_DENO = __webpack_require__(328);
15082var IS_NODE = __webpack_require__(179);
15083
15084var Object = global.Object;
15085var Date = global.Date;
15086var Error = global.Error;
15087var EvalError = global.EvalError;
15088var RangeError = global.RangeError;
15089var ReferenceError = global.ReferenceError;
15090var SyntaxError = global.SyntaxError;
15091var TypeError = global.TypeError;
15092var URIError = global.URIError;
15093var PerformanceMark = global.PerformanceMark;
15094var WebAssembly = global.WebAssembly;
15095var CompileError = WebAssembly && WebAssembly.CompileError || Error;
15096var LinkError = WebAssembly && WebAssembly.LinkError || Error;
15097var RuntimeError = WebAssembly && WebAssembly.RuntimeError || Error;
15098var DOMException = getBuiltin('DOMException');
15099var Set = getBuiltin('Set');
15100var Map = getBuiltin('Map');
15101var MapPrototype = Map.prototype;
15102var mapHas = uncurryThis(MapPrototype.has);
15103var mapGet = uncurryThis(MapPrototype.get);
15104var mapSet = uncurryThis(MapPrototype.set);
15105var setAdd = uncurryThis(Set.prototype.add);
15106var objectKeys = getBuiltin('Object', 'keys');
15107var push = uncurryThis([].push);
15108var thisBooleanValue = uncurryThis(true.valueOf);
15109var thisNumberValue = uncurryThis(1.0.valueOf);
15110var thisStringValue = uncurryThis(''.valueOf);
15111var thisTimeValue = uncurryThis(Date.prototype.getTime);
15112var PERFORMANCE_MARK = uid('structuredClone');
15113var DATA_CLONE_ERROR = 'DataCloneError';
15114var TRANSFERRING = 'Transferring';
15115
15116var checkBasicSemantic = function (structuredCloneImplementation) {
15117 return !fails(function () {
15118 var set1 = new global.Set([7]);
15119 var set2 = structuredCloneImplementation(set1);
15120 var number = structuredCloneImplementation(Object(7));
15121 return set2 == set1 || !set2.has(7) || typeof number != 'object' || number != 7;
15122 }) && structuredCloneImplementation;
15123};
15124
15125var checkErrorsCloning = function (structuredCloneImplementation, $Error) {
15126 return !fails(function () {
15127 var error = new $Error();
15128 var test = structuredCloneImplementation({ a: error, b: error });
15129 return !(test && test.a === test.b && test.a instanceof $Error && test.a.stack === error.stack);
15130 });
15131};
15132
15133// https://github.com/whatwg/html/pull/5749
15134var checkNewErrorsCloningSemantic = function (structuredCloneImplementation) {
15135 return !fails(function () {
15136 var test = structuredCloneImplementation(new global.AggregateError([1], PERFORMANCE_MARK, { cause: 3 }));
15137 return test.name != 'AggregateError' || test.errors[0] != 1 || test.message != PERFORMANCE_MARK || test.cause != 3;
15138 });
15139};
15140
15141// FF94+, Safari 15.4+, Chrome 98+, NodeJS 17.0+, Deno 1.13+
15142// FF<103 and Safari implementations can't clone errors
15143// https://bugzilla.mozilla.org/show_bug.cgi?id=1556604
15144// FF103 can clone errors, but `.stack` of clone is an empty string
15145// https://bugzilla.mozilla.org/show_bug.cgi?id=1778762
15146// FF104+ fixed it on usual errors, but not on DOMExceptions
15147// https://bugzilla.mozilla.org/show_bug.cgi?id=1777321
15148// Chrome <102 returns `null` if cloned object contains multiple references to one error
15149// https://bugs.chromium.org/p/v8/issues/detail?id=12542
15150// NodeJS implementation can't clone DOMExceptions
15151// https://github.com/nodejs/node/issues/41038
15152// only FF103+ supports new (html/5749) error cloning semantic
15153var nativeStructuredClone = global.structuredClone;
15154
15155var FORCED_REPLACEMENT = IS_PURE
15156 || !checkErrorsCloning(nativeStructuredClone, Error)
15157 || !checkErrorsCloning(nativeStructuredClone, DOMException)
15158 || !checkNewErrorsCloningSemantic(nativeStructuredClone);
15159
15160// Chrome 82+, Safari 14.1+, Deno 1.11+
15161// Chrome 78-81 implementation swaps `.name` and `.message` of cloned `DOMException`
15162// Chrome returns `null` if cloned object contains multiple references to one error
15163// Safari 14.1 implementation doesn't clone some `RegExp` flags, so requires a workaround
15164// Safari implementation can't clone errors
15165// Deno 1.2-1.10 implementations too naive
15166// NodeJS 16.0+ does not have `PerformanceMark` constructor
15167// NodeJS <17.2 structured cloning implementation from `performance.mark` is too naive
15168// and can't clone, for example, `RegExp` or some boxed primitives
15169// https://github.com/nodejs/node/issues/40840
15170// no one of those implementations supports new (html/5749) error cloning semantic
15171var structuredCloneFromMark = !nativeStructuredClone && checkBasicSemantic(function (value) {
15172 return new PerformanceMark(PERFORMANCE_MARK, { detail: value }).detail;
15173});
15174
15175var nativeRestrictedStructuredClone = checkBasicSemantic(nativeStructuredClone) || structuredCloneFromMark;
15176
15177var throwUncloneable = function (type) {
15178 throw new DOMException('Uncloneable type: ' + type, DATA_CLONE_ERROR);
15179};
15180
15181var throwUnpolyfillable = function (type, action) {
15182 throw new DOMException((action || 'Cloning') + ' of ' + type + ' cannot be properly polyfilled in this engine', DATA_CLONE_ERROR);
15183};
15184
15185var createDataTransfer = function () {
15186 var dataTransfer;
15187 try {
15188 dataTransfer = new global.DataTransfer();
15189 } catch (error) {
15190 try {
15191 dataTransfer = new global.ClipboardEvent('').clipboardData;
15192 } catch (error2) { /* empty */ }
15193 }
15194 return dataTransfer && dataTransfer.items && dataTransfer.files ? dataTransfer : null;
15195};
15196
15197var structuredCloneInternal = function (value, map) {
15198 if (isSymbol(value)) throwUncloneable('Symbol');
15199 if (!isObject(value)) return value;
15200 // effectively preserves circular references
15201 if (map) {
15202 if (mapHas(map, value)) return mapGet(map, value);
15203 } else map = new Map();
15204
15205 var type = classof(value);
15206 var deep = false;
15207 var C, name, cloned, dataTransfer, i, length, keys, key, source, target;
15208
15209 switch (type) {
15210 case 'Array':
15211 cloned = [];
15212 deep = true;
15213 break;
15214 case 'Object':
15215 cloned = {};
15216 deep = true;
15217 break;
15218 case 'Map':
15219 cloned = new Map();
15220 deep = true;
15221 break;
15222 case 'Set':
15223 cloned = new Set();
15224 deep = true;
15225 break;
15226 case 'RegExp':
15227 // in this block because of a Safari 14.1 bug
15228 // old FF does not clone regexes passed to the constructor, so get the source and flags directly
15229 cloned = new RegExp(value.source, getRegExpFlags(value));
15230 break;
15231 case 'Error':
15232 name = value.name;
15233 switch (name) {
15234 case 'AggregateError':
15235 cloned = getBuiltin('AggregateError')([]);
15236 break;
15237 case 'EvalError':
15238 cloned = EvalError();
15239 break;
15240 case 'RangeError':
15241 cloned = RangeError();
15242 break;
15243 case 'ReferenceError':
15244 cloned = ReferenceError();
15245 break;
15246 case 'SyntaxError':
15247 cloned = SyntaxError();
15248 break;
15249 case 'TypeError':
15250 cloned = TypeError();
15251 break;
15252 case 'URIError':
15253 cloned = URIError();
15254 break;
15255 case 'CompileError':
15256 cloned = CompileError();
15257 break;
15258 case 'LinkError':
15259 cloned = LinkError();
15260 break;
15261 case 'RuntimeError':
15262 cloned = RuntimeError();
15263 break;
15264 default:
15265 cloned = Error();
15266 }
15267 deep = true;
15268 break;
15269 case 'DOMException':
15270 cloned = new DOMException(value.message, value.name);
15271 deep = true;
15272 break;
15273 case 'DataView':
15274 case 'Int8Array':
15275 case 'Uint8Array':
15276 case 'Uint8ClampedArray':
15277 case 'Int16Array':
15278 case 'Uint16Array':
15279 case 'Int32Array':
15280 case 'Uint32Array':
15281 case 'Float32Array':
15282 case 'Float64Array':
15283 case 'BigInt64Array':
15284 case 'BigUint64Array':
15285 C = global[type];
15286 // in some old engines like Safari 9, typeof C is 'object'
15287 // on Uint8ClampedArray or some other constructors
15288 if (!isObject(C)) throwUnpolyfillable(type);
15289 cloned = new C(
15290 // this is safe, since arraybuffer cannot have circular references
15291 structuredCloneInternal(value.buffer, map),
15292 value.byteOffset,
15293 type === 'DataView' ? value.byteLength : value.length
15294 );
15295 break;
15296 case 'DOMQuad':
15297 try {
15298 cloned = new DOMQuad(
15299 structuredCloneInternal(value.p1, map),
15300 structuredCloneInternal(value.p2, map),
15301 structuredCloneInternal(value.p3, map),
15302 structuredCloneInternal(value.p4, map)
15303 );
15304 } catch (error) {
15305 if (nativeRestrictedStructuredClone) {
15306 cloned = nativeRestrictedStructuredClone(value);
15307 } else throwUnpolyfillable(type);
15308 }
15309 break;
15310 case 'FileList':
15311 dataTransfer = createDataTransfer();
15312 if (dataTransfer) {
15313 for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {
15314 dataTransfer.items.add(structuredCloneInternal(value[i], map));
15315 }
15316 cloned = dataTransfer.files;
15317 } else if (nativeRestrictedStructuredClone) {
15318 cloned = nativeRestrictedStructuredClone(value);
15319 } else throwUnpolyfillable(type);
15320 break;
15321 case 'ImageData':
15322 // Safari 9 ImageData is a constructor, but typeof ImageData is 'object'
15323 try {
15324 cloned = new ImageData(
15325 structuredCloneInternal(value.data, map),
15326 value.width,
15327 value.height,
15328 { colorSpace: value.colorSpace }
15329 );
15330 } catch (error) {
15331 if (nativeRestrictedStructuredClone) {
15332 cloned = nativeRestrictedStructuredClone(value);
15333 } else throwUnpolyfillable(type);
15334 } break;
15335 default:
15336 if (nativeRestrictedStructuredClone) {
15337 cloned = nativeRestrictedStructuredClone(value);
15338 } else switch (type) {
15339 case 'BigInt':
15340 // can be a 3rd party polyfill
15341 cloned = Object(value.valueOf());
15342 break;
15343 case 'Boolean':
15344 cloned = Object(thisBooleanValue(value));
15345 break;
15346 case 'Number':
15347 cloned = Object(thisNumberValue(value));
15348 break;
15349 case 'String':
15350 cloned = Object(thisStringValue(value));
15351 break;
15352 case 'Date':
15353 cloned = new Date(thisTimeValue(value));
15354 break;
15355 case 'ArrayBuffer':
15356 C = global.DataView;
15357 // `ArrayBuffer#slice` is not available in IE10
15358 // `ArrayBuffer#slice` and `DataView` are not available in old FF
15359 if (!C && typeof value.slice != 'function') throwUnpolyfillable(type);
15360 // detached buffers throws in `DataView` and `.slice`
15361 try {
15362 if (typeof value.slice == 'function') {
15363 cloned = value.slice(0);
15364 } else {
15365 length = value.byteLength;
15366 cloned = new ArrayBuffer(length);
15367 source = new C(value);
15368 target = new C(cloned);
15369 for (i = 0; i < length; i++) {
15370 target.setUint8(i, source.getUint8(i));
15371 }
15372 }
15373 } catch (error) {
15374 throw new DOMException('ArrayBuffer is detached', DATA_CLONE_ERROR);
15375 } break;
15376 case 'SharedArrayBuffer':
15377 // SharedArrayBuffer should use shared memory, we can't polyfill it, so return the original
15378 cloned = value;
15379 break;
15380 case 'Blob':
15381 try {
15382 cloned = value.slice(0, value.size, value.type);
15383 } catch (error) {
15384 throwUnpolyfillable(type);
15385 } break;
15386 case 'DOMPoint':
15387 case 'DOMPointReadOnly':
15388 C = global[type];
15389 try {
15390 cloned = C.fromPoint
15391 ? C.fromPoint(value)
15392 : new C(value.x, value.y, value.z, value.w);
15393 } catch (error) {
15394 throwUnpolyfillable(type);
15395 } break;
15396 case 'DOMRect':
15397 case 'DOMRectReadOnly':
15398 C = global[type];
15399 try {
15400 cloned = C.fromRect
15401 ? C.fromRect(value)
15402 : new C(value.x, value.y, value.width, value.height);
15403 } catch (error) {
15404 throwUnpolyfillable(type);
15405 } break;
15406 case 'DOMMatrix':
15407 case 'DOMMatrixReadOnly':
15408 C = global[type];
15409 try {
15410 cloned = C.fromMatrix
15411 ? C.fromMatrix(value)
15412 : new C(value);
15413 } catch (error) {
15414 throwUnpolyfillable(type);
15415 } break;
15416 case 'AudioData':
15417 case 'VideoFrame':
15418 if (!isCallable(value.clone)) throwUnpolyfillable(type);
15419 try {
15420 cloned = value.clone();
15421 } catch (error) {
15422 throwUncloneable(type);
15423 } break;
15424 case 'File':
15425 try {
15426 cloned = new File([value], value.name, value);
15427 } catch (error) {
15428 throwUnpolyfillable(type);
15429 } break;
15430 case 'CropTarget':
15431 case 'CryptoKey':
15432 case 'FileSystemDirectoryHandle':
15433 case 'FileSystemFileHandle':
15434 case 'FileSystemHandle':
15435 case 'GPUCompilationInfo':
15436 case 'GPUCompilationMessage':
15437 case 'ImageBitmap':
15438 case 'RTCCertificate':
15439 case 'WebAssembly.Module':
15440 throwUnpolyfillable(type);
15441 // break omitted
15442 default:
15443 throwUncloneable(type);
15444 }
15445 }
15446
15447 mapSet(map, value, cloned);
15448
15449 if (deep) switch (type) {
15450 case 'Array':
15451 case 'Object':
15452 keys = objectKeys(value);
15453 for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
15454 key = keys[i];
15455 createProperty(cloned, key, structuredCloneInternal(value[key], map));
15456 } break;
15457 case 'Map':
15458 value.forEach(function (v, k) {
15459 mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map));
15460 });
15461 break;
15462 case 'Set':
15463 value.forEach(function (v) {
15464 setAdd(cloned, structuredCloneInternal(v, map));
15465 });
15466 break;
15467 case 'Error':
15468 createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map));
15469 if (hasOwn(value, 'cause')) {
15470 createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map));
15471 }
15472 if (name == 'AggregateError') {
15473 cloned.errors = structuredCloneInternal(value.errors, map);
15474 } // break omitted
15475 case 'DOMException':
15476 if (ERROR_STACK_INSTALLABLE) {
15477 createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map));
15478 }
15479 }
15480
15481 return cloned;
15482};
15483
15484var PROPER_TRANSFER = nativeStructuredClone && !fails(function () {
15485 // prevent V8 ArrayBufferDetaching protector cell invalidation and performance degradation
15486 // https://github.com/zloirock/core-js/issues/679
15487 if ((IS_DENO && V8 > 92) || (IS_NODE && V8 > 94) || (IS_BROWSER && V8 > 97)) return false;
15488 var buffer = new ArrayBuffer(8);
15489 var clone = nativeStructuredClone(buffer, { transfer: [buffer] });
15490 return buffer.byteLength != 0 || clone.byteLength != 8;
15491});
15492
15493var tryToTransfer = function (rawTransfer, map) {
15494 if (!isObject(rawTransfer)) throw TypeError('Transfer option cannot be converted to a sequence');
15495
15496 var transfer = [];
15497
15498 iterate(rawTransfer, function (value) {
15499 push(transfer, anObject(value));
15500 });
15501
15502 var i = 0;
15503 var length = lengthOfArrayLike(transfer);
15504 var value, type, C, transferredArray, transferred, canvas, context;
15505
15506 if (PROPER_TRANSFER) {
15507 transferredArray = nativeStructuredClone(transfer, { transfer: transfer });
15508 while (i < length) mapSet(map, transfer[i], transferredArray[i++]);
15509 } else while (i < length) {
15510 value = transfer[i++];
15511 if (mapHas(map, value)) throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
15512
15513 type = classof(value);
15514
15515 switch (type) {
15516 case 'ImageBitmap':
15517 C = global.OffscreenCanvas;
15518 if (!isConstructor(C)) throwUnpolyfillable(type, TRANSFERRING);
15519 try {
15520 canvas = new C(value.width, value.height);
15521 context = canvas.getContext('bitmaprenderer');
15522 context.transferFromImageBitmap(value);
15523 transferred = canvas.transferToImageBitmap();
15524 } catch (error) { /* empty */ }
15525 break;
15526 case 'AudioData':
15527 case 'VideoFrame':
15528 if (!isCallable(value.clone) || !isCallable(value.close)) throwUnpolyfillable(type, TRANSFERRING);
15529 try {
15530 transferred = value.clone();
15531 value.close();
15532 } catch (error) { /* empty */ }
15533 break;
15534 case 'ArrayBuffer':
15535 case 'MediaSourceHandle':
15536 case 'MessagePort':
15537 case 'OffscreenCanvas':
15538 case 'ReadableStream':
15539 case 'TransformStream':
15540 case 'WritableStream':
15541 throwUnpolyfillable(type, TRANSFERRING);
15542 }
15543
15544 if (transferred === undefined) throw new DOMException('This object cannot be transferred: ' + type, DATA_CLONE_ERROR);
15545 mapSet(map, value, transferred);
15546 }
15547};
15548
15549// `structuredClone` method
15550// https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone
15551$({ global: true, enumerable: true, sham: !PROPER_TRANSFER, forced: FORCED_REPLACEMENT }, {
15552 structuredClone: function structuredClone(value /* , { transfer } */) {
15553 var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined;
15554 var transfer = options ? options.transfer : undefined;
15555 var map;
15556
15557 if (transfer !== undefined) {
15558 map = new Map();
15559 tryToTransfer(transfer, map);
15560 }
15561
15562 return structuredCloneInternal(value, map);
15563 }
15564});
15565
15566
15567/***/ }),
15568/* 491 */
15569/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
15570
15571// TODO: Remove this module from `core-js@4` since it's split to modules listed below
15572__webpack_require__(492);
15573__webpack_require__(494);
15574
15575
15576/***/ }),
15577/* 492 */
15578/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
15579
15580var $ = __webpack_require__(3);
15581var global = __webpack_require__(4);
15582var setInterval = (__webpack_require__(493).setInterval);
15583
15584// ie9- setInterval additional parameters fix
15585// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval
15586$({ global: true, bind: true, forced: global.setInterval !== setInterval }, {
15587 setInterval: setInterval
15588});
15589
15590
15591/***/ }),
15592/* 493 */
15593/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
15594
15595var global = __webpack_require__(4);
15596var apply = __webpack_require__(95);
15597var isCallable = __webpack_require__(22);
15598var userAgent = __webpack_require__(30);
15599var arraySlice = __webpack_require__(96);
15600var validateArgumentsLength = __webpack_require__(317);
15601
15602var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
15603var Function = global.Function;
15604
15605var wrap = function (scheduler) {
15606 return MSIE ? function (handler, timeout /* , ...arguments */) {
15607 var boundArgs = validateArgumentsLength(arguments.length, 1) > 2;
15608 var fn = isCallable(handler) ? handler : Function(handler);
15609 var args = boundArgs ? arraySlice(arguments, 2) : undefined;
15610 return scheduler(boundArgs ? function () {
15611 apply(fn, this, args);
15612 } : fn, timeout);
15613 } : scheduler;
15614};
15615
15616// ie9- setTimeout & setInterval additional parameters fix
15617// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers
15618module.exports = {
15619 // `setTimeout` method
15620 // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout
15621 setTimeout: wrap(global.setTimeout),
15622 // `setInterval` method
15623 // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval
15624 setInterval: wrap(global.setInterval)
15625};
15626
15627
15628/***/ }),
15629/* 494 */
15630/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
15631
15632var $ = __webpack_require__(3);
15633var global = __webpack_require__(4);
15634var setTimeout = (__webpack_require__(493).setTimeout);
15635
15636// ie9- setTimeout additional parameters fix
15637// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout
15638$({ global: true, bind: true, forced: global.setTimeout !== setTimeout }, {
15639 setTimeout: setTimeout
15640});
15641
15642
15643/***/ }),
15644/* 495 */
15645/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
15646
15647// TODO: Remove this module from `core-js@4` since it's replaced to module below
15648__webpack_require__(496);
15649
15650
15651/***/ }),
15652/* 496 */
15653/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
15654
15655"use strict";
15656
15657// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
15658__webpack_require__(379);
15659var $ = __webpack_require__(3);
15660var DESCRIPTORS = __webpack_require__(6);
15661var USE_NATIVE_URL = __webpack_require__(497);
15662var global = __webpack_require__(4);
15663var bind = __webpack_require__(86);
15664var uncurryThis = __webpack_require__(14);
15665var defineBuiltIn = __webpack_require__(49);
15666var defineBuiltInAccessor = __webpack_require__(306);
15667var anInstance = __webpack_require__(199);
15668var hasOwn = __webpack_require__(40);
15669var assign = __webpack_require__(280);
15670var arrayFrom = __webpack_require__(159);
15671var arraySlice = __webpack_require__(78);
15672var codeAt = (__webpack_require__(373).codeAt);
15673var toASCII = __webpack_require__(498);
15674var $toString = __webpack_require__(70);
15675var setToStringTag = __webpack_require__(84);
15676var validateArgumentsLength = __webpack_require__(317);
15677var URLSearchParamsModule = __webpack_require__(499);
15678var InternalStateModule = __webpack_require__(53);
15679
15680var setInternalState = InternalStateModule.set;
15681var getInternalURLState = InternalStateModule.getterFor('URL');
15682var URLSearchParams = URLSearchParamsModule.URLSearchParams;
15683var getInternalSearchParamsState = URLSearchParamsModule.getState;
15684
15685var NativeURL = global.URL;
15686var TypeError = global.TypeError;
15687var parseInt = global.parseInt;
15688var floor = Math.floor;
15689var pow = Math.pow;
15690var charAt = uncurryThis(''.charAt);
15691var exec = uncurryThis(/./.exec);
15692var join = uncurryThis([].join);
15693var numberToString = uncurryThis(1.0.toString);
15694var pop = uncurryThis([].pop);
15695var push = uncurryThis([].push);
15696var replace = uncurryThis(''.replace);
15697var shift = uncurryThis([].shift);
15698var split = uncurryThis(''.split);
15699var stringSlice = uncurryThis(''.slice);
15700var toLowerCase = uncurryThis(''.toLowerCase);
15701var unshift = uncurryThis([].unshift);
15702
15703var INVALID_AUTHORITY = 'Invalid authority';
15704var INVALID_SCHEME = 'Invalid scheme';
15705var INVALID_HOST = 'Invalid host';
15706var INVALID_PORT = 'Invalid port';
15707
15708var ALPHA = /[a-z]/i;
15709// eslint-disable-next-line regexp/no-obscure-range -- safe
15710var ALPHANUMERIC = /[\d+-.a-z]/i;
15711var DIGIT = /\d/;
15712var HEX_START = /^0x/i;
15713var OCT = /^[0-7]+$/;
15714var DEC = /^\d+$/;
15715var HEX = /^[\da-f]+$/i;
15716/* eslint-disable regexp/no-control-character -- safe */
15717var FORBIDDEN_HOST_CODE_POINT = /[\0\t\n\r #%/:<>?@[\\\]^|]/;
15718var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\0\t\n\r #/:<>?@[\\\]^|]/;
15719var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u0020]+|[\u0000-\u0020]+$/g;
15720var TAB_AND_NEW_LINE = /[\t\n\r]/g;
15721/* eslint-enable regexp/no-control-character -- safe */
15722var EOF;
15723
15724// https://url.spec.whatwg.org/#ipv4-number-parser
15725var parseIPv4 = function (input) {
15726 var parts = split(input, '.');
15727 var partsLength, numbers, index, part, radix, number, ipv4;
15728 if (parts.length && parts[parts.length - 1] == '') {
15729 parts.length--;
15730 }
15731 partsLength = parts.length;
15732 if (partsLength > 4) return input;
15733 numbers = [];
15734 for (index = 0; index < partsLength; index++) {
15735 part = parts[index];
15736 if (part == '') return input;
15737 radix = 10;
15738 if (part.length > 1 && charAt(part, 0) == '0') {
15739 radix = exec(HEX_START, part) ? 16 : 8;
15740 part = stringSlice(part, radix == 8 ? 1 : 2);
15741 }
15742 if (part === '') {
15743 number = 0;
15744 } else {
15745 if (!exec(radix == 10 ? DEC : radix == 8 ? OCT : HEX, part)) return input;
15746 number = parseInt(part, radix);
15747 }
15748 push(numbers, number);
15749 }
15750 for (index = 0; index < partsLength; index++) {
15751 number = numbers[index];
15752 if (index == partsLength - 1) {
15753 if (number >= pow(256, 5 - partsLength)) return null;
15754 } else if (number > 255) return null;
15755 }
15756 ipv4 = pop(numbers);
15757 for (index = 0; index < numbers.length; index++) {
15758 ipv4 += numbers[index] * pow(256, 3 - index);
15759 }
15760 return ipv4;
15761};
15762
15763// https://url.spec.whatwg.org/#concept-ipv6-parser
15764// eslint-disable-next-line max-statements -- TODO
15765var parseIPv6 = function (input) {
15766 var address = [0, 0, 0, 0, 0, 0, 0, 0];
15767 var pieceIndex = 0;
15768 var compress = null;
15769 var pointer = 0;
15770 var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
15771
15772 var chr = function () {
15773 return charAt(input, pointer);
15774 };
15775
15776 if (chr() == ':') {
15777 if (charAt(input, 1) != ':') return;
15778 pointer += 2;
15779 pieceIndex++;
15780 compress = pieceIndex;
15781 }
15782 while (chr()) {
15783 if (pieceIndex == 8) return;
15784 if (chr() == ':') {
15785 if (compress !== null) return;
15786 pointer++;
15787 pieceIndex++;
15788 compress = pieceIndex;
15789 continue;
15790 }
15791 value = length = 0;
15792 while (length < 4 && exec(HEX, chr())) {
15793 value = value * 16 + parseInt(chr(), 16);
15794 pointer++;
15795 length++;
15796 }
15797 if (chr() == '.') {
15798 if (length == 0) return;
15799 pointer -= length;
15800 if (pieceIndex > 6) return;
15801 numbersSeen = 0;
15802 while (chr()) {
15803 ipv4Piece = null;
15804 if (numbersSeen > 0) {
15805 if (chr() == '.' && numbersSeen < 4) pointer++;
15806 else return;
15807 }
15808 if (!exec(DIGIT, chr())) return;
15809 while (exec(DIGIT, chr())) {
15810 number = parseInt(chr(), 10);
15811 if (ipv4Piece === null) ipv4Piece = number;
15812 else if (ipv4Piece == 0) return;
15813 else ipv4Piece = ipv4Piece * 10 + number;
15814 if (ipv4Piece > 255) return;
15815 pointer++;
15816 }
15817 address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
15818 numbersSeen++;
15819 if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
15820 }
15821 if (numbersSeen != 4) return;
15822 break;
15823 } else if (chr() == ':') {
15824 pointer++;
15825 if (!chr()) return;
15826 } else if (chr()) return;
15827 address[pieceIndex++] = value;
15828 }
15829 if (compress !== null) {
15830 swaps = pieceIndex - compress;
15831 pieceIndex = 7;
15832 while (pieceIndex != 0 && swaps > 0) {
15833 swap = address[pieceIndex];
15834 address[pieceIndex--] = address[compress + swaps - 1];
15835 address[compress + --swaps] = swap;
15836 }
15837 } else if (pieceIndex != 8) return;
15838 return address;
15839};
15840
15841var findLongestZeroSequence = function (ipv6) {
15842 var maxIndex = null;
15843 var maxLength = 1;
15844 var currStart = null;
15845 var currLength = 0;
15846 var index = 0;
15847 for (; index < 8; index++) {
15848 if (ipv6[index] !== 0) {
15849 if (currLength > maxLength) {
15850 maxIndex = currStart;
15851 maxLength = currLength;
15852 }
15853 currStart = null;
15854 currLength = 0;
15855 } else {
15856 if (currStart === null) currStart = index;
15857 ++currLength;
15858 }
15859 }
15860 if (currLength > maxLength) {
15861 maxIndex = currStart;
15862 maxLength = currLength;
15863 }
15864 return maxIndex;
15865};
15866
15867// https://url.spec.whatwg.org/#host-serializing
15868var serializeHost = function (host) {
15869 var result, index, compress, ignore0;
15870 // ipv4
15871 if (typeof host == 'number') {
15872 result = [];
15873 for (index = 0; index < 4; index++) {
15874 unshift(result, host % 256);
15875 host = floor(host / 256);
15876 } return join(result, '.');
15877 // ipv6
15878 } else if (typeof host == 'object') {
15879 result = '';
15880 compress = findLongestZeroSequence(host);
15881 for (index = 0; index < 8; index++) {
15882 if (ignore0 && host[index] === 0) continue;
15883 if (ignore0) ignore0 = false;
15884 if (compress === index) {
15885 result += index ? ':' : '::';
15886 ignore0 = true;
15887 } else {
15888 result += numberToString(host[index], 16);
15889 if (index < 7) result += ':';
15890 }
15891 }
15892 return '[' + result + ']';
15893 } return host;
15894};
15895
15896var C0ControlPercentEncodeSet = {};
15897var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
15898 ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
15899});
15900var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
15901 '#': 1, '?': 1, '{': 1, '}': 1
15902});
15903var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
15904 '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
15905});
15906
15907var percentEncode = function (chr, set) {
15908 var code = codeAt(chr, 0);
15909 return code > 0x20 && code < 0x7F && !hasOwn(set, chr) ? chr : encodeURIComponent(chr);
15910};
15911
15912// https://url.spec.whatwg.org/#special-scheme
15913var specialSchemes = {
15914 ftp: 21,
15915 file: null,
15916 http: 80,
15917 https: 443,
15918 ws: 80,
15919 wss: 443
15920};
15921
15922// https://url.spec.whatwg.org/#windows-drive-letter
15923var isWindowsDriveLetter = function (string, normalized) {
15924 var second;
15925 return string.length == 2 && exec(ALPHA, charAt(string, 0))
15926 && ((second = charAt(string, 1)) == ':' || (!normalized && second == '|'));
15927};
15928
15929// https://url.spec.whatwg.org/#start-with-a-windows-drive-letter
15930var startsWithWindowsDriveLetter = function (string) {
15931 var third;
15932 return string.length > 1 && isWindowsDriveLetter(stringSlice(string, 0, 2)) && (
15933 string.length == 2 ||
15934 ((third = charAt(string, 2)) === '/' || third === '\\' || third === '?' || third === '#')
15935 );
15936};
15937
15938// https://url.spec.whatwg.org/#single-dot-path-segment
15939var isSingleDot = function (segment) {
15940 return segment === '.' || toLowerCase(segment) === '%2e';
15941};
15942
15943// https://url.spec.whatwg.org/#double-dot-path-segment
15944var isDoubleDot = function (segment) {
15945 segment = toLowerCase(segment);
15946 return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
15947};
15948
15949// States:
15950var SCHEME_START = {};
15951var SCHEME = {};
15952var NO_SCHEME = {};
15953var SPECIAL_RELATIVE_OR_AUTHORITY = {};
15954var PATH_OR_AUTHORITY = {};
15955var RELATIVE = {};
15956var RELATIVE_SLASH = {};
15957var SPECIAL_AUTHORITY_SLASHES = {};
15958var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
15959var AUTHORITY = {};
15960var HOST = {};
15961var HOSTNAME = {};
15962var PORT = {};
15963var FILE = {};
15964var FILE_SLASH = {};
15965var FILE_HOST = {};
15966var PATH_START = {};
15967var PATH = {};
15968var CANNOT_BE_A_BASE_URL_PATH = {};
15969var QUERY = {};
15970var FRAGMENT = {};
15971
15972var URLState = function (url, isBase, base) {
15973 var urlString = $toString(url);
15974 var baseState, failure, searchParams;
15975 if (isBase) {
15976 failure = this.parse(urlString);
15977 if (failure) throw TypeError(failure);
15978 this.searchParams = null;
15979 } else {
15980 if (base !== undefined) baseState = new URLState(base, true);
15981 failure = this.parse(urlString, null, baseState);
15982 if (failure) throw TypeError(failure);
15983 searchParams = getInternalSearchParamsState(new URLSearchParams());
15984 searchParams.bindURL(this);
15985 this.searchParams = searchParams;
15986 }
15987};
15988
15989URLState.prototype = {
15990 type: 'URL',
15991 // https://url.spec.whatwg.org/#url-parsing
15992 // eslint-disable-next-line max-statements -- TODO
15993 parse: function (input, stateOverride, base) {
15994 var url = this;
15995 var state = stateOverride || SCHEME_START;
15996 var pointer = 0;
15997 var buffer = '';
15998 var seenAt = false;
15999 var seenBracket = false;
16000 var seenPasswordToken = false;
16001 var codePoints, chr, bufferCodePoints, failure;
16002
16003 input = $toString(input);
16004
16005 if (!stateOverride) {
16006 url.scheme = '';
16007 url.username = '';
16008 url.password = '';
16009 url.host = null;
16010 url.port = null;
16011 url.path = [];
16012 url.query = null;
16013 url.fragment = null;
16014 url.cannotBeABaseURL = false;
16015 input = replace(input, LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
16016 }
16017
16018 input = replace(input, TAB_AND_NEW_LINE, '');
16019
16020 codePoints = arrayFrom(input);
16021
16022 while (pointer <= codePoints.length) {
16023 chr = codePoints[pointer];
16024 switch (state) {
16025 case SCHEME_START:
16026 if (chr && exec(ALPHA, chr)) {
16027 buffer += toLowerCase(chr);
16028 state = SCHEME;
16029 } else if (!stateOverride) {
16030 state = NO_SCHEME;
16031 continue;
16032 } else return INVALID_SCHEME;
16033 break;
16034
16035 case SCHEME:
16036 if (chr && (exec(ALPHANUMERIC, chr) || chr == '+' || chr == '-' || chr == '.')) {
16037 buffer += toLowerCase(chr);
16038 } else if (chr == ':') {
16039 if (stateOverride && (
16040 (url.isSpecial() != hasOwn(specialSchemes, buffer)) ||
16041 (buffer == 'file' && (url.includesCredentials() || url.port !== null)) ||
16042 (url.scheme == 'file' && !url.host)
16043 )) return;
16044 url.scheme = buffer;
16045 if (stateOverride) {
16046 if (url.isSpecial() && specialSchemes[url.scheme] == url.port) url.port = null;
16047 return;
16048 }
16049 buffer = '';
16050 if (url.scheme == 'file') {
16051 state = FILE;
16052 } else if (url.isSpecial() && base && base.scheme == url.scheme) {
16053 state = SPECIAL_RELATIVE_OR_AUTHORITY;
16054 } else if (url.isSpecial()) {
16055 state = SPECIAL_AUTHORITY_SLASHES;
16056 } else if (codePoints[pointer + 1] == '/') {
16057 state = PATH_OR_AUTHORITY;
16058 pointer++;
16059 } else {
16060 url.cannotBeABaseURL = true;
16061 push(url.path, '');
16062 state = CANNOT_BE_A_BASE_URL_PATH;
16063 }
16064 } else if (!stateOverride) {
16065 buffer = '';
16066 state = NO_SCHEME;
16067 pointer = 0;
16068 continue;
16069 } else return INVALID_SCHEME;
16070 break;
16071
16072 case NO_SCHEME:
16073 if (!base || (base.cannotBeABaseURL && chr != '#')) return INVALID_SCHEME;
16074 if (base.cannotBeABaseURL && chr == '#') {
16075 url.scheme = base.scheme;
16076 url.path = arraySlice(base.path);
16077 url.query = base.query;
16078 url.fragment = '';
16079 url.cannotBeABaseURL = true;
16080 state = FRAGMENT;
16081 break;
16082 }
16083 state = base.scheme == 'file' ? FILE : RELATIVE;
16084 continue;
16085
16086 case SPECIAL_RELATIVE_OR_AUTHORITY:
16087 if (chr == '/' && codePoints[pointer + 1] == '/') {
16088 state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
16089 pointer++;
16090 } else {
16091 state = RELATIVE;
16092 continue;
16093 } break;
16094
16095 case PATH_OR_AUTHORITY:
16096 if (chr == '/') {
16097 state = AUTHORITY;
16098 break;
16099 } else {
16100 state = PATH;
16101 continue;
16102 }
16103
16104 case RELATIVE:
16105 url.scheme = base.scheme;
16106 if (chr == EOF) {
16107 url.username = base.username;
16108 url.password = base.password;
16109 url.host = base.host;
16110 url.port = base.port;
16111 url.path = arraySlice(base.path);
16112 url.query = base.query;
16113 } else if (chr == '/' || (chr == '\\' && url.isSpecial())) {
16114 state = RELATIVE_SLASH;
16115 } else if (chr == '?') {
16116 url.username = base.username;
16117 url.password = base.password;
16118 url.host = base.host;
16119 url.port = base.port;
16120 url.path = arraySlice(base.path);
16121 url.query = '';
16122 state = QUERY;
16123 } else if (chr == '#') {
16124 url.username = base.username;
16125 url.password = base.password;
16126 url.host = base.host;
16127 url.port = base.port;
16128 url.path = arraySlice(base.path);
16129 url.query = base.query;
16130 url.fragment = '';
16131 state = FRAGMENT;
16132 } else {
16133 url.username = base.username;
16134 url.password = base.password;
16135 url.host = base.host;
16136 url.port = base.port;
16137 url.path = arraySlice(base.path);
16138 url.path.length--;
16139 state = PATH;
16140 continue;
16141 } break;
16142
16143 case RELATIVE_SLASH:
16144 if (url.isSpecial() && (chr == '/' || chr == '\\')) {
16145 state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
16146 } else if (chr == '/') {
16147 state = AUTHORITY;
16148 } else {
16149 url.username = base.username;
16150 url.password = base.password;
16151 url.host = base.host;
16152 url.port = base.port;
16153 state = PATH;
16154 continue;
16155 } break;
16156
16157 case SPECIAL_AUTHORITY_SLASHES:
16158 state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
16159 if (chr != '/' || charAt(buffer, pointer + 1) != '/') continue;
16160 pointer++;
16161 break;
16162
16163 case SPECIAL_AUTHORITY_IGNORE_SLASHES:
16164 if (chr != '/' && chr != '\\') {
16165 state = AUTHORITY;
16166 continue;
16167 } break;
16168
16169 case AUTHORITY:
16170 if (chr == '@') {
16171 if (seenAt) buffer = '%40' + buffer;
16172 seenAt = true;
16173 bufferCodePoints = arrayFrom(buffer);
16174 for (var i = 0; i < bufferCodePoints.length; i++) {
16175 var codePoint = bufferCodePoints[i];
16176 if (codePoint == ':' && !seenPasswordToken) {
16177 seenPasswordToken = true;
16178 continue;
16179 }
16180 var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
16181 if (seenPasswordToken) url.password += encodedCodePoints;
16182 else url.username += encodedCodePoints;
16183 }
16184 buffer = '';
16185 } else if (
16186 chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
16187 (chr == '\\' && url.isSpecial())
16188 ) {
16189 if (seenAt && buffer == '') return INVALID_AUTHORITY;
16190 pointer -= arrayFrom(buffer).length + 1;
16191 buffer = '';
16192 state = HOST;
16193 } else buffer += chr;
16194 break;
16195
16196 case HOST:
16197 case HOSTNAME:
16198 if (stateOverride && url.scheme == 'file') {
16199 state = FILE_HOST;
16200 continue;
16201 } else if (chr == ':' && !seenBracket) {
16202 if (buffer == '') return INVALID_HOST;
16203 failure = url.parseHost(buffer);
16204 if (failure) return failure;
16205 buffer = '';
16206 state = PORT;
16207 if (stateOverride == HOSTNAME) return;
16208 } else if (
16209 chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
16210 (chr == '\\' && url.isSpecial())
16211 ) {
16212 if (url.isSpecial() && buffer == '') return INVALID_HOST;
16213 if (stateOverride && buffer == '' && (url.includesCredentials() || url.port !== null)) return;
16214 failure = url.parseHost(buffer);
16215 if (failure) return failure;
16216 buffer = '';
16217 state = PATH_START;
16218 if (stateOverride) return;
16219 continue;
16220 } else {
16221 if (chr == '[') seenBracket = true;
16222 else if (chr == ']') seenBracket = false;
16223 buffer += chr;
16224 } break;
16225
16226 case PORT:
16227 if (exec(DIGIT, chr)) {
16228 buffer += chr;
16229 } else if (
16230 chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
16231 (chr == '\\' && url.isSpecial()) ||
16232 stateOverride
16233 ) {
16234 if (buffer != '') {
16235 var port = parseInt(buffer, 10);
16236 if (port > 0xFFFF) return INVALID_PORT;
16237 url.port = (url.isSpecial() && port === specialSchemes[url.scheme]) ? null : port;
16238 buffer = '';
16239 }
16240 if (stateOverride) return;
16241 state = PATH_START;
16242 continue;
16243 } else return INVALID_PORT;
16244 break;
16245
16246 case FILE:
16247 url.scheme = 'file';
16248 if (chr == '/' || chr == '\\') state = FILE_SLASH;
16249 else if (base && base.scheme == 'file') {
16250 if (chr == EOF) {
16251 url.host = base.host;
16252 url.path = arraySlice(base.path);
16253 url.query = base.query;
16254 } else if (chr == '?') {
16255 url.host = base.host;
16256 url.path = arraySlice(base.path);
16257 url.query = '';
16258 state = QUERY;
16259 } else if (chr == '#') {
16260 url.host = base.host;
16261 url.path = arraySlice(base.path);
16262 url.query = base.query;
16263 url.fragment = '';
16264 state = FRAGMENT;
16265 } else {
16266 if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
16267 url.host = base.host;
16268 url.path = arraySlice(base.path);
16269 url.shortenPath();
16270 }
16271 state = PATH;
16272 continue;
16273 }
16274 } else {
16275 state = PATH;
16276 continue;
16277 } break;
16278
16279 case FILE_SLASH:
16280 if (chr == '/' || chr == '\\') {
16281 state = FILE_HOST;
16282 break;
16283 }
16284 if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
16285 if (isWindowsDriveLetter(base.path[0], true)) push(url.path, base.path[0]);
16286 else url.host = base.host;
16287 }
16288 state = PATH;
16289 continue;
16290
16291 case FILE_HOST:
16292 if (chr == EOF || chr == '/' || chr == '\\' || chr == '?' || chr == '#') {
16293 if (!stateOverride && isWindowsDriveLetter(buffer)) {
16294 state = PATH;
16295 } else if (buffer == '') {
16296 url.host = '';
16297 if (stateOverride) return;
16298 state = PATH_START;
16299 } else {
16300 failure = url.parseHost(buffer);
16301 if (failure) return failure;
16302 if (url.host == 'localhost') url.host = '';
16303 if (stateOverride) return;
16304 buffer = '';
16305 state = PATH_START;
16306 } continue;
16307 } else buffer += chr;
16308 break;
16309
16310 case PATH_START:
16311 if (url.isSpecial()) {
16312 state = PATH;
16313 if (chr != '/' && chr != '\\') continue;
16314 } else if (!stateOverride && chr == '?') {
16315 url.query = '';
16316 state = QUERY;
16317 } else if (!stateOverride && chr == '#') {
16318 url.fragment = '';
16319 state = FRAGMENT;
16320 } else if (chr != EOF) {
16321 state = PATH;
16322 if (chr != '/') continue;
16323 } break;
16324
16325 case PATH:
16326 if (
16327 chr == EOF || chr == '/' ||
16328 (chr == '\\' && url.isSpecial()) ||
16329 (!stateOverride && (chr == '?' || chr == '#'))
16330 ) {
16331 if (isDoubleDot(buffer)) {
16332 url.shortenPath();
16333 if (chr != '/' && !(chr == '\\' && url.isSpecial())) {
16334 push(url.path, '');
16335 }
16336 } else if (isSingleDot(buffer)) {
16337 if (chr != '/' && !(chr == '\\' && url.isSpecial())) {
16338 push(url.path, '');
16339 }
16340 } else {
16341 if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
16342 if (url.host) url.host = '';
16343 buffer = charAt(buffer, 0) + ':'; // normalize windows drive letter
16344 }
16345 push(url.path, buffer);
16346 }
16347 buffer = '';
16348 if (url.scheme == 'file' && (chr == EOF || chr == '?' || chr == '#')) {
16349 while (url.path.length > 1 && url.path[0] === '') {
16350 shift(url.path);
16351 }
16352 }
16353 if (chr == '?') {
16354 url.query = '';
16355 state = QUERY;
16356 } else if (chr == '#') {
16357 url.fragment = '';
16358 state = FRAGMENT;
16359 }
16360 } else {
16361 buffer += percentEncode(chr, pathPercentEncodeSet);
16362 } break;
16363
16364 case CANNOT_BE_A_BASE_URL_PATH:
16365 if (chr == '?') {
16366 url.query = '';
16367 state = QUERY;
16368 } else if (chr == '#') {
16369 url.fragment = '';
16370 state = FRAGMENT;
16371 } else if (chr != EOF) {
16372 url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);
16373 } break;
16374
16375 case QUERY:
16376 if (!stateOverride && chr == '#') {
16377 url.fragment = '';
16378 state = FRAGMENT;
16379 } else if (chr != EOF) {
16380 if (chr == "'" && url.isSpecial()) url.query += '%27';
16381 else if (chr == '#') url.query += '%23';
16382 else url.query += percentEncode(chr, C0ControlPercentEncodeSet);
16383 } break;
16384
16385 case FRAGMENT:
16386 if (chr != EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);
16387 break;
16388 }
16389
16390 pointer++;
16391 }
16392 },
16393 // https://url.spec.whatwg.org/#host-parsing
16394 parseHost: function (input) {
16395 var result, codePoints, index;
16396 if (charAt(input, 0) == '[') {
16397 if (charAt(input, input.length - 1) != ']') return INVALID_HOST;
16398 result = parseIPv6(stringSlice(input, 1, -1));
16399 if (!result) return INVALID_HOST;
16400 this.host = result;
16401 // opaque host
16402 } else if (!this.isSpecial()) {
16403 if (exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT, input)) return INVALID_HOST;
16404 result = '';
16405 codePoints = arrayFrom(input);
16406 for (index = 0; index < codePoints.length; index++) {
16407 result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
16408 }
16409 this.host = result;
16410 } else {
16411 input = toASCII(input);
16412 if (exec(FORBIDDEN_HOST_CODE_POINT, input)) return INVALID_HOST;
16413 result = parseIPv4(input);
16414 if (result === null) return INVALID_HOST;
16415 this.host = result;
16416 }
16417 },
16418 // https://url.spec.whatwg.org/#cannot-have-a-username-password-port
16419 cannotHaveUsernamePasswordPort: function () {
16420 return !this.host || this.cannotBeABaseURL || this.scheme == 'file';
16421 },
16422 // https://url.spec.whatwg.org/#include-credentials
16423 includesCredentials: function () {
16424 return this.username != '' || this.password != '';
16425 },
16426 // https://url.spec.whatwg.org/#is-special
16427 isSpecial: function () {
16428 return hasOwn(specialSchemes, this.scheme);
16429 },
16430 // https://url.spec.whatwg.org/#shorten-a-urls-path
16431 shortenPath: function () {
16432 var path = this.path;
16433 var pathSize = path.length;
16434 if (pathSize && (this.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
16435 path.length--;
16436 }
16437 },
16438 // https://url.spec.whatwg.org/#concept-url-serializer
16439 serialize: function () {
16440 var url = this;
16441 var scheme = url.scheme;
16442 var username = url.username;
16443 var password = url.password;
16444 var host = url.host;
16445 var port = url.port;
16446 var path = url.path;
16447 var query = url.query;
16448 var fragment = url.fragment;
16449 var output = scheme + ':';
16450 if (host !== null) {
16451 output += '//';
16452 if (url.includesCredentials()) {
16453 output += username + (password ? ':' + password : '') + '@';
16454 }
16455 output += serializeHost(host);
16456 if (port !== null) output += ':' + port;
16457 } else if (scheme == 'file') output += '//';
16458 output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
16459 if (query !== null) output += '?' + query;
16460 if (fragment !== null) output += '#' + fragment;
16461 return output;
16462 },
16463 // https://url.spec.whatwg.org/#dom-url-href
16464 setHref: function (href) {
16465 var failure = this.parse(href);
16466 if (failure) throw TypeError(failure);
16467 this.searchParams.update();
16468 },
16469 // https://url.spec.whatwg.org/#dom-url-origin
16470 getOrigin: function () {
16471 var scheme = this.scheme;
16472 var port = this.port;
16473 if (scheme == 'blob') try {
16474 return new URLConstructor(scheme.path[0]).origin;
16475 } catch (error) {
16476 return 'null';
16477 }
16478 if (scheme == 'file' || !this.isSpecial()) return 'null';
16479 return scheme + '://' + serializeHost(this.host) + (port !== null ? ':' + port : '');
16480 },
16481 // https://url.spec.whatwg.org/#dom-url-protocol
16482 getProtocol: function () {
16483 return this.scheme + ':';
16484 },
16485 setProtocol: function (protocol) {
16486 this.parse($toString(protocol) + ':', SCHEME_START);
16487 },
16488 // https://url.spec.whatwg.org/#dom-url-username
16489 getUsername: function () {
16490 return this.username;
16491 },
16492 setUsername: function (username) {
16493 var codePoints = arrayFrom($toString(username));
16494 if (this.cannotHaveUsernamePasswordPort()) return;
16495 this.username = '';
16496 for (var i = 0; i < codePoints.length; i++) {
16497 this.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
16498 }
16499 },
16500 // https://url.spec.whatwg.org/#dom-url-password
16501 getPassword: function () {
16502 return this.password;
16503 },
16504 setPassword: function (password) {
16505 var codePoints = arrayFrom($toString(password));
16506 if (this.cannotHaveUsernamePasswordPort()) return;
16507 this.password = '';
16508 for (var i = 0; i < codePoints.length; i++) {
16509 this.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
16510 }
16511 },
16512 // https://url.spec.whatwg.org/#dom-url-host
16513 getHost: function () {
16514 var host = this.host;
16515 var port = this.port;
16516 return host === null ? ''
16517 : port === null ? serializeHost(host)
16518 : serializeHost(host) + ':' + port;
16519 },
16520 setHost: function (host) {
16521 if (this.cannotBeABaseURL) return;
16522 this.parse(host, HOST);
16523 },
16524 // https://url.spec.whatwg.org/#dom-url-hostname
16525 getHostname: function () {
16526 var host = this.host;
16527 return host === null ? '' : serializeHost(host);
16528 },
16529 setHostname: function (hostname) {
16530 if (this.cannotBeABaseURL) return;
16531 this.parse(hostname, HOSTNAME);
16532 },
16533 // https://url.spec.whatwg.org/#dom-url-port
16534 getPort: function () {
16535 var port = this.port;
16536 return port === null ? '' : $toString(port);
16537 },
16538 setPort: function (port) {
16539 if (this.cannotHaveUsernamePasswordPort()) return;
16540 port = $toString(port);
16541 if (port == '') this.port = null;
16542 else this.parse(port, PORT);
16543 },
16544 // https://url.spec.whatwg.org/#dom-url-pathname
16545 getPathname: function () {
16546 var path = this.path;
16547 return this.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
16548 },
16549 setPathname: function (pathname) {
16550 if (this.cannotBeABaseURL) return;
16551 this.path = [];
16552 this.parse(pathname, PATH_START);
16553 },
16554 // https://url.spec.whatwg.org/#dom-url-search
16555 getSearch: function () {
16556 var query = this.query;
16557 return query ? '?' + query : '';
16558 },
16559 setSearch: function (search) {
16560 search = $toString(search);
16561 if (search == '') {
16562 this.query = null;
16563 } else {
16564 if ('?' == charAt(search, 0)) search = stringSlice(search, 1);
16565 this.query = '';
16566 this.parse(search, QUERY);
16567 }
16568 this.searchParams.update();
16569 },
16570 // https://url.spec.whatwg.org/#dom-url-searchparams
16571 getSearchParams: function () {
16572 return this.searchParams.facade;
16573 },
16574 // https://url.spec.whatwg.org/#dom-url-hash
16575 getHash: function () {
16576 var fragment = this.fragment;
16577 return fragment ? '#' + fragment : '';
16578 },
16579 setHash: function (hash) {
16580 hash = $toString(hash);
16581 if (hash == '') {
16582 this.fragment = null;
16583 return;
16584 }
16585 if ('#' == charAt(hash, 0)) hash = stringSlice(hash, 1);
16586 this.fragment = '';
16587 this.parse(hash, FRAGMENT);
16588 },
16589 update: function () {
16590 this.query = this.searchParams.serialize() || null;
16591 }
16592};
16593
16594// `URL` constructor
16595// https://url.spec.whatwg.org/#url-class
16596var URLConstructor = function URL(url /* , base */) {
16597 var that = anInstance(this, URLPrototype);
16598 var base = validateArgumentsLength(arguments.length, 1) > 1 ? arguments[1] : undefined;
16599 var state = setInternalState(that, new URLState(url, false, base));
16600 if (!DESCRIPTORS) {
16601 that.href = state.serialize();
16602 that.origin = state.getOrigin();
16603 that.protocol = state.getProtocol();
16604 that.username = state.getUsername();
16605 that.password = state.getPassword();
16606 that.host = state.getHost();
16607 that.hostname = state.getHostname();
16608 that.port = state.getPort();
16609 that.pathname = state.getPathname();
16610 that.search = state.getSearch();
16611 that.searchParams = state.getSearchParams();
16612 that.hash = state.getHash();
16613 }
16614};
16615
16616var URLPrototype = URLConstructor.prototype;
16617
16618var accessorDescriptor = function (getter, setter) {
16619 return {
16620 get: function () {
16621 return getInternalURLState(this)[getter]();
16622 },
16623 set: setter && function (value) {
16624 return getInternalURLState(this)[setter](value);
16625 },
16626 configurable: true,
16627 enumerable: true
16628 };
16629};
16630
16631if (DESCRIPTORS) {
16632 // `URL.prototype.href` accessors pair
16633 // https://url.spec.whatwg.org/#dom-url-href
16634 defineBuiltInAccessor(URLPrototype, 'href', accessorDescriptor('serialize', 'setHref'));
16635 // `URL.prototype.origin` getter
16636 // https://url.spec.whatwg.org/#dom-url-origin
16637 defineBuiltInAccessor(URLPrototype, 'origin', accessorDescriptor('getOrigin'));
16638 // `URL.prototype.protocol` accessors pair
16639 // https://url.spec.whatwg.org/#dom-url-protocol
16640 defineBuiltInAccessor(URLPrototype, 'protocol', accessorDescriptor('getProtocol', 'setProtocol'));
16641 // `URL.prototype.username` accessors pair
16642 // https://url.spec.whatwg.org/#dom-url-username
16643 defineBuiltInAccessor(URLPrototype, 'username', accessorDescriptor('getUsername', 'setUsername'));
16644 // `URL.prototype.password` accessors pair
16645 // https://url.spec.whatwg.org/#dom-url-password
16646 defineBuiltInAccessor(URLPrototype, 'password', accessorDescriptor('getPassword', 'setPassword'));
16647 // `URL.prototype.host` accessors pair
16648 // https://url.spec.whatwg.org/#dom-url-host
16649 defineBuiltInAccessor(URLPrototype, 'host', accessorDescriptor('getHost', 'setHost'));
16650 // `URL.prototype.hostname` accessors pair
16651 // https://url.spec.whatwg.org/#dom-url-hostname
16652 defineBuiltInAccessor(URLPrototype, 'hostname', accessorDescriptor('getHostname', 'setHostname'));
16653 // `URL.prototype.port` accessors pair
16654 // https://url.spec.whatwg.org/#dom-url-port
16655 defineBuiltInAccessor(URLPrototype, 'port', accessorDescriptor('getPort', 'setPort'));
16656 // `URL.prototype.pathname` accessors pair
16657 // https://url.spec.whatwg.org/#dom-url-pathname
16658 defineBuiltInAccessor(URLPrototype, 'pathname', accessorDescriptor('getPathname', 'setPathname'));
16659 // `URL.prototype.search` accessors pair
16660 // https://url.spec.whatwg.org/#dom-url-search
16661 defineBuiltInAccessor(URLPrototype, 'search', accessorDescriptor('getSearch', 'setSearch'));
16662 // `URL.prototype.searchParams` getter
16663 // https://url.spec.whatwg.org/#dom-url-searchparams
16664 defineBuiltInAccessor(URLPrototype, 'searchParams', accessorDescriptor('getSearchParams'));
16665 // `URL.prototype.hash` accessors pair
16666 // https://url.spec.whatwg.org/#dom-url-hash
16667 defineBuiltInAccessor(URLPrototype, 'hash', accessorDescriptor('getHash', 'setHash'));
16668}
16669
16670// `URL.prototype.toJSON` method
16671// https://url.spec.whatwg.org/#dom-url-tojson
16672defineBuiltIn(URLPrototype, 'toJSON', function toJSON() {
16673 return getInternalURLState(this).serialize();
16674}, { enumerable: true });
16675
16676// `URL.prototype.toString` method
16677// https://url.spec.whatwg.org/#URL-stringification-behavior
16678defineBuiltIn(URLPrototype, 'toString', function toString() {
16679 return getInternalURLState(this).serialize();
16680}, { enumerable: true });
16681
16682if (NativeURL) {
16683 var nativeCreateObjectURL = NativeURL.createObjectURL;
16684 var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
16685 // `URL.createObjectURL` method
16686 // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
16687 if (nativeCreateObjectURL) defineBuiltIn(URLConstructor, 'createObjectURL', bind(nativeCreateObjectURL, NativeURL));
16688 // `URL.revokeObjectURL` method
16689 // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
16690 if (nativeRevokeObjectURL) defineBuiltIn(URLConstructor, 'revokeObjectURL', bind(nativeRevokeObjectURL, NativeURL));
16691}
16692
16693setToStringTag(URLConstructor, 'URL');
16694
16695$({ global: true, constructor: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
16696 URL: URLConstructor
16697});
16698
16699
16700/***/ }),
16701/* 497 */
16702/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
16703
16704var fails = __webpack_require__(7);
16705var wellKnownSymbol = __webpack_require__(35);
16706var IS_PURE = __webpack_require__(37);
16707
16708var ITERATOR = wellKnownSymbol('iterator');
16709
16710module.exports = !fails(function () {
16711 // eslint-disable-next-line unicorn/relative-url-style -- required for testing
16712 var url = new URL('b?a=1&b=2&c=3', 'http://a');
16713 var searchParams = url.searchParams;
16714 var result = '';
16715 url.pathname = 'c%20d';
16716 searchParams.forEach(function (value, key) {
16717 searchParams['delete']('b');
16718 result += key + value;
16719 });
16720 return (IS_PURE && !url.toJSON)
16721 || !searchParams.sort
16722 || url.href !== 'http://a/c%20d?a=1&c=3'
16723 || searchParams.get('c') !== '3'
16724 || String(new URLSearchParams('?a=1')) !== 'a=1'
16725 || !searchParams[ITERATOR]
16726 // throws in Edge
16727 || new URL('https://a@b').username !== 'a'
16728 || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
16729 // not punycoded in Edge
16730 || new URL('http://тест').host !== 'xn--e1aybc'
16731 // not escaped in Chrome 62-
16732 || new URL('http://a#б').hash !== '#%D0%B1'
16733 // fails in Chrome 66-
16734 || result !== 'a1c3'
16735 // throws in Safari
16736 || new URL('http://x', undefined).host !== 'x';
16737});
16738
16739
16740/***/ }),
16741/* 498 */
16742/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
16743
16744"use strict";
16745
16746// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
16747var uncurryThis = __webpack_require__(14);
16748
16749var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
16750var base = 36;
16751var tMin = 1;
16752var tMax = 26;
16753var skew = 38;
16754var damp = 700;
16755var initialBias = 72;
16756var initialN = 128; // 0x80
16757var delimiter = '-'; // '\x2D'
16758var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
16759var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
16760var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
16761var baseMinusTMin = base - tMin;
16762
16763var $RangeError = RangeError;
16764var exec = uncurryThis(regexSeparators.exec);
16765var floor = Math.floor;
16766var fromCharCode = String.fromCharCode;
16767var charCodeAt = uncurryThis(''.charCodeAt);
16768var join = uncurryThis([].join);
16769var push = uncurryThis([].push);
16770var replace = uncurryThis(''.replace);
16771var split = uncurryThis(''.split);
16772var toLowerCase = uncurryThis(''.toLowerCase);
16773
16774/**
16775 * Creates an array containing the numeric code points of each Unicode
16776 * character in the string. While JavaScript uses UCS-2 internally,
16777 * this function will convert a pair of surrogate halves (each of which
16778 * UCS-2 exposes as separate characters) into a single code point,
16779 * matching UTF-16.
16780 */
16781var ucs2decode = function (string) {
16782 var output = [];
16783 var counter = 0;
16784 var length = string.length;
16785 while (counter < length) {
16786 var value = charCodeAt(string, counter++);
16787 if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
16788 // It's a high surrogate, and there is a next character.
16789 var extra = charCodeAt(string, counter++);
16790 if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
16791 push(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
16792 } else {
16793 // It's an unmatched surrogate; only append this code unit, in case the
16794 // next code unit is the high surrogate of a surrogate pair.
16795 push(output, value);
16796 counter--;
16797 }
16798 } else {
16799 push(output, value);
16800 }
16801 }
16802 return output;
16803};
16804
16805/**
16806 * Converts a digit/integer into a basic code point.
16807 */
16808var digitToBasic = function (digit) {
16809 // 0..25 map to ASCII a..z or A..Z
16810 // 26..35 map to ASCII 0..9
16811 return digit + 22 + 75 * (digit < 26);
16812};
16813
16814/**
16815 * Bias adaptation function as per section 3.4 of RFC 3492.
16816 * https://tools.ietf.org/html/rfc3492#section-3.4
16817 */
16818var adapt = function (delta, numPoints, firstTime) {
16819 var k = 0;
16820 delta = firstTime ? floor(delta / damp) : delta >> 1;
16821 delta += floor(delta / numPoints);
16822 while (delta > baseMinusTMin * tMax >> 1) {
16823 delta = floor(delta / baseMinusTMin);
16824 k += base;
16825 }
16826 return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
16827};
16828
16829/**
16830 * Converts a string of Unicode symbols (e.g. a domain name label) to a
16831 * Punycode string of ASCII-only symbols.
16832 */
16833var encode = function (input) {
16834 var output = [];
16835
16836 // Convert the input in UCS-2 to an array of Unicode code points.
16837 input = ucs2decode(input);
16838
16839 // Cache the length.
16840 var inputLength = input.length;
16841
16842 // Initialize the state.
16843 var n = initialN;
16844 var delta = 0;
16845 var bias = initialBias;
16846 var i, currentValue;
16847
16848 // Handle the basic code points.
16849 for (i = 0; i < input.length; i++) {
16850 currentValue = input[i];
16851 if (currentValue < 0x80) {
16852 push(output, fromCharCode(currentValue));
16853 }
16854 }
16855
16856 var basicLength = output.length; // number of basic code points.
16857 var handledCPCount = basicLength; // number of code points that have been handled;
16858
16859 // Finish the basic string with a delimiter unless it's empty.
16860 if (basicLength) {
16861 push(output, delimiter);
16862 }
16863
16864 // Main encoding loop:
16865 while (handledCPCount < inputLength) {
16866 // All non-basic code points < n have been handled already. Find the next larger one:
16867 var m = maxInt;
16868 for (i = 0; i < input.length; i++) {
16869 currentValue = input[i];
16870 if (currentValue >= n && currentValue < m) {
16871 m = currentValue;
16872 }
16873 }
16874
16875 // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
16876 var handledCPCountPlusOne = handledCPCount + 1;
16877 if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
16878 throw $RangeError(OVERFLOW_ERROR);
16879 }
16880
16881 delta += (m - n) * handledCPCountPlusOne;
16882 n = m;
16883
16884 for (i = 0; i < input.length; i++) {
16885 currentValue = input[i];
16886 if (currentValue < n && ++delta > maxInt) {
16887 throw $RangeError(OVERFLOW_ERROR);
16888 }
16889 if (currentValue == n) {
16890 // Represent delta as a generalized variable-length integer.
16891 var q = delta;
16892 var k = base;
16893 while (true) {
16894 var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
16895 if (q < t) break;
16896 var qMinusT = q - t;
16897 var baseMinusT = base - t;
16898 push(output, fromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
16899 q = floor(qMinusT / baseMinusT);
16900 k += base;
16901 }
16902
16903 push(output, fromCharCode(digitToBasic(q)));
16904 bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
16905 delta = 0;
16906 handledCPCount++;
16907 }
16908 }
16909
16910 delta++;
16911 n++;
16912 }
16913 return join(output, '');
16914};
16915
16916module.exports = function (input) {
16917 var encoded = [];
16918 var labels = split(replace(toLowerCase(input), regexSeparators, '\u002E'), '.');
16919 var i, label;
16920 for (i = 0; i < labels.length; i++) {
16921 label = labels[i];
16922 push(encoded, exec(regexNonASCII, label) ? 'xn--' + encode(label) : label);
16923 }
16924 return join(encoded, '.');
16925};
16926
16927
16928/***/ }),
16929/* 499 */
16930/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
16931
16932"use strict";
16933
16934// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
16935__webpack_require__(165);
16936var $ = __webpack_require__(3);
16937var global = __webpack_require__(4);
16938var call = __webpack_require__(8);
16939var uncurryThis = __webpack_require__(14);
16940var DESCRIPTORS = __webpack_require__(6);
16941var USE_NATIVE_URL = __webpack_require__(497);
16942var defineBuiltIn = __webpack_require__(49);
16943var defineBuiltIns = __webpack_require__(198);
16944var setToStringTag = __webpack_require__(84);
16945var createIteratorConstructor = __webpack_require__(167);
16946var InternalStateModule = __webpack_require__(53);
16947var anInstance = __webpack_require__(199);
16948var isCallable = __webpack_require__(22);
16949var hasOwn = __webpack_require__(40);
16950var bind = __webpack_require__(86);
16951var classof = __webpack_require__(71);
16952var anObject = __webpack_require__(48);
16953var isObject = __webpack_require__(21);
16954var $toString = __webpack_require__(70);
16955var create = __webpack_require__(73);
16956var createPropertyDescriptor = __webpack_require__(11);
16957var getIterator = __webpack_require__(131);
16958var getIteratorMethod = __webpack_require__(132);
16959var validateArgumentsLength = __webpack_require__(317);
16960var wellKnownSymbol = __webpack_require__(35);
16961var arraySort = __webpack_require__(185);
16962
16963var ITERATOR = wellKnownSymbol('iterator');
16964var URL_SEARCH_PARAMS = 'URLSearchParams';
16965var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
16966var setInternalState = InternalStateModule.set;
16967var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
16968var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
16969// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
16970var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
16971
16972// Avoid NodeJS experimental warning
16973var safeGetBuiltIn = function (name) {
16974 if (!DESCRIPTORS) return global[name];
16975 var descriptor = getOwnPropertyDescriptor(global, name);
16976 return descriptor && descriptor.value;
16977};
16978
16979var nativeFetch = safeGetBuiltIn('fetch');
16980var NativeRequest = safeGetBuiltIn('Request');
16981var Headers = safeGetBuiltIn('Headers');
16982var RequestPrototype = NativeRequest && NativeRequest.prototype;
16983var HeadersPrototype = Headers && Headers.prototype;
16984var RegExp = global.RegExp;
16985var TypeError = global.TypeError;
16986var decodeURIComponent = global.decodeURIComponent;
16987var encodeURIComponent = global.encodeURIComponent;
16988var charAt = uncurryThis(''.charAt);
16989var join = uncurryThis([].join);
16990var push = uncurryThis([].push);
16991var replace = uncurryThis(''.replace);
16992var shift = uncurryThis([].shift);
16993var splice = uncurryThis([].splice);
16994var split = uncurryThis(''.split);
16995var stringSlice = uncurryThis(''.slice);
16996
16997var plus = /\+/g;
16998var sequences = Array(4);
16999
17000var percentSequence = function (bytes) {
17001 return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
17002};
17003
17004var percentDecode = function (sequence) {
17005 try {
17006 return decodeURIComponent(sequence);
17007 } catch (error) {
17008 return sequence;
17009 }
17010};
17011
17012var deserialize = function (it) {
17013 var result = replace(it, plus, ' ');
17014 var bytes = 4;
17015 try {
17016 return decodeURIComponent(result);
17017 } catch (error) {
17018 while (bytes) {
17019 result = replace(result, percentSequence(bytes--), percentDecode);
17020 }
17021 return result;
17022 }
17023};
17024
17025var find = /[!'()~]|%20/g;
17026
17027var replacements = {
17028 '!': '%21',
17029 "'": '%27',
17030 '(': '%28',
17031 ')': '%29',
17032 '~': '%7E',
17033 '%20': '+'
17034};
17035
17036var replacer = function (match) {
17037 return replacements[match];
17038};
17039
17040var serialize = function (it) {
17041 return replace(encodeURIComponent(it), find, replacer);
17042};
17043
17044var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
17045 setInternalState(this, {
17046 type: URL_SEARCH_PARAMS_ITERATOR,
17047 iterator: getIterator(getInternalParamsState(params).entries),
17048 kind: kind
17049 });
17050}, 'Iterator', function next() {
17051 var state = getInternalIteratorState(this);
17052 var kind = state.kind;
17053 var step = state.iterator.next();
17054 var entry = step.value;
17055 if (!step.done) {
17056 step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
17057 } return step;
17058}, true);
17059
17060var URLSearchParamsState = function (init) {
17061 this.entries = [];
17062 this.url = null;
17063
17064 if (init !== undefined) {
17065 if (isObject(init)) this.parseObject(init);
17066 else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init));
17067 }
17068};
17069
17070URLSearchParamsState.prototype = {
17071 type: URL_SEARCH_PARAMS,
17072 bindURL: function (url) {
17073 this.url = url;
17074 this.update();
17075 },
17076 parseObject: function (object) {
17077 var iteratorMethod = getIteratorMethod(object);
17078 var iterator, next, step, entryIterator, entryNext, first, second;
17079
17080 if (iteratorMethod) {
17081 iterator = getIterator(object, iteratorMethod);
17082 next = iterator.next;
17083 while (!(step = call(next, iterator)).done) {
17084 entryIterator = getIterator(anObject(step.value));
17085 entryNext = entryIterator.next;
17086 if (
17087 (first = call(entryNext, entryIterator)).done ||
17088 (second = call(entryNext, entryIterator)).done ||
17089 !call(entryNext, entryIterator).done
17090 ) throw TypeError('Expected sequence with length 2');
17091 push(this.entries, { key: $toString(first.value), value: $toString(second.value) });
17092 }
17093 } else for (var key in object) if (hasOwn(object, key)) {
17094 push(this.entries, { key: key, value: $toString(object[key]) });
17095 }
17096 },
17097 parseQuery: function (query) {
17098 if (query) {
17099 var attributes = split(query, '&');
17100 var index = 0;
17101 var attribute, entry;
17102 while (index < attributes.length) {
17103 attribute = attributes[index++];
17104 if (attribute.length) {
17105 entry = split(attribute, '=');
17106 push(this.entries, {
17107 key: deserialize(shift(entry)),
17108 value: deserialize(join(entry, '='))
17109 });
17110 }
17111 }
17112 }
17113 },
17114 serialize: function () {
17115 var entries = this.entries;
17116 var result = [];
17117 var index = 0;
17118 var entry;
17119 while (index < entries.length) {
17120 entry = entries[index++];
17121 push(result, serialize(entry.key) + '=' + serialize(entry.value));
17122 } return join(result, '&');
17123 },
17124 update: function () {
17125 this.entries.length = 0;
17126 this.parseQuery(this.url.query);
17127 },
17128 updateURL: function () {
17129 if (this.url) this.url.update();
17130 }
17131};
17132
17133// `URLSearchParams` constructor
17134// https://url.spec.whatwg.org/#interface-urlsearchparams
17135var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
17136 anInstance(this, URLSearchParamsPrototype);
17137 var init = arguments.length > 0 ? arguments[0] : undefined;
17138 setInternalState(this, new URLSearchParamsState(init));
17139};
17140
17141var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
17142
17143defineBuiltIns(URLSearchParamsPrototype, {
17144 // `URLSearchParams.prototype.append` method
17145 // https://url.spec.whatwg.org/#dom-urlsearchparams-append
17146 append: function append(name, value) {
17147 validateArgumentsLength(arguments.length, 2);
17148 var state = getInternalParamsState(this);
17149 push(state.entries, { key: $toString(name), value: $toString(value) });
17150 state.updateURL();
17151 },
17152 // `URLSearchParams.prototype.delete` method
17153 // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
17154 'delete': function (name) {
17155 validateArgumentsLength(arguments.length, 1);
17156 var state = getInternalParamsState(this);
17157 var entries = state.entries;
17158 var key = $toString(name);
17159 var index = 0;
17160 while (index < entries.length) {
17161 if (entries[index].key === key) splice(entries, index, 1);
17162 else index++;
17163 }
17164 state.updateURL();
17165 },
17166 // `URLSearchParams.prototype.get` method
17167 // https://url.spec.whatwg.org/#dom-urlsearchparams-get
17168 get: function get(name) {
17169 validateArgumentsLength(arguments.length, 1);
17170 var entries = getInternalParamsState(this).entries;
17171 var key = $toString(name);
17172 var index = 0;
17173 for (; index < entries.length; index++) {
17174 if (entries[index].key === key) return entries[index].value;
17175 }
17176 return null;
17177 },
17178 // `URLSearchParams.prototype.getAll` method
17179 // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
17180 getAll: function getAll(name) {
17181 validateArgumentsLength(arguments.length, 1);
17182 var entries = getInternalParamsState(this).entries;
17183 var key = $toString(name);
17184 var result = [];
17185 var index = 0;
17186 for (; index < entries.length; index++) {
17187 if (entries[index].key === key) push(result, entries[index].value);
17188 }
17189 return result;
17190 },
17191 // `URLSearchParams.prototype.has` method
17192 // https://url.spec.whatwg.org/#dom-urlsearchparams-has
17193 has: function has(name) {
17194 validateArgumentsLength(arguments.length, 1);
17195 var entries = getInternalParamsState(this).entries;
17196 var key = $toString(name);
17197 var index = 0;
17198 while (index < entries.length) {
17199 if (entries[index++].key === key) return true;
17200 }
17201 return false;
17202 },
17203 // `URLSearchParams.prototype.set` method
17204 // https://url.spec.whatwg.org/#dom-urlsearchparams-set
17205 set: function set(name, value) {
17206 validateArgumentsLength(arguments.length, 1);
17207 var state = getInternalParamsState(this);
17208 var entries = state.entries;
17209 var found = false;
17210 var key = $toString(name);
17211 var val = $toString(value);
17212 var index = 0;
17213 var entry;
17214 for (; index < entries.length; index++) {
17215 entry = entries[index];
17216 if (entry.key === key) {
17217 if (found) splice(entries, index--, 1);
17218 else {
17219 found = true;
17220 entry.value = val;
17221 }
17222 }
17223 }
17224 if (!found) push(entries, { key: key, value: val });
17225 state.updateURL();
17226 },
17227 // `URLSearchParams.prototype.sort` method
17228 // https://url.spec.whatwg.org/#dom-urlsearchparams-sort
17229 sort: function sort() {
17230 var state = getInternalParamsState(this);
17231 arraySort(state.entries, function (a, b) {
17232 return a.key > b.key ? 1 : -1;
17233 });
17234 state.updateURL();
17235 },
17236 // `URLSearchParams.prototype.forEach` method
17237 forEach: function forEach(callback /* , thisArg */) {
17238 var entries = getInternalParamsState(this).entries;
17239 var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined);
17240 var index = 0;
17241 var entry;
17242 while (index < entries.length) {
17243 entry = entries[index++];
17244 boundFunction(entry.value, entry.key, this);
17245 }
17246 },
17247 // `URLSearchParams.prototype.keys` method
17248 keys: function keys() {
17249 return new URLSearchParamsIterator(this, 'keys');
17250 },
17251 // `URLSearchParams.prototype.values` method
17252 values: function values() {
17253 return new URLSearchParamsIterator(this, 'values');
17254 },
17255 // `URLSearchParams.prototype.entries` method
17256 entries: function entries() {
17257 return new URLSearchParamsIterator(this, 'entries');
17258 }
17259}, { enumerable: true });
17260
17261// `URLSearchParams.prototype[@@iterator]` method
17262defineBuiltIn(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });
17263
17264// `URLSearchParams.prototype.toString` method
17265// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
17266defineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() {
17267 return getInternalParamsState(this).serialize();
17268}, { enumerable: true });
17269
17270setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
17271
17272$({ global: true, constructor: true, forced: !USE_NATIVE_URL }, {
17273 URLSearchParams: URLSearchParamsConstructor
17274});
17275
17276// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`
17277if (!USE_NATIVE_URL && isCallable(Headers)) {
17278 var headersHas = uncurryThis(HeadersPrototype.has);
17279 var headersSet = uncurryThis(HeadersPrototype.set);
17280
17281 var wrapRequestOptions = function (init) {
17282 if (isObject(init)) {
17283 var body = init.body;
17284 var headers;
17285 if (classof(body) === URL_SEARCH_PARAMS) {
17286 headers = init.headers ? new Headers(init.headers) : new Headers();
17287 if (!headersHas(headers, 'content-type')) {
17288 headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
17289 }
17290 return create(init, {
17291 body: createPropertyDescriptor(0, $toString(body)),
17292 headers: createPropertyDescriptor(0, headers)
17293 });
17294 }
17295 } return init;
17296 };
17297
17298 if (isCallable(nativeFetch)) {
17299 $({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, {
17300 fetch: function fetch(input /* , init */) {
17301 return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
17302 }
17303 });
17304 }
17305
17306 if (isCallable(NativeRequest)) {
17307 var RequestConstructor = function Request(input /* , init */) {
17308 anInstance(this, RequestPrototype);
17309 return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
17310 };
17311
17312 RequestPrototype.constructor = RequestConstructor;
17313 RequestConstructor.prototype = RequestPrototype;
17314
17315 $({ global: true, constructor: true, dontCallGetSet: true, forced: true }, {
17316 Request: RequestConstructor
17317 });
17318 }
17319}
17320
17321module.exports = {
17322 URLSearchParams: URLSearchParamsConstructor,
17323 getState: getInternalParamsState
17324};
17325
17326
17327/***/ }),
17328/* 500 */
17329/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
17330
17331"use strict";
17332
17333var $ = __webpack_require__(3);
17334var call = __webpack_require__(8);
17335
17336// `URL.prototype.toJSON` method
17337// https://url.spec.whatwg.org/#dom-url-tojson
17338$({ target: 'URL', proto: true, enumerable: true }, {
17339 toJSON: function toJSON() {
17340 return call(URL.prototype.toString, this);
17341 }
17342});
17343
17344
17345/***/ }),
17346/* 501 */
17347/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
17348
17349// TODO: Remove this module from `core-js@4` since it's replaced to module below
17350__webpack_require__(499);
17351
17352
17353/***/ }),
17354/* 502 */
17355/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
17356
17357"use strict";
17358// ESM COMPAT FLAG
17359__webpack_require__.r(__webpack_exports__);
17360
17361// EXPORTS
17362__webpack_require__.d(__webpack_exports__, {
17363 "bb": function() { return /* reexport */ bb; },
17364 "default": function() { return /* reexport */ bb; }
17365});
17366
17367// NAMESPACE OBJECT: ./src/config/resolver/shape.ts
17368var resolver_shape_namespaceObject = {};
17369__webpack_require__.r(resolver_shape_namespaceObject);
17370__webpack_require__.d(resolver_shape_namespaceObject, {
17371 "area": function() { return _area; },
17372 "areaLineRange": function() { return areaLineRange; },
17373 "areaSpline": function() { return areaSpline; },
17374 "areaSplineRange": function() { return areaSplineRange; },
17375 "areaStep": function() { return areaStep; },
17376 "bar": function() { return resolver_shape_bar; },
17377 "bubble": function() { return resolver_shape_bubble; },
17378 "candlestick": function() { return resolver_shape_candlestick; },
17379 "donut": function() { return shape_donut; },
17380 "gauge": function() { return resolver_shape_gauge; },
17381 "line": function() { return resolver_shape_line; },
17382 "pie": function() { return resolver_shape_pie; },
17383 "polar": function() { return resolver_shape_polar; },
17384 "radar": function() { return resolver_shape_radar; },
17385 "scatter": function() { return shape_scatter; },
17386 "spline": function() { return shape_spline; },
17387 "step": function() { return shape_step; }
17388});
17389
17390// NAMESPACE OBJECT: ./src/config/resolver/interaction.ts
17391var resolver_interaction_namespaceObject = {};
17392__webpack_require__.r(resolver_interaction_namespaceObject);
17393__webpack_require__.d(resolver_interaction_namespaceObject, {
17394 "selection": function() { return _selectionModule; },
17395 "subchart": function() { return subchartModule; },
17396 "zoom": function() { return zoomModule; }
17397});
17398
17399;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/newArrowCheck.js
17400function _newArrowCheck(innerThis, boundThis) {
17401 if (innerThis !== boundThis) {
17402 throw new TypeError("Cannot instantiate an arrow function");
17403 }
17404}
17405;// CONCATENATED MODULE: ./node_modules/d3-time/src/interval.js
17406var t0 = new Date(),
17407 t1 = new Date();
17408function newInterval(floori, offseti, count, field) {
17409 function interval(date) {
17410 return floori(date = arguments.length === 0 ? new Date() : new Date(+date)), date;
17411 }
17412 interval.floor = function (date) {
17413 return floori(date = new Date(+date)), date;
17414 };
17415 interval.ceil = function (date) {
17416 return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
17417 };
17418 interval.round = function (date) {
17419 var d0 = interval(date),
17420 d1 = interval.ceil(date);
17421 return date - d0 < d1 - date ? d0 : d1;
17422 };
17423 interval.offset = function (date, step) {
17424 return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;
17425 };
17426 interval.range = function (start, stop, step) {
17427 var range = [],
17428 previous;
17429 start = interval.ceil(start);
17430 step = step == null ? 1 : Math.floor(step);
17431 if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date
17432 do {
17433 range.push(previous = new Date(+start)), offseti(start, step), floori(start);
17434 } while (previous < start && start < stop);
17435 return range;
17436 };
17437 interval.filter = function (test) {
17438 return newInterval(function (date) {
17439 if (date >= date) while (floori(date), !test(date)) {
17440 date.setTime(date - 1);
17441 }
17442 }, function (date, step) {
17443 if (date >= date) {
17444 if (step < 0) while (++step <= 0) {
17445 while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty
17446 } else while (--step >= 0) {
17447 while (offseti(date, 1), !test(date)) {} // eslint-disable-line no-empty
17448 }
17449 }
17450 });
17451 };
17452
17453 if (count) {
17454 interval.count = function (start, end) {
17455 t0.setTime(+start), t1.setTime(+end);
17456 floori(t0), floori(t1);
17457 return Math.floor(count(t0, t1));
17458 };
17459 interval.every = function (step) {
17460 step = Math.floor(step);
17461 return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function (d) {
17462 return field(d) % step === 0;
17463 } : function (d) {
17464 return interval.count(0, d) % step === 0;
17465 });
17466 };
17467 }
17468 return interval;
17469}
17470;// CONCATENATED MODULE: ./node_modules/d3-time/src/duration.js
17471var durationSecond = 1e3;
17472var durationMinute = 60000;
17473var durationHour = 3600000;
17474var durationDay = 86400000;
17475var durationWeek = 604800000;
17476var durationMonth = 2592000000;
17477var durationYear = 31536000000;
17478;// CONCATENATED MODULE: ./node_modules/d3-time/src/utcWeek.js
17479
17480
17481function utcWeekday(i) {
17482 return newInterval(function (date) {
17483 date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);
17484 date.setUTCHours(0, 0, 0, 0);
17485 }, function (date, step) {
17486 date.setUTCDate(date.getUTCDate() + step * 7);
17487 }, function (start, end) {
17488 return (end - start) / durationWeek;
17489 });
17490}
17491var utcSunday = utcWeekday(0);
17492var utcMonday = utcWeekday(1);
17493var utcTuesday = utcWeekday(2);
17494var utcWednesday = utcWeekday(3);
17495var utcThursday = utcWeekday(4);
17496var utcFriday = utcWeekday(5);
17497var utcSaturday = utcWeekday(6);
17498var utcSundays = utcSunday.range;
17499var utcMondays = utcMonday.range;
17500var utcTuesdays = utcTuesday.range;
17501var utcWednesdays = utcWednesday.range;
17502var utcThursdays = utcThursday.range;
17503var utcFridays = utcFriday.range;
17504var utcSaturdays = utcSaturday.range;
17505;// CONCATENATED MODULE: ./node_modules/d3-time/src/utcDay.js
17506
17507
17508var utcDay = newInterval(function (date) {
17509 date.setUTCHours(0, 0, 0, 0);
17510}, function (date, step) {
17511 date.setUTCDate(date.getUTCDate() + step);
17512}, function (start, end) {
17513 return (end - start) / durationDay;
17514}, function (date) {
17515 return date.getUTCDate() - 1;
17516});
17517/* harmony default export */ var src_utcDay = (utcDay);
17518var utcDays = utcDay.range;
17519;// CONCATENATED MODULE: ./node_modules/d3-time/src/week.js
17520
17521
17522function weekday(i) {
17523 return newInterval(function (date) {
17524 date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);
17525 date.setHours(0, 0, 0, 0);
17526 }, function (date, step) {
17527 date.setDate(date.getDate() + step * 7);
17528 }, function (start, end) {
17529 return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;
17530 });
17531}
17532var sunday = weekday(0);
17533var monday = weekday(1);
17534var tuesday = weekday(2);
17535var wednesday = weekday(3);
17536var thursday = weekday(4);
17537var friday = weekday(5);
17538var saturday = weekday(6);
17539var sundays = sunday.range;
17540var mondays = monday.range;
17541var tuesdays = tuesday.range;
17542var wednesdays = wednesday.range;
17543var thursdays = thursday.range;
17544var fridays = friday.range;
17545var saturdays = saturday.range;
17546;// CONCATENATED MODULE: ./node_modules/d3-time/src/day.js
17547
17548var _this = undefined;
17549
17550
17551var day = newInterval(function (date) {
17552 _newArrowCheck(this, _this);
17553 return date.setHours(0, 0, 0, 0);
17554}.bind(undefined), function (date, step) {
17555 _newArrowCheck(this, _this);
17556 return date.setDate(date.getDate() + step);
17557}.bind(undefined), function (start, end) {
17558 _newArrowCheck(this, _this);
17559 return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;
17560}.bind(undefined), function (date) {
17561 _newArrowCheck(this, _this);
17562 return date.getDate() - 1;
17563}.bind(undefined));
17564/* harmony default export */ var src_day = (day);
17565var days = day.range;
17566;// CONCATENATED MODULE: ./node_modules/d3-time/src/year.js
17567
17568var year = newInterval(function (date) {
17569 date.setMonth(0, 1);
17570 date.setHours(0, 0, 0, 0);
17571}, function (date, step) {
17572 date.setFullYear(date.getFullYear() + step);
17573}, function (start, end) {
17574 return end.getFullYear() - start.getFullYear();
17575}, function (date) {
17576 return date.getFullYear();
17577});
17578
17579// An optimized implementation for this simple case.
17580year.every = function (k) {
17581 return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function (date) {
17582 date.setFullYear(Math.floor(date.getFullYear() / k) * k);
17583 date.setMonth(0, 1);
17584 date.setHours(0, 0, 0, 0);
17585 }, function (date, step) {
17586 date.setFullYear(date.getFullYear() + step * k);
17587 });
17588};
17589/* harmony default export */ var src_year = (year);
17590var years = year.range;
17591;// CONCATENATED MODULE: ./node_modules/d3-time/src/utcYear.js
17592
17593var utcYear = newInterval(function (date) {
17594 date.setUTCMonth(0, 1);
17595 date.setUTCHours(0, 0, 0, 0);
17596}, function (date, step) {
17597 date.setUTCFullYear(date.getUTCFullYear() + step);
17598}, function (start, end) {
17599 return end.getUTCFullYear() - start.getUTCFullYear();
17600}, function (date) {
17601 return date.getUTCFullYear();
17602});
17603
17604// An optimized implementation for this simple case.
17605utcYear.every = function (k) {
17606 return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function (date) {
17607 date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);
17608 date.setUTCMonth(0, 1);
17609 date.setUTCHours(0, 0, 0, 0);
17610 }, function (date, step) {
17611 date.setUTCFullYear(date.getUTCFullYear() + step * k);
17612 });
17613};
17614/* harmony default export */ var src_utcYear = (utcYear);
17615var utcYears = utcYear.range;
17616;// CONCATENATED MODULE: ./node_modules/d3-time-format/src/locale.js
17617
17618
17619function localDate(d) {
17620 if (0 <= d.y && d.y < 100) {
17621 var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
17622 date.setFullYear(d.y);
17623 return date;
17624 }
17625 return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
17626}
17627function utcDate(d) {
17628 if (0 <= d.y && d.y < 100) {
17629 var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
17630 date.setUTCFullYear(d.y);
17631 return date;
17632 }
17633 return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
17634}
17635function newDate(y, m, d) {
17636 return {
17637 y: y,
17638 m: m,
17639 d: d,
17640 H: 0,
17641 M: 0,
17642 S: 0,
17643 L: 0
17644 };
17645}
17646function formatLocale(locale) {
17647 var locale_dateTime = locale.dateTime,
17648 locale_date = locale.date,
17649 locale_time = locale.time,
17650 locale_periods = locale.periods,
17651 locale_weekdays = locale.days,
17652 locale_shortWeekdays = locale.shortDays,
17653 locale_months = locale.months,
17654 locale_shortMonths = locale.shortMonths,
17655 periodRe = formatRe(locale_periods),
17656 periodLookup = formatLookup(locale_periods),
17657 weekdayRe = formatRe(locale_weekdays),
17658 weekdayLookup = formatLookup(locale_weekdays),
17659 shortWeekdayRe = formatRe(locale_shortWeekdays),
17660 shortWeekdayLookup = formatLookup(locale_shortWeekdays),
17661 monthRe = formatRe(locale_months),
17662 monthLookup = formatLookup(locale_months),
17663 shortMonthRe = formatRe(locale_shortMonths),
17664 shortMonthLookup = formatLookup(locale_shortMonths),
17665 formats = {
17666 "a": function (d) {
17667 return locale_shortWeekdays[d.getDay()];
17668 },
17669 "A": function (d) {
17670 return locale_weekdays[d.getDay()];
17671 },
17672 "b": function (d) {
17673 return locale_shortMonths[d.getMonth()];
17674 },
17675 "B": function (d) {
17676 return locale_months[d.getMonth()];
17677 },
17678 "c": null,
17679 "d": formatDayOfMonth,
17680 "e": formatDayOfMonth,
17681 "f": formatMicroseconds,
17682 "g": formatYearISO,
17683 "G": formatFullYearISO,
17684 "H": formatHour24,
17685 "I": formatHour12,
17686 "j": formatDayOfYear,
17687 "L": formatMilliseconds,
17688 "m": formatMonthNumber,
17689 "M": formatMinutes,
17690 "p": function (d) {
17691 return locale_periods[+(d.getHours() >= 12)];
17692 },
17693 "q": function (d) {
17694 return 1 + ~~(d.getMonth() / 3);
17695 },
17696 "Q": formatUnixTimestamp,
17697 "s": formatUnixTimestampSeconds,
17698 "S": formatSeconds,
17699 "u": formatWeekdayNumberMonday,
17700 "U": formatWeekNumberSunday,
17701 "V": formatWeekNumberISO,
17702 "w": formatWeekdayNumberSunday,
17703 "W": formatWeekNumberMonday,
17704 "x": null,
17705 "X": null,
17706 "y": formatYear,
17707 "Y": formatFullYear,
17708 "Z": formatZone,
17709 "%": formatLiteralPercent
17710 },
17711 utcFormats = {
17712 "a": function (d) {
17713 return locale_shortWeekdays[d.getUTCDay()];
17714 },
17715 "A": function (d) {
17716 return locale_weekdays[d.getUTCDay()];
17717 },
17718 "b": function (d) {
17719 return locale_shortMonths[d.getUTCMonth()];
17720 },
17721 "B": function (d) {
17722 return locale_months[d.getUTCMonth()];
17723 },
17724 "c": null,
17725 "d": formatUTCDayOfMonth,
17726 "e": formatUTCDayOfMonth,
17727 "f": formatUTCMicroseconds,
17728 "g": formatUTCYearISO,
17729 "G": formatUTCFullYearISO,
17730 "H": formatUTCHour24,
17731 "I": formatUTCHour12,
17732 "j": formatUTCDayOfYear,
17733 "L": formatUTCMilliseconds,
17734 "m": formatUTCMonthNumber,
17735 "M": formatUTCMinutes,
17736 "p": function (d) {
17737 return locale_periods[+(d.getUTCHours() >= 12)];
17738 },
17739 "q": function (d) {
17740 return 1 + ~~(d.getUTCMonth() / 3);
17741 },
17742 "Q": formatUnixTimestamp,
17743 "s": formatUnixTimestampSeconds,
17744 "S": formatUTCSeconds,
17745 "u": formatUTCWeekdayNumberMonday,
17746 "U": formatUTCWeekNumberSunday,
17747 "V": formatUTCWeekNumberISO,
17748 "w": formatUTCWeekdayNumberSunday,
17749 "W": formatUTCWeekNumberMonday,
17750 "x": null,
17751 "X": null,
17752 "y": formatUTCYear,
17753 "Y": formatUTCFullYear,
17754 "Z": formatUTCZone,
17755 "%": formatLiteralPercent
17756 },
17757 parses = {
17758 "a": function (d, string, i) {
17759 var n = shortWeekdayRe.exec(string.slice(i));
17760 return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
17761 },
17762 "A": function (d, string, i) {
17763 var n = weekdayRe.exec(string.slice(i));
17764 return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
17765 },
17766 "b": function (d, string, i) {
17767 var n = shortMonthRe.exec(string.slice(i));
17768 return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
17769 },
17770 "B": function (d, string, i) {
17771 var n = monthRe.exec(string.slice(i));
17772 return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
17773 },
17774 "c": function (d, string, i) {
17775 return parseSpecifier(d, locale_dateTime, string, i);
17776 },
17777 "d": parseDayOfMonth,
17778 "e": parseDayOfMonth,
17779 "f": parseMicroseconds,
17780 "g": parseYear,
17781 "G": parseFullYear,
17782 "H": parseHour24,
17783 "I": parseHour24,
17784 "j": parseDayOfYear,
17785 "L": parseMilliseconds,
17786 "m": parseMonthNumber,
17787 "M": parseMinutes,
17788 "p": function (d, string, i) {
17789 var n = periodRe.exec(string.slice(i));
17790 return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
17791 },
17792 "q": parseQuarter,
17793 "Q": parseUnixTimestamp,
17794 "s": parseUnixTimestampSeconds,
17795 "S": parseSeconds,
17796 "u": parseWeekdayNumberMonday,
17797 "U": parseWeekNumberSunday,
17798 "V": parseWeekNumberISO,
17799 "w": parseWeekdayNumberSunday,
17800 "W": parseWeekNumberMonday,
17801 "x": function (d, string, i) {
17802 return parseSpecifier(d, locale_date, string, i);
17803 },
17804 "X": function (d, string, i) {
17805 return parseSpecifier(d, locale_time, string, i);
17806 },
17807 "y": parseYear,
17808 "Y": parseFullYear,
17809 "Z": parseZone,
17810 "%": parseLiteralPercent
17811 };
17812 // These recursive directive definitions must be deferred.
17813 formats.x = newFormat(locale_date, formats);
17814 formats.X = newFormat(locale_time, formats);
17815 formats.c = newFormat(locale_dateTime, formats);
17816 utcFormats.x = newFormat(locale_date, utcFormats);
17817 utcFormats.X = newFormat(locale_time, utcFormats);
17818 utcFormats.c = newFormat(locale_dateTime, utcFormats);
17819 function newFormat(specifier, formats) {
17820 return function (date) {
17821 var string = [],
17822 i = -1,
17823 j = 0,
17824 n = specifier.length,
17825 c,
17826 pad,
17827 format;
17828 if (!(date instanceof Date)) date = new Date(+date);
17829 while (++i < n) {
17830 if (specifier.charCodeAt(i) === 37) {
17831 string.push(specifier.slice(j, i));
17832 if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);else pad = c === "e" ? " " : "0";
17833 if (format = formats[c]) c = format(date, pad);
17834 string.push(c);
17835 j = i + 1;
17836 }
17837 }
17838 string.push(specifier.slice(j, i));
17839 return string.join("");
17840 };
17841 }
17842 function newParse(specifier, Z) {
17843 return function (string) {
17844 var d = newDate(1900, undefined, 1),
17845 i = parseSpecifier(d, specifier, string += "", 0),
17846 week,
17847 day;
17848 if (i != string.length) return null;
17849
17850 // If a UNIX timestamp is specified, return it.
17851 if ("Q" in d) return new Date(d.Q);
17852 if ("s" in d) return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
17853
17854 // If this is utcParse, never use the local timezone.
17855 if (Z && !("Z" in d)) d.Z = 0;
17856
17857 // The am-pm flag is 0 for AM, and 1 for PM.
17858 if ("p" in d) d.H = d.H % 12 + d.p * 12;
17859
17860 // If the month was not specified, inherit from the quarter.
17861 if (d.m === undefined) d.m = "q" in d ? d.q : 0;
17862
17863 // Convert day-of-week and week-of-year to day-of-year.
17864 if ("V" in d) {
17865 if (d.V < 1 || d.V > 53) return null;
17866 if (!("w" in d)) d.w = 1;
17867 if ("Z" in d) {
17868 week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();
17869 week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);
17870 week = src_utcDay.offset(week, (d.V - 1) * 7);
17871 d.y = week.getUTCFullYear();
17872 d.m = week.getUTCMonth();
17873 d.d = week.getUTCDate() + (d.w + 6) % 7;
17874 } else {
17875 week = localDate(newDate(d.y, 0, 1)), day = week.getDay();
17876 week = day > 4 || day === 0 ? monday.ceil(week) : monday(week);
17877 week = src_day.offset(week, (d.V - 1) * 7);
17878 d.y = week.getFullYear();
17879 d.m = week.getMonth();
17880 d.d = week.getDate() + (d.w + 6) % 7;
17881 }
17882 } else if ("W" in d || "U" in d) {
17883 if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
17884 day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
17885 d.m = 0;
17886 d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
17887 }
17888
17889 // If a time zone is specified, all fields are interpreted as UTC and then
17890 // offset according to the specified time zone.
17891 if ("Z" in d) {
17892 d.H += d.Z / 100 | 0;
17893 d.M += d.Z % 100;
17894 return utcDate(d);
17895 }
17896
17897 // Otherwise, all fields are in local time.
17898 return localDate(d);
17899 };
17900 }
17901 function parseSpecifier(d, specifier, string, j) {
17902 var i = 0,
17903 n = specifier.length,
17904 m = string.length,
17905 c,
17906 parse;
17907 while (i < n) {
17908 if (j >= m) return -1;
17909 c = specifier.charCodeAt(i++);
17910 if (c === 37) {
17911 c = specifier.charAt(i++);
17912 parse = parses[c in pads ? specifier.charAt(i++) : c];
17913 if (!parse || (j = parse(d, string, j)) < 0) return -1;
17914 } else if (c != string.charCodeAt(j++)) {
17915 return -1;
17916 }
17917 }
17918 return j;
17919 }
17920 return {
17921 format: function format(specifier) {
17922 var f = newFormat(specifier += "", formats);
17923 f.toString = function () {
17924 return specifier;
17925 };
17926 return f;
17927 },
17928 parse: function parse(specifier) {
17929 var p = newParse(specifier += "", !1);
17930 p.toString = function () {
17931 return specifier;
17932 };
17933 return p;
17934 },
17935 utcFormat: function utcFormat(specifier) {
17936 var f = newFormat(specifier += "", utcFormats);
17937 f.toString = function () {
17938 return specifier;
17939 };
17940 return f;
17941 },
17942 utcParse: function utcParse(specifier) {
17943 var p = newParse(specifier += "", !0);
17944 p.toString = function () {
17945 return specifier;
17946 };
17947 return p;
17948 }
17949 };
17950}
17951var pads = {
17952 "-": "",
17953 "_": " ",
17954 "0": "0"
17955 },
17956 numberRe = /^\s*\d+/,
17957 // note: ignores next directive
17958 percentRe = /^%/,
17959 requoteRe = /[\\^$*+?|[\]().{}]/g;
17960function pad(value, fill, width) {
17961 var sign = value < 0 ? "-" : "",
17962 string = (sign ? -value : value) + "",
17963 length = string.length;
17964 return sign + (length < width ? Array(width - length + 1).join(fill) + string : string);
17965}
17966function requote(s) {
17967 return s.replace(requoteRe, "\\$&");
17968}
17969function formatRe(names) {
17970 return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
17971}
17972function formatLookup(names) {
17973 var _this = this;
17974 return new Map(names.map(function (name, i) {
17975 _newArrowCheck(this, _this);
17976 return [name.toLowerCase(), i];
17977 }.bind(this)));
17978}
17979function parseWeekdayNumberSunday(d, string, i) {
17980 var n = numberRe.exec(string.slice(i, i + 1));
17981 return n ? (d.w = +n[0], i + n[0].length) : -1;
17982}
17983function parseWeekdayNumberMonday(d, string, i) {
17984 var n = numberRe.exec(string.slice(i, i + 1));
17985 return n ? (d.u = +n[0], i + n[0].length) : -1;
17986}
17987function parseWeekNumberSunday(d, string, i) {
17988 var n = numberRe.exec(string.slice(i, i + 2));
17989 return n ? (d.U = +n[0], i + n[0].length) : -1;
17990}
17991function parseWeekNumberISO(d, string, i) {
17992 var n = numberRe.exec(string.slice(i, i + 2));
17993 return n ? (d.V = +n[0], i + n[0].length) : -1;
17994}
17995function parseWeekNumberMonday(d, string, i) {
17996 var n = numberRe.exec(string.slice(i, i + 2));
17997 return n ? (d.W = +n[0], i + n[0].length) : -1;
17998}
17999function parseFullYear(d, string, i) {
18000 var n = numberRe.exec(string.slice(i, i + 4));
18001 return n ? (d.y = +n[0], i + n[0].length) : -1;
18002}
18003function parseYear(d, string, i) {
18004 var n = numberRe.exec(string.slice(i, i + 2));
18005 return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), i + n[0].length) : -1;
18006}
18007function parseZone(d, string, i) {
18008 var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
18009 return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
18010}
18011function parseQuarter(d, string, i) {
18012 var n = numberRe.exec(string.slice(i, i + 1));
18013 return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;
18014}
18015function parseMonthNumber(d, string, i) {
18016 var n = numberRe.exec(string.slice(i, i + 2));
18017 return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
18018}
18019function parseDayOfMonth(d, string, i) {
18020 var n = numberRe.exec(string.slice(i, i + 2));
18021 return n ? (d.d = +n[0], i + n[0].length) : -1;
18022}
18023function parseDayOfYear(d, string, i) {
18024 var n = numberRe.exec(string.slice(i, i + 3));
18025 return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
18026}
18027function parseHour24(d, string, i) {
18028 var n = numberRe.exec(string.slice(i, i + 2));
18029 return n ? (d.H = +n[0], i + n[0].length) : -1;
18030}
18031function parseMinutes(d, string, i) {
18032 var n = numberRe.exec(string.slice(i, i + 2));
18033 return n ? (d.M = +n[0], i + n[0].length) : -1;
18034}
18035function parseSeconds(d, string, i) {
18036 var n = numberRe.exec(string.slice(i, i + 2));
18037 return n ? (d.S = +n[0], i + n[0].length) : -1;
18038}
18039function parseMilliseconds(d, string, i) {
18040 var n = numberRe.exec(string.slice(i, i + 3));
18041 return n ? (d.L = +n[0], i + n[0].length) : -1;
18042}
18043function parseMicroseconds(d, string, i) {
18044 var n = numberRe.exec(string.slice(i, i + 6));
18045 return n ? (d.L = Math.floor(n[0] / 1e3), i + n[0].length) : -1;
18046}
18047function parseLiteralPercent(d, string, i) {
18048 var n = percentRe.exec(string.slice(i, i + 1));
18049 return n ? i + n[0].length : -1;
18050}
18051function parseUnixTimestamp(d, string, i) {
18052 var n = numberRe.exec(string.slice(i));
18053 return n ? (d.Q = +n[0], i + n[0].length) : -1;
18054}
18055function parseUnixTimestampSeconds(d, string, i) {
18056 var n = numberRe.exec(string.slice(i));
18057 return n ? (d.s = +n[0], i + n[0].length) : -1;
18058}
18059function formatDayOfMonth(d, p) {
18060 return pad(d.getDate(), p, 2);
18061}
18062function formatHour24(d, p) {
18063 return pad(d.getHours(), p, 2);
18064}
18065function formatHour12(d, p) {
18066 return pad(d.getHours() % 12 || 12, p, 2);
18067}
18068function formatDayOfYear(d, p) {
18069 return pad(1 + src_day.count(src_year(d), d), p, 3);
18070}
18071function formatMilliseconds(d, p) {
18072 return pad(d.getMilliseconds(), p, 3);
18073}
18074function formatMicroseconds(d, p) {
18075 return formatMilliseconds(d, p) + "000";
18076}
18077function formatMonthNumber(d, p) {
18078 return pad(d.getMonth() + 1, p, 2);
18079}
18080function formatMinutes(d, p) {
18081 return pad(d.getMinutes(), p, 2);
18082}
18083function formatSeconds(d, p) {
18084 return pad(d.getSeconds(), p, 2);
18085}
18086function formatWeekdayNumberMonday(d) {
18087 var day = d.getDay();
18088 return day === 0 ? 7 : day;
18089}
18090function formatWeekNumberSunday(d, p) {
18091 return pad(sunday.count(src_year(d) - 1, d), p, 2);
18092}
18093function dISO(d) {
18094 var day = d.getDay();
18095 return day >= 4 || day === 0 ? thursday(d) : thursday.ceil(d);
18096}
18097function formatWeekNumberISO(d, p) {
18098 d = dISO(d);
18099 return pad(thursday.count(src_year(d), d) + (src_year(d).getDay() === 4), p, 2);
18100}
18101function formatWeekdayNumberSunday(d) {
18102 return d.getDay();
18103}
18104function formatWeekNumberMonday(d, p) {
18105 return pad(monday.count(src_year(d) - 1, d), p, 2);
18106}
18107function formatYear(d, p) {
18108 return pad(d.getFullYear() % 100, p, 2);
18109}
18110function formatYearISO(d, p) {
18111 d = dISO(d);
18112 return pad(d.getFullYear() % 100, p, 2);
18113}
18114function formatFullYear(d, p) {
18115 return pad(d.getFullYear() % 1e4, p, 4);
18116}
18117function formatFullYearISO(d, p) {
18118 var day = d.getDay();
18119 d = day >= 4 || day === 0 ? thursday(d) : thursday.ceil(d);
18120 return pad(d.getFullYear() % 1e4, p, 4);
18121}
18122function formatZone(d) {
18123 var z = d.getTimezoneOffset();
18124 return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2);
18125}
18126function formatUTCDayOfMonth(d, p) {
18127 return pad(d.getUTCDate(), p, 2);
18128}
18129function formatUTCHour24(d, p) {
18130 return pad(d.getUTCHours(), p, 2);
18131}
18132function formatUTCHour12(d, p) {
18133 return pad(d.getUTCHours() % 12 || 12, p, 2);
18134}
18135function formatUTCDayOfYear(d, p) {
18136 return pad(1 + src_utcDay.count(src_utcYear(d), d), p, 3);
18137}
18138function formatUTCMilliseconds(d, p) {
18139 return pad(d.getUTCMilliseconds(), p, 3);
18140}
18141function formatUTCMicroseconds(d, p) {
18142 return formatUTCMilliseconds(d, p) + "000";
18143}
18144function formatUTCMonthNumber(d, p) {
18145 return pad(d.getUTCMonth() + 1, p, 2);
18146}
18147function formatUTCMinutes(d, p) {
18148 return pad(d.getUTCMinutes(), p, 2);
18149}
18150function formatUTCSeconds(d, p) {
18151 return pad(d.getUTCSeconds(), p, 2);
18152}
18153function formatUTCWeekdayNumberMonday(d) {
18154 var dow = d.getUTCDay();
18155 return dow === 0 ? 7 : dow;
18156}
18157function formatUTCWeekNumberSunday(d, p) {
18158 return pad(utcSunday.count(src_utcYear(d) - 1, d), p, 2);
18159}
18160function UTCdISO(d) {
18161 var day = d.getUTCDay();
18162 return day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);
18163}
18164function formatUTCWeekNumberISO(d, p) {
18165 d = UTCdISO(d);
18166 return pad(utcThursday.count(src_utcYear(d), d) + (src_utcYear(d).getUTCDay() === 4), p, 2);
18167}
18168function formatUTCWeekdayNumberSunday(d) {
18169 return d.getUTCDay();
18170}
18171function formatUTCWeekNumberMonday(d, p) {
18172 return pad(utcMonday.count(src_utcYear(d) - 1, d), p, 2);
18173}
18174function formatUTCYear(d, p) {
18175 return pad(d.getUTCFullYear() % 100, p, 2);
18176}
18177function formatUTCYearISO(d, p) {
18178 d = UTCdISO(d);
18179 return pad(d.getUTCFullYear() % 100, p, 2);
18180}
18181function formatUTCFullYear(d, p) {
18182 return pad(d.getUTCFullYear() % 1e4, p, 4);
18183}
18184function formatUTCFullYearISO(d, p) {
18185 var day = d.getUTCDay();
18186 d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);
18187 return pad(d.getUTCFullYear() % 1e4, p, 4);
18188}
18189function formatUTCZone() {
18190 return "+0000";
18191}
18192function formatLiteralPercent() {
18193 return "%";
18194}
18195function formatUnixTimestamp(d) {
18196 return +d;
18197}
18198function formatUnixTimestampSeconds(d) {
18199 return Math.floor(+d / 1e3);
18200}
18201;// CONCATENATED MODULE: ./node_modules/d3-time-format/src/defaultLocale.js
18202
18203var locale;
18204var timeFormat;
18205var timeParse;
18206var utcFormat;
18207var utcParse;
18208defaultLocale({
18209 dateTime: "%x, %X",
18210 date: "%-m/%-d/%Y",
18211 time: "%-I:%M:%S %p",
18212 periods: ["AM", "PM"],
18213 days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
18214 shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
18215 months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
18216 shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
18217});
18218function defaultLocale(definition) {
18219 locale = formatLocale(definition);
18220 timeFormat = locale.format;
18221 timeParse = locale.parse;
18222 utcFormat = locale.utcFormat;
18223 utcParse = locale.utcParse;
18224 return locale;
18225}
18226;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selector.js
18227function none() {}
18228/* harmony default export */ function selector(selector) {
18229 return selector == null ? none : function () {
18230 return this.querySelector(selector);
18231 };
18232}
18233;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/select.js
18234
18235
18236/* harmony default export */ function selection_select(select) {
18237 if (typeof select !== "function") select = selector(select);
18238 for (var groups = this._groups, m = groups.length, subgroups = Array(m), j = 0; j < m; ++j) {
18239 for (var group = groups[j], n = group.length, subgroup = subgroups[j] = Array(n), node, subnode, i = 0; i < n; ++i) {
18240 if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
18241 if ("__data__" in node) subnode.__data__ = node.__data__;
18242 subgroup[i] = subnode;
18243 }
18244 }
18245 }
18246 return new Selection(subgroups, this._parents);
18247}
18248;// CONCATENATED MODULE: ./node_modules/d3-selection/src/array.js
18249// Given something array like (or null), returns something that is strictly an
18250// array. This is used to ensure that array-like objects passed to d3.selectAll
18251// or selection.selectAll are converted into proper arrays when creating a
18252// selection; we don’t ever want to create a selection backed by a live
18253// HTMLCollection or NodeList. However, note that selection.selectAll will use a
18254// static NodeList as a group, since it safely derived from querySelectorAll.
18255function array(x) {
18256 return x == null ? [] : Array.isArray(x) ? x : Array.from(x);
18257}
18258;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selectorAll.js
18259function empty() {
18260 return [];
18261}
18262/* harmony default export */ function selectorAll(selector) {
18263 return selector == null ? empty : function () {
18264 return this.querySelectorAll(selector);
18265 };
18266}
18267;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/selectAll.js
18268
18269
18270
18271function arrayAll(select) {
18272 return function () {
18273 return array(select.apply(this, arguments));
18274 };
18275}
18276/* harmony default export */ function selectAll(select) {
18277 if (typeof select === "function") select = arrayAll(select);else select = selectorAll(select);
18278 for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
18279 for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
18280 if (node = group[i]) {
18281 subgroups.push(select.call(node, node.__data__, i, group));
18282 parents.push(node);
18283 }
18284 }
18285 }
18286 return new Selection(subgroups, parents);
18287}
18288;// CONCATENATED MODULE: ./node_modules/d3-selection/src/matcher.js
18289/* harmony default export */ function matcher(selector) {
18290 return function () {
18291 return this.matches(selector);
18292 };
18293}
18294function childMatcher(selector) {
18295 return function (node) {
18296 return node.matches(selector);
18297 };
18298}
18299;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/selectChild.js
18300
18301var find = Array.prototype.find;
18302function childFind(match) {
18303 return function () {
18304 return find.call(this.children, match);
18305 };
18306}
18307function childFirst() {
18308 return this.firstElementChild;
18309}
18310/* harmony default export */ function selectChild(match) {
18311 return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match)));
18312}
18313;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/selectChildren.js
18314
18315var filter = Array.prototype.filter;
18316function children() {
18317 return Array.from(this.children);
18318}
18319function childrenFilter(match) {
18320 return function () {
18321 return filter.call(this.children, match);
18322 };
18323}
18324/* harmony default export */ function selectChildren(match) {
18325 return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match)));
18326}
18327;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/filter.js
18328
18329
18330/* harmony default export */ function selection_filter(match) {
18331 if (typeof match !== "function") match = matcher(match);
18332 for (var groups = this._groups, m = groups.length, subgroups = Array(m), j = 0; j < m; ++j) {
18333 for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
18334 if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
18335 subgroup.push(node);
18336 }
18337 }
18338 }
18339 return new Selection(subgroups, this._parents);
18340}
18341;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/sparse.js
18342/* harmony default export */ function sparse(update) {
18343 return Array(update.length);
18344}
18345;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/enter.js
18346
18347
18348/* harmony default export */ function enter() {
18349 return new Selection(this._enter || this._groups.map(sparse), this._parents);
18350}
18351function EnterNode(parent, datum) {
18352 this.ownerDocument = parent.ownerDocument;
18353 this.namespaceURI = parent.namespaceURI;
18354 this._next = null;
18355 this._parent = parent;
18356 this.__data__ = datum;
18357}
18358EnterNode.prototype = {
18359 constructor: EnterNode,
18360 appendChild: function appendChild(child) {
18361 return this._parent.insertBefore(child, this._next);
18362 },
18363 insertBefore: function insertBefore(child, next) {
18364 return this._parent.insertBefore(child, next);
18365 },
18366 querySelector: function querySelector(selector) {
18367 return this._parent.querySelector(selector);
18368 },
18369 querySelectorAll: function querySelectorAll(selector) {
18370 return this._parent.querySelectorAll(selector);
18371 }
18372};
18373;// CONCATENATED MODULE: ./node_modules/d3-selection/src/constant.js
18374/* harmony default export */ function constant(x) {
18375 return function () {
18376 return x;
18377 };
18378}
18379;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/data.js
18380
18381
18382
18383function bindIndex(parent, group, enter, update, exit, data) {
18384 var i = 0,
18385 node,
18386 groupLength = group.length,
18387 dataLength = data.length;
18388
18389 // Put any non-null nodes that fit into update.
18390 // Put any null nodes into enter.
18391 // Put any remaining data into enter.
18392 for (; i < dataLength; ++i) {
18393 if (node = group[i]) {
18394 node.__data__ = data[i];
18395 update[i] = node;
18396 } else {
18397 enter[i] = new EnterNode(parent, data[i]);
18398 }
18399 }
18400
18401 // Put any non-null nodes that don’t fit into exit.
18402 for (; i < groupLength; ++i) {
18403 if (node = group[i]) {
18404 exit[i] = node;
18405 }
18406 }
18407}
18408function bindKey(parent, group, enter, update, exit, data, key) {
18409 var i,
18410 node,
18411 nodeByKeyValue = new Map(),
18412 groupLength = group.length,
18413 dataLength = data.length,
18414 keyValues = Array(groupLength),
18415 keyValue;
18416
18417 // Compute the key for each node.
18418 // If multiple nodes have the same key, the duplicates are added to exit.
18419 for (i = 0; i < groupLength; ++i) {
18420 if (node = group[i]) {
18421 keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
18422 if (nodeByKeyValue.has(keyValue)) {
18423 exit[i] = node;
18424 } else {
18425 nodeByKeyValue.set(keyValue, node);
18426 }
18427 }
18428 }
18429
18430 // Compute the key for each datum.
18431 // If there a node associated with this key, join and add it to update.
18432 // If there is not (or the key is a duplicate), add it to enter.
18433 for (i = 0; i < dataLength; ++i) {
18434 keyValue = key.call(parent, data[i], i, data) + "";
18435 if (node = nodeByKeyValue.get(keyValue)) {
18436 update[i] = node;
18437 node.__data__ = data[i];
18438 nodeByKeyValue.delete(keyValue);
18439 } else {
18440 enter[i] = new EnterNode(parent, data[i]);
18441 }
18442 }
18443
18444 // Add any remaining nodes that were not bound to data to exit.
18445 for (i = 0; i < groupLength; ++i) {
18446 if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) {
18447 exit[i] = node;
18448 }
18449 }
18450}
18451function datum(node) {
18452 return node.__data__;
18453}
18454/* harmony default export */ function data(value, key) {
18455 if (!arguments.length) return Array.from(this, datum);
18456 var bind = key ? bindKey : bindIndex,
18457 parents = this._parents,
18458 groups = this._groups;
18459 if (typeof value !== "function") value = constant(value);
18460 for (var m = groups.length, update = Array(m), enter = Array(m), exit = Array(m), j = 0; j < m; ++j) {
18461 var parent = parents[j],
18462 group = groups[j],
18463 groupLength = group.length,
18464 data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),
18465 dataLength = data.length,
18466 enterGroup = enter[j] = Array(dataLength),
18467 updateGroup = update[j] = Array(dataLength),
18468 exitGroup = exit[j] = Array(groupLength);
18469 bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
18470
18471 // Now connect the enter nodes to their following update node, such that
18472 // appendChild can insert the materialized enter node before this node,
18473 // rather than at the end of the parent node.
18474 for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
18475 if (previous = enterGroup[i0]) {
18476 if (i0 >= i1) i1 = i0 + 1;
18477 while (!(next = updateGroup[i1]) && ++i1 < dataLength) {}
18478 previous._next = next || null;
18479 }
18480 }
18481 }
18482 update = new Selection(update, parents);
18483 update._enter = enter;
18484 update._exit = exit;
18485 return update;
18486}
18487
18488// Given some data, this returns an array-like view of it: an object that
18489// exposes a length property and allows numeric indexing. Note that unlike
18490// selectAll, this isn’t worried about “live” collections because the resulting
18491// array will only be used briefly while data is being bound. (It is possible to
18492// cause the data to change while iterating by using a key function, but please
18493// don’t; we’d rather avoid a gratuitous copy.)
18494function arraylike(data) {
18495 return typeof data === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like
18496 : Array.from(data); // Map, Set, iterable, string, or anything else
18497}
18498;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/exit.js
18499
18500
18501/* harmony default export */ function exit() {
18502 return new Selection(this._exit || this._groups.map(sparse), this._parents);
18503}
18504;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/join.js
18505/* harmony default export */ function join(onenter, onupdate, onexit) {
18506 var enter = this.enter(),
18507 update = this,
18508 exit = this.exit();
18509 if (typeof onenter === "function") {
18510 enter = onenter(enter);
18511 if (enter) enter = enter.selection();
18512 } else {
18513 enter = enter.append(onenter + "");
18514 }
18515 if (onupdate != null) {
18516 update = onupdate(update);
18517 if (update) update = update.selection();
18518 }
18519 if (onexit == null) exit.remove();else onexit(exit);
18520 return enter && update ? enter.merge(update).order() : update;
18521}
18522;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/merge.js
18523
18524/* harmony default export */ function merge(context) {
18525 for (var selection = context.selection ? context.selection() : context, groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = Array(m0), j = 0; j < m; ++j) {
18526 for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = Array(n), node, i = 0; i < n; ++i) {
18527 if (node = group0[i] || group1[i]) {
18528 merge[i] = node;
18529 }
18530 }
18531 }
18532 for (; j < m0; ++j) {
18533 merges[j] = groups0[j];
18534 }
18535 return new Selection(merges, this._parents);
18536}
18537;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/order.js
18538/* harmony default export */ function order() {
18539 for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {
18540 for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {
18541 if (node = group[i]) {
18542 if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
18543 next = node;
18544 }
18545 }
18546 }
18547 return this;
18548}
18549;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/sort.js
18550
18551/* harmony default export */ function sort(compare) {
18552 if (!compare) compare = ascending;
18553 function compareNode(a, b) {
18554 return a && b ? compare(a.__data__, b.__data__) : !a - !b;
18555 }
18556 for (var groups = this._groups, m = groups.length, sortgroups = Array(m), j = 0; j < m; ++j) {
18557 for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = Array(n), node, i = 0; i < n; ++i) {
18558 if (node = group[i]) {
18559 sortgroup[i] = node;
18560 }
18561 }
18562 sortgroup.sort(compareNode);
18563 }
18564 return new Selection(sortgroups, this._parents).order();
18565}
18566function ascending(a, b) {
18567 return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
18568}
18569;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/call.js
18570/* harmony default export */ function call() {
18571 var callback = arguments[0];
18572 arguments[0] = this;
18573 callback.apply(null, arguments);
18574 return this;
18575}
18576;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/nodes.js
18577/* harmony default export */ function nodes() {
18578 return Array.from(this);
18579}
18580;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/node.js
18581/* harmony default export */ function node() {
18582 for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
18583 for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
18584 node = group[i];
18585 if (node) return node;
18586 }
18587 }
18588 return null;
18589}
18590;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/size.js
18591function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: !0 }; return { done: !1, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
18592function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18593function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
18594/* harmony default export */ function size() {
18595 var size = 0;
18596 for (var _iterator = _createForOfIteratorHelperLoose(this), _step; !(_step = _iterator()).done;) {
18597 _step.value;
18598 ++size;
18599 } // eslint-disable-line no-unused-vars
18600 return size;
18601}
18602;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/empty.js
18603/* harmony default export */ function selection_empty() {
18604 return !this.node();
18605}
18606;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/each.js
18607/* harmony default export */ function each(callback) {
18608 for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
18609 for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
18610 if (node = group[i]) callback.call(node, node.__data__, i, group);
18611 }
18612 }
18613 return this;
18614}
18615;// CONCATENATED MODULE: ./node_modules/d3-selection/src/namespaces.js
18616var xhtml = "http://www.w3.org/1999/xhtml";
18617/* harmony default export */ var namespaces = ({
18618 svg: "http://www.w3.org/2000/svg",
18619 xhtml: "http://www.w3.org/1999/xhtml",
18620 xlink: "http://www.w3.org/1999/xlink",
18621 xml: "http://www.w3.org/XML/1998/namespace",
18622 xmlns: "http://www.w3.org/2000/xmlns/"
18623});
18624;// CONCATENATED MODULE: ./node_modules/d3-selection/src/namespace.js
18625
18626/* harmony default export */ function namespace(name) {
18627 var prefix = name += "",
18628 i = prefix.indexOf(":");
18629 if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
18630 return namespaces.hasOwnProperty(prefix) ? {
18631 space: namespaces[prefix],
18632 local: name
18633 } : name; // eslint-disable-line no-prototype-builtins
18634}
18635;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/attr.js
18636
18637function attrRemove(name) {
18638 return function () {
18639 this.removeAttribute(name);
18640 };
18641}
18642function attrRemoveNS(fullname) {
18643 return function () {
18644 this.removeAttributeNS(fullname.space, fullname.local);
18645 };
18646}
18647function attrConstant(name, value) {
18648 return function () {
18649 this.setAttribute(name, value);
18650 };
18651}
18652function attrConstantNS(fullname, value) {
18653 return function () {
18654 this.setAttributeNS(fullname.space, fullname.local, value);
18655 };
18656}
18657function attrFunction(name, value) {
18658 return function () {
18659 var v = value.apply(this, arguments);
18660 if (v == null) this.removeAttribute(name);else this.setAttribute(name, v);
18661 };
18662}
18663function attrFunctionNS(fullname, value) {
18664 return function () {
18665 var v = value.apply(this, arguments);
18666 if (v == null) this.removeAttributeNS(fullname.space, fullname.local);else this.setAttributeNS(fullname.space, fullname.local, v);
18667 };
18668}
18669/* harmony default export */ function attr(name, value) {
18670 var fullname = namespace(name);
18671 if (arguments.length < 2) {
18672 var node = this.node();
18673 return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);
18674 }
18675 return this.each((value == null ? fullname.local ? attrRemoveNS : attrRemove : typeof value === "function" ? fullname.local ? attrFunctionNS : attrFunction : fullname.local ? attrConstantNS : attrConstant)(fullname, value));
18676}
18677;// CONCATENATED MODULE: ./node_modules/d3-selection/src/window.js
18678/* harmony default export */ function src_window(node) {
18679 return node.ownerDocument && node.ownerDocument.defaultView // node is a Node
18680 || node.document && node // node is a Window
18681 || node.defaultView; // node is a Document
18682}
18683;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/style.js
18684
18685function styleRemove(name) {
18686 return function () {
18687 this.style.removeProperty(name);
18688 };
18689}
18690function styleConstant(name, value, priority) {
18691 return function () {
18692 this.style.setProperty(name, value, priority);
18693 };
18694}
18695function styleFunction(name, value, priority) {
18696 return function () {
18697 var v = value.apply(this, arguments);
18698 if (v == null) this.style.removeProperty(name);else this.style.setProperty(name, v, priority);
18699 };
18700}
18701/* harmony default export */ function style(name, value, priority) {
18702 return arguments.length > 1 ? this.each((value == null ? styleRemove : typeof value === "function" ? styleFunction : styleConstant)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name);
18703}
18704function styleValue(node, name) {
18705 return node.style.getPropertyValue(name) || src_window(node).getComputedStyle(node, null).getPropertyValue(name);
18706}
18707;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/property.js
18708function propertyRemove(name) {
18709 return function () {
18710 delete this[name];
18711 };
18712}
18713function propertyConstant(name, value) {
18714 return function () {
18715 this[name] = value;
18716 };
18717}
18718function propertyFunction(name, value) {
18719 return function () {
18720 var v = value.apply(this, arguments);
18721 if (v == null) delete this[name];else this[name] = v;
18722 };
18723}
18724/* harmony default export */ function property(name, value) {
18725 return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];
18726}
18727;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/classed.js
18728function classArray(string) {
18729 return string.trim().split(/^|\s+/);
18730}
18731function classList(node) {
18732 return node.classList || new ClassList(node);
18733}
18734function ClassList(node) {
18735 this._node = node;
18736 this._names = classArray(node.getAttribute("class") || "");
18737}
18738ClassList.prototype = {
18739 add: function add(name) {
18740 var i = this._names.indexOf(name);
18741 if (i < 0) {
18742 this._names.push(name);
18743 this._node.setAttribute("class", this._names.join(" "));
18744 }
18745 },
18746 remove: function remove(name) {
18747 var i = this._names.indexOf(name);
18748 if (i >= 0) {
18749 this._names.splice(i, 1);
18750 this._node.setAttribute("class", this._names.join(" "));
18751 }
18752 },
18753 contains: function contains(name) {
18754 return this._names.indexOf(name) >= 0;
18755 }
18756};
18757function classedAdd(node, names) {
18758 var list = classList(node),
18759 i = -1,
18760 n = names.length;
18761 while (++i < n) {
18762 list.add(names[i]);
18763 }
18764}
18765function classedRemove(node, names) {
18766 var list = classList(node),
18767 i = -1,
18768 n = names.length;
18769 while (++i < n) {
18770 list.remove(names[i]);
18771 }
18772}
18773function classedTrue(names) {
18774 return function () {
18775 classedAdd(this, names);
18776 };
18777}
18778function classedFalse(names) {
18779 return function () {
18780 classedRemove(this, names);
18781 };
18782}
18783function classedFunction(names, value) {
18784 return function () {
18785 (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
18786 };
18787}
18788/* harmony default export */ function classed(name, value) {
18789 var names = classArray(name + "");
18790 if (arguments.length < 2) {
18791 var list = classList(this.node()),
18792 i = -1,
18793 n = names.length;
18794 while (++i < n) {
18795 if (!list.contains(names[i])) return !1;
18796 }
18797 return !0;
18798 }
18799 return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value));
18800}
18801;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/text.js
18802function textRemove() {
18803 this.textContent = "";
18804}
18805function textConstant(value) {
18806 return function () {
18807 this.textContent = value;
18808 };
18809}
18810function textFunction(value) {
18811 return function () {
18812 var v = value.apply(this, arguments);
18813 this.textContent = v == null ? "" : v;
18814 };
18815}
18816/* harmony default export */ function selection_text(value) {
18817 return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction : textConstant)(value)) : this.node().textContent;
18818}
18819;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/html.js
18820function htmlRemove() {
18821 this.innerHTML = "";
18822}
18823function htmlConstant(value) {
18824 return function () {
18825 this.innerHTML = value;
18826 };
18827}
18828function htmlFunction(value) {
18829 return function () {
18830 var v = value.apply(this, arguments);
18831 this.innerHTML = v == null ? "" : v;
18832 };
18833}
18834/* harmony default export */ function html(value) {
18835 return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;
18836}
18837;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/raise.js
18838function raise() {
18839 if (this.nextSibling) this.parentNode.appendChild(this);
18840}
18841/* harmony default export */ function selection_raise() {
18842 return this.each(raise);
18843}
18844;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/lower.js
18845function lower() {
18846 if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
18847}
18848/* harmony default export */ function selection_lower() {
18849 return this.each(lower);
18850}
18851;// CONCATENATED MODULE: ./node_modules/d3-selection/src/creator.js
18852
18853
18854function creatorInherit(name) {
18855 return function () {
18856 var document = this.ownerDocument,
18857 uri = this.namespaceURI;
18858 return uri === xhtml && document.documentElement.namespaceURI === xhtml ? document.createElement(name) : document.createElementNS(uri, name);
18859 };
18860}
18861function creatorFixed(fullname) {
18862 return function () {
18863 return this.ownerDocument.createElementNS(fullname.space, fullname.local);
18864 };
18865}
18866/* harmony default export */ function creator(name) {
18867 var fullname = namespace(name);
18868 return (fullname.local ? creatorFixed : creatorInherit)(fullname);
18869}
18870;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/append.js
18871
18872/* harmony default export */ function append(name) {
18873 var create = typeof name === "function" ? name : creator(name);
18874 return this.select(function () {
18875 return this.appendChild(create.apply(this, arguments));
18876 });
18877}
18878;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/insert.js
18879
18880
18881function constantNull() {
18882 return null;
18883}
18884/* harmony default export */ function insert(name, before) {
18885 var create = typeof name === "function" ? name : creator(name),
18886 select = before == null ? constantNull : typeof before === "function" ? before : selector(before);
18887 return this.select(function () {
18888 return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
18889 });
18890}
18891;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/remove.js
18892function remove() {
18893 var parent = this.parentNode;
18894 if (parent) parent.removeChild(this);
18895}
18896/* harmony default export */ function selection_remove() {
18897 return this.each(remove);
18898}
18899;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/clone.js
18900function selection_cloneShallow() {
18901 var clone = this.cloneNode(!1),
18902 parent = this.parentNode;
18903 return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
18904}
18905function selection_cloneDeep() {
18906 var clone = this.cloneNode(!0),
18907 parent = this.parentNode;
18908 return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
18909}
18910/* harmony default export */ function clone(deep) {
18911 return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
18912}
18913;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/datum.js
18914/* harmony default export */ function selection_datum(value) {
18915 return arguments.length ? this.property("__data__", value) : this.node().__data__;
18916}
18917;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/on.js
18918function contextListener(listener) {
18919 return function (event) {
18920 listener.call(this, event, this.__data__);
18921 };
18922}
18923function parseTypenames(typenames) {
18924 return typenames.trim().split(/^|\s+/).map(function (t) {
18925 var name = "",
18926 i = t.indexOf(".");
18927 if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
18928 return {
18929 type: t,
18930 name: name
18931 };
18932 });
18933}
18934function onRemove(typename) {
18935 return function () {
18936 var on = this.__on;
18937 if (!on) return;
18938 for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
18939 if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
18940 this.removeEventListener(o.type, o.listener, o.options);
18941 } else {
18942 on[++i] = o;
18943 }
18944 }
18945 if (++i) on.length = i;else delete this.__on;
18946 };
18947}
18948function onAdd(typename, value, options) {
18949 return function () {
18950 var on = this.__on,
18951 o,
18952 listener = contextListener(value);
18953 if (on) for (var j = 0, m = on.length; j < m; ++j) {
18954 if ((o = on[j]).type === typename.type && o.name === typename.name) {
18955 this.removeEventListener(o.type, o.listener, o.options);
18956 this.addEventListener(o.type, o.listener = listener, o.options = options);
18957 o.value = value;
18958 return;
18959 }
18960 }
18961 this.addEventListener(typename.type, listener, options);
18962 o = {
18963 type: typename.type,
18964 name: typename.name,
18965 value: value,
18966 listener: listener,
18967 options: options
18968 };
18969 if (!on) this.__on = [o];else on.push(o);
18970 };
18971}
18972/* harmony default export */ function on(typename, value, options) {
18973 var typenames = parseTypenames(typename + ""),
18974 i,
18975 n = typenames.length,
18976 t;
18977 if (arguments.length < 2) {
18978 var on = this.node().__on;
18979 if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
18980 for (i = 0, o = on[j]; i < n; ++i) {
18981 if ((t = typenames[i]).type === o.type && t.name === o.name) {
18982 return o.value;
18983 }
18984 }
18985 }
18986 return;
18987 }
18988 on = value ? onAdd : onRemove;
18989 for (i = 0; i < n; ++i) {
18990 this.each(on(typenames[i], value, options));
18991 }
18992 return this;
18993}
18994;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/dispatch.js
18995
18996function dispatchEvent(node, type, params) {
18997 var window = src_window(node),
18998 event = window.CustomEvent;
18999 if (typeof event === "function") {
19000 event = new event(type, params);
19001 } else {
19002 event = window.document.createEvent("Event");
19003 if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;else event.initEvent(type, !1, !1);
19004 }
19005 node.dispatchEvent(event);
19006}
19007function dispatchConstant(type, params) {
19008 return function () {
19009 return dispatchEvent(this, type, params);
19010 };
19011}
19012function dispatchFunction(type, params) {
19013 return function () {
19014 return dispatchEvent(this, type, params.apply(this, arguments));
19015 };
19016}
19017/* harmony default export */ function dispatch(type, params) {
19018 return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params));
19019}
19020// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
19021var regenerator = __webpack_require__(503);
19022;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/iterator.js
19023
19024var _marked = /*#__PURE__*/regenerator.mark(_callee);
19025function _callee() {
19026 var groups, j, m, group, i, n, node;
19027 return regenerator.wrap(function (_context) {
19028 while (1) {
19029 switch (_context.prev = _context.next) {
19030 case 0:
19031 groups = this._groups, j = 0, m = groups.length;
19032 case 1:
19033 if (!(j < m)) {
19034 _context.next = 13;
19035 break;
19036 }
19037 group = groups[j], i = 0, n = group.length;
19038 case 3:
19039 if (!(i < n)) {
19040 _context.next = 10;
19041 break;
19042 }
19043 if (!(node = group[i])) {
19044 _context.next = 7;
19045 break;
19046 }
19047 _context.next = 7;
19048 return node;
19049 case 7:
19050 ++i;
19051 _context.next = 3;
19052 break;
19053 case 10:
19054 ++j;
19055 _context.next = 1;
19056 break;
19057 case 13:
19058 case "end":
19059 return _context.stop();
19060 }
19061 }
19062 }, _marked, this);
19063}
19064;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/index.js
19065var _selection$prototype;
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100var root = [null];
19101function Selection(groups, parents) {
19102 this._groups = groups;
19103 this._parents = parents;
19104}
19105function selection() {
19106 return new Selection([[document.documentElement]], root);
19107}
19108function selection_selection() {
19109 return this;
19110}
19111Selection.prototype = selection.prototype = (_selection$prototype = {
19112 constructor: Selection,
19113 select: selection_select,
19114 selectAll: selectAll,
19115 selectChild: selectChild,
19116 selectChildren: selectChildren,
19117 filter: selection_filter,
19118 data: data,
19119 enter: enter,
19120 exit: exit,
19121 join: join,
19122 merge: merge,
19123 selection: selection_selection,
19124 order: order,
19125 sort: sort,
19126 call: call,
19127 nodes: nodes,
19128 node: node,
19129 size: size,
19130 empty: selection_empty,
19131 each: each,
19132 attr: attr,
19133 style: style,
19134 property: property,
19135 classed: classed,
19136 text: selection_text,
19137 html: html,
19138 raise: selection_raise,
19139 lower: selection_lower,
19140 append: append,
19141 insert: insert,
19142 remove: selection_remove,
19143 clone: clone,
19144 datum: selection_datum,
19145 on: on,
19146 dispatch: dispatch
19147}, _selection$prototype[Symbol.iterator] = _callee, _selection$prototype);
19148/* harmony default export */ var src_selection = (selection);
19149;// CONCATENATED MODULE: ./node_modules/d3-selection/src/select.js
19150
19151/* harmony default export */ function src_select(selector) {
19152 return typeof selector === "string" ? new Selection([[document.querySelector(selector)]], [document.documentElement]) : new Selection([[selector]], root);
19153}
19154;// CONCATENATED MODULE: ./src/module/browser.ts
19155
19156var browser_this = undefined;
19157/**
19158 * Copyright (c) 2017 ~ present NAVER Corp.
19159 * billboard.js project is licensed under the MIT license
19160 */
19161/**
19162 * Window object
19163 * @private
19164 */
19165/* eslint-disable no-new-func, no-undef */
19166
19167var win = function () {
19168 _newArrowCheck(this, browser_this);
19169 var root = typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis || typeof global === "object" && global !== null && global.Object === Object && global || typeof self === "object" && self !== null && self.Object === Object && self;
19170 return root || Function("return this")();
19171}.bind(undefined)();
19172/* eslint-enable no-new-func, no-undef */
19173
19174// fallback for non-supported environments
19175win.requestIdleCallback = win.requestIdleCallback || function (cb) {
19176 _newArrowCheck(this, browser_this);
19177 return setTimeout(cb, 1);
19178}.bind(undefined);
19179// win.cancelIdleCallback = win.cancelIdleCallback || (id => clearTimeout(id));
19180win.requestAnimationFrame = win.requestAnimationFrame || function (cb) {
19181 _newArrowCheck(this, browser_this);
19182 return setTimeout(cb, 1);
19183}.bind(undefined);
19184var browser_doc = win == null ? void 0 : win.document;
19185;// CONCATENATED MODULE: ./src/config/const.ts
19186/**
19187 * Copyright (c) 2017 ~ present NAVER Corp.
19188 * billboard.js project is licensed under the MIT license
19189 */
19190/**
19191 * Chart type constant
19192 * @private
19193 */
19194var TYPE = {
19195 AREA: "area",
19196 AREA_LINE_RANGE: "area-line-range",
19197 AREA_SPLINE: "area-spline",
19198 AREA_SPLINE_RANGE: "area-spline-range",
19199 AREA_STEP: "area-step",
19200 BAR: "bar",
19201 BUBBLE: "bubble",
19202 CANDLESTICK: "candlestick",
19203 DONUT: "donut",
19204 GAUGE: "gauge",
19205 LINE: "line",
19206 PIE: "pie",
19207 POLAR: "polar",
19208 RADAR: "radar",
19209 SCATTER: "scatter",
19210 SPLINE: "spline",
19211 STEP: "step"
19212};
19213
19214/**
19215 * Chart type module and its method from ChartInternal class, needed to be initialized.
19216 * @private
19217 */
19218var TYPE_METHOD_NEEDED = {
19219 AREA: "initArea",
19220 AREA_LINE_RANGE: "initArea",
19221 AREA_SPLINE: "initArea",
19222 AREA_SPLINE_RANGE: "initArea",
19223 AREA_STEP: "initArea",
19224 BAR: "initBar",
19225 BUBBLE: "initCircle",
19226 CANDLESTICK: "initCandlestick",
19227 DONUT: "initArc",
19228 GAUGE: "initArc",
19229 LINE: "initLine",
19230 PIE: "initArc",
19231 POLAR: "initPolar",
19232 RADAR: "initCircle",
19233 SCATTER: "initCircle",
19234 SPLINE: "initLine",
19235 STEP: "initLine"
19236};
19237
19238/**
19239 * chart types by category
19240 * @private
19241 */
19242var TYPE_BY_CATEGORY = {
19243 Area: [TYPE.AREA, TYPE.AREA_SPLINE, TYPE.AREA_SPLINE_RANGE, TYPE.AREA_LINE_RANGE, TYPE.AREA_STEP],
19244 AreaRange: [TYPE.AREA_SPLINE_RANGE, TYPE.AREA_LINE_RANGE],
19245 Arc: [TYPE.PIE, TYPE.DONUT, TYPE.GAUGE, TYPE.POLAR, TYPE.RADAR],
19246 Line: [TYPE.LINE, TYPE.SPLINE, TYPE.AREA, TYPE.AREA_SPLINE, TYPE.AREA_SPLINE_RANGE, TYPE.AREA_LINE_RANGE, TYPE.STEP, TYPE.AREA_STEP],
19247 Step: [TYPE.STEP, TYPE.AREA_STEP],
19248 Spline: [TYPE.SPLINE, TYPE.AREA_SPLINE, TYPE.AREA_SPLINE_RANGE]
19249};
19250;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
19251function _defineProperty(obj, key, value) {
19252 if (key in obj) {
19253 Object.defineProperty(obj, key, {
19254 value: value,
19255 enumerable: true,
19256 configurable: true,
19257 writable: true
19258 });
19259 } else {
19260 obj[key] = value;
19261 }
19262 return obj;
19263}
19264;// CONCATENATED MODULE: ./node_modules/d3-selection/src/sourceEvent.js
19265/* harmony default export */ function sourceEvent(event) {
19266 var sourceEvent;
19267 while (sourceEvent = event.sourceEvent) {
19268 event = sourceEvent;
19269 }
19270 return event;
19271}
19272;// CONCATENATED MODULE: ./node_modules/d3-selection/src/pointer.js
19273
19274/* harmony default export */ function src_pointer(event, node) {
19275 event = sourceEvent(event);
19276 if (node === undefined) node = event.currentTarget;
19277 if (node) {
19278 var svg = node.ownerSVGElement || node;
19279 if (svg.createSVGPoint) {
19280 var point = svg.createSVGPoint();
19281 point.x = event.clientX, point.y = event.clientY;
19282 point = point.matrixTransform(node.getScreenCTM().inverse());
19283 return [point.x, point.y];
19284 }
19285 if (node.getBoundingClientRect) {
19286 var rect = node.getBoundingClientRect();
19287 return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
19288 }
19289 }
19290 return [event.pageX, event.pageY];
19291}
19292;// CONCATENATED MODULE: ./node_modules/d3-dispatch/src/dispatch.js
19293
19294var dispatch_this = undefined,
19295 noop = {
19296 value: function value() {
19297 _newArrowCheck(this, dispatch_this);
19298 }.bind(undefined)
19299 };
19300function dispatch_dispatch() {
19301 for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
19302 if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
19303 _[t] = [];
19304 }
19305 return new Dispatch(_);
19306}
19307function Dispatch(_) {
19308 this._ = _;
19309}
19310function dispatch_parseTypenames(typenames, types) {
19311 return typenames.trim().split(/^|\s+/).map(function (t) {
19312 var name = "",
19313 i = t.indexOf(".");
19314 if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
19315 if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
19316 return {
19317 type: t,
19318 name: name
19319 };
19320 });
19321}
19322Dispatch.prototype = dispatch_dispatch.prototype = {
19323 constructor: Dispatch,
19324 on: function on(typename, callback) {
19325 var _ = this._,
19326 T = dispatch_parseTypenames(typename + "", _),
19327 t,
19328 i = -1,
19329 n = T.length;
19330
19331 // If no callback was specified, return the callback of the given type and name.
19332 if (arguments.length < 2) {
19333 while (++i < n) {
19334 if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;
19335 }
19336 return;
19337 }
19338
19339 // If a type was specified, set the callback for the given type and name.
19340 // Otherwise, if a null callback was specified, remove callbacks of the given name.
19341 if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
19342 while (++i < n) {
19343 if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);else if (callback == null) for (t in _) {
19344 _[t] = set(_[t], typename.name, null);
19345 }
19346 }
19347 return this;
19348 },
19349 copy: function () {
19350 var copy = {},
19351 _ = this._;
19352 for (var t in _) {
19353 copy[t] = _[t].slice();
19354 }
19355 return new Dispatch(copy);
19356 },
19357 call: function call(type, that) {
19358 if ((n = arguments.length - 2) > 0) for (var args = Array(n), i = 0, n, t; i < n; ++i) {
19359 args[i] = arguments[i + 2];
19360 }
19361 if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
19362 for (t = this._[type], i = 0, n = t.length; i < n; ++i) {
19363 t[i].value.apply(that, args);
19364 }
19365 },
19366 apply: function apply(type, that, args) {
19367 if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
19368 for (var t = this._[type], i = 0, n = t.length; i < n; ++i) {
19369 t[i].value.apply(that, args);
19370 }
19371 }
19372};
19373function get(type, name) {
19374 for (var i = 0, n = type.length, c; i < n; ++i) {
19375 if ((c = type[i]).name === name) {
19376 return c.value;
19377 }
19378 }
19379}
19380function set(type, name, callback) {
19381 for (var i = 0, n = type.length; i < n; ++i) {
19382 if (type[i].name === name) {
19383 type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
19384 break;
19385 }
19386 }
19387 if (callback != null) type.push({
19388 name: name,
19389 value: callback
19390 });
19391 return type;
19392}
19393/* harmony default export */ var src_dispatch = (dispatch_dispatch);
19394;// CONCATENATED MODULE: ./node_modules/d3-drag/src/noevent.js
19395// These are typically used in conjunction with noevent to ensure that we can
19396// preventDefault on the event.
19397var nonpassive = {
19398 passive: !1
19399};
19400var nonpassivecapture = {
19401 capture: !0,
19402 passive: !1
19403};
19404function nopropagation(event) {
19405 event.stopImmediatePropagation();
19406}
19407/* harmony default export */ function noevent(event) {
19408 event.preventDefault();
19409 event.stopImmediatePropagation();
19410}
19411;// CONCATENATED MODULE: ./node_modules/d3-drag/src/nodrag.js
19412
19413
19414/* harmony default export */ function nodrag(view) {
19415 var root = view.document.documentElement,
19416 selection = src_select(view).on("dragstart.drag", noevent, nonpassivecapture);
19417 if ("onselectstart" in root) {
19418 selection.on("selectstart.drag", noevent, nonpassivecapture);
19419 } else {
19420 root.__noselect = root.style.MozUserSelect;
19421 root.style.MozUserSelect = "none";
19422 }
19423}
19424function yesdrag(view, noclick) {
19425 var root = view.document.documentElement,
19426 selection = src_select(view).on("dragstart.drag", null);
19427 if (noclick) {
19428 selection.on("click.drag", noevent, nonpassivecapture);
19429 setTimeout(function () {
19430 selection.on("click.drag", null);
19431 }, 0);
19432 }
19433 if ("onselectstart" in root) {
19434 selection.on("selectstart.drag", null);
19435 } else {
19436 root.style.MozUserSelect = root.__noselect;
19437 delete root.__noselect;
19438 }
19439}
19440;// CONCATENATED MODULE: ./node_modules/d3-color/src/define.js
19441/* harmony default export */ function src_define(constructor, factory, prototype) {
19442 constructor.prototype = factory.prototype = prototype;
19443 prototype.constructor = constructor;
19444}
19445function extend(parent, definition) {
19446 var prototype = Object.create(parent.prototype);
19447 for (var key in definition) {
19448 prototype[key] = definition[key];
19449 }
19450 return prototype;
19451}
19452;// CONCATENATED MODULE: ./node_modules/d3-color/src/color.js
19453
19454function Color() {}
19455var _darker = .7;
19456
19457var _brighter = 1 / _darker;
19458
19459var reI = "\\s*([+-]?\\d+)\\s*",
19460 reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
19461 reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
19462 reHex = /^#([0-9a-f]{3,8})$/,
19463 reRgbInteger = new RegExp("^rgb\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*\\)$"),
19464 reRgbPercent = new RegExp("^rgb\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),
19465 reRgbaInteger = new RegExp("^rgba\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),
19466 reRgbaPercent = new RegExp("^rgba\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),
19467 reHslPercent = new RegExp("^hsl\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),
19468 reHslaPercent = new RegExp("^hsla\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),
19469 named = {
19470 aliceblue: 0xf0f8ff,
19471 antiquewhite: 0xfaebd7,
19472 aqua: 65535,
19473 aquamarine: 8388564,
19474 azure: 0xf0ffff,
19475 beige: 0xf5f5dc,
19476 bisque: 0xffe4c4,
19477 black: 0,
19478 blanchedalmond: 0xffebcd,
19479 blue: 255,
19480 blueviolet: 9055202,
19481 brown: 0xa52a2a,
19482 burlywood: 0xdeb887,
19483 cadetblue: 6266528,
19484 chartreuse: 8388352,
19485 chocolate: 0xd2691e,
19486 coral: 0xff7f50,
19487 cornflowerblue: 6591981,
19488 cornsilk: 0xfff8dc,
19489 crimson: 0xdc143c,
19490 cyan: 65535,
19491 darkblue: 139,
19492 darkcyan: 35723,
19493 darkgoldenrod: 0xb8860b,
19494 darkgray: 0xa9a9a9,
19495 darkgreen: 25600,
19496 darkgrey: 0xa9a9a9,
19497 darkkhaki: 0xbdb76b,
19498 darkmagenta: 9109643,
19499 darkolivegreen: 5597999,
19500 darkorange: 0xff8c00,
19501 darkorchid: 0x9932cc,
19502 darkred: 9109504,
19503 darksalmon: 0xe9967a,
19504 darkseagreen: 9419919,
19505 darkslateblue: 4734347,
19506 darkslategray: 3100495,
19507 darkslategrey: 3100495,
19508 darkturquoise: 52945,
19509 darkviolet: 9699539,
19510 deeppink: 0xff1493,
19511 deepskyblue: 49151,
19512 dimgray: 6908265,
19513 dimgrey: 6908265,
19514 dodgerblue: 2003199,
19515 firebrick: 0xb22222,
19516 floralwhite: 0xfffaf0,
19517 forestgreen: 2263842,
19518 fuchsia: 0xff00ff,
19519 gainsboro: 0xdcdcdc,
19520 ghostwhite: 0xf8f8ff,
19521 gold: 0xffd700,
19522 goldenrod: 0xdaa520,
19523 gray: 8421504,
19524 green: 32768,
19525 greenyellow: 0xadff2f,
19526 grey: 8421504,
19527 honeydew: 0xf0fff0,
19528 hotpink: 0xff69b4,
19529 indianred: 0xcd5c5c,
19530 indigo: 4915330,
19531 ivory: 0xfffff0,
19532 khaki: 0xf0e68c,
19533 lavender: 0xe6e6fa,
19534 lavenderblush: 0xfff0f5,
19535 lawngreen: 8190976,
19536 lemonchiffon: 0xfffacd,
19537 lightblue: 0xadd8e6,
19538 lightcoral: 0xf08080,
19539 lightcyan: 0xe0ffff,
19540 lightgoldenrodyellow: 0xfafad2,
19541 lightgray: 0xd3d3d3,
19542 lightgreen: 9498256,
19543 lightgrey: 0xd3d3d3,
19544 lightpink: 0xffb6c1,
19545 lightsalmon: 0xffa07a,
19546 lightseagreen: 2142890,
19547 lightskyblue: 8900346,
19548 lightslategray: 7833753,
19549 lightslategrey: 7833753,
19550 lightsteelblue: 0xb0c4de,
19551 lightyellow: 0xffffe0,
19552 lime: 65280,
19553 limegreen: 3329330,
19554 linen: 0xfaf0e6,
19555 magenta: 0xff00ff,
19556 maroon: 8388608,
19557 mediumaquamarine: 6737322,
19558 mediumblue: 205,
19559 mediumorchid: 0xba55d3,
19560 mediumpurple: 9662683,
19561 mediumseagreen: 3978097,
19562 mediumslateblue: 8087790,
19563 mediumspringgreen: 64154,
19564 mediumturquoise: 4772300,
19565 mediumvioletred: 0xc71585,
19566 midnightblue: 1644912,
19567 mintcream: 0xf5fffa,
19568 mistyrose: 0xffe4e1,
19569 moccasin: 0xffe4b5,
19570 navajowhite: 0xffdead,
19571 navy: 128,
19572 oldlace: 0xfdf5e6,
19573 olive: 8421376,
19574 olivedrab: 7048739,
19575 orange: 0xffa500,
19576 orangered: 0xff4500,
19577 orchid: 0xda70d6,
19578 palegoldenrod: 0xeee8aa,
19579 palegreen: 0x98fb98,
19580 paleturquoise: 0xafeeee,
19581 palevioletred: 0xdb7093,
19582 papayawhip: 0xffefd5,
19583 peachpuff: 0xffdab9,
19584 peru: 0xcd853f,
19585 pink: 0xffc0cb,
19586 plum: 0xdda0dd,
19587 powderblue: 0xb0e0e6,
19588 purple: 8388736,
19589 rebeccapurple: 6697881,
19590 red: 0xff0000,
19591 rosybrown: 0xbc8f8f,
19592 royalblue: 4286945,
19593 saddlebrown: 9127187,
19594 salmon: 0xfa8072,
19595 sandybrown: 0xf4a460,
19596 seagreen: 3050327,
19597 seashell: 0xfff5ee,
19598 sienna: 0xa0522d,
19599 silver: 0xc0c0c0,
19600 skyblue: 8900331,
19601 slateblue: 6970061,
19602 slategray: 7372944,
19603 slategrey: 7372944,
19604 snow: 0xfffafa,
19605 springgreen: 65407,
19606 steelblue: 4620980,
19607 tan: 0xd2b48c,
19608 teal: 32896,
19609 thistle: 0xd8bfd8,
19610 tomato: 0xff6347,
19611 turquoise: 4251856,
19612 violet: 0xee82ee,
19613 wheat: 0xf5deb3,
19614 white: 0xffffff,
19615 whitesmoke: 0xf5f5f5,
19616 yellow: 0xffff00,
19617 yellowgreen: 0x9acd32
19618 };
19619src_define(Color, color, {
19620 copy: function copy(channels) {
19621 return Object.assign(new this.constructor(), this, channels);
19622 },
19623 displayable: function displayable() {
19624 return this.rgb().displayable();
19625 },
19626 hex: color_formatHex,
19627 // Deprecated! Use color.formatHex.
19628 formatHex: color_formatHex,
19629 formatHex8: color_formatHex8,
19630 formatHsl: color_formatHsl,
19631 formatRgb: color_formatRgb,
19632 toString: color_formatRgb
19633});
19634function color_formatHex() {
19635 return this.rgb().formatHex();
19636}
19637function color_formatHex8() {
19638 return this.rgb().formatHex8();
19639}
19640function color_formatHsl() {
19641 return hslConvert(this).formatHsl();
19642}
19643function color_formatRgb() {
19644 return this.rgb().formatRgb();
19645}
19646function color(format) {
19647 var m, l;
19648 format = (format + "").trim().toLowerCase();
19649 return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
19650 : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) // #f00
19651 : l === 8 ? rgba(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) // #ff000000
19652 : l === 4 ? rgba(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) // #f000
19653 : null // invalid hex
19654 ) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
19655 : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
19656 : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
19657 : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
19658 : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
19659 : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
19660 : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
19661 : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
19662}
19663function rgbn(n) {
19664 return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
19665}
19666function rgba(r, g, b, a) {
19667 if (a <= 0) r = g = b = NaN;
19668 return new Rgb(r, g, b, a);
19669}
19670function rgbConvert(o) {
19671 if (!(o instanceof Color)) o = color(o);
19672 if (!o) return new Rgb();
19673 o = o.rgb();
19674 return new Rgb(o.r, o.g, o.b, o.opacity);
19675}
19676function color_rgb(r, g, b, opacity) {
19677 return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
19678}
19679function Rgb(r, g, b, opacity) {
19680 this.r = +r;
19681 this.g = +g;
19682 this.b = +b;
19683 this.opacity = +opacity;
19684}
19685src_define(Rgb, color_rgb, extend(Color, {
19686 brighter: function brighter(k) {
19687 k = k == null ? _brighter : Math.pow(_brighter, k);
19688 return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
19689 },
19690 darker: function darker(k) {
19691 k = k == null ? _darker : Math.pow(_darker, k);
19692 return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
19693 },
19694 rgb: function () {
19695 return this;
19696 },
19697 clamp: function clamp() {
19698 return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
19699 },
19700 displayable: function displayable() {
19701 return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
19702 },
19703 hex: rgb_formatHex,
19704 // Deprecated! Use color.formatHex.
19705 formatHex: rgb_formatHex,
19706 formatHex8: rgb_formatHex8,
19707 formatRgb: rgb_formatRgb,
19708 toString: rgb_formatRgb
19709}));
19710function rgb_formatHex() {
19711 return "#" + hex(this.r) + hex(this.g) + hex(this.b);
19712}
19713function rgb_formatHex8() {
19714 return "#" + hex(this.r) + hex(this.g) + hex(this.b) + hex((isNaN(this.opacity) ? 1 : this.opacity) * 255);
19715}
19716function rgb_formatRgb() {
19717 var a = clampa(this.opacity);
19718 return "" + (a === 1 ? "rgb(" : "rgba(") + clampi(this.r) + ", " + clampi(this.g) + ", " + clampi(this.b) + (a === 1 ? ")" : ", " + a + ")");
19719}
19720function clampa(opacity) {
19721 return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
19722}
19723function clampi(value) {
19724 return Math.max(0, Math.min(255, Math.round(value) || 0));
19725}
19726function hex(value) {
19727 value = clampi(value);
19728 return (value < 16 ? "0" : "") + value.toString(16);
19729}
19730function hsla(h, s, l, a) {
19731 if (a <= 0) h = s = l = NaN;else if (l <= 0 || l >= 1) h = s = NaN;else if (s <= 0) h = NaN;
19732 return new Hsl(h, s, l, a);
19733}
19734function hslConvert(o) {
19735 if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
19736 if (!(o instanceof Color)) o = color(o);
19737 if (!o) return new Hsl();
19738 if (o instanceof Hsl) return o;
19739 o = o.rgb();
19740 var r = o.r / 255,
19741 g = o.g / 255,
19742 b = o.b / 255,
19743 min = Math.min(r, g, b),
19744 max = Math.max(r, g, b),
19745 h = NaN,
19746 s = max - min,
19747 l = (max + min) / 2;
19748 if (s) {
19749 if (r === max) h = (g - b) / s + (g < b) * 6;else if (g === max) h = (b - r) / s + 2;else h = (r - g) / s + 4;
19750 s /= l < .5 ? max + min : 2 - max - min;
19751 h *= 60;
19752 } else {
19753 s = l > 0 && l < 1 ? 0 : h;
19754 }
19755 return new Hsl(h, s, l, o.opacity);
19756}
19757function hsl(h, s, l, opacity) {
19758 return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
19759}
19760function Hsl(h, s, l, opacity) {
19761 this.h = +h;
19762 this.s = +s;
19763 this.l = +l;
19764 this.opacity = +opacity;
19765}
19766src_define(Hsl, hsl, extend(Color, {
19767 brighter: function brighter(k) {
19768 k = k == null ? _brighter : Math.pow(_brighter, k);
19769 return new Hsl(this.h, this.s, this.l * k, this.opacity);
19770 },
19771 darker: function darker(k) {
19772 k = k == null ? _darker : Math.pow(_darker, k);
19773 return new Hsl(this.h, this.s, this.l * k, this.opacity);
19774 },
19775 rgb: function () {
19776 var h = this.h % 360 + (this.h < 0) * 360,
19777 s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
19778 l = this.l,
19779 m2 = l + (l < .5 ? l : 1 - l) * s,
19780 m1 = 2 * l - m2;
19781 return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
19782 },
19783 clamp: function clamp() {
19784 return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
19785 },
19786 displayable: function displayable() {
19787 return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
19788 },
19789 formatHsl: function formatHsl() {
19790 var a = clampa(this.opacity);
19791 return "" + (a === 1 ? "hsl(" : "hsla(") + clamph(this.h) + ", " + clampt(this.s) * 100 + "%, " + clampt(this.l) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
19792 }
19793}));
19794function clamph(value) {
19795 value = (value || 0) % 360;
19796 return value < 0 ? value + 360 : value;
19797}
19798function clampt(value) {
19799 return Math.max(0, Math.min(1, value || 0));
19800}
19801
19802/* From FvD 13.37, CSS Color Module Level 3 */
19803function hsl2rgb(h, m1, m2) {
19804 return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
19805}
19806;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/basis.js
19807function basis(t1, v0, v1, v2, v3) {
19808 var t2 = t1 * t1,
19809 t3 = t2 * t1;
19810 return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6;
19811}
19812/* harmony default export */ function src_basis(values) {
19813 var n = values.length - 1;
19814 return function (t) {
19815 var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),
19816 v1 = values[i],
19817 v2 = values[i + 1],
19818 v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,
19819 v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
19820 return basis((t - i / n) * n, v0, v1, v2, v3);
19821 };
19822}
19823;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/basisClosed.js
19824
19825/* harmony default export */ function basisClosed(values) {
19826 var n = values.length;
19827 return function (t) {
19828 var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),
19829 v0 = values[(i + n - 1) % n],
19830 v1 = values[i % n],
19831 v2 = values[(i + 1) % n],
19832 v3 = values[(i + 2) % n];
19833 return basis((t - i / n) * n, v0, v1, v2, v3);
19834 };
19835}
19836;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/constant.js
19837
19838var constant_this = undefined;
19839/* harmony default export */ var src_constant = ((function (x) {
19840 var _this2 = this;
19841 _newArrowCheck(this, constant_this);
19842 return function () {
19843 _newArrowCheck(this, _this2);
19844 return x;
19845 }.bind(this);
19846}).bind(undefined));
19847;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/color.js
19848
19849function linear(a, d) {
19850 return function (t) {
19851 return a + t * d;
19852 };
19853}
19854function exponential(a, b, y) {
19855 return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) {
19856 return Math.pow(a + t * b, y);
19857 };
19858}
19859function hue(a, b) {
19860 var d = b - a;
19861 return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : src_constant(isNaN(a) ? b : a);
19862}
19863function gamma(y) {
19864 return (y = +y) === 1 ? nogamma : function (a, b) {
19865 return b - a ? exponential(a, b, y) : src_constant(isNaN(a) ? b : a);
19866 };
19867}
19868function nogamma(a, b) {
19869 var d = b - a;
19870 return d ? linear(a, d) : src_constant(isNaN(a) ? b : a);
19871}
19872;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/rgb.js
19873
19874
19875
19876
19877/* harmony default export */ var rgb = ((function rgbGamma(y) {
19878 var color = gamma(y);
19879 function rgb(start, end) {
19880 var r = color((start = color_rgb(start)).r, (end = color_rgb(end)).r),
19881 g = color(start.g, end.g),
19882 b = color(start.b, end.b),
19883 opacity = nogamma(start.opacity, end.opacity);
19884 return function (t) {
19885 start.r = r(t);
19886 start.g = g(t);
19887 start.b = b(t);
19888 start.opacity = opacity(t);
19889 return start + "";
19890 };
19891 }
19892 rgb.gamma = rgbGamma;
19893 return rgb;
19894})(1));
19895function rgbSpline(spline) {
19896 return function (colors) {
19897 var n = colors.length,
19898 r = Array(n),
19899 g = Array(n),
19900 b = Array(n),
19901 i,
19902 color;
19903 for (i = 0; i < n; ++i) {
19904 color = color_rgb(colors[i]);
19905 r[i] = color.r || 0;
19906 g[i] = color.g || 0;
19907 b[i] = color.b || 0;
19908 }
19909 r = spline(r);
19910 g = spline(g);
19911 b = spline(b);
19912 color.opacity = 1;
19913 return function (t) {
19914 color.r = r(t);
19915 color.g = g(t);
19916 color.b = b(t);
19917 return color + "";
19918 };
19919 };
19920}
19921var rgbBasis = rgbSpline(src_basis);
19922var rgbBasisClosed = rgbSpline(basisClosed);
19923;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/numberArray.js
19924/* harmony default export */ function numberArray(a, b) {
19925 if (!b) b = [];
19926 var n = a ? Math.min(b.length, a.length) : 0,
19927 c = b.slice(),
19928 i;
19929 return function (t) {
19930 for (i = 0; i < n; ++i) {
19931 c[i] = a[i] * (1 - t) + b[i] * t;
19932 }
19933 return c;
19934 };
19935}
19936function isNumberArray(x) {
19937 return ArrayBuffer.isView(x) && !(x instanceof DataView);
19938}
19939;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/array.js
19940
19941
19942/* harmony default export */ function src_array(a, b) {
19943 return (isNumberArray(b) ? numberArray : genericArray)(a, b);
19944}
19945function genericArray(a, b) {
19946 var nb = b ? b.length : 0,
19947 na = a ? Math.min(nb, a.length) : 0,
19948 x = Array(na),
19949 c = Array(nb),
19950 i;
19951 for (i = 0; i < na; ++i) {
19952 x[i] = value(a[i], b[i]);
19953 }
19954 for (; i < nb; ++i) {
19955 c[i] = b[i];
19956 }
19957 return function (t) {
19958 for (i = 0; i < na; ++i) {
19959 c[i] = x[i](t);
19960 }
19961 return c;
19962 };
19963}
19964;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/date.js
19965/* harmony default export */ function date(a, b) {
19966 var d = new Date();
19967 return a = +a, b = +b, function (t) {
19968 return d.setTime(a * (1 - t) + b * t), d;
19969 };
19970}
19971;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/number.js
19972/* harmony default export */ function number(a, b) {
19973 return a = +a, b = +b, function (t) {
19974 return a * (1 - t) + b * t;
19975 };
19976}
19977;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/object.js
19978
19979/* harmony default export */ function object(a, b) {
19980 var i = {},
19981 c = {},
19982 k;
19983 if (a === null || typeof a !== "object") a = {};
19984 if (b === null || typeof b !== "object") b = {};
19985 for (k in b) {
19986 if (k in a) {
19987 i[k] = value(a[k], b[k]);
19988 } else {
19989 c[k] = b[k];
19990 }
19991 }
19992 return function (t) {
19993 for (k in i) {
19994 c[k] = i[k](t);
19995 }
19996 return c;
19997 };
19998}
19999;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/string.js
20000
20001var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
20002 reB = new RegExp(reA.source, "g");
20003function zero(b) {
20004 return function () {
20005 return b;
20006 };
20007}
20008function one(b) {
20009 return function (t) {
20010 return b(t) + "";
20011 };
20012}
20013/* harmony default export */ function string(a, b) {
20014 var bi = reA.lastIndex = reB.lastIndex = 0,
20015 // scan index for next number in b
20016 am,
20017 // current match in a
20018 bm,
20019 // current match in b
20020 bs,
20021 // string preceding current number in b, if any
20022 i = -1,
20023 // index in s
20024 s = [],
20025 // string constants and placeholders
20026 q = []; // number interpolators
20027
20028 // Coerce inputs to strings.
20029 a = a + "", b = b + "";
20030
20031 // Interpolate pairs of numbers in a & b.
20032 while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
20033 if ((bs = bm.index) > bi) {
20034 // a string precedes the next number in b
20035 bs = b.slice(bi, bs);
20036 if (s[i]) s[i] += bs; // coalesce with previous string
20037 else s[++i] = bs;
20038 }
20039 if ((am = am[0]) === (bm = bm[0])) {
20040 // numbers in a & b match
20041 if (s[i]) s[i] += bm; // coalesce with previous string
20042 else s[++i] = bm;
20043 } else {
20044 // interpolate non-matching numbers
20045 s[++i] = null;
20046 q.push({
20047 i: i,
20048 x: number(am, bm)
20049 });
20050 }
20051 bi = reB.lastIndex;
20052 }
20053
20054 // Add remains of b.
20055 if (bi < b.length) {
20056 bs = b.slice(bi);
20057 if (s[i]) s[i] += bs; // coalesce with previous string
20058 else s[++i] = bs;
20059 }
20060
20061 // Special optimization for only a single match.
20062 // Otherwise, interpolate each of the numbers and rejoin the string.
20063 return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {
20064 for (var i = 0, o; i < b; ++i) {
20065 s[(o = q[i]).i] = o.x(t);
20066 }
20067 return s.join("");
20068 });
20069}
20070;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/value.js
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080/* harmony default export */ function value(a, b) {
20081 var t = typeof b,
20082 c;
20083 return b == null || t === "boolean" ? src_constant(b) : (t === "number" ? number : t === "string" ? (c = color(b)) ? (b = c, rgb) : string : b instanceof color ? rgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object : number)(a, b);
20084}
20085;// CONCATENATED MODULE: ./node_modules/d3-timer/src/timer.js
20086var timer_frame = 0,
20087 // is an animation frame pending?
20088 timeout = 0,
20089 // is a timeout pending?
20090 interval = 0,
20091 // are any timers active?
20092 pokeDelay = 1e3,
20093 // how frequently we check for clock skew
20094 taskHead,
20095 taskTail,
20096 clockLast = 0,
20097 clockNow = 0,
20098 clockSkew = 0,
20099 clock = typeof performance === "object" && performance.now ? performance : Date,
20100 setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {
20101 setTimeout(f, 17);
20102 };
20103function now() {
20104 return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
20105}
20106function clearNow() {
20107 clockNow = 0;
20108}
20109function Timer() {
20110 this._call = this._time = this._next = null;
20111}
20112Timer.prototype = timer.prototype = {
20113 constructor: Timer,
20114 restart: function restart(callback, delay, time) {
20115 if (typeof callback !== "function") throw new TypeError("callback is not a function");
20116 time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
20117 if (!this._next && taskTail !== this) {
20118 if (taskTail) taskTail._next = this;else taskHead = this;
20119 taskTail = this;
20120 }
20121 this._call = callback;
20122 this._time = time;
20123 sleep();
20124 },
20125 stop: function stop() {
20126 if (this._call) {
20127 this._call = null;
20128 this._time = Infinity;
20129 sleep();
20130 }
20131 }
20132};
20133function timer(callback, delay, time) {
20134 var t = new Timer();
20135 t.restart(callback, delay, time);
20136 return t;
20137}
20138function timerFlush() {
20139 now(); // Get the current time, if not already set.
20140 ++timer_frame; // Pretend we’ve set an alarm, if we haven’t already.
20141 var t = taskHead,
20142 e;
20143 while (t) {
20144 if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);
20145 t = t._next;
20146 }
20147 --timer_frame;
20148}
20149function wake() {
20150 clockNow = (clockLast = clock.now()) + clockSkew;
20151 timer_frame = timeout = 0;
20152 try {
20153 timerFlush();
20154 } finally {
20155 timer_frame = 0;
20156 nap();
20157 clockNow = 0;
20158 }
20159}
20160function poke() {
20161 var now = clock.now(),
20162 delay = now - clockLast;
20163 if (delay > pokeDelay) clockSkew -= delay, clockLast = now;
20164}
20165function nap() {
20166 var t0,
20167 t1 = taskHead,
20168 t2,
20169 time = Infinity;
20170 while (t1) {
20171 if (t1._call) {
20172 if (time > t1._time) time = t1._time;
20173 t0 = t1, t1 = t1._next;
20174 } else {
20175 t2 = t1._next, t1._next = null;
20176 t1 = t0 ? t0._next = t2 : taskHead = t2;
20177 }
20178 }
20179 taskTail = t0;
20180 sleep(time);
20181}
20182function sleep(time) {
20183 if (timer_frame) return; // Soonest alarm already set, or will be.
20184 if (timeout) timeout = clearTimeout(timeout);
20185 var delay = time - clockNow; // Strictly less than if we recomputed clockNow.
20186 if (delay > 24) {
20187 if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);
20188 if (interval) interval = clearInterval(interval);
20189 } else {
20190 if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
20191 timer_frame = 1, setFrame(wake);
20192 }
20193}
20194;// CONCATENATED MODULE: ./node_modules/d3-timer/src/timeout.js
20195
20196
20197/* harmony default export */ function src_timeout(callback, delay, time) {
20198 var _this = this,
20199 t = new Timer();
20200 delay = delay == null ? 0 : +delay;
20201 t.restart(function (elapsed) {
20202 _newArrowCheck(this, _this);
20203 t.stop();
20204 callback(elapsed + delay);
20205 }.bind(this), delay, time);
20206 return t;
20207}
20208;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/schedule.js
20209
20210
20211var emptyOn = src_dispatch("start", "end", "cancel", "interrupt"),
20212 emptyTween = [];
20213var CREATED = 0;
20214var SCHEDULED = 1;
20215var STARTING = 2;
20216var STARTED = 3;
20217var RUNNING = 4;
20218var ENDING = 5;
20219var ENDED = 6;
20220/* harmony default export */ function schedule(node, name, id, index, group, timing) {
20221 var schedules = node.__transition;
20222 if (!schedules) node.__transition = {};else if (id in schedules) return;
20223 create(node, id, {
20224 name: name,
20225 index: index,
20226 // For context during callback.
20227 group: group,
20228 // For context during callback.
20229 on: emptyOn,
20230 tween: emptyTween,
20231 time: timing.time,
20232 delay: timing.delay,
20233 duration: timing.duration,
20234 ease: timing.ease,
20235 timer: null,
20236 state: CREATED
20237 });
20238}
20239function init(node, id) {
20240 var schedule = schedule_get(node, id);
20241 if (schedule.state > CREATED) throw new Error("too late; already scheduled");
20242 return schedule;
20243}
20244function schedule_set(node, id) {
20245 var schedule = schedule_get(node, id);
20246 if (schedule.state > STARTED) throw new Error("too late; already running");
20247 return schedule;
20248}
20249function schedule_get(node, id) {
20250 var schedule = node.__transition;
20251 if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
20252 return schedule;
20253}
20254function create(node, id, self) {
20255 var schedules = node.__transition,
20256 tween;
20257
20258 // Initialize the self timer when the transition is created.
20259 // Note the actual delay is not known until the first callback!
20260 schedules[id] = self;
20261 self.timer = timer(function (elapsed) {
20262 self.state = SCHEDULED;
20263 self.timer.restart(start, self.delay, self.time);
20264
20265 // If the elapsed delay is less than our first sleep, start immediately.
20266 if (self.delay <= elapsed) start(elapsed - self.delay);
20267 }, 0, self.time);
20268 function start(elapsed) {
20269 var i, j, n, o;
20270
20271 // If the state is not SCHEDULED, then we previously errored on start.
20272 if (self.state !== SCHEDULED) return stop();
20273 for (i in schedules) {
20274 o = schedules[i];
20275 if (o.name !== self.name) continue;
20276
20277 // While this element already has a starting transition during this frame,
20278 // defer starting an interrupting transition until that transition has a
20279 // chance to tick (and possibly end); see d3/d3-transition#54!
20280 if (o.state === STARTED) return src_timeout(start);
20281
20282 // Interrupt the active transition, if any.
20283 if (o.state === RUNNING) {
20284 o.state = ENDED;
20285 o.timer.stop();
20286 o.on.call("interrupt", node, node.__data__, o.index, o.group);
20287 delete schedules[i];
20288 }
20289
20290 // Cancel any pre-empted transitions.
20291 else if (+i < id) {
20292 o.state = ENDED;
20293 o.timer.stop();
20294 o.on.call("cancel", node, node.__data__, o.index, o.group);
20295 delete schedules[i];
20296 }
20297 }
20298
20299 // Defer the first tick to end of the current frame; see d3/d3#1576.
20300 // Note the transition may be canceled after start and before the first tick!
20301 // Note this must be scheduled before the start event; see d3/d3-transition#16!
20302 // Assuming this is successful, subsequent callbacks go straight to tick.
20303 src_timeout(function () {
20304 if (self.state === STARTED) {
20305 self.state = RUNNING;
20306 self.timer.restart(tick, self.delay, self.time);
20307 tick(elapsed);
20308 }
20309 });
20310
20311 // Dispatch the start event.
20312 // Note this must be done before the tween are initialized.
20313 self.state = STARTING;
20314 self.on.call("start", node, node.__data__, self.index, self.group);
20315 if (self.state !== STARTING) return; // interrupted
20316 self.state = STARTED;
20317
20318 // Initialize the tween, deleting null tween.
20319 tween = Array(n = self.tween.length);
20320 for (i = 0, j = -1; i < n; ++i) {
20321 if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
20322 tween[++j] = o;
20323 }
20324 }
20325 tween.length = j + 1;
20326 }
20327 function tick(elapsed) {
20328 var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),
20329 i = -1,
20330 n = tween.length;
20331 while (++i < n) {
20332 tween[i].call(node, t);
20333 }
20334
20335 // Dispatch the end event.
20336 if (self.state === ENDING) {
20337 self.on.call("end", node, node.__data__, self.index, self.group);
20338 stop();
20339 }
20340 }
20341 function stop() {
20342 self.state = ENDED;
20343 self.timer.stop();
20344 delete schedules[id];
20345 for (var i in schedules) {
20346 return;
20347 } // eslint-disable-line no-unused-vars
20348 delete node.__transition;
20349 }
20350}
20351;// CONCATENATED MODULE: ./node_modules/d3-transition/src/interrupt.js
20352
20353/* harmony default export */ function interrupt(node, name) {
20354 var schedules = node.__transition,
20355 schedule,
20356 active,
20357 empty = !0,
20358 i;
20359 if (!schedules) return;
20360 name = name == null ? null : name + "";
20361 for (i in schedules) {
20362 if ((schedule = schedules[i]).name !== name) {
20363 empty = !1;
20364 continue;
20365 }
20366 active = schedule.state > STARTING && schedule.state < ENDING;
20367 schedule.state = ENDED;
20368 schedule.timer.stop();
20369 schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
20370 delete schedules[i];
20371 }
20372 if (empty) delete node.__transition;
20373}
20374;// CONCATENATED MODULE: ./node_modules/d3-transition/src/selection/interrupt.js
20375
20376/* harmony default export */ function selection_interrupt(name) {
20377 return this.each(function () {
20378 interrupt(this, name);
20379 });
20380}
20381;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/transform/decompose.js
20382var degrees = 180 / Math.PI;
20383var identity = {
20384 translateX: 0,
20385 translateY: 0,
20386 rotate: 0,
20387 skewX: 0,
20388 scaleX: 1,
20389 scaleY: 1
20390};
20391/* harmony default export */ function decompose(a, b, c, d, e, f) {
20392 var scaleX, scaleY, skewX;
20393 if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
20394 if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
20395 if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
20396 if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
20397 return {
20398 translateX: e,
20399 translateY: f,
20400 rotate: Math.atan2(b, a) * degrees,
20401 skewX: Math.atan(skewX) * degrees,
20402 scaleX: scaleX,
20403 scaleY: scaleY
20404 };
20405}
20406;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/transform/parse.js
20407
20408var svgNode;
20409
20410/* eslint-disable no-undef */
20411function parseCss(value) {
20412 var m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
20413 return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
20414}
20415function parseSvg(value) {
20416 if (value == null) return identity;
20417 if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
20418 svgNode.setAttribute("transform", value);
20419 if (!(value = svgNode.transform.baseVal.consolidate())) return identity;
20420 value = value.matrix;
20421 return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
20422}
20423;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/transform/index.js
20424
20425
20426function interpolateTransform(parse, pxComma, pxParen, degParen) {
20427 function pop(s) {
20428 return s.length ? s.pop() + " " : "";
20429 }
20430 function translate(xa, ya, xb, yb, s, q) {
20431 if (xa !== xb || ya !== yb) {
20432 var i = s.push("translate(", null, pxComma, null, pxParen);
20433 q.push({
20434 i: i - 4,
20435 x: number(xa, xb)
20436 }, {
20437 i: i - 2,
20438 x: number(ya, yb)
20439 });
20440 } else if (xb || yb) {
20441 s.push("translate(" + xb + pxComma + yb + pxParen);
20442 }
20443 }
20444 function rotate(a, b, s, q) {
20445 if (a !== b) {
20446 if (a - b > 180) b += 360;else if (b - a > 180) a += 360; // shortest path
20447 q.push({
20448 i: s.push(pop(s) + "rotate(", null, degParen) - 2,
20449 x: number(a, b)
20450 });
20451 } else if (b) {
20452 s.push(pop(s) + "rotate(" + b + degParen);
20453 }
20454 }
20455 function skewX(a, b, s, q) {
20456 if (a !== b) {
20457 q.push({
20458 i: s.push(pop(s) + "skewX(", null, degParen) - 2,
20459 x: number(a, b)
20460 });
20461 } else if (b) {
20462 s.push(pop(s) + "skewX(" + b + degParen);
20463 }
20464 }
20465 function scale(xa, ya, xb, yb, s, q) {
20466 if (xa !== xb || ya !== yb) {
20467 var i = s.push(pop(s) + "scale(", null, ",", null, ")");
20468 q.push({
20469 i: i - 4,
20470 x: number(xa, xb)
20471 }, {
20472 i: i - 2,
20473 x: number(ya, yb)
20474 });
20475 } else if (xb !== 1 || yb !== 1) {
20476 s.push(pop(s) + "scale(" + xb + "," + yb + ")");
20477 }
20478 }
20479 return function (a, b) {
20480 var s = [],
20481 // string constants and placeholders
20482 q = []; // number interpolators
20483 a = parse(a), b = parse(b);
20484 translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
20485 rotate(a.rotate, b.rotate, s, q);
20486 skewX(a.skewX, b.skewX, s, q);
20487 scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
20488 a = b = null; // gc
20489 return function (t) {
20490 var i = -1,
20491 n = q.length,
20492 o;
20493 while (++i < n) {
20494 s[(o = q[i]).i] = o.x(t);
20495 }
20496 return s.join("");
20497 };
20498 };
20499}
20500var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
20501var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
20502;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/tween.js
20503
20504function tweenRemove(id, name) {
20505 var tween0, tween1;
20506 return function () {
20507 var schedule = schedule_set(this, id),
20508 tween = schedule.tween;
20509
20510 // If this node shared tween with the previous node,
20511 // just assign the updated shared tween and we’re done!
20512 // Otherwise, copy-on-write.
20513 if (tween !== tween0) {
20514 tween1 = tween0 = tween;
20515 for (var i = 0, n = tween1.length; i < n; ++i) {
20516 if (tween1[i].name === name) {
20517 tween1 = tween1.slice();
20518 tween1.splice(i, 1);
20519 break;
20520 }
20521 }
20522 }
20523 schedule.tween = tween1;
20524 };
20525}
20526function tweenFunction(id, name, value) {
20527 var tween0, tween1;
20528 if (typeof value !== "function") throw new Error();
20529 return function () {
20530 var schedule = schedule_set(this, id),
20531 tween = schedule.tween;
20532
20533 // If this node shared tween with the previous node,
20534 // just assign the updated shared tween and we’re done!
20535 // Otherwise, copy-on-write.
20536 if (tween !== tween0) {
20537 tween1 = (tween0 = tween).slice();
20538 for (var t = {
20539 name: name,
20540 value: value
20541 }, i = 0, n = tween1.length; i < n; ++i) {
20542 if (tween1[i].name === name) {
20543 tween1[i] = t;
20544 break;
20545 }
20546 }
20547 if (i === n) tween1.push(t);
20548 }
20549 schedule.tween = tween1;
20550 };
20551}
20552/* harmony default export */ function tween(name, value) {
20553 var id = this._id;
20554 name += "";
20555 if (arguments.length < 2) {
20556 for (var tween = schedule_get(this.node(), id).tween, i = 0, n = tween.length, t; i < n; ++i) {
20557 if ((t = tween[i]).name === name) {
20558 return t.value;
20559 }
20560 }
20561 return null;
20562 }
20563 return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));
20564}
20565function tweenValue(transition, name, value) {
20566 var id = transition._id;
20567 transition.each(function () {
20568 var schedule = schedule_set(this, id);
20569 (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);
20570 });
20571 return function (node) {
20572 return schedule_get(node, id).value[name];
20573 };
20574}
20575;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/interpolate.js
20576
20577
20578/* harmony default export */ function interpolate(a, b) {
20579 var c;
20580 return (typeof b === "number" ? number : b instanceof color ? rgb : (c = color(b)) ? (b = c, rgb) : string)(a, b);
20581}
20582;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/attr.js
20583
20584
20585
20586
20587function attr_attrRemove(name) {
20588 return function () {
20589 this.removeAttribute(name);
20590 };
20591}
20592function attr_attrRemoveNS(fullname) {
20593 return function () {
20594 this.removeAttributeNS(fullname.space, fullname.local);
20595 };
20596}
20597function attr_attrConstant(name, interpolate, value1) {
20598 var string00, interpolate0;
20599 return function () {
20600 var string0 = this.getAttribute(name);
20601 return string0 === value1 + "" ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
20602 };
20603}
20604function attr_attrConstantNS(fullname, interpolate, value1) {
20605 var string00, interpolate0;
20606 return function () {
20607 var string0 = this.getAttributeNS(fullname.space, fullname.local);
20608 return string0 === value1 + "" ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
20609 };
20610}
20611function attr_attrFunction(name, interpolate, value) {
20612 var string00, string10, interpolate0;
20613 return function () {
20614 var string0,
20615 value1 = value(this),
20616 string1;
20617 if (value1 == null) return void this.removeAttribute(name);
20618 string0 = this.getAttribute(name);
20619 string1 = value1 + "";
20620 return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
20621 };
20622}
20623function attr_attrFunctionNS(fullname, interpolate, value) {
20624 var string00, string10, interpolate0;
20625 return function () {
20626 var string0,
20627 value1 = value(this),
20628 string1;
20629 if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
20630 string0 = this.getAttributeNS(fullname.space, fullname.local);
20631 string1 = value1 + "";
20632 return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
20633 };
20634}
20635/* harmony default export */ function transition_attr(name, value) {
20636 var fullname = namespace(name),
20637 i = fullname === "transform" ? interpolateTransformSvg : interpolate;
20638 return this.attrTween(name, typeof value === "function" ? (fullname.local ? attr_attrFunctionNS : attr_attrFunction)(fullname, i, tweenValue(this, "attr." + name, value)) : value == null ? (fullname.local ? attr_attrRemoveNS : attr_attrRemove)(fullname) : (fullname.local ? attr_attrConstantNS : attr_attrConstant)(fullname, i, value));
20639}
20640;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/attrTween.js
20641
20642function attrInterpolate(name, i) {
20643 return function (t) {
20644 this.setAttribute(name, i.call(this, t));
20645 };
20646}
20647function attrInterpolateNS(fullname, i) {
20648 return function (t) {
20649 this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
20650 };
20651}
20652function attrTweenNS(fullname, value) {
20653 var t0, i0;
20654 function tween() {
20655 var i = value.apply(this, arguments);
20656 if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
20657 return t0;
20658 }
20659 tween._value = value;
20660 return tween;
20661}
20662function attrTween(name, value) {
20663 var t0, i0;
20664 function tween() {
20665 var i = value.apply(this, arguments);
20666 if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
20667 return t0;
20668 }
20669 tween._value = value;
20670 return tween;
20671}
20672/* harmony default export */ function transition_attrTween(name, value) {
20673 var key = "attr." + name;
20674 if (arguments.length < 2) return (key = this.tween(key)) && key._value;
20675 if (value == null) return this.tween(key, null);
20676 if (typeof value !== "function") throw new Error();
20677 var fullname = namespace(name);
20678 return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
20679}
20680;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/delay.js
20681
20682function delayFunction(id, value) {
20683 return function () {
20684 init(this, id).delay = +value.apply(this, arguments);
20685 };
20686}
20687function delayConstant(id, value) {
20688 return value = +value, function () {
20689 init(this, id).delay = value;
20690 };
20691}
20692/* harmony default export */ function delay(value) {
20693 var id = this._id;
20694 return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id, value)) : schedule_get(this.node(), id).delay;
20695}
20696;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/duration.js
20697
20698function durationFunction(id, value) {
20699 return function () {
20700 schedule_set(this, id).duration = +value.apply(this, arguments);
20701 };
20702}
20703function durationConstant(id, value) {
20704 return value = +value, function () {
20705 schedule_set(this, id).duration = value;
20706 };
20707}
20708/* harmony default export */ function duration(value) {
20709 var id = this._id;
20710 return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id, value)) : schedule_get(this.node(), id).duration;
20711}
20712;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/ease.js
20713
20714function easeConstant(id, value) {
20715 if (typeof value !== "function") throw new Error();
20716 return function () {
20717 schedule_set(this, id).ease = value;
20718 };
20719}
20720/* harmony default export */ function ease(value) {
20721 var id = this._id;
20722 return arguments.length ? this.each(easeConstant(id, value)) : schedule_get(this.node(), id).ease;
20723}
20724;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/easeVarying.js
20725
20726function easeVarying(id, value) {
20727 return function () {
20728 var v = value.apply(this, arguments);
20729 if (typeof v !== "function") throw new Error();
20730 schedule_set(this, id).ease = v;
20731 };
20732}
20733/* harmony default export */ function transition_easeVarying(value) {
20734 if (typeof value !== "function") throw new Error();
20735 return this.each(easeVarying(this._id, value));
20736}
20737;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/filter.js
20738
20739
20740/* harmony default export */ function transition_filter(match) {
20741 if (typeof match !== "function") match = matcher(match);
20742 for (var groups = this._groups, m = groups.length, subgroups = Array(m), j = 0; j < m; ++j) {
20743 for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
20744 if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
20745 subgroup.push(node);
20746 }
20747 }
20748 }
20749 return new Transition(subgroups, this._parents, this._name, this._id);
20750}
20751;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/merge.js
20752
20753/* harmony default export */ function transition_merge(transition) {
20754 if (transition._id !== this._id) throw new Error();
20755 for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = Array(m0), j = 0; j < m; ++j) {
20756 for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = Array(n), node, i = 0; i < n; ++i) {
20757 if (node = group0[i] || group1[i]) {
20758 merge[i] = node;
20759 }
20760 }
20761 }
20762 for (; j < m0; ++j) {
20763 merges[j] = groups0[j];
20764 }
20765 return new Transition(merges, this._parents, this._name, this._id);
20766}
20767;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/on.js
20768
20769function start(name) {
20770 return (name + "").trim().split(/^|\s+/).every(function (t) {
20771 var i = t.indexOf(".");
20772 if (i >= 0) t = t.slice(0, i);
20773 return !t || t === "start";
20774 });
20775}
20776function onFunction(id, name, listener) {
20777 var on0,
20778 on1,
20779 sit = start(name) ? init : schedule_set;
20780 return function () {
20781 var schedule = sit(this, id),
20782 on = schedule.on;
20783
20784 // If this node shared a dispatch with the previous node,
20785 // just assign the updated shared dispatch and we’re done!
20786 // Otherwise, copy-on-write.
20787 if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
20788 schedule.on = on1;
20789 };
20790}
20791/* harmony default export */ function transition_on(name, listener) {
20792 var id = this._id;
20793 return arguments.length < 2 ? schedule_get(this.node(), id).on.on(name) : this.each(onFunction(id, name, listener));
20794}
20795;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/remove.js
20796function removeFunction(id) {
20797 return function () {
20798 var parent = this.parentNode;
20799 for (var i in this.__transition) {
20800 if (+i !== id) return;
20801 }
20802 if (parent) parent.removeChild(this);
20803 };
20804}
20805/* harmony default export */ function transition_remove() {
20806 return this.on("end.remove", removeFunction(this._id));
20807}
20808;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/select.js
20809
20810
20811
20812/* harmony default export */ function transition_select(select) {
20813 var name = this._name,
20814 id = this._id;
20815 if (typeof select !== "function") select = selector(select);
20816 for (var groups = this._groups, m = groups.length, subgroups = Array(m), j = 0; j < m; ++j) {
20817 for (var group = groups[j], n = group.length, subgroup = subgroups[j] = Array(n), node, subnode, i = 0; i < n; ++i) {
20818 if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
20819 if ("__data__" in node) subnode.__data__ = node.__data__;
20820 subgroup[i] = subnode;
20821 schedule(subgroup[i], name, id, i, subgroup, schedule_get(node, id));
20822 }
20823 }
20824 }
20825 return new Transition(subgroups, this._parents, name, id);
20826}
20827;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/selectAll.js
20828
20829
20830
20831/* harmony default export */ function transition_selectAll(select) {
20832 var name = this._name,
20833 id = this._id;
20834 if (typeof select !== "function") select = selectorAll(select);
20835 for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
20836 for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
20837 if (node = group[i]) {
20838 for (var children = select.call(node, node.__data__, i, group), child, inherit = schedule_get(node, id), k = 0, l = children.length; k < l; ++k) {
20839 if (child = children[k]) {
20840 schedule(child, name, id, k, children, inherit);
20841 }
20842 }
20843 subgroups.push(children);
20844 parents.push(node);
20845 }
20846 }
20847 }
20848 return new Transition(subgroups, parents, name, id);
20849}
20850;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/selection.js
20851
20852var selection_Selection = src_selection.prototype.constructor;
20853/* harmony default export */ function transition_selection() {
20854 return new selection_Selection(this._groups, this._parents);
20855}
20856;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/style.js
20857
20858
20859
20860
20861
20862function styleNull(name, interpolate) {
20863 var string00, string10, interpolate0;
20864 return function () {
20865 var string0 = styleValue(this, name),
20866 string1 = (this.style.removeProperty(name), styleValue(this, name));
20867 return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1);
20868 };
20869}
20870function style_styleRemove(name) {
20871 return function () {
20872 this.style.removeProperty(name);
20873 };
20874}
20875function style_styleConstant(name, interpolate, value1) {
20876 var string00, interpolate0;
20877 return function () {
20878 var string0 = styleValue(this, name);
20879 return string0 === value1 + "" ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
20880 };
20881}
20882function style_styleFunction(name, interpolate, value) {
20883 var string00, string10, interpolate0;
20884 return function () {
20885 var string0 = styleValue(this, name),
20886 value1 = value(this),
20887 string1 = value1 + "";
20888 if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
20889 return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
20890 };
20891}
20892function styleMaybeRemove(id, name) {
20893 var on0,
20894 on1,
20895 listener0,
20896 key = "style." + name,
20897 remove;
20898 return function () {
20899 var schedule = schedule_set(this, id),
20900 on = schedule.on,
20901 listener = schedule.value[key] == null ? remove || (remove = style_styleRemove(name)) : undefined;
20902
20903 // If this node shared a dispatch with the previous node,
20904 // just assign the updated shared dispatch and we’re done!
20905 // Otherwise, copy-on-write.
20906 if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on("end." + key, listener0 = listener);
20907 schedule.on = on1;
20908 };
20909}
20910/* harmony default export */ function transition_style(name, value, priority) {
20911 var i = (name += "") === "transform" ? interpolateTransformCss : interpolate;
20912 return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, style_styleRemove(name)) : typeof value === "function" ? this.styleTween(name, style_styleFunction(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, style_styleConstant(name, i, value), priority).on("end.style." + name, null);
20913}
20914;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/styleTween.js
20915function styleInterpolate(name, i, priority) {
20916 return function (t) {
20917 this.style.setProperty(name, i.call(this, t), priority);
20918 };
20919}
20920function styleTween(name, value, priority) {
20921 var t, i0;
20922 function tween() {
20923 var i = value.apply(this, arguments);
20924 if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
20925 return t;
20926 }
20927 tween._value = value;
20928 return tween;
20929}
20930/* harmony default export */ function transition_styleTween(name, value, priority) {
20931 var key = "style." + (name += "");
20932 if (arguments.length < 2) return (key = this.tween(key)) && key._value;
20933 if (value == null) return this.tween(key, null);
20934 if (typeof value !== "function") throw new Error();
20935 return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
20936}
20937;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/text.js
20938
20939function text_textConstant(value) {
20940 return function () {
20941 this.textContent = value;
20942 };
20943}
20944function text_textFunction(value) {
20945 return function () {
20946 var value1 = value(this);
20947 this.textContent = value1 == null ? "" : value1;
20948 };
20949}
20950/* harmony default export */ function transition_text(value) {
20951 return this.tween("text", typeof value === "function" ? text_textFunction(tweenValue(this, "text", value)) : text_textConstant(value == null ? "" : value + ""));
20952}
20953;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/textTween.js
20954function textInterpolate(i) {
20955 return function (t) {
20956 this.textContent = i.call(this, t);
20957 };
20958}
20959function textTween(value) {
20960 var t0, i0;
20961 function tween() {
20962 var i = value.apply(this, arguments);
20963 if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
20964 return t0;
20965 }
20966 tween._value = value;
20967 return tween;
20968}
20969/* harmony default export */ function transition_textTween(value) {
20970 var key = "text";
20971 if (arguments.length < 1) return (key = this.tween(key)) && key._value;
20972 if (value == null) return this.tween(key, null);
20973 if (typeof value !== "function") throw new Error();
20974 return this.tween(key, textTween(value));
20975}
20976;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/transition.js
20977
20978
20979/* harmony default export */ function transition() {
20980 for (var name = this._name, id0 = this._id, id1 = newId(), groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
20981 for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
20982 if (node = group[i]) {
20983 var inherit = schedule_get(node, id0);
20984 schedule(node, name, id1, i, group, {
20985 time: inherit.time + inherit.delay + inherit.duration,
20986 delay: 0,
20987 duration: inherit.duration,
20988 ease: inherit.ease
20989 });
20990 }
20991 }
20992 }
20993 return new Transition(groups, this._parents, name, id1);
20994}
20995;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/end.js
20996
20997/* harmony default export */ function end() {
20998 var on0,
20999 on1,
21000 that = this,
21001 id = that._id,
21002 size = that.size();
21003 return new Promise(function (resolve, reject) {
21004 var cancel = {
21005 value: reject
21006 },
21007 end = {
21008 value: function value() {
21009 if (--size === 0) resolve();
21010 }
21011 };
21012 that.each(function () {
21013 var schedule = schedule_set(this, id),
21014 on = schedule.on;
21015
21016 // If this node shared a dispatch with the previous node,
21017 // just assign the updated shared dispatch and we’re done!
21018 // Otherwise, copy-on-write.
21019 if (on !== on0) {
21020 on1 = (on0 = on).copy();
21021 on1._.cancel.push(cancel);
21022 on1._.interrupt.push(cancel);
21023 on1._.end.push(end);
21024 }
21025 schedule.on = on1;
21026 });
21027
21028 // The selection was empty, resolve end immediately
21029 if (size === 0) resolve();
21030 });
21031}
21032;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/index.js
21033var _transition$prototype;
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055var id = 0;
21056function Transition(groups, parents, name, id) {
21057 this._groups = groups;
21058 this._parents = parents;
21059 this._name = name;
21060 this._id = id;
21061}
21062function transition_transition(name) {
21063 return src_selection().transition(name);
21064}
21065function newId() {
21066 return ++id;
21067}
21068var selection_prototype = src_selection.prototype;
21069Transition.prototype = transition_transition.prototype = (_transition$prototype = {
21070 constructor: Transition,
21071 select: transition_select,
21072 selectAll: transition_selectAll,
21073 selectChild: selection_prototype.selectChild,
21074 selectChildren: selection_prototype.selectChildren,
21075 filter: transition_filter,
21076 merge: transition_merge,
21077 selection: transition_selection,
21078 transition: transition,
21079 call: selection_prototype.call,
21080 nodes: selection_prototype.nodes,
21081 node: selection_prototype.node,
21082 size: selection_prototype.size,
21083 empty: selection_prototype.empty,
21084 each: selection_prototype.each,
21085 on: transition_on,
21086 attr: transition_attr,
21087 attrTween: transition_attrTween,
21088 style: transition_style,
21089 styleTween: transition_styleTween,
21090 text: transition_text,
21091 textTween: transition_textTween,
21092 remove: transition_remove,
21093 tween: tween,
21094 delay: delay,
21095 duration: duration,
21096 ease: ease,
21097 easeVarying: transition_easeVarying,
21098 end: end
21099}, _transition$prototype[Symbol.iterator] = selection_prototype[Symbol.iterator], _transition$prototype);
21100;// CONCATENATED MODULE: ./node_modules/d3-ease/src/cubic.js
21101function cubicIn(t) {
21102 return t * t * t;
21103}
21104function cubicOut(t) {
21105 return --t * t * t + 1;
21106}
21107function cubicInOut(t) {
21108 return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
21109}
21110;// CONCATENATED MODULE: ./node_modules/d3-transition/src/selection/transition.js
21111
21112
21113
21114
21115var defaultTiming = {
21116 time: null,
21117 // Set on use.
21118 delay: 0,
21119 duration: 250,
21120 ease: cubicInOut
21121};
21122function inherit(node, id) {
21123 var timing;
21124 while (!(timing = node.__transition) || !(timing = timing[id])) {
21125 if (!(node = node.parentNode)) {
21126 throw new Error("transition " + id + " not found");
21127 }
21128 }
21129 return timing;
21130}
21131/* harmony default export */ function selection_transition(name) {
21132 var id, timing;
21133 if (name instanceof Transition) {
21134 id = name._id, name = name._name;
21135 } else {
21136 id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
21137 }
21138 for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
21139 for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
21140 if (node = group[i]) {
21141 schedule(node, name, id, i, group, timing || inherit(node, id));
21142 }
21143 }
21144 }
21145 return new Transition(groups, this._parents, name, id);
21146}
21147;// CONCATENATED MODULE: ./node_modules/d3-transition/src/selection/index.js
21148
21149
21150
21151src_selection.prototype.interrupt = selection_interrupt;
21152src_selection.prototype.transition = selection_transition;
21153;// CONCATENATED MODULE: ./node_modules/d3-transition/src/index.js
21154
21155
21156
21157
21158;// CONCATENATED MODULE: ./node_modules/d3-brush/src/constant.js
21159
21160var src_constant_this = undefined;
21161/* harmony default export */ var d3_brush_src_constant = ((function (x) {
21162 var _this2 = this;
21163 _newArrowCheck(this, src_constant_this);
21164 return function () {
21165 _newArrowCheck(this, _this2);
21166 return x;
21167 }.bind(this);
21168}).bind(undefined));
21169;// CONCATENATED MODULE: ./node_modules/d3-brush/src/event.js
21170function BrushEvent(type, _ref) {
21171 var sourceEvent = _ref.sourceEvent,
21172 target = _ref.target,
21173 selection = _ref.selection,
21174 mode = _ref.mode,
21175 dispatch = _ref.dispatch;
21176 Object.defineProperties(this, {
21177 type: {
21178 value: type,
21179 enumerable: !0,
21180 configurable: !0
21181 },
21182 sourceEvent: {
21183 value: sourceEvent,
21184 enumerable: !0,
21185 configurable: !0
21186 },
21187 target: {
21188 value: target,
21189 enumerable: !0,
21190 configurable: !0
21191 },
21192 selection: {
21193 value: selection,
21194 enumerable: !0,
21195 configurable: !0
21196 },
21197 mode: {
21198 value: mode,
21199 enumerable: !0,
21200 configurable: !0
21201 },
21202 _: {
21203 value: dispatch
21204 }
21205 });
21206}
21207;// CONCATENATED MODULE: ./node_modules/d3-brush/src/noevent.js
21208function noevent_nopropagation(event) {
21209 event.stopImmediatePropagation();
21210}
21211/* harmony default export */ function src_noevent(event) {
21212 event.preventDefault();
21213 event.stopImmediatePropagation();
21214}
21215;// CONCATENATED MODULE: ./node_modules/d3-brush/src/brush.js
21216
21217function brush_createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = brush_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: !0 }; return { done: !1, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
21218function brush_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return brush_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return brush_arrayLikeToArray(o, minLen); }
21219function brush_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
21220
21221
21222
21223
21224
21225
21226
21227
21228var MODE_DRAG = {
21229 name: "drag"
21230 },
21231 MODE_SPACE = {
21232 name: "space"
21233 },
21234 MODE_HANDLE = {
21235 name: "handle"
21236 },
21237 MODE_CENTER = {
21238 name: "center"
21239 },
21240 abs = Math.abs,
21241 max = Math.max,
21242 min = Math.min;
21243function number1(e) {
21244 return [+e[0], +e[1]];
21245}
21246function number2(e) {
21247 return [number1(e[0]), number1(e[1])];
21248}
21249var X = {
21250 name: "x",
21251 handles: ["w", "e"].map(type),
21252 input: function input(x, e) {
21253 return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]];
21254 },
21255 output: function output(xy) {
21256 return xy && [xy[0][0], xy[1][0]];
21257 }
21258 },
21259 Y = {
21260 name: "y",
21261 handles: ["n", "s"].map(type),
21262 input: function input(y, e) {
21263 return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]];
21264 },
21265 output: function output(xy) {
21266 return xy && [xy[0][1], xy[1][1]];
21267 }
21268 },
21269 XY = {
21270 name: "xy",
21271 handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type),
21272 input: function input(xy) {
21273 return xy == null ? null : number2(xy);
21274 },
21275 output: function output(xy) {
21276 return xy;
21277 }
21278 },
21279 cursors = {
21280 overlay: "crosshair",
21281 selection: "move",
21282 n: "ns-resize",
21283 e: "ew-resize",
21284 s: "ns-resize",
21285 w: "ew-resize",
21286 nw: "nwse-resize",
21287 ne: "nesw-resize",
21288 se: "nwse-resize",
21289 sw: "nesw-resize"
21290 },
21291 flipX = {
21292 e: "w",
21293 w: "e",
21294 nw: "ne",
21295 ne: "nw",
21296 se: "sw",
21297 sw: "se"
21298 },
21299 flipY = {
21300 n: "s",
21301 s: "n",
21302 nw: "sw",
21303 ne: "se",
21304 se: "ne",
21305 sw: "nw"
21306 },
21307 signsX = {
21308 overlay: 1,
21309 selection: 1,
21310 n: null,
21311 e: 1,
21312 s: null,
21313 w: -1,
21314 nw: -1,
21315 ne: 1,
21316 se: 1,
21317 sw: -1
21318 },
21319 signsY = {
21320 overlay: 1,
21321 selection: 1,
21322 n: -1,
21323 e: null,
21324 s: 1,
21325 w: null,
21326 nw: -1,
21327 ne: -1,
21328 se: 1,
21329 sw: 1
21330 };
21331function type(t) {
21332 return {
21333 type: t
21334 };
21335}
21336
21337// Ignore right-click, since that should open the context menu.
21338function defaultFilter(event) {
21339 return !event.ctrlKey && !event.button;
21340}
21341function defaultExtent() {
21342 var svg = this.ownerSVGElement || this;
21343 if (svg.hasAttribute("viewBox")) {
21344 svg = svg.viewBox.baseVal;
21345 return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];
21346 }
21347 return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];
21348}
21349function defaultTouchable() {
21350 return navigator.maxTouchPoints || "ontouchstart" in this;
21351}
21352
21353// Like d3.local, but with the name “__brush” rather than auto-generated.
21354function local(node) {
21355 while (!node.__brush) {
21356 if (!(node = node.parentNode)) return;
21357 }
21358 return node.__brush;
21359}
21360function brush_empty(extent) {
21361 return extent[0][0] === extent[1][0] || extent[0][1] === extent[1][1];
21362}
21363function brushSelection(node) {
21364 var state = node.__brush;
21365 return state ? state.dim.output(state.selection) : null;
21366}
21367function brushX() {
21368 return brush_brush(X);
21369}
21370function brushY() {
21371 return brush_brush(Y);
21372}
21373/* harmony default export */ function brush() {
21374 return brush_brush(XY);
21375}
21376function brush_brush(dim) {
21377 var extent = defaultExtent,
21378 filter = defaultFilter,
21379 touchable = defaultTouchable,
21380 keys = !0,
21381 listeners = src_dispatch("start", "brush", "end"),
21382 handleSize = 6,
21383 touchending;
21384 function brush(group) {
21385 var overlay = group.property("__brush", initialize).selectAll(".overlay").data([type("overlay")]);
21386 overlay.enter().append("rect").attr("class", "overlay").attr("pointer-events", "all").attr("cursor", cursors.overlay).merge(overlay).each(function () {
21387 var extent = local(this).extent;
21388 src_select(this).attr("x", extent[0][0]).attr("y", extent[0][1]).attr("width", extent[1][0] - extent[0][0]).attr("height", extent[1][1] - extent[0][1]);
21389 });
21390 group.selectAll(".selection").data([type("selection")]).enter().append("rect").attr("class", "selection").attr("cursor", cursors.selection).attr("fill", "#777").attr("fill-opacity", .3).attr("stroke", "#fff").attr("shape-rendering", "crispEdges");
21391 var handle = group.selectAll(".handle").data(dim.handles, function (d) {
21392 return d.type;
21393 });
21394 handle.exit().remove();
21395 handle.enter().append("rect").attr("class", function (d) {
21396 return "handle handle--" + d.type;
21397 }).attr("cursor", function (d) {
21398 return cursors[d.type];
21399 });
21400 group.each(redraw).attr("fill", "none").attr("pointer-events", "all").on("mousedown.brush", started).filter(touchable).on("touchstart.brush", started).on("touchmove.brush", touchmoved).on("touchend.brush touchcancel.brush", touchended).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
21401 }
21402 brush.move = function (group, selection, event) {
21403 if (group.tween) {
21404 group.on("start.brush", function (event) {
21405 emitter(this, arguments).beforestart().start(event);
21406 }).on("interrupt.brush end.brush", function (event) {
21407 emitter(this, arguments).end(event);
21408 }).tween("brush", function () {
21409 var that = this,
21410 state = that.__brush,
21411 emit = emitter(that, arguments),
21412 selection0 = state.selection,
21413 selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent),
21414 i = value(selection0, selection1);
21415 function tween(t) {
21416 state.selection = t === 1 && selection1 === null ? null : i(t);
21417 redraw.call(that);
21418 emit.brush();
21419 }
21420 return selection0 !== null && selection1 !== null ? tween : tween(1);
21421 });
21422 } else {
21423 group.each(function () {
21424 var that = this,
21425 args = arguments,
21426 state = that.__brush,
21427 selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent),
21428 emit = emitter(that, args).beforestart();
21429 interrupt(that);
21430 state.selection = selection1 === null ? null : selection1;
21431 redraw.call(that);
21432 emit.start(event).brush(event).end(event);
21433 });
21434 }
21435 };
21436 brush.clear = function (group, event) {
21437 brush.move(group, null, event);
21438 };
21439 function redraw() {
21440 var group = src_select(this),
21441 selection = local(this).selection;
21442 if (selection) {
21443 group.selectAll(".selection").style("display", null).attr("x", selection[0][0]).attr("y", selection[0][1]).attr("width", selection[1][0] - selection[0][0]).attr("height", selection[1][1] - selection[0][1]);
21444 group.selectAll(".handle").style("display", null).attr("x", function (d) {
21445 return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2;
21446 }).attr("y", function (d) {
21447 return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2;
21448 }).attr("width", function (d) {
21449 return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize;
21450 }).attr("height", function (d) {
21451 return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize;
21452 });
21453 } else {
21454 group.selectAll(".selection,.handle").style("display", "none").attr("x", null).attr("y", null).attr("width", null).attr("height", null);
21455 }
21456 }
21457 function emitter(that, args, clean) {
21458 var emit = that.__brush.emitter;
21459 return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);
21460 }
21461 function Emitter(that, args, clean) {
21462 this.that = that;
21463 this.args = args;
21464 this.state = that.__brush;
21465 this.active = 0;
21466 this.clean = clean;
21467 }
21468 Emitter.prototype = {
21469 beforestart: function beforestart() {
21470 if (++this.active === 1) this.state.emitter = this, this.starting = !0;
21471 return this;
21472 },
21473 start: function start(event, mode) {
21474 if (this.starting) this.starting = !1, this.emit("start", event, mode);else this.emit("brush", event);
21475 return this;
21476 },
21477 brush: function (event, mode) {
21478 this.emit("brush", event, mode);
21479 return this;
21480 },
21481 end: function end(event, mode) {
21482 if (--this.active === 0) delete this.state.emitter, this.emit("end", event, mode);
21483 return this;
21484 },
21485 emit: function emit(type, event, mode) {
21486 var d = src_select(this.that).datum();
21487 listeners.call(type, this.that, new BrushEvent(type, {
21488 sourceEvent: event,
21489 target: brush,
21490 selection: dim.output(this.state.selection),
21491 mode: mode,
21492 dispatch: listeners
21493 }), d);
21494 }
21495 };
21496 function started(event) {
21497 var _this = this;
21498 if (touchending && !event.touches) return;
21499 if (!filter.apply(this, arguments)) return;
21500 var that = this,
21501 type = event.target.__data__.type,
21502 mode = (keys && event.metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : keys && event.altKey ? MODE_CENTER : MODE_HANDLE,
21503 signX = dim === Y ? null : signsX[type],
21504 signY = dim === X ? null : signsY[type],
21505 state = local(that),
21506 extent = state.extent,
21507 selection = state.selection,
21508 W = extent[0][0],
21509 w0,
21510 w1,
21511 N = extent[0][1],
21512 n0,
21513 n1,
21514 E = extent[1][0],
21515 e0,
21516 e1,
21517 S = extent[1][1],
21518 s0,
21519 s1,
21520 dx = 0,
21521 dy = 0,
21522 moving,
21523 shifting = signX && signY && keys && event.shiftKey,
21524 lockX,
21525 lockY,
21526 points = Array.from(event.touches || [event], function (t) {
21527 _newArrowCheck(this, _this);
21528 var i = t.identifier;
21529 t = src_pointer(t, that);
21530 t.point0 = t.slice();
21531 t.identifier = i;
21532 return t;
21533 }.bind(this));
21534 interrupt(that);
21535 var emit = emitter(that, arguments, !0).beforestart();
21536 if (type === "overlay") {
21537 if (selection) moving = !0;
21538 var pts = [points[0], points[1] || points[0]];
21539 state.selection = selection = [[w0 = dim === Y ? W : min(pts[0][0], pts[1][0]), n0 = dim === X ? N : min(pts[0][1], pts[1][1])], [e0 = dim === Y ? E : max(pts[0][0], pts[1][0]), s0 = dim === X ? S : max(pts[0][1], pts[1][1])]];
21540 if (points.length > 1) move(event);
21541 } else {
21542 w0 = selection[0][0];
21543 n0 = selection[0][1];
21544 e0 = selection[1][0];
21545 s0 = selection[1][1];
21546 }
21547 w1 = w0;
21548 n1 = n0;
21549 e1 = e0;
21550 s1 = s0;
21551 var group = src_select(that).attr("pointer-events", "none"),
21552 overlay = group.selectAll(".overlay").attr("cursor", cursors[type]);
21553 if (event.touches) {
21554 emit.moved = moved;
21555 emit.ended = ended;
21556 } else {
21557 var view = src_select(event.view).on("mousemove.brush", moved, !0).on("mouseup.brush", ended, !0);
21558 if (keys) view.on("keydown.brush", keydowned, !0).on("keyup.brush", keyupped, !0);
21559 nodrag(event.view);
21560 }
21561 redraw.call(that);
21562 emit.start(event, mode.name);
21563 function moved(event) {
21564 for (var _iterator = brush_createForOfIteratorHelperLoose(event.changedTouches || [event]), _step; !(_step = _iterator()).done;) {
21565 var p = _step.value;
21566 for (var _iterator3 = brush_createForOfIteratorHelperLoose(points), _step3; !(_step3 = _iterator3()).done;) {
21567 var d = _step3.value;
21568 if (d.identifier === p.identifier) d.cur = src_pointer(p, that);
21569 }
21570 }
21571 if (shifting && !lockX && !lockY && points.length === 1) {
21572 var point = points[0];
21573 if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1])) lockY = !0;else lockX = !0;
21574 }
21575 for (var _iterator2 = brush_createForOfIteratorHelperLoose(points), _step2; !(_step2 = _iterator2()).done;) {
21576 var _point = _step2.value;
21577 if (_point.cur) _point[0] = _point.cur[0], _point[1] = _point.cur[1];
21578 }
21579 moving = !0;
21580 src_noevent(event);
21581 move(event);
21582 }
21583 function move(event) {
21584 var point = points[0],
21585 point0 = point.point0,
21586 t;
21587 dx = point[0] - point0[0];
21588 dy = point[1] - point0[1];
21589 switch (mode) {
21590 case MODE_SPACE:
21591 case MODE_DRAG:
21592 {
21593 if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;
21594 if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;
21595 break;
21596 }
21597 case MODE_HANDLE:
21598 {
21599 if (points[1]) {
21600 if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;
21601 if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;
21602 } else {
21603 if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;
21604 if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;
21605 }
21606 break;
21607 }
21608 case MODE_CENTER:
21609 {
21610 if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));
21611 if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));
21612 break;
21613 }
21614 }
21615 if (e1 < w1) {
21616 signX *= -1;
21617 t = w0, w0 = e0, e0 = t;
21618 t = w1, w1 = e1, e1 = t;
21619 if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]);
21620 }
21621 if (s1 < n1) {
21622 signY *= -1;
21623 t = n0, n0 = s0, s0 = t;
21624 t = n1, n1 = s1, s1 = t;
21625 if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]);
21626 }
21627 if (state.selection) selection = state.selection; // May be set by brush.move!
21628 if (lockX) w1 = selection[0][0], e1 = selection[1][0];
21629 if (lockY) n1 = selection[0][1], s1 = selection[1][1];
21630 if (selection[0][0] !== w1 || selection[0][1] !== n1 || selection[1][0] !== e1 || selection[1][1] !== s1) {
21631 state.selection = [[w1, n1], [e1, s1]];
21632 redraw.call(that);
21633 emit.brush(event, mode.name);
21634 }
21635 }
21636 function ended(event) {
21637 noevent_nopropagation(event);
21638 if (event.touches) {
21639 if (event.touches.length) return;
21640 if (touchending) clearTimeout(touchending);
21641 touchending = setTimeout(function () {
21642 touchending = null;
21643 }, 500); // Ghost clicks are delayed!
21644 } else {
21645 yesdrag(event.view, moving);
21646 view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null);
21647 }
21648 group.attr("pointer-events", "all");
21649 overlay.attr("cursor", cursors.overlay);
21650 if (state.selection) selection = state.selection; // May be set by brush.move (on start)!
21651 if (brush_empty(selection)) state.selection = null, redraw.call(that);
21652 emit.end(event, mode.name);
21653 }
21654 function keydowned(event) {
21655 switch (event.keyCode) {
21656 case 16:
21657 {
21658 // SHIFT
21659 shifting = signX && signY;
21660 break;
21661 }
21662 case 18:
21663 {
21664 // ALT
21665 if (mode === MODE_HANDLE) {
21666 if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
21667 if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
21668 mode = MODE_CENTER;
21669 move(event);
21670 }
21671 break;
21672 }
21673 case 32:
21674 {
21675 // SPACE; takes priority over ALT
21676 if (mode === MODE_HANDLE || mode === MODE_CENTER) {
21677 if (signX < 0) e0 = e1 - dx;else if (signX > 0) w0 = w1 - dx;
21678 if (signY < 0) s0 = s1 - dy;else if (signY > 0) n0 = n1 - dy;
21679 mode = MODE_SPACE;
21680 overlay.attr("cursor", cursors.selection);
21681 move(event);
21682 }
21683 break;
21684 }
21685 default:
21686 return;
21687 }
21688 src_noevent(event);
21689 }
21690 function keyupped(event) {
21691 switch (event.keyCode) {
21692 case 16:
21693 {
21694 // SHIFT
21695 if (shifting) {
21696 lockX = lockY = shifting = !1;
21697 move(event);
21698 }
21699 break;
21700 }
21701 case 18:
21702 {
21703 // ALT
21704 if (mode === MODE_CENTER) {
21705 if (signX < 0) e0 = e1;else if (signX > 0) w0 = w1;
21706 if (signY < 0) s0 = s1;else if (signY > 0) n0 = n1;
21707 mode = MODE_HANDLE;
21708 move(event);
21709 }
21710 break;
21711 }
21712 case 32:
21713 {
21714 // SPACE
21715 if (mode === MODE_SPACE) {
21716 if (event.altKey) {
21717 if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
21718 if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
21719 mode = MODE_CENTER;
21720 } else {
21721 if (signX < 0) e0 = e1;else if (signX > 0) w0 = w1;
21722 if (signY < 0) s0 = s1;else if (signY > 0) n0 = n1;
21723 mode = MODE_HANDLE;
21724 }
21725 overlay.attr("cursor", cursors[type]);
21726 move(event);
21727 }
21728 break;
21729 }
21730 default:
21731 return;
21732 }
21733 src_noevent(event);
21734 }
21735 }
21736 function touchmoved(event) {
21737 emitter(this, arguments).moved(event);
21738 }
21739 function touchended(event) {
21740 emitter(this, arguments).ended(event);
21741 }
21742 function initialize() {
21743 var state = this.__brush || {
21744 selection: null
21745 };
21746 state.extent = number2(extent.apply(this, arguments));
21747 state.dim = dim;
21748 return state;
21749 }
21750 brush.extent = function (_) {
21751 return arguments.length ? (extent = typeof _ === "function" ? _ : d3_brush_src_constant(number2(_)), brush) : extent;
21752 };
21753 brush.filter = function (_) {
21754 return arguments.length ? (filter = typeof _ === "function" ? _ : d3_brush_src_constant(!!_), brush) : filter;
21755 };
21756 brush.touchable = function (_) {
21757 return arguments.length ? (touchable = typeof _ === "function" ? _ : d3_brush_src_constant(!!_), brush) : touchable;
21758 };
21759 brush.handleSize = function (_) {
21760 return arguments.length ? (handleSize = +_, brush) : handleSize;
21761 };
21762 brush.keyModifiers = function (_) {
21763 return arguments.length ? (keys = !!_, brush) : keys;
21764 };
21765 brush.on = function () {
21766 var value = listeners.on.apply(listeners, arguments);
21767 return value === listeners ? brush : value;
21768 };
21769 return brush;
21770}
21771;// CONCATENATED MODULE: ./node_modules/d3-brush/src/index.js
21772
21773;// CONCATENATED MODULE: ./src/module/util.ts
21774
21775
21776var util_this = undefined;
21777function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21778function _objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21779/**
21780 * Copyright (c) 2017 ~ present NAVER Corp.
21781 * billboard.js project is licensed under the MIT license
21782 * @ignore
21783 */
21784
21785
21786
21787
21788var isValue = function (v) {
21789 _newArrowCheck(this, util_this);
21790 return v || v === 0;
21791 }.bind(undefined),
21792 isFunction = function (v) {
21793 _newArrowCheck(this, util_this);
21794 return typeof v === "function";
21795 }.bind(undefined),
21796 isString = function (v) {
21797 _newArrowCheck(this, util_this);
21798 return typeof v === "string";
21799 }.bind(undefined),
21800 isNumber = function (v) {
21801 _newArrowCheck(this, util_this);
21802 return typeof v === "number";
21803 }.bind(undefined),
21804 isUndefined = function (v) {
21805 _newArrowCheck(this, util_this);
21806 return typeof v === "undefined";
21807 }.bind(undefined),
21808 isDefined = function (v) {
21809 _newArrowCheck(this, util_this);
21810 return typeof v !== "undefined";
21811 }.bind(undefined),
21812 isboolean = function (v) {
21813 _newArrowCheck(this, util_this);
21814 return typeof v === "boolean";
21815 }.bind(undefined),
21816 ceil10 = function (v) {
21817 _newArrowCheck(this, util_this);
21818 return Math.ceil(v / 10) * 10;
21819 }.bind(undefined),
21820 asHalfPixel = function (n) {
21821 _newArrowCheck(this, util_this);
21822 return Math.ceil(n) + .5;
21823 }.bind(undefined),
21824 diffDomain = function (d) {
21825 _newArrowCheck(this, util_this);
21826 return d[1] - d[0];
21827 }.bind(undefined),
21828 isObjectType = function (v) {
21829 _newArrowCheck(this, util_this);
21830 return typeof v === "object";
21831 }.bind(undefined),
21832 isEmpty = function (o) {
21833 _newArrowCheck(this, util_this);
21834 return isUndefined(o) || o === null || isString(o) && o.length === 0 || isObjectType(o) && !(o instanceof Date) && Object.keys(o).length === 0 || isNumber(o) && isNaN(o);
21835 }.bind(undefined),
21836 notEmpty = function (o) {
21837 _newArrowCheck(this, util_this);
21838 return !isEmpty(o);
21839 }.bind(undefined),
21840 isArray = function (arr) {
21841 _newArrowCheck(this, util_this);
21842 return Array.isArray(arr);
21843 }.bind(undefined),
21844 isObject = function (obj) {
21845 _newArrowCheck(this, util_this);
21846 return obj && !(obj != null && obj.nodeType) && isObjectType(obj) && !isArray(obj);
21847 }.bind(undefined);
21848/**
21849 * Get specified key value from object
21850 * If default value is given, will return if given key value not found
21851 * @param {object} options Source object
21852 * @param {string} key Key value
21853 * @param {*} defaultValue Default value
21854 * @returns {*}
21855 * @private
21856 */
21857function getOption(options, key, defaultValue) {
21858 return isDefined(options[key]) ? options[key] : defaultValue;
21859}
21860
21861/**
21862 * Check if value exist in the given object
21863 * @param {object} dict Target object to be checked
21864 * @param {*} value Value to be checked
21865 * @returns {boolean}
21866 * @private
21867 */
21868function hasValue(dict, value) {
21869 var _this2 = this,
21870 found = !1;
21871 Object.keys(dict).forEach(function (key) {
21872 _newArrowCheck(this, _this2);
21873 return dict[key] === value && (found = !0);
21874 }.bind(this));
21875 return found;
21876}
21877
21878/**
21879 * Call function with arguments
21880 * @param {Function} fn Function to be called
21881 * @param {*} thisArg "this" value for fn
21882 * @param {*} args Arguments for fn
21883 * @returns {boolean} true: fn is function, false: fn is not function
21884 * @private
21885 */
21886function callFn(fn, thisArg) {
21887 for (var isFn = isFunction(fn), _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
21888 args[_key - 2] = arguments[_key];
21889 }
21890 isFn && fn.call.apply(fn, [thisArg].concat(args));
21891 return isFn;
21892}
21893
21894/**
21895 * Call function after all transitions ends
21896 * @param {d3.transition} transition Transition
21897 * @param {Fucntion} cb Callback function
21898 * @private
21899 */
21900function endall(transition, cb) {
21901 var _this3 = this,
21902 n = 0,
21903 end = function () {
21904 for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
21905 args[_key2] = arguments[_key2];
21906 }
21907 --n || cb.apply.apply(cb, [this].concat(args));
21908 };
21909 // if is transition selection
21910 if ("duration" in transition) {
21911 transition.each(function () {
21912 _newArrowCheck(this, _this3);
21913 return ++n;
21914 }.bind(this)).on("end", end);
21915 } else {
21916 ++n;
21917 transition.call(end);
21918 }
21919}
21920
21921/**
21922 * Replace tag sign to html entity
21923 * @param {string} str Target string value
21924 * @returns {string}
21925 * @private
21926 */
21927function sanitise(str) {
21928 return isString(str) ? str.replace(/</g, "&lt;").replace(/>/g, "&gt;") : str;
21929}
21930
21931/**
21932 * Set text value. If there's multiline add nodes.
21933 * @param {d3Selection} node Text node
21934 * @param {string} text Text value string
21935 * @param {Array} dy dy value for multilined text
21936 * @param {boolean} toMiddle To be alingned vertically middle
21937 * @private
21938 */
21939function setTextValue(node, text, dy, toMiddle) {
21940 var _this4 = this;
21941 if (dy === void 0) {
21942 dy = [-1, 1];
21943 }
21944 if (toMiddle === void 0) {
21945 toMiddle = !1;
21946 }
21947 if (!node || !isString(text)) {
21948 return;
21949 }
21950 if (text.indexOf("\n") === -1) {
21951 node.text(text);
21952 } else {
21953 var diff = [node.text(), text].map(function (v) {
21954 _newArrowCheck(this, _this4);
21955 return v.replace(/[\s\n]/g, "");
21956 }.bind(this));
21957 if (diff[0] !== diff[1]) {
21958 var multiline = text.split("\n"),
21959 len = toMiddle ? multiline.length - 1 : 1;
21960 // reset possible text
21961 node.html("");
21962 multiline.forEach(function (v, i) {
21963 _newArrowCheck(this, _this4);
21964 node.append("tspan").attr("x", 0).attr("dy", (i === 0 ? dy[0] * len : dy[1]) + "em").text(v);
21965 }.bind(this));
21966 }
21967 }
21968}
21969
21970/**
21971 * Substitution of SVGPathSeg API polyfill
21972 * @param {SVGGraphicsElement} path Target svg element
21973 * @returns {Array}
21974 * @private
21975 */
21976function getRectSegList(path) {
21977 /*
21978 * seg1 ---------- seg2
21979 * | |
21980 * | |
21981 * | |
21982 * seg0 ---------- seg3
21983 * */
21984 var _path$getBBox = path.getBBox(),
21985 x = _path$getBBox.x,
21986 y = _path$getBBox.y,
21987 width = _path$getBBox.width,
21988 height = _path$getBBox.height;
21989 return [{
21990 x: x,
21991 y: y + height
21992 },
21993 // seg0
21994 {
21995 x: x,
21996 y: y
21997 },
21998 // seg1
21999 {
22000 x: x + width,
22001 y: y
22002 },
22003 // seg2
22004 {
22005 x: x + width,
22006 y: y + height
22007 } // seg3
22008 ];
22009}
22010
22011/**
22012 * Get svg bounding path box dimension
22013 * @param {SVGGraphicsElement} path Target svg element
22014 * @returns {object}
22015 * @private
22016 */
22017function getPathBox(path) {
22018 var _path$getBoundingClie = path.getBoundingClientRect(),
22019 width = _path$getBoundingClie.width,
22020 height = _path$getBoundingClie.height,
22021 items = getRectSegList(path),
22022 x = items[0].x,
22023 y = Math.min(items[0].y, items[1].y);
22024 return {
22025 x: x,
22026 y: y,
22027 width: width,
22028 height: height
22029 };
22030}
22031
22032/**
22033 * Get event's current position coordinates
22034 * @param {object} event Event object
22035 * @param {SVGElement|HTMLElement} element Target element
22036 * @returns {Array} [x, y] Coordinates x, y array
22037 * @private
22038 */
22039function getPointer(event, element) {
22040 var _ref,
22041 touches = event && ((_ref = event.touches || event.sourceEvent && event.sourceEvent.touches) == null ? void 0 : _ref[0]),
22042 pointer = src_pointer(touches || event, element),
22043 _this5 = this;
22044 return pointer.map(function (v) {
22045 _newArrowCheck(this, _this5);
22046 return isNaN(v) ? 0 : v;
22047 }.bind(this));
22048}
22049
22050/**
22051 * Return brush selection array
22052 * @param {object} ctx Current instance
22053 * @returns {d3.brushSelection}
22054 * @private
22055 */
22056function getBrushSelection(ctx) {
22057 var event = ctx.event,
22058 $el = ctx.$el,
22059 main = $el.subchart.main || $el.main,
22060 selection;
22061 // check from event
22062 if (event && event.type === "brush") {
22063 selection = event.selection;
22064 // check from brush area selection
22065 } else if (main && (selection = main.select(".bb-brush").node())) {
22066 selection = brushSelection(selection);
22067 }
22068 return selection;
22069}
22070
22071/**
22072 * Get boundingClientRect.
22073 * Cache the evaluated value once it was called.
22074 * @param {HTMLElement} node Target element
22075 * @returns {object}
22076 * @private
22077 */
22078function getBoundingRect(node) {
22079 var needEvaluate = !("rect" in node) || "rect" in node && node.hasAttribute("width") && node.rect.width !== +node.getAttribute("width");
22080 return needEvaluate ? node.rect = node.getBoundingClientRect() : node.rect;
22081}
22082
22083/**
22084 * Retrun random number
22085 * @param {boolean} asStr Convert returned value as string
22086 * @param {number} min Minimum value
22087 * @param {number} max Maximum value
22088 * @returns {number|string}
22089 * @private
22090 */
22091function getRandom(asStr, min, max) {
22092 if (asStr === void 0) {
22093 asStr = !0;
22094 }
22095 if (min === void 0) {
22096 min = 0;
22097 }
22098 if (max === void 0) {
22099 max = 1e4;
22100 }
22101 var rand = Math.floor(Math.random() * (max - min) + min);
22102 return asStr ? rand + "" : rand;
22103}
22104
22105/**
22106 * Find index based on binary search
22107 * @param {Array} arr Data array
22108 * @param {number} v Target number to find
22109 * @param {number} start Start index of data array
22110 * @param {number} end End index of data arr
22111 * @param {boolean} isRotated Weather is roted axis
22112 * @returns {number} Index number
22113 * @private
22114 */
22115function findIndex(arr, v, start, end, isRotated) {
22116 if (start > end) {
22117 return -1;
22118 }
22119 var mid = Math.floor((start + end) / 2),
22120 _arr$mid = arr[mid],
22121 x = _arr$mid.x,
22122 _arr$mid$w = _arr$mid.w,
22123 w = _arr$mid$w === void 0 ? 0 : _arr$mid$w;
22124 if (isRotated) {
22125 x = arr[mid].y;
22126 w = arr[mid].h;
22127 }
22128 if (v >= x && v <= x + w) {
22129 return mid;
22130 }
22131 return v < x ? findIndex(arr, v, start, mid - 1, isRotated) : findIndex(arr, v, mid + 1, end, isRotated);
22132}
22133
22134/**
22135 * Check if brush is empty
22136 * @param {object} ctx Bursh context
22137 * @returns {boolean}
22138 * @private
22139 */
22140function brushEmpty(ctx) {
22141 var selection = getBrushSelection(ctx);
22142 if (selection) {
22143 // brush selected area
22144 // two-dimensional: [[x0, y0], [x1, y1]]
22145 // one-dimensional: [x0, x1] or [y0, y1]
22146 return selection[0] === selection[1];
22147 }
22148 return !0;
22149}
22150
22151/**
22152 * Deep copy object
22153 * @param {object} objectN Source object
22154 * @returns {object} Cloned object
22155 * @private
22156 */
22157function deepClone() {
22158 for (var _this6 = this, clone = function (v) {
22159 _newArrowCheck(this, _this6);
22160 if (isObject(v) && v.constructor) {
22161 var r = new v.constructor();
22162 for (var k in v) {
22163 r[k] = clone(v[k]);
22164 }
22165 return r;
22166 }
22167 return v;
22168 }.bind(this), _len3 = arguments.length, objectN = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
22169 objectN[_key3] = arguments[_key3];
22170 }
22171 return objectN.map(function (v) {
22172 _newArrowCheck(this, _this6);
22173 return clone(v);
22174 }.bind(this)).reduce(function (a, c) {
22175 _newArrowCheck(this, _this6);
22176 return _objectSpread(_objectSpread({}, a), c);
22177 }.bind(this));
22178}
22179
22180/**
22181 * Extend target from source object
22182 * @param {object} target Target object
22183 * @param {object|Array} source Source object
22184 * @returns {object}
22185 * @private
22186 */
22187function util_extend(target, source) {
22188 var _this7 = this;
22189 if (target === void 0) {
22190 target = {};
22191 }
22192 if (isArray(source)) {
22193 source.forEach(function (v) {
22194 _newArrowCheck(this, _this7);
22195 return util_extend(target, v);
22196 }.bind(this));
22197 }
22198
22199 // exclude name with only numbers
22200 for (var p in source) {
22201 if (/^\d+$/.test(p) || p in target) {
22202 continue;
22203 }
22204 target[p] = source[p];
22205 }
22206 return target;
22207}
22208
22209/**
22210 * Return first letter capitalized
22211 * @param {string} str Target string
22212 * @returns {string} capitalized string
22213 * @private
22214 */
22215var capitalize = function (str) {
22216 _newArrowCheck(this, util_this);
22217 return str.charAt(0).toUpperCase() + str.slice(1);
22218}.bind(undefined);
22219
22220/**
22221 * Camelize from kebob style string
22222 * @param {string} str Target string
22223 * @param {string} separator Separator string
22224 * @returns {string} camelized string
22225 * @private
22226 */
22227function camelize(str, separator) {
22228 var _this8 = this;
22229 if (separator === void 0) {
22230 separator = "-";
22231 }
22232 return str.split(separator).map(function (v, i) {
22233 _newArrowCheck(this, _this8);
22234 return i ? v.charAt(0).toUpperCase() + v.slice(1).toLowerCase() : v.toLowerCase();
22235 }.bind(this)).join("");
22236}
22237
22238/**
22239 * Convert to array
22240 * @param {object} v Target to be converted
22241 * @returns {Array}
22242 * @private
22243 */
22244var toArray = function (v) {
22245 _newArrowCheck(this, util_this);
22246 return [].slice.call(v);
22247}.bind(undefined);
22248
22249/**
22250 * Add CSS rules
22251 * @param {object} style Style object
22252 * @param {string} selector Selector string
22253 * @param {Array} prop Prps arrary
22254 * @returns {number} Newely added rule index
22255 * @private
22256 */
22257function addCssRules(style, selector, prop) {
22258 var _this9 = this,
22259 rootSelctor = style.rootSelctor,
22260 sheet = style.sheet,
22261 getSelector = function (s) {
22262 _newArrowCheck(this, _this9);
22263 return s.replace(/\s?(bb-)/g, ".$1").replace(/\.+/g, ".");
22264 }.bind(this),
22265 rule = rootSelctor + " " + getSelector(selector) + " {" + prop.join(";") + "}";
22266 return sheet[sheet.insertRule ? "insertRule" : "addRule"](rule, sheet.cssRules.length);
22267}
22268
22269/**
22270 * Get css rules for specified stylesheets
22271 * @param {Array} styleSheets The stylesheets to get the rules from
22272 * @returns {Array}
22273 * @private
22274 */
22275function getCssRules(styleSheets) {
22276 var _this10 = this,
22277 rules = [];
22278 styleSheets.forEach(function (sheet) {
22279 _newArrowCheck(this, _this10);
22280 try {
22281 if (sheet.cssRules && sheet.cssRules.length) {
22282 rules = rules.concat(toArray(sheet.cssRules));
22283 }
22284 } catch (e) {
22285 console.error("Error while reading rules from " + sheet.href + ": " + e.toString());
22286 }
22287 }.bind(this));
22288 return rules;
22289}
22290
22291/**
22292 * Gets the SVGMatrix of an SVGGElement
22293 * @param {SVGElement} node Node element
22294 * @returns {SVGMatrix} matrix
22295 * @private
22296 */
22297function getTranslation(node) {
22298 var transform = node ? node.transform : null,
22299 baseVal = transform && transform.baseVal;
22300 return baseVal && baseVal.numberOfItems ? baseVal.getItem(0).matrix : {
22301 a: 0,
22302 b: 0,
22303 c: 0,
22304 d: 0,
22305 e: 0,
22306 f: 0
22307 };
22308}
22309
22310/**
22311 * Get unique value from array
22312 * @param {Array} data Source data
22313 * @returns {Array} Unique array value
22314 * @private
22315 */
22316function getUnique(data) {
22317 var _this11 = this,
22318 isDate = data[0] instanceof Date,
22319 d = (isDate ? data.map(Number) : data).filter(function (v, i, self) {
22320 _newArrowCheck(this, _this11);
22321 return self.indexOf(v) === i;
22322 }.bind(this));
22323 return isDate ? d.map(function (v) {
22324 _newArrowCheck(this, _this11);
22325 return new Date(v);
22326 }.bind(this)) : d;
22327}
22328
22329/**
22330 * Merge array
22331 * @param {Array} arr Source array
22332 * @returns {Array}
22333 * @private
22334 */
22335function mergeArray(arr) {
22336 var _this12 = this;
22337 return arr && arr.length ? arr.reduce(function (p, c) {
22338 _newArrowCheck(this, _this12);
22339 return p.concat(c);
22340 }.bind(this)) : [];
22341}
22342
22343/**
22344 * Merge object returning new object
22345 * @param {object} target Target object
22346 * @param {object} objectN Source object
22347 * @returns {object} merged target object
22348 * @private
22349 */
22350function mergeObj(target) {
22351 for (var _this13 = this, _len4 = arguments.length, objectN = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
22352 objectN[_key4 - 1] = arguments[_key4];
22353 }
22354 if (!objectN.length || objectN.length === 1 && !objectN[0]) {
22355 return target;
22356 }
22357 var source = objectN.shift();
22358 if (isObject(target) && isObject(source)) {
22359 Object.keys(source).forEach(function (key) {
22360 _newArrowCheck(this, _this13);
22361 var value = source[key];
22362 if (isObject(value)) {
22363 target[key] || (target[key] = {});
22364 target[key] = mergeObj(target[key], value);
22365 } else {
22366 target[key] = isArray(value) ? value.concat() : value;
22367 }
22368 }.bind(this));
22369 }
22370 return mergeObj.apply(void 0, [target].concat(objectN));
22371}
22372
22373/**
22374 * Sort value
22375 * @param {Array} data value to be sorted
22376 * @param {boolean} isAsc true: asc, false: desc
22377 * @returns {number|string|Date} sorted date
22378 * @private
22379 */
22380function sortValue(data, isAsc) {
22381 var _this14 = this;
22382 if (isAsc === void 0) {
22383 isAsc = !0;
22384 }
22385 var fn;
22386 if (data[0] instanceof Date) {
22387 fn = isAsc ? function (a, b) {
22388 _newArrowCheck(this, _this14);
22389 return a - b;
22390 }.bind(this) : function (a, b) {
22391 _newArrowCheck(this, _this14);
22392 return b - a;
22393 }.bind(this);
22394 } else {
22395 if (isAsc && !data.every(isNaN)) {
22396 fn = function (a, b) {
22397 _newArrowCheck(this, _this14);
22398 return a - b;
22399 }.bind(this);
22400 } else if (!isAsc) {
22401 fn = function (a, b) {
22402 _newArrowCheck(this, _this14);
22403 return a > b && -1 || a < b && 1 || a === b && 0;
22404 }.bind(this);
22405 }
22406 }
22407 return data.concat().sort(fn);
22408}
22409
22410/**
22411 * Get min/max value
22412 * @param {string} type 'min' or 'max'
22413 * @param {Array} data Array data value
22414 * @returns {number|Date|undefined}
22415 * @private
22416 */
22417function getMinMax(type, data) {
22418 var _this15 = this,
22419 res = data.filter(function (v) {
22420 _newArrowCheck(this, _this15);
22421 return notEmpty(v);
22422 }.bind(this));
22423 if (res.length) {
22424 if (isNumber(res[0])) {
22425 res = Math[type].apply(Math, res);
22426 } else if (res[0] instanceof Date) {
22427 res = sortValue(res, type === "min")[0];
22428 }
22429 } else {
22430 res = undefined;
22431 }
22432 return res;
22433}
22434
22435/**
22436 * Get range
22437 * @param {number} start Start number
22438 * @param {number} end End number
22439 * @param {number} step Step number
22440 * @returns {Array}
22441 * @private
22442 */
22443var getRange = function (start, end, step) {
22444 if (step === void 0) {
22445 step = 1;
22446 }
22447 _newArrowCheck(this, util_this);
22448 var res = [],
22449 n = Math.max(0, Math.ceil((end - start) / step)) | 0;
22450 for (var i = start; i < n; i++) {
22451 res.push(start + i * step);
22452 }
22453 return res;
22454 }.bind(undefined),
22455 emulateEvent = {
22456 mouse: function () {
22457 var _this16 = this;
22458 _newArrowCheck(this, util_this);
22459 var getParams = function () {
22460 _newArrowCheck(this, _this16);
22461 return {
22462 bubbles: !1,
22463 cancelable: !1,
22464 screenX: 0,
22465 screenY: 0,
22466 clientX: 0,
22467 clientY: 0
22468 };
22469 }.bind(this);
22470 try {
22471 // eslint-disable-next-line no-new
22472 new MouseEvent("t");
22473 return function (el, eventType, params) {
22474 if (params === void 0) {
22475 params = getParams();
22476 }
22477 _newArrowCheck(this, _this16);
22478 el.dispatchEvent(new MouseEvent(eventType, params));
22479 }.bind(this);
22480 } catch (e) {
22481 // Polyfills DOM4 MouseEvent
22482 return function (el, eventType, params) {
22483 if (params === void 0) {
22484 params = getParams();
22485 }
22486 _newArrowCheck(this, _this16);
22487 var mouseEvent = browser_doc.createEvent("MouseEvent");
22488
22489 // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
22490 mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0,
22491 // the event's mouse click count
22492 params.screenX, params.screenY, params.clientX, params.clientY, !1, !1, !1, !1, 0, null);
22493 el.dispatchEvent(mouseEvent);
22494 }.bind(this);
22495 }
22496 }.bind(undefined)(),
22497 touch: function touch(el, eventType, params) {
22498 _newArrowCheck(this, util_this);
22499 var touchObj = new Touch(mergeObj({
22500 identifier: Date.now(),
22501 target: el,
22502 radiusX: 2.5,
22503 radiusY: 2.5,
22504 rotationAngle: 10,
22505 force: .5
22506 }, params));
22507 el.dispatchEvent(new TouchEvent(eventType, {
22508 cancelable: !0,
22509 bubbles: !0,
22510 shiftKey: !0,
22511 touches: [touchObj],
22512 targetTouches: [],
22513 changedTouches: [touchObj]
22514 }));
22515 }.bind(undefined)
22516 }; // emulate event
22517/**
22518 * Process the template & return bound string
22519 * @param {string} tpl Template string
22520 * @param {object} data Data value to be replaced
22521 * @returns {string}
22522 * @private
22523 */
22524function tplProcess(tpl, data) {
22525 var res = tpl;
22526 for (var x in data) {
22527 res = res.replace(new RegExp("{=" + x + "}", "g"), data[x]);
22528 }
22529 return res;
22530}
22531
22532/**
22533 * Get parsed date value
22534 * (It must be called in 'ChartInternal' context)
22535 * @param {Date|string|number} date Value of date to be parsed
22536 * @returns {Date}
22537 * @private
22538 */
22539function parseDate(date) {
22540 var parsedDate;
22541 if (date instanceof Date) {
22542 parsedDate = date;
22543 } else if (isString(date)) {
22544 var _format$dataTime,
22545 config = this.config,
22546 format = this.format;
22547 // if fails to parse, try by new Date()
22548 // https://github.com/naver/billboard.js/issues/1714
22549 parsedDate = (_format$dataTime = format.dataTime(config.data_xFormat)(date)) != null ? _format$dataTime : new Date(date);
22550 } else if (isNumber(date) && !isNaN(date)) {
22551 parsedDate = new Date(+date);
22552 }
22553 if (!parsedDate || isNaN(+parsedDate)) {
22554 console && console.error && console.error("Failed to parse x '" + date + "' to Date object");
22555 }
22556 return parsedDate;
22557}
22558
22559/**
22560 * Return if the current doc is visible or not
22561 * @returns {boolean}
22562 * @private
22563 */
22564function isTabVisible() {
22565 return (browser_doc == null ? void 0 : browser_doc.hidden) === !1 || (browser_doc == null ? void 0 : browser_doc.visibilityState) === "visible";
22566}
22567
22568/**
22569 * Get the current input type
22570 * @param {boolean} mouse Config value: interaction.inputType.mouse
22571 * @param {boolean} touch Config value: interaction.inputType.touch
22572 * @returns {string} "mouse" | "touch" | null
22573 * @private
22574 */
22575function convertInputType(mouse, touch) {
22576 var _this17 = this,
22577 DocumentTouch = win.DocumentTouch,
22578 matchMedia = win.matchMedia,
22579 navigator = win.navigator,
22580 hasTouch = !1;
22581 if (touch) {
22582 // Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
22583 if (navigator && "maxTouchPoints" in navigator) {
22584 hasTouch = navigator.maxTouchPoints > 0;
22585
22586 // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
22587 // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
22588 } else if ("ontouchmove" in win || DocumentTouch && browser_doc instanceof DocumentTouch) {
22589 hasTouch = !0;
22590 } else {
22591 // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
22592 if (matchMedia != null && matchMedia("(pointer:coarse)").matches) {
22593 hasTouch = !0;
22594 } else {
22595 // Only as a last resort, fall back to user agent sniffing
22596 var UA = navigator.userAgent;
22597 hasTouch = /\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(UA) || /\b(Android|Windows Phone|iPad|iPod)\b/i.test(UA);
22598 }
22599 }
22600 }
22601
22602 // Check if agent has mouse using any-hover, touch devices (e.g iPad) with external mouse will return true as long as mouse is connected
22603 // https://css-tricks.com/interaction-media-features-and-their-potential-for-incorrect-assumptions/#aa-testing-the-capabilities-of-all-inputs
22604 // Demo: https://patrickhlauke.github.io/touch/pointer-hover-any-pointer-any-hover/
22605 var hasMouse = mouse && ["any-hover:hover", "any-pointer:fine"].some(function (v) {
22606 _newArrowCheck(this, _this17);
22607 return matchMedia == null ? void 0 : matchMedia("(" + v + ")").matches;
22608 }.bind(this));
22609
22610 // fallback to 'mouse' if no input type is detected.
22611 return hasMouse && "mouse" || hasTouch && "touch" || "mouse";
22612}
22613
22614/**
22615 * Run function until given condition function return true
22616 * @param {Function} fn Function to be executed when condition is true
22617 * @param {Function} conditionFn Condition function to check if condition is true
22618 * @private
22619 */
22620function runUntil(fn, conditionFn) {
22621 var _this18 = this;
22622 if (conditionFn() === !1) {
22623 win.requestAnimationFrame(function () {
22624 _newArrowCheck(this, _this18);
22625 return runUntil(fn, conditionFn);
22626 }.bind(this));
22627 } else {
22628 fn();
22629 }
22630}
22631;// CONCATENATED MODULE: ./src/module/error.ts
22632
22633
22634
22635
22636/**
22637 * Copyright (c) 2021 ~ present NAVER Corp.
22638 * billboard.js project is licensed under the MIT license
22639 */
22640/* eslint no-console: "off" */
22641
22642
22643/**
22644 * Check chart type module imports.
22645 * @param {ChartInternal} ctx Context
22646 * @private
22647 */
22648function checkModuleImport(ctx) {
22649 var $$ = ctx,
22650 config = $$.config,
22651 type = "";
22652 if (isEmpty(config.data_type || config.data_types) && !$$[TYPE_METHOD_NEEDED.LINE]) {
22653 type = "line";
22654 } else {
22655 for (var x in TYPE_METHOD_NEEDED) {
22656 var t = TYPE[x];
22657 if ($$.hasType(t) && !$$[TYPE_METHOD_NEEDED[x]]) {
22658 type = t;
22659 break;
22660 }
22661 }
22662 }
22663 type && logError("Please, make sure if %c" + camelize(type), "module has been imported and specified correctly.");
22664}
22665
22666/**
22667 * Log error and throw error
22668 * @param {string} head Message header
22669 * @param {string} tail Message tail
22670 * @private
22671 */
22672function logError(head, tail) {
22673 var _window$console,
22674 prefix = "[billboard.js]",
22675 hasConsole = (_window$console = win.console) == null ? void 0 : _window$console.error;
22676 if (hasConsole) {
22677 console.error("\u274C " + prefix + " " + head, "background:red;color:white;display:block;font-size:15px", tail);
22678 console.info("%cℹ️", "font-size:15px", "https://github.com/naver/billboard.js/wiki/CHANGELOG-v2#modularization-by-its-functionality");
22679 }
22680 throw Error(prefix + " " + head.replace(/\%c([a-z-]+)/i, "'$1' ") + " " + tail);
22681}
22682;// CONCATENATED MODULE: ./src/config/classes.ts
22683
22684function classes_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22685function classes_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? classes_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : classes_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
22686/**
22687 * Copyright (c) 2017 ~ present NAVER Corp.
22688 * billboard.js project is licensed under the MIT license
22689 */
22690/**
22691 * CSS class names definition
22692 * @private
22693 */
22694var $COMMON = {
22695 button: "bb-button",
22696 chart: "bb-chart",
22697 empty: "bb-empty",
22698 main: "bb-main",
22699 target: "bb-target",
22700 EXPANDED: "_expanded_"
22701};
22702var $ARC = {
22703 arc: "bb-arc",
22704 arcLabelLine: "bb-arc-label-line",
22705 arcs: "bb-arcs",
22706 chartArc: "bb-chart-arc",
22707 chartArcs: "bb-chart-arcs",
22708 chartArcsBackground: "bb-chart-arcs-background",
22709 chartArcsTitle: "bb-chart-arcs-title"
22710};
22711var $AREA = {
22712 area: "bb-area",
22713 areas: "bb-areas"
22714};
22715var $AXIS = {
22716 axis: "bb-axis",
22717 axisX: "bb-axis-x",
22718 axisXLabel: "bb-axis-x-label",
22719 axisY: "bb-axis-y",
22720 axisY2: "bb-axis-y2",
22721 axisY2Label: "bb-axis-y2-label",
22722 axisYLabel: "bb-axis-y-label"
22723};
22724var $BAR = {
22725 bar: "bb-bar",
22726 bars: "bb-bars",
22727 chartBar: "bb-chart-bar",
22728 chartBars: "bb-chart-bars"
22729};
22730var $CANDLESTICK = {
22731 candlestick: "bb-candlestick",
22732 candlesticks: "bb-candlesticks",
22733 chartCandlestick: "bb-chart-candlestick",
22734 chartCandlesticks: "bb-chart-candlesticks",
22735 valueDown: "bb-value-down",
22736 valueUp: "bb-value-up"
22737};
22738var $CIRCLE = {
22739 chartCircles: "bb-chart-circles",
22740 circle: "bb-circle",
22741 circles: "bb-circles"
22742};
22743var $COLOR = {
22744 colorPattern: "bb-color-pattern",
22745 colorScale: "bb-colorscale"
22746};
22747var $DRAG = {
22748 dragarea: "bb-dragarea",
22749 INCLUDED: "_included_"
22750};
22751var $GAUGE = {
22752 chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
22753 chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
22754 chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
22755 chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
22756 gaugeValue: "bb-gauge-value"
22757};
22758var $LEGEND = {
22759 legend: "bb-legend",
22760 legendBackground: "bb-legend-background",
22761 legendItem: "bb-legend-item",
22762 legendItemEvent: "bb-legend-item-event",
22763 legendItemHidden: "bb-legend-item-hidden",
22764 legendItemPoint: "bb-legend-item-point",
22765 legendItemTile: "bb-legend-item-tile"
22766};
22767var $LINE = {
22768 chartLine: "bb-chart-line",
22769 chartLines: "bb-chart-lines",
22770 line: "bb-line",
22771 lines: "bb-lines"
22772};
22773var $EVENT = {
22774 eventRect: "bb-event-rect",
22775 eventRects: "bb-event-rects",
22776 eventRectsMultiple: "bb-event-rects-multiple",
22777 eventRectsSingle: "bb-event-rects-single"
22778};
22779var $FOCUS = {
22780 focused: "bb-focused",
22781 defocused: "bb-defocused",
22782 legendItemFocused: "bb-legend-item-focused",
22783 xgridFocus: "bb-xgrid-focus",
22784 ygridFocus: "bb-ygrid-focus"
22785};
22786var $GRID = {
22787 grid: "bb-grid",
22788 gridLines: "bb-grid-lines",
22789 xgrid: "bb-xgrid",
22790 xgridLine: "bb-xgrid-line",
22791 xgridLines: "bb-xgrid-lines",
22792 xgrids: "bb-xgrids",
22793 ygrid: "bb-ygrid",
22794 ygridLine: "bb-ygrid-line",
22795 ygridLines: "bb-ygrid-lines",
22796 ygrids: "bb-ygrids"
22797};
22798var $LEVEL = {
22799 level: "bb-level",
22800 levels: "bb-levels"
22801};
22802var $RADAR = {
22803 chartRadar: "bb-chart-radar",
22804 chartRadars: "bb-chart-radars"
22805};
22806var $REGION = {
22807 region: "bb-region",
22808 regions: "bb-regions"
22809};
22810var $SELECT = {
22811 selectedCircle: "bb-selected-circle",
22812 selectedCircles: "bb-selected-circles",
22813 SELECTED: "_selected_"
22814};
22815var $SHAPE = {
22816 shape: "bb-shape",
22817 shapes: "bb-shapes"
22818};
22819var $SUBCHART = {
22820 brush: "bb-brush",
22821 subchart: "bb-subchart"
22822};
22823var $TEXT = {
22824 chartText: "bb-chart-text",
22825 chartTexts: "bb-chart-texts",
22826 text: "bb-text",
22827 texts: "bb-texts",
22828 title: "bb-title",
22829 TextOverlapping: "text-overlapping"
22830};
22831var $TOOLTIP = {
22832 tooltip: "bb-tooltip",
22833 tooltipContainer: "bb-tooltip-container",
22834 tooltipName: "bb-tooltip-name"
22835};
22836var $ZOOM = {
22837 buttonZoomReset: "bb-zoom-reset",
22838 zoomBrush: "bb-zoom-brush"
22839};
22840/* harmony default export */ var classes = (classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread({}, $COMMON), $ARC), $AREA), $AXIS), $BAR), $CANDLESTICK), $CIRCLE), $COLOR), $DRAG), $GAUGE), $LEGEND), $LINE), $EVENT), $FOCUS), $GRID), $RADAR), $REGION), $SELECT), $SHAPE), $SUBCHART), $TEXT), $TOOLTIP), $ZOOM));
22841;// CONCATENATED MODULE: ./src/config/Store/Element.ts
22842/**
22843 * Copyright (c) 2017 ~ present NAVER Corp.
22844 * billboard.js project is licensed under the MIT license
22845 */
22846/**
22847 * Elements class.
22848 * @class Elements
22849 * @ignore
22850 * @private
22851 */
22852var Element = function () {
22853 return {
22854 chart: null,
22855 main: null,
22856 svg: null,
22857 axis: {
22858 // axes
22859 x: null,
22860 y: null,
22861 y2: null,
22862 subX: null
22863 },
22864 defs: null,
22865 tooltip: null,
22866 legend: null,
22867 title: null,
22868 subchart: {
22869 main: null,
22870 // $$.context
22871 bar: null,
22872 // $$.contextBar
22873 line: null,
22874 // $$.contextLine
22875 area: null // $$.contextArea
22876 },
22877
22878 arcs: null,
22879 bar: null,
22880 // mainBar,
22881 candlestick: null,
22882 line: null,
22883 // mainLine,
22884 area: null,
22885 // mainArea,
22886 circle: null,
22887 // mainCircle,
22888 radar: null,
22889 text: null,
22890 // mainText,
22891 grid: {
22892 main: null,
22893 // grid (also focus)
22894 x: null,
22895 // xgrid,
22896 y: null // ygrid,
22897 },
22898
22899 gridLines: {
22900 main: null,
22901 // gridLines
22902 x: null,
22903 // xgridLines,
22904 y: null // ygridLines
22905 },
22906
22907 region: {
22908 main: null,
22909 // region
22910 list: null // mainRegion
22911 },
22912
22913 eventRect: null,
22914 zoomResetBtn: null // drag zoom reset button
22915 };
22916};
22917
22918;// CONCATENATED MODULE: ./src/config/Store/State.ts
22919/**
22920 * Copyright (c) 2017 ~ present NAVER Corp.
22921 * billboard.js project is licensed under the MIT license
22922 */
22923/**
22924 * State class.
22925 * @class State
22926 * @ignore
22927 * @private
22928 */
22929var State = function () {
22930 return {
22931 // chart drawn area dimension, excluding axes
22932 width: 0,
22933 width2: 0,
22934 height: 0,
22935 height2: 0,
22936 margin: {
22937 top: 0,
22938 bottom: 0,
22939 left: 0,
22940 right: 0
22941 },
22942 margin2: {
22943 top: 0,
22944 bottom: 0,
22945 left: 0,
22946 right: 0
22947 },
22948 margin3: {
22949 top: 0,
22950 bottom: 0,
22951 left: 0,
22952 right: 0
22953 },
22954 arcWidth: 0,
22955 arcHeight: 0,
22956 xAxisHeight: 0,
22957 hasAxis: !1,
22958 hasRadar: !1,
22959 // for data CSS rule index (used when boost.useCssRule is true)
22960 cssRule: {},
22961 current: {
22962 // chart whole dimension
22963 width: 0,
22964 height: 0,
22965 dataMax: 0,
22966 maxTickWidths: {
22967 x: {
22968 size: 0,
22969 ticks: [],
22970 clipPath: 0,
22971 domain: ""
22972 },
22973 y: {
22974 size: 0,
22975 domain: ""
22976 },
22977 y2: {
22978 size: 0,
22979 domain: ""
22980 }
22981 },
22982 // current used chart type list
22983 types: []
22984 },
22985 // legend
22986 isLegendRight: !1,
22987 isLegendInset: !1,
22988 isLegendTop: !1,
22989 isLegendLeft: !1,
22990 legendStep: 0,
22991 legendItemWidth: 0,
22992 legendItemHeight: 0,
22993 legendHasRendered: !1,
22994 eventReceiver: {
22995 currentIdx: -1,
22996 // current event interaction index
22997 rect: {},
22998 // event rect's clientBoundingRect
22999 data: [],
23000 // event data bound of previoous eventRect
23001 coords: [] // coordination value of previous eventRect
23002 },
23003
23004 axis: {
23005 x: {
23006 padding: {
23007 left: 0,
23008 right: 0
23009 },
23010 tickCount: 0
23011 }
23012 },
23013 rotatedPadding: {
23014 left: 30,
23015 right: 0,
23016 top: 5
23017 },
23018 withoutFadeIn: {},
23019 inputType: "",
23020 datetimeId: "",
23021 // clip id string
23022 clip: {
23023 id: "",
23024 idXAxis: "",
23025 idYAxis: "",
23026 idXAxisTickTexts: "",
23027 idGrid: "",
23028 idSubchart: "",
23029 // clipIdForSubchart
23030 path: "",
23031 pathXAxis: "",
23032 pathYAxis: "",
23033 pathXAxisTickTexts: "",
23034 pathGrid: ""
23035 },
23036 // status
23037 event: null,
23038 // event object
23039 dragStart: null,
23040 dragging: !1,
23041 flowing: !1,
23042 cancelClick: !1,
23043 mouseover: !1,
23044 rendered: !1,
23045 transiting: !1,
23046 redrawing: !1,
23047 // if redraw() is on process
23048 resizing: !1,
23049 // resize event called
23050 toggling: !1,
23051 // legend toggle
23052 zooming: !1,
23053 hasNegativeValue: !1,
23054 hasPositiveValue: !0,
23055 orgAreaOpacity: "0.2",
23056 orgConfig: {},
23057 // user original genration config
23058
23059 // ID strings
23060 hiddenTargetIds: [],
23061 hiddenLegendIds: [],
23062 focusedTargetIds: [],
23063 defocusedTargetIds: [],
23064 // value for Arc
23065 radius: 0,
23066 innerRadius: 0,
23067 outerRadius: undefined,
23068 innerRadiusRatio: 0,
23069 gaugeArcWidth: 0,
23070 radiusExpanded: 0,
23071 // xgrid attribute
23072 xgridAttr: {
23073 x1: null,
23074 x2: null,
23075 y1: null,
23076 y2: null
23077 }
23078 };
23079};
23080
23081;// CONCATENATED MODULE: ./src/config/Store/Store.ts
23082
23083/**
23084 * Copyright (c) 2017 ~ present NAVER Corp.
23085 * billboard.js project is licensed under the MIT license
23086 */
23087
23088
23089
23090// mapping
23091var Store_classes = {
23092 element: Element,
23093 state: State
23094};
23095
23096/**
23097 * Internal store class.
23098 * @class Store
23099 * @ignore
23100 * @private
23101 */
23102var Store = /*#__PURE__*/function () {
23103 function Store() {
23104 var _this = this;
23105 Object.keys(Store_classes).forEach(function (v) {
23106 _newArrowCheck(this, _this);
23107 this[v] = new Store_classes[v]();
23108 }.bind(this));
23109 }
23110 var _proto = Store.prototype;
23111 _proto.getStore = function getStore(name) {
23112 return this[name];
23113 };
23114 return Store;
23115}();
23116
23117;// CONCATENATED MODULE: ./src/config/Options/common/main.ts
23118/**
23119 * Copyright (c) 2017 ~ present NAVER Corp.
23120 * billboard.js project is licensed under the MIT license
23121 */
23122/**
23123 * main config options
23124 */
23125/* harmony default export */ var main = ({
23126 /**
23127 * Specify the CSS selector or the element which the chart will be set to. D3 selection object can be specified also.<br>
23128 * If other chart is set already, it will be replaced with the new one (only one chart can be set in one element).
23129 * - **NOTE:** In case of element doesn't exist or not specified, will add a `<div>` element to the body.
23130 * @name bindto
23131 * @memberof Options
23132 * @property {string|HTMLElement|d3.selection|object} [bindto="#chart"] Specify the element where chart will be drawn.
23133 * @property {string|HTMLElement|d3.selection} bindto.element="#chart" Specify the element where chart will be drawn.
23134 * @property {string} [bindto.classname=bb] Specify the class name of bind element.<br>
23135 * **NOTE:** When class name isn't `bb`, then you also need to update the default CSS to be rendered correctly.
23136 * @default #chart
23137 * @example
23138 * bindto: "#myContainer"
23139 *
23140 * // or HTMLElement
23141 * bindto: document.getElementById("myContainer")
23142 *
23143 * // or D3 selection object
23144 * bindto: d3.select("#myContainer")
23145 *
23146 * // or to change default classname
23147 * bindto: {
23148 * element: "#chart",
23149 * classname: "bill-board" // ex) <div id='chart' class='bill-board'>
23150 * }
23151 */
23152 bindto: "#chart",
23153 /**
23154 * Set chart background.
23155 * @name background
23156 * @memberof Options
23157 * @property {object} background background object
23158 * @property {string} background.class Specify the class name for background element.
23159 * @property {string} background.color Specify the fill color for background element.<br>**NOTE:** Will be ignored if `imgUrl` option is set.
23160 * @property {string} background.imgUrl Specify the image url string for background.
23161 * @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.Background)
23162 * @example
23163 * background: {
23164 * class: "myClass",
23165 * color: "red",
23166 *
23167 * // Set image url for background.
23168 * // If specified, 'color' option will be ignored.
23169 * imgUrl: "https://naver.github.io/billboard.js/img/logo/billboard.js.svg",
23170 * }
23171 */
23172 background: {},
23173 /**
23174 * Set 'clip-path' attribute for chart element
23175 * - **NOTE:**
23176 * > When is false, chart node element is positioned after the axis node in DOM tree hierarchy.
23177 * > Is to make chart element positioned over axis element.
23178 * @name clipPath
23179 * @memberof Options
23180 * @type {boolean}
23181 * @default true
23182 * @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.clipPath)
23183 * @example
23184 * // don't set 'clip-path' attribute
23185 * clipPath: false
23186 */
23187 clipPath: !0,
23188 /**
23189 * Set svg element's class name
23190 * @name svg
23191 * @memberof Options
23192 * @type {object}
23193 * @property {object} [svg] svg object
23194 * @property {string} [svg.classname] class name for svg element
23195 * @example
23196 * svg: {
23197 * classname: "test_class"
23198 * }
23199 */
23200 svg_classname: undefined,
23201 /**
23202 * The desired size of the chart element.
23203 * If value is not specified, the width of the chart will be calculated by the size of the parent element it's appended to.
23204 * @name size
23205 * @memberof Options
23206 * @type {object}
23207 * @property {object} [size] size object
23208 * @property {number} [size.width] width of the chart element
23209 * @property {number} [size.height] height of the chart element
23210 * @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.ChartSize)
23211 * @example
23212 * size: {
23213 * width: 640,
23214 * height: 480
23215 * }
23216 */
23217 size_width: undefined,
23218 size_height: undefined,
23219 /**
23220 * The padding of the chart element.
23221 * @name padding
23222 * @memberof Options
23223 * @type {object}
23224 * @property {object|boolean} [padding=true] Set padding of chart, and accepts object or boolean type.
23225 * - `Object`: Specify each side's padding.
23226 * - `false`: Remove padding completely and make shape to fully occupy the container element.
23227 * - In this case, axes and subchart will be hidden.
23228 * - To adjust some padding from this state, use `axis.[x|y].padding` option.
23229 * @property {number} [padding.top] padding on the top of chart
23230 * @property {number} [padding.right] padding on the right of chart
23231 * @property {number} [padding.bottom] padding on the bottom of chart
23232 * @property {number} [padding.left] padding on the left of chart
23233 * @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.Padding)
23234 * @example
23235 * // remove padding completely.
23236 * padding: false,
23237 *
23238 * // or specify padding value for each side
23239 * padding: {
23240 * top: 20,
23241 * right: 20,
23242 * bottom: 20,
23243 * left: 20
23244 * }
23245 */
23246 padding: !0,
23247 padding_left: undefined,
23248 padding_right: undefined,
23249 padding_top: undefined,
23250 padding_bottom: undefined,
23251 /**
23252 * Set chart resize options
23253 * @name resize
23254 * @memberof Options
23255 * @type {object}
23256 * @property {object} [resize] resize object
23257 * @property {boolean} [resize.auto=true] Set chart resize automatically on viewport changes.
23258 * @property {boolean|number} [resize.timer=true] Set resize timer option.
23259 * - **NOTE:**
23260 * - The resize function will be called using: true - `setTimeout()`, false - `requestIdleCallback()`.
23261 * - Given number(delay in ms) value, resize function will be triggered using `setTimer()` with given delay.
23262 * @example
23263 * resize: {
23264 * auto: false,
23265 *
23266 * // set resize function will be triggered using `setTimer()`
23267 * timer: true,
23268 *
23269 * // set resize function will be triggered using `requestIdleCallback()`
23270 * timer: false,
23271 *
23272 * // set resize function will be triggered using `setTimer()` with a delay of `100ms`.
23273 * timer: 100
23274 * }
23275 */
23276 resize_auto: !0,
23277 resize_timer: !0,
23278 /**
23279 * Set a callback to execute when the chart is clicked.
23280 * @name onclick
23281 * @memberof Options
23282 * @type {Function}
23283 * @default undefined
23284 * @example
23285 * onclick: function(event) {
23286 * this; // chart instance itself
23287 * event; // native event object
23288 * ...
23289 * }
23290 */
23291 onclick: undefined,
23292 /**
23293 * Set a callback to execute when mouse/touch enters the chart.
23294 * @name onover
23295 * @memberof Options
23296 * @type {Function}
23297 * @default undefined
23298 * @example
23299 * onover: function(event) {
23300 * this; // chart instance itself
23301 * event; // native event object
23302 * ...
23303 * }
23304 */
23305 onover: undefined,
23306 /**
23307 * Set a callback to execute when mouse/touch leaves the chart.
23308 * @name onout
23309 * @memberof Options
23310 * @type {Function}
23311 * @default undefined
23312 * @example
23313 * onout: function(event) {
23314 * this; // chart instance itself
23315 * event; // native event object
23316 * ...
23317 * }
23318 */
23319 onout: undefined,
23320 /**
23321 * Set a callback to execute when user resizes the screen.
23322 * @name onresize
23323 * @memberof Options
23324 * @type {Function}
23325 * @default undefined
23326 * @example
23327 * onresize: function() {
23328 * this; // chart instance itself
23329 * ...
23330 * }
23331 */
23332 onresize: undefined,
23333 /**
23334 * Set a callback to execute when screen resize finished.
23335 * @name onresized
23336 * @memberof Options
23337 * @type {Function}
23338 * @default undefined
23339 * @example
23340 * onresized: function() {
23341 * this; // chart instance itself
23342 * ...
23343 * }
23344 */
23345 onresized: undefined,
23346 /**
23347 * Set a callback to execute before the chart is initialized
23348 * @name onbeforeinit
23349 * @memberof Options
23350 * @type {Function}
23351 * @default undefined
23352 * @example
23353 * onbeforeinit: function() {
23354 * this; // chart instance itself
23355 * ...
23356 * }
23357 */
23358 onbeforeinit: undefined,
23359 /**
23360 * Set a callback to execute when the chart is initialized.
23361 * @name oninit
23362 * @memberof Options
23363 * @type {Function}
23364 * @default undefined
23365 * @example
23366 * oninit: function() {
23367 * this; // chart instance itself
23368 * ...
23369 * }
23370 */
23371 oninit: undefined,
23372 /**
23373 * Set a callback to execute after the chart is initialized
23374 * @name onafterinit
23375 * @memberof Options
23376 * @type {Function}
23377 * @default undefined
23378 * @example
23379 * onafterinit: function() {
23380 * this; // chart instance itself
23381 * ...
23382 * }
23383 */
23384 onafterinit: undefined,
23385 /**
23386 * Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawed.
23387 * @name onrendered
23388 * @memberof Options
23389 * @type {Function}
23390 * @default undefined
23391 * @example
23392 * onrendered: function() {
23393 * this; // chart instance itself
23394 * ...
23395 * }
23396 */
23397 onrendered: undefined,
23398 /**
23399 * Set duration of transition (in milliseconds) for chart animation.<br><br>
23400 * - **NOTE:** If `0 `or `null` set, transition will be skipped. So, this makes initial rendering faster especially in case you have a lot of data.
23401 * @name transition
23402 * @memberof Options
23403 * @type {object}
23404 * @property {object} [transition] transition object
23405 * @property {number} [transition.duration=350] duration in milliseconds
23406 * @example
23407 * transition: {
23408 * duration: 500
23409 * }
23410 */
23411 transition_duration: 250,
23412 /**
23413 * Set plugins
23414 * @name plugins
23415 * @memberof Options
23416 * @type {Array}
23417 * @example
23418 * plugins: [
23419 * new bb.plugin.stanford({ ... }),
23420 * new PluginA(),
23421 * ...
23422 * ]
23423 */
23424 plugins: [],
23425 /**
23426 * Control the render timing
23427 * @name render
23428 * @memberof Options
23429 * @type {object}
23430 * @property {object} [render] render object
23431 * @property {boolean} [render.lazy=true] Make to not render at initialization (enabled by default when bind element's visibility is hidden).
23432 * @property {boolean} [render.observe=true] Observe bind element's visibility(`display` or `visiblity` inline css property or class value) & render when is visible automatically (for IEs, only works IE11+). When set to **false**, call [`.flush()`](./Chart.html#flush) to render.
23433 * @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.LazyRender)
23434 * @example
23435 * render: {
23436 * lazy: true,
23437 * observe: true
23438 * }
23439 *
23440 * @example
23441 * // <!-- render.lazy will detect visibility defined -->
23442 * // (a) <div id='chart' class='hide'></div>
23443 * // (b) <div id='chart' style='display:none'></div>
23444 *
23445 * // render.lazy enabled by default when element is hidden
23446 * var chart = bb.generate({ ... });
23447 *
23448 * // chart will be rendered automatically when element's visibility changes
23449 * // Note: works only for inlined css property or class attribute changes
23450 * document.getElementById('chart').classList.remove('hide') // (a)
23451 * document.getElementById('chart').style.display = 'block'; // (b)
23452 *
23453 * @example
23454 * // chart won't be rendered and not observing bind element's visiblity changes
23455 * var chart = bb.generate({
23456 * render: {
23457 * lazy: true,
23458 * observe: false
23459 * }
23460 * });
23461 *
23462 * // call at any point when you want to render
23463 * chart.flush();
23464 */
23465 render: {},
23466 /**
23467 * Show rectangles inside the chart.<br><br>
23468 * This option accepts array including object that has axis, start, end and class.
23469 * The keys start, end and class are optional.
23470 * axis must be x, y or y2. start and end should be the value where regions start and end.
23471 * If not specified, the edge values will be used.
23472 * If timeseries x axis, date string, Date object and unixtime integer can be used.
23473 * If class is set, the region element will have it as class.
23474 * @name regions
23475 * @memberof Options
23476 * @type {Array}
23477 * @default []
23478 * @example
23479 * regions: [
23480 * {
23481 * axis: "x",
23482 * start: 1,
23483 * end: 4,
23484 * class: "region-1-4"
23485 * }
23486 * ]
23487 */
23488 regions: []
23489});
23490;// CONCATENATED MODULE: ./src/config/Options/common/boost.ts
23491/**
23492 * Copyright (c) 2017 ~ present NAVER Corp.
23493 * billboard.js project is licensed under the MIT license
23494 */
23495/**
23496 * boost config options
23497 */
23498/* harmony default export */ var boost = ({
23499 /**
23500 * Set boost options
23501 * @name boost
23502 * @memberof Options
23503 * @type {object}
23504 * @property {object} boost boost object
23505 * @property {boolean} [boost.useCssRule=false] Avoid setting inline styles for each shape elements.
23506 * - **NOTE:**
23507 * - Will append &lt;style> to the head tag and will add shpes' CSS rules dynamically.
23508 * - For now, covers colors related properties (fill, stroke, etc.) only.
23509 * @property {boolean} [boost.useWorker=false] Use Web Worker as possible for processing.
23510 * - **NOTE:**
23511 * - For now, only applies for data conversion at the initial time.
23512 * - As of Web Worker's async nature, handling chart instance synchrously is not recommended.
23513 * @example
23514 * boost: {
23515 * useCssRule: true,
23516 * useWorker: false
23517 * }
23518 */
23519 boost_useCssRule: !1,
23520 boost_useWorker: !1
23521});
23522;// CONCATENATED MODULE: ./src/config/Options/data/data.ts
23523
23524var data_this = undefined;
23525/**
23526 * Copyright (c) 2017 ~ present NAVER Corp.
23527 * billboard.js project is licensed under the MIT license
23528 */
23529
23530/**
23531 * data config options
23532 */
23533/* harmony default export */ var data_data = ({
23534 /**
23535 * Specify the key of x values in the data.<br><br>
23536 * We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data on the key will be used for category names.
23537 * @name data․x
23538 * @memberof Options
23539 * @type {string}
23540 * @default undefined
23541 * @example
23542 * data: {
23543 * x: "date"
23544 * }
23545 */
23546 data_x: undefined,
23547 /**
23548 * Converts data id value
23549 * @name data․idConverter
23550 * @memberof Options
23551 * @type {Function}
23552 * @default function(id) { return id; }
23553 * @example
23554 * data: {
23555 * idConverter: function(id) {
23556 * // when id is 'data1', converts to be 'data2'
23557 * // 'data2' should be given as the initial data value
23558 * if (id === "data1") {
23559 * return "data2";
23560 * } else {
23561 * return id;
23562 * }
23563 * }
23564 * }
23565 */
23566 data_idConverter: function data_idConverter(id) {
23567 _newArrowCheck(this, data_this);
23568 return id;
23569 }.bind(undefined),
23570 /**
23571 * Set custom data name.
23572 * If a name is set to `null`, the series is omitted from the legend.
23573 * @name data․names
23574 * @memberof Options
23575 * @type {object}
23576 * @default {}
23577 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataName)
23578 * @example
23579 * data: {
23580 * names: {
23581 * data1: "Data Name 1",
23582 * data2: "Data Name 2"
23583 * }
23584 * }
23585 */
23586 data_names: {},
23587 /**
23588 * Set custom data class.<br><br>
23589 * If this option is specified, the element g for the data has an additional class that has the prefix 'bb-target-' (eg. bb-target-additional-data1-class).
23590 * @name data․classes
23591 * @memberof Options
23592 * @type {object}
23593 * @default {}
23594 * @example
23595 * data: {
23596 * classes: {
23597 * data1: "additional-data1-class",
23598 * data2: "additional-data2-class"
23599 * }
23600 * }
23601 */
23602 data_classes: {},
23603 /**
23604 * Set chart type at once.<br><br>
23605 * If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types.<br><br>
23606 * **Available Values:**
23607 * - area
23608 * - area-line-range
23609 * - area-spline
23610 * - area-spline-range
23611 * - area-step
23612 * - bar
23613 * - bubble
23614 * - candlestick
23615 * - donut
23616 * - gauge
23617 * - line
23618 * - pie
23619 * - polar
23620 * - radar
23621 * - scatter
23622 * - spline
23623 * - step
23624 * @name data․type
23625 * @memberof Options
23626 * @type {string}
23627 * @default "line"<br>NOTE: When importing shapes by ESM, `line()` should be specified for type.
23628 * @example
23629 * data: {
23630 * type: "bar"
23631 * }
23632 * @example
23633 * // Generate chart by importing ESM
23634 * // Import types to be used only, where this will make smaller bundle size.
23635 * import bb, {
23636 * area,
23637 * areaLineRange,
23638 * areaSpline,
23639 * areaSplineRange,
23640 * areaStep,
23641 * bar,
23642 * bubble,
23643 * candlestick,
23644 * donut,
23645 * gauge,
23646 * line,
23647 * pie,
23648 * polar,
23649 * radar,
23650 * scatter,
23651 * spline,
23652 * step
23653 * }
23654 *
23655 * bb.generate({
23656 * ...,
23657 * data: {
23658 * type: bar()
23659 * }
23660 * });
23661 */
23662 data_type: undefined,
23663 /**
23664 * Set chart type for each data.<br>
23665 * This setting overwrites data.type setting.
23666 * - **NOTE:** `radar` type can't be combined with other types.
23667 * @name data․types
23668 * @memberof Options
23669 * @type {object}
23670 * @default {}
23671 * @example
23672 * data: {
23673 * types: {
23674 * data1: "bar",
23675 * data2: "spline"
23676 * }
23677 * }
23678 * @example
23679 * // Generate chart by importing ESM
23680 * // Import types to be used only, where this will make smaller bundle size.
23681 * import bb, {
23682 * area,
23683 * areaLineRange,
23684 * areaSpline,
23685 * areaSplineRange,
23686 * areaStep,
23687 * bar,
23688 * bubble,
23689 * candlestick,
23690 * donut,
23691 * gauge,
23692 * line,
23693 * pie,
23694 * polar,
23695 * radar,
23696 * scatter,
23697 * spline,
23698 * step
23699 * }
23700 *
23701 * bb.generate({
23702 * ...,
23703 * data: {
23704 * types: {
23705 * data1: bar(),
23706 * data1: spline()
23707 * }
23708 * }
23709 * });
23710 */
23711 data_types: {},
23712 /**
23713 * This option changes the order of stacking data and pieces of pie/donut.
23714 * - If `null` specified, it will be the order the data loaded.
23715 * - If function specified, it will be used as [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)<br><br>
23716 *
23717 * **Available Values:**
23718 * - `desc`: In descending order
23719 * - `asc`: In ascending order
23720 * - `null`: It keeps the data load order
23721 * - `function(data1, data2) { ... }`: Array.sort compareFunction
23722 *
23723 * **NOTE**: order function, only works for Axis based types & Arc types, except `Radar` type.
23724 * @name data․order
23725 * @memberof Options
23726 * @type {string|Function|null}
23727 * @default desc
23728 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataOrder)
23729 * @example
23730 * data: {
23731 * // in descending order (default)
23732 * order: "desc"
23733 *
23734 * // in ascending order
23735 * order: "asc"
23736 *
23737 * // keeps data input order
23738 * order: null
23739 *
23740 * // specifying sort function
23741 * order: function(a, b) {
23742 * // param data passed format
23743 * // {
23744 * // id: "data1", id_org: "data1", values: [
23745 * // {x: 5, value: 250, id: "data1", index: 5, name: "data1"},
23746 * // ...
23747 * // ]
23748 * // }
23749 *
23750 * const reducer = (p, c) => p + Math.abs(c.value);
23751 * const aSum = a.values.reduce(reducer, 0);
23752 * const bSum = b.values.reduce(reducer, 0);
23753 *
23754 * // ascending order
23755 * return aSum - bSum;
23756 *
23757 * // descending order
23758 * // return bSum - aSum;
23759 * }
23760 * }
23761 */
23762 data_order: "desc",
23763 /**
23764 * Set groups for the data for stacking.
23765 * @name data․groups
23766 * @memberof Options
23767 * @type {Array}
23768 * @default []
23769 * @example
23770 * data: {
23771 * groups: [
23772 * ["data1", "data2"],
23773 * ["data3"]
23774 * ]
23775 * }
23776 */
23777 data_groups: [],
23778 /**
23779 * Set how zero value will be treated on groups.<br>
23780 * Possible values:
23781 * - `zero`: 0 will be positioned at absolute axis zero point.
23782 * - `positive`: 0 will be positioned at the top of a stack.
23783 * - `negative`: 0 will be positioned at the bottom of a stack.
23784 * @name data․groupsZeroAs
23785 * @memberof Options
23786 * @type {string}
23787 * @default "positive"
23788 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.Groups)
23789 * @example
23790 * data: {
23791 * groupsZeroAs: "zero" // "positive" or "negative"
23792 * }
23793 */
23794 data_groupsZeroAs: "positive",
23795 /**
23796 * Set color converter function.<br><br>
23797 * This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00').
23798 * @name data․color
23799 * @memberof Options
23800 * @type {Function}
23801 * @default undefined
23802 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataColor)
23803 * @example
23804 * data: {
23805 * color: function(color, d) { ... }
23806 * }
23807 */
23808 data_color: undefined,
23809 /**
23810 * Set color for each data.
23811 * @name data․colors
23812 * @memberof Options
23813 * @type {object}
23814 * @default {}
23815 * @example
23816 * data: {
23817 * colors: {
23818 * data1: "#ff0000",
23819 * data2: function(d) {
23820 * return "#000";
23821 * }
23822 * ...
23823 * }
23824 * }
23825 */
23826 data_colors: {},
23827 /**
23828 * Set labels options
23829 * @name data․labels
23830 * @memberof Options
23831 * @type {object}
23832 * @property {object} data Data object
23833 * @property {boolean} [data.labels=false] Show or hide labels on each data points
23834 * @property {boolean} [data.labels.centered=false] Centerize labels on `bar` shape. (**NOTE:** works only for 'bar' type)
23835 * @property {Function} [data.labels.format] Set formatter function for data labels.<br>
23836 * The formatter function receives 4 arguments such as v, id, i, j and it **must return a string**(`\n` character will be used as line break) that will be shown as the label.<br><br>
23837 * The arguments are:<br>
23838 * - `v` is the value of the data point where the label is shown.
23839 * - `id` is the id of the data where the label is shown.
23840 * - `i` is the index of the data series point where the label is shown.
23841 * - `texts` is the array of whole corresponding data series' text labels.<br><br>
23842 * Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (ex. d3.format('$'))
23843 * @property {string|object} [data.labels.backgroundColors] Set label text background colors.
23844 * @property {string|object|Function} [data.labels.colors] Set label text colors.
23845 * @property {object} [data.labels.position] Set each dataset position, relative the original.
23846 * @property {number} [data.labels.position.x=0] x coordinate position, relative the original.
23847 * @property {number} [data.labels.position.y=0] y coordinate position, relative the original.
23848 * @property {object} [data.labels.rotate] Rotate label text. Specify degree value in a range of `0 ~ 360`.
23849 * - **NOTE:** Depend on rotate value, text position need to be adjusted manually(using `data.labels.position` option) to be shown nicely.
23850 * @memberof Options
23851 * @type {object}
23852 * @default {}
23853 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataLabel)
23854 * @see [Demo: label colors](https://naver.github.io/billboard.js/demo/#Data.DataLabelColors)
23855 * @see [Demo: label format](https://naver.github.io/billboard.js/demo/#Data.DataLabelFormat)
23856 * @see [Demo: label multiline](https://naver.github.io/billboard.js/demo/#Data.DataLabelMultiline)
23857 * @see [Demo: label overlap](https://naver.github.io/billboard.js/demo/#Data.DataLabelOverlap)
23858 * @see [Demo: label position](https://naver.github.io/billboard.js/demo/#Data.DataLabelPosition)
23859 * @see [Demo: label rotate](https://naver.github.io/billboard.js/demo/#Data.DataLabelRotate)
23860 * @example
23861 * data: {
23862 * labels: true,
23863 *
23864 * // or set specific options
23865 * labels: {
23866 * format: function(v, id, i, j) {
23867 * ...
23868 * // to multiline, return with '\n' character
23869 * return "Line1\nLine2";
23870 * },
23871 *
23872 * // it's possible to set for each data
23873 * format: {
23874 * data1: function(v, id, i, texts) { ... },
23875 * ...
23876 * },
23877 *
23878 * // align text to center of the 'bar' shape (works only for 'bar' type)
23879 * centered: true,
23880 *
23881 * // apply backgound color for label texts
23882 * backgroundColors: "red",
23883 *
23884 * // set differenct backround colors per dataset
23885 * backgroundColors: {
23886 * data1: "green",
23887 * data2: "yellow"
23888 * }
23889 *
23890 * // apply for all label texts
23891 * colors: "red",
23892 *
23893 * // set different colors per dataset
23894 * // for not specified dataset, will have the default color value
23895 * colors: {
23896 * data1: "yellow",
23897 * data3: "green"
23898 * },
23899 *
23900 * // call back for label text color
23901 * colors: function(color, d) {
23902 * // color: the default data label color string
23903 * // data: ex) {x: 0, value: 200, id: "data3", index: 0}
23904 * ....
23905 * return d.value > 200 ? "cyan" : color;
23906 * },
23907 *
23908 * // set x, y coordinate position
23909 * position: {
23910 * x: -10,
23911 * y: 10
23912 * },
23913 *
23914 * // or set x, y coordinate position by each dataset
23915 * position: {
23916 * data1: {x: 5, y: 5},
23917 * data2: {x: 10, y: -20}
23918 * },
23919 *
23920 * // rotate degree for label text
23921 * rotate: 90
23922 * }
23923 * }
23924 */
23925 data_labels: {},
23926 data_labels_backgroundColors: undefined,
23927 data_labels_colors: undefined,
23928 data_labels_position: {},
23929 /**
23930 * Hide each data when the chart appears.<br><br>
23931 * If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden.
23932 * @name data․hide
23933 * @memberof Options
23934 * @type {boolean|Array}
23935 * @default false
23936 * @example
23937 * data: {
23938 * // all of data will be hidden
23939 * hide: true
23940 *
23941 * // specified data will be hidden
23942 * hide: ["data1", ...]
23943 * }
23944 */
23945 data_hide: !1,
23946 /**
23947 * Filter values to be shown
23948 * The data value is the same as the returned by `.data()`.
23949 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
23950 * @name data․filter
23951 * @memberof Options
23952 * @type {Function}
23953 * @default undefined
23954 * @example
23955 * data: {
23956 * // filter for id value
23957 * filter: function(v) {
23958 * // v: [{id: "data1", id_org: "data1", values: [
23959 * // {x: 0, value: 130, id: "data2", index: 0}, ...]
23960 * // }, ...]
23961 * return v.id !== "data1";
23962 * }
23963 */
23964 data_filter: undefined,
23965 /**
23966 * Set a callback for click event on each data point.<br><br>
23967 * This callback will be called when each data point clicked and will receive `d` and element as the arguments.
23968 * - `d` is the data clicked and element is the element clicked.
23969 * - `element` is the current interacting svg element.
23970 * - In this callback, `this` will be the Chart object.
23971 * @name data․onclick
23972 * @memberof Options
23973 * @type {Function}
23974 * @default function() {}
23975 * @example
23976 * data: {
23977 * onclick: function(d, element) {
23978 * // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"}
23979 * // element - <circle>
23980 * ...
23981 * }
23982 * }
23983 */
23984 data_onclick: function data_onclick() {
23985 _newArrowCheck(this, data_this);
23986 }.bind(undefined),
23987 /**
23988 * Set a callback for mouse/touch over event on each data point.<br><br>
23989 * This callback will be called when mouse cursor or via touch moves onto each data point and will receive `d` and `element` as the argument.
23990 * - `d` is the data where mouse cursor moves onto.
23991 * - `element` is the current interacting svg element.
23992 * - In this callback, `this` will be the Chart object.
23993 * @name data․onover
23994 * @memberof Options
23995 * @type {Function}
23996 * @default function() {}
23997 * @example
23998 * data: {
23999 * onover: function(d, element) {
24000 * // d - ex) {x: 4, value: 150, id: "data1", index: 4}
24001 * // element - <circle>
24002 * ...
24003 * }
24004 * }
24005 */
24006 data_onover: function data_onover() {
24007 _newArrowCheck(this, data_this);
24008 }.bind(undefined),
24009 /**
24010 * Set a callback for mouse/touch out event on each data point.<br><br>
24011 * This callback will be called when mouse cursor or via touch moves out each data point and will receive `d` as the argument.
24012 * - `d` is the data where mouse cursor moves out.
24013 * - `element` is the current interacting svg element.
24014 * - In this callback, `this` will be the Chart object.
24015 * @name data․onout
24016 * @memberof Options
24017 * @type {Function}
24018 * @default function() {}
24019 * @example
24020 * data: {
24021 * onout: function(d, element) {
24022 * // d - ex) {x: 4, value: 150, id: "data1", index: 4}
24023 * // element - <circle>
24024 * ...
24025 * }
24026 * }
24027 */
24028 data_onout: function data_onout() {
24029 _newArrowCheck(this, data_this);
24030 }.bind(undefined),
24031 /**
24032 * Set a callback for when data is shown.<br>
24033 * The callback will receive shown data ids in array.
24034 * @name data․onshown
24035 * @memberof Options
24036 * @type {Function}
24037 * @default undefined
24038 * @example
24039 * data: {
24040 * onshown: function(ids) {
24041 * // ids - ["data1", "data2", ...]
24042 * ...
24043 * }
24044 * }
24045 */
24046 data_onshown: undefined,
24047 /**
24048 * Set a callback for when data is hidden.<br>
24049 * The callback will receive hidden data ids in array.
24050 * @name data․onhidden
24051 * @memberof Options
24052 * @type {Function}
24053 * @default undefined
24054 * @example
24055 * data: {
24056 * onhidden: function(ids) {
24057 * // ids - ["data1", "data2", ...]
24058 * ...
24059 * }
24060 * }
24061 */
24062 data_onhidden: undefined,
24063 /**
24064 * Set a callback for minimum data
24065 * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison
24066 * @name data․onmin
24067 * @memberof Options
24068 * @type {Function}
24069 * @default undefined
24070 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.OnMinMaxCallback)
24071 * @example
24072 * onmin: function(data) {
24073 * // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ]
24074 * ...
24075 * }
24076 */
24077 data_onmin: undefined,
24078 /**
24079 * Set a callback for maximum data
24080 * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison
24081 * @name data․onmax
24082 * @memberof Options
24083 * @type {Function}
24084 * @default undefined
24085 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.OnMinMaxCallback)
24086 * @example
24087 * onmax: function(data) {
24088 * // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ]
24089 * ...
24090 * }
24091 */
24092 data_onmax: undefined,
24093 /**
24094 * Load a CSV or JSON file from a URL. NOTE that this will not work if loading via the "file://" protocol as the most browsers will block XMLHTTPRequests.
24095 * @name data․url
24096 * @memberof Options
24097 * @type {string}
24098 * @default undefined
24099 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.LoadData)
24100 * @example
24101 * data: {
24102 * url: "/data/test.csv"
24103 * }
24104 */
24105 data_url: undefined,
24106 /**
24107 * XHR header value
24108 * - **NOTE:** Should be used with `data.url` option
24109 * @name data․headers
24110 * @memberof Options
24111 * @type {string}
24112 * @default undefined
24113 * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader
24114 * @example
24115 * data: {
24116 * url: "/data/test.csv",
24117 * headers: {
24118 * "Content-Type": "text/xml",
24119 * ...
24120 * }
24121 * }
24122 */
24123 data_headers: undefined,
24124 /**
24125 * Parse a JSON object for data. See also data.keys.
24126 * @name data․json
24127 * @memberof Options
24128 * @type {Array}
24129 * @default undefined
24130 * @see [data․keys](#.data%25E2%2580%25A4keys)
24131 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.JSONData)
24132 * @example
24133 * data: {
24134 * json: [
24135 * {name: "www.site1.com", upload: 200, download: 200, total: 400},
24136 * {name: "www.site2.com", upload: 100, download: 300, total: 400},
24137 * {name: "www.site3.com", upload: 300, download: 200, total: 500},
24138 * {name: "www.site4.com", upload: 400, download: 100, total: 500}
24139 * ],
24140 * keys: {
24141 * // x: "name", // it's possible to specify 'x' when category axis
24142 * value: ["upload", "download"]
24143 * }
24144 * }
24145 */
24146 data_json: undefined,
24147 /**
24148 * Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.
24149 * @name data․rows
24150 * @memberof Options
24151 * @type {Array}
24152 * @default undefined
24153 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.RowOrientedData)
24154 * @example
24155 * data: {
24156 * rows: [
24157 * ["A", "B", "C"],
24158 * [90, 120, 300],
24159 * [40, 160, 240],
24160 * [50, 200, 290],
24161 * [120, 160, 230],
24162 * [80, 130, 300],
24163 * [90, 220, 320]
24164 * ]
24165 * }
24166 *
24167 * // for 'bar' type, data can contain:
24168 * // - an array of [start, end] data following the order
24169 * data: {
24170 * rows: [
24171 * ["data1", "data2"],
24172 * [[100, 150], 120],
24173 * [[200, 300], 55],
24174 * [[-400, 500], 60]
24175 * ],
24176 * type: "bar"
24177 * }
24178 *
24179 * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
24180 * // - an array of [high, mid, low] data following the order
24181 * // - or an object with 'high', 'mid' and 'low' key value
24182 * data: {
24183 * rows: [
24184 * ["data1", "data2"],
24185 * [
24186 * // or {high:150, mid: 140, low: 110}, 120
24187 * [150, 140, 110], 120
24188 * ],
24189 * [[155, 130, 115], 55],
24190 * [[160, 135, 120], 60]
24191 * ],
24192 * types: {
24193 * data1: "area-line-range",
24194 * data2: "line"
24195 * }
24196 * }
24197 *
24198 * // for 'bubble' type, data can contain dimension value:
24199 * // - an array of [y, z] data following the order
24200 * // - or an object with 'y' and 'z' key value
24201 * // 'y' is for y axis coordination and 'z' is the bubble radius value
24202 * data: {
24203 * rows: [
24204 * ["data1", "data2"],
24205 * [
24206 * // or {y:10, z: 140}, 120
24207 * [10, 140], 120
24208 * ],
24209 * [[100, 30], 55],
24210 * [[50, 100], 60]
24211 * ],
24212 * types: {
24213 * data1: "bubble",
24214 * data2: "line"
24215 * }
24216 * }
24217 *
24218 * // for 'canlestick' type, data should contain:
24219 * // - an array of [open, high, low, close, volume(optional)] data following the order
24220 * // - or an object with 'open', 'high', 'low', 'close' and 'value'(optional) key value
24221 * data: {
24222 * rows: [
24223 * ["data1", "data2"],
24224 * [
24225 * // open, high, low, close, volume (optional)
24226 * {open: 1300, high: 1369, low: 1200, close: 1339, volume: 100},
24227 * [1000, 1100, 850, 870]
24228 * ],
24229 * [
24230 * {open: 1348, high: 1371, low: 1271, close: 1320},
24231 * [870, 1250, 830, 1200, 50]
24232 * ]
24233 * ],
24234 * type: "candlestick"
24235 * }
24236 */
24237 data_rows: undefined,
24238 /**
24239 * Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.
24240 * @name data․columns
24241 * @memberof Options
24242 * @type {Array}
24243 * @default undefined
24244 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.ColumnOrientedData)
24245 * @example
24246 * data: {
24247 * columns: [
24248 * ["data1", 30, 20, 50, 40, 60, 50],
24249 * ["data2", 200, 130, 90, 240, 130, 220],
24250 * ["data3", 300, 200, 160, 400, 250, 250]
24251 * ]
24252 * }
24253 *
24254 * // for 'bar' type, data can contain:
24255 * // - an array of [start, end] data following the order
24256 * data: {
24257 * columns: [
24258 * ["data1", -100, 50, [100, 200], [200, 300]],
24259 * ["data2", -200, 300, [-100, 100], [-50, -30]],
24260 * ],
24261 * type: "bar"
24262 * }
24263 *
24264 * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
24265 * // - an array of [high, mid, low] data following the order
24266 * // - or an object with 'high', 'mid' and 'low' key value
24267 * data: {
24268 * columns: [
24269 * ["data1",
24270 * [150, 140, 110], // or {high:150, mid: 140, low: 110}
24271 * [150, 140, 110],
24272 * [150, 140, 110]
24273 * ]
24274 * ],
24275 * type: "area-line-range"
24276 * }
24277 *
24278 * // for 'bubble' type, data can contain dimension value:
24279 * // - an array of [y, z] data following the order
24280 * // - or an object with 'y' and 'z' key value
24281 * // 'y' is for y axis coordination and 'z' is the bubble radius value
24282 * data: {
24283 * columns: [
24284 * ["data1",
24285 * [10, 140], // or {y:10, z: 140}
24286 * [100, 30],
24287 * [50, 100]
24288 * ]
24289 * ],
24290 * type: "bubble"
24291 * }
24292 *
24293 * // for 'canlestick' type, data should contain:
24294 * // - an array of [open, high, low, close, volume(optional)] data following the order
24295 * // - or an object with 'open', 'high', 'low', 'close' and 'value'(optional) key value
24296 * data: {
24297 * columns: [
24298 * ["data1",
24299 * [1000, 1100, 850, 870, 100], // or {open:1000, high: 1100, low: 870, volume: 100}
24300 * [870, 1250, 830, 1200] // 'volume' can be omitted
24301 * ]
24302 * ],
24303 * type: "candlestick"
24304 * }
24305 */
24306 data_columns: undefined,
24307 /**
24308 * Used if loading JSON via data.url.
24309 * - **Available Values:**
24310 * - json
24311 * - csv
24312 * - tsv
24313 * @name data․mimeType
24314 * @memberof Options
24315 * @type {string}
24316 * @default csv
24317 * @example
24318 * data: {
24319 * mimeType: "json"
24320 * }
24321 */
24322 data_mimeType: "csv",
24323 /**
24324 * Choose which JSON object keys correspond to desired data.
24325 * - **NOTE:** Only for JSON object given as array.
24326 * @name data․keys
24327 * @memberof Options
24328 * @type {string}
24329 * @default undefined
24330 * @example
24331 * data: {
24332 * json: [
24333 * {name: "www.site1.com", upload: 200, download: 200, total: 400},
24334 * {name: "www.site2.com", upload: 100, download: 300, total: 400},
24335 * {name: "www.site3.com", upload: 300, download: 200, total: 500},
24336 * {name: "www.site4.com", upload: 400, download: 100, total: 500}
24337 * ],
24338 * keys: {
24339 * // x: "name", // it's possible to specify 'x' when category axis
24340 * value: ["upload", "download"]
24341 * }
24342 * }
24343 */
24344 data_keys: undefined,
24345 /**
24346 * Set text label to be displayed when there's no data to show.
24347 * - ex. Toggling all visible data to not be shown, unloading all current data, etc.
24348 * @name data․empty․label․text
24349 * @memberof Options
24350 * @type {string}
24351 * @default ""
24352 * @example
24353 * data: {
24354 * empty: {
24355 * label: {
24356 * text: "No Data"
24357 * }
24358 * }
24359 * }
24360 */
24361 data_empty_label_text: ""
24362});
24363;// CONCATENATED MODULE: ./src/config/Options/common/color.ts
24364/**
24365 * Copyright (c) 2017 ~ present NAVER Corp.
24366 * billboard.js project is licensed under the MIT license
24367 */
24368/**
24369 * color config options
24370 */
24371/* harmony default export */ var common_color = ({
24372 /**
24373 * Set color of the data values
24374 * @name color
24375 * @memberof Options
24376 * @type {object}
24377 * @property {object} color color object
24378 * @property {string|object|Function} [color.onover] Set the color value for each data point when mouse/touch onover event occurs.
24379 * @property {Array|null} [color.pattern=[]] Set custom color pattern. Passing `null` will not set a color for these elements, which requires the usage of custom CSS-based theming to work.
24380 * @property {Function} [color.tiles] if defined, allows use svg's patterns to fill data area. It should return an array of [SVGPatternElement](https://developer.mozilla.org/en-US/docs/Web/API/SVGPatternElement).
24381 * - **NOTE:** The pattern element's id will be defined as `bb-colorize-pattern-$COLOR-VALUE`.<br>
24382 * ex. When color pattern value is `['red', '#fff']` and defined 2 patterns,then ids for pattern elements are:<br>
24383 * - `bb-colorize-pattern-red`
24384 * - `bb-colorize-pattern-fff`
24385 * @property {object} [color.threshold] color threshold for gauge and tooltip color
24386 * @property {string} [color.threshold.unit] If set to `value`, the threshold will be based on the data value. Otherwise it'll be based on equation of the `threshold.max` option value.
24387 * @property {Array} [color.threshold.values] Threshold values for each steps
24388 * @property {number} [color.threshold.max=100] The base value to determine threshold step value condition. When the given value is 15 and max 10, then the value for threshold is `15*100/10`.
24389 * @example
24390 * color: {
24391 * pattern: ["#1f77b4", "#aec7e8", ...],
24392 *
24393 * // Set colors' patterns
24394 * // it should return an array of SVGPatternElement
24395 * tiles: function() {
24396 * var pattern = document.createElementNS("http://www.w3.org/2000/svg", "pattern");
24397 * var g = document.createElementNS("http://www.w3.org/2000/svg", "g");
24398 * var circle1 = document.createElementNS("http://www.w3.org/2000/svg", "circle");
24399 *
24400 * pattern.setAttribute("patternUnits", "userSpaceOnUse");
24401 * pattern.setAttribute("width", "32");
24402 * pattern.setAttribute("height", "32");
24403 *
24404 * g.style.fill = "#000";
24405 * g.style.opacity = "0.2";
24406 *
24407 * circle1.setAttribute("cx", "3");
24408 * circle1.setAttribute("cy", "3");
24409 * circle1.setAttribute("r", "3");
24410 *
24411 * g.appendChild(circle1);
24412 * pattern.appendChild(g);
24413 *
24414 * return [pattern];
24415 * },
24416 *
24417 * // for threshold usage, pattern values should be set for each steps
24418 * pattern: ["grey", "green", "yellow", "orange", "red"],
24419 * threshold: {
24420 * unit: "value",
24421 *
24422 * // when value is 20 => 'green', value is 40 => 'orange' will be set.
24423 * values: [10, 20, 30, 40, 50],
24424 *
24425 * // the equation for max:
24426 * // - unit == 'value': max => 30
24427 * // - unit != 'value': max => value*100/30
24428 * max: 30
24429 * },
24430 *
24431 * // set all data to 'red'
24432 * onover: "red",
24433 *
24434 * // set different color for data
24435 * onover: {
24436 * data1: "red",
24437 * data2: "yellow"
24438 * },
24439 *
24440 * // will pass data object to the callback
24441 * onover: function(d) {
24442 * return d.id === "data1" ? "red" : "green";
24443 * }
24444 * }
24445 */
24446 color_pattern: [],
24447 color_tiles: undefined,
24448 color_threshold: {},
24449 color_onover: undefined
24450});
24451;// CONCATENATED MODULE: ./src/config/Options/interaction/interaction.ts
24452/**
24453 * Copyright (c) 2017 ~ present NAVER Corp.
24454 * billboard.js project is licensed under the MIT license
24455 */
24456/**
24457 * interaction config options
24458 */
24459/* harmony default export */ var interaction = ({
24460 /**
24461 * Interaction options
24462 * @name interaction
24463 * @memberof Options
24464 * @type {object}
24465 * @property {object} interaction Intersection object
24466 * @property {boolean} [interaction.enabled=true] Indicate if the chart should have interactions.<br>
24467 * If `false` is set, all of interactions (showing/hiding tooltip, selection, mouse events, etc) will be disabled.
24468 * @property {boolean} [interaction.brighten=true] Make brighter for the selected area (ex. 'pie' type data selected area)
24469 * @property {boolean} [interaction.inputType.mouse=true] enable or disable mouse interaction
24470 * @property {boolean} [interaction.inputType.touch=true] enable or disable touch interaction
24471 * @property {boolean|number} [interaction.inputType.touch.preventDefault=false] enable or disable to call event.preventDefault on touchstart & touchmove event. It's usually used to prevent document scrolling.
24472 * @see [Demo: touch.preventDefault](https://naver.github.io/billboard.js/demo/#Interaction.PreventScrollOnTouch)
24473 * @example
24474 * interaction: {
24475 * enabled: false,
24476 * brighten: false,
24477 * inputType: {
24478 * mouse: true,
24479 * touch: false
24480 *
24481 * // or declare preventDefault explicitly.
24482 * // In this case touch inputType is enabled by default
24483 * touch: {
24484 * preventDefault: true
24485 *
24486 * // or threshold pixel value (pixel moved from touchstart to touchmove)
24487 * preventDefault: 5
24488 * }
24489 * }
24490 * }
24491 */
24492 interaction_enabled: !0,
24493 interaction_brighten: !0,
24494 interaction_inputType_mouse: !0,
24495 interaction_inputType_touch: {}
24496});
24497;// CONCATENATED MODULE: ./src/config/Options/common/legend.ts
24498/**
24499 * Copyright (c) 2017 ~ present NAVER Corp.
24500 * billboard.js project is licensed under the MIT license
24501 */
24502/**
24503 * legend config options
24504 */
24505/* harmony default export */ var legend = ({
24506 /**
24507 * Legend options
24508 * @name legend
24509 * @memberof Options
24510 * @type {object}
24511 * @property {object} legend Legend object
24512 * @property {boolean} [legend.show=true] Show or hide legend.
24513 * @property {boolean} [legend.hide=false] Hide legend
24514 * If true given, all legend will be hidden. If string or array given, only the legend that has the id will be hidden.
24515 * @property {string|HTMLElement} [legend.contents.bindto=undefined] Set CSS selector or element reference to bind legend items.
24516 * - **NOTE:** Should be used along with `legend.contents.template`.
24517 * @property {string|Function} [legend.contents.template="<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>"] Set item's template.<br>
24518 * - If set `string` value, within template the 'color' and 'title' can be replaced using template-like syntax string:
24519 * - {=COLOR}: data color value
24520 * - {=TITLE}: data title value
24521 * - If set `function` value, will pass following arguments to the given function:
24522 * - title {string}: data's id value
24523 * - color {string}: color string
24524 * - data {Array}: data array
24525 * @property {string} [legend.position=bottom] Change the position of legend.<br>
24526 * Available values are: `bottom`, `right` and `inset` are supported.
24527 * @property {object} [legend.inset={anchor: 'top-left',x: 10,y: 0,step: undefined}] Change inset legend attributes.<br>
24528 * This option accepts object that has the keys `anchor`, `x`, `y` and `step`.
24529 * - **anchor** decides the position of the legend:
24530 * - top-left
24531 * - top-right
24532 * - bottom-left
24533 * - bottom-right
24534 * - **x** and **y**:
24535 * - set the position of the legend based on the anchor.
24536 * - **step**:
24537 * - defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns).
24538 * @property {boolean} [legend.equally=false] Set to all items have same width size.
24539 * @property {boolean} [legend.padding=0] Set padding value
24540 * @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item.
24541 * @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item.
24542 * @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item.
24543 * @property {number} [legend.item.tile.width=10] Set width for 'rectangle' legend item tile element.
24544 * @property {number} [legend.item.tile.height=10] ㄹ
24545 * @property {number} [legend.item.tile.r=5] Set the radius for 'circle' legend item tile type.
24546 * @property {string} [legend.item.tile.type="rectangle"] Set legend item shape type.<br>
24547 * - **Available Values:**
24548 * - circle
24549 * - rectangle
24550 * @property {boolean} [legend.usePoint=false] Whether to use custom points in legend.
24551 * @see [Demo: item.tile.type](https://naver.github.io/billboard.js/demo/#Legend.LegendItemTileType)
24552 * @see [Demo: position](https://naver.github.io/billboard.js/demo/#Legend.LegendPosition)
24553 * @see [Demo: contents.template](https://naver.github.io/billboard.js/demo/#Legend.LegendTemplate1)
24554 * @see [Demo: usePoint](https://naver.github.io/billboard.js/demo/#Legend.usePoint)
24555 * @example
24556 * legend: {
24557 * show: true,
24558 * hide: true,
24559 * //or hide: "data1"
24560 * //or hide: ["data1", "data2"]
24561 * contents: {
24562 * bindto: "#legend", // <ul id='legend'></ul>
24563 *
24564 * // will be as: <li style='background-color:#1f77b4'>data1</li>
24565 * template: "<li style='background-color:{=COLOR}'>{=TITLE}</li>"
24566 *
24567 * // or using function
24568 * template: function(id, color, data) {
24569 * // if you want omit some legend, return falsy value
24570 * if (id !== "data1") {
24571 * return "<li style='background-color:"+ color +">"+ id +"</li>";
24572 * }
24573 * }
24574 * },
24575 * position: "bottom", // bottom, right, inset
24576 * inset: {
24577 * anchor: "top-right" // top-left, top-right, bottom-left, bottom-right
24578 * x: 20,
24579 * y: 10,
24580 * step: 2
24581 * },
24582 * equally: false,
24583 * padding: 10,
24584 * item: {
24585 * onclick: function(id) { ... },
24586 * onover: function(id) { ... },
24587 * onout: function(id) { ... },
24588 *
24589 * // set tile's size
24590 * tile: {
24591 * // set tile type
24592 * type: "circle" // or "rectangle" (default)
24593 *
24594 * // width & height, are only applicable for 'rectangle' legend type
24595 * width: 15,
24596 * height: 15
24597 *
24598 * // radis is only applicable for 'circle' legend type
24599 * r: 10
24600 * }
24601 * },
24602 * usePoint: true
24603 * }
24604 */
24605 legend_show: !0,
24606 legend_hide: !1,
24607 legend_contents_bindto: undefined,
24608 legend_contents_template: "<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",
24609 legend_position: "bottom",
24610 legend_inset_anchor: "top-left",
24611 legend_inset_x: 10,
24612 legend_inset_y: 0,
24613 legend_inset_step: undefined,
24614 legend_item_onclick: undefined,
24615 legend_item_onover: undefined,
24616 legend_item_onout: undefined,
24617 legend_equally: !1,
24618 legend_padding: 0,
24619 legend_item_tile_width: 10,
24620 legend_item_tile_height: 10,
24621 legend_item_tile_r: 5,
24622 legend_item_tile_type: "rectangle",
24623 legend_usePoint: !1
24624});
24625;// CONCATENATED MODULE: ./src/config/Options/common/title.ts
24626/**
24627 * Copyright (c) 2017 ~ present NAVER Corp.
24628 * billboard.js project is licensed under the MIT license
24629 */
24630/**
24631 * title config options
24632 */
24633/* harmony default export */ var title = ({
24634 /**
24635 * Set title options
24636 * @name title
24637 * @memberof Options
24638 * @type {object}
24639 * @property {object} title Title object
24640 * @property {string} [title.text] Title text. If contains `\n`, it's used as line break allowing multiline title.
24641 * @property {number} [title.padding.top=0] Top padding value.
24642 * @property {number} [title.padding.right=0] Right padding value.
24643 * @property {number} [title.padding.bottom=0] Bottom padding value.
24644 * @property {number} [title.padding.left=0] Left padding value.
24645 * @property {string} [title.position=center] Available values are: 'center', 'right' and 'left'.
24646 * @see [Demo](https://naver.github.io/billboard.js/demo/#Title.MultilinedTitle)
24647 * @example
24648 * title: {
24649 * text: "Title Text",
24650 *
24651 * // or Multiline title text
24652 * text: "Main title text\nSub title text",
24653 *
24654 * padding: {
24655 * top: 10,
24656 * right: 10,
24657 * bottom: 10,
24658 * left: 10
24659 * },
24660 * position: "center"
24661 * }
24662 */
24663 title_text: undefined,
24664 title_padding: {
24665 top: 0,
24666 right: 0,
24667 bottom: 0,
24668 left: 0
24669 },
24670 title_position: "center"
24671});
24672;// CONCATENATED MODULE: ./src/config/Options/common/tooltip.ts
24673
24674var tooltip_this = undefined;
24675/**
24676 * Copyright (c) 2017 ~ present NAVER Corp.
24677 * billboard.js project is licensed under the MIT license
24678 */
24679/**
24680 * tooltip config options
24681 */
24682/* harmony default export */ var tooltip = ({
24683 /**
24684 * Tooltip options
24685 * @name tooltip
24686 * @memberof Options
24687 * @type {object}
24688 * @property {object} tooltip Tooltip object
24689 * @property {boolean} [tooltip.show=true] Show or hide tooltip.
24690 * @property {boolean} [tooltip.doNotHide=false] Make tooltip keep showing not hiding on interaction.
24691 * @property {boolean} [tooltip.grouped=true] Set if tooltip is grouped or not for the data points.
24692 * - **NOTE:** The overlapped data points will be displayed as grouped even if set false.
24693 * @property {boolean} [tooltip.linked=false] Set if tooltips on all visible charts with like x points are shown together when one is shown.
24694 * @property {string} [tooltip.linked.name=""] Groping name for linked tooltip.<br>If specified, linked tooltip will be groped interacting to be worked only with the same name.
24695 * @property {Function} [tooltip.format.title] Set format for the title of tooltip.<br>
24696 * Specified function receives x of the data point to show.
24697 * @property {Function} [tooltip.format.name] Set format for the name of each data in tooltip.<br>
24698 * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.
24699 * @property {Function} [tooltip.format.value] Set format for the value of each data in tooltip.<br>
24700 * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.
24701 * If undefined returned, the row of that value will be skipped.
24702 * @property {Function} [tooltip.position] Set custom position function for the tooltip.<br>
24703 * This option can be used to modify the tooltip position by returning object that has top and left.
24704 * - Will pass following arguments to the given function:
24705 * - `data {Array}`: Current selected data array object.
24706 * - `width {number}`: Width of tooltip.
24707 * - `height {number}`: Height of tooltip.
24708 * - `element {SVGElement}`: Tooltip event bound element
24709 * - `pos {object}`: Current position of the tooltip.
24710 * @property {Function|object} [tooltip.contents] Set custom HTML for the tooltip.<br>
24711 * If tooltip.grouped is true, data includes multiple data points.<br><br>
24712 * Specified function receives `data` array and `defaultTitleFormat`, `defaultValueFormat` and `color` functions of the data point to show.
24713 * - **Note:**
24714 * - defaultTitleFormat:
24715 * - if `axis.x.tick.format` option will be used if set.
24716 * - otherwise, will return function based on tick format type(category, timeseries).
24717 * - defaultValueFormat:
24718 * - for Arc type (except gauge, radar), the function will return value from `(ratio * 100).toFixed(1)`.
24719 * - for Axis based types, will be used `axis.[y|y2].tick.format` option value if is set.
24720 * - otherwise, will parse value and return as number.
24721 * @property {string|HTMLElement} [tooltip.contents.bindto=undefined] Set CSS selector or element reference to bind tooltip.
24722 * - **NOTE:** When is specified, will not be updating tooltip's position.
24723 * @property {string} [tooltip.contents.template=undefined] Set tooltip's template.<br><br>
24724 * Within template, below syntax will be replaced using template-like syntax string:
24725 * - **{{ ... }}**: the doubly curly brackets indicate loop block for data rows.
24726 * - **{=CLASS_TOOLTIP}**: default tooltip class name `bb-tooltip`.
24727 * - **{=CLASS_TOOLTIP_NAME}**: default tooltip data class name (ex. `bb-tooltip-name-data1`)
24728 * - **{=TITLE}**: title value.
24729 * - **{=COLOR}**: data color.
24730 * - **{=VALUE}**: data value.
24731 * @property {object} [tooltip.contents.text=undefined] Set additional text content within data loop, using template syntax.
24732 * - **NOTE:** It should contain `{ key: Array, ... }` value
24733 * - 'key' name is used as substitution within template as '{=KEY}'
24734 * - The value array length should match with the data length
24735 * @property {boolean} [tooltip.init.show=false] Show tooltip at the initialization.
24736 * @property {number} [tooltip.init.x=0] Set x Axis index(or index for Arc(donut, gauge, pie) types) to be shown at the initialization.
24737 * @property {object} [tooltip.init.position={top: "0px",left: "50px"}] Set the position of tooltip at the initialization.
24738 * @property {Function} [tooltip.onshow] Set a callback that will be invoked before the tooltip is shown.
24739 * @property {Function} [tooltip.onhide] Set a callback that will be invoked before the tooltip is hidden.
24740 * @property {Function} [tooltip.onshown] Set a callback that will be invoked after the tooltip is shown
24741 * @property {Function} [tooltip.onhidden] Set a callback that will be invoked after the tooltip is hidden.
24742 * @property {string|Function|null} [tooltip.order=null] Set tooltip data display order.<br><br>
24743 * **Available Values:**
24744 * - `desc`: In descending data value order
24745 * - `asc`: In ascending data value order
24746 * - `null`: It keeps the data display order<br>
24747 * **NOTE:** When `data.groups` is set, the order will follow as the stacked graph order.<br>
24748 * If want to order as data bound, set any value rather than asc, desc or null. (ex. empty string "")
24749 * - `function(data1, data2) { ... }`: [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)
24750 * @see [Demo: Hide Tooltip](https://naver.github.io/billboard.js/demo/#Tooltip.HideTooltip)
24751 * @see [Demo: Tooltip Grouping](https://naver.github.io/billboard.js/demo/#Tooltip.TooltipGrouping)
24752 * @see [Demo: Tooltip Format](https://naver.github.io/billboard.js/demo/#Tooltip.TooltipFormat)
24753 * @see [Demo: Linked Tooltip](https://naver.github.io/billboard.js/demo/#Tooltip.LinkedTooltips)
24754 * @see [Demo: Tooltip Template](https://naver.github.io/billboard.js/demo/#Tooltip.TooltipTemplate)
24755 * @example
24756 * tooltip: {
24757 * show: true,
24758 * doNotHide: true,
24759 * grouped: false,
24760 * format: {
24761 * title: function(x) { return "Data " + x; },
24762 * name: function(name, ratio, id, index) { return name; },
24763 * value: function(value, ratio, id, index) { return ratio; }
24764 * },
24765 * position: function(data, width, height, element, pos) {
24766 * // data: [{x, index, id, name, value}, ...]
24767 * // width: Tooltip width
24768 * // height: Tooltip height
24769 * // element: Tooltip event bound element
24770 * // pos: {
24771 * // x: Current mouse event x position,
24772 * // y: Current mouse event y position,
24773 * // xAxis: Current x Axis position (the value is given for axis based chart type only)
24774 * // }
24775 * return {top: 0, left: 0}
24776 * },
24777 *
24778 * contents: function(d, defaultTitleFormat, defaultValueFormat, color) {
24779 * return ... // formatted html as you want
24780 * },
24781 *
24782 * // specify tooltip contents using template
24783 * // - example of HTML returned:
24784 * // <ul class="bb-tooltip">
24785 * // <li class="bb-tooltip-name-data1"><span>250</span><br><span style="color:#00c73c">data1</span></li>
24786 * // <li class="bb-tooltip-name-data2"><span>50</span><br><span style="color:#fa7171">data2</span></li>
24787 * // </ul>
24788 * contents: {
24789 * bindto: "#tooltip",
24790 * template: '<ul class={=CLASS_TOOLTIP}>{{' +
24791 * '<li class="{=CLASS_TOOLTIP_NAME}"><span>{=VALUE}</span><br>' +
24792 * '<span style=color:{=COLOR}>{=NAME}</span></li>' +
24793 * '}}</ul>'
24794 * }
24795 *
24796 * // with additional text value
24797 * // - example of HTML returned:
24798 * // <ul class="bb-tooltip">
24799 * // <li class="bb-tooltip-name-data1"><span>250</span><br>comment1<span style="color:#00c73c">data1</span>text1</li>
24800 * // <li class="bb-tooltip-name-data2"><span>50</span><br>comment2<span style="color:#fa7171">data2</span>text2</li>
24801 * // </ul>
24802 * contents: {
24803 * bindto: "#tooltip",
24804 * text: {
24805 * // a) 'key' name is used as substitution within template as '{=KEY}'
24806 * // b) the length should match with the data length
24807 * VAR1: ["text1", "text2"],
24808 * VAR2: ["comment1", "comment2"],
24809 * },
24810 * template: '<ul class={=CLASS_TOOLTIP}>{{' +
24811 * '<li class="{=CLASS_TOOLTIP_NAME}"><span>{=VALUE}</span>{=VAR2}<br>' +
24812 * '<span style=color:{=COLOR}>{=NAME}</span>{=VAR1}</li>' +
24813 * '}}</ul>'
24814 * }
24815 *
24816 * // sort tooltip data value display in ascending order
24817 * order: "asc",
24818 *
24819 * // specifying sort function
24820 * order: function(a, b) {
24821 * // param data passed format
24822 * {x: 5, value: 250, id: "data1", index: 5, name: "data1"}
24823 * ...
24824 * },
24825 *
24826 * // show at the initialization
24827 * init: {
24828 * show: true,
24829 * x: 2, // x Axis index(or index for Arc(donut, gauge, pie) types)
24830 * position: {
24831 * top: "150px",
24832 * left: "250px"
24833 * }
24834 * },
24835 *
24836 * // fires prior tooltip is shown
24837 * onshow: function(selectedData) {
24838 * // current dataset selected
24839 * // ==> [{x: 4, value: 150, id: "data2", index: 4, name: "data2"}, ...]
24840 * selectedData;
24841 * },
24842 *
24843 * // fires prior tooltip is hidden
24844 * onhide: function(selectedData) {
24845 * // current dataset selected
24846 * // ==> [{x: 4, value: 150, id: "data2", index: 4, name: "data2"}, ...]
24847 * selectedData;
24848 * },
24849 *
24850 * // fires after tooltip is shown
24851 * onshown: function(selectedData) {
24852 * // current dataset selected
24853 * // ==> [{x: 4, value: 150, id: "data2", index: 4, name: "data2"}, ...]
24854 * selectedData;
24855 * },
24856 *
24857 * // fires after tooltip is hidden
24858 * onhidden: function(selectedData) {
24859 * // current dataset selected
24860 * // ==> [{x: 4, value: 150, id: "data2", index: 4, name: "data2"}, ...]
24861 * selectedData;
24862 * },
24863 *
24864 * // Link any tooltips when multiple charts are on the screen where same x coordinates are available
24865 * // Useful for timeseries correlation
24866 * linked: true,
24867 *
24868 * // Specify name to interact those with the same name only.
24869 * linked: {
24870 * name: "some-group"
24871 * }
24872 * }
24873 */
24874 tooltip_show: !0,
24875 tooltip_doNotHide: !1,
24876 tooltip_grouped: !0,
24877 tooltip_format_title: undefined,
24878 tooltip_format_name: undefined,
24879 tooltip_format_value: undefined,
24880 tooltip_position: undefined,
24881 tooltip_contents: {},
24882 tooltip_init_show: !1,
24883 tooltip_init_x: 0,
24884 tooltip_init_position: {
24885 top: "0px",
24886 left: "50px"
24887 },
24888 tooltip_linked: !1,
24889 tooltip_linked_name: "",
24890 tooltip_onshow: function tooltip_onshow() {
24891 _newArrowCheck(this, tooltip_this);
24892 }.bind(undefined),
24893 tooltip_onhide: function tooltip_onhide() {
24894 _newArrowCheck(this, tooltip_this);
24895 }.bind(undefined),
24896 tooltip_onshown: function tooltip_onshown() {
24897 _newArrowCheck(this, tooltip_this);
24898 }.bind(undefined),
24899 tooltip_onhidden: function tooltip_onhidden() {
24900 _newArrowCheck(this, tooltip_this);
24901 }.bind(undefined),
24902 tooltip_order: null
24903});
24904;// CONCATENATED MODULE: ./src/config/Options/Options.ts
24905
24906
24907function Options_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
24908function Options_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? Options_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : Options_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
24909/**
24910 * Copyright (c) 2017 ~ present NAVER Corp.
24911 * billboard.js project is licensed under the MIT license
24912 */
24913// common
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924/**
24925 * Class to set options on generating chart.
24926 * - It's instantiated internally, not exposed for public.
24927 * @class Options
24928 * @see {@link bb.generate} to use these options on generating the chart
24929 */
24930var Options = /*#__PURE__*/function () {
24931 Options.setOptions = function setOptions(options) {
24932 var _this = this;
24933 this.data = options.reduce(function (a, c) {
24934 _newArrowCheck(this, _this);
24935 return Options_objectSpread(Options_objectSpread({}, a), c);
24936 }.bind(this), this.data);
24937 };
24938 function Options() {
24939 return deepClone(main, boost, data_data, common_color, interaction, legend, title, tooltip, Options.data);
24940 }
24941 return Options;
24942}();
24943Options.data = {};
24944
24945;// CONCATENATED MODULE: ./src/module/Cache.ts
24946
24947/**
24948 * Copyright (c) 2017 ~ present NAVER Corp.
24949 * billboard.js project is licensed under the MIT license
24950 */
24951
24952/**
24953 * Constant for cache key
24954 * - NOTE: Prefixed with '$', will be resetted when .load() is called
24955 * @private
24956 */
24957var KEY = {
24958 bubbleBaseLength: "$baseLength",
24959 colorPattern: "__colorPattern__",
24960 dataMinMax: "$dataMinMax",
24961 dataTotalSum: "$dataTotalSum",
24962 dataTotalPerIndex: "$totalPerIndex",
24963 legendItemTextBox: "legendItemTextBox",
24964 radarPoints: "$radarPoints",
24965 setOverOut: "setOverOut",
24966 callOverOutForTouch: "callOverOutForTouch",
24967 textRect: "textRect"
24968};
24969var Cache = /*#__PURE__*/function () {
24970 function Cache() {
24971 this.cache = {};
24972 }
24973 var _proto = Cache.prototype;
24974 /**
24975 * Add cache
24976 * @param {string} key Cache key
24977 * @param {*} value Value to be stored
24978 * @param {boolean} isDataType Weather the cache is data typed '{id:'data', id_org: 'data', values: [{x:0, index:0,...}, ...]}'
24979 * @returns {*} Added data value
24980 * @private
24981 */
24982 _proto.add = function add(key, value, isDataType) {
24983 if (isDataType === void 0) {
24984 isDataType = !1;
24985 }
24986 this.cache[key] = isDataType ? this.cloneTarget(value) : value;
24987 return this.cache[key];
24988 }
24989
24990 /**
24991 * Remove cache
24992 * @param {string|Array} key Cache key
24993 * @private
24994 */;
24995 _proto.remove = function remove(key) {
24996 var _this = this;
24997 toArray(key).forEach(function (v) {
24998 _newArrowCheck(this, _this);
24999 return delete this.cache[v];
25000 }.bind(this));
25001 }
25002
25003 /**
25004 * Get cahce
25005 * @param {string|Array} key Cache key
25006 * @param {boolean} isDataType Weather the cache is data typed '{id:'data', id_org: 'data', values: [{x:0, index:0,...}, ...]}'
25007 * @returns {*}
25008 * @private
25009 */;
25010 _proto.get = function get(key, isDataType) {
25011 if (isDataType === void 0) {
25012 isDataType = !1;
25013 }
25014 if (isDataType) {
25015 var targets = [];
25016 for (var i = 0, id; id = key[i]; i++) {
25017 if (id in this.cache) {
25018 targets.push(this.cloneTarget(this.cache[id]));
25019 }
25020 }
25021 return targets;
25022 } else {
25023 var value = this.cache[key];
25024 return isValue(value) ? value : null;
25025 }
25026 }
25027
25028 /**
25029 * Reset cached data
25030 * @param {boolean} all true: reset all data, false: reset only '$' prefixed key data
25031 * @private
25032 */;
25033 _proto.reset = function reset(all) {
25034 var $$ = this;
25035 for (var x in $$.cache) {
25036 // reset the prefixed '$' key(which is internal use data) only.
25037 if (all || /^\$/.test(x)) {
25038 $$.cache[x] = null;
25039 }
25040 }
25041 }
25042
25043 /**
25044 * Clone data target object
25045 * @param {object} target Data object
25046 * @returns {object}
25047 * @private
25048 */
25049 // eslint-disable-next-line camelcase
25050 ;
25051 _proto.cloneTarget = function cloneTarget(target) {
25052 var _this2 = this;
25053 return {
25054 id: target.id,
25055 id_org: target.id_org,
25056 values: target.values.map(function (d) {
25057 _newArrowCheck(this, _this2);
25058 return {
25059 x: d.x,
25060 value: d.value,
25061 id: d.id
25062 };
25063 }.bind(this))
25064 };
25065 };
25066 return Cache;
25067}();
25068
25069;// CONCATENATED MODULE: ./src/module/generator.ts
25070
25071/**
25072 * Copyright (c) 2017 ~ present NAVER Corp.
25073 * billboard.js project is licensed under the MIT license
25074 */
25075
25076
25077
25078var generator_setTimeout = win.setTimeout,
25079 generator_clearTimeout = win.clearTimeout;
25080
25081/**
25082 * Generate resize queue function
25083 * @param {boolean|number} option Resize option
25084 * @returns {Fucntion}
25085 * @private
25086 */
25087function generateResize(option) {
25088 var _this4 = this,
25089 fn = [],
25090 timeout,
25091 callResizeFn = function () {
25092 var _this = this;
25093 // Delay all resize functions call, to prevent unintended excessive call from resize event
25094 callResizeFn.clear();
25095 if (option === !1 && win.requestIdleCallback) {
25096 requestIdleCallback(function () {
25097 var _this2 = this;
25098 _newArrowCheck(this, _this);
25099 fn.forEach(function (f) {
25100 _newArrowCheck(this, _this2);
25101 return f();
25102 }.bind(this));
25103 }.bind(this), {
25104 timeout: 200
25105 });
25106 } else {
25107 timeout = generator_setTimeout(function () {
25108 var _this3 = this;
25109 _newArrowCheck(this, _this);
25110 fn.forEach(function (f) {
25111 _newArrowCheck(this, _this3);
25112 return f();
25113 }.bind(this));
25114 }.bind(this), isNumber(option) ? option : 200);
25115 }
25116 };
25117 callResizeFn.clear = function () {
25118 _newArrowCheck(this, _this4);
25119 if (timeout) {
25120 generator_clearTimeout(timeout);
25121 timeout = null;
25122 }
25123 }.bind(this);
25124 callResizeFn.add = function (f) {
25125 _newArrowCheck(this, _this4);
25126 return fn.push(f);
25127 }.bind(this);
25128 callResizeFn.remove = function (f) {
25129 _newArrowCheck(this, _this4);
25130 return fn.splice(fn.indexOf(f), 1);
25131 }.bind(this);
25132 return callResizeFn;
25133}
25134/**
25135 * Generate transition queue function
25136 * @returns {Function}
25137 * @private
25138 */
25139function generateWait() {
25140 var transitionsToWait = [],
25141 f = function (selection, callback) {
25142 var _this5 = this;
25143 /**
25144 * Check if transition is complete
25145 * @returns {boolean} Whether transition is complete
25146 * @private
25147 */
25148 function loop() {
25149 var done = 0;
25150 for (var i = 0, t; t = transitionsToWait[i]; i++) {
25151 if (t === !0 || t.empty != null && t.empty()) {
25152 done++;
25153 continue;
25154 }
25155
25156 // when tab isn't visible exit loop
25157 if (isTabVisible() === !1) {
25158 done = transitionsToWait.length;
25159 break;
25160 }
25161 try {
25162 t.transition();
25163 } catch (e) {
25164 done++;
25165 }
25166 }
25167 return done === transitionsToWait.length;
25168 }
25169 runUntil(function () {
25170 _newArrowCheck(this, _this5);
25171 callback == null ? void 0 : callback();
25172 }.bind(this), loop);
25173 }; // 'f' is called as selection.call(f, ...);
25174 f.add = function (t) {
25175 isArray(t) ? transitionsToWait = transitionsToWait.concat(t) : transitionsToWait.push(t);
25176 };
25177 return f;
25178}
25179;// CONCATENATED MODULE: ./src/module/worker.ts
25180/**
25181 * Copyright (c) 2017 ~ present NAVER Corp.
25182 * billboard.js project is licensed under the MIT license
25183 */
25184
25185
25186// Store blob in memory
25187var blob = {};
25188
25189/**
25190 * Get Object URL
25191 * @param {Function} fn Function to be executed in worker
25192 * @param {Array} depsFn Dependency functions to run given function(fn).
25193 * @returns {string}
25194 * @private
25195 */
25196function getObjectURL(fn, depsFn) {
25197 var fnString = fn.toString(),
25198 key = fnString.replace(/(function|[\s\W\n])/g, "").substring(0, 15);
25199 if (!(key in blob)) {
25200 var _depsFn$map$join;
25201 // Web Worker body
25202 blob[key] = new win.Blob([((_depsFn$map$join = depsFn == null ? void 0 : depsFn.map(String).join(";")) != null ? _depsFn$map$join : "") + "\n\n\t\t\tself.onmessage=function({data}) {\n\t\t\t\tconst result = (" + fnString + ").apply(null, data);\n\t\t\t\tself.postMessage(result);\n\t\t\t};"], {
25203 type: "text/javascript"
25204 });
25205 }
25206 return win.URL.createObjectURL(blob[key]);
25207}
25208
25209/**
25210 * Create and run on Web Worker
25211 * @param {boolean} useWorker Use Web Worker
25212 * @param {Function} fn Function to be executed in worker
25213 * @param {Function} callback Callback function to receive result from worker
25214 * @param {Array} depsFn Dependency functions to run given function(fn).
25215 * @returns {object}
25216 * @example
25217 * const worker = runWorker(function(arg) {
25218 * // do some tasks...
25219 * console.log("param:", A(arg));
25220 *
25221 * return 1234;
25222 * }, function(data) {
25223 * // callback after worker is done
25224 * console.log("result:", data);
25225 * },
25226 * [function A(){}]
25227 * );
25228 *
25229 * worker(11111);
25230 * @private
25231 */
25232function runWorker(useWorker, fn, callback, depsFn) {
25233 if (useWorker === void 0) {
25234 useWorker = !0;
25235 }
25236 var runFn;
25237 if (win.Worker && useWorker) {
25238 var src = getObjectURL(fn, depsFn),
25239 worker = new win.Worker(src);
25240 runFn = function () {
25241 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
25242 args[_key] = arguments[_key];
25243 }
25244 // trigger worker
25245 worker.postMessage(args);
25246
25247 // listen worker
25248 worker.onmessage = function (e) {
25249 // release object URL from memory
25250 win.URL.revokeObjectURL(src);
25251 return callback(e.data);
25252 };
25253
25254 // handle error
25255 worker.onerror = function (e) {
25256 console.error(e);
25257 };
25258
25259 // return new Promise((resolve, reject) => {
25260 // worker.onmessage = ({data}) => resolve(data);
25261 // worker.onerror = reject;
25262 // });
25263 };
25264 } else {
25265 runFn = function () {
25266 var res = fn.apply(void 0, arguments);
25267 callback(res);
25268 };
25269 }
25270 return runFn;
25271}
25272;// CONCATENATED MODULE: ./node_modules/d3-dsv/src/dsv.js
25273var EOL = {},
25274 EOF = {},
25275 QUOTE = 34,
25276 NEWLINE = 10,
25277 RETURN = 13;
25278function objectConverter(columns) {
25279 return new Function("d", "return {" + columns.map(function (name, i) {
25280 return JSON.stringify(name) + ": d[" + i + "] || \"\"";
25281 }).join(",") + "}");
25282}
25283function customConverter(columns, f) {
25284 var object = objectConverter(columns);
25285 return function (row, i) {
25286 return f(object(row), i, columns);
25287 };
25288}
25289
25290// Compute unique columns in order of discovery.
25291function inferColumns(rows) {
25292 var columnSet = Object.create(null),
25293 columns = [];
25294 rows.forEach(function (row) {
25295 for (var column in row) {
25296 if (!(column in columnSet)) {
25297 columns.push(columnSet[column] = column);
25298 }
25299 }
25300 });
25301 return columns;
25302}
25303function dsv_pad(value, width) {
25304 var s = value + "",
25305 length = s.length;
25306 return length < width ? Array(width - length + 1).join(0) + s : s;
25307}
25308function dsv_formatYear(year) {
25309 return year < 0 ? "-" + dsv_pad(-year, 6) : year > 9999 ? "+" + dsv_pad(year, 6) : dsv_pad(year, 4);
25310}
25311function formatDate(date) {
25312 var hours = date.getUTCHours(),
25313 minutes = date.getUTCMinutes(),
25314 seconds = date.getUTCSeconds(),
25315 milliseconds = date.getUTCMilliseconds();
25316 return isNaN(date) ? "Invalid Date" : dsv_formatYear(date.getUTCFullYear(), 4) + "-" + dsv_pad(date.getUTCMonth() + 1, 2) + "-" + dsv_pad(date.getUTCDate(), 2) + (milliseconds ? "T" + dsv_pad(hours, 2) + ":" + dsv_pad(minutes, 2) + ":" + dsv_pad(seconds, 2) + "." + dsv_pad(milliseconds, 3) + "Z" : seconds ? "T" + dsv_pad(hours, 2) + ":" + dsv_pad(minutes, 2) + ":" + dsv_pad(seconds, 2) + "Z" : minutes || hours ? "T" + dsv_pad(hours, 2) + ":" + dsv_pad(minutes, 2) + "Z" : "");
25317}
25318/* harmony default export */ function dsv(delimiter) {
25319 var reFormat = new RegExp("[\"" + delimiter + "\n\r]"),
25320 DELIMITER = delimiter.charCodeAt(0);
25321 function parseRows(text, f) {
25322 var rows = [],
25323 // output rows
25324 N = text.length,
25325 I = 0,
25326 // current character index
25327 n = 0,
25328 // current line number
25329 t,
25330 // current token
25331 eof = N <= 0,
25332 // current token followed by EOF?
25333 eol = !1; // current token followed by EOL?
25334
25335 // Strip the trailing newline.
25336 if (text.charCodeAt(N - 1) === NEWLINE) --N;
25337 if (text.charCodeAt(N - 1) === RETURN) --N;
25338 function token() {
25339 if (eof) return EOF;
25340 if (eol) return eol = !1, EOL;
25341
25342 // Unescape quotes.
25343 var i,
25344 j = I,
25345 c;
25346 if (text.charCodeAt(j) === QUOTE) {
25347 while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE) {}
25348 if ((i = I) >= N) eof = !0;else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = !0;else if (c === RETURN) {
25349 eol = !0;
25350 if (text.charCodeAt(I) === NEWLINE) ++I;
25351 }
25352 return text.slice(j + 1, i - 1).replace(/""/g, "\"");
25353 }
25354
25355 // Find next delimiter or newline.
25356 while (I < N) {
25357 if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = !0;else if (c === RETURN) {
25358 eol = !0;
25359 if (text.charCodeAt(I) === NEWLINE) ++I;
25360 } else if (c !== DELIMITER) continue;
25361 return text.slice(j, i);
25362 }
25363
25364 // Return last token before EOF.
25365 return eof = !0, text.slice(j, N);
25366 }
25367 while ((t = token()) !== EOF) {
25368 var row = [];
25369 while (t !== EOL && t !== EOF) {
25370 row.push(t), t = token();
25371 }
25372 if (f && (row = f(row, n++)) == null) continue;
25373 rows.push(row);
25374 }
25375 return rows;
25376 }
25377 function preformatBody(rows, columns) {
25378 return rows.map(function (row) {
25379 return columns.map(function (column) {
25380 return formatValue(row[column]);
25381 }).join(delimiter);
25382 });
25383 }
25384 function formatRow(row) {
25385 return row.map(formatValue).join(delimiter);
25386 }
25387 function formatValue(value) {
25388 return value == null ? "" : value instanceof Date ? formatDate(value) : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\"" : value;
25389 }
25390 return {
25391 parse: function (text, f) {
25392 var convert,
25393 columns,
25394 rows = parseRows(text, function (row, i) {
25395 if (convert) return convert(row, i - 1);
25396 columns = row, convert = f ? customConverter(row, f) : objectConverter(row);
25397 });
25398 rows.columns = columns || [];
25399 return rows;
25400 },
25401 parseRows: parseRows,
25402 format: function (rows, columns) {
25403 if (columns == null) columns = inferColumns(rows);
25404 return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n");
25405 },
25406 formatBody: function (rows, columns) {
25407 if (columns == null) columns = inferColumns(rows);
25408 return preformatBody(rows, columns).join("\n");
25409 },
25410 formatRows: function (rows) {
25411 return rows.map(formatRow).join("\n");
25412 },
25413 formatRow: formatRow,
25414 formatValue: formatValue
25415 };
25416}
25417;// CONCATENATED MODULE: ./node_modules/d3-dsv/src/csv.js
25418
25419var csv = dsv(",");
25420var csvParse = csv.parse;
25421var csvParseRows = csv.parseRows;
25422var csvFormat = csv.format;
25423var csvFormatBody = csv.formatBody;
25424var csvFormatRows = csv.formatRows;
25425var csvFormatRow = csv.formatRow;
25426var csvFormatValue = csv.formatValue;
25427;// CONCATENATED MODULE: ./node_modules/d3-dsv/src/tsv.js
25428
25429var tsv = dsv("\t");
25430var tsvParse = tsv.parse;
25431var tsvParseRows = tsv.parseRows;
25432var tsvFormat = tsv.format;
25433var tsvFormatBody = tsv.formatBody;
25434var tsvFormatRows = tsv.formatRows;
25435var tsvFormatRow = tsv.formatRow;
25436var tsvFormatValue = tsv.formatValue;
25437;// CONCATENATED MODULE: ./src/ChartInternal/data/convert.helper.ts
25438
25439/**
25440 * Copyright (c) 2017 ~ present NAVER Corp.
25441 * billboard.js project is licensed under the MIT license
25442 */
25443
25444/* eslint-disable */
25445
25446
25447
25448/***** Functions to be executed on Web Worker *****
25449 * NOTE: Don't allowed to use
25450 * - arrow function syntax
25451 * - Utils functions
25452 */
25453/**
25454 * Convert Columns data
25455 * @param {object} columns
25456 * @returns {Array}
25457 * @private
25458 */
25459function columns(columns) {
25460 var newRows = [];
25461 columns.forEach(function (col, i) {
25462 var key = col[0];
25463 col.forEach(function (v, j) {
25464 if (j > 0) {
25465 if (typeof newRows[j - 1] === "undefined") {
25466 newRows[j - 1] = {};
25467 }
25468 if (typeof v === "undefined") {
25469 throw new Error("Source data is missing a component at (" + i + ", " + j + ")!");
25470 }
25471 newRows[j - 1][key] = v;
25472 }
25473 });
25474 });
25475 return newRows;
25476}
25477
25478/**
25479 * Convert Rows data
25480 * @param {object} columns
25481 * @returns {Array}
25482 * @private
25483 */
25484function rows(rows) {
25485 var keys = rows[0],
25486 newRows = [];
25487 rows.forEach(function (row, i) {
25488 if (i > 0) {
25489 var newRow = {};
25490 row.forEach(function (v, j) {
25491 if (typeof v === "undefined") {
25492 throw new Error("Source data is missing a component at (" + i + ", " + j + ")!");
25493 }
25494 newRow[keys[j]] = v;
25495 });
25496 newRows.push(newRow);
25497 }
25498 });
25499 return newRows;
25500}
25501
25502/**
25503 * Convert JSON data
25504 * @param {object} columns
25505 * @returns {Array}
25506 * @private
25507 */
25508function json(json, keysParam) {
25509 var newRows = [],
25510 findValueInJson = function (object, path) {
25511 if (object[path] !== undefined) {
25512 return object[path];
25513 }
25514 var convertedPath = path.replace(/\[(\w+)\]/g, ".$1"),
25515 pathArray = convertedPath.replace(/^\./, "").split("."),
25516 target = object; // convert indexes to properties (replace [] with .)
25517 pathArray.some(function (k) {
25518 return !(target = target && k in target ? target[k] : undefined);
25519 });
25520 return target;
25521 },
25522 targetKeys,
25523 data;
25524 if (Array.isArray(json)) {
25525 if (keysParam.x) {
25526 targetKeys = keysParam.value.concat(keysParam.x);
25527 } else {
25528 targetKeys = keysParam.value;
25529 }
25530 newRows.push(targetKeys);
25531 json.forEach(function (o) {
25532 var newRow = targetKeys.map(function (key) {
25533 // convert undefined to null because undefined data will be removed in convertDataToTargets()
25534 var v = findValueInJson(o, key);
25535 if (typeof v === "undefined") {
25536 v = null;
25537 }
25538 return v;
25539 });
25540 newRows.push(newRow);
25541 });
25542 data = rows(newRows);
25543 } else {
25544 Object.keys(json).forEach(function (key) {
25545 var tmp = json[key].concat();
25546 tmp.unshift(key);
25547 newRows.push(tmp);
25548 });
25549 data = columns(newRows);
25550 }
25551 return data;
25552}
25553
25554/***** Functions can't be executed on Web Worker *****/
25555/**
25556 * Convert URL data
25557 * @param {string} url Remote URL
25558 * @param {string} mimeType MIME type string: json | csv | tsv
25559 * @param {object} headers Header object
25560 * @param {object} keys Key object
25561 * @param {Function} done Callback function
25562 * @private
25563 */
25564function url(url, mimeType, headers, keys, done) {
25565 if (mimeType === void 0) {
25566 mimeType = "csv";
25567 }
25568 var req = new XMLHttpRequest(),
25569 converter = {
25570 csv: convert_helper_csv,
25571 tsv: convert_helper_tsv,
25572 json: json
25573 };
25574 req.open("GET", url);
25575 if (headers) {
25576 Object.keys(headers).forEach(function (key) {
25577 req.setRequestHeader(key, headers[key]);
25578 });
25579 }
25580 req.onreadystatechange = function () {
25581 if (req.readyState === 4) {
25582 if (req.status === 200) {
25583 var response = req.responseText;
25584 response && done.call(this, converter[mimeType](mimeType === "json" ? JSON.parse(response) : response, keys));
25585 } else {
25586 throw new Error(url + ": Something went wrong loading!");
25587 }
25588 }
25589 };
25590 req.send();
25591}
25592
25593/**
25594 * Convert CSV/TSV data
25595 * @param {object} parser Parser object
25596 * @param {object} xsv Data
25597 * @returns {object}
25598 * @private
25599 */
25600function convertCsvTsvToData(parser, xsv) {
25601 var _this = this,
25602 rows = parser.rows(xsv),
25603 d;
25604 if (rows.length === 1) {
25605 d = [{}];
25606 rows[0].forEach(function (id) {
25607 _newArrowCheck(this, _this);
25608 d[0][id] = null;
25609 }.bind(this));
25610 } else {
25611 d = parser.parse(xsv);
25612 }
25613 return d;
25614}
25615function convert_helper_csv(xsv) {
25616 return convertCsvTsvToData({
25617 rows: csvParseRows,
25618 parse: csvParse
25619 }, xsv);
25620}
25621function convert_helper_tsv(tsv) {
25622 return convertCsvTsvToData({
25623 rows: tsvParseRows,
25624 parse: tsvParse
25625 }, tsv);
25626}
25627;// CONCATENATED MODULE: ./src/ChartInternal/data/convert.ts
25628
25629/**
25630 * Copyright (c) 2017 ~ present NAVER Corp.
25631 * billboard.js project is licensed under the MIT license
25632 */
25633
25634
25635
25636/**
25637 * Get data key for JSON
25638 * @param {string|object} keysParam Key params
25639 * @param {object} config Config object
25640 * @returns {string} Data key
25641 * @private
25642 */
25643function getDataKeyForJson(keysParam, config) {
25644 var keys = keysParam || (config == null ? void 0 : config.data_keys);
25645 if (keys != null && keys.x) {
25646 config.data_x = keys.x;
25647 }
25648 return keys;
25649}
25650
25651/**
25652 * Data convert
25653 * @memberof ChartInternal
25654 * @private
25655 */
25656/* harmony default export */ var convert = ({
25657 /**
25658 * Convert data according its type
25659 * @param {object} args data object
25660 * @param {Function} [callback] callback for url(XHR) type loading
25661 * @private
25662 */
25663 convertData: function convertData(args, callback) {
25664 var _this = this,
25665 config = this.config,
25666 useWorker = config.boost_useWorker,
25667 data = args;
25668 if (args.bindto) {
25669 data = {};
25670 ["url", "mimeType", "headers", "keys", "json", "keys", "rows", "columns"].forEach(function (v) {
25671 _newArrowCheck(this, _this);
25672 var key = "data_" + v;
25673 if (key in args) {
25674 data[v] = args[key];
25675 }
25676 }.bind(this));
25677 }
25678 if (data.url && callback) {
25679 url(data.url, data.mimeType, data.headers, getDataKeyForJson(data.keys, config), callback);
25680 } else if (data.json) {
25681 runWorker(useWorker, json, callback, [columns, rows])(data.json, getDataKeyForJson(data.keys, config));
25682 } else if (data.rows) {
25683 runWorker(useWorker, rows, callback)(data.rows);
25684 } else if (data.columns) {
25685 runWorker(useWorker, columns, callback)(data.columns);
25686 } else if (args.bindto) {
25687 throw Error("url or json or rows or columns is required.");
25688 }
25689 },
25690 convertDataToTargets: function convertDataToTargets(data, appendXs) {
25691 var _this2 = this,
25692 $$ = this,
25693 axis = $$.axis,
25694 config = $$.config,
25695 state = $$.state,
25696 isCategorized = !1,
25697 isTimeSeries = !1,
25698 isCustomX = !1;
25699 if (axis) {
25700 isCategorized = axis.isCategorized();
25701 isTimeSeries = axis.isTimeSeries();
25702 isCustomX = axis.isCustomX();
25703 }
25704 var dataKeys = Object.keys(data[0] || {}),
25705 ids = dataKeys.length ? dataKeys.filter($$.isNotX, $$) : [],
25706 xs = dataKeys.length ? dataKeys.filter($$.isX, $$) : [],
25707 xsData;
25708 // save x for update data by load when custom x and bb.x API
25709 ids.forEach(function (id) {
25710 var _this3 = this;
25711 _newArrowCheck(this, _this2);
25712 var xKey = this.getXKey(id);
25713 if (isCustomX || isTimeSeries) {
25714 // if included in input data
25715 if (xs.indexOf(xKey) >= 0) {
25716 xsData = (appendXs && $$.data.xs[id] || []).concat(data.map(function (d) {
25717 _newArrowCheck(this, _this3);
25718 return d[xKey];
25719 }.bind(this)).filter(isValue).map(function (rawX, i) {
25720 _newArrowCheck(this, _this3);
25721 return $$.generateTargetX(rawX, id, i);
25722 }.bind(this)));
25723 } else if (config.data_x) {
25724 // if not included in input data, find from preloaded data of other id's x
25725 xsData = this.getOtherTargetXs();
25726 } else if (notEmpty(config.data_xs)) {
25727 // if not included in input data, find from preloaded data
25728 xsData = $$.getXValuesOfXKey(xKey, $$.data.targets);
25729 }
25730 // MEMO: if no x included, use same x of current will be used
25731 } else {
25732 xsData = data.map(function (d, i) {
25733 _newArrowCheck(this, _this3);
25734 return i;
25735 }.bind(this));
25736 }
25737 xsData && (this.data.xs[id] = xsData);
25738 }.bind(this));
25739
25740 // check x is defined
25741 ids.forEach(function (id) {
25742 _newArrowCheck(this, _this2);
25743 if (!this.data.xs[id]) {
25744 throw new Error("x is not defined for id = \"" + id + "\".");
25745 }
25746 }.bind(this));
25747
25748 // convert to target
25749 var targets = ids.map(function (id, index) {
25750 var _this4 = this;
25751 _newArrowCheck(this, _this2);
25752 var convertedId = config.data_idConverter.bind($$.api)(id),
25753 xKey = $$.getXKey(id),
25754 isCategory = isCustomX && isCategorized,
25755 hasCategory = isCategory && data.map(function (v) {
25756 _newArrowCheck(this, _this4);
25757 return v.x;
25758 }.bind(this)).every(function (v) {
25759 _newArrowCheck(this, _this4);
25760 return config.axis_x_categories.indexOf(v) > -1;
25761 }.bind(this)),
25762 isDataAppend = data.__append__,
25763 xIndex = xKey === null && isDataAppend ? $$.api.data.values(id).length : 0;
25764 return {
25765 id: convertedId,
25766 id_org: id,
25767 values: data.map(function (d, i) {
25768 _newArrowCheck(this, _this4);
25769 var rawX = d[xKey],
25770 value = d[id],
25771 x;
25772 value = value !== null && !isNaN(value) && !isObject(value) ? +value : isArray(value) || isObject(value) ? value : null;
25773
25774 // use x as categories if custom x and categorized
25775 if ((isCategory || state.hasRadar) && index === 0 && !isUndefined(rawX)) {
25776 if (!hasCategory && index === 0 && i === 0 && !isDataAppend) {
25777 config.axis_x_categories = [];
25778 }
25779 x = config.axis_x_categories.indexOf(rawX);
25780 if (x === -1) {
25781 x = config.axis_x_categories.length;
25782 config.axis_x_categories.push(rawX);
25783 }
25784 } else {
25785 x = $$.generateTargetX(rawX, id, xIndex + i);
25786 }
25787
25788 // mark as x = undefined if value is undefined and filter to remove after mapped
25789 if (isUndefined(value) || $$.data.xs[id].length <= i) {
25790 x = undefined;
25791 }
25792 return {
25793 x: x,
25794 value: value,
25795 id: convertedId,
25796 index: -1
25797 };
25798 }.bind(this)).filter(function (v) {
25799 _newArrowCheck(this, _this4);
25800 return isDefined(v.x);
25801 }.bind(this))
25802 };
25803 }.bind(this));
25804
25805 // finish targets
25806 targets.forEach(function (t) {
25807 var _this5 = this,
25808 _$$$data$xs$t$id;
25809 _newArrowCheck(this, _this2);
25810 // sort values by its x
25811 if (config.data_xSort) {
25812 t.values = t.values.sort(function (v1, v2) {
25813 _newArrowCheck(this, _this5);
25814 var x1 = v1.x || v1.x === 0 ? v1.x : Infinity,
25815 x2 = v2.x || v2.x === 0 ? v2.x : Infinity;
25816 return x1 - x2;
25817 }.bind(this));
25818 }
25819
25820 // indexing each value
25821 t.values.forEach(function (v, i) {
25822 _newArrowCheck(this, _this5);
25823 return v.index = i;
25824 }.bind(this));
25825
25826 // this needs to be sorted because its index and value.index is identical
25827 (_$$$data$xs$t$id = $$.data.xs[t.id]) == null ? void 0 : _$$$data$xs$t$id.sort(function (v1, v2) {
25828 _newArrowCheck(this, _this5);
25829 return v1 - v2;
25830 }.bind(this));
25831 }.bind(this));
25832
25833 // cache information about values
25834 state.hasNegativeValue = $$.hasNegativeValueInTargets(targets);
25835 state.hasPositiveValue = $$.hasPositiveValueInTargets(targets);
25836
25837 // set target types
25838 if (config.data_type) {
25839 $$.setTargetType($$.mapToIds(targets).filter(function (id) {
25840 _newArrowCheck(this, _this2);
25841 return !(id in config.data_types);
25842 }.bind(this)), config.data_type);
25843 }
25844
25845 // cache as original id keyed
25846 targets.forEach(function (d) {
25847 _newArrowCheck(this, _this2);
25848 return $$.cache.add(d.id_org, d, !0);
25849 }.bind(this));
25850 return targets;
25851 }
25852});
25853;// CONCATENATED MODULE: ./src/ChartInternal/data/data.ts
25854
25855/**
25856 * Copyright (c) 2017 ~ present NAVER Corp.
25857 * billboard.js project is licensed under the MIT license
25858 */
25859
25860
25861
25862/* harmony default export */ var ChartInternal_data_data = ({
25863 isX: function isX(key) {
25864 var $$ = this,
25865 config = $$.config,
25866 dataKey = config.data_x && key === config.data_x,
25867 existValue = notEmpty(config.data_xs) && hasValue(config.data_xs, key);
25868 return dataKey || existValue;
25869 },
25870 isNotX: function isNotX(key) {
25871 return !this.isX(key);
25872 },
25873 isStackNormalized: function isStackNormalized() {
25874 var config = this.config;
25875 return !!(config.data_stack_normalize && config.data_groups.length);
25876 },
25877 isGrouped: function isGrouped(id) {
25878 var _this = this,
25879 groups = this.config.data_groups;
25880 return id ? groups.some(function (v) {
25881 _newArrowCheck(this, _this);
25882 return v.indexOf(id) >= 0 && v.length > 1;
25883 }.bind(this)) : groups.length > 0;
25884 },
25885 getXKey: function getXKey(id) {
25886 var $$ = this,
25887 config = $$.config;
25888 return config.data_x ? config.data_x : notEmpty(config.data_xs) ? config.data_xs[id] : null;
25889 },
25890 getXValuesOfXKey: function getXValuesOfXKey(key, targets) {
25891 var _this2 = this,
25892 $$ = this,
25893 ids = targets && notEmpty(targets) ? $$.mapToIds(targets) : [],
25894 xValues;
25895 ids.forEach(function (id) {
25896 _newArrowCheck(this, _this2);
25897 if ($$.getXKey(id) === key) {
25898 xValues = $$.data.xs[id];
25899 }
25900 }.bind(this));
25901 return xValues;
25902 },
25903 /**
25904 * Get index number based on given x Axis value
25905 * @param {Date|number|string} x x Axis to be compared
25906 * @param {Array} basedX x Axis list to be based on
25907 * @returns {number} index number
25908 * @private
25909 */
25910 getIndexByX: function getIndexByX(x, basedX) {
25911 var $$ = this;
25912 return basedX ? basedX.indexOf(isString(x) ? x : +x) : ($$.filterByX($$.data.targets, x)[0] || {
25913 index: null
25914 }).index;
25915 },
25916 getXValue: function getXValue(id, i) {
25917 var $$ = this;
25918 return id in $$.data.xs && $$.data.xs[id] && isValue($$.data.xs[id][i]) ? $$.data.xs[id][i] : i;
25919 },
25920 getOtherTargetXs: function getOtherTargetXs() {
25921 var $$ = this,
25922 idsForX = Object.keys($$.data.xs);
25923 return idsForX.length ? $$.data.xs[idsForX[0]] : null;
25924 },
25925 getOtherTargetX: function getOtherTargetX(index) {
25926 var xs = this.getOtherTargetXs();
25927 return xs && index < xs.length ? xs[index] : null;
25928 },
25929 addXs: function addXs(xs) {
25930 var _this3 = this,
25931 $$ = this,
25932 config = $$.config;
25933 Object.keys(xs).forEach(function (id) {
25934 _newArrowCheck(this, _this3);
25935 config.data_xs[id] = xs[id];
25936 }.bind(this));
25937 },
25938 isMultipleX: function isMultipleX() {
25939 return notEmpty(this.config.data_xs) || !this.config.data_xSort || this.hasType("bubble") || this.hasType("scatter");
25940 },
25941 addName: function addName(data) {
25942 var $$ = this,
25943 config = $$.config,
25944 name;
25945 if (data) {
25946 name = config.data_names[data.id];
25947 data.name = name !== undefined ? name : data.id;
25948 }
25949 return data;
25950 },
25951 /**
25952 * Get all values on given index
25953 * @param {number} index Index
25954 * @param {boolean} filterNull Filter nullish value
25955 * @returns {Array}
25956 * @private
25957 */
25958 getAllValuesOnIndex: function getAllValuesOnIndex(index, filterNull) {
25959 var _this4 = this;
25960 if (filterNull === void 0) {
25961 filterNull = !1;
25962 }
25963 var $$ = this,
25964 value = $$.filterTargetsToShow($$.data.targets).map(function (t) {
25965 _newArrowCheck(this, _this4);
25966 return $$.addName($$.getValueOnIndex(t.values, index));
25967 }.bind(this));
25968 if (filterNull) {
25969 value = value.filter(function (v) {
25970 _newArrowCheck(this, _this4);
25971 return v && "value" in v && isValue(v.value);
25972 }.bind(this));
25973 }
25974 return value;
25975 },
25976 getValueOnIndex: function getValueOnIndex(values, index) {
25977 var _this5 = this,
25978 valueOnIndex = values.filter(function (v) {
25979 _newArrowCheck(this, _this5);
25980 return v.index === index;
25981 }.bind(this));
25982 return valueOnIndex.length ? valueOnIndex[0] : null;
25983 },
25984 updateTargetX: function updateTargetX(targets, x) {
25985 var _this6 = this,
25986 $$ = this;
25987 targets.forEach(function (t) {
25988 var _this7 = this;
25989 _newArrowCheck(this, _this6);
25990 t.values.forEach(function (v, i) {
25991 _newArrowCheck(this, _this7);
25992 v.x = $$.generateTargetX(x[i], t.id, i);
25993 }.bind(this));
25994 $$.data.xs[t.id] = x;
25995 }.bind(this));
25996 },
25997 updateTargetXs: function updateTargetXs(targets, xs) {
25998 var _this8 = this,
25999 $$ = this;
26000 targets.forEach(function (t) {
26001 _newArrowCheck(this, _this8);
26002 xs[t.id] && $$.updateTargetX([t], xs[t.id]);
26003 }.bind(this));
26004 },
26005 generateTargetX: function generateTargetX(rawX, id, index) {
26006 var $$ = this,
26007 axis = $$.axis,
26008 x = axis != null && axis.isCategorized() ? index : rawX || index;
26009 if (axis != null && axis.isTimeSeries()) {
26010 var fn = parseDate.bind($$);
26011 x = rawX ? fn(rawX) : fn($$.getXValue(id, index));
26012 } else if (axis != null && axis.isCustomX() && !(axis != null && axis.isCategorized())) {
26013 x = isValue(rawX) ? +rawX : $$.getXValue(id, index);
26014 }
26015 return x;
26016 },
26017 updateXs: function updateXs(values) {
26018 var _this9 = this;
26019 if (values.length) {
26020 this.axis.xs = values.map(function (v) {
26021 _newArrowCheck(this, _this9);
26022 return v.x;
26023 }.bind(this));
26024 }
26025 },
26026 getPrevX: function getPrevX(i) {
26027 var x = this.axis.xs[i - 1];
26028 return isDefined(x) ? x : null;
26029 },
26030 getNextX: function getNextX(i) {
26031 var x = this.axis.xs[i + 1];
26032 return isDefined(x) ? x : null;
26033 },
26034 /**
26035 * Get base value isAreaRangeType
26036 * @param {object} data Data object
26037 * @returns {number}
26038 * @private
26039 */
26040 getBaseValue: function getBaseValue(data) {
26041 var $$ = this,
26042 hasAxis = $$.state.hasAxis,
26043 value = data.value;
26044 // In case of area-range, data is given as: [low, mid, high] or {low, mid, high}
26045 // will take the 'mid' as the base value
26046 if (value && hasAxis) {
26047 if ($$.isAreaRangeType(data)) {
26048 value = $$.getRangedData(data, "mid");
26049 } else if ($$.isBubbleZType(data)) {
26050 value = $$.getBubbleZData(value, "y");
26051 }
26052 }
26053 return value;
26054 },
26055 /**
26056 * Get min/max value from the data
26057 * @private
26058 * @param {Array} data array data to be evaluated
26059 * @returns {{min: {number}, max: {number}}}
26060 */
26061 getMinMaxValue: function getMinMaxValue(data) {
26062 var _this10 = this,
26063 getBaseValue = this.getBaseValue.bind(this),
26064 min,
26065 max;
26066 (data || this.data.targets.map(function (t) {
26067 _newArrowCheck(this, _this10);
26068 return t.values;
26069 }.bind(this))).forEach(function (v, i) {
26070 _newArrowCheck(this, _this10);
26071 var value = v.map(getBaseValue).filter(isNumber);
26072 min = Math.min.apply(Math, [i ? min : Infinity].concat(value));
26073 max = Math.max.apply(Math, [i ? max : -Infinity].concat(value));
26074 }.bind(this));
26075 return {
26076 min: min,
26077 max: max
26078 };
26079 },
26080 /**
26081 * Get the min/max data
26082 * @private
26083 * @returns {{min: Array, max: Array}}
26084 */
26085 getMinMaxData: function getMinMaxData() {
26086 var _this11 = this,
26087 $$ = this,
26088 cacheKey = KEY.dataMinMax,
26089 minMaxData = $$.cache.get(cacheKey);
26090 if (!minMaxData) {
26091 var data = $$.data.targets.map(function (t) {
26092 _newArrowCheck(this, _this11);
26093 return t.values;
26094 }.bind(this)),
26095 minMax = $$.getMinMaxValue(data),
26096 _min = [],
26097 _max = [];
26098 data.forEach(function (v) {
26099 _newArrowCheck(this, _this11);
26100 var minData = $$.getFilteredDataByValue(v, minMax.min),
26101 maxData = $$.getFilteredDataByValue(v, minMax.max);
26102 if (minData.length) {
26103 _min = _min.concat(minData);
26104 }
26105 if (maxData.length) {
26106 _max = _max.concat(maxData);
26107 }
26108 }.bind(this));
26109
26110 // update the cached data
26111 $$.cache.add(cacheKey, minMaxData = {
26112 min: _min,
26113 max: _max
26114 });
26115 }
26116 return minMaxData;
26117 },
26118 /**
26119 * Get sum of data per index
26120 * @private
26121 * @returns {Array}
26122 */
26123 getTotalPerIndex: function getTotalPerIndex() {
26124 var _this12 = this,
26125 $$ = this,
26126 cacheKey = KEY.dataTotalPerIndex,
26127 sum = $$.cache.get(cacheKey);
26128 if ($$.isStackNormalized() && !sum) {
26129 sum = [];
26130 $$.data.targets.forEach(function (row) {
26131 var _this13 = this;
26132 _newArrowCheck(this, _this12);
26133 row.values.forEach(function (v, i) {
26134 _newArrowCheck(this, _this13);
26135 if (!sum[i]) {
26136 sum[i] = 0;
26137 }
26138 sum[i] += isNumber(v.value) ? v.value : 0;
26139 }.bind(this));
26140 }.bind(this));
26141 }
26142 return sum;
26143 },
26144 /**
26145 * Get total data sum
26146 * @param {boolean} subtractHidden Subtract hidden data from total
26147 * @returns {number}
26148 * @private
26149 */
26150 getTotalDataSum: function getTotalDataSum(subtractHidden) {
26151 var _this14 = this,
26152 $$ = this,
26153 cacheKey = KEY.dataTotalSum,
26154 total = $$.cache.get(cacheKey);
26155 if (!isNumber(total)) {
26156 var _sum = mergeArray($$.data.targets.map(function (t) {
26157 _newArrowCheck(this, _this14);
26158 return t.values;
26159 }.bind(this))).map(function (v) {
26160 _newArrowCheck(this, _this14);
26161 return v.value;
26162 }.bind(this)).reduce(function (p, c) {
26163 _newArrowCheck(this, _this14);
26164 return p + c;
26165 }.bind(this));
26166 $$.cache.add(cacheKey, total = _sum);
26167 }
26168 if (subtractHidden) {
26169 total -= $$.getHiddenTotalDataSum();
26170 }
26171 return total;
26172 },
26173 /**
26174 * Get total hidden data sum
26175 * @returns {number}
26176 * @private
26177 */
26178 getHiddenTotalDataSum: function getHiddenTotalDataSum() {
26179 var _this15 = this,
26180 $$ = this,
26181 api = $$.api,
26182 hiddenTargetIds = $$.state.hiddenTargetIds,
26183 total = 0;
26184 if (hiddenTargetIds.length) {
26185 total = api.data.values.bind(api)(hiddenTargetIds).reduce(function (p, c) {
26186 _newArrowCheck(this, _this15);
26187 return p + c;
26188 }.bind(this));
26189 }
26190 return total;
26191 },
26192 /**
26193 * Get filtered data by value
26194 * @param {object} data Data
26195 * @param {number} value Value to be filtered
26196 * @returns {Array} filtered array data
26197 * @private
26198 */
26199 getFilteredDataByValue: function getFilteredDataByValue(data, value) {
26200 var _this16 = this;
26201 return data.filter(function (t) {
26202 _newArrowCheck(this, _this16);
26203 return this.getBaseValue(t) === value;
26204 }.bind(this));
26205 },
26206 /**
26207 * Return the max length of the data
26208 * @returns {number} max data length
26209 * @private
26210 */
26211 getMaxDataCount: function getMaxDataCount() {
26212 var _this17 = this;
26213 return Math.max.apply(Math, this.data.targets.map(function (t) {
26214 _newArrowCheck(this, _this17);
26215 return t.values.length;
26216 }.bind(this)));
26217 },
26218 getMaxDataCountTarget: function getMaxDataCountTarget() {
26219 var _this18 = this,
26220 target = this.filterTargetsToShow() || [],
26221 length = target.length;
26222 if (length > 1) {
26223 target = target.map(function (t) {
26224 _newArrowCheck(this, _this18);
26225 return t.values;
26226 }.bind(this)).reduce(function (a, b) {
26227 _newArrowCheck(this, _this18);
26228 return a.concat(b);
26229 }.bind(this)).map(function (v) {
26230 _newArrowCheck(this, _this18);
26231 return v.x;
26232 }.bind(this));
26233 target = sortValue(getUnique(target)).map(function (x, index) {
26234 _newArrowCheck(this, _this18);
26235 return {
26236 x: x,
26237 index: index
26238 };
26239 }.bind(this));
26240 } else if (length) {
26241 target = target[0].values;
26242 }
26243 return target;
26244 },
26245 mapToIds: function mapToIds(targets) {
26246 var _this19 = this;
26247 return targets.map(function (d) {
26248 _newArrowCheck(this, _this19);
26249 return d.id;
26250 }.bind(this));
26251 },
26252 mapToTargetIds: function mapToTargetIds(ids) {
26253 var $$ = this;
26254 return ids ? isArray(ids) ? ids.concat() : [ids] : $$.mapToIds($$.data.targets);
26255 },
26256 hasTarget: function hasTarget(targets, id) {
26257 var ids = this.mapToIds(targets);
26258 for (var i = 0, val; val = ids[i]; i++) {
26259 if (val === id) {
26260 return !0;
26261 }
26262 }
26263 return !1;
26264 },
26265 isTargetToShow: function isTargetToShow(targetId) {
26266 return this.state.hiddenTargetIds.indexOf(targetId) < 0;
26267 },
26268 isLegendToShow: function isLegendToShow(targetId) {
26269 return this.state.hiddenLegendIds.indexOf(targetId) < 0;
26270 },
26271 filterTargetsToShow: function filterTargetsToShow(targets) {
26272 var _this20 = this,
26273 $$ = this;
26274 return (targets || $$.data.targets).filter(function (t) {
26275 _newArrowCheck(this, _this20);
26276 return $$.isTargetToShow(t.id);
26277 }.bind(this));
26278 },
26279 mapTargetsToUniqueXs: function mapTargetsToUniqueXs(targets) {
26280 var _this21 = this,
26281 $$ = this,
26282 axis = $$.axis,
26283 xs = [];
26284 if (targets != null && targets.length) {
26285 xs = getUnique(mergeArray(targets.map(function (t) {
26286 var _this22 = this;
26287 _newArrowCheck(this, _this21);
26288 return t.values.map(function (v) {
26289 _newArrowCheck(this, _this22);
26290 return +v.x;
26291 }.bind(this));
26292 }.bind(this))));
26293 xs = axis != null && axis.isTimeSeries() ? xs.map(function (x) {
26294 _newArrowCheck(this, _this21);
26295 return new Date(+x);
26296 }.bind(this)) : xs.map(Number);
26297 }
26298 return sortValue(xs);
26299 },
26300 /**
26301 * Add to the state target Ids
26302 * @param {string} type State's prop name
26303 * @param {Array|string} targetIds Target ids array
26304 * @private
26305 */
26306 addTargetIds: function addTargetIds(type, targetIds) {
26307 var _this23 = this,
26308 state = this.state,
26309 ids = isArray(targetIds) ? targetIds : [targetIds];
26310 ids.forEach(function (v) {
26311 _newArrowCheck(this, _this23);
26312 state[type].indexOf(v) < 0 && state[type].push(v);
26313 }.bind(this));
26314 },
26315 /**
26316 * Remove from the state target Ids
26317 * @param {string} type State's prop name
26318 * @param {Array|string} targetIds Target ids array
26319 * @private
26320 */
26321 removeTargetIds: function removeTargetIds(type, targetIds) {
26322 var _this24 = this,
26323 state = this.state,
26324 ids = isArray(targetIds) ? targetIds : [targetIds];
26325 ids.forEach(function (v) {
26326 _newArrowCheck(this, _this24);
26327 var index = state[type].indexOf(v);
26328 index >= 0 && state[type].splice(index, 1);
26329 }.bind(this));
26330 },
26331 addHiddenTargetIds: function addHiddenTargetIds(targetIds) {
26332 this.addTargetIds("hiddenTargetIds", targetIds);
26333 },
26334 removeHiddenTargetIds: function removeHiddenTargetIds(targetIds) {
26335 this.removeTargetIds("hiddenTargetIds", targetIds);
26336 },
26337 addHiddenLegendIds: function addHiddenLegendIds(targetIds) {
26338 this.addTargetIds("hiddenLegendIds", targetIds);
26339 },
26340 removeHiddenLegendIds: function removeHiddenLegendIds(targetIds) {
26341 this.removeTargetIds("hiddenLegendIds", targetIds);
26342 },
26343 getValuesAsIdKeyed: function getValuesAsIdKeyed(targets) {
26344 var _this25 = this,
26345 $$ = this,
26346 hasAxis = $$.state.hasAxis,
26347 ys = {},
26348 isMultipleX = $$.isMultipleX(),
26349 xs = isMultipleX ? $$.mapTargetsToUniqueXs(targets).map(function (v) {
26350 _newArrowCheck(this, _this25);
26351 return isString(v) ? v : +v;
26352 }.bind(this)) : null;
26353 targets.forEach(function (t) {
26354 var _this26 = this;
26355 _newArrowCheck(this, _this25);
26356 var data = [];
26357 t.values.filter(function (_ref) {
26358 var value = _ref.value;
26359 _newArrowCheck(this, _this26);
26360 return isValue(value) || value === null;
26361 }.bind(this)).forEach(function (v) {
26362 _newArrowCheck(this, _this26);
26363 var value = v.value;
26364
26365 // exclude 'volume' value to correct mis domain calculation
26366 if (value !== null && $$.isCandlestickType(v)) {
26367 value = isArray(value) ? value.slice(0, 4) : [value.open, value.high, value.low, value.close];
26368 }
26369 if (isArray(value)) {
26370 data.push.apply(data, value);
26371 } else if (isObject(value) && "high" in value) {
26372 data.push.apply(data, Object.values(value));
26373 } else if ($$.isBubbleZType(v)) {
26374 data.push(hasAxis && $$.getBubbleZData(value, "y"));
26375 } else {
26376 if (isMultipleX) {
26377 data[$$.getIndexByX(v.x, xs)] = value;
26378 } else {
26379 data.push(value);
26380 }
26381 }
26382 }.bind(this));
26383 ys[t.id] = data;
26384 }.bind(this));
26385 return ys;
26386 },
26387 checkValueInTargets: function checkValueInTargets(targets, checker) {
26388 var ids = Object.keys(targets),
26389 values;
26390 for (var i = 0; i < ids.length; i++) {
26391 values = targets[ids[i]].values;
26392 for (var j = 0; j < values.length; j++) {
26393 if (checker(values[j].value)) {
26394 return !0;
26395 }
26396 }
26397 }
26398 return !1;
26399 },
26400 hasMultiTargets: function hasMultiTargets() {
26401 return this.filterTargetsToShow().length > 1;
26402 },
26403 hasNegativeValueInTargets: function hasNegativeValueInTargets(targets) {
26404 var _this27 = this;
26405 return this.checkValueInTargets(targets, function (v) {
26406 _newArrowCheck(this, _this27);
26407 return v < 0;
26408 }.bind(this));
26409 },
26410 hasPositiveValueInTargets: function hasPositiveValueInTargets(targets) {
26411 var _this28 = this;
26412 return this.checkValueInTargets(targets, function (v) {
26413 _newArrowCheck(this, _this28);
26414 return v > 0;
26415 }.bind(this));
26416 },
26417 /**
26418 * Sort targets data
26419 * Note: For stacked bar, will sort from the total sum of data series, not for each stacked bar
26420 * @param {Array} targetsValue Target value
26421 * @returns {Array}
26422 * @private
26423 */
26424 orderTargets: function orderTargets(targetsValue) {
26425 var $$ = this,
26426 targets = [].concat(targetsValue),
26427 fn = $$.getSortCompareFn();
26428 fn && targets.sort(fn);
26429 return targets;
26430 },
26431 /**
26432 * Get data.order compare function
26433 * @param {boolean} isArc Is for Arc type sort or not
26434 * @returns {Function} compare function
26435 * @private
26436 */
26437 getSortCompareFn: function getSortCompareFn(isArc) {
26438 var _this29 = this;
26439 if (isArc === void 0) {
26440 isArc = !1;
26441 }
26442 var $$ = this,
26443 config = $$.config,
26444 order = config.data_order,
26445 orderAsc = /asc/i.test(order),
26446 orderDesc = /desc/i.test(order),
26447 fn;
26448 if (orderAsc || orderDesc) {
26449 var reducer = function (p, c) {
26450 _newArrowCheck(this, _this29);
26451 return p + Math.abs(c.value);
26452 }.bind(this);
26453 fn = function (t1, t2) {
26454 _newArrowCheck(this, _this29);
26455 var t1Sum = "values" in t1 ? t1.values.reduce(reducer, 0) : t1.value,
26456 t2Sum = "values" in t2 ? t2.values.reduce(reducer, 0) : t2.value;
26457 return isArc ? orderAsc ? t1Sum - t2Sum : t2Sum - t1Sum : orderAsc ? t2Sum - t1Sum : t1Sum - t2Sum;
26458 }.bind(this);
26459 } else if (isFunction(order)) {
26460 fn = order.bind($$.api);
26461 }
26462 return fn || null;
26463 },
26464 filterByX: function filterByX(targets, x) {
26465 var _this30 = this;
26466 return mergeArray(targets.map(function (t) {
26467 _newArrowCheck(this, _this30);
26468 return t.values;
26469 }.bind(this))).filter(function (v) {
26470 _newArrowCheck(this, _this30);
26471 return v.x - x === 0;
26472 }.bind(this));
26473 },
26474 filterRemoveNull: function filterRemoveNull(data) {
26475 var _this31 = this;
26476 return data.filter(function (d) {
26477 _newArrowCheck(this, _this31);
26478 return isValue(this.getBaseValue(d));
26479 }.bind(this));
26480 },
26481 filterByXDomain: function filterByXDomain(targets, xDomain) {
26482 var _this32 = this;
26483 return targets.map(function (t) {
26484 var _this33 = this;
26485 _newArrowCheck(this, _this32);
26486 return {
26487 id: t.id,
26488 id_org: t.id_org,
26489 values: t.values.filter(function (v) {
26490 _newArrowCheck(this, _this33);
26491 return xDomain[0] <= v.x && v.x <= xDomain[1];
26492 }.bind(this))
26493 };
26494 }.bind(this));
26495 },
26496 hasDataLabel: function hasDataLabel() {
26497 var dataLabels = this.config.data_labels;
26498 return isboolean(dataLabels) && dataLabels || isObjectType(dataLabels) && notEmpty(dataLabels);
26499 },
26500 /**
26501 * Get data index from the event coodinates
26502 * @param {Event} event Event object
26503 * @returns {number}
26504 */
26505 getDataIndexFromEvent: function getDataIndexFromEvent(event) {
26506 var $$ = this,
26507 config = $$.config,
26508 _$$$state = $$.state,
26509 inputType = _$$$state.inputType,
26510 _$$$state$eventReceiv = _$$$state.eventReceiver,
26511 coords = _$$$state$eventReceiv.coords,
26512 rect = _$$$state$eventReceiv.rect,
26513 isRotated = config.axis_rotated,
26514 e = inputType === "touch" && event.changedTouches ? event.changedTouches[0] : event,
26515 index = findIndex(coords, isRotated ? e.clientY - rect.top : e.clientX - rect.left, 0, coords.length - 1, isRotated);
26516 return index;
26517 },
26518 getDataLabelLength: function getDataLabelLength(min, max, key) {
26519 var _this34 = this,
26520 $$ = this,
26521 lengths = [0, 0];
26522 $$.$el.chart.select("svg").selectAll(".dummy").data([min, max]).enter().append("text").text(function (d) {
26523 _newArrowCheck(this, _this34);
26524 return $$.dataLabelFormat(d.id)(d);
26525 }.bind(this)).each(function (d, i) {
26526 lengths[i] = this.getBoundingClientRect()[key] * 1.3;
26527 }).remove();
26528 return lengths;
26529 },
26530 isNoneArc: function isNoneArc(d) {
26531 return this.hasTarget(this.data.targets, d.id);
26532 },
26533 isArc: function isArc(d) {
26534 return "data" in d && this.hasTarget(this.data.targets, d.data.id);
26535 },
26536 findSameXOfValues: function findSameXOfValues(values, index) {
26537 var targetX = values[index].x,
26538 sames = [],
26539 i;
26540 for (i = index - 1; i >= 0; i--) {
26541 if (targetX !== values[i].x) {
26542 break;
26543 }
26544 sames.push(values[i]);
26545 }
26546 for (i = index; i < values.length; i++) {
26547 if (targetX !== values[i].x) {
26548 break;
26549 }
26550 sames.push(values[i]);
26551 }
26552 return sames;
26553 },
26554 findClosestFromTargets: function findClosestFromTargets(targets, pos) {
26555 var _this35 = this,
26556 $$ = this,
26557 candidates = targets.map(function (target) {
26558 _newArrowCheck(this, _this35);
26559 return $$.findClosest(target.values, pos);
26560 }.bind(this));
26561 // map to array of closest points of each target
26562
26563 // decide closest point and return
26564 return $$.findClosest(candidates, pos);
26565 },
26566 findClosest: function findClosest(values, pos) {
26567 var _this36 = this,
26568 $$ = this,
26569 config = $$.config,
26570 main = $$.$el.main,
26571 data = values.filter(function (v) {
26572 _newArrowCheck(this, _this36);
26573 return v && isValue(v.value);
26574 }.bind(this)),
26575 minDist = config.point_sensitivity,
26576 closest;
26577 // find mouseovering bar/candlestick
26578 // https://github.com/naver/billboard.js/issues/2434
26579 data.filter(function (v) {
26580 _newArrowCheck(this, _this36);
26581 return $$.isBarType(v.id) || $$.isCandlestickType(v.id);
26582 }.bind(this)).forEach(function (v) {
26583 _newArrowCheck(this, _this36);
26584 var selector = $$.isBarType(v.id) ? "." + $BAR.chartBar + "." + $COMMON.target + $$.getTargetSelectorSuffix(v.id) + " ." + $BAR.bar + "-" + v.index : "." + $CANDLESTICK.chartCandlestick + "." + $COMMON.target + $$.getTargetSelectorSuffix(v.id) + " ." + $CANDLESTICK.candlestick + "-" + v.index + " path";
26585 if (!closest && $$.isWithinBar(main.select(selector).node())) {
26586 closest = v;
26587 }
26588 }.bind(this));
26589
26590 // find closest point from non-bar/candlestick
26591 data.filter(function (v) {
26592 _newArrowCheck(this, _this36);
26593 return !$$.isBarType(v.id) && !$$.isCandlestickType(v.id);
26594 }.bind(this)).forEach(function (v) {
26595 _newArrowCheck(this, _this36);
26596 var d = $$.dist(v, pos);
26597 if (d < minDist) {
26598 minDist = d;
26599 closest = v;
26600 }
26601 }.bind(this));
26602 return closest;
26603 },
26604 dist: function dist(data, pos) {
26605 var $$ = this,
26606 isRotated = $$.config.axis_rotated,
26607 scale = $$.scale,
26608 xIndex = isRotated ? 1 : 0,
26609 yIndex = isRotated ? 0 : 1,
26610 y = $$.circleY(data, data.index),
26611 x = (scale.zoom || scale.x)(data.x);
26612 return Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2));
26613 },
26614 /**
26615 * Convert data for step type
26616 * @param {Array} values Object data values
26617 * @returns {Array}
26618 * @private
26619 */
26620 convertValuesToStep: function convertValuesToStep(values) {
26621 var $$ = this,
26622 axis = $$.axis,
26623 config = $$.config,
26624 stepType = config.line_step_type,
26625 isCategorized = axis ? axis.isCategorized() : !1,
26626 converted = isArray(values) ? values.concat() : [values];
26627 if (!(isCategorized || /step\-(after|before)/.test(stepType))) {
26628 return values;
26629 }
26630
26631 // insert & append cloning first/last value to be fully rendered covering on each gap sides
26632 var head = converted[0],
26633 tail = converted[converted.length - 1],
26634 id = head.id,
26635 x = head.x;
26636 // insert head
26637 converted.unshift({
26638 x: --x,
26639 value: head.value,
26640 id: id
26641 });
26642 isCategorized && stepType === "step-after" && converted.unshift({
26643 x: --x,
26644 value: head.value,
26645 id: id
26646 });
26647
26648 // append tail
26649 x = tail.x;
26650 converted.push({
26651 x: ++x,
26652 value: tail.value,
26653 id: id
26654 });
26655 isCategorized && stepType === "step-before" && converted.push({
26656 x: ++x,
26657 value: tail.value,
26658 id: id
26659 });
26660 return converted;
26661 },
26662 convertValuesToRange: function convertValuesToRange(values) {
26663 var _this37 = this,
26664 converted = isArray(values) ? values.concat() : [values],
26665 ranges = [];
26666 converted.forEach(function (range) {
26667 _newArrowCheck(this, _this37);
26668 var x = range.x,
26669 id = range.id;
26670 ranges.push({
26671 x: x,
26672 id: id,
26673 value: range.value[0]
26674 });
26675 ranges.push({
26676 x: x,
26677 id: id,
26678 value: range.value[2]
26679 });
26680 }.bind(this));
26681 return ranges;
26682 },
26683 updateDataAttributes: function updateDataAttributes(name, attrs) {
26684 var _this38 = this,
26685 $$ = this,
26686 config = $$.config,
26687 current = config["data_" + name];
26688 if (isUndefined(attrs)) {
26689 return current;
26690 }
26691 Object.keys(attrs).forEach(function (id) {
26692 _newArrowCheck(this, _this38);
26693 current[id] = attrs[id];
26694 }.bind(this));
26695 $$.redraw({
26696 withLegend: !0
26697 });
26698 return current;
26699 },
26700 getRangedData: function getRangedData(d, key, type) {
26701 if (key === void 0) {
26702 key = "";
26703 }
26704 if (type === void 0) {
26705 type = "areaRange";
26706 }
26707 var value = d == null ? void 0 : d.value;
26708 if (isArray(value)) {
26709 // @ts-ignore
26710 var index = {
26711 areaRange: ["high", "mid", "low"],
26712 candlestick: ["open", "high", "low", "close", "volume"]
26713 }[type].indexOf(key);
26714 return index >= 0 && value ? value[index] : undefined;
26715 } else if (value) {
26716 return value[key];
26717 }
26718 return value;
26719 },
26720 /**
26721 * Get ratio value
26722 * @param {string} type Ratio for given type
26723 * @param {object} d Data value object
26724 * @param {boolean} asPercent Convert the return as percent or not
26725 * @returns {number} Ratio value
26726 * @private
26727 */
26728 getRatio: function getRatio(type, d, asPercent) {
26729 var _this39 = this;
26730 if (asPercent === void 0) {
26731 asPercent = !1;
26732 }
26733 var $$ = this,
26734 config = $$.config,
26735 state = $$.state,
26736 api = $$.api,
26737 ratio = 0;
26738 if (d && api.data.shown().length) {
26739 ratio = d.ratio || d.value;
26740 if (type === "arc") {
26741 // if has padAngle set, calculate rate based on value
26742 if ($$.pie.padAngle()()) {
26743 ratio = d.value / $$.getTotalDataSum(!0);
26744
26745 // otherwise, based on the rendered angle value
26746 } else {
26747 var gaugeArcLength = config.gauge_fullCircle ? $$.getArcLength() : $$.getStartAngle() * -2,
26748 arcLength = $$.hasType("gauge") ? gaugeArcLength : Math.PI * 2;
26749 ratio = (d.endAngle - d.startAngle) / arcLength;
26750 }
26751 } else if (type === "index") {
26752 var dataValues = api.data.values.bind(api),
26753 total = this.getTotalPerIndex();
26754 if (state.hiddenTargetIds.length) {
26755 var hiddenSum = dataValues(state.hiddenTargetIds, !1);
26756 if (hiddenSum.length) {
26757 hiddenSum = hiddenSum.reduce(function (acc, curr) {
26758 var _this40 = this;
26759 _newArrowCheck(this, _this39);
26760 return acc.map(function (v, i) {
26761 _newArrowCheck(this, _this40);
26762 return (isNumber(v) ? v : 0) + curr[i];
26763 }.bind(this));
26764 }.bind(this));
26765 total = total.map(function (v, i) {
26766 _newArrowCheck(this, _this39);
26767 return v - hiddenSum[i];
26768 }.bind(this));
26769 }
26770 }
26771 d.ratio = isNumber(d.value) && total && total[d.index] > 0 ? d.value / total[d.index] : 0;
26772 ratio = d.ratio;
26773 } else if (type === "radar") {
26774 ratio = parseFloat(Math.max(d.value, 0) + "") / state.current.dataMax * config.radar_size_ratio;
26775 } else if (type === "bar") {
26776 var yScale = $$.getYScaleById.bind($$)(d.id),
26777 _max2 = yScale.domain().reduce(function (a, c) {
26778 _newArrowCheck(this, _this39);
26779 return c - a;
26780 }.bind(this));
26781 // when all data are 0, return 0
26782 ratio = _max2 === 0 ? 0 : Math.abs(d.value) / _max2;
26783 }
26784 }
26785 return asPercent && ratio ? ratio * 100 : ratio;
26786 },
26787 /**
26788 * Sort data index to be aligned with x axis.
26789 * @param {Array} tickValues Tick array values
26790 * @private
26791 */
26792 updateDataIndexByX: function updateDataIndexByX(tickValues) {
26793 var _this41 = this,
26794 $$ = this,
26795 tickValueMap = tickValues.reduce(function (out, tick, index) {
26796 _newArrowCheck(this, _this41);
26797 out[+tick.x] = index;
26798 return out;
26799 }.bind(this), {});
26800 $$.data.targets.forEach(function (t) {
26801 var _this42 = this;
26802 _newArrowCheck(this, _this41);
26803 t.values.forEach(function (value, valueIndex) {
26804 _newArrowCheck(this, _this42);
26805 var index = tickValueMap[+value.x];
26806 if (index === undefined) {
26807 index = valueIndex;
26808 }
26809 value.index = index;
26810 }.bind(this));
26811 }.bind(this));
26812 },
26813 /**
26814 * Determine if bubble has dimension data
26815 * @param {object|Array} d data value
26816 * @returns {boolean}
26817 * @private
26818 */
26819 isBubbleZType: function isBubbleZType(d) {
26820 var $$ = this;
26821 return $$.isBubbleType(d) && (isObject(d.value) && ("z" in d.value || "y" in d.value) || isArray(d.value) && d.value.length === 2);
26822 },
26823 /**
26824 * Determine if bar has ranged data
26825 * @param {Array} d data value
26826 * @returns {boolean}
26827 * @private
26828 */
26829 isBarRangeType: function isBarRangeType(d) {
26830 var _this43 = this,
26831 $$ = this,
26832 value = d.value;
26833 return $$.isBarType(d) && isArray(value) && value.length === 2 && value.every(function (v) {
26834 _newArrowCheck(this, _this43);
26835 return isNumber(v);
26836 }.bind(this));
26837 },
26838 /**
26839 * Get data object by id
26840 * @param {string} id data id
26841 * @returns {object}
26842 * @private
26843 */
26844 getDataById: function getDataById(id) {
26845 var _d$,
26846 d = this.cache.get(id) || this.api.data(id);
26847 return (_d$ = d == null ? void 0 : d[0]) != null ? _d$ : d;
26848 }
26849});
26850;// CONCATENATED MODULE: ./src/ChartInternal/data/load.ts
26851
26852/**
26853 * Copyright (c) 2017 ~ present NAVER Corp.
26854 * billboard.js project is licensed under the MIT license
26855 */
26856
26857
26858/* harmony default export */ var load = ({
26859 load: function load(rawTargets, args) {
26860 var _this = this,
26861 _args$done,
26862 $$ = this,
26863 append = args.append,
26864 targets = rawTargets;
26865 if (targets) {
26866 // filter loading targets if needed
26867 if (args.filter) {
26868 targets = targets.filter(args.filter);
26869 }
26870
26871 // set type if args.types || args.type specified
26872 if (args.type || args.types) {
26873 targets.forEach(function (t) {
26874 var _args$types;
26875 _newArrowCheck(this, _this);
26876 var type = ((_args$types = args.types) == null ? void 0 : _args$types[t.id]) || args.type;
26877 $$.setTargetType(t.id, type);
26878 }.bind(this));
26879 }
26880
26881 // Update/Add data
26882 $$.data.targets.forEach(function (d) {
26883 _newArrowCheck(this, _this);
26884 for (var i = 0; i < targets.length; i++) {
26885 if (d.id === targets[i].id) {
26886 d.values = append ? d.values.concat(targets[i].values) : targets[i].values;
26887 targets.splice(i, 1);
26888 break;
26889 }
26890 }
26891 }.bind(this));
26892 $$.data.targets = $$.data.targets.concat(targets); // add remained
26893 }
26894
26895 // Set targets
26896 $$.updateTargets($$.data.targets);
26897
26898 // Redraw with new targets
26899 $$.redraw({
26900 withUpdateOrgXDomain: !0,
26901 withUpdateXDomain: !0,
26902 withLegend: !0
26903 });
26904
26905 // Update current state chart type and elements list after redraw
26906 $$.updateTypesElements();
26907 (_args$done = args.done) == null ? void 0 : _args$done.call($$.api);
26908 },
26909 loadFromArgs: function loadFromArgs(args) {
26910 var _this2 = this,
26911 $$ = this;
26912 // prevent load when chart is already destroyed
26913 if (!$$.config) {
26914 return;
26915 }
26916
26917 // reset internally cached data
26918 $$.cache.reset();
26919 $$.convertData(args, function (d) {
26920 _newArrowCheck(this, _this2);
26921 var data = args.data || d;
26922 args.append && (data.__append__ = !0);
26923 data && $$.load($$.convertDataToTargets(data), args);
26924 }.bind(this));
26925 },
26926 unload: function unload(rawTargetIds, customDoneCb) {
26927 var _this3 = this,
26928 $$ = this,
26929 state = $$.state,
26930 $el = $$.$el,
26931 $T = $$.$T,
26932 done = customDoneCb,
26933 targetIds = rawTargetIds;
26934 // reset internally cached data
26935 $$.cache.reset();
26936 if (!done) {
26937 done = function () {
26938 _newArrowCheck(this, _this3);
26939 }.bind(this);
26940 }
26941
26942 // filter existing target
26943 targetIds = targetIds.filter(function (id) {
26944 _newArrowCheck(this, _this3);
26945 return $$.hasTarget($$.data.targets, id);
26946 }.bind(this));
26947
26948 // If no target, call done and return
26949 if (!targetIds || targetIds.length === 0) {
26950 done();
26951 return;
26952 }
26953 var targets = $el.svg.selectAll(targetIds.map(function (id) {
26954 _newArrowCheck(this, _this3);
26955 return $$.selectorTarget(id);
26956 }.bind(this)));
26957 $T(targets).style("opacity", "0").remove().call(endall, done);
26958 targetIds.forEach(function (id) {
26959 var _this4 = this;
26960 _newArrowCheck(this, _this3);
26961 // Reset fadein for future load
26962 state.withoutFadeIn[id] = !1;
26963
26964 // Remove target's elements
26965 if ($el.legend) {
26966 $el.legend.selectAll("." + $LEGEND.legendItem + $$.getTargetSelectorSuffix(id)).remove();
26967 }
26968
26969 // Remove target
26970 $$.data.targets = $$.data.targets.filter(function (t) {
26971 _newArrowCheck(this, _this4);
26972 return t.id !== id;
26973 }.bind(this));
26974 }.bind(this));
26975
26976 // Update current state chart type and elements list after redraw
26977 $$.updateTypesElements();
26978 }
26979});
26980;// CONCATENATED MODULE: ./node_modules/d3-drag/src/constant.js
26981
26982var d3_drag_src_constant_this = undefined;
26983/* harmony default export */ var d3_drag_src_constant = ((function (x) {
26984 var _this2 = this;
26985 _newArrowCheck(this, d3_drag_src_constant_this);
26986 return function () {
26987 _newArrowCheck(this, _this2);
26988 return x;
26989 }.bind(this);
26990}).bind(undefined));
26991;// CONCATENATED MODULE: ./node_modules/d3-drag/src/event.js
26992function DragEvent(type, _ref) {
26993 var sourceEvent = _ref.sourceEvent,
26994 subject = _ref.subject,
26995 target = _ref.target,
26996 identifier = _ref.identifier,
26997 active = _ref.active,
26998 x = _ref.x,
26999 y = _ref.y,
27000 dx = _ref.dx,
27001 dy = _ref.dy,
27002 dispatch = _ref.dispatch;
27003 Object.defineProperties(this, {
27004 type: {
27005 value: type,
27006 enumerable: !0,
27007 configurable: !0
27008 },
27009 sourceEvent: {
27010 value: sourceEvent,
27011 enumerable: !0,
27012 configurable: !0
27013 },
27014 subject: {
27015 value: subject,
27016 enumerable: !0,
27017 configurable: !0
27018 },
27019 target: {
27020 value: target,
27021 enumerable: !0,
27022 configurable: !0
27023 },
27024 identifier: {
27025 value: identifier,
27026 enumerable: !0,
27027 configurable: !0
27028 },
27029 active: {
27030 value: active,
27031 enumerable: !0,
27032 configurable: !0
27033 },
27034 x: {
27035 value: x,
27036 enumerable: !0,
27037 configurable: !0
27038 },
27039 y: {
27040 value: y,
27041 enumerable: !0,
27042 configurable: !0
27043 },
27044 dx: {
27045 value: dx,
27046 enumerable: !0,
27047 configurable: !0
27048 },
27049 dy: {
27050 value: dy,
27051 enumerable: !0,
27052 configurable: !0
27053 },
27054 _: {
27055 value: dispatch
27056 }
27057 });
27058}
27059DragEvent.prototype.on = function () {
27060 var value = this._.on.apply(this._, arguments);
27061 return value === this._ ? this : value;
27062};
27063;// CONCATENATED MODULE: ./node_modules/d3-drag/src/drag.js
27064
27065
27066
27067
27068
27069
27070
27071// Ignore right-click, since that should open the context menu.
27072function drag_defaultFilter(event) {
27073 return !event.ctrlKey && !event.button;
27074}
27075function defaultContainer() {
27076 return this.parentNode;
27077}
27078function defaultSubject(event, d) {
27079 return d == null ? {
27080 x: event.x,
27081 y: event.y
27082 } : d;
27083}
27084function drag_defaultTouchable() {
27085 return navigator.maxTouchPoints || "ontouchstart" in this;
27086}
27087/* harmony default export */ function drag() {
27088 var filter = drag_defaultFilter,
27089 container = defaultContainer,
27090 subject = defaultSubject,
27091 touchable = drag_defaultTouchable,
27092 gestures = {},
27093 listeners = src_dispatch("start", "drag", "end"),
27094 active = 0,
27095 mousedownx,
27096 mousedowny,
27097 mousemoving,
27098 touchending,
27099 clickDistance2 = 0;
27100 function drag(selection) {
27101 selection.on("mousedown.drag", mousedowned).filter(touchable).on("touchstart.drag", touchstarted).on("touchmove.drag", touchmoved, nonpassive).on("touchend.drag touchcancel.drag", touchended).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
27102 }
27103 function mousedowned(event, d) {
27104 if (touchending || !filter.call(this, event, d)) return;
27105 var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse");
27106 if (!gesture) return;
27107 src_select(event.view).on("mousemove.drag", mousemoved, nonpassivecapture).on("mouseup.drag", mouseupped, nonpassivecapture);
27108 nodrag(event.view);
27109 nopropagation(event);
27110 mousemoving = !1;
27111 mousedownx = event.clientX;
27112 mousedowny = event.clientY;
27113 gesture("start", event);
27114 }
27115 function mousemoved(event) {
27116 noevent(event);
27117 if (!mousemoving) {
27118 var dx = event.clientX - mousedownx,
27119 dy = event.clientY - mousedowny;
27120 mousemoving = dx * dx + dy * dy > clickDistance2;
27121 }
27122 gestures.mouse("drag", event);
27123 }
27124 function mouseupped(event) {
27125 src_select(event.view).on("mousemove.drag mouseup.drag", null);
27126 yesdrag(event.view, mousemoving);
27127 noevent(event);
27128 gestures.mouse("end", event);
27129 }
27130 function touchstarted(event, d) {
27131 if (!filter.call(this, event, d)) return;
27132 var touches = event.changedTouches,
27133 c = container.call(this, event, d),
27134 n = touches.length,
27135 i,
27136 gesture;
27137 for (i = 0; i < n; ++i) {
27138 if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {
27139 nopropagation(event);
27140 gesture("start", event, touches[i]);
27141 }
27142 }
27143 }
27144 function touchmoved(event) {
27145 var touches = event.changedTouches,
27146 n = touches.length,
27147 i,
27148 gesture;
27149 for (i = 0; i < n; ++i) {
27150 if (gesture = gestures[touches[i].identifier]) {
27151 noevent(event);
27152 gesture("drag", event, touches[i]);
27153 }
27154 }
27155 }
27156 function touchended(event) {
27157 var touches = event.changedTouches,
27158 n = touches.length,
27159 i,
27160 gesture;
27161 if (touchending) clearTimeout(touchending);
27162 touchending = setTimeout(function () {
27163 touchending = null;
27164 }, 500); // Ghost clicks are delayed!
27165 for (i = 0; i < n; ++i) {
27166 if (gesture = gestures[touches[i].identifier]) {
27167 nopropagation(event);
27168 gesture("end", event, touches[i]);
27169 }
27170 }
27171 }
27172 function beforestart(that, container, event, d, identifier, touch) {
27173 var dispatch = listeners.copy(),
27174 p = src_pointer(touch || event, container),
27175 dx,
27176 dy,
27177 s;
27178 if ((s = subject.call(that, new DragEvent("beforestart", {
27179 sourceEvent: event,
27180 target: drag,
27181 identifier: identifier,
27182 active: active,
27183 x: p[0],
27184 y: p[1],
27185 dx: 0,
27186 dy: 0,
27187 dispatch: dispatch
27188 }), d)) == null) return;
27189 dx = s.x - p[0] || 0;
27190 dy = s.y - p[1] || 0;
27191 return function gesture(type, event, touch) {
27192 var p0 = p,
27193 n;
27194 switch (type) {
27195 case "start":
27196 gestures[identifier] = gesture, n = active++;
27197 break;
27198 case "end":
27199 delete gestures[identifier], --active;
27200 // falls through
27201 case "drag":
27202 p = src_pointer(touch || event, container), n = active;
27203 break;
27204 }
27205 dispatch.call(type, that, new DragEvent(type, {
27206 sourceEvent: event,
27207 subject: s,
27208 target: drag,
27209 identifier: identifier,
27210 active: n,
27211 x: p[0] + dx,
27212 y: p[1] + dy,
27213 dx: p[0] - p0[0],
27214 dy: p[1] - p0[1],
27215 dispatch: dispatch
27216 }), d);
27217 };
27218 }
27219 drag.filter = function (_) {
27220 return arguments.length ? (filter = typeof _ === "function" ? _ : d3_drag_src_constant(!!_), drag) : filter;
27221 };
27222 drag.container = function (_) {
27223 return arguments.length ? (container = typeof _ === "function" ? _ : d3_drag_src_constant(_), drag) : container;
27224 };
27225 drag.subject = function (_) {
27226 return arguments.length ? (subject = typeof _ === "function" ? _ : d3_drag_src_constant(_), drag) : subject;
27227 };
27228 drag.touchable = function (_) {
27229 return arguments.length ? (touchable = typeof _ === "function" ? _ : d3_drag_src_constant(!!_), drag) : touchable;
27230 };
27231 drag.on = function () {
27232 var value = listeners.on.apply(listeners, arguments);
27233 return value === listeners ? drag : value;
27234 };
27235 drag.clickDistance = function (_) {
27236 return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);
27237 };
27238 return drag;
27239}
27240;// CONCATENATED MODULE: ./src/ChartInternal/interactions/interaction.ts
27241
27242/**
27243 * Copyright (c) 2017 ~ present NAVER Corp.
27244 * billboard.js project is licensed under the MIT license
27245 */
27246
27247
27248
27249
27250
27251/* harmony default export */ var interactions_interaction = ({
27252 selectRectForSingle: function selectRectForSingle(context, eventRect, index) {
27253 var _this = this,
27254 $$ = this,
27255 config = $$.config,
27256 main = $$.$el.main,
27257 isSelectionEnabled = config.data_selection_enabled,
27258 isSelectionGrouped = config.data_selection_grouped,
27259 isSelectable = config.data_selection_isselectable,
27260 isTooltipGrouped = config.tooltip_grouped,
27261 selectedData = $$.getAllValuesOnIndex(index);
27262 if (isTooltipGrouped) {
27263 $$.showTooltip(selectedData, context);
27264 $$.showGridFocus == null ? void 0 : $$.showGridFocus(selectedData);
27265 if (!isSelectionEnabled || isSelectionGrouped) {
27266 return;
27267 }
27268 }
27269
27270 // remove possible previous focused state
27271 main.selectAll("." + $COMMON.EXPANDED + ":not(." + $SHAPE.shape + "-" + index + ")").classed($COMMON.EXPANDED, !1);
27272 var shapeAtIndex = main.selectAll("." + $SHAPE.shape + "-" + index).classed($COMMON.EXPANDED, !0).style("cursor", isSelectable ? "pointer" : null).filter(function (d) {
27273 return $$.isWithinShape(this, d);
27274 });
27275 if (shapeAtIndex.empty() && !isTooltipGrouped) {
27276 $$.hideGridFocus == null ? void 0 : $$.hideGridFocus();
27277 $$.hideTooltip();
27278 isSelectionGrouped || $$.setExpand(index);
27279 }
27280 shapeAtIndex.call(function (selected) {
27281 var _this2 = this;
27282 _newArrowCheck(this, _this);
27283 var d = selected.data();
27284 if (isSelectionEnabled && (isSelectionGrouped || isSelectable != null && isSelectable.bind($$.api)(d))) {
27285 eventRect.style("cursor", "pointer");
27286 }
27287 if (!isTooltipGrouped) {
27288 $$.showTooltip(d, context);
27289 $$.showGridFocus == null ? void 0 : $$.showGridFocus(d);
27290 $$.unexpandCircles == null ? void 0 : $$.unexpandCircles();
27291 selected.each(function (d) {
27292 _newArrowCheck(this, _this2);
27293 return $$.setExpand(index, d.id);
27294 }.bind(this));
27295 }
27296 }.bind(this));
27297 },
27298 /**
27299 * Expand data shape/point
27300 * @param {number} index Index number
27301 * @param {string} id Data id
27302 * @param {boolean} reset Reset expand state
27303 * @private
27304 */
27305 setExpand: function setExpand(index, id, reset) {
27306 var $$ = this,
27307 config = $$.config,
27308 circle = $$.$el.circle;
27309 circle && config.point_focus_expand_enabled && $$.expandCircles(index, id, reset);
27310
27311 // bar, candlestick
27312 $$.expandBarTypeShapes(!0, index, id, reset);
27313 },
27314 /**
27315 * Expand/Unexpand bar type shapes
27316 * @param {boolean} expand Expand or unexpand
27317 * @param {number} i Shape index
27318 * @param {string} id Data id
27319 * @param {boolean} reset Reset expand style
27320 * @private
27321 */
27322 expandBarTypeShapes: function expandBarTypeShapes(expand, i, id, reset) {
27323 var _this3 = this;
27324 if (expand === void 0) {
27325 expand = !0;
27326 }
27327 var $$ = this;
27328 ["bar", "candlestick"].filter(function (v) {
27329 _newArrowCheck(this, _this3);
27330 return $$.$el[v];
27331 }.bind(this)).forEach(function (v) {
27332 _newArrowCheck(this, _this3);
27333 reset && $$.$el[v].classed($COMMON.EXPANDED, !1);
27334 $$.getShapeByIndex(v, i, id).classed($COMMON.EXPANDED, expand);
27335 }.bind(this));
27336 },
27337 /**
27338 * Handle data.onover/out callback options
27339 * @param {boolean} isOver Over or not
27340 * @param {number|object} d data object
27341 * @private
27342 */
27343 setOverOut: function setOverOut(isOver, d) {
27344 var _this5 = this,
27345 $$ = this,
27346 config = $$.config,
27347 hasRadar = $$.state.hasRadar,
27348 main = $$.$el.main,
27349 isArc = isObject(d);
27350 // Call event handler
27351 if (isArc || d !== -1) {
27352 var callback = config[isOver ? "data_onover" : "data_onout"].bind($$.api);
27353 config.color_onover && $$.setOverColor(isOver, d, isArc);
27354 if (isArc && "id") {
27355 callback(d, main.select("." + $ARC.arc + $$.getTargetSelectorSuffix(d.id)).node());
27356 } else if (!config.tooltip_grouped) {
27357 var last = $$.cache.get(KEY.setOverOut) || [],
27358 shapesAtIndex = main.selectAll("." + $SHAPE.shape + "-" + d).filter(function (d) {
27359 return $$.isWithinShape(this, d);
27360 }),
27361 shape = shapesAtIndex.filter(function () {
27362 var _this4 = this;
27363 return last.every(function (v) {
27364 _newArrowCheck(this, _this4);
27365 return v !== this;
27366 }.bind(this));
27367 }); // select based on the index
27368 // call onout callback
27369 if (!isOver || shapesAtIndex.empty() || last.length === shape.size() && shape.nodes().every(function (v, i) {
27370 _newArrowCheck(this, _this5);
27371 return v !== last[i];
27372 }.bind(this))) {
27373 while (last.length) {
27374 var target = last.pop();
27375 config.data_onout.bind($$.api)(src_select(target).datum(), target);
27376 }
27377 }
27378
27379 // call onover callback
27380 shape.each(function () {
27381 if (isOver) {
27382 callback(src_select(this).datum(), this);
27383 last.push(this);
27384 }
27385 });
27386 $$.cache.add(KEY.setOverOut, last);
27387 } else {
27388 if (isOver) {
27389 config.point_focus_only && hasRadar ? $$.showCircleFocus($$.getAllValuesOnIndex(d, !0)) : $$.setExpand(d, null, !0);
27390 }
27391 $$.isMultipleX() || main.selectAll("." + $SHAPE.shape + "-" + d).each(function (d) {
27392 callback(d, this);
27393 });
27394 }
27395 }
27396 },
27397 /**
27398 * Call data.onover/out callback for touch event
27399 * @param {number|object} d target index or data object for Arc type
27400 * @private
27401 */
27402 callOverOutForTouch: function callOverOutForTouch(d) {
27403 var $$ = this,
27404 last = $$.cache.get(KEY.callOverOutForTouch);
27405 if (isObject(d) && last ? d.id !== last.id : d !== last) {
27406 (last || isNumber(last)) && $$.setOverOut(!1, last);
27407 (d || isNumber(d)) && $$.setOverOut(!0, d);
27408 $$.cache.add(KEY.callOverOutForTouch, d);
27409 }
27410 },
27411 /**
27412 * Return draggable selection function
27413 * @returns {Function}
27414 * @private
27415 */
27416 getDraggableSelection: function getDraggableSelection() {
27417 var _this6 = this,
27418 $$ = this,
27419 config = $$.config,
27420 state = $$.state;
27421 return config.interaction_enabled && config.data_selection_draggable && $$.drag ? drag().on("drag", function (event) {
27422 state.event = event;
27423 $$.drag(getPointer(event, this));
27424 }).on("start", function (event) {
27425 state.event = event;
27426 $$.dragstart(getPointer(event, this));
27427 }).on("end", function (event) {
27428 _newArrowCheck(this, _this6);
27429 state.event = event;
27430 $$.dragend();
27431 }.bind(this)) : function () {
27432 _newArrowCheck(this, _this6);
27433 }.bind(this);
27434 },
27435 /**
27436 * Dispatch a mouse event.
27437 * @private
27438 * @param {string} type event type
27439 * @param {number} index Index of eventRect
27440 * @param {Array} mouse x and y coordinate value
27441 */
27442 dispatchEvent: function dispatchEvent(type, index, mouse) {
27443 var _this7 = this,
27444 $$ = this,
27445 config = $$.config,
27446 _$$$state = $$.state,
27447 eventReceiver = _$$$state.eventReceiver,
27448 hasAxis = _$$$state.hasAxis,
27449 hasRadar = _$$$state.hasRadar,
27450 _$$$$el = $$.$el,
27451 eventRect = _$$$$el.eventRect,
27452 arcs = _$$$$el.arcs,
27453 radar = _$$$$el.radar,
27454 isMultipleX = $$.isMultipleX(),
27455 element = (hasRadar ? radar.axes.select("." + $AXIS.axis + "-" + index + " text") : eventRect || arcs.selectAll("." + $COMMON.target + " path").filter(function (d, i) {
27456 _newArrowCheck(this, _this7);
27457 return i === index;
27458 }.bind(this))).node(),
27459 _element$getBoundingC = element.getBoundingClientRect(),
27460 width = _element$getBoundingC.width,
27461 left = _element$getBoundingC.left,
27462 top = _element$getBoundingC.top;
27463 if (hasAxis && !hasRadar && !isMultipleX) {
27464 var coords = eventReceiver.coords[index];
27465 width = coords.w;
27466 left += coords.x;
27467 top += coords.y;
27468 }
27469 var x = left + (mouse ? mouse[0] : 0) + (isMultipleX || config.axis_rotated ? 0 : width / 2),
27470 y = top + (mouse ? mouse[1] : 0);
27471 emulateEvent[/^(mouse|click)/.test(type) ? "mouse" : "touch"](element, type, {
27472 screenX: x,
27473 screenY: y,
27474 clientX: x,
27475 clientY: y
27476 });
27477 },
27478 setDragStatus: function setDragStatus(isDragging) {
27479 this.state.dragging = isDragging;
27480 },
27481 /**
27482 * Unbind zoom events
27483 * @private
27484 */
27485 unbindZoomEvent: function unbindZoomEvent() {
27486 var $$ = this,
27487 _$$$$el2 = $$.$el,
27488 eventRect = _$$$$el2.eventRect,
27489 zoomResetBtn = _$$$$el2.zoomResetBtn;
27490 eventRect == null ? void 0 : eventRect.on(".zoom wheel.zoom .drag", null);
27491 zoomResetBtn == null ? void 0 : zoomResetBtn.on("click", null).style("display", "none");
27492 },
27493 /**
27494 * Unbind all attached events
27495 * @private
27496 */
27497 unbindAllEvents: function unbindAllEvents() {
27498 var _this8 = this,
27499 $$ = this,
27500 _$$$$el3 = $$.$el,
27501 arcs = _$$$$el3.arcs,
27502 eventRect = _$$$$el3.eventRect,
27503 legend = _$$$$el3.legend,
27504 region = _$$$$el3.region,
27505 svg = _$$$$el3.svg,
27506 brush = $$.brush;
27507 // detach all possible event types
27508 [svg, eventRect, region == null ? void 0 : region.list, brush == null ? void 0 : brush.getSelection(), arcs == null ? void 0 : arcs.selectAll("path"), legend == null ? void 0 : legend.selectAll("g")].forEach(function (v) {
27509 _newArrowCheck(this, _this8);
27510 return v == null ? void 0 : v.on("wheel click mouseover mousemove mouseout touchstart touchmove touchend touchstart.eventRect touchmove.eventRect touchend.eventRect .brush .drag .zoom wheel.zoom dblclick.zoom", null);
27511 }.bind(this));
27512 $$.unbindZoomEvent == null ? void 0 : $$.unbindZoomEvent();
27513 }
27514});
27515;// CONCATENATED MODULE: ./src/ChartInternal/internals/class.ts
27516
27517/**
27518 * Copyright (c) 2017 ~ present NAVER Corp.
27519 * billboard.js project is licensed under the MIT license
27520 */
27521
27522/* harmony default export */ var internals_class = ({
27523 generateClass: function generateClass(prefix, targetId) {
27524 return " " + prefix + " " + (prefix + this.getTargetSelectorSuffix(targetId));
27525 },
27526 /**
27527 * Get class string
27528 * @param {string} type Shape type
27529 * @param {boolean} withShape Get with shape prefix
27530 * @returns {string} Class string
27531 * @private
27532 */
27533 getClass: function getClass(type, withShape) {
27534 var _this = this,
27535 isPlural = /s$/.test(type),
27536 useIdKey = /^(area|arc|line)s?$/.test(type),
27537 key = isPlural ? "id" : "index";
27538 return function (d) {
27539 _newArrowCheck(this, _this);
27540 var data = d.data || d,
27541 result = (withShape ? this.generateClass(classes[isPlural ? "shapes" : "shape"], data[key]) : "") + this.generateClass(classes[type], data[useIdKey ? "id" : key]);
27542 return result.trim();
27543 }.bind(this);
27544 },
27545 /**
27546 * Get chart class string
27547 * @param {string} type Shape type
27548 * @returns {string} Class string
27549 * @private
27550 */
27551 getChartClass: function getChartClass(type) {
27552 var _this2 = this;
27553 return function (d) {
27554 _newArrowCheck(this, _this2);
27555 return classes["chart" + type] + this.classTarget((d.data ? d.data : d).id);
27556 }.bind(this);
27557 },
27558 generateExtraLineClass: function generateExtraLineClass() {
27559 var $$ = this,
27560 classes = $$.config.line_classes || [],
27561 ids = [];
27562 return function (d) {
27563 var _d$data,
27564 id = d.id || ((_d$data = d.data) == null ? void 0 : _d$data.id) || d;
27565 if (ids.indexOf(id) < 0) {
27566 ids.push(id);
27567 }
27568 return classes[ids.indexOf(id) % classes.length];
27569 };
27570 },
27571 classRegion: function classRegion(d, i) {
27572 return this.generateClass(classes.region, i) + " " + ("class" in d ? d.class : "");
27573 },
27574 classTarget: function classTarget(id) {
27575 var additionalClassSuffix = this.config.data_classes[id],
27576 additionalClass = "";
27577 if (additionalClassSuffix) {
27578 additionalClass = " " + classes.target + "-" + additionalClassSuffix;
27579 }
27580 return this.generateClass(classes.target, id) + additionalClass;
27581 },
27582 classFocus: function classFocus(d) {
27583 return this.classFocused(d) + this.classDefocused(d);
27584 },
27585 classFocused: function classFocused(d) {
27586 return " " + (this.state.focusedTargetIds.indexOf(d.id) >= 0 ? classes.focused : "");
27587 },
27588 classDefocused: function classDefocused(d) {
27589 return " " + (this.state.defocusedTargetIds.indexOf(d.id) >= 0 ? classes.defocused : "");
27590 },
27591 getTargetSelectorSuffix: function getTargetSelectorSuffix(targetId) {
27592 var targetStr = targetId || targetId === 0 ? "-" + targetId : "";
27593 return targetStr.replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g, "-");
27594 },
27595 selectorTarget: function selectorTarget(id, prefix) {
27596 var pfx = prefix || "",
27597 target = this.getTargetSelectorSuffix(id);
27598 // select target & circle
27599 return pfx + "." + (classes.target + target) + ", " + pfx + "." + (classes.circles + target);
27600 },
27601 selectorTargets: function selectorTargets(idsValue, prefix) {
27602 var _this3 = this,
27603 ids = idsValue || [];
27604 return ids.length ? ids.map(function (id) {
27605 _newArrowCheck(this, _this3);
27606 return this.selectorTarget(id, prefix);
27607 }.bind(this)) : null;
27608 },
27609 selectorLegend: function selectorLegend(id) {
27610 return "." + (classes.legendItem + this.getTargetSelectorSuffix(id));
27611 },
27612 selectorLegends: function selectorLegends(ids) {
27613 var _this4 = this;
27614 return ids != null && ids.length ? ids.map(function (id) {
27615 _newArrowCheck(this, _this4);
27616 return this.selectorLegend(id);
27617 }.bind(this)) : null;
27618 }
27619});
27620;// CONCATENATED MODULE: ./src/ChartInternal/internals/category.ts
27621/**
27622 * Copyright (c) 2017 ~ present NAVER Corp.
27623 * billboard.js project is licensed under the MIT license
27624 */
27625/* harmony default export */ var category = ({
27626 /**
27627 * Category Name
27628 * @param {number} i Index number
27629 * @returns {string} category Name
27630 * @private
27631 */
27632 categoryName: function categoryName(i) {
27633 var categories = this.config.axis_x_categories;
27634 return i < (categories == null ? void 0 : categories.length) ? categories[i] : i;
27635 }
27636});
27637;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
27638function _assertThisInitialized(self) {
27639 if (self === void 0) {
27640 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
27641 }
27642 return self;
27643}
27644;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
27645function _setPrototypeOf(o, p) {
27646 _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
27647 o.__proto__ = p;
27648 return o;
27649 };
27650 return _setPrototypeOf(o, p);
27651}
27652;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
27653
27654function _inheritsLoose(subClass, superClass) {
27655 subClass.prototype = Object.create(superClass.prototype);
27656 subClass.prototype.constructor = subClass;
27657 _setPrototypeOf(subClass, superClass);
27658}
27659;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
27660function _getPrototypeOf(o) {
27661 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
27662 return o.__proto__ || Object.getPrototypeOf(o);
27663 };
27664 return _getPrototypeOf(o);
27665}
27666;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
27667function _isNativeFunction(fn) {
27668 return Function.toString.call(fn).indexOf("[native code]") !== -1;
27669}
27670;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
27671function _isNativeReflectConstruct() {
27672 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
27673 if (Reflect.construct.sham) return false;
27674 if (typeof Proxy === "function") return true;
27675 try {
27676 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
27677 return true;
27678 } catch (e) {
27679 return false;
27680 }
27681}
27682;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/construct.js
27683
27684
27685function _construct(Parent, args, Class) {
27686 if (_isNativeReflectConstruct()) {
27687 _construct = Reflect.construct.bind();
27688 } else {
27689 _construct = function _construct(Parent, args, Class) {
27690 var a = [null];
27691 a.push.apply(a, args);
27692 var Constructor = Function.bind.apply(Parent, a);
27693 var instance = new Constructor();
27694 if (Class) _setPrototypeOf(instance, Class.prototype);
27695 return instance;
27696 };
27697 }
27698 return _construct.apply(null, arguments);
27699}
27700;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
27701
27702
27703
27704
27705function _wrapNativeSuper(Class) {
27706 var _cache = typeof Map === "function" ? new Map() : undefined;
27707 _wrapNativeSuper = function _wrapNativeSuper(Class) {
27708 if (Class === null || !_isNativeFunction(Class)) return Class;
27709 if (typeof Class !== "function") {
27710 throw new TypeError("Super expression must either be null or a function");
27711 }
27712 if (typeof _cache !== "undefined") {
27713 if (_cache.has(Class)) return _cache.get(Class);
27714 _cache.set(Class, Wrapper);
27715 }
27716 function Wrapper() {
27717 return _construct(Class, arguments, _getPrototypeOf(this).constructor);
27718 }
27719 Wrapper.prototype = Object.create(Class.prototype, {
27720 constructor: {
27721 value: Wrapper,
27722 enumerable: false,
27723 writable: true,
27724 configurable: true
27725 }
27726 });
27727 return _setPrototypeOf(Wrapper, Class);
27728 };
27729 return _wrapNativeSuper(Class);
27730}
27731;// CONCATENATED MODULE: ./node_modules/internmap/src/index.js
27732
27733
27734
27735function src_createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = src_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: !0 }; return { done: !1, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
27736function src_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return src_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return src_arrayLikeToArray(o, minLen); }
27737function src_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
27738var InternMap = /*#__PURE__*/function (_Map) {
27739 _inheritsLoose(InternMap, _Map);
27740 function InternMap(entries, key) {
27741 var _this;
27742 if (key === void 0) {
27743 key = keyof;
27744 }
27745 _this = _Map.call(this) || this;
27746 Object.defineProperties(_assertThisInitialized(_this), {
27747 _intern: {
27748 value: new Map()
27749 },
27750 _key: {
27751 value: key
27752 }
27753 });
27754 if (entries != null) {
27755 for (var _iterator = src_createForOfIteratorHelperLoose(entries), _step; !(_step = _iterator()).done;) {
27756 var _step$value = _step.value,
27757 _key2 = _step$value[0],
27758 value = _step$value[1];
27759 _this.set(_key2, value);
27760 }
27761 }
27762 return _this;
27763 }
27764 var _proto = InternMap.prototype;
27765 _proto.get = function get(key) {
27766 return _Map.prototype.get.call(this, intern_get(this, key));
27767 };
27768 _proto.has = function has(key) {
27769 return _Map.prototype.has.call(this, intern_get(this, key));
27770 };
27771 _proto.set = function set(key, value) {
27772 return _Map.prototype.set.call(this, intern_set(this, key), value);
27773 };
27774 _proto.delete = function _delete(key) {
27775 return _Map.prototype.delete.call(this, intern_delete(this, key));
27776 };
27777 return InternMap;
27778}( /*#__PURE__*/_wrapNativeSuper(Map));
27779var InternSet = /*#__PURE__*/function (_Set) {
27780 _inheritsLoose(InternSet, _Set);
27781 function InternSet(values, key) {
27782 var _this2;
27783 if (key === void 0) {
27784 key = keyof;
27785 }
27786 _this2 = _Set.call(this) || this;
27787 Object.defineProperties(_assertThisInitialized(_this2), {
27788 _intern: {
27789 value: new Map()
27790 },
27791 _key: {
27792 value: key
27793 }
27794 });
27795 if (values != null) {
27796 for (var _iterator2 = src_createForOfIteratorHelperLoose(values), _step2, value; !(_step2 = _iterator2()).done;) {
27797 value = _step2.value;
27798 _this2.add(value);
27799 }
27800 }
27801 return _this2;
27802 }
27803 var _proto2 = InternSet.prototype;
27804 _proto2.has = function has(value) {
27805 return _Set.prototype.has.call(this, intern_get(this, value));
27806 };
27807 _proto2.add = function add(value) {
27808 return _Set.prototype.add.call(this, intern_set(this, value));
27809 };
27810 _proto2.delete = function _delete(value) {
27811 return _Set.prototype.delete.call(this, intern_delete(this, value));
27812 };
27813 return InternSet;
27814}( /*#__PURE__*/_wrapNativeSuper(Set));
27815function intern_get(_ref, value) {
27816 var _intern = _ref._intern,
27817 _key = _ref._key,
27818 key = _key(value);
27819 return _intern.has(key) ? _intern.get(key) : value;
27820}
27821function intern_set(_ref2, value) {
27822 var _intern = _ref2._intern,
27823 _key = _ref2._key,
27824 key = _key(value);
27825 if (_intern.has(key)) return _intern.get(key);
27826 _intern.set(key, value);
27827 return value;
27828}
27829function intern_delete(_ref3, value) {
27830 var _intern = _ref3._intern,
27831 _key = _ref3._key,
27832 key = _key(value);
27833 if (_intern.has(key)) {
27834 value = _intern.get(key);
27835 _intern.delete(key);
27836 }
27837 return value;
27838}
27839function keyof(value) {
27840 return value !== null && typeof value === "object" ? value.valueOf() : value;
27841}
27842;// CONCATENATED MODULE: ./node_modules/d3-scale/src/init.js
27843function initRange(domain, range) {
27844 switch (arguments.length) {
27845 case 0:
27846 break;
27847 case 1:
27848 this.range(domain);
27849 break;
27850 default:
27851 this.range(range).domain(domain);
27852 break;
27853 }
27854 return this;
27855}
27856function initInterpolator(domain, interpolator) {
27857 switch (arguments.length) {
27858 case 0:
27859 break;
27860 case 1:
27861 {
27862 if (typeof domain === "function") this.interpolator(domain);else this.range(domain);
27863 break;
27864 }
27865 default:
27866 {
27867 this.domain(domain);
27868 if (typeof interpolator === "function") this.interpolator(interpolator);else this.range(interpolator);
27869 break;
27870 }
27871 }
27872 return this;
27873}
27874;// CONCATENATED MODULE: ./node_modules/d3-scale/src/ordinal.js
27875function ordinal_createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = ordinal_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: !0 }; return { done: !1, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
27876function ordinal_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ordinal_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ordinal_arrayLikeToArray(o, minLen); }
27877function ordinal_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
27878
27879
27880var implicit = Symbol("implicit");
27881function ordinal() {
27882 var index = new InternMap(),
27883 domain = [],
27884 range = [],
27885 unknown = implicit;
27886 function scale(d) {
27887 var i = index.get(d);
27888 if (i === undefined) {
27889 if (unknown !== implicit) return unknown;
27890 index.set(d, i = domain.push(d) - 1);
27891 }
27892 return range[i % range.length];
27893 }
27894 scale.domain = function (_) {
27895 if (!arguments.length) return domain.slice();
27896 domain = [], index = new InternMap();
27897 for (var _iterator = ordinal_createForOfIteratorHelperLoose(_), _step; !(_step = _iterator()).done;) {
27898 var value = _step.value;
27899 if (index.has(value)) continue;
27900 index.set(value, domain.push(value) - 1);
27901 }
27902 return scale;
27903 };
27904 scale.range = function (_) {
27905 return arguments.length ? (range = Array.from(_), scale) : range.slice();
27906 };
27907 scale.unknown = function (_) {
27908 return arguments.length ? (unknown = _, scale) : unknown;
27909 };
27910 scale.copy = function () {
27911 return ordinal(domain, range).unknown(unknown);
27912 };
27913 initRange.apply(scale, arguments);
27914 return scale;
27915}
27916;// CONCATENATED MODULE: ./src/ChartInternal/internals/color.ts
27917
27918var color_this = undefined;
27919/**
27920 * Copyright (c) 2017 ~ present NAVER Corp.
27921 * billboard.js project is licensed under the MIT license
27922 */
27923
27924
27925
27926
27927
27928
27929/**
27930 * Set pattern's background color
27931 * (it adds a <rect> element to simulate bg-color)
27932 * @param {SVGPatternElement} pattern SVG pattern element
27933 * @param {string} color Color string
27934 * @param {string} id ID to be set
27935 * @returns {{id: string, node: SVGPatternElement}}
27936 * @private
27937 */
27938var colorizePattern = function (pattern, color, id) {
27939 _newArrowCheck(this, color_this);
27940 var node = src_select(pattern.cloneNode(!0));
27941 node.attr("id", id).insert("rect", ":first-child").attr("width", node.attr("width")).attr("height", node.attr("height")).style("fill", color);
27942 return {
27943 id: id,
27944 node: node.node()
27945 };
27946}.bind(undefined);
27947
27948/**
27949 * Get color pattern from CSS file
27950 * CSS should be defined as: background-image: url("#00c73c;#fa7171; ...");
27951 * @param {d3Selection} element Chart element
27952 * @returns {Array}
27953 * @private
27954 */
27955function getColorFromCss(element) {
27956 var _this2 = this,
27957 cacheKey = KEY.colorPattern,
27958 body = browser_doc.body,
27959 pattern = body[cacheKey];
27960 if (!pattern) {
27961 var content = element.classed($COLOR.colorPattern, !0).style("background-image");
27962 element.classed($COLOR.colorPattern, !1);
27963 if (content.indexOf(";") > -1) {
27964 pattern = content.replace(/url[^#]*|["'()]|(\s|%20)/g, "").split(";").map(function (v) {
27965 _newArrowCheck(this, _this2);
27966 return v.trim().replace(/[\"'\s]/g, "");
27967 }.bind(this)).filter(Boolean);
27968 body[cacheKey] = pattern;
27969 }
27970 }
27971 return pattern;
27972}
27973
27974// Replacement of d3.schemeCategory10.
27975// Contained differently depend on d3 version: v4(d3-scale), v5(d3-scale-chromatic)
27976var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"];
27977/* harmony default export */ var internals_color = ({
27978 generateColor: function generateColor() {
27979 var _this3 = this,
27980 $$ = this,
27981 $el = $$.$el,
27982 config = $$.config,
27983 colors = config.data_colors,
27984 callback = config.data_color,
27985 ids = [],
27986 pattern = notEmpty(config.color_pattern) ? config.color_pattern : ordinal(getColorFromCss($el.chart) || schemeCategory10).range(),
27987 originalColorPattern = pattern;
27988 if (isFunction(config.color_tiles)) {
27989 var tiles = config.color_tiles.bind($$.api)(),
27990 colorizedPatterns = pattern.map(function (p, index) {
27991 _newArrowCheck(this, _this3);
27992 var color = p.replace(/[#\(\)\s,]/g, ""),
27993 id = $$.state.datetimeId + "-pattern-" + color + "-" + index;
27994 return colorizePattern(tiles[index % tiles.length], p, id);
27995 }.bind(this)); // Add background color to patterns
27996 pattern = colorizedPatterns.map(function (p) {
27997 _newArrowCheck(this, _this3);
27998 return "url(#" + p.id + ")";
27999 }.bind(this));
28000 $$.patterns = colorizedPatterns;
28001 }
28002 return function (d) {
28003 var _data,
28004 id = d.id || ((_data = d.data) == null ? void 0 : _data.id) || d,
28005 isLine = $$.isTypeOf(id, ["line", "spline", "step"]) || !config.data_types[id],
28006 color;
28007 // if callback function is provided
28008 if (isFunction(colors[id])) {
28009 color = colors[id].bind($$.api)(d);
28010
28011 // if specified, choose that color
28012 } else if (colors[id]) {
28013 color = colors[id];
28014
28015 // if not specified, choose from pattern
28016 } else {
28017 if (ids.indexOf(id) < 0) {
28018 ids.push(id);
28019 }
28020 color = isLine ? originalColorPattern[ids.indexOf(id) % originalColorPattern.length] : pattern[ids.indexOf(id) % pattern.length];
28021 colors[id] = color;
28022 }
28023 return isFunction(callback) ? callback.bind($$.api)(color, d) : color;
28024 };
28025 },
28026 generateLevelColor: function generateLevelColor() {
28027 var $$ = this,
28028 config = $$.config,
28029 colors = config.color_pattern,
28030 threshold = config.color_threshold,
28031 asValue = threshold.unit === "value",
28032 max = threshold.max || 100,
28033 values = threshold.values && threshold.values.length ? threshold.values : [];
28034 return notEmpty(threshold) ? function (value) {
28035 var v = asValue ? value : value * 100 / max,
28036 color = colors[colors.length - 1];
28037 for (var i = 0, l = values.length; i < l; i++) {
28038 if (v <= values[i]) {
28039 color = colors[i];
28040 break;
28041 }
28042 }
28043 return color;
28044 } : null;
28045 },
28046 /**
28047 * Append data backgound color filter definition
28048 * @param {string} color Color string
28049 * @private
28050 */
28051 generateDataLabelBackgroundColorFilter: function generateDataLabelBackgroundColorFilter(color) {
28052 var _this4 = this,
28053 $$ = this,
28054 $el = $$.$el,
28055 config = $$.config,
28056 state = $$.state,
28057 backgroundColors = color || config.data_labels_backgroundColors;
28058 if (backgroundColors) {
28059 var ids = [];
28060 if (isString(backgroundColors)) {
28061 ids.push("");
28062 } else if (isObject(backgroundColors)) {
28063 ids = Object.keys(backgroundColors);
28064 }
28065 ids.forEach(function (v) {
28066 _newArrowCheck(this, _this4);
28067 var id = state.datetimeId + "-labels-bg" + $$.getTargetSelectorSuffix(v) + (color ? $$.getTargetSelectorSuffix(color) : "");
28068 $el.defs.append("filter").attr("x", "0").attr("y", "0").attr("width", "1").attr("height", "1").attr("id", id).html("<feFlood flood-color=\"" + (v === "" ? backgroundColors : backgroundColors[v]) + "\" /><feComposite in=\"SourceGraphic\"/>");
28069 }.bind(this));
28070 }
28071 },
28072 /**
28073 * Get data gradient color url
28074 * @param {string} id Data id
28075 * @returns {string}
28076 * @private
28077 */
28078 getGradienColortUrl: function getGradienColortUrl(id) {
28079 return "url(#" + this.state.datetimeId + "-gradient" + this.getTargetSelectorSuffix(id) + ")";
28080 },
28081 /**
28082 * Update linear gradient definition (for area & bar only)
28083 * @private
28084 */
28085 updateLinearGradient: function updateLinearGradient() {
28086 var _this5 = this,
28087 $$ = this,
28088 config = $$.config,
28089 targets = $$.data.targets,
28090 datetimeId = $$.state.datetimeId,
28091 defs = $$.$el.defs;
28092 targets.forEach(function (d) {
28093 var _this6 = this;
28094 _newArrowCheck(this, _this5);
28095 var id = datetimeId + "-gradient" + $$.getTargetSelectorSuffix(d.id),
28096 supportedType = $$.isAreaType(d) && "area" || $$.isBarType(d) && "bar",
28097 isRotated = config.axis_rotated;
28098 if (supportedType && defs.select("#" + id).empty()) {
28099 var color = $$.color(d),
28100 _config = config[supportedType + "_linearGradient"],
28101 _config$x = _config.x,
28102 x = _config$x === void 0 ? isRotated ? [1, 0] : [0, 0] : _config$x,
28103 _config$y = _config.y,
28104 y = _config$y === void 0 ? isRotated ? [0, 0] : [0, 1] : _config$y,
28105 _config$stops = _config.stops,
28106 stops = _config$stops === void 0 ? [[0, color, 1], [1, color, 0]] : _config$stops,
28107 linearGradient = defs.append("linearGradient").attr("id", "" + id).attr("x1", x[0]).attr("x2", x[1]).attr("y1", y[0]).attr("y2", y[1]);
28108 stops.forEach(function (v) {
28109 _newArrowCheck(this, _this6);
28110 var stopColor = isFunction(v[1]) ? v[1].bind($$.api)(d.id) : v[1];
28111 linearGradient.append("stop").attr("offset", v[0]).attr("stop-color", stopColor || color).attr("stop-opacity", v[2]);
28112 }.bind(this));
28113 }
28114 }.bind(this));
28115 },
28116 /**
28117 * Set the data over color.
28118 * When is out, will restate in its previous color value
28119 * @param {boolean} isOver true: set overed color, false: restore
28120 * @param {number|object} d target index or data object for Arc type
28121 * @private
28122 */
28123 setOverColor: function setOverColor(isOver, d) {
28124 var _this7 = this,
28125 $$ = this,
28126 config = $$.config,
28127 main = $$.$el.main,
28128 onover = config.color_onover,
28129 color = isOver ? onover : $$.color;
28130 if (isObject(color)) {
28131 color = function (_ref) {
28132 var id = _ref.id;
28133 _newArrowCheck(this, _this7);
28134 return id in onover ? onover[id] : $$.color(id);
28135 }.bind(this);
28136 } else if (isString(color)) {
28137 color = function () {
28138 _newArrowCheck(this, _this7);
28139 return onover;
28140 }.bind(this);
28141 } else if (isFunction(onover)) {
28142 color = color.bind($$.api);
28143 }
28144 main.selectAll(isObject(d) ? // when is Arc type
28145 "." + $ARC.arc + $$.getTargetSelectorSuffix(d.id) : "." + $SHAPE.shape + "-" + d).style("fill", color);
28146 }
28147});
28148;// CONCATENATED MODULE: ./src/ChartInternal/internals/domain.ts
28149
28150/**
28151 * Copyright (c) 2017 ~ present NAVER Corp.
28152 * billboard.js project is licensed under the MIT license
28153 */
28154
28155
28156/* harmony default export */ var domain = ({
28157 getYDomainMinMax: function getYDomainMinMax(targets, type) {
28158 var _this = this,
28159 $$ = this,
28160 axis = $$.axis,
28161 config = $$.config,
28162 isMin = type === "min",
28163 dataGroups = config.data_groups,
28164 ids = $$.mapToIds(targets),
28165 ys = $$.getValuesAsIdKeyed(targets);
28166 if (dataGroups.length > 0) {
28167 var hasValue = $$["has" + (isMin ? "Negative" : "Positive") + "ValueInTargets"](targets);
28168 dataGroups.forEach(function (groupIds) {
28169 var _this2 = this;
28170 _newArrowCheck(this, _this);
28171 // Determine baseId
28172 var idsInGroup = groupIds.filter(function (v) {
28173 _newArrowCheck(this, _this2);
28174 return ids.indexOf(v) >= 0;
28175 }.bind(this));
28176 if (idsInGroup.length) {
28177 var baseId = idsInGroup[0],
28178 baseAxisId = axis.getId(baseId);
28179 // Initialize base value. Set to 0 if not match with the condition
28180 if (hasValue && ys[baseId]) {
28181 ys[baseId] = ys[baseId].map(function (v) {
28182 _newArrowCheck(this, _this2);
28183 return (isMin ? v < 0 : v > 0) ? v : 0;
28184 }.bind(this));
28185 }
28186 idsInGroup.filter(function (v, i) {
28187 _newArrowCheck(this, _this2);
28188 return i > 0;
28189 }.bind(this)).forEach(function (id) {
28190 var _this3 = this;
28191 _newArrowCheck(this, _this2);
28192 if (ys[id]) {
28193 var axisId = axis.getId(id);
28194 ys[id].forEach(function (v, i) {
28195 _newArrowCheck(this, _this3);
28196 var val = +v,
28197 meetCondition = isMin ? val > 0 : val < 0;
28198 if (axisId === baseAxisId && !(hasValue && meetCondition)) {
28199 ys[baseId][i] += val;
28200 }
28201 }.bind(this));
28202 }
28203 }.bind(this));
28204 }
28205 }.bind(this));
28206 }
28207 return getMinMax(type, Object.keys(ys).map(function (key) {
28208 _newArrowCheck(this, _this);
28209 return getMinMax(type, ys[key]);
28210 }.bind(this)));
28211 },
28212 /**
28213 * Check if hidden targets bound to the given axis id
28214 * @param {string} id ID to be checked
28215 * @returns {boolean}
28216 * @private
28217 */
28218 isHiddenTargetWithYDomain: function isHiddenTargetWithYDomain(id) {
28219 var _this4 = this,
28220 $$ = this;
28221 return $$.state.hiddenTargetIds.some(function (v) {
28222 _newArrowCheck(this, _this4);
28223 return $$.axis.getId(v) === id;
28224 }.bind(this));
28225 },
28226 getYDomain: function getYDomain(targets, axisId, xDomain) {
28227 var _this5 = this,
28228 $$ = this,
28229 axis = $$.axis,
28230 config = $$.config,
28231 scale = $$.scale,
28232 pfx = "axis_" + axisId;
28233 if ($$.isStackNormalized()) {
28234 return [0, 100];
28235 }
28236 var isLog = (scale == null ? void 0 : scale[axisId]) && scale[axisId].type === "log",
28237 targetsByAxisId = targets.filter(function (t) {
28238 _newArrowCheck(this, _this5);
28239 return axis.getId(t.id) === axisId;
28240 }.bind(this)),
28241 yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId;
28242 if (yTargets.length === 0) {
28243 // use domain of the other axis if target of axisId is none
28244 if ($$.isHiddenTargetWithYDomain(axisId)) {
28245 return scale[axisId].domain();
28246 } else {
28247 return axisId === "y2" ? scale.y.domain() :
28248 // When all data bounds to y2, y Axis domain is called prior y2.
28249 // So, it needs to call to get y2 domain here
28250 $$.getYDomain(targets, "y2", xDomain);
28251 }
28252 }
28253 var yMin = config[pfx + "_min"],
28254 yMax = config[pfx + "_max"],
28255 center = config[pfx + "_center"],
28256 isInverted = config[pfx + "_inverted"],
28257 showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated,
28258 showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated,
28259 yDomainMin = $$.getYDomainMinMax(yTargets, "min"),
28260 yDomainMax = $$.getYDomainMinMax(yTargets, "max"),
28261 isZeroBased = [TYPE.BAR, TYPE.BUBBLE, TYPE.SCATTER].concat(TYPE_BY_CATEGORY.Line).some(function (v) {
28262 _newArrowCheck(this, _this5);
28263 var type = v.indexOf("area") > -1 ? "area" : v;
28264 return $$.hasType(v, yTargets, !0) && config[type + "_zerobased"];
28265 }.bind(this));
28266 // MEMO: avoid inverting domain unexpectedly
28267 yDomainMin = isValue(yMin) ? yMin : isValue(yMax) ? yDomainMin < yMax ? yDomainMin : yMax - 10 : yDomainMin;
28268 yDomainMax = isValue(yMax) ? yMax : isValue(yMin) ? yMin < yDomainMax ? yDomainMax : yMin + 10 : yDomainMax;
28269 if (isNaN(yDomainMin)) {
28270 // set minimum to zero when not number
28271 yDomainMin = 0;
28272 }
28273 if (isNaN(yDomainMax)) {
28274 // set maximum to have same value as yDomainMin
28275 yDomainMax = yDomainMin;
28276 }
28277 if (yDomainMin === yDomainMax) {
28278 yDomainMin < 0 ? yDomainMax = 0 : yDomainMin = 0;
28279 }
28280 var isAllPositive = yDomainMin >= 0 && yDomainMax >= 0,
28281 isAllNegative = yDomainMin <= 0 && yDomainMax <= 0;
28282 // Cancel zerobased if axis_*_min / axis_*_max specified
28283 if (isValue(yMin) && isAllPositive || isValue(yMax) && isAllNegative) {
28284 isZeroBased = !1;
28285 }
28286
28287 // Bar/Area chart should be 0-based if all positive|negative
28288 if (isZeroBased) {
28289 isAllPositive && (yDomainMin = 0);
28290 isAllNegative && (yDomainMax = 0);
28291 }
28292 var domainLength = Math.abs(yDomainMax - yDomainMin),
28293 padding = {
28294 top: domainLength * .1,
28295 bottom: domainLength * .1
28296 };
28297 if (isDefined(center)) {
28298 var yDomainAbs = Math.max(Math.abs(yDomainMin), Math.abs(yDomainMax));
28299 yDomainMax = center + yDomainAbs;
28300 yDomainMin = center - yDomainAbs;
28301 }
28302
28303 // add padding for data label
28304 if (showHorizontalDataLabel) {
28305 var diff = diffDomain(scale.y.range()),
28306 ratio = $$.getDataLabelLength(yDomainMin, yDomainMax, "width").map(function (v) {
28307 _newArrowCheck(this, _this5);
28308 return v / diff;
28309 }.bind(this));
28310 ["bottom", "top"].forEach(function (v, i) {
28311 _newArrowCheck(this, _this5);
28312 padding[v] += domainLength * (ratio[i] / (1 - ratio[0] - ratio[1]));
28313 }.bind(this));
28314 } else if (showVerticalDataLabel) {
28315 var lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, "height");
28316 ["bottom", "top"].forEach(function (v, i) {
28317 _newArrowCheck(this, _this5);
28318 padding[v] += $$.convertPixelToScale("y", lengths[i], domainLength);
28319 }.bind(this));
28320 }
28321 padding = $$.getResettedPadding(padding);
28322
28323 // if padding is set, the domain will be updated relative the current domain value
28324 // ex) $$.height=300, padding.top=150, domainLength=4 --> domain=6
28325 var p = config[pfx + "_padding"];
28326 if (notEmpty(p)) {
28327 ["bottom", "top"].forEach(function (v) {
28328 _newArrowCheck(this, _this5);
28329 padding[v] = axis.getPadding(p, v, padding[v], domainLength);
28330 }.bind(this));
28331 }
28332
28333 // Bar/Area chart should be 0-based if all positive|negative
28334 if (isZeroBased) {
28335 isAllPositive && (padding.bottom = yDomainMin);
28336 isAllNegative && (padding.top = -yDomainMax);
28337 }
28338 var domain = isLog ? [yDomainMin, yDomainMax].map(function (v) {
28339 _newArrowCheck(this, _this5);
28340 return v < 0 ? 0 : v;
28341 }.bind(this)) : [yDomainMin - padding.bottom, yDomainMax + padding.top];
28342 return isInverted ? domain.reverse() : domain;
28343 },
28344 getXDomainMinMax: function getXDomainMinMax(targets, type) {
28345 var _this6 = this,
28346 $$ = this,
28347 configValue = $$.config["axis_x_" + type],
28348 dataValue = getMinMax(type, targets.map(function (t) {
28349 var _this7 = this;
28350 _newArrowCheck(this, _this6);
28351 return getMinMax(type, t.values.map(function (v) {
28352 _newArrowCheck(this, _this7);
28353 return v.x;
28354 }.bind(this)));
28355 }.bind(this))),
28356 value = isObject(configValue) ? configValue.value : configValue,
28357 _$$$axis;
28358 value = isDefined(value) && (_$$$axis = $$.axis) != null && _$$$axis.isTimeSeries() ? parseDate.bind(this)(value) : value;
28359 if (isObject(configValue) && configValue.fit && (type === "min" && value < dataValue || type === "max" && value > dataValue)) {
28360 value = undefined;
28361 }
28362 return isDefined(value) ? value : dataValue;
28363 },
28364 /**
28365 * Get x Axis padding
28366 * @param {Array} domain x Axis domain
28367 * @param {number} tickCount Tick count
28368 * @returns {object} Padding object values with 'left' & 'right' key
28369 * @private
28370 */
28371 getXDomainPadding: function getXDomainPadding(domain, tickCount) {
28372 var $$ = this,
28373 axis = $$.axis,
28374 config = $$.config,
28375 padding = config.axis_x_padding,
28376 isTimeSeriesTickCount = axis.isTimeSeries() && tickCount,
28377 diff = diffDomain(domain),
28378 defaultValue;
28379 // determine default padding value
28380 if (axis.isCategorized() || isTimeSeriesTickCount) {
28381 defaultValue = 0;
28382 } else if ($$.hasType("bar")) {
28383 var maxDataCount = $$.getMaxDataCount();
28384 defaultValue = maxDataCount > 1 ? diff / (maxDataCount - 1) / 2 : .5;
28385 } else {
28386 defaultValue = $$.getResettedPadding(diff * .01);
28387 }
28388 var _ref = isNumber(padding) ? {
28389 left: padding,
28390 right: padding
28391 } : padding,
28392 _ref$left = _ref.left,
28393 left = _ref$left === void 0 ? defaultValue : _ref$left,
28394 _ref$right = _ref.right,
28395 right = _ref$right === void 0 ? defaultValue : _ref$right;
28396
28397 // when the unit is pixel, convert pixels to axis scale value
28398 if (padding.unit === "px") {
28399 var domainLength = Math.abs(diff + diff * .2);
28400 left = axis.getPadding(padding, "left", defaultValue, domainLength);
28401 right = axis.getPadding(padding, "right", defaultValue, domainLength);
28402 } else {
28403 var range = diff + left + right;
28404 if (isTimeSeriesTickCount && range) {
28405 var relativeTickWidth = diff / tickCount / range;
28406 left = left / range / relativeTickWidth;
28407 right = right / range / relativeTickWidth;
28408 }
28409 }
28410 return {
28411 left: left,
28412 right: right
28413 };
28414 },
28415 /**
28416 * Get x Axis domain
28417 * @param {Array} targets targets
28418 * @returns {Array} x Axis domain
28419 * @private
28420 */
28421 getXDomain: function getXDomain(targets) {
28422 var $$ = this,
28423 axis = $$.axis,
28424 x = $$.scale.x,
28425 domain = [$$.getXDomainMinMax(targets, "min"), $$.getXDomainMinMax(targets, "max")],
28426 _domain = domain,
28427 _domain$ = _domain[0],
28428 min = _domain$ === void 0 ? 0 : _domain$,
28429 _domain$2 = _domain[1],
28430 max = _domain$2 === void 0 ? 0 : _domain$2;
28431 if (x.type !== "log") {
28432 var isCategorized = axis.isCategorized(),
28433 isTimeSeries = axis.isTimeSeries(),
28434 _padding = $$.getXDomainPadding(domain),
28435 firstX = domain[0],
28436 lastX = domain[1];
28437 // show center of x domain if min and max are the same
28438 if (firstX - lastX === 0 && !isCategorized) {
28439 if (isTimeSeries) {
28440 firstX = new Date(firstX.getTime() * .5);
28441 lastX = new Date(lastX.getTime() * 1.5);
28442 } else {
28443 firstX = firstX === 0 ? 1 : firstX * .5;
28444 lastX = lastX === 0 ? -1 : lastX * 1.5;
28445 }
28446 }
28447 if (firstX || firstX === 0) {
28448 min = isTimeSeries ? new Date(firstX.getTime() - _padding.left) : firstX - _padding.left;
28449 }
28450 if (lastX || lastX === 0) {
28451 max = isTimeSeries ? new Date(lastX.getTime() + _padding.right) : lastX + _padding.right;
28452 }
28453 }
28454 return [min, max];
28455 },
28456 updateXDomain: function updateXDomain(targets, withUpdateXDomain, withUpdateOrgXDomain, withTrim, domain) {
28457 var $$ = this,
28458 config = $$.config,
28459 org = $$.org,
28460 _$$$scale = $$.scale,
28461 x = _$$$scale.x,
28462 subX = _$$$scale.subX,
28463 zoomEnabled = config.zoom_enabled;
28464 if (withUpdateOrgXDomain) {
28465 var _$$$brush;
28466 x.domain(domain || sortValue($$.getXDomain(targets)));
28467 org.xDomain = x.domain();
28468 zoomEnabled && $$.zoom.updateScaleExtent();
28469 subX.domain(x.domain());
28470 (_$$$brush = $$.brush) == null ? void 0 : _$$$brush.scale(subX);
28471 }
28472 if (withUpdateXDomain) {
28473 var domainValue = domain || !$$.brush || brushEmpty($$) ? org.xDomain : getBrushSelection($$).map(subX.invert);
28474 x.domain(domainValue);
28475 zoomEnabled && $$.zoom.updateScaleExtent();
28476 }
28477
28478 // Trim domain when too big by zoom mousemove event
28479 withTrim && x.domain($$.trimXDomain(x.orgDomain()));
28480 return x.domain();
28481 },
28482 trimXDomain: function trimXDomain(domain) {
28483 var zoomDomain = this.getZoomDomain(),
28484 min = zoomDomain[0],
28485 max = zoomDomain[1];
28486 if (domain[0] <= min) {
28487 domain[1] = +domain[1] + (min - domain[0]);
28488 domain[0] = min;
28489 }
28490 if (max <= domain[1]) {
28491 domain[0] = +domain[0] - (domain[1] - max);
28492 domain[1] = max;
28493 }
28494 return domain;
28495 },
28496 /**
28497 * Get zoom domain
28498 * @returns {Array} zoom domain
28499 * @private
28500 */
28501 getZoomDomain: function getZoomDomain() {
28502 var $$ = this,
28503 config = $$.config,
28504 org = $$.org,
28505 _org$xDomain = org.xDomain,
28506 min = _org$xDomain[0],
28507 max = _org$xDomain[1];
28508 if (isDefined(config.zoom_x_min)) {
28509 min = getMinMax("min", [min, config.zoom_x_min]);
28510 }
28511 if (isDefined(config.zoom_x_max)) {
28512 max = getMinMax("max", [max, config.zoom_x_max]);
28513 }
28514 return [min, max];
28515 },
28516 /**
28517 * Converts pixels to axis' scale values
28518 * @param {string} type Axis type
28519 * @param {number} pixels Pixels
28520 * @param {number} domainLength Domain length
28521 * @returns {number}
28522 * @private
28523 */
28524 convertPixelToScale: function convertPixelToScale(type, pixels, domainLength) {
28525 var $$ = this,
28526 config = $$.config,
28527 state = $$.state,
28528 isRotated = config.axis_rotated,
28529 length;
28530 if (type === "x") {
28531 length = isRotated ? "height" : "width";
28532 } else {
28533 length = isRotated ? "width" : "height";
28534 }
28535 return domainLength * (pixels / state[length]);
28536 }
28537});
28538;// CONCATENATED MODULE: ./src/ChartInternal/internals/format.ts
28539
28540/**
28541 * Copyright (c) 2017 ~ present NAVER Corp.
28542 * billboard.js project is licensed under the MIT license
28543 */
28544
28545/**
28546 * Get formatted
28547 * @param {object} $$ Context
28548 * @param {string} typeValue Axis type
28549 * @param {number} v Value to be formatted
28550 * @returns {number | string}
28551 * @private
28552 */
28553function getFormat($$, typeValue, v) {
28554 var config = $$.config,
28555 type = "axis_" + typeValue + "_tick_format",
28556 format = config[type] ? config[type] : $$.defaultValueFormat;
28557 return format(v);
28558}
28559/* harmony default export */ var format = ({
28560 yFormat: function yFormat(v) {
28561 return getFormat(this, "y", v);
28562 },
28563 y2Format: function y2Format(v) {
28564 return getFormat(this, "y2", v);
28565 },
28566 /**
28567 * Get default value format function
28568 * @returns {Function} formatter function
28569 * @private
28570 */
28571 getDefaultValueFormat: function getDefaultValueFormat() {
28572 var $$ = this,
28573 defaultArcValueFormat = $$.defaultArcValueFormat,
28574 yFormat = $$.yFormat,
28575 y2Format = $$.y2Format,
28576 hasArc = $$.hasArcType(null, ["gauge", "polar", "radar"]);
28577 return function (v, ratio, id) {
28578 var format = hasArc ? defaultArcValueFormat : $$.axis && $$.axis.getId(id) === "y2" ? y2Format : yFormat;
28579 return format.call($$, v, ratio);
28580 };
28581 },
28582 defaultValueFormat: function defaultValueFormat(v) {
28583 return isValue(v) ? +v : "";
28584 },
28585 defaultArcValueFormat: function defaultArcValueFormat(v, ratio) {
28586 return (ratio * 100).toFixed(1) + "%";
28587 },
28588 defaultPolarValueFormat: function defaultPolarValueFormat(v) {
28589 return "" + v;
28590 },
28591 dataLabelFormat: function dataLabelFormat(targetId) {
28592 var _this = this,
28593 $$ = this,
28594 dataLabels = $$.config.data_labels,
28595 defaultFormat = function (v) {
28596 _newArrowCheck(this, _this);
28597 return isValue(v) ? +v : "";
28598 }.bind(this),
28599 format = defaultFormat;
28600 // find format according to axis id
28601 if (isFunction(dataLabels.format)) {
28602 format = dataLabels.format;
28603 } else if (isObjectType(dataLabels.format)) {
28604 if (dataLabels.format[targetId]) {
28605 format = dataLabels.format[targetId] === !0 ? defaultFormat : dataLabels.format[targetId];
28606 } else {
28607 format = function () {
28608 _newArrowCheck(this, _this);
28609 return "";
28610 }.bind(this);
28611 }
28612 }
28613 return format.bind($$.api);
28614 }
28615});
28616;// CONCATENATED MODULE: ./src/ChartInternal/internals/legend.ts
28617
28618/**
28619 * Copyright (c) 2017 ~ present NAVER Corp.
28620 * billboard.js project is licensed under the MIT license
28621 */
28622
28623
28624
28625
28626
28627
28628/**
28629 * Get color string for given data id
28630 * @param {string} id Data id
28631 * @returns {string} Color string
28632 * @private
28633 */
28634function getLegendColor(id) {
28635 var $$ = this,
28636 data = $$.getDataById(id),
28637 color = $$.levelColor ? $$.levelColor(data.values[0].value) : $$.color(data);
28638 return color;
28639}
28640/* harmony default export */ var internals_legend = ({
28641 /**
28642 * Initialize the legend.
28643 * @private
28644 */
28645 initLegend: function initLegend() {
28646 var $$ = this,
28647 config = $$.config,
28648 $el = $$.$el;
28649 $$.legendItemTextBox = {};
28650 $$.state.legendHasRendered = !1;
28651 if (config.legend_show) {
28652 if (!config.legend_contents_bindto) {
28653 $el.legend = $$.$el.svg.append("g").classed($LEGEND.legend, !0).attr("transform", $$.getTranslate("legend"));
28654 }
28655
28656 // MEMO: call here to update legend box and translate for all
28657 // MEMO: translate will be updated by this, so transform not needed in updateLegend()
28658 $$.updateLegend();
28659 } else {
28660 $$.state.hiddenLegendIds = $$.mapToIds($$.data.targets);
28661 }
28662 },
28663 /**
28664 * Update legend element
28665 * @param {Array} targetIds ID's of target
28666 * @param {object} options withTransform : Whether to use the transform property / withTransitionForTransform: Whether transition is used when using the transform property / withTransition : whether or not to transition.
28667 * @param {object} transitions Return value of the generateTransitions
28668 * @private
28669 */
28670 updateLegend: function updateLegend(targetIds, options, transitions) {
28671 var $$ = this,
28672 config = $$.config,
28673 state = $$.state,
28674 scale = $$.scale,
28675 $el = $$.$el,
28676 optionz = options || {
28677 withTransform: !1,
28678 withTransitionForTransform: !1,
28679 withTransition: !1
28680 };
28681 optionz.withTransition = getOption(optionz, "withTransition", !0);
28682 optionz.withTransitionForTransform = getOption(optionz, "withTransitionForTransform", !0);
28683 if (config.legend_contents_bindto && config.legend_contents_template) {
28684 $$.updateLegendTemplate();
28685 } else {
28686 $$.updateLegendElement(targetIds || $$.mapToIds($$.data.targets), optionz, transitions);
28687 }
28688
28689 // toggle legend state
28690 $el.legend.selectAll("." + $LEGEND.legendItem).classed($LEGEND.legendItemHidden, function (id) {
28691 var hide = !$$.isTargetToShow(id);
28692 if (hide) {
28693 this.style.opacity = null;
28694 }
28695 return hide;
28696 });
28697
28698 // Update size and scale
28699 $$.updateScales(!1, !scale.zoom);
28700 $$.updateSvgSize();
28701
28702 // Update g positions
28703 $$.transformAll(optionz.withTransitionForTransform, transitions);
28704 state.legendHasRendered = !0;
28705 },
28706 /**
28707 * Update legend using template option
28708 * @private
28709 */
28710 updateLegendTemplate: function updateLegendTemplate() {
28711 var _this = this,
28712 $$ = this,
28713 config = $$.config,
28714 $el = $$.$el,
28715 wrapper = src_select(config.legend_contents_bindto),
28716 template = config.legend_contents_template;
28717 if (!wrapper.empty()) {
28718 var targets = $$.mapToIds($$.data.targets),
28719 ids = [],
28720 html = "";
28721 targets.forEach(function (v) {
28722 _newArrowCheck(this, _this);
28723 var content = isFunction(template) ? template.bind($$.api)(v, $$.color(v), $$.api.data(v)[0].values) : tplProcess(template, {
28724 COLOR: $$.color(v),
28725 TITLE: v
28726 });
28727 if (content) {
28728 ids.push(v);
28729 html += content;
28730 }
28731 }.bind(this));
28732 var legendItem = wrapper.html(html).selectAll(function () {
28733 return this.childNodes;
28734 }).data(ids);
28735 $$.setLegendItem(legendItem);
28736 $el.legend = wrapper;
28737 }
28738 },
28739 /**
28740 * Update the size of the legend.
28741 * @param {Obejct} size Size object
28742 * @private
28743 */
28744 updateSizeForLegend: function updateSizeForLegend(size) {
28745 var $$ = this,
28746 config = $$.config,
28747 _$$$state = $$.state,
28748 isLegendTop = _$$$state.isLegendTop,
28749 isLegendLeft = _$$$state.isLegendLeft,
28750 isLegendRight = _$$$state.isLegendRight,
28751 isLegendInset = _$$$state.isLegendInset,
28752 current = _$$$state.current,
28753 width = size.width,
28754 height = size.height,
28755 insetLegendPosition = {
28756 top: isLegendTop ? $$.getCurrentPaddingTop() + config.legend_inset_y + 5.5 : current.height - height - $$.getCurrentPaddingBottom() - config.legend_inset_y,
28757 left: isLegendLeft ? $$.getCurrentPaddingLeft() + config.legend_inset_x + .5 : current.width - width - $$.getCurrentPaddingRight() - config.legend_inset_x + .5
28758 };
28759 $$.state.margin3 = {
28760 top: isLegendRight ? 0 : isLegendInset ? insetLegendPosition.top : current.height - height,
28761 right: NaN,
28762 bottom: 0,
28763 left: isLegendRight ? current.width - width : isLegendInset ? insetLegendPosition.left : 0
28764 };
28765 },
28766 /**
28767 * Transform Legend
28768 * @param {boolean} withTransition whether or not to transition.
28769 * @private
28770 */
28771 transformLegend: function transformLegend(withTransition) {
28772 var $$ = this,
28773 legend = $$.$el.legend,
28774 $T = $$.$T;
28775 $T(legend, withTransition).attr("transform", $$.getTranslate("legend"));
28776 },
28777 /**
28778 * Update the legend step
28779 * @param {number} step Step value
28780 * @private
28781 */
28782 updateLegendStep: function updateLegendStep(step) {
28783 this.state.legendStep = step;
28784 },
28785 /**
28786 * Update legend item width
28787 * @param {number} width Width value
28788 * @private
28789 */
28790 updateLegendItemWidth: function updateLegendItemWidth(width) {
28791 this.state.legendItemWidth = width;
28792 },
28793 /**
28794 * Update legend item height
28795 * @param {number} height Height value
28796 * @private
28797 */
28798 updateLegendItemHeight: function updateLegendItemHeight(height) {
28799 this.state.legendItemHeight = height;
28800 },
28801 /**
28802 * Update legend item color
28803 * @param {string} id Corresponding data ID value
28804 * @param {string} color Color value
28805 * @private
28806 */
28807 updateLegendItemColor: function updateLegendItemColor(id, color) {
28808 var legend = this.$el.legend;
28809 if (legend) {
28810 legend.select("." + $LEGEND.legendItem + "-" + id + " line").style("stroke", color);
28811 }
28812 },
28813 /**
28814 * Get the width of the legend
28815 * @returns {number} width
28816 * @private
28817 */
28818 getLegendWidth: function getLegendWidth() {
28819 var $$ = this,
28820 _$$$state2 = $$.state,
28821 width = _$$$state2.current.width,
28822 isLegendRight = _$$$state2.isLegendRight,
28823 isLegendInset = _$$$state2.isLegendInset,
28824 legendItemWidth = _$$$state2.legendItemWidth,
28825 legendStep = _$$$state2.legendStep;
28826 return $$.config.legend_show ? isLegendRight || isLegendInset ? legendItemWidth * (legendStep + 1) : width : 0;
28827 },
28828 /**
28829 * Get the height of the legend
28830 * @returns {number} height
28831 * @private
28832 */
28833 getLegendHeight: function getLegendHeight() {
28834 var $$ = this,
28835 _$$$state3 = $$.state,
28836 current = _$$$state3.current,
28837 isLegendRight = _$$$state3.isLegendRight,
28838 legendItemHeight = _$$$state3.legendItemHeight,
28839 legendStep = _$$$state3.legendStep;
28840 return $$.config.legend_show ? isLegendRight ? current.height : Math.max(20, legendItemHeight) * (legendStep + 1) : 0;
28841 },
28842 /**
28843 * Get the opacity of the legend that is unfocused
28844 * @param {d3.selection} legendItem Legend item node
28845 * @returns {string|null} opacity
28846 * @private
28847 */
28848 opacityForUnfocusedLegend: function opacityForUnfocusedLegend(legendItem) {
28849 return legendItem.classed($LEGEND.legendItemHidden) ? null : "0.3";
28850 },
28851 /**
28852 * Toggles the focus of the legend
28853 * @param {Array} targetIds ID's of target
28854 * @param {boolean} focus whether or not to focus.
28855 * @private
28856 */
28857 toggleFocusLegend: function toggleFocusLegend(targetIds, focus) {
28858 var _this2 = this,
28859 $$ = this,
28860 legend = $$.$el.legend,
28861 $T = $$.$T,
28862 targetIdz = $$.mapToTargetIds(targetIds);
28863 legend && $T(legend.selectAll("." + $LEGEND.legendItem).filter(function (id) {
28864 _newArrowCheck(this, _this2);
28865 return targetIdz.indexOf(id) >= 0;
28866 }.bind(this)).classed($FOCUS.legendItemFocused, focus)).style("opacity", function () {
28867 return focus ? null : $$.opacityForUnfocusedLegend.call($$, src_select(this));
28868 });
28869 },
28870 /**
28871 * Revert the legend to its default state
28872 * @private
28873 */
28874 revertLegend: function revertLegend() {
28875 var $$ = this,
28876 legend = $$.$el.legend,
28877 $T = $$.$T;
28878 legend && $T(legend.selectAll("." + $LEGEND.legendItem).classed($FOCUS.legendItemFocused, !1)).style("opacity", null);
28879 },
28880 /**
28881 * Shows the legend
28882 * @param {Array} targetIds ID's of target
28883 * @private
28884 */
28885 showLegend: function showLegend(targetIds) {
28886 var $$ = this,
28887 config = $$.config,
28888 $el = $$.$el,
28889 $T = $$.$T;
28890 if (!config.legend_show) {
28891 config.legend_show = !0;
28892 $el.legend ? $el.legend.style("visibility", null) : $$.initLegend();
28893 $$.state.legendHasRendered || $$.updateLegend();
28894 }
28895 $$.removeHiddenLegendIds(targetIds);
28896 $T($el.legend.selectAll($$.selectorLegends(targetIds)).style("visibility", null)).style("opacity", null);
28897 },
28898 /**
28899 * Hide the legend
28900 * @param {Array} targetIds ID's of target
28901 * @private
28902 */
28903 hideLegend: function hideLegend(targetIds) {
28904 var $$ = this,
28905 config = $$.config,
28906 legend = $$.$el.legend;
28907 if (config.legend_show && isEmpty(targetIds)) {
28908 config.legend_show = !1;
28909 legend.style("visibility", "hidden");
28910 }
28911 $$.addHiddenLegendIds(targetIds);
28912 legend.selectAll($$.selectorLegends(targetIds)).style("opacity", "0").style("visibility", "hidden");
28913 },
28914 /**
28915 * Get legend item textbox dimension
28916 * @param {string} id Data ID
28917 * @param {HTMLElement|d3.selection} textElement Text node element
28918 * @returns {object} Bounding rect
28919 * @private
28920 */
28921 getLegendItemTextBox: function getLegendItemTextBox(id, textElement) {
28922 var $$ = this,
28923 cache = $$.cache,
28924 state = $$.state,
28925 data,
28926 cacheKey = KEY.legendItemTextBox;
28927 if (id) {
28928 data = !state.redrawing && cache.get(cacheKey) || {};
28929 if (!data[id]) {
28930 data[id] = $$.getTextRect(textElement, $LEGEND.legendItem);
28931 cache.add(cacheKey, data);
28932 }
28933 data = data[id];
28934 }
28935 return data;
28936 },
28937 /**
28938 * Set legend item style & bind events
28939 * @param {d3.selection} item Item node
28940 * @private
28941 */
28942 setLegendItem: function setLegendItem(item) {
28943 var _this3 = this,
28944 $$ = this,
28945 $el = $$.$el,
28946 api = $$.api,
28947 config = $$.config,
28948 state = $$.state,
28949 isTouch = state.inputType === "touch",
28950 hasGauge = $$.hasType("gauge"),
28951 useCssRule = config.boost_useCssRule;
28952 item.attr("class", function (id) {
28953 var node = src_select(this),
28954 itemClass = !node.empty() && node.attr("class") || "";
28955 return itemClass + $$.generateClass($LEGEND.legendItem, id);
28956 }).style("visibility", function (id) {
28957 _newArrowCheck(this, _this3);
28958 return $$.isLegendToShow(id) ? null : "hidden";
28959 }.bind(this));
28960 if (config.interaction_enabled) {
28961 if (useCssRule) {
28962 [["." + $LEGEND.legendItem, "cursor:pointer"], ["." + $LEGEND.legendItem + " text", "pointer-events:none"], ["." + $LEGEND.legendItemPoint + " text", "pointer-events:none"], ["." + $LEGEND.legendItemTile, "pointer-events:none"], ["." + $LEGEND.legendItemEvent, "fill-opacity:0"]].forEach(function (v) {
28963 _newArrowCheck(this, _this3);
28964 var selector = v[0],
28965 props = v[1];
28966 $$.setCssRule(!1, selector, [props])($el.legend);
28967 }.bind(this));
28968 }
28969 item.style("cursor", $$.getStylePropValue("pointer")).on("click", function (event, id) {
28970 if (!callFn(config.legend_item_onclick, api, id)) {
28971 if (event.altKey) {
28972 api.hide();
28973 api.show(id);
28974 } else {
28975 api.toggle(id);
28976 src_select(this).classed($FOCUS.legendItemFocused, !1);
28977 }
28978 }
28979 isTouch && $$.hideTooltip();
28980 });
28981 isTouch || item.on("mouseout", function (event, id) {
28982 if (!callFn(config.legend_item_onout, api, id)) {
28983 src_select(this).classed($FOCUS.legendItemFocused, !1);
28984 if (hasGauge) {
28985 $$.undoMarkOverlapped($$, "." + $GAUGE.gaugeValue);
28986 }
28987 $$.api.revert();
28988 }
28989 }).on("mouseover", function (event, id) {
28990 if (!callFn(config.legend_item_onover, api, id)) {
28991 src_select(this).classed($FOCUS.legendItemFocused, !0);
28992 if (hasGauge) {
28993 $$.markOverlapped(id, $$, "." + $GAUGE.gaugeValue);
28994 }
28995 if (!state.transiting && $$.isTargetToShow(id)) {
28996 api.focus(id);
28997 }
28998 }
28999 });
29000 }
29001 },
29002 /**
29003 * Update the legend
29004 * @param {Array} targetIds ID's of target
29005 * @param {object} options withTransform : Whether to use the transform property / withTransitionForTransform: Whether transition is used when using the transform property / withTransition : whether or not to transition.
29006 * @private
29007 */
29008 updateLegendElement: function updateLegendElement(targetIds, options) {
29009 var _this4 = this,
29010 $$ = this,
29011 config = $$.config,
29012 state = $$.state,
29013 legend = $$.$el.legend,
29014 $T = $$.$T,
29015 legendType = config.legend_item_tile_type,
29016 isRectangle = legendType !== "circle",
29017 legendItemR = config.legend_item_tile_r,
29018 itemTileSize = {
29019 width: isRectangle ? config.legend_item_tile_width : legendItemR * 2,
29020 height: isRectangle ? config.legend_item_tile_height : legendItemR * 2
29021 },
29022 dimension = {
29023 padding: {
29024 top: 4,
29025 right: 10
29026 },
29027 max: {
29028 width: 0,
29029 height: 0
29030 },
29031 posMin: 10,
29032 step: 0,
29033 tileWidth: itemTileSize.width + 5,
29034 totalLength: 0
29035 },
29036 sizes = {
29037 offsets: {},
29038 widths: {},
29039 heights: {},
29040 margins: [0],
29041 steps: {}
29042 },
29043 xForLegend,
29044 yForLegend,
29045 background,
29046 targetIdz = targetIds.filter(function (id) {
29047 _newArrowCheck(this, _this4);
29048 return !isDefined(config.data_names[id]) || config.data_names[id] !== null;
29049 }.bind(this)),
29050 withTransition = options.withTransition,
29051 updatePositions = $$.getUpdateLegendPositions(targetIdz, dimension, sizes);
29052 if (state.isLegendInset) {
29053 dimension.step = config.legend_inset_step ? config.legend_inset_step : targetIdz.length;
29054 $$.updateLegendStep(dimension.step);
29055 }
29056 if (state.isLegendRight) {
29057 xForLegend = function (id) {
29058 _newArrowCheck(this, _this4);
29059 return dimension.max.width * sizes.steps[id];
29060 }.bind(this);
29061 yForLegend = function (id) {
29062 _newArrowCheck(this, _this4);
29063 return sizes.margins[sizes.steps[id]] + sizes.offsets[id];
29064 }.bind(this);
29065 } else if (state.isLegendInset) {
29066 xForLegend = function (id) {
29067 _newArrowCheck(this, _this4);
29068 return dimension.max.width * sizes.steps[id] + 10;
29069 }.bind(this);
29070 yForLegend = function (id) {
29071 _newArrowCheck(this, _this4);
29072 return sizes.margins[sizes.steps[id]] + sizes.offsets[id];
29073 }.bind(this);
29074 } else {
29075 xForLegend = function (id) {
29076 _newArrowCheck(this, _this4);
29077 return sizes.margins[sizes.steps[id]] + sizes.offsets[id];
29078 }.bind(this);
29079 yForLegend = function (id) {
29080 _newArrowCheck(this, _this4);
29081 return dimension.max.height * sizes.steps[id];
29082 }.bind(this);
29083 }
29084 var posFn = {
29085 xText: function xText(id, i) {
29086 _newArrowCheck(this, _this4);
29087 return xForLegend(id, i) + 4 + itemTileSize.width;
29088 }.bind(this),
29089 xRect: function xRect(id, i) {
29090 _newArrowCheck(this, _this4);
29091 return xForLegend(id, i);
29092 }.bind(this),
29093 x1Tile: function x1Tile(id, i) {
29094 _newArrowCheck(this, _this4);
29095 return xForLegend(id, i) - 2;
29096 }.bind(this),
29097 x2Tile: function x2Tile(id, i) {
29098 _newArrowCheck(this, _this4);
29099 return xForLegend(id, i) - 2 + itemTileSize.width;
29100 }.bind(this),
29101 yText: function yText(id, i) {
29102 _newArrowCheck(this, _this4);
29103 return yForLegend(id, i) + 9;
29104 }.bind(this),
29105 yRect: function yRect(id, i) {
29106 _newArrowCheck(this, _this4);
29107 return yForLegend(id, i) - 5;
29108 }.bind(this),
29109 yTile: function yTile(id, i) {
29110 _newArrowCheck(this, _this4);
29111 return yForLegend(id, i) + 4;
29112 }.bind(this)
29113 };
29114 $$.generateLegendItem(targetIdz, itemTileSize, updatePositions, posFn);
29115
29116 // Set background for inset legend
29117 background = legend.select("." + $LEGEND.legendBackground + " rect");
29118 if (state.isLegendInset && dimension.max.width > 0 && background.size() === 0) {
29119 background = legend.insert("g", "." + $LEGEND.legendItem).attr("class", $LEGEND.legendBackground).append("rect");
29120 }
29121 var texts = legend.selectAll("text").data(targetIdz).text(function (id) {
29122 _newArrowCheck(this, _this4);
29123 return isDefined(config.data_names[id]) ? config.data_names[id] : id;
29124 }.bind(this)) // MEMO: needed for update
29125 .each(function (id, i) {
29126 updatePositions(this, id, i);
29127 });
29128 $T(texts, withTransition).attr("x", posFn.xText).attr("y", posFn.yText);
29129 var rects = legend.selectAll("rect." + $LEGEND.legendItemEvent).data(targetIdz);
29130 $T(rects, withTransition).attr("width", function (id) {
29131 _newArrowCheck(this, _this4);
29132 return sizes.widths[id];
29133 }.bind(this)).attr("height", function (id) {
29134 _newArrowCheck(this, _this4);
29135 return sizes.heights[id];
29136 }.bind(this)).attr("x", posFn.xRect).attr("y", posFn.yRect);
29137
29138 // update legend items position
29139 $$.updateLegendItemPos(targetIdz, withTransition, posFn);
29140 if (background) {
29141 $T(background, withTransition).attr("height", $$.getLegendHeight() - 12).attr("width", dimension.max.width * (dimension.step + 1) + 10);
29142 }
29143
29144 // Update all to reflect change of legend
29145 $$.updateLegendItemWidth(dimension.max.width);
29146 $$.updateLegendItemHeight(dimension.max.height);
29147 $$.updateLegendStep(dimension.step);
29148 },
29149 /**
29150 * Get position update function
29151 * @param {Array} targetIdz Data ids
29152 * @param {object} dimension Dimension object
29153 * @param {object} sizes Size object
29154 * @returns {Function} Update position function
29155 * @private
29156 */
29157 getUpdateLegendPositions: function getUpdateLegendPositions(targetIdz, dimension, sizes) {
29158 var $$ = this,
29159 config = $$.config,
29160 state = $$.state,
29161 isLegendRightOrInset = state.isLegendRight || state.isLegendInset;
29162 return function (textElement, id, index) {
29163 var _this5 = this,
29164 isLast = index === targetIdz.length - 1,
29165 box = $$.getLegendItemTextBox(id, textElement),
29166 itemWidth = box.width + dimension.tileWidth + (isLast && !isLegendRightOrInset ? 0 : dimension.padding.right) + config.legend_padding,
29167 itemHeight = box.height + dimension.padding.top,
29168 itemLength = isLegendRightOrInset ? itemHeight : itemWidth,
29169 areaLength = isLegendRightOrInset ? $$.getLegendHeight() : $$.getLegendWidth(),
29170 margin,
29171 updateValues = function (id2, withoutStep) {
29172 if (!withoutStep) {
29173 margin = (areaLength - dimension.totalLength - itemLength) / 2;
29174 if (margin < dimension.posMin) {
29175 margin = (areaLength - itemLength) / 2;
29176 dimension.totalLength = 0;
29177 dimension.step++;
29178 }
29179 }
29180 sizes.steps[id2] = dimension.step;
29181 sizes.margins[dimension.step] = state.isLegendInset ? 10 : margin;
29182 sizes.offsets[id2] = dimension.totalLength;
29183 dimension.totalLength += itemLength;
29184 };
29185 if (index === 0) {
29186 dimension.totalLength = 0;
29187 dimension.step = 0;
29188 dimension.max.width = 0;
29189 dimension.max.height = 0;
29190 }
29191 if (config.legend_show && !$$.isLegendToShow(id)) {
29192 sizes.widths[id] = 0;
29193 sizes.heights[id] = 0;
29194 sizes.steps[id] = 0;
29195 sizes.offsets[id] = 0;
29196 return;
29197 }
29198 sizes.widths[id] = itemWidth;
29199 sizes.heights[id] = itemHeight;
29200 if (!dimension.max.width || itemWidth >= dimension.max.width) {
29201 dimension.max.width = itemWidth;
29202 }
29203 if (!dimension.max.height || itemHeight >= dimension.max.height) {
29204 dimension.max.height = itemHeight;
29205 }
29206 var maxLength = isLegendRightOrInset ? dimension.max.height : dimension.max.width;
29207 if (config.legend_equally) {
29208 Object.keys(sizes.widths).forEach(function (id2) {
29209 _newArrowCheck(this, _this5);
29210 return sizes.widths[id2] = dimension.max.width;
29211 }.bind(this));
29212 Object.keys(sizes.heights).forEach(function (id2) {
29213 _newArrowCheck(this, _this5);
29214 return sizes.heights[id2] = dimension.max.height;
29215 }.bind(this));
29216 margin = (areaLength - maxLength * targetIdz.length) / 2;
29217 if (margin < dimension.posMin) {
29218 dimension.totalLength = 0;
29219 dimension.step = 0;
29220 targetIdz.forEach(function (id2) {
29221 _newArrowCheck(this, _this5);
29222 return updateValues(id2);
29223 }.bind(this));
29224 } else {
29225 updateValues(id, !0);
29226 }
29227 } else {
29228 updateValues(id);
29229 }
29230 };
29231 },
29232 /**
29233 * Generate legend item elements
29234 * @param {Array} targetIdz Data ids
29235 * @param {object} itemTileSize Item tile size {width, height}
29236 * @param {Function} updatePositions Update position function
29237 * @param {object} posFn Position functions
29238 * @private
29239 */
29240 generateLegendItem: function generateLegendItem(targetIdz, itemTileSize, updatePositions, posFn) {
29241 var _this6 = this,
29242 $$ = this,
29243 config = $$.config,
29244 state = $$.state,
29245 legend = $$.$el.legend,
29246 usePoint = config.legend_usePoint,
29247 legendItemR = config.legend_item_tile_r,
29248 legendType = config.legend_item_tile_type,
29249 isRectangle = legendType !== "circle",
29250 isLegendRightOrInset = state.isLegendRight || state.isLegendInset,
29251 l = legend.selectAll("." + $LEGEND.legendItem).data(targetIdz).enter().append("g");
29252 $$.setLegendItem(l);
29253 l.append("text").text(function (id) {
29254 _newArrowCheck(this, _this6);
29255 return isDefined(config.data_names[id]) ? config.data_names[id] : id;
29256 }.bind(this)).each(function (id, i) {
29257 updatePositions(this, id, i);
29258 }).style("pointer-events", $$.getStylePropValue("none")).attr("x", isLegendRightOrInset ? posFn.xText : -200).attr("y", isLegendRightOrInset ? -200 : posFn.yText);
29259 l.append("rect").attr("class", $LEGEND.legendItemEvent).style("fill-opacity", $$.getStylePropValue("0")).attr("x", isLegendRightOrInset ? posFn.xRect : -200).attr("y", isLegendRightOrInset ? -200 : posFn.yRect);
29260 if (usePoint) {
29261 var _ids = [];
29262 l.append(function (d) {
29263 _newArrowCheck(this, _this6);
29264 var pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];
29265 _ids.indexOf(d) === -1 && _ids.push(d);
29266 var point = pattern[_ids.indexOf(d) % pattern.length];
29267 if (point === "rectangle") {
29268 point = "rect";
29269 }
29270 return browser_doc.createElementNS(namespaces.svg, "hasValidPointType" in $$ && $$.hasValidPointType(point) ? point : "use");
29271 }.bind(this)).attr("class", $LEGEND.legendItemPoint).style("fill", getLegendColor.bind($$)).style("pointer-events", $$.getStylePropValue("none")).attr("href", function (data, idx, selection) {
29272 _newArrowCheck(this, _this6);
29273 var node = selection[idx],
29274 nodeName = node.nodeName.toLowerCase(),
29275 id = $$.getTargetSelectorSuffix(data);
29276 return nodeName === "use" ? "#" + state.datetimeId + "-point" + id : undefined;
29277 }.bind(this));
29278 } else {
29279 l.append(isRectangle ? "line" : legendType).attr("class", $LEGEND.legendItemTile).style("stroke", getLegendColor.bind($$)).style("pointer-events", $$.getStylePropValue("none")).call(function (selection) {
29280 _newArrowCheck(this, _this6);
29281 if (legendType === "circle") {
29282 selection.attr("r", legendItemR).style("fill", getLegendColor.bind($$)).attr("cx", isLegendRightOrInset ? posFn.x2Tile : -200).attr("cy", isLegendRightOrInset ? -200 : posFn.yTile);
29283 } else if (isRectangle) {
29284 selection.attr("stroke-width", itemTileSize.height).attr("x1", isLegendRightOrInset ? posFn.x1Tile : -200).attr("y1", isLegendRightOrInset ? -200 : posFn.yTile).attr("x2", isLegendRightOrInset ? posFn.x2Tile : -200).attr("y2", isLegendRightOrInset ? -200 : posFn.yTile);
29285 }
29286 }.bind(this));
29287 }
29288 },
29289 /**
29290 * Update legend item position
29291 * @param {Array} targetIdz Data ids
29292 * @param {boolean} withTransition Whether or not to apply transition
29293 * @param {object} posFn Position functions
29294 * @private
29295 */
29296 updateLegendItemPos: function updateLegendItemPos(targetIdz, withTransition, posFn) {
29297 var _this8 = this,
29298 $$ = this,
29299 config = $$.config,
29300 legend = $$.$el.legend,
29301 $T = $$.$T,
29302 usePoint = config.legend_usePoint,
29303 legendType = config.legend_item_tile_type;
29304 if (usePoint) {
29305 var tiles = legend.selectAll("." + $LEGEND.legendItemPoint).data(targetIdz);
29306 $T(tiles, withTransition).each(function () {
29307 var _this7 = this,
29308 nodeName = this.nodeName.toLowerCase(),
29309 pointR = config.point_r,
29310 x = "x",
29311 y = "y",
29312 xOffset = 2,
29313 yOffset = 2.5,
29314 radius = null,
29315 width = null,
29316 height = null;
29317 if (nodeName === "circle") {
29318 var size = pointR * .2;
29319 x = "cx";
29320 y = "cy";
29321 radius = pointR + size;
29322 xOffset = pointR * 2;
29323 yOffset = -size;
29324 } else if (nodeName === "rect") {
29325 var _size = pointR * 2.5;
29326 width = _size;
29327 height = _size;
29328 yOffset = 3;
29329 }
29330 src_select(this).attr(x, function (d) {
29331 _newArrowCheck(this, _this7);
29332 return posFn.x1Tile(d) + xOffset;
29333 }.bind(this)).attr(y, function (d) {
29334 _newArrowCheck(this, _this7);
29335 return posFn.yTile(d) - yOffset;
29336 }.bind(this)).attr("r", radius).attr("width", width).attr("height", height);
29337 });
29338 } else {
29339 var _tiles = legend.selectAll("." + $LEGEND.legendItemTile).data(targetIdz);
29340 $T(_tiles, withTransition).style("stroke", getLegendColor.bind($$)).call(function (selection) {
29341 var _this9 = this;
29342 _newArrowCheck(this, _this8);
29343 if (legendType === "circle") {
29344 selection.attr("cx", function (d) {
29345 _newArrowCheck(this, _this9);
29346 var x2 = posFn.x2Tile(d);
29347 return x2 - (x2 - posFn.x1Tile(d)) / 2;
29348 }.bind(this)).attr("cy", posFn.yTile);
29349 } else if (legendType !== "circle") {
29350 selection.attr("x1", posFn.x1Tile).attr("y1", posFn.yTile).attr("x2", posFn.x2Tile).attr("y2", posFn.yTile);
29351 }
29352 }.bind(this));
29353 }
29354 }
29355});
29356;// CONCATENATED MODULE: ./src/ChartInternal/internals/redraw.ts
29357
29358/**
29359 * Copyright (c) 2017 ~ present NAVER Corp.
29360 * billboard.js project is licensed under the MIT license
29361 */
29362
29363
29364
29365
29366/* harmony default export */ var redraw = ({
29367 redraw: function redraw(options) {
29368 var _$$$axis,
29369 _this = this;
29370 if (options === void 0) {
29371 options = {};
29372 }
29373 var $$ = this,
29374 config = $$.config,
29375 state = $$.state,
29376 $el = $$.$el,
29377 main = $el.main;
29378 state.redrawing = !0;
29379 var targetsToShow = $$.filterTargetsToShow($$.data.targets),
29380 _options = options,
29381 flow = _options.flow,
29382 initializing = _options.initializing,
29383 wth = $$.getWithOption(options),
29384 duration = wth.Transition ? config.transition_duration : 0,
29385 durationForExit = wth.TransitionForExit ? duration : 0,
29386 durationForAxis = wth.TransitionForAxis ? duration : 0,
29387 transitions = (_$$$axis = $$.axis) == null ? void 0 : _$$$axis.generateTransitions(durationForAxis);
29388 $$.updateSizes(initializing);
29389
29390 // update legend and transform each g
29391 if (wth.Legend && config.legend_show) {
29392 options.withTransition = !!duration;
29393 $$.updateLegend($$.mapToIds($$.data.targets), options, transitions);
29394 } else if (wth.Dimension) {
29395 // need to update dimension (e.g. axis.y.tick.values) because y tick values should change
29396 // no need to update axis in it because they will be updated in redraw()
29397 $$.updateDimension(!0);
29398 }
29399
29400 // update circleY based on updated parameters
29401 if (!$$.hasArcType() || state.hasRadar) {
29402 $$.updateCircleY && ($$.circleY = $$.updateCircleY());
29403 }
29404
29405 // update axis
29406 if (state.hasAxis) {
29407 // @TODO: Make 'init' state to be accessible everywhere not passing as argument.
29408 $$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
29409
29410 // Data empty label positioning and text.
29411 config.data_empty_label_text && main.select("text." + $TEXT.text + "." + $COMMON.empty).attr("x", state.width / 2).attr("y", state.height / 2).text(config.data_empty_label_text).style("display", targetsToShow.length ? "none" : null);
29412
29413 // grid
29414 $$.hasGrid() && $$.updateGrid();
29415
29416 // rect for regions
29417 config.regions.length && $$.updateRegion();
29418 ["bar", "candlestick", "line", "area"].forEach(function (v) {
29419 _newArrowCheck(this, _this);
29420 var name = capitalize(v);
29421 if (/^(line|area)$/.test(v) && $$.hasTypeOf(name) || $$.hasType(v)) {
29422 $$["update" + name](wth.TransitionForExit);
29423 }
29424 }.bind(this));
29425
29426 // circles for select
29427 $el.text && main.selectAll("." + $SELECT.selectedCircles).filter($$.isBarType.bind($$)).selectAll("circle").remove();
29428
29429 // event rects will redrawn when flow called
29430 if (config.interaction_enabled && !flow && wth.EventRect) {
29431 $$.redrawEventRect();
29432 $$.bindZoomEvent == null ? void 0 : $$.bindZoomEvent();
29433 }
29434 } else {
29435 // arc
29436 $el.arcs && $$.redrawArc(duration, durationForExit, wth.Transform);
29437
29438 // radar
29439 $el.radar && $$.redrawRadar();
29440
29441 // polar
29442 $el.polar && $$.redrawPolar();
29443 }
29444
29445 // @TODO: Axis & Radar type
29446 if (!state.resizing && ($$.hasPointType() || state.hasRadar)) {
29447 $$.updateCircle();
29448 }
29449
29450 // text
29451 $$.hasDataLabel() && !$$.hasArcType(null, ["radar"]) && $$.updateText();
29452
29453 // title
29454 $$.redrawTitle == null ? void 0 : $$.redrawTitle();
29455 initializing && $$.updateTypesElements();
29456 $$.generateRedrawList(targetsToShow, flow, duration, wth.Subchart);
29457 $$.callPluginHook("$redraw", options, duration);
29458 },
29459 /**
29460 * Generate redraw list
29461 * @param {object} targets targets data to be shown
29462 * @param {object} flow flow object
29463 * @param {number} duration duration value
29464 * @param {boolean} withSubchart whether or not to show subchart
29465 * @private
29466 */
29467 generateRedrawList: function generateRedrawList(targets, flow, duration, withSubchart) {
29468 var _this2 = this,
29469 $$ = this,
29470 config = $$.config,
29471 state = $$.state,
29472 shape = $$.getDrawShape();
29473 if (state.hasAxis) {
29474 // subchart
29475 config.subchart_show && $$.redrawSubchart(withSubchart, duration, shape);
29476 }
29477
29478 // generate flow
29479 var flowFn = flow && $$.generateFlow({
29480 targets: targets,
29481 flow: flow,
29482 duration: flow.duration,
29483 shape: shape,
29484 xv: $$.xv.bind($$)
29485 }),
29486 withTransition = (duration || flowFn) && isTabVisible(),
29487 redrawList = $$.getRedrawList(shape, flow, flowFn, withTransition),
29488 afterRedraw = function () {
29489 _newArrowCheck(this, _this2);
29490 flowFn && flowFn();
29491 state.redrawing = !1;
29492 callFn(config.onrendered, $$.api);
29493 }.bind(this);
29494 if (afterRedraw) {
29495 // Only use transition when current tab is visible.
29496 if (withTransition && redrawList.length) {
29497 // Wait for end of transitions for callback
29498 var waitForDraw = generateWait();
29499
29500 // transition should be derived from one transition
29501 transition_transition().duration(duration).each(function () {
29502 var _this3 = this;
29503 _newArrowCheck(this, _this2);
29504 redrawList.reduce(function (acc, t1) {
29505 _newArrowCheck(this, _this3);
29506 return acc.concat(t1);
29507 }.bind(this), []).forEach(function (t) {
29508 _newArrowCheck(this, _this3);
29509 return waitForDraw.add(t);
29510 }.bind(this));
29511 }.bind(this)).call(waitForDraw, afterRedraw);
29512 } else if (!state.transiting) {
29513 afterRedraw();
29514 }
29515 }
29516
29517 // update fadein condition
29518 $$.mapToIds($$.data.targets).forEach(function (id) {
29519 _newArrowCheck(this, _this2);
29520 state.withoutFadeIn[id] = !0;
29521 }.bind(this));
29522 },
29523 getRedrawList: function getRedrawList(shape, flow, flowFn, withTransition) {
29524 var _this4 = this,
29525 $$ = this,
29526 config = $$.config,
29527 _$$$state = $$.state,
29528 hasAxis = _$$$state.hasAxis,
29529 hasRadar = _$$$state.hasRadar,
29530 grid = $$.$el.grid,
29531 _shape$pos = shape.pos,
29532 cx = _shape$pos.cx,
29533 cy = _shape$pos.cy,
29534 xForText = _shape$pos.xForText,
29535 yForText = _shape$pos.yForText,
29536 list = [];
29537 if (hasAxis) {
29538 if (config.grid_x_lines.length || config.grid_y_lines.length) {
29539 list.push($$.redrawGrid(withTransition));
29540 }
29541 if (config.regions.length) {
29542 list.push($$.redrawRegion(withTransition));
29543 }
29544 Object.keys(shape.type).forEach(function (v) {
29545 _newArrowCheck(this, _this4);
29546 var name = capitalize(v),
29547 drawFn = shape.type[v];
29548 if (/^(area|line)$/.test(v) && $$.hasTypeOf(name) || $$.hasType(v)) {
29549 list.push($$["redraw" + name](drawFn, withTransition));
29550 }
29551 }.bind(this));
29552 !flow && grid.main && list.push($$.updateGridFocus());
29553 }
29554 if (!$$.hasArcType() || hasRadar) {
29555 notEmpty(config.data_labels) && config.data_labels !== !1 && list.push($$.redrawText(xForText, yForText, flow, withTransition));
29556 }
29557 if (($$.hasPointType() || hasRadar) && !config.point_focus_only) {
29558 $$.redrawCircle && list.push($$.redrawCircle(cx, cy, withTransition, flowFn));
29559 }
29560 return list;
29561 },
29562 updateAndRedraw: function updateAndRedraw(options) {
29563 if (options === void 0) {
29564 options = {};
29565 }
29566 var $$ = this,
29567 config = $$.config,
29568 state = $$.state,
29569 transitions;
29570 // same with redraw
29571 options.withTransition = getOption(options, "withTransition", !0);
29572 options.withTransform = getOption(options, "withTransform", !1);
29573 options.withLegend = getOption(options, "withLegend", !1);
29574
29575 // NOT same with redraw
29576 options.withUpdateXDomain = !0;
29577 options.withUpdateOrgXDomain = !0;
29578 options.withTransitionForExit = !1;
29579 options.withTransitionForTransform = getOption(options, "withTransitionForTransform", options.withTransition);
29580
29581 // MEMO: called in updateLegend in redraw if withLegend
29582 if (!(options.withLegend && config.legend_show)) {
29583 if (state.hasAxis) {
29584 transitions = $$.axis.generateTransitions(options.withTransitionForAxis ? config.transition_duration : 0);
29585 }
29586
29587 // Update scales
29588 $$.updateScales();
29589 $$.updateSvgSize();
29590
29591 // Update g positions
29592 $$.transformAll(options.withTransitionForTransform, transitions);
29593 }
29594
29595 // Draw with new sizes & scales
29596 $$.redraw(options, transitions);
29597 },
29598 /**
29599 * Redraw without rescale
29600 * @private
29601 */
29602 redrawWithoutRescale: function redrawWithoutRescale() {
29603 this.redraw({
29604 withY: !1,
29605 withDimension: !1,
29606 withLegend: !1,
29607 withSubchart: !1,
29608 withEventRect: !1,
29609 withTransitionForAxis: !1
29610 });
29611 }
29612});
29613;// CONCATENATED MODULE: ./node_modules/d3-array/src/ticks.js
29614var e10 = Math.sqrt(50),
29615 e5 = Math.sqrt(10),
29616 e2 = Math.sqrt(2);
29617function ticks(start, stop, count) {
29618 var reverse,
29619 i = -1,
29620 n,
29621 ticks,
29622 step;
29623 stop = +stop, start = +start, count = +count;
29624 if (start === stop && count > 0) return [start];
29625 if (reverse = stop < start) n = start, start = stop, stop = n;
29626 if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
29627 if (step > 0) {
29628 var r0 = Math.round(start / step),
29629 r1 = Math.round(stop / step);
29630 if (r0 * step < start) ++r0;
29631 if (r1 * step > stop) --r1;
29632 ticks = Array(n = r1 - r0 + 1);
29633 while (++i < n) {
29634 ticks[i] = (r0 + i) * step;
29635 }
29636 } else {
29637 step = -step;
29638 var _r = Math.round(start * step),
29639 _r2 = Math.round(stop * step);
29640 if (_r / step < start) ++_r;
29641 if (_r2 / step > stop) --_r2;
29642 ticks = Array(n = _r2 - _r + 1);
29643 while (++i < n) {
29644 ticks[i] = (_r + i) / step;
29645 }
29646 }
29647 if (reverse) ticks.reverse();
29648 return ticks;
29649}
29650function tickIncrement(start, stop, count) {
29651 var step = (stop - start) / Math.max(0, count),
29652 power = Math.floor(Math.log(step) / Math.LN10),
29653 error = step / Math.pow(10, power);
29654 return power >= 0 ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
29655}
29656function tickStep(start, stop, count) {
29657 var step0 = Math.abs(stop - start) / Math.max(0, count),
29658 step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
29659 error = step0 / step1;
29660 if (error >= e10) step1 *= 10;else if (error >= e5) step1 *= 5;else if (error >= e2) step1 *= 2;
29661 return stop < start ? -step1 : step1;
29662}
29663;// CONCATENATED MODULE: ./node_modules/d3-array/src/ascending.js
29664function ascending_ascending(a, b) {
29665 return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
29666}
29667;// CONCATENATED MODULE: ./node_modules/d3-array/src/descending.js
29668function descending(a, b) {
29669 return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
29670}
29671;// CONCATENATED MODULE: ./node_modules/d3-array/src/bisector.js
29672
29673
29674
29675function bisector(f) {
29676 var _this = this,
29677 compare1,
29678 compare2,
29679 delta;
29680 // If an accessor is specified, promote it to a comparator. In this case we
29681 // can test whether the search value is (self-) comparable. We can’t do this
29682 // for a comparator (except for specific, known comparators) because we can’t
29683 // tell if the comparator is symmetric, and an asymmetric comparator can’t be
29684 // used to test whether a single value is comparable.
29685 if (f.length !== 2) {
29686 compare1 = ascending_ascending;
29687 compare2 = function compare2(d, x) {
29688 _newArrowCheck(this, _this);
29689 return ascending_ascending(f(d), x);
29690 }.bind(this);
29691 delta = function delta(d, x) {
29692 _newArrowCheck(this, _this);
29693 return f(d) - x;
29694 }.bind(this);
29695 } else {
29696 compare1 = f === ascending_ascending || f === descending ? f : bisector_zero;
29697 compare2 = f;
29698 delta = f;
29699 }
29700 function left(a, x, lo, hi) {
29701 if (lo === void 0) {
29702 lo = 0;
29703 }
29704 if (hi === void 0) {
29705 hi = a.length;
29706 }
29707 if (lo < hi) {
29708 if (compare1(x, x) !== 0) return hi;
29709 do {
29710 var mid = lo + hi >>> 1;
29711 if (compare2(a[mid], x) < 0) lo = mid + 1;else hi = mid;
29712 } while (lo < hi);
29713 }
29714 return lo;
29715 }
29716 function right(a, x, lo, hi) {
29717 if (lo === void 0) {
29718 lo = 0;
29719 }
29720 if (hi === void 0) {
29721 hi = a.length;
29722 }
29723 if (lo < hi) {
29724 if (compare1(x, x) !== 0) return hi;
29725 do {
29726 var mid = lo + hi >>> 1;
29727 if (compare2(a[mid], x) <= 0) lo = mid + 1;else hi = mid;
29728 } while (lo < hi);
29729 }
29730 return lo;
29731 }
29732 function center(a, x, lo, hi) {
29733 if (lo === void 0) {
29734 lo = 0;
29735 }
29736 if (hi === void 0) {
29737 hi = a.length;
29738 }
29739 var i = left(a, x, lo, hi - 1);
29740 return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;
29741 }
29742 return {
29743 left: left,
29744 center: center,
29745 right: right
29746 };
29747}
29748function bisector_zero() {
29749 return 0;
29750}
29751;// CONCATENATED MODULE: ./node_modules/d3-array/src/number.js
29752
29753var number_marked = /*#__PURE__*/regenerator.mark(numbers);
29754function number_createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = number_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: !0 }; return { done: !1, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
29755function number_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return number_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return number_arrayLikeToArray(o, minLen); }
29756function number_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
29757function number_number(x) {
29758 return x === null ? NaN : +x;
29759}
29760function numbers(values, valueof) {
29761 var _iterator, _step, value, index, _iterator2, _step2, _value;
29762 return regenerator.wrap(function (_context) {
29763 while (1) {
29764 switch (_context.prev = _context.next) {
29765 case 0:
29766 if (!(valueof === undefined)) {
29767 _context.next = 11;
29768 break;
29769 }
29770 _iterator = number_createForOfIteratorHelperLoose(values);
29771 case 2:
29772 if ((_step = _iterator()).done) {
29773 _context.next = 9;
29774 break;
29775 }
29776 value = _step.value;
29777 if (!(value != null && (value = +value) >= value)) {
29778 _context.next = 7;
29779 break;
29780 }
29781 _context.next = 7;
29782 return value;
29783 case 7:
29784 _context.next = 2;
29785 break;
29786 case 9:
29787 _context.next = 20;
29788 break;
29789 case 11:
29790 index = -1;
29791 _iterator2 = number_createForOfIteratorHelperLoose(values);
29792 case 13:
29793 if ((_step2 = _iterator2()).done) {
29794 _context.next = 20;
29795 break;
29796 }
29797 _value = _step2.value;
29798 if (!((_value = valueof(_value, ++index, values)) != null && (_value = +_value) >= _value)) {
29799 _context.next = 18;
29800 break;
29801 }
29802 _context.next = 18;
29803 return _value;
29804 case 18:
29805 _context.next = 13;
29806 break;
29807 case 20:
29808 case "end":
29809 return _context.stop();
29810 }
29811 }
29812 }, number_marked);
29813}
29814;// CONCATENATED MODULE: ./node_modules/d3-array/src/bisect.js
29815
29816
29817
29818var ascendingBisect = bisector(ascending_ascending);
29819var bisectRight = ascendingBisect.right;
29820var bisectLeft = ascendingBisect.left;
29821var bisectCenter = bisector(number_number).center;
29822/* harmony default export */ var bisect = (bisectRight);
29823;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/round.js
29824/* harmony default export */ function round(a, b) {
29825 return a = +a, b = +b, function (t) {
29826 return Math.round(a * (1 - t) + b * t);
29827 };
29828}
29829;// CONCATENATED MODULE: ./node_modules/d3-scale/src/constant.js
29830function constants(x) {
29831 return function () {
29832 return x;
29833 };
29834}
29835;// CONCATENATED MODULE: ./node_modules/d3-scale/src/number.js
29836function src_number_number(x) {
29837 return +x;
29838}
29839;// CONCATENATED MODULE: ./node_modules/d3-scale/src/continuous.js
29840
29841
29842
29843
29844var unit = [0, 1];
29845function continuous_identity(x) {
29846 return x;
29847}
29848function normalize(a, b) {
29849 return (b -= a = +a) ? function (x) {
29850 return (x - a) / b;
29851 } : constants(isNaN(b) ? NaN : .5);
29852}
29853function clamper(a, b) {
29854 var t;
29855 if (a > b) t = a, a = b, b = t;
29856 return function (x) {
29857 return Math.max(a, Math.min(b, x));
29858 };
29859}
29860
29861// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
29862// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].
29863function bimap(domain, range, interpolate) {
29864 var d0 = domain[0],
29865 d1 = domain[1],
29866 r0 = range[0],
29867 r1 = range[1];
29868 if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
29869 return function (x) {
29870 return r0(d0(x));
29871 };
29872}
29873function polymap(domain, range, interpolate) {
29874 var j = Math.min(domain.length, range.length) - 1,
29875 d = Array(j),
29876 r = Array(j),
29877 i = -1;
29878
29879 // Reverse descending domains.
29880 if (domain[j] < domain[0]) {
29881 domain = domain.slice().reverse();
29882 range = range.slice().reverse();
29883 }
29884 while (++i < j) {
29885 d[i] = normalize(domain[i], domain[i + 1]);
29886 r[i] = interpolate(range[i], range[i + 1]);
29887 }
29888 return function (x) {
29889 var i = bisect(domain, x, 1, j) - 1;
29890 return r[i](d[i](x));
29891 };
29892}
29893function copy(source, target) {
29894 return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown());
29895}
29896function transformer() {
29897 var domain = unit,
29898 range = unit,
29899 interpolate = value,
29900 transform,
29901 untransform,
29902 unknown,
29903 clamp = continuous_identity,
29904 piecewise,
29905 output,
29906 input;
29907 function rescale() {
29908 var n = Math.min(domain.length, range.length);
29909 if (clamp !== continuous_identity) clamp = clamper(domain[0], domain[n - 1]);
29910 piecewise = n > 2 ? polymap : bimap;
29911 output = input = null;
29912 return scale;
29913 }
29914 function scale(x) {
29915 return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));
29916 }
29917 scale.invert = function (y) {
29918 return clamp(untransform((input || (input = piecewise(range, domain.map(transform), number)))(y)));
29919 };
29920 scale.domain = function (_) {
29921 return arguments.length ? (domain = Array.from(_, src_number_number), rescale()) : domain.slice();
29922 };
29923 scale.range = function (_) {
29924 return arguments.length ? (range = Array.from(_), rescale()) : range.slice();
29925 };
29926 scale.rangeRound = function (_) {
29927 return range = Array.from(_), interpolate = round, rescale();
29928 };
29929 scale.clamp = function (_) {
29930 return arguments.length ? (clamp = _ ? !0 : continuous_identity, rescale()) : clamp !== continuous_identity;
29931 };
29932 scale.interpolate = function (_) {
29933 return arguments.length ? (interpolate = _, rescale()) : interpolate;
29934 };
29935 scale.unknown = function (_) {
29936 return arguments.length ? (unknown = _, scale) : unknown;
29937 };
29938 return function (t, u) {
29939 transform = t, untransform = u;
29940 return rescale();
29941 };
29942}
29943function continuous() {
29944 return transformer()(continuous_identity, continuous_identity);
29945}
29946;// CONCATENATED MODULE: ./node_modules/d3-format/src/formatSpecifier.js
29947// [[fill]align][sign][symbol][0][width][,][.precision][~][type]
29948var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
29949function formatSpecifier(specifier) {
29950 if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
29951 var match;
29952 return new FormatSpecifier({
29953 fill: match[1],
29954 align: match[2],
29955 sign: match[3],
29956 symbol: match[4],
29957 zero: match[5],
29958 width: match[6],
29959 comma: match[7],
29960 precision: match[8] && match[8].slice(1),
29961 trim: match[9],
29962 type: match[10]
29963 });
29964}
29965formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
29966
29967function FormatSpecifier(specifier) {
29968 this.fill = specifier.fill === undefined ? " " : specifier.fill + "";
29969 this.align = specifier.align === undefined ? ">" : specifier.align + "";
29970 this.sign = specifier.sign === undefined ? "-" : specifier.sign + "";
29971 this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + "";
29972 this.zero = !!specifier.zero;
29973 this.width = specifier.width === undefined ? undefined : +specifier.width;
29974 this.comma = !!specifier.comma;
29975 this.precision = specifier.precision === undefined ? undefined : +specifier.precision;
29976 this.trim = !!specifier.trim;
29977 this.type = specifier.type === undefined ? "" : specifier.type + "";
29978}
29979FormatSpecifier.prototype.toString = function () {
29980 return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === undefined ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
29981};
29982;// CONCATENATED MODULE: ./node_modules/d3-format/src/formatDecimal.js
29983/* harmony default export */ function formatDecimal(x) {
29984 return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
29985}
29986
29987// Computes the decimal coefficient and exponent of the specified number x with
29988// significant digits p, where x is positive and p is in [1, 21] or undefined.
29989// For example, formatDecimalParts(1.23) returns ["123", 0].
29990function formatDecimalParts(x, p) {
29991 if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
29992 var i,
29993 coefficient = x.slice(0, i);
29994
29995 // The string returned by toExponential either has the form \d\.\d+e[-+]\d+
29996 // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
29997 return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];
29998}
29999;// CONCATENATED MODULE: ./node_modules/d3-format/src/exponent.js
30000
30001/* harmony default export */ function exponent(x) {
30002 return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;
30003}
30004;// CONCATENATED MODULE: ./node_modules/d3-format/src/precisionPrefix.js
30005
30006/* harmony default export */ function precisionPrefix(step, value) {
30007 return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));
30008}
30009;// CONCATENATED MODULE: ./node_modules/d3-format/src/formatGroup.js
30010/* harmony default export */ function formatGroup(grouping, thousands) {
30011 return function (value, width) {
30012 var i = value.length,
30013 t = [],
30014 j = 0,
30015 g = grouping[0],
30016 length = 0;
30017 while (i > 0 && g > 0) {
30018 if (length + g + 1 > width) g = Math.max(1, width - length);
30019 t.push(value.substring(i -= g, i + g));
30020 if ((length += g + 1) > width) break;
30021 g = grouping[j = (j + 1) % grouping.length];
30022 }
30023 return t.reverse().join(thousands);
30024 };
30025}
30026;// CONCATENATED MODULE: ./node_modules/d3-format/src/formatNumerals.js
30027/* harmony default export */ function formatNumerals(numerals) {
30028 return function (value) {
30029 return value.replace(/[0-9]/g, function (i) {
30030 return numerals[+i];
30031 });
30032 };
30033}
30034;// CONCATENATED MODULE: ./node_modules/d3-format/src/formatTrim.js
30035// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
30036/* harmony default export */ function formatTrim(s) {
30037 out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
30038 switch (s[i]) {
30039 case ".":
30040 i0 = i1 = i;
30041 break;
30042 case "0":
30043 if (i0 === 0) i0 = i;
30044 i1 = i;
30045 break;
30046 default:
30047 if (!+s[i]) break out;
30048 if (i0 > 0) i0 = 0;
30049 break;
30050 }
30051 }
30052 return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
30053}
30054;// CONCATENATED MODULE: ./node_modules/d3-format/src/formatPrefixAuto.js
30055
30056var prefixExponent;
30057/* harmony default export */ function formatPrefixAuto(x, p) {
30058 var d = formatDecimalParts(x, p);
30059 if (!d) return x + "";
30060 var coefficient = d[0],
30061 exponent = d[1],
30062 i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
30063 n = coefficient.length;
30064 return i === n ? coefficient : i > n ? coefficient + Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!
30065}
30066;// CONCATENATED MODULE: ./node_modules/d3-format/src/formatRounded.js
30067
30068/* harmony default export */ function formatRounded(x, p) {
30069 var d = formatDecimalParts(x, p);
30070 if (!d) return x + "";
30071 var coefficient = d[0],
30072 exponent = d[1];
30073 return exponent < 0 ? "0." + Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + Array(exponent - coefficient.length + 2).join("0");
30074}
30075;// CONCATENATED MODULE: ./node_modules/d3-format/src/formatTypes.js
30076
30077var formatTypes_this = undefined;
30078
30079
30080
30081/* harmony default export */ var formatTypes = ({
30082 "%": function _(x, p) {
30083 _newArrowCheck(this, formatTypes_this);
30084 return (x * 100).toFixed(p);
30085 }.bind(undefined),
30086 "b": function b(x) {
30087 _newArrowCheck(this, formatTypes_this);
30088 return Math.round(x).toString(2);
30089 }.bind(undefined),
30090 "c": function c(x) {
30091 _newArrowCheck(this, formatTypes_this);
30092 return x + "";
30093 }.bind(undefined),
30094 "d": formatDecimal,
30095 "e": function e(x, p) {
30096 _newArrowCheck(this, formatTypes_this);
30097 return x.toExponential(p);
30098 }.bind(undefined),
30099 "f": function f(x, p) {
30100 _newArrowCheck(this, formatTypes_this);
30101 return x.toFixed(p);
30102 }.bind(undefined),
30103 "g": function g(x, p) {
30104 _newArrowCheck(this, formatTypes_this);
30105 return x.toPrecision(p);
30106 }.bind(undefined),
30107 "o": function o(x) {
30108 _newArrowCheck(this, formatTypes_this);
30109 return Math.round(x).toString(8);
30110 }.bind(undefined),
30111 "p": function p(x, _p) {
30112 _newArrowCheck(this, formatTypes_this);
30113 return formatRounded(x * 100, _p);
30114 }.bind(undefined),
30115 "r": formatRounded,
30116 "s": formatPrefixAuto,
30117 "X": function X(x) {
30118 _newArrowCheck(this, formatTypes_this);
30119 return Math.round(x).toString(16).toUpperCase();
30120 }.bind(undefined),
30121 "x": function x(_x) {
30122 _newArrowCheck(this, formatTypes_this);
30123 return Math.round(_x).toString(16);
30124 }.bind(undefined)
30125});
30126;// CONCATENATED MODULE: ./node_modules/d3-format/src/identity.js
30127/* harmony default export */ function src_identity(x) {
30128 return x;
30129}
30130;// CONCATENATED MODULE: ./node_modules/d3-format/src/locale.js
30131
30132
30133
30134
30135
30136
30137
30138
30139var map = Array.prototype.map,
30140 prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
30141/* harmony default export */ function src_locale(locale) {
30142 var group = locale.grouping === undefined || locale.thousands === undefined ? src_identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""),
30143 currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
30144 currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
30145 decimal = locale.decimal === undefined ? "." : locale.decimal + "",
30146 numerals = locale.numerals === undefined ? src_identity : formatNumerals(map.call(locale.numerals, String)),
30147 percent = locale.percent === undefined ? "%" : locale.percent + "",
30148 minus = locale.minus === undefined ? "−" : locale.minus + "",
30149 nan = locale.nan === undefined ? "NaN" : locale.nan + "";
30150 function newFormat(specifier) {
30151 specifier = formatSpecifier(specifier);
30152 var fill = specifier.fill,
30153 align = specifier.align,
30154 sign = specifier.sign,
30155 symbol = specifier.symbol,
30156 zero = specifier.zero,
30157 width = specifier.width,
30158 comma = specifier.comma,
30159 precision = specifier.precision,
30160 trim = specifier.trim,
30161 type = specifier.type;
30162
30163 // The "n" type is an alias for ",g".
30164 if (type === "n") comma = !0, type = "g";
30165
30166 // The "" type, and any invalid type, is an alias for ".12~g".
30167 else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = !0, type = "g";
30168
30169 // If zero fill is specified, padding goes after sign and before digits.
30170 if (zero || fill === "0" && align === "=") zero = !0, fill = "0", align = "=";
30171
30172 // Compute the prefix and suffix.
30173 // For SI-prefix, the suffix is lazily computed.
30174 var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
30175 suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "",
30176 formatType = formatTypes[type],
30177 maybeSuffix = /[defgprs%]/.test(type); // What format function should we use?
30178 // Is this an integer type?
30179 // Can this type generate exponential notation?
30180 // Set the default precision if not specified,
30181 // or clamp the specified precision to the supported range.
30182 // For significant precision, it must be in [1, 21].
30183 // For fixed precision, it must be in [0, 20].
30184 precision = precision === undefined ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
30185 function format(value) {
30186 var valuePrefix = prefix,
30187 valueSuffix = suffix,
30188 i,
30189 n,
30190 c;
30191 if (type === "c") {
30192 valueSuffix = formatType(value) + valueSuffix;
30193 value = "";
30194 } else {
30195 value = +value;
30196
30197 // Determine the sign. -0 is not less than 0, but 1 / -0 is!
30198 var valueNegative = value < 0 || 1 / value < 0;
30199
30200 // Perform the initial formatting.
30201 value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
30202
30203 // Trim insignificant zeros.
30204 if (trim) value = formatTrim(value);
30205
30206 // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.
30207 if (valueNegative && +value === 0 && sign !== "+") valueNegative = !1;
30208
30209 // Compute the prefix and suffix.
30210 valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
30211 valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
30212
30213 // Break the formatted value into the integer “value” part that can be
30214 // grouped, and fractional or exponential “suffix” part that is not.
30215 if (maybeSuffix) {
30216 i = -1, n = value.length;
30217 while (++i < n) {
30218 if (c = value.charCodeAt(i), 48 > c || c > 57) {
30219 valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
30220 value = value.slice(0, i);
30221 break;
30222 }
30223 }
30224 }
30225 }
30226
30227 // If the fill character is not "0", grouping is applied before padding.
30228 if (comma && !zero) value = group(value, Infinity);
30229
30230 // Compute the padding.
30231 var length = valuePrefix.length + value.length + valueSuffix.length,
30232 padding = length < width ? Array(width - length + 1).join(fill) : "";
30233
30234 // If the fill character is "0", grouping is applied after padding.
30235 if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
30236
30237 // Reconstruct the final output based on the desired alignment.
30238 switch (align) {
30239 case "<":
30240 value = valuePrefix + value + valueSuffix + padding;
30241 break;
30242 case "=":
30243 value = valuePrefix + padding + value + valueSuffix;
30244 break;
30245 case "^":
30246 value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);
30247 break;
30248 default:
30249 value = padding + valuePrefix + value + valueSuffix;
30250 break;
30251 }
30252 return numerals(value);
30253 }
30254 format.toString = function () {
30255 return specifier + "";
30256 };
30257 return format;
30258 }
30259 return {
30260 format: newFormat,
30261 formatPrefix: function (specifier, value) {
30262 var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)),
30263 e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,
30264 k = Math.pow(10, -e),
30265 prefix = prefixes[8 + e / 3];
30266 return function (value) {
30267 return f(k * value) + prefix;
30268 };
30269 }
30270 };
30271}
30272;// CONCATENATED MODULE: ./node_modules/d3-format/src/defaultLocale.js
30273
30274var defaultLocale_locale;
30275var defaultLocale_format;
30276var formatPrefix;
30277defaultLocale_defaultLocale({
30278 thousands: ",",
30279 grouping: [3],
30280 currency: ["$", ""]
30281});
30282function defaultLocale_defaultLocale(definition) {
30283 defaultLocale_locale = src_locale(definition);
30284 defaultLocale_format = defaultLocale_locale.format;
30285 formatPrefix = defaultLocale_locale.formatPrefix;
30286 return defaultLocale_locale;
30287}
30288;// CONCATENATED MODULE: ./node_modules/d3-format/src/precisionRound.js
30289
30290/* harmony default export */ function precisionRound(step, max) {
30291 step = Math.abs(step), max = Math.abs(max) - step;
30292 return Math.max(0, exponent(max) - exponent(step)) + 1;
30293}
30294;// CONCATENATED MODULE: ./node_modules/d3-format/src/precisionFixed.js
30295
30296/* harmony default export */ function precisionFixed(step) {
30297 return Math.max(0, -exponent(Math.abs(step)));
30298}
30299;// CONCATENATED MODULE: ./node_modules/d3-scale/src/tickFormat.js
30300
30301
30302function tickFormat(start, stop, count, specifier) {
30303 var step = tickStep(start, stop, count),
30304 precision;
30305 specifier = formatSpecifier(specifier == null ? ",f" : specifier);
30306 switch (specifier.type) {
30307 case "s":
30308 {
30309 var value = Math.max(Math.abs(start), Math.abs(stop));
30310 if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;
30311 return formatPrefix(specifier, value);
30312 }
30313 case "":
30314 case "e":
30315 case "g":
30316 case "p":
30317 case "r":
30318 {
30319 if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
30320 break;
30321 }
30322 case "f":
30323 case "%":
30324 {
30325 if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
30326 break;
30327 }
30328 }
30329 return defaultLocale_format(specifier);
30330}
30331;// CONCATENATED MODULE: ./node_modules/d3-scale/src/linear.js
30332
30333
30334
30335
30336function linearish(scale) {
30337 var domain = scale.domain;
30338 scale.ticks = function (count) {
30339 var d = domain();
30340 return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
30341 };
30342 scale.tickFormat = function (count, specifier) {
30343 var d = domain();
30344 return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);
30345 };
30346 scale.nice = function (count) {
30347 if (count == null) count = 10;
30348 var d = domain(),
30349 i0 = 0,
30350 i1 = d.length - 1,
30351 start = d[i0],
30352 stop = d[i1],
30353 prestep,
30354 step,
30355 maxIter = 10;
30356 if (stop < start) {
30357 step = start, start = stop, stop = step;
30358 step = i0, i0 = i1, i1 = step;
30359 }
30360 while (maxIter-- > 0) {
30361 step = tickIncrement(start, stop, count);
30362 if (step === prestep) {
30363 d[i0] = start;
30364 d[i1] = stop;
30365 return domain(d);
30366 } else if (step > 0) {
30367 start = Math.floor(start / step) * step;
30368 stop = Math.ceil(stop / step) * step;
30369 } else if (step < 0) {
30370 start = Math.ceil(start * step) / step;
30371 stop = Math.floor(stop * step) / step;
30372 } else {
30373 break;
30374 }
30375 prestep = step;
30376 }
30377 return scale;
30378 };
30379 return scale;
30380}
30381function linear_linear() {
30382 var scale = continuous();
30383 scale.copy = function () {
30384 return copy(scale, linear_linear());
30385 };
30386 initRange.apply(scale, arguments);
30387 return linearish(scale);
30388}
30389;// CONCATENATED MODULE: ./node_modules/d3-scale/src/symlog.js
30390
30391
30392
30393function transformSymlog(c) {
30394 return function (x) {
30395 return Math.sign(x) * Math.log1p(Math.abs(x / c));
30396 };
30397}
30398function transformSymexp(c) {
30399 return function (x) {
30400 return Math.sign(x) * Math.expm1(Math.abs(x)) * c;
30401 };
30402}
30403function symlogish(transform) {
30404 var c = 1,
30405 scale = transform(transformSymlog(c), transformSymexp(c));
30406 scale.constant = function (_) {
30407 return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;
30408 };
30409 return linearish(scale);
30410}
30411function symlog() {
30412 var scale = symlogish(transformer());
30413 scale.copy = function () {
30414 return copy(scale, symlog()).constant(scale.constant());
30415 };
30416 return initRange.apply(scale, arguments);
30417}
30418;// CONCATENATED MODULE: ./node_modules/d3-scale/src/nice.js
30419function nice(domain, interval) {
30420 domain = domain.slice();
30421 var i0 = 0,
30422 i1 = domain.length - 1,
30423 x0 = domain[i0],
30424 x1 = domain[i1],
30425 t;
30426 if (x1 < x0) {
30427 t = i0, i0 = i1, i1 = t;
30428 t = x0, x0 = x1, x1 = t;
30429 }
30430 domain[i0] = interval.floor(x0);
30431 domain[i1] = interval.ceil(x1);
30432 return domain;
30433}
30434;// CONCATENATED MODULE: ./node_modules/d3-scale/src/log.js
30435
30436
30437
30438
30439
30440
30441function transformLog(x) {
30442 return Math.log(x);
30443}
30444function transformExp(x) {
30445 return Math.exp(x);
30446}
30447function transformLogn(x) {
30448 return -Math.log(-x);
30449}
30450function transformExpn(x) {
30451 return -Math.exp(-x);
30452}
30453function pow10(x) {
30454 return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x;
30455}
30456function powp(base) {
30457 var _this = this;
30458 return base === 10 ? pow10 : base === Math.E ? Math.exp : function (x) {
30459 _newArrowCheck(this, _this);
30460 return Math.pow(base, x);
30461 }.bind(this);
30462}
30463function logp(base) {
30464 var _this2 = this;
30465 return base === Math.E ? Math.log : base === 10 && Math.log10 || base === 2 && Math.log2 || (base = Math.log(base), function (x) {
30466 _newArrowCheck(this, _this2);
30467 return Math.log(x) / base;
30468 }.bind(this));
30469}
30470function reflect(f) {
30471 var _this3 = this;
30472 return function (x, k) {
30473 _newArrowCheck(this, _this3);
30474 return -f(-x, k);
30475 }.bind(this);
30476}
30477function loggish(transform) {
30478 var _this4 = this,
30479 scale = transform(transformLog, transformExp),
30480 domain = scale.domain,
30481 base = 10,
30482 logs,
30483 pows;
30484 function rescale() {
30485 logs = logp(base), pows = powp(base);
30486 if (domain()[0] < 0) {
30487 logs = reflect(logs), pows = reflect(pows);
30488 transform(transformLogn, transformExpn);
30489 } else {
30490 transform(transformLog, transformExp);
30491 }
30492 return scale;
30493 }
30494 scale.base = function (_) {
30495 return arguments.length ? (base = +_, rescale()) : base;
30496 };
30497 scale.domain = function (_) {
30498 return arguments.length ? (domain(_), rescale()) : domain();
30499 };
30500 scale.ticks = function (count) {
30501 _newArrowCheck(this, _this4);
30502 var d = domain(),
30503 u = d[0],
30504 v = d[d.length - 1],
30505 r = v < u;
30506 if (r) {
30507 var _ref = [v, u];
30508 u = _ref[0];
30509 v = _ref[1];
30510 }
30511 var i = logs(u),
30512 j = logs(v),
30513 k,
30514 t,
30515 n = count == null ? 10 : +count,
30516 z = [];
30517 if (!(base % 1) && j - i < n) {
30518 i = Math.floor(i), j = Math.ceil(j);
30519 if (u > 0) for (; i <= j; ++i) {
30520 for (k = 1; k < base; ++k) {
30521 t = i < 0 ? k / pows(-i) : k * pows(i);
30522 if (t < u) continue;
30523 if (t > v) break;
30524 z.push(t);
30525 }
30526 } else for (; i <= j; ++i) {
30527 for (k = base - 1; k >= 1; --k) {
30528 t = i > 0 ? k / pows(-i) : k * pows(i);
30529 if (t < u) continue;
30530 if (t > v) break;
30531 z.push(t);
30532 }
30533 }
30534 if (z.length * 2 < n) z = ticks(u, v, n);
30535 } else {
30536 z = ticks(i, j, Math.min(j - i, n)).map(pows);
30537 }
30538 return r ? z.reverse() : z;
30539 }.bind(this);
30540 scale.tickFormat = function (count, specifier) {
30541 var _this5 = this;
30542 _newArrowCheck(this, _this4);
30543 if (count == null) count = 10;
30544 if (specifier == null) specifier = base === 10 ? "s" : ",";
30545 if (typeof specifier !== "function") {
30546 if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = !0;
30547 specifier = defaultLocale_format(specifier);
30548 }
30549 if (count === Infinity) return specifier;
30550 var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
30551 return function (d) {
30552 _newArrowCheck(this, _this5);
30553 var i = d / pows(Math.round(logs(d)));
30554 if (i * base < base - .5) i *= base;
30555 return i <= k ? specifier(d) : "";
30556 }.bind(this);
30557 }.bind(this);
30558 scale.nice = function () {
30559 var _this6 = this;
30560 _newArrowCheck(this, _this4);
30561 return domain(nice(domain(), {
30562 floor: function floor(x) {
30563 _newArrowCheck(this, _this6);
30564 return pows(Math.floor(logs(x)));
30565 }.bind(this),
30566 ceil: function ceil(x) {
30567 _newArrowCheck(this, _this6);
30568 return pows(Math.ceil(logs(x)));
30569 }.bind(this)
30570 }));
30571 }.bind(this);
30572 return scale;
30573}
30574function log() {
30575 var _this7 = this,
30576 scale = loggish(transformer()).domain([1, 10]);
30577 scale.copy = function () {
30578 _newArrowCheck(this, _this7);
30579 return copy(scale, log()).base(scale.base());
30580 }.bind(this);
30581 initRange.apply(scale, arguments);
30582 return scale;
30583}
30584;// CONCATENATED MODULE: ./node_modules/d3-time/src/millisecond.js
30585
30586var millisecond = newInterval(function () {
30587 // noop
30588}, function (date, step) {
30589 date.setTime(+date + step);
30590}, function (start, end) {
30591 return end - start;
30592});
30593
30594// An optimized implementation for this simple case.
30595millisecond.every = function (k) {
30596 k = Math.floor(k);
30597 if (!isFinite(k) || !(k > 0)) return null;
30598 if (!(k > 1)) return millisecond;
30599 return newInterval(function (date) {
30600 date.setTime(Math.floor(date / k) * k);
30601 }, function (date, step) {
30602 date.setTime(+date + step * k);
30603 }, function (start, end) {
30604 return (end - start) / k;
30605 });
30606};
30607/* harmony default export */ var src_millisecond = (millisecond);
30608var milliseconds = millisecond.range;
30609;// CONCATENATED MODULE: ./node_modules/d3-time/src/second.js
30610
30611
30612var second = newInterval(function (date) {
30613 date.setTime(date - date.getMilliseconds());
30614}, function (date, step) {
30615 date.setTime(+date + step * durationSecond);
30616}, function (start, end) {
30617 return (end - start) / durationSecond;
30618}, function (date) {
30619 return date.getUTCSeconds();
30620});
30621/* harmony default export */ var src_second = (second);
30622var seconds = second.range;
30623;// CONCATENATED MODULE: ./node_modules/d3-time/src/minute.js
30624
30625
30626var minute = newInterval(function (date) {
30627 date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);
30628}, function (date, step) {
30629 date.setTime(+date + step * durationMinute);
30630}, function (start, end) {
30631 return (end - start) / durationMinute;
30632}, function (date) {
30633 return date.getMinutes();
30634});
30635/* harmony default export */ var src_minute = (minute);
30636var minutes = minute.range;
30637;// CONCATENATED MODULE: ./node_modules/d3-time/src/hour.js
30638
30639
30640var hour = newInterval(function (date) {
30641 date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);
30642}, function (date, step) {
30643 date.setTime(+date + step * durationHour);
30644}, function (start, end) {
30645 return (end - start) / durationHour;
30646}, function (date) {
30647 return date.getHours();
30648});
30649/* harmony default export */ var src_hour = (hour);
30650var hours = hour.range;
30651;// CONCATENATED MODULE: ./node_modules/d3-time/src/month.js
30652
30653var month = newInterval(function (date) {
30654 date.setDate(1);
30655 date.setHours(0, 0, 0, 0);
30656}, function (date, step) {
30657 date.setMonth(date.getMonth() + step);
30658}, function (start, end) {
30659 return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
30660}, function (date) {
30661 return date.getMonth();
30662});
30663/* harmony default export */ var src_month = (month);
30664var months = month.range;
30665;// CONCATENATED MODULE: ./node_modules/d3-time/src/utcMinute.js
30666
30667
30668var utcMinute = newInterval(function (date) {
30669 date.setUTCSeconds(0, 0);
30670}, function (date, step) {
30671 date.setTime(+date + step * durationMinute);
30672}, function (start, end) {
30673 return (end - start) / durationMinute;
30674}, function (date) {
30675 return date.getUTCMinutes();
30676});
30677/* harmony default export */ var src_utcMinute = (utcMinute);
30678var utcMinutes = utcMinute.range;
30679;// CONCATENATED MODULE: ./node_modules/d3-time/src/utcHour.js
30680
30681
30682var utcHour = newInterval(function (date) {
30683 date.setUTCMinutes(0, 0, 0);
30684}, function (date, step) {
30685 date.setTime(+date + step * durationHour);
30686}, function (start, end) {
30687 return (end - start) / durationHour;
30688}, function (date) {
30689 return date.getUTCHours();
30690});
30691/* harmony default export */ var src_utcHour = (utcHour);
30692var utcHours = utcHour.range;
30693;// CONCATENATED MODULE: ./node_modules/d3-time/src/utcMonth.js
30694
30695var utcMonth = newInterval(function (date) {
30696 date.setUTCDate(1);
30697 date.setUTCHours(0, 0, 0, 0);
30698}, function (date, step) {
30699 date.setUTCMonth(date.getUTCMonth() + step);
30700}, function (start, end) {
30701 return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
30702}, function (date) {
30703 return date.getUTCMonth();
30704});
30705/* harmony default export */ var src_utcMonth = (utcMonth);
30706var utcMonths = utcMonth.range;
30707;// CONCATENATED MODULE: ./node_modules/d3-time/src/ticks.js
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725function ticker(year, month, week, day, hour, minute) {
30726 var tickIntervals = [[src_second, 1, durationSecond], [src_second, 5, 5 * durationSecond], [src_second, 15, 15 * durationSecond], [src_second, 30, 30 * durationSecond], [minute, 1, durationMinute], [minute, 5, 5 * durationMinute], [minute, 15, 15 * durationMinute], [minute, 30, 30 * durationMinute], [hour, 1, durationHour], [hour, 3, 3 * durationHour], [hour, 6, 6 * durationHour], [hour, 12, 12 * durationHour], [day, 1, durationDay], [day, 2, 2 * durationDay], [week, 1, durationWeek], [month, 1, durationMonth], [month, 3, 3 * durationMonth], [year, 1, durationYear]];
30727 function ticks(start, stop, count) {
30728 var reverse = stop < start;
30729 if (reverse) {
30730 var _ref = [stop, start];
30731 start = _ref[0];
30732 stop = _ref[1];
30733 }
30734 var interval = count && typeof count.range === "function" ? count : tickInterval(start, stop, count),
30735 ticks = interval ? interval.range(start, +stop + 1) : [];
30736 // inclusive stop
30737 return reverse ? ticks.reverse() : ticks;
30738 }
30739 function tickInterval(start, stop, count) {
30740 var _this = this,
30741 target = Math.abs(stop - start) / count,
30742 i = bisector(function (_ref2) {
30743 var step = _ref2[2];
30744 _newArrowCheck(this, _this);
30745 return step;
30746 }.bind(this)).right(tickIntervals, target);
30747 if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));
30748 if (i === 0) return src_millisecond.every(Math.max(tickStep(start, stop, count), 1));
30749 var _tickIntervals = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i],
30750 t = _tickIntervals[0],
30751 step = _tickIntervals[1];
30752 return t.every(step);
30753 }
30754 return [ticks, tickInterval];
30755}
30756var _ticker = ticker(src_utcYear, src_utcMonth, utcSunday, src_utcDay, src_utcHour, src_utcMinute),
30757 utcTicks = _ticker[0],
30758 utcTickInterval = _ticker[1],
30759 _ticker2 = ticker(src_year, src_month, sunday, src_day, src_hour, src_minute),
30760 timeTicks = _ticker2[0],
30761 timeTickInterval = _ticker2[1];
30762
30763;// CONCATENATED MODULE: ./node_modules/d3-scale/src/time.js
30764
30765
30766
30767
30768
30769function time_date(t) {
30770 return new Date(t);
30771}
30772function time_number(t) {
30773 return t instanceof Date ? +t : +new Date(+t);
30774}
30775function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {
30776 var scale = continuous(),
30777 invert = scale.invert,
30778 domain = scale.domain,
30779 formatMillisecond = format(".%L"),
30780 formatSecond = format(":%S"),
30781 formatMinute = format("%I:%M"),
30782 formatHour = format("%I %p"),
30783 formatDay = format("%a %d"),
30784 formatWeek = format("%b %d"),
30785 formatMonth = format("%B"),
30786 formatYear = format("%Y");
30787 function tickFormat(date) {
30788 return (second(date) < date ? formatMillisecond : minute(date) < date ? formatSecond : hour(date) < date ? formatMinute : day(date) < date ? formatHour : month(date) < date ? week(date) < date ? formatDay : formatWeek : year(date) < date ? formatMonth : formatYear)(date);
30789 }
30790 scale.invert = function (y) {
30791 return new Date(invert(y));
30792 };
30793 scale.domain = function (_) {
30794 return arguments.length ? domain(Array.from(_, time_number)) : domain().map(time_date);
30795 };
30796 scale.ticks = function (interval) {
30797 var d = domain();
30798 return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);
30799 };
30800 scale.tickFormat = function (count, specifier) {
30801 return specifier == null ? tickFormat : format(specifier);
30802 };
30803 scale.nice = function (interval) {
30804 var d = domain();
30805 if (!interval || typeof interval.range !== "function") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);
30806 return interval ? domain(nice(d, interval)) : scale;
30807 };
30808 scale.copy = function () {
30809 return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));
30810 };
30811 return scale;
30812}
30813function time() {
30814 return initRange.apply(calendar(timeTicks, timeTickInterval, src_year, src_month, sunday, src_day, src_hour, src_minute, src_second, timeFormat).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
30815}
30816;// CONCATENATED MODULE: ./node_modules/d3-scale/src/utcTime.js
30817
30818
30819
30820
30821function utcTime() {
30822 return initRange.apply(calendar(utcTicks, utcTickInterval, src_utcYear, src_utcMonth, utcSunday, src_utcDay, src_utcHour, src_utcMinute, src_second, utcFormat).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
30823}
30824;// CONCATENATED MODULE: ./src/ChartInternal/internals/scale.ts
30825
30826/**
30827 * Copyright (c) 2017 ~ present NAVER Corp.
30828 * billboard.js project is licensed under the MIT license
30829 */
30830
30831
30832/**
30833 * Get scale
30834 * @param {string} [type='linear'] Scale type
30835 * @param {number} [min] Min range
30836 * @param {number} [max] Max range
30837 * @returns {d3.scaleLinear|d3.scaleTime} scale
30838 * @private
30839 */
30840function getScale(type, min, max) {
30841 if (type === void 0) {
30842 type = "linear";
30843 }
30844 if (min === void 0) {
30845 min = 0;
30846 }
30847 if (max === void 0) {
30848 max = 1;
30849 }
30850 var scale = {
30851 linear: linear_linear,
30852 log: symlog,
30853 _log: log,
30854 time: time,
30855 utc: utcTime
30856 }[type]();
30857 scale.type = type;
30858 /_?log/.test(type) && scale.clamp(!0);
30859 return scale.range([min, max]);
30860}
30861/* harmony default export */ var scale = ({
30862 /**
30863 * Get x Axis scale function
30864 * @param {number} min Min value
30865 * @param {number} max Max value
30866 * @param {Array} domain Domain value
30867 * @param {Function} offset The offset getter to be sum
30868 * @returns {Function} scale
30869 * @private
30870 */
30871 getXScale: function getXScale(min, max, domain, offset) {
30872 var $$ = this,
30873 scale = $$.scale.zoom || getScale($$.axis.getAxisType("x"), min, max);
30874 return $$.getCustomizedScale(domain ? scale.domain(domain) : scale, offset);
30875 },
30876 /**
30877 * Get y Axis scale function
30878 * @param {string} id Axis id: 'y' or 'y2'
30879 * @param {number} min Min value
30880 * @param {number} max Max value
30881 * @param {Array} domain Domain value
30882 * @returns {Function} Scale function
30883 * @private
30884 */
30885 getYScale: function getYScale(id, min, max, domain) {
30886 var $$ = this,
30887 scale = getScale($$.axis.getAxisType(id), min, max);
30888 domain && scale.domain(domain);
30889 return scale;
30890 },
30891 /**
30892 * Get y Axis scale
30893 * @param {string} id Axis id
30894 * @param {boolean} isSub Weather is sub Axis
30895 * @returns {Function} Scale function
30896 * @private
30897 */
30898 getYScaleById: function getYScaleById(id, isSub) {
30899 if (isSub === void 0) {
30900 isSub = !1;
30901 }
30902 var isY2 = this.axis.getId(id) === "y2",
30903 key = isSub ? isY2 ? "subY2" : "subY" : isY2 ? "y2" : "y";
30904 return this.scale[key];
30905 },
30906 /**
30907 * Get customized scale
30908 * @param {d3.scaleLinear|d3.scaleTime} scaleValue Scale function
30909 * @param {Function} offsetValue Offset getter to be sum
30910 * @returns {Function} Scale function
30911 * @private
30912 */
30913 getCustomizedScale: function getCustomizedScale(scaleValue, offsetValue) {
30914 var _this = this,
30915 $$ = this,
30916 offset = offsetValue || function () {
30917 _newArrowCheck(this, _this);
30918 return $$.axis.x.tickOffset();
30919 }.bind(this),
30920 scale = function (d, raw) {
30921 var v = scaleValue(d) + offset();
30922 return raw ? v : Math.ceil(v);
30923 };
30924 // copy original scale methods
30925 for (var key in scaleValue) {
30926 scale[key] = scaleValue[key];
30927 }
30928 scale.orgDomain = function () {
30929 _newArrowCheck(this, _this);
30930 return scaleValue.domain();
30931 }.bind(this);
30932 scale.orgScale = function () {
30933 _newArrowCheck(this, _this);
30934 return scaleValue;
30935 }.bind(this);
30936
30937 // define custom domain() for categorized axis
30938 if ($$.axis.isCategorized()) {
30939 scale.domain = function (domainValue) {
30940 var domain = domainValue;
30941 if (!arguments.length) {
30942 domain = this.orgDomain();
30943 return [domain[0], domain[1] + 1];
30944 }
30945 scaleValue.domain(domain);
30946 return scale;
30947 };
30948 }
30949 return scale;
30950 },
30951 /**
30952 * Update scale
30953 * @param {boolean} isInit Param is given at the init rendering
30954 * @param {boolean} updateXDomain If update x domain
30955 * @private
30956 */
30957 updateScales: function updateScales(isInit, updateXDomain) {
30958 var _this2 = this;
30959 if (updateXDomain === void 0) {
30960 updateXDomain = !0;
30961 }
30962 var $$ = this,
30963 axis = $$.axis,
30964 config = $$.config,
30965 format = $$.format,
30966 org = $$.org,
30967 scale = $$.scale,
30968 _$$$state = $$.state,
30969 width = _$$$state.width,
30970 height = _$$$state.height,
30971 width2 = _$$$state.width2,
30972 height2 = _$$$state.height2,
30973 hasAxis = _$$$state.hasAxis;
30974 if (hasAxis) {
30975 var _scale$x,
30976 isRotated = config.axis_rotated,
30977 resettedPadding = $$.getResettedPadding(1),
30978 min = {
30979 x: isRotated ? resettedPadding : 0,
30980 y: isRotated ? 0 : height,
30981 subX: isRotated ? 1 : 0,
30982 subY: isRotated ? 0 : height2
30983 },
30984 max = {
30985 x: isRotated ? height : width,
30986 y: isRotated ? width : resettedPadding,
30987 subX: isRotated ? height : width,
30988 subY: isRotated ? width2 : 1
30989 },
30990 xDomain = updateXDomain && ((_scale$x = scale.x) == null ? void 0 : _scale$x.orgDomain()),
30991 xSubDomain = updateXDomain && org.xDomain;
30992 scale.x = $$.getXScale(min.x, max.x, xDomain, function () {
30993 _newArrowCheck(this, _this2);
30994 return axis.x.tickOffset();
30995 }.bind(this));
30996 scale.subX = $$.getXScale(min.x, max.x, xSubDomain, function (d) {
30997 var _axis$subX;
30998 _newArrowCheck(this, _this2);
30999 return d % 1 ? 0 : ((_axis$subX = axis.subX) != null ? _axis$subX : axis.x).tickOffset();
31000 }.bind(this));
31001 format.xAxisTick = axis.getXAxisTickFormat();
31002 format.subXAxisTick = axis.getXAxisTickFormat(!0);
31003 axis.setAxis("x", scale.x, config.axis_x_tick_outer, isInit);
31004 if (config.subchart_show) {
31005 axis.setAxis("subX", scale.subX, config.axis_x_tick_outer, isInit);
31006 }
31007
31008 // y Axis
31009 scale.y = $$.getYScale("y", min.y, max.y, scale.y ? scale.y.domain() : config.axis_y_default);
31010 scale.subY = $$.getYScale("y", min.subY, max.subY, scale.subY ? scale.subY.domain() : config.axis_y_default);
31011 axis.setAxis("y", scale.y, config.axis_y_tick_outer, isInit);
31012
31013 // y2 Axis
31014 if (config.axis_y2_show) {
31015 scale.y2 = $$.getYScale("y2", min.y, max.y, scale.y2 ? scale.y2.domain() : config.axis_y2_default);
31016 scale.subY2 = $$.getYScale("y2", min.subY, max.subY, scale.subY2 ? scale.subY2.domain() : config.axis_y2_default);
31017 axis.setAxis("y2", scale.y2, config.axis_y2_tick_outer, isInit);
31018 }
31019 } else {
31020 // update for arc
31021 $$.updateArc == null ? void 0 : $$.updateArc();
31022 }
31023 },
31024 /**
31025 * Get the zoom or unzoomed scaled value
31026 * @param {Date|number|object} d Data value
31027 * @returns {number|null}
31028 * @private
31029 */
31030 xx: function xx(d) {
31031 var $$ = this,
31032 config = $$.config,
31033 _$$$scale = $$.scale,
31034 x = _$$$scale.x,
31035 zoom = _$$$scale.zoom,
31036 fn = config.zoom_enabled && zoom ? zoom : x;
31037 return d ? fn(isValue(d.x) ? d.x : d) : null;
31038 },
31039 xv: function xv(d) {
31040 var $$ = this,
31041 axis = $$.axis,
31042 config = $$.config,
31043 _$$$scale2 = $$.scale,
31044 x = _$$$scale2.x,
31045 zoom = _$$$scale2.zoom,
31046 fn = config.zoom_enabled && zoom ? zoom : x,
31047 value = $$.getBaseValue(d);
31048 if (axis.isTimeSeries()) {
31049 value = parseDate.call($$, value);
31050 } else if (axis.isCategorized() && isString(value)) {
31051 value = config.axis_x_categories.indexOf(value);
31052 }
31053 return Math.ceil(fn(value));
31054 },
31055 yv: function yv(d) {
31056 var $$ = this,
31057 _$$$scale3 = $$.scale,
31058 y = _$$$scale3.y,
31059 y2 = _$$$scale3.y2,
31060 yScale = d.axis && d.axis === "y2" ? y2 : y;
31061 return Math.ceil(yScale($$.getBaseValue(d)));
31062 },
31063 subxx: function subxx(d) {
31064 return d ? this.scale.subX(d.x) : null;
31065 }
31066});
31067;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/basis.js
31068function _point(that, x, y) {
31069 that._context.bezierCurveTo((2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6);
31070}
31071
31072function Basis(context) {
31073 this._context = context;
31074}
31075Basis.prototype = {
31076 areaStart: function areaStart() {
31077 this._line = 0;
31078 },
31079 areaEnd: function areaEnd() {
31080 this._line = NaN;
31081 },
31082 lineStart: function lineStart() {
31083 this._x0 = this._x1 = this._y0 = this._y1 = NaN;
31084 this._point = 0;
31085 },
31086 lineEnd: function lineEnd() {
31087 switch (this._point) {
31088 case 3:
31089 _point(this, this._x1, this._y1);
31090 // falls through
31091 case 2:
31092 this._context.lineTo(this._x1, this._y1);
31093 break;
31094 }
31095 if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
31096 this._line = 1 - this._line;
31097 },
31098 point: function point(x, y) {
31099 x = +x, y = +y;
31100 switch (this._point) {
31101 case 0:
31102 this._point = 1;
31103 this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
31104 break;
31105 case 1:
31106 this._point = 2;
31107 break;
31108 case 2:
31109 this._point = 3;
31110 this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
31111 // falls through
31112 default:
31113 _point(this, x, y);
31114 break;
31115 }
31116 this._x0 = this._x1, this._x1 = x;
31117 this._y0 = this._y1, this._y1 = y;
31118 }
31119};
31120/* harmony default export */ function curve_basis(context) {
31121 return new Basis(context);
31122}
31123;// CONCATENATED MODULE: ./node_modules/d3-shape/src/noop.js
31124/* harmony default export */ function src_noop() {}
31125;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/basisClosed.js
31126
31127
31128function BasisClosed(context) {
31129 this._context = context;
31130}
31131BasisClosed.prototype = {
31132 areaStart: src_noop,
31133 areaEnd: src_noop,
31134 lineStart: function lineStart() {
31135 this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;
31136 this._point = 0;
31137 },
31138 lineEnd: function lineEnd() {
31139 switch (this._point) {
31140 case 1:
31141 {
31142 this._context.moveTo(this._x2, this._y2);
31143 this._context.closePath();
31144 break;
31145 }
31146 case 2:
31147 {
31148 this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);
31149 this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);
31150 this._context.closePath();
31151 break;
31152 }
31153 case 3:
31154 {
31155 this.point(this._x2, this._y2);
31156 this.point(this._x3, this._y3);
31157 this.point(this._x4, this._y4);
31158 break;
31159 }
31160 }
31161 },
31162 point: function point(x, y) {
31163 x = +x, y = +y;
31164 switch (this._point) {
31165 case 0:
31166 this._point = 1;
31167 this._x2 = x, this._y2 = y;
31168 break;
31169 case 1:
31170 this._point = 2;
31171 this._x3 = x, this._y3 = y;
31172 break;
31173 case 2:
31174 this._point = 3;
31175 this._x4 = x, this._y4 = y;
31176 this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6);
31177 break;
31178 default:
31179 _point(this, x, y);
31180 break;
31181 }
31182 this._x0 = this._x1, this._x1 = x;
31183 this._y0 = this._y1, this._y1 = y;
31184 }
31185};
31186/* harmony default export */ function curve_basisClosed(context) {
31187 return new BasisClosed(context);
31188}
31189;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/basisOpen.js
31190
31191function BasisOpen(context) {
31192 this._context = context;
31193}
31194BasisOpen.prototype = {
31195 areaStart: function areaStart() {
31196 this._line = 0;
31197 },
31198 areaEnd: function areaEnd() {
31199 this._line = NaN;
31200 },
31201 lineStart: function lineStart() {
31202 this._x0 = this._x1 = this._y0 = this._y1 = NaN;
31203 this._point = 0;
31204 },
31205 lineEnd: function lineEnd() {
31206 if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
31207 this._line = 1 - this._line;
31208 },
31209 point: function point(x, y) {
31210 x = +x, y = +y;
31211 switch (this._point) {
31212 case 0:
31213 this._point = 1;
31214 break;
31215 case 1:
31216 this._point = 2;
31217 break;
31218 case 2:
31219 this._point = 3;
31220 var x0 = (this._x0 + 4 * this._x1 + x) / 6,
31221 y0 = (this._y0 + 4 * this._y1 + y) / 6;
31222 this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0);
31223 break;
31224 case 3:
31225 this._point = 4;
31226 // falls through
31227 default:
31228 _point(this, x, y);
31229 break;
31230 }
31231 this._x0 = this._x1, this._x1 = x;
31232 this._y0 = this._y1, this._y1 = y;
31233 }
31234};
31235/* harmony default export */ function basisOpen(context) {
31236 return new BasisOpen(context);
31237}
31238;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/bundle.js
31239
31240function Bundle(context, beta) {
31241 this._basis = new Basis(context);
31242 this._beta = beta;
31243}
31244Bundle.prototype = {
31245 lineStart: function lineStart() {
31246 this._x = [];
31247 this._y = [];
31248 this._basis.lineStart();
31249 },
31250 lineEnd: function lineEnd() {
31251 var x = this._x,
31252 y = this._y,
31253 j = x.length - 1;
31254 if (j > 0) {
31255 var x0 = x[0],
31256 y0 = y[0],
31257 dx = x[j] - x0,
31258 dy = y[j] - y0,
31259 i = -1,
31260 t;
31261 while (++i <= j) {
31262 t = i / j;
31263 this._basis.point(this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), this._beta * y[i] + (1 - this._beta) * (y0 + t * dy));
31264 }
31265 }
31266 this._x = this._y = null;
31267 this._basis.lineEnd();
31268 },
31269 point: function point(x, y) {
31270 this._x.push(+x);
31271 this._y.push(+y);
31272 }
31273};
31274/* harmony default export */ var bundle = ((function custom(beta) {
31275 function bundle(context) {
31276 return beta === 1 ? new Basis(context) : new Bundle(context, beta);
31277 }
31278 bundle.beta = function (beta) {
31279 return custom(+beta);
31280 };
31281 return bundle;
31282})(.85));
31283;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/cardinal.js
31284function cardinal_point(that, x, y) {
31285 that._context.bezierCurveTo(that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2);
31286}
31287
31288function Cardinal(context, tension) {
31289 this._context = context;
31290 this._k = (1 - tension) / 6;
31291}
31292Cardinal.prototype = {
31293 areaStart: function areaStart() {
31294 this._line = 0;
31295 },
31296 areaEnd: function areaEnd() {
31297 this._line = NaN;
31298 },
31299 lineStart: function lineStart() {
31300 this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
31301 this._point = 0;
31302 },
31303 lineEnd: function lineEnd() {
31304 switch (this._point) {
31305 case 2:
31306 this._context.lineTo(this._x2, this._y2);
31307 break;
31308 case 3:
31309 cardinal_point(this, this._x1, this._y1);
31310 break;
31311 }
31312 if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
31313 this._line = 1 - this._line;
31314 },
31315 point: function point(x, y) {
31316 x = +x, y = +y;
31317 switch (this._point) {
31318 case 0:
31319 this._point = 1;
31320 this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
31321 break;
31322 case 1:
31323 this._point = 2;
31324 this._x1 = x, this._y1 = y;
31325 break;
31326 case 2:
31327 this._point = 3;
31328 // falls through
31329 default:
31330 cardinal_point(this, x, y);
31331 break;
31332 }
31333 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31334 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31335 }
31336};
31337/* harmony default export */ var cardinal = ((function custom(tension) {
31338 function cardinal(context) {
31339 return new Cardinal(context, tension);
31340 }
31341 cardinal.tension = function (tension) {
31342 return custom(+tension);
31343 };
31344 return cardinal;
31345})(0));
31346;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/cardinalClosed.js
31347
31348
31349function CardinalClosed(context, tension) {
31350 this._context = context;
31351 this._k = (1 - tension) / 6;
31352}
31353CardinalClosed.prototype = {
31354 areaStart: src_noop,
31355 areaEnd: src_noop,
31356 lineStart: function lineStart() {
31357 this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
31358 this._point = 0;
31359 },
31360 lineEnd: function lineEnd() {
31361 switch (this._point) {
31362 case 1:
31363 {
31364 this._context.moveTo(this._x3, this._y3);
31365 this._context.closePath();
31366 break;
31367 }
31368 case 2:
31369 {
31370 this._context.lineTo(this._x3, this._y3);
31371 this._context.closePath();
31372 break;
31373 }
31374 case 3:
31375 {
31376 this.point(this._x3, this._y3);
31377 this.point(this._x4, this._y4);
31378 this.point(this._x5, this._y5);
31379 break;
31380 }
31381 }
31382 },
31383 point: function point(x, y) {
31384 x = +x, y = +y;
31385 switch (this._point) {
31386 case 0:
31387 this._point = 1;
31388 this._x3 = x, this._y3 = y;
31389 break;
31390 case 1:
31391 this._point = 2;
31392 this._context.moveTo(this._x4 = x, this._y4 = y);
31393 break;
31394 case 2:
31395 this._point = 3;
31396 this._x5 = x, this._y5 = y;
31397 break;
31398 default:
31399 cardinal_point(this, x, y);
31400 break;
31401 }
31402 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31403 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31404 }
31405};
31406/* harmony default export */ var cardinalClosed = ((function custom(tension) {
31407 function cardinal(context) {
31408 return new CardinalClosed(context, tension);
31409 }
31410 cardinal.tension = function (tension) {
31411 return custom(+tension);
31412 };
31413 return cardinal;
31414})(0));
31415;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/cardinalOpen.js
31416
31417function CardinalOpen(context, tension) {
31418 this._context = context;
31419 this._k = (1 - tension) / 6;
31420}
31421CardinalOpen.prototype = {
31422 areaStart: function areaStart() {
31423 this._line = 0;
31424 },
31425 areaEnd: function areaEnd() {
31426 this._line = NaN;
31427 },
31428 lineStart: function lineStart() {
31429 this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
31430 this._point = 0;
31431 },
31432 lineEnd: function lineEnd() {
31433 if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
31434 this._line = 1 - this._line;
31435 },
31436 point: function point(x, y) {
31437 x = +x, y = +y;
31438 switch (this._point) {
31439 case 0:
31440 this._point = 1;
31441 break;
31442 case 1:
31443 this._point = 2;
31444 break;
31445 case 2:
31446 this._point = 3;
31447 this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
31448 break;
31449 case 3:
31450 this._point = 4;
31451 // falls through
31452 default:
31453 cardinal_point(this, x, y);
31454 break;
31455 }
31456 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31457 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31458 }
31459};
31460/* harmony default export */ var cardinalOpen = ((function custom(tension) {
31461 function cardinal(context) {
31462 return new CardinalOpen(context, tension);
31463 }
31464 cardinal.tension = function (tension) {
31465 return custom(+tension);
31466 };
31467 return cardinal;
31468})(0));
31469;// CONCATENATED MODULE: ./node_modules/d3-shape/src/math.js
31470var math_abs = Math.abs;
31471var atan2 = Math.atan2;
31472var cos = Math.cos;
31473var math_max = Math.max;
31474var math_min = Math.min;
31475var sin = Math.sin;
31476var sqrt = Math.sqrt;
31477var epsilon = 1e-12;
31478var pi = Math.PI;
31479var halfPi = pi / 2;
31480var tau = 2 * pi;
31481function acos(x) {
31482 return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);
31483}
31484function asin(x) {
31485 return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);
31486}
31487;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/catmullRom.js
31488
31489
31490function catmullRom_point(that, x, y) {
31491 var x1 = that._x1,
31492 y1 = that._y1,
31493 x2 = that._x2,
31494 y2 = that._y2;
31495 if (that._l01_a > epsilon) {
31496 var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,
31497 n = 3 * that._l01_a * (that._l01_a + that._l12_a);
31498 x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
31499 y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
31500 }
31501 if (that._l23_a > epsilon) {
31502 var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,
31503 m = 3 * that._l23_a * (that._l23_a + that._l12_a);
31504 x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
31505 y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;
31506 }
31507 that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
31508}
31509
31510function CatmullRom(context, alpha) {
31511 this._context = context;
31512 this._alpha = alpha;
31513}
31514CatmullRom.prototype = {
31515 areaStart: function areaStart() {
31516 this._line = 0;
31517 },
31518 areaEnd: function areaEnd() {
31519 this._line = NaN;
31520 },
31521 lineStart: function lineStart() {
31522 this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
31523 this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
31524 },
31525 lineEnd: function lineEnd() {
31526 switch (this._point) {
31527 case 2:
31528 this._context.lineTo(this._x2, this._y2);
31529 break;
31530 case 3:
31531 this.point(this._x2, this._y2);
31532 break;
31533 }
31534 if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
31535 this._line = 1 - this._line;
31536 },
31537 point: function point(x, y) {
31538 x = +x, y = +y;
31539 if (this._point) {
31540 var x23 = this._x2 - x,
31541 y23 = this._y2 - y;
31542 this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
31543 }
31544 switch (this._point) {
31545 case 0:
31546 this._point = 1;
31547 this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
31548 break;
31549 case 1:
31550 this._point = 2;
31551 break;
31552 case 2:
31553 this._point = 3;
31554 // falls through
31555 default:
31556 catmullRom_point(this, x, y);
31557 break;
31558 }
31559 this._l01_a = this._l12_a, this._l12_a = this._l23_a;
31560 this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
31561 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31562 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31563 }
31564};
31565/* harmony default export */ var catmullRom = ((function custom(alpha) {
31566 function catmullRom(context) {
31567 return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
31568 }
31569 catmullRom.alpha = function (alpha) {
31570 return custom(+alpha);
31571 };
31572 return catmullRom;
31573})(.5));
31574;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/catmullRomClosed.js
31575
31576
31577
31578function CatmullRomClosed(context, alpha) {
31579 this._context = context;
31580 this._alpha = alpha;
31581}
31582CatmullRomClosed.prototype = {
31583 areaStart: src_noop,
31584 areaEnd: src_noop,
31585 lineStart: function lineStart() {
31586 this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
31587 this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
31588 },
31589 lineEnd: function lineEnd() {
31590 switch (this._point) {
31591 case 1:
31592 {
31593 this._context.moveTo(this._x3, this._y3);
31594 this._context.closePath();
31595 break;
31596 }
31597 case 2:
31598 {
31599 this._context.lineTo(this._x3, this._y3);
31600 this._context.closePath();
31601 break;
31602 }
31603 case 3:
31604 {
31605 this.point(this._x3, this._y3);
31606 this.point(this._x4, this._y4);
31607 this.point(this._x5, this._y5);
31608 break;
31609 }
31610 }
31611 },
31612 point: function point(x, y) {
31613 x = +x, y = +y;
31614 if (this._point) {
31615 var x23 = this._x2 - x,
31616 y23 = this._y2 - y;
31617 this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
31618 }
31619 switch (this._point) {
31620 case 0:
31621 this._point = 1;
31622 this._x3 = x, this._y3 = y;
31623 break;
31624 case 1:
31625 this._point = 2;
31626 this._context.moveTo(this._x4 = x, this._y4 = y);
31627 break;
31628 case 2:
31629 this._point = 3;
31630 this._x5 = x, this._y5 = y;
31631 break;
31632 default:
31633 catmullRom_point(this, x, y);
31634 break;
31635 }
31636 this._l01_a = this._l12_a, this._l12_a = this._l23_a;
31637 this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
31638 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31639 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31640 }
31641};
31642/* harmony default export */ var catmullRomClosed = ((function custom(alpha) {
31643 function catmullRom(context) {
31644 return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);
31645 }
31646 catmullRom.alpha = function (alpha) {
31647 return custom(+alpha);
31648 };
31649 return catmullRom;
31650})(.5));
31651;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/catmullRomOpen.js
31652
31653
31654function CatmullRomOpen(context, alpha) {
31655 this._context = context;
31656 this._alpha = alpha;
31657}
31658CatmullRomOpen.prototype = {
31659 areaStart: function areaStart() {
31660 this._line = 0;
31661 },
31662 areaEnd: function areaEnd() {
31663 this._line = NaN;
31664 },
31665 lineStart: function lineStart() {
31666 this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
31667 this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
31668 },
31669 lineEnd: function lineEnd() {
31670 if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
31671 this._line = 1 - this._line;
31672 },
31673 point: function point(x, y) {
31674 x = +x, y = +y;
31675 if (this._point) {
31676 var x23 = this._x2 - x,
31677 y23 = this._y2 - y;
31678 this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
31679 }
31680 switch (this._point) {
31681 case 0:
31682 this._point = 1;
31683 break;
31684 case 1:
31685 this._point = 2;
31686 break;
31687 case 2:
31688 this._point = 3;
31689 this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
31690 break;
31691 case 3:
31692 this._point = 4;
31693 // falls through
31694 default:
31695 catmullRom_point(this, x, y);
31696 break;
31697 }
31698 this._l01_a = this._l12_a, this._l12_a = this._l23_a;
31699 this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
31700 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31701 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31702 }
31703};
31704/* harmony default export */ var catmullRomOpen = ((function custom(alpha) {
31705 function catmullRom(context) {
31706 return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);
31707 }
31708 catmullRom.alpha = function (alpha) {
31709 return custom(+alpha);
31710 };
31711 return catmullRom;
31712})(.5));
31713;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/monotone.js
31714function sign(x) {
31715 return x < 0 ? -1 : 1;
31716}
31717
31718// Calculate the slopes of the tangents (Hermite-type interpolation) based on
31719// the following paper: Steffen, M. 1990. A Simple Method for Monotonic
31720// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.
31721// NOV(II), P. 443, 1990.
31722function slope3(that, x2, y2) {
31723 var h0 = that._x1 - that._x0,
31724 h1 = x2 - that._x1,
31725 s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),
31726 s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0);
31727 return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), .5 * Math.abs((s0 * h1 + s1 * h0) / (h0 + h1))) || 0;
31728}
31729
31730// Calculate a one-sided slope.
31731function slope2(that, t) {
31732 var h = that._x1 - that._x0;
31733 return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
31734}
31735
31736// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations
31737// "you can express cubic Hermite interpolation in terms of cubic Bézier curves
31738// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1".
31739function monotone_point(that, t0, t1) {
31740 var x0 = that._x0,
31741 y0 = that._y0,
31742 x1 = that._x1,
31743 y1 = that._y1,
31744 dx = (x1 - x0) / 3;
31745 that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
31746}
31747function MonotoneX(context) {
31748 this._context = context;
31749}
31750MonotoneX.prototype = {
31751 areaStart: function areaStart() {
31752 this._line = 0;
31753 },
31754 areaEnd: function areaEnd() {
31755 this._line = NaN;
31756 },
31757 lineStart: function lineStart() {
31758 this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN;
31759 this._point = 0;
31760 },
31761 lineEnd: function lineEnd() {
31762 switch (this._point) {
31763 case 2:
31764 this._context.lineTo(this._x1, this._y1);
31765 break;
31766 case 3:
31767 monotone_point(this, this._t0, slope2(this, this._t0));
31768 break;
31769 }
31770 if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
31771 this._line = 1 - this._line;
31772 },
31773 point: function point(x, y) {
31774 var t1 = NaN;
31775 x = +x, y = +y;
31776 if (x === this._x1 && y === this._y1) return; // Ignore coincident points.
31777 switch (this._point) {
31778 case 0:
31779 this._point = 1;
31780 this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
31781 break;
31782 case 1:
31783 this._point = 2;
31784 break;
31785 case 2:
31786 this._point = 3;
31787 monotone_point(this, slope2(this, t1 = slope3(this, x, y)), t1);
31788 break;
31789 default:
31790 monotone_point(this, this._t0, t1 = slope3(this, x, y));
31791 break;
31792 }
31793 this._x0 = this._x1, this._x1 = x;
31794 this._y0 = this._y1, this._y1 = y;
31795 this._t0 = t1;
31796 }
31797};
31798function MonotoneY(context) {
31799 this._context = new ReflectContext(context);
31800}
31801(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function (x, y) {
31802 MonotoneX.prototype.point.call(this, y, x);
31803};
31804function ReflectContext(context) {
31805 this._context = context;
31806}
31807ReflectContext.prototype = {
31808 moveTo: function moveTo(x, y) {
31809 this._context.moveTo(y, x);
31810 },
31811 closePath: function closePath() {
31812 this._context.closePath();
31813 },
31814 lineTo: function lineTo(x, y) {
31815 this._context.lineTo(y, x);
31816 },
31817 bezierCurveTo: function bezierCurveTo(x1, y1, x2, y2, x, y) {
31818 this._context.bezierCurveTo(y1, x1, y2, x2, y, x);
31819 }
31820};
31821function monotoneX(context) {
31822 return new MonotoneX(context);
31823}
31824function monotoneY(context) {
31825 return new MonotoneY(context);
31826}
31827;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/natural.js
31828function Natural(context) {
31829 this._context = context;
31830}
31831Natural.prototype = {
31832 areaStart: function areaStart() {
31833 this._line = 0;
31834 },
31835 areaEnd: function areaEnd() {
31836 this._line = NaN;
31837 },
31838 lineStart: function lineStart() {
31839 this._x = [];
31840 this._y = [];
31841 },
31842 lineEnd: function lineEnd() {
31843 var x = this._x,
31844 y = this._y,
31845 n = x.length;
31846 if (n) {
31847 this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);
31848 if (n === 2) {
31849 this._context.lineTo(x[1], y[1]);
31850 } else {
31851 for (var px = controlPoints(x), py = controlPoints(y), i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {
31852 this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);
31853 }
31854 }
31855 }
31856 if (this._line || this._line !== 0 && n === 1) this._context.closePath();
31857 this._line = 1 - this._line;
31858 this._x = this._y = null;
31859 },
31860 point: function point(x, y) {
31861 this._x.push(+x);
31862 this._y.push(+y);
31863 }
31864};
31865
31866// See https://www.particleincell.com/2012/bezier-splines/ for derivation.
31867function controlPoints(x) {
31868 var i,
31869 n = x.length - 1,
31870 m,
31871 a = Array(n),
31872 b = Array(n),
31873 r = Array(n);
31874 a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];
31875 for (i = 1; i < n - 1; ++i) {
31876 a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];
31877 }
31878 a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];
31879 for (i = 1; i < n; ++i) {
31880 m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
31881 }
31882 a[n - 1] = r[n - 1] / b[n - 1];
31883 for (i = n - 2; i >= 0; --i) {
31884 a[i] = (r[i] - a[i + 1]) / b[i];
31885 }
31886 b[n - 1] = (x[n] + a[n - 1]) / 2;
31887 for (i = 0; i < n - 1; ++i) {
31888 b[i] = 2 * x[i + 1] - a[i + 1];
31889 }
31890 return [a, b];
31891}
31892/* harmony default export */ function natural(context) {
31893 return new Natural(context);
31894}
31895;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/linearClosed.js
31896
31897function LinearClosed(context) {
31898 this._context = context;
31899}
31900LinearClosed.prototype = {
31901 areaStart: src_noop,
31902 areaEnd: src_noop,
31903 lineStart: function lineStart() {
31904 this._point = 0;
31905 },
31906 lineEnd: function lineEnd() {
31907 if (this._point) this._context.closePath();
31908 },
31909 point: function point(x, y) {
31910 x = +x, y = +y;
31911 if (this._point) this._context.lineTo(x, y);else this._point = 1, this._context.moveTo(x, y);
31912 }
31913};
31914/* harmony default export */ function linearClosed(context) {
31915 return new LinearClosed(context);
31916}
31917;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/linear.js
31918function Linear(context) {
31919 this._context = context;
31920}
31921Linear.prototype = {
31922 areaStart: function areaStart() {
31923 this._line = 0;
31924 },
31925 areaEnd: function areaEnd() {
31926 this._line = NaN;
31927 },
31928 lineStart: function lineStart() {
31929 this._point = 0;
31930 },
31931 lineEnd: function lineEnd() {
31932 if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
31933 this._line = 1 - this._line;
31934 },
31935 point: function point(x, y) {
31936 x = +x, y = +y;
31937 switch (this._point) {
31938 case 0:
31939 this._point = 1;
31940 this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
31941 break;
31942 case 1:
31943 this._point = 2;
31944 // falls through
31945 default:
31946 this._context.lineTo(x, y);
31947 break;
31948 }
31949 }
31950};
31951/* harmony default export */ function curve_linear(context) {
31952 return new Linear(context);
31953}
31954;// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/step.js
31955function Step(context, t) {
31956 this._context = context;
31957 this._t = t;
31958}
31959Step.prototype = {
31960 areaStart: function areaStart() {
31961 this._line = 0;
31962 },
31963 areaEnd: function areaEnd() {
31964 this._line = NaN;
31965 },
31966 lineStart: function lineStart() {
31967 this._x = this._y = NaN;
31968 this._point = 0;
31969 },
31970 lineEnd: function lineEnd() {
31971 if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);
31972 if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
31973 if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;
31974 },
31975 point: function point(x, y) {
31976 x = +x, y = +y;
31977 switch (this._point) {
31978 case 0:
31979 this._point = 1;
31980 this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
31981 break;
31982 case 1:
31983 this._point = 2;
31984 // falls through
31985 default:
31986 {
31987 if (this._t <= 0) {
31988 this._context.lineTo(this._x, y);
31989 this._context.lineTo(x, y);
31990 } else {
31991 var x1 = this._x * (1 - this._t) + x * this._t;
31992 this._context.lineTo(x1, this._y);
31993 this._context.lineTo(x1, y);
31994 }
31995 break;
31996 }
31997 }
31998 this._x = x, this._y = y;
31999 }
32000};
32001/* harmony default export */ function step(context) {
32002 return new Step(context, .5);
32003}
32004function stepBefore(context) {
32005 return new Step(context, 0);
32006}
32007function stepAfter(context) {
32008 return new Step(context, 1);
32009}
32010;// CONCATENATED MODULE: ./src/ChartInternal/shape/shape.ts
32011
32012/**
32013 * Copyright (c) 2017 ~ present NAVER Corp.
32014 * billboard.js project is licensed under the MIT license
32015 */
32016
32017
32018
32019
32020/* harmony default export */ var shape = ({
32021 /**
32022 * Get the shape draw function
32023 * @returns {object}
32024 * @private
32025 */
32026 getDrawShape: function getDrawShape() {
32027 var _this = this,
32028 $$ = this,
32029 isRotated = $$.config.axis_rotated,
32030 hasRadar = $$.state.hasRadar,
32031 shape = {
32032 type: {},
32033 indices: {},
32034 pos: {}
32035 };
32036 ["bar", "candlestick", "line", "area"].forEach(function (v) {
32037 _newArrowCheck(this, _this);
32038 var name = capitalize(/^(bubble|scatter)$/.test(v) ? "line" : v);
32039 if ($$.hasType(v) || $$.hasTypeOf(name) || v === "line" && ($$.hasType("bubble") || $$.hasType("scatter"))) {
32040 var indices = $$.getShapeIndices($$["is" + name + "Type"]),
32041 drawFn = $$["generateDraw" + name];
32042 shape.indices[v] = indices;
32043 shape.type[v] = drawFn ? drawFn.bind($$)(indices, !1) : undefined;
32044 }
32045 }.bind(this));
32046 if (!$$.hasArcType() || hasRadar) {
32047 // generate circle x/y functions depending on updated params
32048 var cx = hasRadar ? $$.radarCircleX : isRotated ? $$.circleY : $$.circleX,
32049 cy = hasRadar ? $$.radarCircleY : isRotated ? $$.circleX : $$.circleY;
32050 shape.pos = {
32051 xForText: $$.generateXYForText(shape.indices, !0),
32052 yForText: $$.generateXYForText(shape.indices, !1),
32053 cx: (cx || function () {}).bind($$),
32054 cy: (cy || function () {}).bind($$)
32055 };
32056 }
32057 return shape;
32058 },
32059 /**
32060 * Get shape's indices according it's position
32061 *
32062 * From the below example, indices will be:
32063 * ==> {data1: 0, data2: 0, data3: 1, data4: 1, __max__: 1}
32064 *
32065 * data1 data3 data1 data3
32066 * data2 data4 data2 data4
32067 * -------------------------
32068 * 0 1
32069 * @param {Function} typeFilter Chart type filter function
32070 * @returns {object} Indices object with its position
32071 */
32072 getShapeIndices: function getShapeIndices(typeFilter) {
32073 var _this2 = this,
32074 $$ = this,
32075 config = $$.config,
32076 xs = config.data_xs,
32077 hasXs = notEmpty(xs),
32078 indices = {},
32079 i = hasXs ? {} : 0;
32080 if (hasXs) {
32081 getUnique(Object.keys(xs).map(function (v) {
32082 _newArrowCheck(this, _this2);
32083 return xs[v];
32084 }.bind(this))).forEach(function (v) {
32085 _newArrowCheck(this, _this2);
32086 i[v] = 0;
32087 indices[v] = {};
32088 }.bind(this));
32089 }
32090 $$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)).forEach(function (d) {
32091 _newArrowCheck(this, _this2);
32092 var xKey = d.id in xs ? xs[d.id] : "",
32093 ind = xKey ? indices[xKey] : indices;
32094 for (var j = 0, groups; groups = config.data_groups[j]; j++) {
32095 if (groups.indexOf(d.id) < 0) {
32096 continue;
32097 }
32098 for (var k = 0, row; row = groups[k]; k++) {
32099 if (row in ind) {
32100 ind[d.id] = ind[row];
32101 break;
32102 }
32103 }
32104 }
32105 if (isUndefined(ind[d.id])) {
32106 ind[d.id] = xKey ? i[xKey]++ : i++;
32107 ind.__max__ = (xKey ? i[xKey] : i) - 1;
32108 }
32109 }.bind(this));
32110 return indices;
32111 },
32112 /**
32113 * Get indices value based on data ID value
32114 * @param {object} indices Indices object
32115 * @param {object} d Data row
32116 * @param {string} caller Caller function name (Used only for 'sparkline' plugin)
32117 * @returns {object} Indices object
32118 * @private
32119 */
32120 getIndices: function getIndices(indices, d) {
32121 var _this3 = this,
32122 $$ = this,
32123 _$$$config = $$.config,
32124 xs = _$$$config.data_xs,
32125 removeNull = _$$$config.bar_indices_removeNull,
32126 id = d.id,
32127 index = d.index;
32128 if ($$.isBarType(id) && removeNull) {
32129 var ind = {};
32130
32131 // redefine bar indices order
32132 $$.getAllValuesOnIndex(index, !0).forEach(function (v, i) {
32133 _newArrowCheck(this, _this3);
32134 ind[v.id] = i;
32135 ind.__max__ = i;
32136 }.bind(this));
32137 return ind;
32138 }
32139 return notEmpty(xs) ? indices[xs[id]] : indices;
32140 },
32141 /**
32142 * Get indices max number
32143 * @param {object} indices Indices object
32144 * @returns {number} Max number
32145 * @private
32146 */
32147 getIndicesMax: function getIndicesMax(indices) {
32148 var _this4 = this;
32149 return notEmpty(this.config.data_xs) ?
32150 // if is multiple xs, return total sum of xs' __max__ value
32151 Object.keys(indices).map(function (v) {
32152 _newArrowCheck(this, _this4);
32153 return indices[v].__max__ || 0;
32154 }.bind(this)).reduce(function (acc, curr) {
32155 _newArrowCheck(this, _this4);
32156 return acc + curr;
32157 }.bind(this)) : indices.__max__;
32158 },
32159 getShapeX: function getShapeX(offset, indices, isSub) {
32160 var _this5 = this,
32161 $$ = this,
32162 config = $$.config,
32163 scale = $$.scale,
32164 currScale = isSub ? scale.subX : scale.zoom || scale.x,
32165 barOverlap = config.bar_overlap,
32166 barPadding = config.bar_padding,
32167 sum = function (p, c) {
32168 _newArrowCheck(this, _this5);
32169 return p + c;
32170 }.bind(this),
32171 halfWidth = isObjectType(offset) && (offset._$total.length ? offset._$total.reduce(sum) / 2 : 0);
32172 return function (d) {
32173 _newArrowCheck(this, _this5);
32174 var ind = $$.getIndices(indices, d, "getShapeX"),
32175 index = d.id in ind ? ind[d.id] : 0,
32176 targetsNum = (ind.__max__ || 0) + 1,
32177 x = 0;
32178 if (notEmpty(d.x)) {
32179 var xPos = currScale(d.x, !0);
32180 if (halfWidth) {
32181 var offsetWidth = offset[d.id] || offset._$width;
32182 x = barOverlap ? xPos - offsetWidth / 2 : xPos - offsetWidth + offset._$total.slice(0, index + 1).reduce(sum) - halfWidth;
32183 } else {
32184 x = xPos - (isNumber(offset) ? offset : offset._$width) * (targetsNum / 2 - (barOverlap ? 1 : index));
32185 }
32186 }
32187
32188 // adjust x position for bar.padding option
32189 if (offset && x && targetsNum > 1 && barPadding) {
32190 if (index) {
32191 x += barPadding * index;
32192 }
32193 if (targetsNum > 2) {
32194 x -= (targetsNum - 1) * barPadding / 2;
32195 } else if (targetsNum === 2) {
32196 x -= barPadding / 2;
32197 }
32198 }
32199 return x;
32200 }.bind(this);
32201 },
32202 getShapeY: function getShapeY(isSub) {
32203 var _this6 = this,
32204 $$ = this,
32205 isStackNormalized = $$.isStackNormalized();
32206 return function (d) {
32207 _newArrowCheck(this, _this6);
32208 var value = d.value;
32209 if (isNumber(d)) {
32210 value = d;
32211 } else if (isStackNormalized) {
32212 value = $$.getRatio("index", d, !0);
32213 } else if ($$.isBubbleZType(d)) {
32214 value = $$.getBubbleZData(d.value, "y");
32215 } else if ($$.isBarRangeType(d)) {
32216 // TODO use range.getEnd() like method
32217 value = value[1];
32218 }
32219 return $$.getYScaleById(d.id, isSub)(value);
32220 }.bind(this);
32221 },
32222 /**
32223 * Get shape based y Axis min value
32224 * @param {string} id Data id
32225 * @returns {number}
32226 * @private
32227 */
32228 getShapeYMin: function getShapeYMin(id) {
32229 var $$ = this,
32230 axisId = $$.axis.getId(id),
32231 scale = $$.scale[axisId],
32232 _scale$domain = scale.domain(),
32233 yMin = _scale$domain[0],
32234 inverted = $$.config["axis_" + axisId + "_inverted"];
32235 return !$$.isGrouped(id) && !inverted && yMin > 0 ? yMin : 0;
32236 },
32237 /**
32238 * Get Shape's offset data
32239 * @param {Function} typeFilter Type filter function
32240 * @returns {object}
32241 * @private
32242 */
32243 getShapeOffsetData: function getShapeOffsetData(typeFilter) {
32244 var _this7 = this,
32245 $$ = this,
32246 targets = $$.orderTargets($$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$))),
32247 isStackNormalized = $$.isStackNormalized(),
32248 shapeOffsetTargets = targets.map(function (target) {
32249 var _this8 = this;
32250 _newArrowCheck(this, _this7);
32251 var rowValues = target.values,
32252 values = {};
32253 if ($$.isStepType(target)) {
32254 rowValues = $$.convertValuesToStep(rowValues);
32255 }
32256 var rowValueMapByXValue = rowValues.reduce(function (out, d) {
32257 _newArrowCheck(this, _this8);
32258 var key = +d.x;
32259 out[key] = d;
32260 values[key] = isStackNormalized ? $$.getRatio("index", d, !0) : d.value;
32261 return out;
32262 }.bind(this), {});
32263 return {
32264 id: target.id,
32265 rowValues: rowValues,
32266 rowValueMapByXValue: rowValueMapByXValue,
32267 values: values
32268 };
32269 }.bind(this)),
32270 indexMapByTargetId = targets.reduce(function (out, _ref, index) {
32271 var id = _ref.id;
32272 _newArrowCheck(this, _this7);
32273 out[id] = index;
32274 return out;
32275 }.bind(this), {});
32276 return {
32277 indexMapByTargetId: indexMapByTargetId,
32278 shapeOffsetTargets: shapeOffsetTargets
32279 };
32280 },
32281 getShapeOffset: function getShapeOffset(typeFilter, indices, isSub) {
32282 var _this9 = this,
32283 $$ = this,
32284 _$$$getShapeOffsetDat = $$.getShapeOffsetData(typeFilter),
32285 shapeOffsetTargets = _$$$getShapeOffsetDat.shapeOffsetTargets,
32286 indexMapByTargetId = _$$$getShapeOffsetDat.indexMapByTargetId,
32287 groupsZeroAs = $$.config.data_groupsZeroAs;
32288 return function (d, idx) {
32289 var _this10 = this;
32290 _newArrowCheck(this, _this9);
32291 var id = d.id,
32292 value = d.value,
32293 x = d.x,
32294 ind = $$.getIndices(indices, d),
32295 scale = $$.getYScaleById(id, isSub);
32296 if ($$.isBarRangeType(d)) {
32297 // TODO use range.getStart()
32298 return scale(value[0]);
32299 }
32300 var dataXAsNumber = +x,
32301 y0 = scale(groupsZeroAs === "zero" ? 0 : $$.getShapeYMin(id)),
32302 offset = y0;
32303 shapeOffsetTargets.filter(function (t) {
32304 _newArrowCheck(this, _this10);
32305 return t.id !== id && ind[t.id] === ind[id];
32306 }.bind(this)).forEach(function (t) {
32307 _newArrowCheck(this, _this10);
32308 var tid = t.id,
32309 rowValueMapByXValue = t.rowValueMapByXValue,
32310 rowValues = t.rowValues,
32311 tvalues = t.values;
32312
32313 // for same stacked group (ind[tid] === ind[id])
32314 if (indexMapByTargetId[tid] < indexMapByTargetId[id]) {
32315 var _row,
32316 rValue = tvalues[dataXAsNumber],
32317 row = rowValues[idx];
32318 // check if the x values line up
32319 if (!row || +row.x !== dataXAsNumber) {
32320 row = rowValueMapByXValue[dataXAsNumber];
32321 }
32322 if (((_row = row) == null ? void 0 : _row.value) * value >= 0 && isNumber(rValue)) {
32323 var addOffset = value === 0 ? groupsZeroAs === "positive" && rValue > 0 || groupsZeroAs === "negative" && rValue < 0 : !0;
32324 if (addOffset) {
32325 offset += scale(rValue) - y0;
32326 }
32327 }
32328 }
32329 }.bind(this));
32330 return offset;
32331 }.bind(this);
32332 },
32333 getBarW: function getBarW(type, axis, targetsNum) {
32334 var _this11 = this,
32335 $$ = this,
32336 config = $$.config,
32337 org = $$.org,
32338 scale = $$.scale,
32339 maxDataCount = $$.getMaxDataCount(),
32340 isGrouped = type === "bar" && config.data_groups.length,
32341 configName = type + "_width",
32342 tickInterval = scale.zoom && !$$.axis.isCategorized() ? org.xDomain.map(function (v) {
32343 _newArrowCheck(this, _this11);
32344 return scale.zoom(v);
32345 }.bind(this)).reduce(function (a, c) {
32346 _newArrowCheck(this, _this11);
32347 return Math.abs(a) + c;
32348 }.bind(this)) / maxDataCount : axis.tickInterval(maxDataCount),
32349 getWidth = function (id) {
32350 _newArrowCheck(this, _this11);
32351 var width = id ? config[configName][id] : config[configName],
32352 ratio = id ? width.ratio : config[configName + "_ratio"],
32353 max = id ? width.max : config[configName + "_max"],
32354 w = isNumber(width) ? width : targetsNum ? tickInterval * ratio / targetsNum : 0;
32355 return max && w > max ? max : w;
32356 }.bind(this),
32357 result = getWidth();
32358 if (!isGrouped && isObjectType(config[configName])) {
32359 result = {
32360 _$width: result,
32361 _$total: []
32362 };
32363 $$.filterTargetsToShow($$.data.targets).forEach(function (v) {
32364 _newArrowCheck(this, _this11);
32365 if (config[configName][v.id]) {
32366 result[v.id] = getWidth(v.id);
32367 result._$total.push(result[v.id] || result._$width);
32368 }
32369 }.bind(this));
32370 }
32371 return result;
32372 },
32373 /**
32374 * Get shape element
32375 * @param {string} shapeName Shape string
32376 * @param {number} i Index number
32377 * @param {string} id Data series id
32378 * @returns {d3Selection}
32379 * @private
32380 */
32381 getShapeByIndex: function getShapeByIndex(shapeName, i, id) {
32382 var _this12 = this,
32383 $$ = this,
32384 $el = $$.$el,
32385 suffix = isValue(i) ? "-" + i : "",
32386 shape = $el[shapeName];
32387 // filter from shape reference if has
32388 if (shape && !shape.empty()) {
32389 shape = shape.filter(function (d) {
32390 _newArrowCheck(this, _this12);
32391 return id ? d.id === id : !0;
32392 }.bind(this)).filter(function (d) {
32393 _newArrowCheck(this, _this12);
32394 return isValue(i) ? d.index === i : !0;
32395 }.bind(this));
32396 } else {
32397 shape = (id ? $el.main.selectAll("." + classes[shapeName + "s"] + $$.getTargetSelectorSuffix(id)) : $el.main).selectAll("." + classes[shapeName] + suffix);
32398 }
32399 return shape;
32400 },
32401 isWithinShape: function isWithinShape(that, d) {
32402 var $$ = this,
32403 shape = src_select(that),
32404 isWithin;
32405 if (!$$.isTargetToShow(d.id)) {
32406 isWithin = !1;
32407 } else if ($$.hasValidPointType != null && $$.hasValidPointType(that.nodeName)) {
32408 isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScaleById(d.id)(d.value)) : $$.isWithinCircle(that, $$.isBubbleType(d) ? $$.pointSelectR(d) * 1.5 : 0);
32409 } else if (that.nodeName === "path") {
32410 isWithin = shape.classed(classes.bar) ? $$.isWithinBar(that) : !0;
32411 }
32412 return isWithin;
32413 },
32414 getInterpolate: function getInterpolate(d) {
32415 var $$ = this,
32416 interpolation = $$.getInterpolateType(d);
32417 return {
32418 "basis": curve_basis,
32419 "basis-closed": curve_basisClosed,
32420 "basis-open": basisOpen,
32421 "bundle": bundle,
32422 "cardinal": cardinal,
32423 "cardinal-closed": cardinalClosed,
32424 "cardinal-open": cardinalOpen,
32425 "catmull-rom": catmullRom,
32426 "catmull-rom-closed": catmullRomClosed,
32427 "catmull-rom-open": catmullRomOpen,
32428 "monotone-x": monotoneX,
32429 "monotone-y": monotoneY,
32430 "natural": natural,
32431 "linear-closed": linearClosed,
32432 "linear": curve_linear,
32433 "step": step,
32434 "step-after": stepAfter,
32435 "step-before": stepBefore
32436 }[interpolation];
32437 },
32438 getInterpolateType: function getInterpolateType(d) {
32439 var $$ = this,
32440 config = $$.config,
32441 type = config.spline_interpolation_type,
32442 interpolation = $$.isInterpolationType(type) ? type : "cardinal";
32443 return $$.isSplineType(d) ? interpolation : $$.isStepType(d) ? config.line_step_type : "linear";
32444 },
32445 isWithinBar: function isWithinBar(that) {
32446 var mouse = getPointer(this.state.event, that),
32447 list = getRectSegList(that),
32448 _list = list,
32449 seg0 = _list[0],
32450 seg1 = _list[1],
32451 x = Math.min(seg0.x, seg1.x),
32452 y = Math.min(seg0.y, seg1.y),
32453 offset = this.config.bar_sensitivity,
32454 _that$getBBox = that.getBBox(),
32455 width = _that$getBBox.width,
32456 height = _that$getBBox.height,
32457 isWithin = x - offset < mouse[0] && mouse[0] < x + width + offset && y - offset < mouse[1] && mouse[1] < y + height + offset;
32458 return isWithin;
32459 }
32460});
32461;// CONCATENATED MODULE: ./src/ChartInternal/internals/size.ts
32462
32463/**
32464 * Copyright (c) 2017 ~ present NAVER Corp.
32465 * billboard.js project is licensed under the MIT license
32466 */
32467
32468
32469
32470/* harmony default export */ var internals_size = ({
32471 /**
32472 * Update container size
32473 * @private
32474 */
32475 setContainerSize: function setContainerSize() {
32476 var $$ = this,
32477 state = $$.state;
32478 state.current.width = $$.getCurrentWidth();
32479 state.current.height = $$.getCurrentHeight();
32480 },
32481 getCurrentWidth: function getCurrentWidth() {
32482 var $$ = this;
32483 return $$.config.size_width || $$.getParentWidth();
32484 },
32485 getCurrentHeight: function getCurrentHeight() {
32486 var $$ = this,
32487 config = $$.config,
32488 h = config.size_height || $$.getParentHeight();
32489 return h > 0 ? h : 320 / ($$.hasType("gauge") && !config.gauge_fullCircle ? 2 : 1);
32490 },
32491 getCurrentPaddingTop: function getCurrentPaddingTop() {
32492 var $$ = this,
32493 config = $$.config,
32494 hasAxis = $$.state.hasAxis,
32495 $el = $$.$el,
32496 axesLen = hasAxis ? config.axis_y2_axes.length : 0,
32497 padding = isValue(config.padding_top) ? config.padding_top : 0;
32498 if ($el.title && $el.title.node()) {
32499 padding += $$.getTitlePadding();
32500 }
32501 if (axesLen && config.axis_rotated) {
32502 padding += $$.getHorizontalAxisHeight("y2") * axesLen;
32503 }
32504 return padding;
32505 },
32506 getCurrentPaddingBottom: function getCurrentPaddingBottom() {
32507 var $$ = this,
32508 config = $$.config,
32509 hasAxis = $$.state.hasAxis,
32510 axisId = config.axis_rotated ? "y" : "x",
32511 axesLen = hasAxis ? config["axis_" + axisId + "_axes"].length : 0,
32512 padding = isValue(config.padding_bottom) ? config.padding_bottom : 0;
32513 return padding + (axesLen ? $$.getHorizontalAxisHeight(axisId) * axesLen : 0);
32514 },
32515 getCurrentPaddingLeft: function getCurrentPaddingLeft(withoutRecompute) {
32516 var $$ = this,
32517 config = $$.config,
32518 hasAxis = $$.state.hasAxis,
32519 isRotated = config.axis_rotated,
32520 axisId = isRotated ? "x" : "y",
32521 axesLen = hasAxis ? config["axis_" + axisId + "_axes"].length : 0,
32522 axisWidth = hasAxis ? $$.getAxisWidthByAxisId(axisId, withoutRecompute) : 0,
32523 padding;
32524 if (isValue(config.padding_left)) {
32525 padding = config.padding_left;
32526 } else if (hasAxis && isRotated) {
32527 padding = !config.axis_x_show ? 1 : Math.max(ceil10(axisWidth), 40);
32528 } else if (hasAxis && (!config.axis_y_show || config.axis_y_inner)) {
32529 // && !config.axis_rotated
32530 padding = $$.axis.getAxisLabelPosition("y").isOuter ? 30 : 1;
32531 } else {
32532 padding = ceil10(axisWidth);
32533 }
32534 return padding + axisWidth * axesLen;
32535 },
32536 getCurrentPaddingRight: function getCurrentPaddingRight(withXAxisTickTextOverflow) {
32537 if (withXAxisTickTextOverflow === void 0) {
32538 withXAxisTickTextOverflow = !1;
32539 }
32540 var $$ = this,
32541 config = $$.config,
32542 hasAxis = $$.state.hasAxis,
32543 legendWidthOnRight = $$.state.isLegendRight ? $$.getLegendWidth() + 20 : 0,
32544 axesLen = hasAxis ? config.axis_y2_axes.length : 0,
32545 axisWidth = hasAxis ? $$.getAxisWidthByAxisId("y2") : 0,
32546 xAxisTickTextOverflow = withXAxisTickTextOverflow ? $$.axis.getXAxisTickTextY2Overflow(10) : 0,
32547 padding;
32548 if (isValue(config.padding_right)) {
32549 padding = config.padding_right + 1; // 1 is needed not to hide tick line
32550 } else if ($$.axis && config.axis_rotated) {
32551 padding = 10 + legendWidthOnRight;
32552 } else if ($$.axis && (!config.axis_y2_show || config.axis_y2_inner)) {
32553 // && !config.axis_rotated
32554 padding = Math.max(2 + legendWidthOnRight + ($$.axis.getAxisLabelPosition("y2").isOuter ? 20 : 0), xAxisTickTextOverflow);
32555 } else {
32556 padding = Math.max(ceil10(axisWidth) + legendWidthOnRight, xAxisTickTextOverflow);
32557 }
32558 return padding + axisWidth * axesLen;
32559 },
32560 /**
32561 * Get the parent rect element's size
32562 * @param {string} key property/attribute name
32563 * @returns {number}
32564 * @private
32565 */
32566 getParentRectValue: function getParentRectValue(key) {
32567 var offsetName = "offset" + capitalize(key),
32568 parent = this.$el.chart.node(),
32569 v = 0;
32570 while (v < 30 && parent && parent.tagName !== "BODY") {
32571 try {
32572 v = parent.getBoundingClientRect()[key];
32573 } catch (e) {
32574 if (offsetName in parent) {
32575 // In IE in certain cases getBoundingClientRect
32576 // will cause an "unspecified error"
32577 v = parent[offsetName];
32578 }
32579 }
32580 parent = parent.parentNode;
32581 }
32582
32583 // Sometimes element's dimension value is incorrect(ex. flex container)
32584 // In this case, use body's offset instead.
32585 var bodySize = browser_doc.body[offsetName];
32586 v > bodySize && (v = bodySize);
32587 return v;
32588 },
32589 getParentWidth: function getParentWidth() {
32590 return this.getParentRectValue("width");
32591 },
32592 getParentHeight: function getParentHeight() {
32593 var h = this.$el.chart.style("height"),
32594 height = 0;
32595 if (h) {
32596 height = /px$/.test(h) ? parseInt(h, 10) : this.getParentRectValue("height");
32597 }
32598 return height;
32599 },
32600 getSvgLeft: function getSvgLeft(withoutRecompute) {
32601 var $$ = this,
32602 config = $$.config,
32603 $el = $$.$el,
32604 hasLeftAxisRect = config.axis_rotated || !config.axis_rotated && !config.axis_y_inner,
32605 leftAxisClass = config.axis_rotated ? $AXIS.axisX : $AXIS.axisY,
32606 leftAxis = $el.main.select("." + leftAxisClass).node(),
32607 svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : {
32608 right: 0
32609 },
32610 chartRect = $el.chart.node().getBoundingClientRect(),
32611 hasArc = $$.hasArcType(),
32612 svgLeft = svgRect.right - chartRect.left - (hasArc ? 0 : $$.getCurrentPaddingLeft(withoutRecompute));
32613 return svgLeft > 0 ? svgLeft : 0;
32614 },
32615 updateDimension: function updateDimension(withoutAxis) {
32616 var $$ = this,
32617 config = $$.config,
32618 hasAxis = $$.state.hasAxis,
32619 $el = $$.$el;
32620 if (hasAxis && !withoutAxis && $$.axis.x && config.axis_rotated) {
32621 var _$$$axis$subX;
32622 (_$$$axis$subX = $$.axis.subX) == null ? void 0 : _$$$axis$subX.create($el.axis.subX);
32623 }
32624
32625 // pass 'withoutAxis' param to not animate at the init rendering
32626 $$.updateScales(withoutAxis);
32627 $$.updateSvgSize();
32628 $$.transformAll(!1);
32629 },
32630 updateSvgSize: function updateSvgSize() {
32631 var $$ = this,
32632 _$$$state = $$.state,
32633 clip = _$$$state.clip,
32634 current = _$$$state.current,
32635 hasAxis = _$$$state.hasAxis,
32636 width = _$$$state.width,
32637 height = _$$$state.height,
32638 svg = $$.$el.svg;
32639 svg.attr("width", current.width).attr("height", current.height);
32640 if (hasAxis) {
32641 var brush = svg.select("." + $SUBCHART.brush + " .overlay"),
32642 brushSize = {
32643 width: 0,
32644 height: 0
32645 };
32646 if (brush.size()) {
32647 brushSize.width = +brush.attr("width");
32648 brushSize.height = +brush.attr("height");
32649 }
32650 svg.selectAll(["#" + clip.id, "#" + clip.idGrid]).select("rect").attr("width", width).attr("height", height);
32651 svg.select("#" + clip.idXAxis).select("rect").call($$.setXAxisClipPath.bind($$));
32652 svg.select("#" + clip.idYAxis).select("rect").call($$.setYAxisClipPath.bind($$));
32653 clip.idSubchart && svg.select("#" + clip.idSubchart).select("rect").attr("width", width).attr("height", brushSize.height);
32654 }
32655 },
32656 /**
32657 * Get resetted padding values when 'padding=false' option is set
32658 * https://github.com/naver/billboard.js/issues/2367
32659 * @param {number|object} v Padding values to be resetted
32660 * @returns {number|object} Padding value
32661 * @private
32662 */
32663 getResettedPadding: function getResettedPadding(v) {
32664 var _this = this,
32665 $$ = this,
32666 config = $$.config,
32667 isNum = isNumber(v),
32668 p = isNum ? 0 : {};
32669 if (config.padding === !1) {
32670 isNum || Object.keys(v).forEach(function (key) {
32671 _newArrowCheck(this, _this);
32672 // when data.lables=true, do not reset top padding
32673 p[key] = !isEmpty(config.data_labels) && config.data_labels !== !1 && key === "top" ? v[key] : 0;
32674 }.bind(this));
32675 } else {
32676 p = v;
32677 }
32678 return p;
32679 },
32680 /**
32681 * Update size values
32682 * @param {boolean} isInit If is called at initialization
32683 * @private
32684 */
32685 updateSizes: function updateSizes(isInit) {
32686 var $$ = this,
32687 config = $$.config,
32688 state = $$.state,
32689 legend = $$.$el.legend,
32690 isRotated = config.axis_rotated,
32691 hasArc = $$.hasArcType();
32692 isInit || $$.setContainerSize();
32693 var currLegend = {
32694 width: legend ? $$.getLegendWidth() : 0,
32695 height: legend ? $$.getLegendHeight() : 0
32696 };
32697 if (!hasArc && config.axis_x_show && config.axis_x_tick_autorotate) {
32698 $$.updateXAxisTickClip();
32699 }
32700 var legendHeightForBottom = state.isLegendRight || state.isLegendInset ? 0 : currLegend.height,
32701 xAxisHeight = isRotated || hasArc ? 0 : $$.getHorizontalAxisHeight("x"),
32702 subchartXAxisHeight = config.subchart_axis_x_show && config.subchart_axis_x_tick_text_show ? xAxisHeight : 30,
32703 subchartHeight = config.subchart_show && !hasArc ? config.subchart_size_height + subchartXAxisHeight : 0;
32704 // for main
32705 state.margin = !hasArc && isRotated ? {
32706 top: $$.getHorizontalAxisHeight("y2") + $$.getCurrentPaddingTop(),
32707 right: hasArc ? 0 : $$.getCurrentPaddingRight(!0),
32708 bottom: $$.getHorizontalAxisHeight("y") + legendHeightForBottom + $$.getCurrentPaddingBottom(),
32709 left: subchartHeight + (hasArc ? 0 : $$.getCurrentPaddingLeft())
32710 } : {
32711 top: 4 + $$.getCurrentPaddingTop(),
32712 // for top tick text
32713 right: hasArc ? 0 : $$.getCurrentPaddingRight(!0),
32714 bottom: xAxisHeight + subchartHeight + legendHeightForBottom + $$.getCurrentPaddingBottom(),
32715 left: hasArc ? 0 : $$.getCurrentPaddingLeft()
32716 };
32717 state.margin = $$.getResettedPadding(state.margin);
32718
32719 // for subchart
32720 state.margin2 = isRotated ? {
32721 top: state.margin.top,
32722 right: NaN,
32723 bottom: 20 + legendHeightForBottom,
32724 left: $$.state.rotatedPadding.left
32725 } : {
32726 top: state.current.height - subchartHeight - legendHeightForBottom,
32727 right: NaN,
32728 bottom: subchartXAxisHeight + legendHeightForBottom,
32729 left: state.margin.left
32730 };
32731
32732 // for legend
32733 state.margin3 = {
32734 top: 0,
32735 right: NaN,
32736 bottom: 0,
32737 left: 0
32738 };
32739 $$.updateSizeForLegend == null ? void 0 : $$.updateSizeForLegend(currLegend);
32740 state.width = state.current.width - state.margin.left - state.margin.right;
32741 state.height = state.current.height - state.margin.top - state.margin.bottom;
32742 if (state.width < 0) {
32743 state.width = 0;
32744 }
32745 if (state.height < 0) {
32746 state.height = 0;
32747 }
32748 state.width2 = isRotated ? state.margin.left - state.rotatedPadding.left - state.rotatedPadding.right : state.width;
32749 state.height2 = isRotated ? state.height : state.current.height - state.margin2.top - state.margin2.bottom;
32750 if (state.width2 < 0) {
32751 state.width2 = 0;
32752 }
32753 if (state.height2 < 0) {
32754 state.height2 = 0;
32755 }
32756
32757 // for arc
32758 var hasGauge = $$.hasType("gauge"),
32759 isLegendRight = config.legend_show && state.isLegendRight;
32760 state.arcWidth = state.width - (isLegendRight ? currLegend.width + 10 : 0);
32761 state.arcHeight = state.height - (isLegendRight && !hasGauge ? 0 : 10);
32762 if (hasGauge && !config.gauge_fullCircle) {
32763 state.arcHeight += state.height - $$.getPaddingBottomForGauge();
32764 }
32765 $$.updateRadius == null ? void 0 : $$.updateRadius();
32766 if (state.isLegendRight && hasArc) {
32767 state.margin3.left = state.arcWidth / 2 + state.radiusExpanded * 1.1;
32768 }
32769 }
32770});
32771;// CONCATENATED MODULE: ./src/ChartInternal/internals/style.ts
32772
32773/**
32774 * Copyright (c) 2017 ~ present NAVER Corp.
32775 * billboard.js project is licensed under the MIT license
32776 */
32777
32778
32779/* harmony default export */ var internals_style = ({
32780 /**
32781 * Add props color css rule to given selector
32782 * @param {boolean} withShape Set shpes' prefix class
32783 * @param {string} selector CSS selector
32784 * @param {Array} props CSS props list
32785 * @param {Function} propsFn Function to retrieve value or determine for props
32786 * @returns {Function}
32787 * @private
32788 */
32789 setCssRule: function setCssRule(withShape, selector, props, propsFn) {
32790 var _this = this,
32791 $$ = this,
32792 config = $$.config,
32793 _$$$state = $$.state,
32794 cssRule = _$$$state.cssRule,
32795 style = _$$$state.style;
32796 return config.boost_useCssRule ? function (selection) {
32797 var _this2 = this;
32798 _newArrowCheck(this, _this);
32799 selection.each(function (d) {
32800 var _this3 = this;
32801 _newArrowCheck(this, _this2);
32802 var res = propsFn && (propsFn == null ? void 0 : propsFn.call($$, d)),
32803 shapeSelector = "" + (withShape ? "." + ($SHAPE.shapes + $$.getTargetSelectorSuffix(d.id)) : "") + selector;
32804 selector in cssRule && style.sheet.deleteRule(cssRule[shapeSelector]);
32805 $$.state.cssRule[shapeSelector] = addCssRules(style, shapeSelector, props.filter(Boolean).map(function (v) {
32806 _newArrowCheck(this, _this3);
32807 return isString(res) && v.indexOf(":") === -1 ? v + ": " + res : v || "";
32808 }.bind(this)));
32809 }.bind(this));
32810 }.bind(this) : function () {
32811 _newArrowCheck(this, _this);
32812 }.bind(this);
32813 },
32814 /**
32815 * Get style prop value
32816 * @param {Function|string} v Value
32817 * @returns {string|null}
32818 * @private
32819 */
32820 getStylePropValue: function getStylePropValue(v) {
32821 var useCssRule = this.config.boost_useCssRule;
32822 return useCssRule ? null : isFunction(v) ? v.bind(this) : v;
32823 }
32824});
32825;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selectAll.js
32826
32827
32828/* harmony default export */ function src_selectAll(selector) {
32829 return typeof selector === "string" ? new Selection([document.querySelectorAll(selector)], [document.documentElement]) : new Selection([array(selector)], root);
32830}
32831;// CONCATENATED MODULE: ./src/ChartInternal/internals/text.ts
32832
32833/**
32834 * Copyright (c) 2017 ~ present NAVER Corp.
32835 * billboard.js project is licensed under the MIT license
32836 */
32837
32838
32839
32840
32841/**
32842 * Get text-anchor according text.labels.rotate angle
32843 * @param {number} angle Angle value
32844 * @returns {string} Anchor string value
32845 * @private
32846 */
32847function getRotateAnchor(angle) {
32848 var anchor = "middle";
32849 if (angle > 0 && angle <= 170) {
32850 anchor = "end";
32851 } else if (angle > 190 && angle <= 360) {
32852 anchor = "start";
32853 }
32854 return anchor;
32855}
32856
32857/**
32858 * Set rotated position coordinate according text.labels.rotate angle
32859 * @param {object} d Data object
32860 * @param {object} pos Position object
32861 * @param {object} pos.x x coordinate
32862 * @param {object} pos.y y coordinate
32863 * @param {string} anchor string value
32864 * @param {boolean} isRotated If axis is rotated
32865 * @param {boolean} isInverted If axis is inverted
32866 * @returns {object} x, y coordinate
32867 * @private
32868 */
32869function setRotatePos(d, pos, anchor, isRotated, isInverted) {
32870 var _$$$getCandlestickDat,
32871 $$ = this,
32872 value = d.value,
32873 isCandlestickType = $$.isCandlestickType(d),
32874 isNegative = isNumber(value) && value < 0 || isCandlestickType && !((_$$$getCandlestickDat = $$.getCandlestickData(d)) != null && _$$$getCandlestickDat._isUp),
32875 x = pos.x,
32876 y = pos.y,
32877 gap = 4,
32878 doubleGap = 8;
32879 if (isRotated) {
32880 if (anchor === "start") {
32881 x += isNegative ? 0 : doubleGap;
32882 y += gap;
32883 } else if (anchor === "middle") {
32884 x += doubleGap;
32885 y -= doubleGap;
32886 } else if (anchor === "end") {
32887 isNegative && (x -= doubleGap);
32888 y += gap;
32889 }
32890 } else {
32891 if (anchor === "start") {
32892 x += gap;
32893 isNegative && (y += doubleGap * 2);
32894 } else if (anchor === "middle") {
32895 y -= doubleGap;
32896 } else if (anchor === "end") {
32897 x -= gap;
32898 isNegative && (y += doubleGap * 2);
32899 }
32900 if (isInverted) {
32901 y += isNegative ? -17 : isCandlestickType ? 13 : 7;
32902 }
32903 }
32904 return {
32905 x: x,
32906 y: y
32907 };
32908}
32909/* harmony default export */ var internals_text = ({
32910 opacityForText: function opacityForText(d) {
32911 var $$ = this;
32912 return $$.isBarType(d) && !$$.meetsLabelThreshold(Math.abs($$.getRatio("bar", d)), "bar") ? "0" : $$.hasDataLabel ? null : "0";
32913 },
32914 /**
32915 * Initializes the text
32916 * @private
32917 */
32918 initText: function initText() {
32919 var $el = this.$el;
32920 $el.main.select("." + $COMMON.chart).append("g").attr("class", $TEXT.chartTexts);
32921 },
32922 /**
32923 * Update chartText
32924 * @param {object} targets $$.data.targets
32925 * @private
32926 */
32927 updateTargetsForText: function updateTargetsForText(targets) {
32928 var _this = this,
32929 $$ = this,
32930 classChartText = $$.getChartClass("Text"),
32931 classTexts = $$.getClass("texts", "id"),
32932 classFocus = $$.classFocus.bind($$),
32933 mainTextUpdate = $$.$el.main.select("." + $TEXT.chartTexts).selectAll("." + $TEXT.chartText).data(targets).attr("class", function (d) {
32934 _newArrowCheck(this, _this);
32935 return classChartText(d) + classFocus(d);
32936 }.bind(this)),
32937 mainTextEnter = mainTextUpdate.enter().append("g").style("opacity", "0").attr("class", classChartText).call($$.setCssRule(!0, " ." + $TEXT.text, ["fill", "pointer-events:none"], $$.updateTextColor));
32938 mainTextEnter.append("g").attr("class", classTexts);
32939 },
32940 /**
32941 * Update text
32942 * @private
32943 */
32944 updateText: function updateText() {
32945 var _this2 = this,
32946 $$ = this,
32947 $el = $$.$el,
32948 $T = $$.$T,
32949 config = $$.config,
32950 classText = $$.getClass("text", "index"),
32951 text = $el.main.selectAll("." + $TEXT.texts).selectAll("." + $TEXT.text).data($$.labelishData.bind($$));
32952 $T(text.exit()).style("fill-opacity", "0").remove();
32953 $el.text = text.enter().append("text").merge(text).attr("class", classText).attr("text-anchor", function (d) {
32954 _newArrowCheck(this, _this2);
32955 // when value is negative or
32956 var isEndAnchor = d.value < 0;
32957 if ($$.isCandlestickType(d)) {
32958 var data = $$.getCandlestickData(d);
32959 isEndAnchor = !(data != null && data._isUp);
32960 }
32961 return config.axis_rotated ? isEndAnchor ? "end" : "start" : "middle";
32962 }.bind(this)).style("fill", $$.getStylePropValue($$.updateTextColor)).style("fill-opacity", "0").each(function (d, i, texts) {
32963 var node = src_select(this),
32964 value = d.value;
32965 if ($$.isBubbleZType(d)) {
32966 value = $$.getBubbleZData(value, "z");
32967 } else if ($$.isCandlestickType(d)) {
32968 var data = $$.getCandlestickData(d);
32969 if (data) {
32970 value = data.close;
32971 }
32972 }
32973 value = $$.dataLabelFormat(d.id)(value, d.id, i, texts);
32974 if (isNumber(value)) {
32975 this.textContent = value;
32976 } else {
32977 setTextValue(node, value);
32978 }
32979 });
32980 },
32981 updateTextColor: function updateTextColor(d) {
32982 var $$ = this,
32983 config = $$.config,
32984 labelColors = config.data_labels_colors,
32985 defaultColor = $$.isArcType(d) && !$$.isRadarType(d) ? null : $$.color(d),
32986 color;
32987 if (isString(labelColors)) {
32988 color = labelColors;
32989 } else if (isObject(labelColors)) {
32990 var _ref = d.data || d,
32991 id = _ref.id;
32992 color = labelColors[id];
32993 } else if (isFunction(labelColors)) {
32994 color = labelColors.bind($$.api)(defaultColor, d);
32995 }
32996 if ($$.isCandlestickType(d) && !isFunction(labelColors)) {
32997 var value = $$.getCandlestickData(d);
32998 if (!(value != null && value._isUp)) {
32999 var downColor = config.candlestick_color_down;
33000 color = isObject(downColor) ? downColor[d.id] : downColor;
33001 }
33002 }
33003 return color || defaultColor;
33004 },
33005 /**
33006 * Update data label text background color
33007 * @param {object} d Data object
33008 * @returns {string|null}
33009 * @private
33010 */
33011 updateTextBacgroundColor: function updateTextBacgroundColor(d) {
33012 var $$ = this,
33013 $el = $$.$el,
33014 config = $$.config,
33015 backgroundColor = config.data_labels_backgroundColors,
33016 color = "";
33017 if (isString(backgroundColor) || isObject(backgroundColor)) {
33018 var id = isString(backgroundColor) ? "" : $$.getTargetSelectorSuffix("id" in d ? d.id : d.data.id),
33019 filter = $el.defs.select(["filter[id*='labels-bg", "']"].join(id));
33020 if (filter.size()) {
33021 color = "url(#" + filter.attr("id") + ")";
33022 }
33023 }
33024 return color || null;
33025 },
33026 /**
33027 * Redraw chartText
33028 * @param {Function} getX Positioning function for x
33029 * @param {Function} getY Positioning function for y
33030 * @param {boolean} forFlow Weather is flow
33031 * @param {boolean} withTransition transition is enabled
33032 * @returns {Array}
33033 * @private
33034 */
33035 redrawText: function redrawText(getX, getY, forFlow, withTransition) {
33036 var $$ = this,
33037 $T = $$.$T,
33038 axis = $$.axis,
33039 config = $$.config,
33040 t = getRandom(!0),
33041 isRotated = config.axis_rotated,
33042 angle = config.data_labels.rotate,
33043 anchorString = getRotateAnchor(angle),
33044 rotateString = angle ? "rotate(" + angle + ")" : "";
33045 $$.$el.text.style("fill", $$.getStylePropValue($$.updateTextColor)).attr("filter", $$.updateTextBacgroundColor.bind($$)).style("fill-opacity", forFlow ? 0 : $$.opacityForText.bind($$)).each(function (d, i) {
33046 // do not apply transition for newly added text elements
33047 var node = $T(this, !!(withTransition && this.getAttribute("x")), t),
33048 isInverted = config["axis_" + (axis == null ? void 0 : axis.getId(d.id)) + "_inverted"],
33049 pos = {
33050 x: getX.bind(this)(d, i),
33051 y: getY.bind(this)(d, i)
33052 };
33053 if (angle) {
33054 pos = setRotatePos.bind($$)(d, pos, anchorString, isRotated, isInverted);
33055 node.attr("text-anchor", anchorString);
33056 }
33057
33058 // when is multiline
33059 if (this.childElementCount || angle) {
33060 node.attr("transform", "translate(" + pos.x + " " + pos.y + ") " + rotateString);
33061 } else {
33062 node.attr("x", pos.x).attr("y", pos.y);
33063 }
33064 });
33065
33066 // need to return 'true' as of being pushed to the redraw list
33067 // ref: getRedrawList()
33068 return !0;
33069 },
33070 /**
33071 * Gets the getBoundingClientRect value of the element
33072 * @param {HTMLElement|d3.selection} element Target element
33073 * @param {string} className Class name
33074 * @returns {object} value of element.getBoundingClientRect()
33075 * @private
33076 */
33077 getTextRect: function getTextRect(element, className) {
33078 var _this3 = this,
33079 $$ = this,
33080 base = element.node ? element.node() : element;
33081 if (!/text/i.test(base.tagName)) {
33082 base = base.querySelector("text");
33083 }
33084 var text = base.textContent,
33085 cacheKey = KEY.textRect + "-" + text.replace(/\W/g, "_"),
33086 rect = $$.cache.get(cacheKey);
33087 if (!rect) {
33088 $$.$el.svg.append("text").style("visibility", "hidden").style("font", src_select(base).style("font")).classed(className, !0).text(text).call(function (v) {
33089 _newArrowCheck(this, _this3);
33090 rect = getBoundingRect(v.node());
33091 }.bind(this)).remove();
33092 $$.cache.add(cacheKey, rect);
33093 }
33094 return rect;
33095 },
33096 /**
33097 * Gets the x or y coordinate of the text
33098 * @param {object} indices Indices values
33099 * @param {boolean} forX whether or not to x
33100 * @returns {number} coordinates
33101 * @private
33102 */
33103 generateXYForText: function generateXYForText(indices, forX) {
33104 var _this4 = this,
33105 $$ = this,
33106 types = Object.keys(indices),
33107 points = {},
33108 getter = forX ? $$.getXForText : $$.getYForText;
33109 $$.hasType("radar") && types.push("radar");
33110 types.forEach(function (v) {
33111 _newArrowCheck(this, _this4);
33112 points[v] = $$["generateGet" + capitalize(v) + "Points"](indices[v], !1);
33113 }.bind(this));
33114 return function (d, i) {
33115 var type = $$.isAreaType(d) && "area" || $$.isBarType(d) && "bar" || $$.isCandlestickType(d) && "candlestick" || $$.isRadarType(d) && "radar" || "line";
33116 return getter.call($$, points[type](d, i), d, this);
33117 };
33118 },
33119 /**
33120 * Get centerized text position for bar type data.label.text
33121 * @param {object} d Data object
33122 * @param {Array} points Data points position
33123 * @param {HTMLElement} textElement Data label text element
33124 * @returns {number} Position value
33125 * @private
33126 */
33127 getCenteredTextPos: function getCenteredTextPos(d, points, textElement) {
33128 var $$ = this,
33129 config = $$.config,
33130 isRotated = config.axis_rotated;
33131 if (config.data_labels.centered && $$.isBarType(d)) {
33132 var _rect = getBoundingRect(textElement),
33133 isPositive = d.value >= 0;
33134 if (isRotated) {
33135 var w = (isPositive ? points[1][1] - points[0][1] : points[0][1] - points[1][1]) / 2 + _rect.width / 2;
33136 return isPositive ? -w - 3 : w + 2;
33137 } else {
33138 var h = (isPositive ? points[0][1] - points[1][1] : points[1][1] - points[0][1]) / 2 + _rect.height / 2;
33139 return isPositive ? h : -h - 2;
33140 }
33141 }
33142 return 0;
33143 },
33144 /**
33145 * Get data.labels.position value
33146 * @param {string} id Data id value
33147 * @param {string} type x | y
33148 * @returns {number} Position value
33149 * @private
33150 */
33151 getTextPos: function getTextPos(id, type) {
33152 var pos = this.config.data_labels_position;
33153 return (id in pos ? pos[id] : pos)[type] || 0;
33154 },
33155 /**
33156 * Gets the x coordinate of the text
33157 * @param {object} points Data points position
33158 * @param {object} d Data object
33159 * @param {HTMLElement} textElement Data label text element
33160 * @returns {number} x coordinate
33161 * @private
33162 */
33163 getXForText: function getXForText(points, d, textElement) {
33164 var $$ = this,
33165 config = $$.config,
33166 state = $$.state,
33167 isRotated = config.axis_rotated,
33168 xPos = points[0][0];
33169 if ($$.isCandlestickType(d)) {
33170 if (isRotated) {
33171 var _$$$getCandlestickDat2;
33172 xPos = (_$$$getCandlestickDat2 = $$.getCandlestickData(d)) != null && _$$$getCandlestickDat2._isUp ? points[2][2] + 4 : points[2][1] - 4;
33173 } else {
33174 xPos += (points[1][0] - xPos) / 2;
33175 }
33176 } else {
33177 if (isRotated) {
33178 var padding = $$.isBarType(d) ? 4 : 6;
33179 xPos = points[2][1] + padding * (d.value < 0 ? -1 : 1);
33180 } else {
33181 xPos = $$.hasType("bar") ? (points[2][0] + points[0][0]) / 2 : xPos;
33182 }
33183 }
33184
33185 // show labels regardless of the domain if value is null
33186 if (d.value === null) {
33187 if (xPos > state.width) {
33188 var _getBoundingRect = getBoundingRect(textElement),
33189 width = _getBoundingRect.width;
33190 xPos = state.width - width;
33191 } else if (xPos < 0) {
33192 xPos = 4;
33193 }
33194 }
33195 if (isRotated) {
33196 xPos += $$.getCenteredTextPos(d, points, textElement);
33197 }
33198 return xPos + $$.getTextPos(d.id, "x");
33199 },
33200 /**
33201 * Gets the y coordinate of the text
33202 * @param {object} points Data points position
33203 * @param {object} d Data object
33204 * @param {HTMLElement} textElement Data label text element
33205 * @returns {number} y coordinate
33206 * @private
33207 */
33208 getYForText: function getYForText(points, d, textElement) {
33209 var $$ = this,
33210 axis = $$.axis,
33211 config = $$.config,
33212 state = $$.state,
33213 isRotated = config.axis_rotated,
33214 isInverted = config["axis_" + (axis == null ? void 0 : axis.getId(d.id)) + "_inverted"],
33215 isBarType = $$.isBarType(d),
33216 r = config.point_r,
33217 rect = getBoundingRect(textElement),
33218 value = d.value,
33219 baseY = 3,
33220 yPos;
33221 if ($$.isCandlestickType(d)) {
33222 value = $$.getCandlestickData(d);
33223 if (isRotated) {
33224 yPos = points[0][0];
33225 yPos += (points[1][0] - yPos) / 2 + baseY;
33226 } else {
33227 yPos = value && value._isUp ? points[2][2] - baseY : points[2][1] + baseY * 4;
33228 if (isInverted) {
33229 yPos += 15 * (value._isUp ? 1 : -1);
33230 }
33231 }
33232 } else {
33233 if (isRotated) {
33234 yPos = (points[0][0] + points[2][0] + rect.height * .6) / 2;
33235 } else {
33236 yPos = points[2][1];
33237 if (isNumber(r) && r > 5 && ($$.isLineType(d) || $$.isScatterType(d))) {
33238 baseY += config.point_r / 2.3;
33239 }
33240 if (value < 0 || value === 0 && !state.hasPositiveValue && state.hasNegativeValue) {
33241 yPos += isInverted ? isBarType ? -3 : -5 : rect.height + (isBarType ? -baseY : baseY);
33242 } else {
33243 var diff = -baseY * 2;
33244 if (isBarType) {
33245 diff = -baseY;
33246 } else if ($$.isBubbleType(d)) {
33247 diff = baseY;
33248 }
33249 if (isInverted) {
33250 diff = isBarType ? 10 : 15;
33251 }
33252 yPos += diff;
33253 }
33254 }
33255 }
33256
33257 // show labels regardless of the domain if value is null
33258 if (d.value === null && !isRotated) {
33259 var boxHeight = rect.height;
33260 if (yPos < boxHeight) {
33261 yPos = boxHeight;
33262 } else if (yPos > state.height) {
33263 yPos = state.height - 4;
33264 }
33265 }
33266 if (!isRotated) {
33267 yPos += $$.getCenteredTextPos(d, points, textElement);
33268 }
33269 return yPos + $$.getTextPos(d.id, "y");
33270 },
33271 /**
33272 * Calculate if two or more text nodes are overlapping
33273 * Mark overlapping text nodes with "text-overlapping" class
33274 * @param {string} id Axis id
33275 * @param {ChartInternal} $$ ChartInternal context
33276 * @param {string} selector Selector string
33277 * @private
33278 */
33279 markOverlapped: function markOverlapped(id, $$, selector) {
33280 var _this5 = this,
33281 textNodes = $$.$el.arcs.selectAll(selector),
33282 filteredTextNodes = textNodes.filter(function (node) {
33283 _newArrowCheck(this, _this5);
33284 return node.data.id !== id;
33285 }.bind(this)),
33286 textNode = textNodes.filter(function (node) {
33287 _newArrowCheck(this, _this5);
33288 return node.data.id === id;
33289 }.bind(this)),
33290 translate = getTranslation(textNode.node()),
33291 calcHypo = function (x, y) {
33292 _newArrowCheck(this, _this5);
33293 return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
33294 }.bind(this);
33295 textNode.node() && filteredTextNodes.each(function () {
33296 var coordinate = getTranslation(this),
33297 filteredTextNode = src_select(this),
33298 nodeForWidth = calcHypo(translate.e, translate.f) > calcHypo(coordinate.e, coordinate.f) ? textNode : filteredTextNode,
33299 overlapsX = Math.ceil(Math.abs(translate.e - coordinate.e)) < Math.ceil(nodeForWidth.node().getComputedTextLength()),
33300 overlapsY = Math.ceil(Math.abs(translate.f - coordinate.f)) < parseInt(textNode.style("font-size"), 10);
33301 filteredTextNode.classed($TEXT.TextOverlapping, overlapsX && overlapsY);
33302 });
33303 },
33304 /**
33305 * Calculate if two or more text nodes are overlapping
33306 * Remove "text-overlapping" class on selected text nodes
33307 * @param {ChartInternal} $$ ChartInternal context
33308 * @param {string} selector Selector string
33309 * @private
33310 */
33311 undoMarkOverlapped: function undoMarkOverlapped($$, selector) {
33312 $$.$el.arcs.selectAll(selector).each(function () {
33313 src_selectAll([this, this.previousSibling]).classed($TEXT.TextOverlapping, !1);
33314 });
33315 },
33316 /**
33317 * Check if meets the ratio to show data label text
33318 * @param {number} ratio ratio to meet
33319 * @param {string} type chart type
33320 * @returns {boolean}
33321 * @private
33322 */
33323 meetsLabelThreshold: function meetsLabelThreshold(ratio, type) {
33324 if (ratio === void 0) {
33325 ratio = 0;
33326 }
33327 var $$ = this,
33328 config = $$.config,
33329 threshold = config[type + "_label_threshold"] || 0;
33330 return ratio >= threshold;
33331 }
33332});
33333;// CONCATENATED MODULE: ./src/ChartInternal/internals/title.ts
33334/**
33335 * Copyright (c) 2017 ~ present NAVER Corp.
33336 * billboard.js project is licensed under the MIT license
33337 */
33338
33339
33340
33341/**
33342 * Get the text position
33343 * @param {string} pos right, left or center
33344 * @param {number} width chart width
33345 * @returns {string|number} text-anchor value or position in pixel
33346 * @private
33347 */
33348function getTextPos(pos, width) {
33349 if (pos === void 0) {
33350 pos = "left";
33351 }
33352 var isNum = isNumber(width),
33353 position;
33354 if (pos.indexOf("center") > -1) {
33355 position = isNum ? width / 2 : "middle";
33356 } else if (pos.indexOf("right") > -1) {
33357 position = isNum ? width : "end";
33358 } else {
33359 position = isNum ? 0 : "start";
33360 }
33361 return position;
33362}
33363/* harmony default export */ var internals_title = ({
33364 /**
33365 * Initializes the title
33366 * @private
33367 */
33368 initTitle: function initTitle() {
33369 var $$ = this,
33370 config = $$.config,
33371 $el = $$.$el;
33372 if (config.title_text) {
33373 $el.title = $el.svg.append("g");
33374 var text = $el.title.append("text").style("text-anchor", getTextPos(config.title_position)).attr("class", $TEXT.title);
33375 setTextValue(text, config.title_text, [.3, 1.5]);
33376 }
33377 },
33378 /**
33379 * Redraw title
33380 * @private
33381 */
33382 redrawTitle: function redrawTitle() {
33383 var $$ = this,
33384 config = $$.config,
33385 current = $$.state.current,
33386 title = $$.$el.title;
33387 if (title) {
33388 var y = $$.yForTitle.call($$);
33389 if (/g/i.test(title.node().tagName)) {
33390 title.attr("transform", "translate(" + getTextPos(config.title_position, current.width) + ", " + y + ")");
33391 } else {
33392 title.attr("x", $$.xForTitle.call($$)).attr("y", y);
33393 }
33394 }
33395 },
33396 /**
33397 * Returns the x attribute value of the title
33398 * @returns {number} x attribute value
33399 * @private
33400 */
33401 xForTitle: function xForTitle() {
33402 var $$ = this,
33403 config = $$.config,
33404 current = $$.state.current,
33405 position = config.title_position || "left",
33406 textRectWidth = $$.getTextRect($$.$el.title, $TEXT.title).width,
33407 x;
33408 if (/(right|center)/.test(position)) {
33409 x = current.width - textRectWidth;
33410 if (position.indexOf("right") >= 0) {
33411 x = current.width - textRectWidth - config.title_padding.right;
33412 } else if (position.indexOf("center") >= 0) {
33413 x = (current.width - textRectWidth) / 2;
33414 }
33415 } else {
33416 // left
33417 x = config.title_padding.left || 0;
33418 }
33419 return x;
33420 },
33421 /**
33422 * Returns the y attribute value of the title
33423 * @returns {number} y attribute value
33424 * @private
33425 */
33426 yForTitle: function yForTitle() {
33427 var $$ = this;
33428 return ($$.config.title_padding.top || 0) + $$.getTextRect($$.$el.title, $TEXT.title).height;
33429 },
33430 /**
33431 * Get title padding
33432 * @returns {number} padding value
33433 * @private
33434 */
33435 getTitlePadding: function getTitlePadding() {
33436 var $$ = this;
33437 return $$.yForTitle() + ($$.config.title_padding.bottom || 0);
33438 }
33439});
33440;// CONCATENATED MODULE: ./src/ChartInternal/internals/tooltip.ts
33441
33442/**
33443 * Copyright (c) 2017 ~ present NAVER Corp.
33444 * billboard.js project is licensed under the MIT license
33445 */
33446
33447
33448
33449
33450/* harmony default export */ var internals_tooltip = ({
33451 /**
33452 * Initializes the tooltip
33453 * @private
33454 */
33455 initTooltip: function initTooltip() {
33456 var $$ = this,
33457 config = $$.config,
33458 $el = $$.$el;
33459 $el.tooltip = src_select(config.tooltip_contents.bindto);
33460 if ($el.tooltip.empty()) {
33461 $el.tooltip = $el.chart.append("div").attr("class", $TOOLTIP.tooltipContainer).style("position", "absolute").style("pointer-events", "none").style("display", "none");
33462 }
33463 $$.bindTooltipResizePos();
33464 },
33465 initShowTooltip: function initShowTooltip() {
33466 var _this = this,
33467 $$ = this,
33468 config = $$.config,
33469 $el = $$.$el,
33470 _$$$state = $$.state,
33471 hasAxis = _$$$state.hasAxis,
33472 hasRadar = _$$$state.hasRadar;
33473 // Show tooltip if needed
33474 if (config.tooltip_init_show) {
33475 var _$$$axis,
33476 _$$$axis2,
33477 isArc = !(hasAxis && hasRadar);
33478 if ((_$$$axis = $$.axis) != null && _$$$axis.isTimeSeries() && isString(config.tooltip_init_x)) {
33479 var targets = $$.data.targets[0],
33480 i,
33481 val;
33482 config.tooltip_init_x = parseDate.call($$, config.tooltip_init_x);
33483 for (i = 0; val = targets.values[i]; i++) {
33484 if (val.x - config.tooltip_init_x === 0) {
33485 break;
33486 }
33487 }
33488 config.tooltip_init_x = i;
33489 }
33490 var data = $$.data.targets.map(function (d) {
33491 _newArrowCheck(this, _this);
33492 var x = isArc ? 0 : config.tooltip_init_x;
33493 return $$.addName(d.values[x]);
33494 }.bind(this));
33495 if (isArc) {
33496 data = [data[config.tooltip_init_x]];
33497 }
33498 $el.tooltip.html($$.getTooltipHTML(data, (_$$$axis2 = $$.axis) == null ? void 0 : _$$$axis2.getXAxisTickFormat(), $$.getDefaultValueFormat(), $$.color));
33499 if (!config.tooltip_contents.bindto) {
33500 $el.tooltip.style("top", config.tooltip_init_position.top).style("left", config.tooltip_init_position.left).style("display", null);
33501 }
33502 }
33503 },
33504 /**
33505 * Get the tooltip HTML string
33506 * @param {Array} args Arguments
33507 * @returns {string} Formatted HTML string
33508 * @private
33509 */
33510 getTooltipHTML: function getTooltipHTML() {
33511 var $$ = this,
33512 api = $$.api,
33513 config = $$.config;
33514 return isFunction(config.tooltip_contents) ? config.tooltip_contents.bind(api).apply(void 0, arguments) : $$.getTooltipContent.apply($$, arguments);
33515 },
33516 /**
33517 * Returns the tooltip content(HTML string)
33518 * @param {object} d data
33519 * @param {Function} defaultTitleFormat Default title format
33520 * @param {Function} defaultValueFormat Default format for each data value in the tooltip.
33521 * @param {Function} color Color function
33522 * @returns {string} html
33523 * @private
33524 */
33525 getTooltipContent: function getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) {
33526 var _this2 = this,
33527 $$ = this,
33528 api = $$.api,
33529 config = $$.config,
33530 state = $$.state,
33531 _map = ["title", "name", "value"].map(function (v) {
33532 _newArrowCheck(this, _this2);
33533 var fn = config["tooltip_format_" + v];
33534 return isFunction(fn) ? fn.bind(api) : fn;
33535 }.bind(this)),
33536 titleFormat = _map[0],
33537 nameFormat = _map[1],
33538 valueFormat = _map[2];
33539 titleFormat = titleFormat || defaultTitleFormat;
33540 nameFormat = nameFormat || function (name) {
33541 _newArrowCheck(this, _this2);
33542 return name;
33543 }.bind(this);
33544 valueFormat = valueFormat || ($$.isStackNormalized() ? function (v, ratio) {
33545 _newArrowCheck(this, _this2);
33546 return (ratio * 100).toFixed(2) + "%";
33547 }.bind(this) : defaultValueFormat);
33548 var order = config.tooltip_order,
33549 getRowValue = function (row) {
33550 _newArrowCheck(this, _this2);
33551 return $$.axis && $$.isBubbleZType(row) ? $$.getBubbleZData(row.value, "z") : $$.getBaseValue(row);
33552 }.bind(this),
33553 getBgColor = $$.levelColor ? function (row) {
33554 _newArrowCheck(this, _this2);
33555 return $$.levelColor(row.value);
33556 }.bind(this) : function (row) {
33557 _newArrowCheck(this, _this2);
33558 return color(row);
33559 }.bind(this),
33560 contents = config.tooltip_contents,
33561 tplStr = contents.template,
33562 targetIds = $$.mapToTargetIds();
33563 if (order === null && config.data_groups.length) {
33564 // for stacked data, order should aligned with the visually displayed data
33565 var ids = $$.orderTargets($$.data.targets).map(function (i2) {
33566 _newArrowCheck(this, _this2);
33567 return i2.id;
33568 }.bind(this)).reverse();
33569 d.sort(function (a, b) {
33570 _newArrowCheck(this, _this2);
33571 var v1 = a ? a.value : null,
33572 v2 = b ? b.value : null;
33573 if (v1 > 0 && v2 > 0) {
33574 v1 = a.id ? ids.indexOf(a.id) : null;
33575 v2 = b.id ? ids.indexOf(b.id) : null;
33576 }
33577 return v1 - v2;
33578 }.bind(this));
33579 } else if (/^(asc|desc)$/.test(order)) {
33580 d.sort(function (a, b) {
33581 _newArrowCheck(this, _this2);
33582 var v1 = a ? getRowValue(a) : null,
33583 v2 = b ? getRowValue(b) : null;
33584 return order === "asc" ? v1 - v2 : v2 - v1;
33585 }.bind(this));
33586 } else if (isFunction(order)) {
33587 d.sort(order.bind(api));
33588 }
33589 var tpl = $$.getTooltipContentTemplate(tplStr),
33590 len = d.length,
33591 text,
33592 row,
33593 param,
33594 value,
33595 i;
33596 for (i = 0; i < len; i++) {
33597 row = d[i];
33598 if (!row || !(getRowValue(row) || getRowValue(row) === 0)) {
33599 continue;
33600 }
33601 if (isUndefined(text)) {
33602 var title = (state.hasAxis || state.hasRadar) && sanitise(titleFormat ? titleFormat(row.x) : row.x);
33603 text = tplProcess(tpl[0], {
33604 CLASS_TOOLTIP: $TOOLTIP.tooltip,
33605 TITLE: isValue(title) ? tplStr ? title : "<tr><th colspan=\"2\">" + title + "</th></tr>" : ""
33606 });
33607 }
33608 if (!row.ratio && $$.$el.arcs) {
33609 row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path." + $ARC.arc + "-" + row.id).data()[0]);
33610 }
33611 param = [row.ratio, row.id, row.index, d];
33612 value = sanitise(valueFormat.apply(void 0, [getRowValue(row)].concat(param)));
33613 if ($$.isAreaRangeType(row)) {
33614 var _map2 = ["high", "low"].map(function (v) {
33615 _newArrowCheck(this, _this2);
33616 return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v)].concat(param)));
33617 }.bind(this)),
33618 high = _map2[0],
33619 low = _map2[1];
33620 value = "<b>Mid:</b> " + value + " <b>High:</b> " + high + " <b>Low:</b> " + low;
33621 } else if ($$.isCandlestickType(row)) {
33622 var _map3 = ["open", "high", "low", "close", "volume"].map(function (v) {
33623 _newArrowCheck(this, _this2);
33624 return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v, "candlestick")].concat(param)));
33625 }.bind(this)),
33626 open = _map3[0],
33627 _high = _map3[1],
33628 _low = _map3[2],
33629 close = _map3[3],
33630 volume = _map3[4];
33631 value = "<b>Open:</b> " + open + " <b>High:</b> " + _high + " <b>Low:</b> " + _low + " <b>Close:</b> " + close + (volume ? " <b>Volume:</b> " + volume : "");
33632 } else if ($$.isBarRangeType(row)) {
33633 var _row$value = row.value,
33634 start = _row$value[0],
33635 end = _row$value[1];
33636 value = valueFormat(start) + " ~ " + valueFormat(end);
33637 }
33638 if (value !== undefined) {
33639 var _ret = function () {
33640 var _this3 = this;
33641 // Skip elements when their name is set to null
33642 if (row.name === null) {
33643 return "continue";
33644 }
33645 var name = sanitise(nameFormat.apply(void 0, [row.name].concat(param))),
33646 color = getBgColor(row),
33647 contentValue = {
33648 CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id),
33649 COLOR: tplStr || !$$.patterns ? color : "<svg><rect style=\"fill:" + color + "\" width=\"10\" height=\"10\"></rect></svg>",
33650 NAME: name,
33651 VALUE: value
33652 };
33653 if (tplStr && isObject(contents.text)) {
33654 var index = targetIds.indexOf(row.id);
33655 Object.keys(contents.text).forEach(function (key) {
33656 _newArrowCheck(this, _this3);
33657 contentValue[key] = contents.text[key][index];
33658 }.bind(this));
33659 }
33660 text += tplProcess(tpl[1], contentValue);
33661 }();
33662 if (_ret === "continue") continue;
33663 }
33664 }
33665 return text + "</table>";
33666 },
33667 /**
33668 * Get the content template string
33669 * @param {string} tplStr Tempalte string
33670 * @returns {Array} Template string
33671 * @private
33672 */
33673 getTooltipContentTemplate: function getTooltipContentTemplate(tplStr) {
33674 return (tplStr || "<table class=\"{=CLASS_TOOLTIP}\"><tbody>\n\t\t\t\t{=TITLE}\n\t\t\t\t{{<tr class=\"{=CLASS_TOOLTIP_NAME}\">\n\t\t\t\t\t<td class=\"name\">" + (this.patterns ? "{=COLOR}" : "<span style=\"background-color:{=COLOR}\"></span>") + "{=NAME}</td>\n\t\t\t\t\t<td class=\"value\">{=VALUE}</td>\n\t\t\t\t</tr>}}\n\t\t\t</tbody></table>").replace(/(\r?\n|\t)/g, "").split(/{{(.*)}}/);
33675 },
33676 /**
33677 * Returns the position of the tooltip
33678 * @param {object} dataToShow data
33679 * @param {string} tWidth Width value of tooltip element
33680 * @param {string} tHeight Height value of tooltip element
33681 * @param {HTMLElement} element Tooltip element
33682 * @returns {object} top, left value
33683 * @private
33684 */
33685 tooltipPosition: function tooltipPosition(dataToShow, tWidth, tHeight, element) {
33686 var _this4 = this,
33687 $$ = this,
33688 config = $$.config,
33689 scale = $$.scale,
33690 state = $$.state,
33691 _state = state,
33692 width = _state.width,
33693 height = _state.height,
33694 current = _state.current,
33695 isLegendRight = _state.isLegendRight,
33696 inputType = _state.inputType,
33697 event = _state.event,
33698 hasGauge = $$.hasType("gauge") && !config.gauge_fullCircle,
33699 svgLeft = $$.getSvgLeft(!0),
33700 chartRight = svgLeft + current.width - $$.getCurrentPaddingRight(),
33701 chartLeft = $$.getCurrentPaddingLeft(!0),
33702 _getPointer = getPointer(event, element),
33703 x = _getPointer[0],
33704 y = _getPointer[1];
33705 // Determine tooltip position
33706 if ($$.hasArcType()) {
33707 var raw = inputType === "touch" || $$.hasType("radar");
33708 if (!raw) {
33709 y += hasGauge ? height : height / 2;
33710 x += (width - (isLegendRight ? $$.getLegendWidth() : 0)) / 2;
33711 }
33712 } else {
33713 var dataScale = scale.x(dataToShow[0].x);
33714 if (config.axis_rotated) {
33715 y = dataScale + 20;
33716 x += svgLeft + 100;
33717 chartRight -= svgLeft;
33718 } else {
33719 y -= 5;
33720 x = svgLeft + chartLeft + 20 + ($$.scale.zoom ? x : dataScale);
33721 }
33722 }
33723
33724 // when tooltip left + tWidth > chart's width
33725 if (x + tWidth + 15 > chartRight) {
33726 x -= tWidth + chartLeft;
33727 }
33728 if (y + tHeight > current.height) {
33729 y -= hasGauge ? tHeight * 3 : tHeight + 30;
33730 }
33731 var pos = {
33732 top: y,
33733 left: x
33734 };
33735
33736 // make sure to not be positioned out of viewport
33737 Object.keys(pos).forEach(function (v) {
33738 _newArrowCheck(this, _this4);
33739 if (pos[v] < 0) {
33740 pos[v] = 0;
33741 }
33742 }.bind(this));
33743 return pos;
33744 },
33745 /**
33746 * Show the tooltip
33747 * @param {object} selectedData Data object
33748 * @param {SVGElement} eventRect Event <rect> element
33749 * @private
33750 */
33751 showTooltip: function showTooltip(selectedData, eventRect) {
33752 var _this5 = this,
33753 $$ = this,
33754 config = $$.config,
33755 scale = $$.scale,
33756 state = $$.state,
33757 tooltip = $$.$el.tooltip,
33758 bindto = config.tooltip_contents.bindto,
33759 dataToShow = selectedData.filter(function (d) {
33760 _newArrowCheck(this, _this5);
33761 return d && isValue($$.getBaseValue(d));
33762 }.bind(this));
33763 if (!tooltip || dataToShow.length === 0 || !config.tooltip_show) {
33764 return;
33765 }
33766 var datum = tooltip.datum(),
33767 _ref = datum || {},
33768 _ref$width = _ref.width,
33769 width = _ref$width === void 0 ? 0 : _ref$width,
33770 _ref$height = _ref.height,
33771 height = _ref$height === void 0 ? 0 : _ref$height,
33772 dataStr = JSON.stringify(selectedData);
33773 if (!datum || datum.current !== dataStr) {
33774 var index = selectedData.concat().sort()[0].index;
33775 callFn(config.tooltip_onshow, $$.api, selectedData);
33776
33777 // set tooltip content
33778 tooltip.html($$.getTooltipHTML(selectedData,
33779 // data
33780 $$.axis ? $$.axis.getXAxisTickFormat() : $$.categoryName.bind($$),
33781 // defaultTitleFormat
33782 $$.getDefaultValueFormat(),
33783 // defaultValueFormat
33784 $$.color // color
33785 )).style("display", null).style("visibility", null) // for IE9
33786 .datum(datum = {
33787 index: index,
33788 current: dataStr,
33789 width: width = tooltip.property("offsetWidth"),
33790 height: height = tooltip.property("offsetHeight")
33791 });
33792 callFn(config.tooltip_onshown, $$.api, selectedData);
33793 $$._handleLinkedCharts(!0, index);
33794 }
33795 if (!bindto) {
33796 var _config$tooltip_posit,
33797 _selectedData$filter,
33798 fnPos = ((_config$tooltip_posit = config.tooltip_position) == null ? void 0 : _config$tooltip_posit.bind($$.api)) || $$.tooltipPosition.bind($$),
33799 _getPointer2 = getPointer(state.event, eventRect),
33800 x = _getPointer2[0],
33801 y = _getPointer2[1],
33802 currPos = {
33803 x: x,
33804 y: y
33805 },
33806 data = (_selectedData$filter = selectedData.filter(Boolean)) == null ? void 0 : _selectedData$filter.shift();
33807 if (scale.x && data && "x" in data) {
33808 currPos.xAxis = scale.x(data.x);
33809 }
33810
33811 // Get tooltip dimensions
33812 var pos = fnPos(dataToShow, width, height, eventRect, currPos);
33813 ["top", "left"].forEach(function (v) {
33814 _newArrowCheck(this, _this5);
33815 var value = pos[v];
33816 tooltip.style(v, value + "px");
33817
33818 // Remember left pos in percentage to be used on resize call
33819 if (v === "left" && !datum.xPosInPercent) {
33820 datum.xPosInPercent = value / state.current.width * 100;
33821 }
33822 }.bind(this));
33823 }
33824 },
33825 /**
33826 * Adjust tooltip position on resize event
33827 * @private
33828 */
33829 bindTooltipResizePos: function bindTooltipResizePos() {
33830 var _this6 = this,
33831 $$ = this,
33832 resizeFunction = $$.resizeFunction,
33833 state = $$.state,
33834 tooltip = $$.$el.tooltip;
33835 resizeFunction.add(function () {
33836 _newArrowCheck(this, _this6);
33837 if (tooltip.style("display") === "block") {
33838 var current = state.current,
33839 _tooltip$datum = tooltip.datum(),
33840 width = _tooltip$datum.width,
33841 xPosInPercent = _tooltip$datum.xPosInPercent,
33842 _value = current.width / 100 * xPosInPercent,
33843 diff = current.width - (_value + width);
33844 // if tooltip size overs current viewport size
33845 if (diff < 0) {
33846 _value += diff;
33847 }
33848 tooltip.style("left", _value + "px");
33849 }
33850 }.bind(this));
33851 },
33852 /**
33853 * Hide the tooltip
33854 * @param {boolean} force Force to hide
33855 * @private
33856 */
33857 hideTooltip: function hideTooltip(force) {
33858 var $$ = this,
33859 api = $$.api,
33860 config = $$.config,
33861 tooltip = $$.$el.tooltip;
33862 if (tooltip && tooltip.style("display") !== "none" && (!config.tooltip_doNotHide || force)) {
33863 var selectedData = JSON.parse(tooltip.datum().current);
33864 callFn(config.tooltip_onhide, api, selectedData);
33865
33866 // hide tooltip
33867 tooltip.style("display", "none").style("visibility", "hidden") // for IE9
33868 .datum(null);
33869 callFn(config.tooltip_onhidden, api, selectedData);
33870 }
33871 },
33872 /**
33873 * Toggle display for linked chart instances
33874 * @param {boolean} show true: show, false: hide
33875 * @param {number} index x Axis index
33876 * @private
33877 */
33878 _handleLinkedCharts: function _handleLinkedCharts(show, index) {
33879 var _this7 = this,
33880 $$ = this,
33881 charts = $$.charts,
33882 config = $$.config,
33883 event = $$.state.event;
33884 // Prevent propagation among instances if isn't instantiated from the user's event
33885 // https://github.com/naver/billboard.js/issues/1979
33886 if (event != null && event.isTrusted && config.tooltip_linked && charts.length > 1) {
33887 var linkedName = config.tooltip_linked_name;
33888 charts.filter(function (c) {
33889 _newArrowCheck(this, _this7);
33890 return c !== $$.api;
33891 }.bind(this)).forEach(function (c) {
33892 _newArrowCheck(this, _this7);
33893 var _c$internal = c.internal,
33894 config = _c$internal.config,
33895 $el = _c$internal.$el,
33896 isLinked = config.tooltip_linked,
33897 name = config.tooltip_linked_name,
33898 isInDom = browser_doc.body.contains($el.chart.node());
33899 if (isLinked && linkedName === name && isInDom) {
33900 var data = $el.tooltip.data()[0],
33901 isNotSameIndex = index !== (data == null ? void 0 : data.index);
33902 try {
33903 c.tooltip[show && isNotSameIndex ? "show" : "hide"]({
33904 index: index
33905 });
33906 } catch (e) {}
33907 }
33908 }.bind(this));
33909 }
33910 }
33911});
33912;// CONCATENATED MODULE: ./src/ChartInternal/internals/transform.ts
33913/**
33914 * Copyright (c) 2017 ~ present NAVER Corp.
33915 * billboard.js project is licensed under the MIT license
33916 */
33917
33918
33919/* harmony default export */ var transform = ({
33920 getTranslate: function getTranslate(target, index) {
33921 if (index === void 0) {
33922 index = 0;
33923 }
33924 var $$ = this,
33925 config = $$.config,
33926 state = $$.state,
33927 isRotated = config.axis_rotated,
33928 padding = 0,
33929 x,
33930 y;
33931 if (index && /^(x|y2?)$/.test(target)) {
33932 padding = $$.getAxisSize(target) * index;
33933 }
33934 if (target === "main") {
33935 x = asHalfPixel(state.margin.left);
33936 y = asHalfPixel(state.margin.top);
33937 } else if (target === "context") {
33938 x = asHalfPixel(state.margin2.left);
33939 y = asHalfPixel(state.margin2.top);
33940 } else if (target === "legend") {
33941 x = state.margin3.left;
33942 y = state.margin3.top;
33943 } else if (target === "x") {
33944 x = isRotated ? -padding : 0;
33945 y = isRotated ? 0 : state.height + padding;
33946 } else if (target === "y") {
33947 x = isRotated ? 0 : -padding;
33948 y = isRotated ? state.height + padding : 0;
33949 } else if (target === "y2") {
33950 x = isRotated ? 0 : state.width + padding;
33951 y = isRotated ? 1 - padding : 0;
33952 } else if (target === "subX") {
33953 x = 0;
33954 y = isRotated ? 0 : state.height2;
33955 } else if (target === "arc") {
33956 x = state.arcWidth / 2;
33957 y = state.arcHeight / 2;
33958 } else if (target === "polar") {
33959 x = state.arcWidth / 2;
33960 y = state.arcHeight / 2;
33961 } else if (target === "radar") {
33962 var _$$$getRadarSize = $$.getRadarSize(),
33963 width = _$$$getRadarSize[0];
33964 x = state.width / 2 - width;
33965 y = asHalfPixel(state.margin.top);
33966 }
33967 return "translate(" + x + ", " + y + ")";
33968 },
33969 transformMain: function transformMain(withTransition, transitions) {
33970 var $$ = this,
33971 main = $$.$el.main,
33972 $T = $$.$T,
33973 xAxis = transitions != null && transitions.axisX ? transitions.axisX : $T(main.select("." + $AXIS.axisX), withTransition),
33974 yAxis = transitions != null && transitions.axisY ? transitions.axisY : $T(main.select("." + $AXIS.axisY), withTransition),
33975 y2Axis = transitions != null && transitions.axisY2 ? transitions.axisY2 : $T(main.select("." + $AXIS.axisY2), withTransition);
33976 $T(main, withTransition).attr("transform", $$.getTranslate("main"));
33977 xAxis.attr("transform", $$.getTranslate("x"));
33978 yAxis.attr("transform", $$.getTranslate("y"));
33979 y2Axis.attr("transform", $$.getTranslate("y2"));
33980 main.select("." + $ARC.chartArcs).attr("transform", $$.getTranslate("arc"));
33981 },
33982 transformAll: function transformAll(withTransition, transitions) {
33983 var $$ = this,
33984 config = $$.config,
33985 hasAxis = $$.state.hasAxis,
33986 $el = $$.$el;
33987 $$.transformMain(withTransition, transitions);
33988 hasAxis && config.subchart_show && $$.transformContext(withTransition, transitions);
33989 $el.legend && $$.transformLegend(withTransition);
33990 }
33991});
33992;// CONCATENATED MODULE: ./src/ChartInternal/internals/type.ts
33993
33994/**
33995 * Copyright (c) 2017 ~ present NAVER Corp.
33996 * billboard.js project is licensed under the MIT license
33997 */
33998
33999
34000/* harmony default export */ var internals_type = ({
34001 setTargetType: function setTargetType(targetIds, type) {
34002 var _this = this,
34003 $$ = this,
34004 config = $$.config,
34005 withoutFadeIn = $$.state.withoutFadeIn;
34006 $$.mapToTargetIds(targetIds).forEach(function (id) {
34007 _newArrowCheck(this, _this);
34008 withoutFadeIn[id] = type === config.data_types[id];
34009 config.data_types[id] = type;
34010 }.bind(this));
34011 if (!targetIds) {
34012 config.data_type = type;
34013 }
34014 },
34015 /**
34016 * Updte current used chart types
34017 * @private
34018 */
34019 updateTypesElements: function updateTypesElements() {
34020 var _this2 = this,
34021 $$ = this,
34022 current = $$.state.current;
34023 Object.keys(TYPE).forEach(function (v) {
34024 _newArrowCheck(this, _this2);
34025 var t = TYPE[v],
34026 has = $$.hasType(t, null, !0),
34027 idx = current.types.indexOf(t);
34028 if (idx === -1 && has) {
34029 current.types.push(t);
34030 } else if (idx > -1 && !has) {
34031 current.types.splice(idx, 1);
34032 }
34033 }.bind(this));
34034
34035 // Update current chart elements reference
34036 $$.setChartElements();
34037 },
34038 /**
34039 * Check if given chart types exists
34040 * @param {string} type Chart type
34041 * @param {Array} targetsValue Data array
34042 * @param {boolean} checkFromData Force to check type cotains from data targets
34043 * @returns {boolean}
34044 * @private
34045 */
34046 hasType: function hasType(type, targetsValue, checkFromData) {
34047 var _current$types,
34048 _this3 = this;
34049 if (checkFromData === void 0) {
34050 checkFromData = !1;
34051 }
34052 var $$ = this,
34053 config = $$.config,
34054 current = $$.state.current,
34055 types = config.data_types,
34056 targets = targetsValue || $$.data.targets,
34057 has = !1;
34058 if (!checkFromData && ((_current$types = current.types) == null ? void 0 : _current$types.indexOf(type)) > -1) {
34059 has = !0;
34060 } else if (targets != null && targets.length) {
34061 targets.forEach(function (target) {
34062 _newArrowCheck(this, _this3);
34063 var t = types[target.id];
34064 if (t === type || !t && type === "line") {
34065 has = !0;
34066 }
34067 }.bind(this));
34068 } else if (Object.keys(types).length) {
34069 Object.keys(types).forEach(function (id) {
34070 _newArrowCheck(this, _this3);
34071 if (types[id] === type) {
34072 has = !0;
34073 }
34074 }.bind(this));
34075 } else {
34076 has = config.data_type === type;
34077 }
34078 return has;
34079 },
34080 /**
34081 * Check if contains given chart types
34082 * @param {string} type Type key
34083 * @param {object} targets Target data
34084 * @param {Array} exclude Excluded types
34085 * @returns {boolean}
34086 * @private
34087 */
34088 hasTypeOf: function hasTypeOf(type, targets, exclude) {
34089 var _this4 = this;
34090 if (exclude === void 0) {
34091 exclude = [];
34092 }
34093 if (type in TYPE_BY_CATEGORY) {
34094 return !TYPE_BY_CATEGORY[type].filter(function (v) {
34095 _newArrowCheck(this, _this4);
34096 return exclude.indexOf(v) === -1;
34097 }.bind(this)).every(function (v) {
34098 _newArrowCheck(this, _this4);
34099 return !this.hasType(v, targets);
34100 }.bind(this));
34101 }
34102 return !1;
34103 },
34104 /**
34105 * Check if given data is certain chart type
34106 * @param {object} d Data object
34107 * @param {string|Array} type chart type
34108 * @returns {boolean}
34109 * @private
34110 */
34111 isTypeOf: function isTypeOf(d, type) {
34112 var id = isString(d) ? d : d.id,
34113 dataType = this.config.data_types[id] || this.config.data_type;
34114 return isArray(type) ? type.indexOf(dataType) >= 0 : dataType === type;
34115 },
34116 hasPointType: function hasPointType() {
34117 var $$ = this;
34118 return $$.hasTypeOf("Line") || $$.hasType("bubble") || $$.hasType("scatter");
34119 },
34120 /**
34121 * Check if contains arc types chart
34122 * @param {object} targets Target data
34123 * @param {Array} exclude Excluded types
34124 * @returns {boolean}
34125 * @private
34126 */
34127 hasArcType: function hasArcType(targets, exclude) {
34128 return this.hasTypeOf("Arc", targets, exclude);
34129 },
34130 hasMultiArcGauge: function hasMultiArcGauge() {
34131 return this.hasType("gauge") && this.config.gauge_type === "multi";
34132 },
34133 isLineType: function isLineType(d) {
34134 var id = isString(d) ? d : d.id;
34135 return !this.config.data_types[id] || this.isTypeOf(id, TYPE_BY_CATEGORY.Line);
34136 },
34137 isStepType: function isStepType(d) {
34138 return this.isTypeOf(d, TYPE_BY_CATEGORY.Step);
34139 },
34140 isSplineType: function isSplineType(d) {
34141 return this.isTypeOf(d, TYPE_BY_CATEGORY.Spline);
34142 },
34143 isAreaType: function isAreaType(d) {
34144 return this.isTypeOf(d, TYPE_BY_CATEGORY.Area);
34145 },
34146 isAreaRangeType: function isAreaRangeType(d) {
34147 return this.isTypeOf(d, TYPE_BY_CATEGORY.AreaRange);
34148 },
34149 isBarType: function isBarType(d) {
34150 return this.isTypeOf(d, "bar");
34151 },
34152 isBubbleType: function isBubbleType(d) {
34153 return this.isTypeOf(d, "bubble");
34154 },
34155 isCandlestickType: function isCandlestickType(d) {
34156 return this.isTypeOf(d, "candlestick");
34157 },
34158 isScatterType: function isScatterType(d) {
34159 return this.isTypeOf(d, "scatter");
34160 },
34161 isPieType: function isPieType(d) {
34162 return this.isTypeOf(d, "pie");
34163 },
34164 isGaugeType: function isGaugeType(d) {
34165 return this.isTypeOf(d, "gauge");
34166 },
34167 isDonutType: function isDonutType(d) {
34168 return this.isTypeOf(d, "donut");
34169 },
34170 isPolarType: function isPolarType(d) {
34171 return this.isTypeOf(d, "polar");
34172 },
34173 isRadarType: function isRadarType(d) {
34174 return this.isTypeOf(d, "radar");
34175 },
34176 isArcType: function isArcType(d) {
34177 return this.isPieType(d) || this.isDonutType(d) || this.isGaugeType(d) || this.isPolarType(d) || this.isRadarType(d);
34178 },
34179 // determine if is 'circle' data point
34180 isCirclePoint: function isCirclePoint(node) {
34181 var config = this.config,
34182 pattern = config.point_pattern,
34183 isCircle = !1;
34184 if ((node == null ? void 0 : node.tagName) === "circle") {
34185 isCircle = !0;
34186 } else {
34187 isCircle = config.point_type === "circle" && (!pattern || isArray(pattern) && pattern.length === 0);
34188 }
34189 return isCircle;
34190 },
34191 lineData: function lineData(d) {
34192 return this.isLineType(d) ? [d] : [];
34193 },
34194 arcData: function arcData(d) {
34195 return this.isArcType(d.data) ? [d] : [];
34196 },
34197 /**
34198 * Get data adapt for data label showing
34199 * @param {object} d Data object
34200 * @returns {Array}
34201 * @private
34202 */
34203 labelishData: function labelishData(d) {
34204 var _this5 = this;
34205 return this.isBarType(d) || this.isLineType(d) || this.isScatterType(d) || this.isBubbleType(d) || this.isCandlestickType(d) || this.isRadarType(d) ? d.values.filter(function (v) {
34206 _newArrowCheck(this, _this5);
34207 return isNumber(v.value) || !!v.value;
34208 }.bind(this)) : [];
34209 },
34210 barLineBubbleData: function barLineBubbleData(d) {
34211 return this.isBarType(d) || this.isLineType(d) || this.isBubbleType(d) ? d.values : [];
34212 },
34213 // https://github.com/d3/d3-shape#curves
34214 isInterpolationType: function isInterpolationType(type) {
34215 return ["basis", "basis-closed", "basis-open", "bundle", "cardinal", "cardinal-closed", "cardinal-open", "catmull-rom", "catmull-rom-closed", "catmull-rom-open", "linear", "linear-closed", "monotone-x", "monotone-y", "natural"].indexOf(type) >= 0;
34216 }
34217});
34218;// CONCATENATED MODULE: ./src/ChartInternal/ChartInternal.ts
34219
34220/**
34221 * Copyright (c) 2017 ~ present NAVER Corp.
34222 * billboard.js project is licensed under the MIT license
34223 * @ignore
34224 */
34225
34226
34227
34228
34229
34230
34231
34232
34233
34234
34235
34236// data
34237
34238
34239
34240
34241// interactions
34242
34243
34244// internals
34245
34246 // used to retrieve radar Axis name
34247
34248
34249
34250
34251
34252
34253
34254
34255
34256
34257
34258
34259
34260
34261
34262/**
34263 * Internal chart class.
34264 * - Note: Instantiated internally, not exposed for public.
34265 * @class ChartInternal
34266 * @ignore
34267 * @private
34268 */
34269var ChartInternal = /*#__PURE__*/function () {
34270 // API interface
34271 // config object
34272 // cache instance
34273 // elements
34274 // state variables
34275 // all Chart instances array within page (equivalent of 'bb.instances')
34276
34277 // data object
34278
34279 // Axis
34280 // Axis
34281
34282 // scales
34283
34284 // original values
34285
34286 // formatter function
34287
34288 // format function
34289
34290 function ChartInternal(api) {
34291 this.api = void 0;
34292 this.config = void 0;
34293 this.cache = void 0;
34294 this.$el = void 0;
34295 this.state = void 0;
34296 this.charts = void 0;
34297 this.data = {
34298 xs: {},
34299 targets: []
34300 };
34301 this.axis = void 0;
34302 this.scale = {
34303 x: null,
34304 y: null,
34305 y2: null,
34306 subX: null,
34307 subY: null,
34308 subY2: null,
34309 zoom: null
34310 };
34311 this.org = {
34312 xScale: null,
34313 xDomain: null
34314 };
34315 this.color = void 0;
34316 this.patterns = void 0;
34317 this.levelColor = void 0;
34318 this.point = void 0;
34319 this.brush = void 0;
34320 this.format = {
34321 extraLineClasses: null,
34322 xAxisTick: null,
34323 dataTime: null,
34324 // dataTimeFormat
34325 defaultAxisTime: null,
34326 // defaultAxisTimeFormat
34327 axisTime: null // axisTimeFormat
34328 };
34329
34330 var $$ = this;
34331 $$.api = api; // Chart class instance alias
34332 $$.config = new Options();
34333 $$.cache = new Cache();
34334 var store = new Store();
34335 $$.$el = store.getStore("element");
34336 $$.state = store.getStore("state");
34337 $$.$T = $$.$T.bind($$);
34338 }
34339
34340 /**
34341 * Get the selection based on transition config
34342 * @param {SVGElement|d3Selection} selection Target selection
34343 * @param {boolean} force Force transition
34344 * @param {string} name Transition name
34345 * @returns {d3Selection}
34346 * @private
34347 */
34348 var _proto = ChartInternal.prototype;
34349 _proto.$T = function $T(selection, force, name) {
34350 var config = this.config,
34351 state = this.state,
34352 duration = config.transition_duration,
34353 subchart = config.subchart_show,
34354 t = selection;
34355 if (t) {
34356 // in case of non d3 selection, wrap with d3 selection
34357 if ("tagName" in t) {
34358 t = src_select(t);
34359 }
34360
34361 // do not transit on:
34362 // - wheel zoom (state.zooming = true)
34363 // - when has no subchart
34364 // - initialization
34365 // - resizing
34366 var transit = (force !== !1 && duration || force) && (!state.zooming || state.dragging) && !state.resizing && state.rendered && !subchart;
34367 t = transit ? t.transition(name).duration(duration) : t;
34368 }
34369 return t;
34370 };
34371 _proto.beforeInit = function beforeInit() {
34372 var $$ = this;
34373 $$.callPluginHook("$beforeInit");
34374
34375 // can do something
34376 callFn($$.config.onbeforeinit, $$.api);
34377 };
34378 _proto.afterInit = function afterInit() {
34379 var $$ = this;
34380 $$.callPluginHook("$afterInit");
34381
34382 // can do something
34383 callFn($$.config.onafterinit, $$.api);
34384 };
34385 _proto.init = function init() {
34386 var $$ = this,
34387 config = $$.config,
34388 state = $$.state,
34389 $el = $$.$el,
34390 useCssRule = config.boost_useCssRule;
34391 checkModuleImport($$);
34392 state.hasAxis = !$$.hasArcType();
34393 state.hasRadar = !state.hasAxis && $$.hasType("radar");
34394
34395 // datetime to be used for uniqueness
34396 state.datetimeId = "bb-" + +new Date() * getRandom();
34397 if (useCssRule) {
34398 // append style element
34399 var styleEl = browser_doc.createElement("style");
34400
34401 // styleEl.id = styleId;
34402 styleEl.type = "text/css";
34403 browser_doc.head.appendChild(styleEl);
34404 state.style = {
34405 rootSelctor: "." + state.datetimeId,
34406 sheet: styleEl.sheet
34407 };
34408
34409 // used on .destroy()
34410 $el.style = styleEl;
34411 }
34412 var bindto = {
34413 element: config.bindto,
34414 classname: "bb"
34415 };
34416 if (isObject(config.bindto)) {
34417 bindto.element = config.bindto.element || "#chart";
34418 bindto.classname = config.bindto.classname || bindto.classname;
34419 }
34420
34421 // select bind element
34422 $el.chart = isFunction(bindto.element.node) ? config.bindto.element : src_select(bindto.element || []);
34423 if ($el.chart.empty()) {
34424 $el.chart = src_select(browser_doc.body.appendChild(browser_doc.createElement("div")));
34425 }
34426 $el.chart.html("").classed(bindto.classname, !0).classed(state.datetimeId, useCssRule).style("position", "relative");
34427 $$.initParams();
34428 $$.initToRender();
34429 }
34430
34431 /**
34432 * Initialize the rendering process
34433 * @param {boolean} forced Force to render process
34434 * @private
34435 */;
34436 _proto.initToRender = function initToRender(forced) {
34437 var _this = this,
34438 $$ = this,
34439 config = $$.config,
34440 state = $$.state,
34441 chart = $$.$el.chart,
34442 isHidden = function () {
34443 _newArrowCheck(this, _this);
34444 return chart.style("display") === "none" || chart.style("visibility") === "hidden";
34445 }.bind(this),
34446 isLazy = config.render.lazy || isHidden(),
34447 MutationObserver = win.MutationObserver;
34448 if (isLazy && MutationObserver && config.render.observe !== !1 && !forced) {
34449 new MutationObserver(function (mutation, observer) {
34450 _newArrowCheck(this, _this);
34451 if (!isHidden()) {
34452 observer.disconnect();
34453 state.rendered || $$.initToRender(!0);
34454 }
34455 }.bind(this)).observe(chart.node(), {
34456 attributes: !0,
34457 attributeFilter: ["class", "style"]
34458 });
34459 }
34460 if (!isLazy || forced) {
34461 $$.convertData(config, function (res) {
34462 _newArrowCheck(this, _this);
34463 $$.initWithData(res);
34464 $$.afterInit();
34465 }.bind(this));
34466 }
34467 };
34468 _proto.initParams = function initParams() {
34469 var _this2 = this,
34470 $$ = this,
34471 config = $$.config,
34472 format = $$.format,
34473 state = $$.state,
34474 isRotated = config.axis_rotated;
34475 // color settings
34476 $$.color = $$.generateColor();
34477 $$.levelColor = $$.generateLevelColor();
34478
34479 // when 'padding=false' is set, disable axes and subchart. Because they are useless.
34480 if (config.padding === !1) {
34481 config.axis_x_show = !1;
34482 config.axis_y_show = !1;
34483 config.axis_y2_show = !1;
34484 config.subchart_show = !1;
34485 }
34486 if ($$.hasPointType()) {
34487 $$.point = $$.generatePoint();
34488 }
34489 if (state.hasAxis) {
34490 $$.initClip();
34491 format.extraLineClasses = $$.generateExtraLineClass();
34492 format.dataTime = config.data_xLocaltime ? timeParse : utcParse;
34493 format.axisTime = config.axis_x_localtime ? timeFormat : utcFormat;
34494 var isDragZoom = $$.config.zoom_enabled && $$.config.zoom_type === "drag";
34495 format.defaultAxisTime = function (d) {
34496 _newArrowCheck(this, _this2);
34497 var _$$$scale = $$.scale,
34498 x = _$$$scale.x,
34499 zoom = _$$$scale.zoom,
34500 isZoomed = isDragZoom ? zoom : zoom && x.orgDomain().toString() !== zoom.domain().toString(),
34501 specifier = d.getMilliseconds() && ".%L" || d.getSeconds() && ".:%S" || d.getMinutes() && "%I:%M" || d.getHours() && "%I %p" || d.getDate() !== 1 && "%b %d" || isZoomed && d.getDate() === 1 && "%b\'%y" || d.getMonth() && "%-m/%-d" || "%Y";
34502 return format.axisTime(specifier)(d);
34503 }.bind(this);
34504 }
34505 state.isLegendRight = config.legend_position === "right";
34506 state.isLegendInset = config.legend_position === "inset";
34507 state.isLegendTop = config.legend_inset_anchor === "top-left" || config.legend_inset_anchor === "top-right";
34508 state.isLegendLeft = config.legend_inset_anchor === "top-left" || config.legend_inset_anchor === "bottom-left";
34509 state.rotatedPadding.top = $$.getResettedPadding(state.rotatedPadding.top);
34510 state.rotatedPadding.right = isRotated && !config.axis_x_show ? 0 : 30;
34511 state.inputType = convertInputType(config.interaction_inputType_mouse, config.interaction_inputType_touch);
34512 };
34513 _proto.initWithData = function initWithData(data) {
34514 var _this3 = this,
34515 $$ = this,
34516 config = $$.config,
34517 scale = $$.scale,
34518 state = $$.state,
34519 $el = $$.$el,
34520 org = $$.org,
34521 hasAxis = state.hasAxis,
34522 hasInteraction = config.interaction_enabled,
34523 hasPolar = $$.hasType("polar");
34524 // for arc type, set axes to not be shown
34525 // $$.hasArcType() && ["x", "y", "y2"].forEach(id => (config[`axis_${id}_show`] = false));
34526
34527 if (hasAxis) {
34528 $$.axis = $$.getAxisInstance();
34529 config.zoom_enabled && $$.initZoom();
34530 }
34531
34532 // Init data as targets
34533 $$.data.xs = {};
34534 $$.data.targets = $$.convertDataToTargets(data);
34535 if (config.data_filter) {
34536 $$.data.targets = $$.data.targets.filter(config.data_filter.bind($$.api));
34537 }
34538
34539 // Set targets to hide if needed
34540 if (config.data_hide) {
34541 $$.addHiddenTargetIds(config.data_hide === !0 ? $$.mapToIds($$.data.targets) : config.data_hide);
34542 }
34543 if (config.legend_hide) {
34544 $$.addHiddenLegendIds(config.legend_hide === !0 ? $$.mapToIds($$.data.targets) : config.legend_hide);
34545 }
34546
34547 // Init sizes and scales
34548 $$.updateSizes();
34549 $$.updateScales(!0);
34550
34551 // retrieve scale after the 'updateScales()' is called
34552 var x = scale.x,
34553 y = scale.y,
34554 y2 = scale.y2,
34555 subX = scale.subX,
34556 subY = scale.subY,
34557 subY2 = scale.subY2;
34558
34559 // Set domains for each scale
34560 if (x) {
34561 x.domain(sortValue($$.getXDomain($$.data.targets)));
34562 subX.domain(x.domain());
34563
34564 // Save original x domain for zoom update
34565 org.xDomain = x.domain();
34566 }
34567 if (y) {
34568 y.domain($$.getYDomain($$.data.targets, "y"));
34569 subY.domain(y.domain());
34570 }
34571 if (y2) {
34572 y2.domain($$.getYDomain($$.data.targets, "y2"));
34573 subY2 && subY2.domain(y2.domain());
34574 }
34575
34576 // -- Basic Elements --
34577 $el.svg = $el.chart.append("svg").style("overflow", "hidden").style("display", "block");
34578 if (hasInteraction && state.inputType) {
34579 var isTouch = state.inputType === "touch",
34580 onclick = config.onclick,
34581 onover = config.onover,
34582 onout = config.onout;
34583 $el.svg.on("click", (onclick == null ? void 0 : onclick.bind($$.api)) || null).on(isTouch ? "touchstart" : "mouseenter", (onover == null ? void 0 : onover.bind($$.api)) || null).on(isTouch ? "touchend" : "mouseleave", (onout == null ? void 0 : onout.bind($$.api)) || null);
34584 }
34585 config.svg_classname && $el.svg.attr("class", config.svg_classname);
34586
34587 // Define defs
34588 var hasColorPatterns = isFunction(config.color_tiles) && $$.patterns;
34589 if (hasAxis || hasColorPatterns || config.data_labels_backgroundColors || hasPolar) {
34590 $el.defs = $el.svg.append("defs");
34591 if (hasAxis) {
34592 ["id", "idXAxis", "idYAxis", "idGrid"].forEach(function (v) {
34593 _newArrowCheck(this, _this3);
34594 $$.appendClip($el.defs, state.clip[v]);
34595 }.bind(this));
34596 }
34597
34598 // Append data background color filter definition
34599 $$.generateDataLabelBackgroundColorFilter();
34600
34601 // set color patterns
34602 if (hasColorPatterns) {
34603 $$.patterns.forEach(function (p) {
34604 var _this4 = this;
34605 _newArrowCheck(this, _this3);
34606 return $el.defs.append(function () {
34607 _newArrowCheck(this, _this4);
34608 return p.node;
34609 }.bind(this));
34610 }.bind(this));
34611 }
34612 }
34613 $$.updateSvgSize();
34614
34615 // Bind resize event
34616 $$.bindResize();
34617
34618 // Define regions
34619 var main = $el.svg.append("g").classed($COMMON.main, !0).attr("transform", $$.getTranslate("main"));
34620 $el.main = main;
34621
34622 // initialize subchart when subchart show option is set
34623 config.subchart_show && $$.initSubchart();
34624 config.tooltip_show && $$.initTooltip();
34625 config.title_text && $$.initTitle();
34626 config.legend_show && $$.initLegend();
34627
34628 // -- Main Region --
34629
34630 // text when empty
34631 if (config.data_empty_label_text) {
34632 main.append("text").attr("class", $TEXT.text + " " + $COMMON.empty).attr("text-anchor", "middle") // horizontal centering of text at x position in all browsers.
34633 .attr("dominant-baseline", "middle"); // vertical centering of text at y position in all browsers, except IE.
34634 }
34635
34636 if (hasAxis) {
34637 // Regions
34638 config.regions.length && $$.initRegion();
34639
34640 // Add Axis here, when clipPath is 'false'
34641 config.clipPath || $$.axis.init();
34642 }
34643
34644 // Define g for chart area
34645 main.append("g").classed($COMMON.chart, !0).attr("clip-path", hasAxis ? state.clip.path : null);
34646 $$.callPluginHook("$init");
34647 if (hasAxis) {
34648 var _$$$axis;
34649 // Cover whole with rects for events
34650 hasInteraction && ($$.initEventRect == null ? void 0 : $$.initEventRect());
34651
34652 // Grids
34653 $$.initGrid();
34654
34655 // Add Axis here, when clipPath is 'true'
34656 config.clipPath && ((_$$$axis = $$.axis) == null ? void 0 : _$$$axis.init());
34657 }
34658 $$.initChartElements();
34659
34660 // Set targets
34661 $$.updateTargets($$.data.targets);
34662
34663 // Draw with targets
34664 $$.updateDimension();
34665
34666 // oninit callback
34667 callFn(config.oninit, $$.api);
34668
34669 // Set background
34670 $$.setBackground();
34671 $$.redraw({
34672 withTransition: !1,
34673 withTransform: !0,
34674 withUpdateXDomain: !0,
34675 withUpdateOrgXDomain: !0,
34676 withTransitionForAxis: !1,
34677 initializing: !0
34678 });
34679
34680 // data.onmin/max callback
34681 if (config.data_onmin || config.data_onmax) {
34682 var minMax = $$.getMinMaxData();
34683 callFn(config.data_onmin, $$.api, minMax.min);
34684 callFn(config.data_onmax, $$.api, minMax.max);
34685 }
34686 config.tooltip_show && $$.initShowTooltip();
34687 state.rendered = !0;
34688 }
34689
34690 /**
34691 * Initialize chart elements
34692 * @private
34693 */;
34694 _proto.initChartElements = function initChartElements() {
34695 var _this5 = this,
34696 $$ = this,
34697 _$$$state = $$.state,
34698 hasAxis = _$$$state.hasAxis,
34699 hasRadar = _$$$state.hasRadar,
34700 types = [];
34701 if (hasAxis) {
34702 ["bar", "bubble", "candlestick", "line"].forEach(function (v) {
34703 _newArrowCheck(this, _this5);
34704 var name = capitalize(v);
34705 if (v === "line" && $$.hasTypeOf(name) || $$.hasType(v)) {
34706 types.push(name);
34707 }
34708 }.bind(this));
34709 } else {
34710 var hasPolar = $$.hasType("polar");
34711 if (!hasRadar) {
34712 types.push("Arc", "Pie");
34713 }
34714 if ($$.hasType("gauge")) {
34715 types.push("Gauge");
34716 } else if (hasRadar) {
34717 types.push("Radar");
34718 } else if (hasPolar) {
34719 types.push("Polar");
34720 }
34721 }
34722 types.forEach(function (v) {
34723 _newArrowCheck(this, _this5);
34724 $$["init" + v]();
34725 }.bind(this));
34726 notEmpty($$.config.data_labels) && !$$.hasArcType(null, ["radar"]) && $$.initText();
34727 }
34728
34729 /**
34730 * Set chart elements
34731 * @private
34732 */;
34733 _proto.setChartElements = function setChartElements() {
34734 var $$ = this,
34735 _$$$$el = $$.$el,
34736 chart = _$$$$el.chart,
34737 svg = _$$$$el.svg,
34738 defs = _$$$$el.defs,
34739 main = _$$$$el.main,
34740 tooltip = _$$$$el.tooltip,
34741 legend = _$$$$el.legend,
34742 title = _$$$$el.title,
34743 grid = _$$$$el.grid,
34744 arc = _$$$$el.arcs,
34745 circles = _$$$$el.circle,
34746 bars = _$$$$el.bar,
34747 candlestick = _$$$$el.candlestick,
34748 lines = _$$$$el.line,
34749 areas = _$$$$el.area,
34750 texts = _$$$$el.text;
34751 $$.api.$ = {
34752 chart: chart,
34753 svg: svg,
34754 defs: defs,
34755 main: main,
34756 tooltip: tooltip,
34757 legend: legend,
34758 title: title,
34759 grid: grid,
34760 arc: arc,
34761 circles: circles,
34762 bar: {
34763 bars: bars
34764 },
34765 candlestick: candlestick,
34766 line: {
34767 lines: lines,
34768 areas: areas
34769 },
34770 text: {
34771 texts: texts
34772 }
34773 };
34774 }
34775
34776 /**
34777 * Set background element/image
34778 * @private
34779 */;
34780 _proto.setBackground = function setBackground() {
34781 var $$ = this,
34782 bg = $$.config.background,
34783 state = $$.state,
34784 svg = $$.$el.svg;
34785 if (notEmpty(bg)) {
34786 var element = svg.select("g").insert(bg.imgUrl ? "image" : "rect", ":first-child");
34787 if (bg.imgUrl) {
34788 element.attr("href", bg.imgUrl);
34789 } else if (bg.color) {
34790 element.style("fill", bg.color).attr("clip-path", state.clip.path);
34791 }
34792 element.attr("class", bg.class || null).attr("width", "100%").attr("height", "100%");
34793 }
34794 }
34795
34796 /**
34797 * Update targeted element with given data
34798 * @param {object} targets Data object formatted as 'target'
34799 * @private
34800 */;
34801 _proto.updateTargets = function updateTargets(targets) {
34802 var _this6 = this,
34803 $$ = this,
34804 _$$$state2 = $$.state,
34805 hasAxis = _$$$state2.hasAxis,
34806 hasRadar = _$$$state2.hasRadar,
34807 helper = function (type) {
34808 _newArrowCheck(this, _this6);
34809 return $$["updateTargetsFor" + type](targets.filter($$["is" + type + "Type"].bind($$)));
34810 }.bind(this);
34811 // Text
34812 $$.updateTargetsForText(targets);
34813 if (hasAxis) {
34814 ["bar", "candlestick", "line"].forEach(function (v) {
34815 _newArrowCheck(this, _this6);
34816 var name = capitalize(v);
34817 if (v === "line" && $$.hasTypeOf(name) || $$.hasType(v)) {
34818 helper(name);
34819 }
34820 }.bind(this));
34821
34822 // Sub Chart
34823 $$.updateTargetsForSubchart && $$.updateTargetsForSubchart(targets);
34824
34825 // Arc, Polar, Radar
34826 } else if ($$.hasArcType(targets)) {
34827 var type = "Arc";
34828 if (hasRadar) {
34829 type = "Radar";
34830 } else if ($$.hasType("polar")) {
34831 type = "Polar";
34832 }
34833 helper(type);
34834 }
34835
34836 // Point types
34837 var hasPointType = $$.hasType("bubble") || $$.hasType("scatter");
34838 if (hasPointType) {
34839 $$.updateTargetForCircle == null ? void 0 : $$.updateTargetForCircle();
34840 }
34841
34842 // Fade-in each chart
34843 $$.filterTargetsToShowAtInit(hasPointType);
34844 }
34845
34846 /**
34847 * Display targeted elements at initialization
34848 * @param {boolean} hasPointType whether has point type(bubble, scatter) or not
34849 * @private
34850 */;
34851 _proto.filterTargetsToShowAtInit = function filterTargetsToShowAtInit(hasPointType) {
34852 var _this7 = this;
34853 if (hasPointType === void 0) {
34854 hasPointType = !1;
34855 }
34856 var $$ = this,
34857 svg = $$.$el.svg,
34858 $T = $$.$T,
34859 selector = "." + $COMMON.target;
34860 if (hasPointType) {
34861 selector += ", ." + $CIRCLE.chartCircles + " > ." + $CIRCLE.circles;
34862 }
34863 $T(svg.selectAll(selector).filter(function (d) {
34864 _newArrowCheck(this, _this7);
34865 return $$.isTargetToShow(d.id);
34866 }.bind(this))).style("opacity", null);
34867 };
34868 _proto.getWithOption = function getWithOption(options) {
34869 var _this8 = this,
34870 withOptions = {
34871 Dimension: !0,
34872 EventRect: !0,
34873 Legend: !1,
34874 Subchart: !0,
34875 Transform: !1,
34876 Transition: !0,
34877 TrimXDomain: !0,
34878 UpdateXAxis: "UpdateXDomain",
34879 UpdateXDomain: !1,
34880 UpdateOrgXDomain: !1,
34881 TransitionForExit: "Transition",
34882 TransitionForAxis: "Transition",
34883 Y: !0
34884 };
34885 Object.keys(withOptions).forEach(function (key) {
34886 _newArrowCheck(this, _this8);
34887 var defVal = withOptions[key];
34888 if (isString(defVal)) {
34889 defVal = withOptions[defVal];
34890 }
34891 withOptions[key] = getOption(options, "with" + key, defVal);
34892 }.bind(this));
34893 return withOptions;
34894 };
34895 _proto.initialOpacity = function initialOpacity(d) {
34896 var $$ = this,
34897 withoutFadeIn = $$.state.withoutFadeIn,
34898 r = $$.getBaseValue(d) !== null && withoutFadeIn[d.id] ? null : "0";
34899 return r;
34900 };
34901 _proto.bindResize = function bindResize() {
34902 var _this9 = this,
34903 $$ = this,
34904 config = $$.config,
34905 state = $$.state,
34906 resizeFunction = generateResize(config.resize_timer),
34907 list = [];
34908 list.push(function () {
34909 _newArrowCheck(this, _this9);
34910 return callFn(config.onresize, $$.api);
34911 }.bind(this));
34912 if (config.resize_auto) {
34913 list.push(function () {
34914 _newArrowCheck(this, _this9);
34915 state.resizing = !0;
34916
34917 // https://github.com/naver/billboard.js/issues/2650
34918 if (config.legend_show) {
34919 $$.updateSizes();
34920 $$.updateLegend();
34921 }
34922 $$.api.flush(!1);
34923 }.bind(this));
34924 }
34925 list.push(function () {
34926 _newArrowCheck(this, _this9);
34927 callFn(config.onresized, $$.api);
34928 state.resizing = !1;
34929 }.bind(this));
34930
34931 // add resize functions
34932 list.forEach(function (v) {
34933 _newArrowCheck(this, _this9);
34934 return resizeFunction.add(v);
34935 }.bind(this));
34936 $$.resizeFunction = resizeFunction;
34937
34938 // attach resize event
34939 win.addEventListener("resize", $$.resizeFunction = resizeFunction);
34940 }
34941
34942 /**
34943 * Call plugin hook
34944 * @param {string} phase The lifecycle phase
34945 * @param {Array} args Arguments
34946 * @private
34947 */;
34948 _proto.callPluginHook = function callPluginHook(phase) {
34949 for (var _this10 = this, _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
34950 args[_key - 1] = arguments[_key];
34951 }
34952 this.config.plugins.forEach(function (v) {
34953 _newArrowCheck(this, _this10);
34954 if (phase === "$beforeInit") {
34955 v.$$ = this;
34956 this.api.plugins.push(v);
34957 }
34958 v[phase].apply(v, args);
34959 }.bind(this));
34960 };
34961 return ChartInternal;
34962}();
34963
34964util_extend(ChartInternal.prototype, [
34965// common
34966convert, ChartInternal_data_data, load, category, internals_class, internals_color, domain, interactions_interaction, format, internals_legend, redraw, scale, shape, internals_size, internals_style, internals_text, internals_title, internals_tooltip, transform, internals_type]);
34967;// CONCATENATED MODULE: ./src/config/config.ts
34968
34969/**
34970 * Copyright (c) 2017 ~ present NAVER Corp.
34971 * billboard.js project is licensed under the MIT license
34972 */
34973
34974/**
34975 * Load configuration option
34976 * @param {object} config User's generation config value
34977 * @private
34978 */
34979function loadConfig(config) {
34980 var _this = this,
34981 thisConfig = this.config,
34982 target,
34983 keys,
34984 read,
34985 find = function () {
34986 _newArrowCheck(this, _this);
34987 var key = keys.shift();
34988 if (key && target && isObjectType(target) && key in target) {
34989 target = target[key];
34990 return find();
34991 } else if (!key) {
34992 return target;
34993 }
34994 return undefined;
34995 }.bind(this);
34996 Object.keys(thisConfig).forEach(function (key) {
34997 _newArrowCheck(this, _this);
34998 target = config;
34999 keys = key.split("_");
35000 read = find();
35001 if (isDefined(read)) {
35002 thisConfig[key] = read;
35003 }
35004 }.bind(this));
35005
35006 // only should run in the ChartInternal context
35007 if (this.api) {
35008 this.state.orgConfig = config;
35009 }
35010}
35011;// CONCATENATED MODULE: ./src/Chart/api/chart.ts
35012
35013/**
35014 * Copyright (c) 2017 ~ present NAVER Corp.
35015 * billboard.js project is licensed under the MIT license
35016 */
35017
35018
35019/* harmony default export */ var chart = ({
35020 /**
35021 * Resize the chart.
35022 * @function resize
35023 * @instance
35024 * @memberof Chart
35025 * @param {object} size This argument should include width and height in pixels.
35026 * @param {number} [size.width] width value
35027 * @param {number} [size.height] height value
35028 * @example
35029 * // Resize to 640x480
35030 * chart.resize({
35031 * width: 640,
35032 * height: 480
35033 * });
35034 */
35035 resize: function resize(size) {
35036 var $$ = this.internal,
35037 config = $$.config,
35038 state = $$.state;
35039 if (state.rendered) {
35040 config.size_width = size ? size.width : null;
35041 config.size_height = size ? size.height : null;
35042 state.resizing = !0;
35043 this.flush(!1);
35044 $$.resizeFunction();
35045 }
35046 },
35047 /**
35048 * Force to redraw.
35049 * - **NOTE:** When zoom/subchart is used, the zoomed state will be resetted.
35050 * @function flush
35051 * @instance
35052 * @memberof Chart
35053 * @param {boolean} [soft] For soft redraw.
35054 * @example
35055 * chart.flush();
35056 *
35057 * // for soft redraw
35058 * chart.flush(true);
35059 */
35060 flush: function flush(soft) {
35061 var $$ = this.internal,
35062 state = $$.state,
35063 zoomResetBtn = $$.$el.zoomResetBtn;
35064 if (state.rendered) {
35065 // reset possible zoom scale when is called from resize event
35066 // eslint-disable-next-line prefer-rest-params
35067 if (state.resizing) {
35068 var _$$$brush;
35069 // arguments[1] is given when is called from resize
35070 (_$$$brush = $$.brush) == null ? void 0 : _$$$brush.updateResize();
35071 } else {
35072 var _$$$axis;
35073 // re-update config info
35074 (_$$$axis = $$.axis) == null ? void 0 : _$$$axis.setOrient();
35075 }
35076
35077 // hide possible reset zoom button
35078 // https://github.com/naver/billboard.js/issues/2201
35079 zoomResetBtn == null ? void 0 : zoomResetBtn.style("display", "none");
35080 $$.scale.zoom = null;
35081 soft ? $$.redraw({
35082 withTransform: !0,
35083 withUpdateXDomain: !0,
35084 withUpdateOrgXDomain: !0,
35085 withLegend: !0
35086 }) : $$.updateAndRedraw({
35087 withLegend: !0,
35088 withTransition: !1,
35089 withTransitionForTransform: !1
35090 });
35091
35092 // reset subchart selection & selection state
35093 if (!state.resizing && $$.brush) {
35094 $$.brush.getSelection().call($$.brush.move);
35095 $$.unselectRect();
35096 }
35097 } else {
35098 $$.initToRender(!0);
35099 }
35100 },
35101 /**
35102 * Reset the chart object and remove element and events completely.
35103 * @function destroy
35104 * @instance
35105 * @memberof Chart
35106 * @returns {null}
35107 * @example
35108 * chart.destroy();
35109 */
35110 destroy: function destroy() {
35111 var _this = this,
35112 $$ = this.internal,
35113 _$$$$el = $$.$el,
35114 chart = _$$$$el.chart,
35115 style = _$$$$el.style,
35116 svg = _$$$$el.svg;
35117 if (notEmpty($$)) {
35118 $$.callPluginHook("$willDestroy");
35119 $$.charts.splice($$.charts.indexOf(this), 1);
35120
35121 // detach events
35122 $$.unbindAllEvents();
35123
35124 // clear timers && pending transition
35125 svg.select("*").interrupt();
35126 $$.resizeFunction.clear();
35127 win.removeEventListener("resize", $$.resizeFunction);
35128 chart.classed("bb", !1).style("position", null).selectChildren().remove();
35129
35130 // remove <style> element added by boost.useCssRule option
35131 style && style.parentNode.removeChild(style);
35132
35133 // releasing own references
35134 Object.keys(this).forEach(function (key) {
35135 var _this2 = this;
35136 _newArrowCheck(this, _this);
35137 key === "internal" && Object.keys($$).forEach(function (k) {
35138 _newArrowCheck(this, _this2);
35139 $$[k] = null;
35140 }.bind(this));
35141 this[key] = null;
35142 delete this[key];
35143 }.bind(this));
35144
35145 // release prototype chains
35146 for (var key in this) {
35147 this[key] = function () {
35148 _newArrowCheck(this, _this);
35149 }.bind(this);
35150 }
35151 }
35152 return null;
35153 },
35154 /**
35155 * Get or set config option value.
35156 * - **NOTE:** for without parameter occasion
35157 * - will return all specified generation options object only. (will exclude any other options not specified at the initialization)
35158 * @function config
35159 * @instance
35160 * @memberof Chart
35161 * @param {string} name The option key name.
35162 * @param {*} [value] The value accepted for indicated option.
35163 * @param {boolean} [redraw] Set to redraw with the new option changes.
35164 * - **NOTE:** Doesn't guarantee work in all circumstances. It can be applied for limited options only.
35165 * @returns {*}
35166 * @example
35167 *
35168 * // Getter
35169 * chart.config("gauge.max");
35170 *
35171 * // without any arguments, it returns generation config object
35172 * chart.config(); // {data: { ... }, axis: { ... }, ...}
35173 *
35174 * // Setter
35175 * chart.config("gauge.max", 100);
35176 *
35177 * // Setter & redraw with the new option
35178 * chart.config("gauge.max", 100, true);
35179 */
35180 config: function (name, value, redraw) {
35181 var $$ = this.internal,
35182 config = $$.config,
35183 state = $$.state,
35184 key = name == null ? void 0 : name.replace(/\./g, "_"),
35185 res;
35186 if (name && key in config) {
35187 if (isDefined(value)) {
35188 config[key] = value;
35189 res = value;
35190 redraw && this.flush();
35191 } else {
35192 res = config[key];
35193 }
35194 } else {
35195 res = state.orgConfig;
35196 }
35197 return res;
35198 }
35199});
35200;// CONCATENATED MODULE: ./src/Chart/api/color.ts
35201/**
35202 * Copyright (c) 2017 ~ present NAVER Corp.
35203 * billboard.js project is licensed under the MIT license
35204 */
35205/* harmony default export */ var api_color = ({
35206 /**
35207 * Get the color
35208 * @function color
35209 * @instance
35210 * @memberof Chart
35211 * @param {string} id id to get the color
35212 * @returns {string}
35213 * @example
35214 * chart.color("data1");
35215 */
35216 color: function color(id) {
35217 return this.internal.color(id); // more patterns
35218 }
35219});
35220;// CONCATENATED MODULE: ./src/Chart/api/data.ts
35221
35222/**
35223 * Copyright (c) 2017 ~ present NAVER Corp.
35224 * billboard.js project is licensed under the MIT license
35225 */
35226
35227
35228/**
35229 * Get data loaded in the chart.
35230 * @function data
35231 * @instance
35232 * @memberof Chart
35233 * @param {string|Array} targetIds If this argument is given, this API returns the specified target data. If this argument is not given, all of data will be returned.
35234 * @returns {Array} Data objects
35235 * @example
35236 * // Get only data1 data
35237 * chart.data("data1");
35238 * // --> [{id: "data1", id_org: "data1", values: Array(6)}, ...]
35239 *
35240 * // Get data1 and data2 data
35241 * chart.data(["data1", "data2"]);
35242 *
35243 * // Get all data
35244 * chart.data();
35245 */
35246function api_data_data(targetIds) {
35247 var _this = this,
35248 targets = this.internal.data.targets;
35249 if (!isUndefined(targetIds)) {
35250 var ids = isArray(targetIds) ? targetIds : [targetIds];
35251 return targets.filter(function (t) {
35252 var _this2 = this;
35253 _newArrowCheck(this, _this);
35254 return ids.some(function (v) {
35255 _newArrowCheck(this, _this2);
35256 return v === t.id;
35257 }.bind(this));
35258 }.bind(this));
35259 }
35260 return targets;
35261}
35262util_extend(api_data_data, {
35263 /**
35264 * Get data shown in the chart.
35265 * @function data․shown
35266 * @instance
35267 * @memberof Chart
35268 * @param {string|Array} targetIds If this argument is given, this API filters the data with specified target ids. If this argument is not given, all shown data will be returned.
35269 * @returns {Array} Data objects
35270 * @example
35271 * // Get shown data by filtering to include only data1 data
35272 * chart.data.shown("data1");
35273 * // --> [{id: "data1", id_org: "data1", values: Array(6)}, ...]
35274 *
35275 * // Get shown data by filtering to include data1 and data2 data
35276 * chart.data.shown(["data1", "data2"]);
35277 *
35278 * // Get all shown data
35279 * chart.data.shown();
35280 */
35281 shown: function shown(targetIds) {
35282 return this.internal.filterTargetsToShow(this.data(targetIds));
35283 },
35284 /**
35285 * Get values of the data loaded in the chart.
35286 * @function data․values
35287 * @instance
35288 * @memberof Chart
35289 * @param {string|Array|null} targetIds This API returns the values of specified target. If this argument is not given, null will be retruned
35290 * @param {boolean} [flat=true] Get flatten values
35291 * @returns {Array} Data values
35292 * @example
35293 * // Get data1 values
35294 * chart.data.values("data1");
35295 * // --> [10, 20, 30, 40]
35296 */
35297 values: function (targetIds, flat) {
35298 var _this3 = this;
35299 if (flat === void 0) {
35300 flat = !0;
35301 }
35302 var values = null;
35303 if (targetIds) {
35304 var targets = this.data(targetIds);
35305 if (isArray(targets)) {
35306 values = [];
35307 targets.forEach(function (v) {
35308 var _this4 = this;
35309 _newArrowCheck(this, _this3);
35310 var dataValue = v.values.map(function (d) {
35311 _newArrowCheck(this, _this4);
35312 return d.value;
35313 }.bind(this));
35314 flat ? values = values.concat(dataValue) : values.push(dataValue);
35315 }.bind(this));
35316 }
35317 }
35318 return values;
35319 },
35320 /**
35321 * Get and set names of the data loaded in the chart.
35322 * @function data․names
35323 * @instance
35324 * @memberof Chart
35325 * @param {object} names If this argument is given, the names of data will be updated. If not given, the current names will be returned. The format of this argument is the same as [data.names](./Options.html#.data%25E2%2580%25A4names).
35326 * @returns {object} Corresponding names according its key value, if specified names values.
35327 * @example
35328 * // Get current names
35329 * chart.data.names();
35330 * // --> {data1: "test1", data2: "test2"}
35331 *
35332 * // Update names
35333 * chart.data.names({
35334 * data1: "New Name 1",
35335 * data2: "New Name 2"
35336 *});
35337 */
35338 names: function names(_names) {
35339 var $$ = this.internal;
35340 return $$.updateDataAttributes("names", _names);
35341 },
35342 /**
35343 * Get and set colors of the data loaded in the chart.
35344 * @function data․colors
35345 * @instance
35346 * @memberof Chart
35347 * @param {object} colors If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as [data.colors](./Options.html#.data%25E2%2580%25A4colors).
35348 * @returns {object} Corresponding data color value according its key value.
35349 * @example
35350 * // Get current colors
35351 * chart.data.colors();
35352 * // --> {data1: "#00c73c", data2: "#fa7171"}
35353 *
35354 * // Update colors
35355 * chart.data.colors({
35356 * data1: "#FFFFFF",
35357 * data2: "#000000"
35358 * });
35359 */
35360 colors: function colors(_colors) {
35361 return this.internal.updateDataAttributes("colors", _colors);
35362 },
35363 /**
35364 * Get and set axes of the data loaded in the chart.
35365 * - **NOTE:** If all data is related to one of the axes, the domain of axis without related data will be replaced by the domain from the axis with related data
35366 * @function data․axes
35367 * @instance
35368 * @memberof Chart
35369 * @param {object} axes If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as
35370 * @returns {object} Corresponding axes value for data, if specified axes value.
35371 * @example
35372 * // Get current axes
35373 * chart.data.axes();
35374 * // --> {data1: "y"}
35375 *
35376 * // Update axes
35377 * chart.data.axes({
35378 * data1: "y",
35379 * data2: "y2"
35380 * });
35381 */
35382 axes: function axes(_axes) {
35383 return this.internal.updateDataAttributes("axes", _axes);
35384 },
35385 /**
35386 * Get the minimum data value bound to the chart
35387 * @function data․min
35388 * @instance
35389 * @memberof Chart
35390 * @returns {Array} Data objects
35391 * @example
35392 * // Get current axes
35393 * chart.data.min();
35394 * // --> [{x: 0, value: 30, id: "data1", index: 0}, ...]
35395 */
35396 min: function min() {
35397 return this.internal.getMinMaxData().min;
35398 },
35399 /**
35400 * Get the maximum data value bound to the chart
35401 * @function data․max
35402 * @instance
35403 * @memberof Chart
35404 * @returns {Array} Data objects
35405 * @example
35406 * // Get current axes
35407 * chart.data.max();
35408 * // --> [{x: 3, value: 400, id: "data1", index: 3}, ...]
35409 */
35410 max: function max() {
35411 return this.internal.getMinMaxData().max;
35412 }
35413});
35414/* harmony default export */ var api_data = ({
35415 data: api_data_data
35416});
35417;// CONCATENATED MODULE: ./src/Chart/api/export.ts
35418
35419var export_this = undefined;
35420/**
35421 * Copyright (c) 2017 ~ present NAVER Corp.
35422 * billboard.js project is licensed under the MIT license
35423 */
35424
35425
35426
35427/**
35428 * Encode to base64
35429 * @param {string} str string to be encoded
35430 * @returns {string}
35431 * @private
35432 * @see https://developer.mozilla.org/ko/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
35433 */
35434var b64EncodeUnicode = function (str) {
35435 var _this2 = this;
35436 _newArrowCheck(this, export_this);
35437 return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p) {
35438 _newArrowCheck(this, _this2);
35439 return String.fromCharCode(+("0x" + p));
35440 }.bind(this)));
35441}.bind(undefined);
35442
35443/**
35444 * Convert svg node to data url
35445 * @param {HTMLElement} node target node
35446 * @param {object} option object containing {width, height, preserveAspectRatio}
35447 * @param {object} orgSize object containing {width, height}
35448 * @returns {string}
35449 * @private
35450 */
35451function nodeToSvgDataUrl(node, option, orgSize) {
35452 var _this3 = this,
35453 _ref = option || orgSize,
35454 width = _ref.width,
35455 height = _ref.height,
35456 serializer = new XMLSerializer(),
35457 clone = node.cloneNode(!0),
35458 cssText = getCssRules(toArray(browser_doc.styleSheets)).filter(function (r) {
35459 _newArrowCheck(this, _this3);
35460 return r.cssText;
35461 }.bind(this)).map(function (r) {
35462 _newArrowCheck(this, _this3);
35463 return r.cssText;
35464 }.bind(this));
35465 clone.setAttribute("xmlns", namespaces.xhtml);
35466 var nodeXml = serializer.serializeToString(clone),
35467 style = browser_doc.createElement("style"); // escape css for XML
35468 style.appendChild(browser_doc.createTextNode(cssText.join("\n")));
35469 var styleXml = serializer.serializeToString(style),
35470 dataStr = ("<svg xmlns=\"" + namespaces.svg + "\" width=\"" + width + "\" height=\"" + height + "\" \n\t\tviewBox=\"0 0 " + orgSize.width + " " + orgSize.height + "\" \n\t\tpreserveAspectRatio=\"" + ((option == null ? void 0 : option.preserveAspectRatio) === !1 ? "none" : "xMinYMid meet") + "\">\n\t\t\t<foreignObject width=\"100%\" height=\"100%\">\n\t\t\t\t" + styleXml + "\n\t\t\t\t" + nodeXml.replace(/(url\()[^#]+/g, "$1") + "\n\t\t\t</foreignObject></svg>").replace("/\n/g", "%0A"); // foreignObject not supported in IE11 and below
35471 // https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx
35472 return "data:image/svg+xml;base64," + b64EncodeUnicode(dataStr);
35473}
35474/* harmony default export */ var api_export = ({
35475 /**
35476 * Export chart as an image.
35477 * - **NOTE:**
35478 * - IE11 and below not work properly due to the lack of the feature(<a href="https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx">foreignObject</a>) support
35479 * - The basic CSS file(ex. billboard.css) should be at same domain as API call context to get correct styled export image.
35480 * @function export
35481 * @instance
35482 * @memberof Chart
35483 * @param {object} option Export option
35484 * @param {string} [option.mimeType="image/png"] The desired output image format. (ex. 'image/png' for png, 'image/jpeg' for jpeg format)
35485 * @param {number} [option.width={currentWidth}] width
35486 * @param {number} [option.height={currentHeigth}] height
35487 * @param {boolean} [option.preserveAspectRatio=true] Preserve aspect ratio on given size
35488 * @param {Function} [callback] The callback to be invoked when export is ready.
35489 * @returns {string} dataURI
35490 * @example
35491 * chart.export();
35492 * // --> "data:image/svg+xml;base64,PHN..."
35493 *
35494 * // Initialize the download automatically
35495 * chart.export({mimeType: "image/png"}, dataUrl => {
35496 * const link = document.createElement("a");
35497 *
35498 * link.download = `${Date.now()}.png`;
35499 * link.href = dataUrl;
35500 * link.innerHTML = "Download chart as image";
35501 *
35502 * document.body.appendChild(link);
35503 * });
35504 *
35505 * // Resize the exported image
35506 * chart.export(
35507 * {
35508 * width: 800,
35509 * height: 600,
35510 * preserveAspectRatio: false,
35511 * mimeType: "image/png"
35512 * },
35513 * dataUrl => { ... }
35514 * );
35515 */
35516 export: function _export(option, callback) {
35517 var _this4 = this,
35518 $$ = this.internal,
35519 state = $$.state,
35520 chart = $$.$el.chart,
35521 _state$current = state.current,
35522 width = _state$current.width,
35523 height = _state$current.height,
35524 opt = mergeObj({
35525 width: width,
35526 height: height,
35527 preserveAspectRatio: !0,
35528 mimeType: "image/png"
35529 }, option),
35530 svgDataUrl = nodeToSvgDataUrl(chart.node(), opt, {
35531 width: width,
35532 height: height
35533 });
35534 if (callback && isFunction(callback)) {
35535 var img = new Image();
35536 img.crossOrigin = "Anonymous";
35537 img.onload = function () {
35538 _newArrowCheck(this, _this4);
35539 var canvas = browser_doc.createElement("canvas"),
35540 ctx = canvas.getContext("2d");
35541 canvas.width = opt.width || width;
35542 canvas.height = opt.height || height;
35543 ctx.drawImage(img, 0, 0);
35544 callback.bind(this)(canvas.toDataURL(opt.mimeType));
35545 }.bind(this);
35546 img.src = svgDataUrl;
35547 }
35548 return svgDataUrl;
35549 }
35550});
35551;// CONCATENATED MODULE: ./src/Chart/api/focus.ts
35552
35553/**
35554 * Copyright (c) 2017 ~ present NAVER Corp.
35555 * billboard.js project is licensed under the MIT license
35556 */
35557
35558
35559/* harmony default export */ var api_focus = ({
35560 /**
35561 * This API highlights specified targets and fade out the others.<br><br>
35562 * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be highlighted.
35563 * @function focus
35564 * @instance
35565 * @memberof Chart
35566 * @param {string|Array} targetIdsValue Target ids to be highlighted.
35567 * @example
35568 * // data1 will be highlighted and the others will be faded out
35569 * chart.focus("data1");
35570 *
35571 * // data1 and data2 will be highlighted and the others will be faded out
35572 * chart.focus(["data1", "data2"]);
35573 *
35574 * // all targets will be highlighted
35575 * chart.focus();
35576 */
35577 focus: function focus(targetIdsValue) {
35578 var _this = this,
35579 $$ = this.internal,
35580 state = $$.state,
35581 targetIds = $$.mapToTargetIds(targetIdsValue),
35582 candidates = $$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
35583 this.revert();
35584 this.defocus();
35585 candidates.classed($FOCUS.focused, !0).classed($FOCUS.defocused, !1);
35586 if ($$.hasArcType() && !state.hasRadar) {
35587 $$.expandArc(targetIds);
35588 $$.hasType("gauge") && $$.markOverlapped(targetIdsValue, $$, "." + $GAUGE.gaugeValue);
35589 }
35590 $$.toggleFocusLegend(targetIds, !0);
35591 state.focusedTargetIds = targetIds;
35592 state.defocusedTargetIds = state.defocusedTargetIds.filter(function (id) {
35593 _newArrowCheck(this, _this);
35594 return targetIds.indexOf(id) < 0;
35595 }.bind(this));
35596 },
35597 /**
35598 * This API fades out specified targets and reverts the others.<br><br>
35599 * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be faded out.
35600 * @function defocus
35601 * @instance
35602 * @memberof Chart
35603 * @param {string|Array} targetIdsValue Target ids to be faded out.
35604 * @example
35605 * // data1 will be faded out and the others will be reverted.
35606 * chart.defocus("data1");
35607 *
35608 * // data1 and data2 will be faded out and the others will be reverted.
35609 * chart.defocus(["data1", "data2"]);
35610 *
35611 * // all targets will be faded out.
35612 * chart.defocus();
35613 */
35614 defocus: function defocus(targetIdsValue) {
35615 var _this2 = this,
35616 $$ = this.internal,
35617 state = $$.state,
35618 targetIds = $$.mapToTargetIds(targetIdsValue),
35619 candidates = $$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
35620 candidates.classed($FOCUS.focused, !1).classed($FOCUS.defocused, !0);
35621 if ($$.hasArcType(null, ["polar"])) {
35622 $$.unexpandArc(targetIds);
35623 $$.hasType("gauge") && $$.undoMarkOverlapped($$, "." + $GAUGE.gaugeValue);
35624 }
35625 $$.toggleFocusLegend(targetIds, !1);
35626 state.focusedTargetIds = state.focusedTargetIds.filter(function (id) {
35627 _newArrowCheck(this, _this2);
35628 return targetIds.indexOf(id) < 0;
35629 }.bind(this));
35630 state.defocusedTargetIds = targetIds;
35631 },
35632 /**
35633 * This API reverts specified targets.<br><br>
35634 * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be reverted.
35635 * @function revert
35636 * @instance
35637 * @memberof Chart
35638 * @param {string|Array} targetIdsValue Target ids to be reverted
35639 * @example
35640 * // data1 will be reverted.
35641 * chart.revert("data1");
35642 *
35643 * // data1 and data2 will be reverted.
35644 * chart.revert(["data1", "data2"]);
35645 *
35646 * // all targets will be reverted.
35647 * chart.revert();
35648 */
35649 revert: function revert(targetIdsValue) {
35650 var $$ = this.internal,
35651 config = $$.config,
35652 state = $$.state,
35653 $el = $$.$el,
35654 targetIds = $$.mapToTargetIds(targetIdsValue),
35655 candidates = $el.svg.selectAll($$.selectorTargets(targetIds));
35656 // should be for all targets
35657
35658 candidates.classed($FOCUS.focused, !1).classed($FOCUS.defocused, !1);
35659 $$.hasArcType(null, ["polar"]) && $$.unexpandArc(targetIds);
35660 if (config.legend_show) {
35661 $$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));
35662 $el.legend.selectAll($$.selectorLegends(targetIds)).filter(function () {
35663 return src_select(this).classed($FOCUS.legendItemFocused);
35664 }).classed($FOCUS.legendItemFocused, !1);
35665 }
35666 state.focusedTargetIds = [];
35667 state.defocusedTargetIds = [];
35668 }
35669});
35670;// CONCATENATED MODULE: ./src/Chart/api/legend.ts
35671/**
35672 * Copyright (c) 2017 ~ present NAVER Corp.
35673 * billboard.js project is licensed under the MIT license
35674 */
35675/**
35676 * Define legend
35677 * @ignore
35678 */
35679var legend_legend = {
35680 /**
35681 * Show legend for each target.
35682 * @function legend․show
35683 * @instance
35684 * @memberof Chart
35685 * @param {string|Array} targetIds
35686 * - If targetIds is given, specified target's legend will be shown.
35687 * - If only one target is the candidate, String can be passed.
35688 * - If no argument is given, all of target's legend will be shown.
35689 * @example
35690 * // Show legend for data1.
35691 * chart.legend.show("data1");
35692 *
35693 * // Show legend for data1 and data2.
35694 * chart.legend.show(["data1", "data2"]);
35695 *
35696 * // Show all legend.
35697 * chart.legend.show();
35698 */
35699 show: function show(targetIds) {
35700 var $$ = this.internal;
35701 $$.showLegend($$.mapToTargetIds(targetIds));
35702 $$.updateAndRedraw({
35703 withLegend: !0
35704 });
35705 },
35706 /**
35707 * Hide legend for each target.
35708 * @function legend․hide
35709 * @instance
35710 * @memberof Chart
35711 * @param {string|Array} targetIds
35712 * - If targetIds is given, specified target's legend will be hidden.
35713 * - If only one target is the candidate, String can be passed.
35714 * - If no argument is given, all of target's legend will be hidden.
35715 * @example
35716 * // Hide legend for data1.
35717 * chart.legend.hide("data1");
35718 *
35719 * // Hide legend for data1 and data2.
35720 * chart.legend.hide(["data1", "data2"]);
35721 *
35722 * // Hide all legend.
35723 * chart.legend.hide();
35724 */
35725 hide: function hide(targetIds) {
35726 var $$ = this.internal;
35727 $$.hideLegend($$.mapToTargetIds(targetIds));
35728 $$.updateAndRedraw({
35729 withLegend: !0
35730 });
35731 }
35732};
35733/* harmony default export */ var api_legend = ({
35734 legend: legend_legend
35735});
35736;// CONCATENATED MODULE: ./src/Chart/api/load.ts
35737
35738/**
35739 * Copyright (c) 2017 ~ present NAVER Corp.
35740 * billboard.js project is licensed under the MIT license
35741 */
35742
35743
35744/* harmony default export */ var api_load = ({
35745 /**
35746 * Load data to the chart.<br><br>
35747 * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.
35748 * - <b>Note:</b>
35749 * - unload should be used if some data needs to be unloaded simultaneously.
35750 * If you call unload API soon after/before load instead of unload param, chart will not be rendered properly because of cancel of animation.<br>
35751 * - done will be called after data loaded, but it's not after rendering.
35752 * It's because rendering will finish after some transition and there is some time lag between loading and rendering
35753 * @function load
35754 * @instance
35755 * @memberof Chart
35756 * @param {object} args The object can consist with following members:<br>
35757 *
35758 * | Key | Description |
35759 * | --- | --- |
35760 * | - url<br>- json<br>- rows<br>- columns | The data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added |
35761 * | data | Data objects to be loaded. Checkout the example. |
35762 * | append | Load data appending it to the current dataseries.<br>If the existing chart has`x` value, should provide with corresponding `x` value for newly loaded data. |
35763 * | names | Same as data.names() |
35764 * | xs | Same as data.xs option |
35765 * | classes | The classes specified by data.classes will be updated. classes must be Object that has target id as keys. |
35766 * | categories | The categories specified by axis.x.categories or data.x will be updated. categories must be Array. |
35767 * | axes | The axes specified by data.axes will be updated. axes must be Object that has target id as keys. |
35768 * | colors | The colors specified by data.colors will be updated. colors must be Object that has target id as keys. |
35769 * | headers | Set request header if loading via `data.url`.<br>@see [data․headers](Options.html#.data%25E2%2580%25A4headers) |
35770 * | keys | Choose which JSON objects keys correspond to desired data.<br>**NOTE:** Only for JSON object given as array.<br>@see [data․keys](Options.html#.data%25E2%2580%25A4keys) |
35771 * | mimeType | Set 'json' if loading JSON via url.<br>@see [data․mimeType](Options.html#.data%25E2%2580%25A4mimeType) |
35772 * | - type<br>- types | The type of targets will be updated. type must be String and types must be Object. |
35773 * | unload | Specify the data will be unloaded before loading new data. If true given, all of data will be unloaded. If target ids given as String or Array, specified targets will be unloaded. If absent or false given, unload will not occur. |
35774 * | done | The specified function will be called after data loaded.|
35775 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataFromURL)
35776 * @example
35777 * // Load data1 and unload data2 and data3
35778 * chart.load({
35779 * columns: [
35780 * ["data1", 100, 200, 150, ...],
35781 * ...
35782 * ],
35783 * unload: ["data2", "data3"],
35784 * url: "...",
35785 * done: function() { ... }
35786 * });
35787 * @example
35788 * const chart = bb.generate({
35789 * data: {
35790 * columns: [
35791 * ["data1", 20, 30, 40]
35792 * ]
35793 * }
35794 * });
35795 *
35796 * chart.load({
35797 * columns: [
35798 * // with 'append' option, the 'data1' will have `[20,30,40,50,60]`.
35799 * ["data1", 50, 60]
35800 * ],
35801 * append: true
35802 * });
35803 * @example
35804 * const chart = bb.generate({
35805 * data: {
35806 * x: "x",
35807 * xFormat: "%Y-%m-%dT%H:%M:%S",
35808 * columns: [
35809 * ["x", "2021-01-03T03:00:00", "2021-01-04T12:00:00", "2021-01-05T21:00:00"],
35810 * ["data1", 36, 30, 24]
35811 * ]
35812 * },
35813 * axis: {
35814 * x: {
35815 * type: "timeseries"
35816 * }
35817 * }
35818 * };
35819 *
35820 * chart.load({
35821 * columns: [
35822 * // when existing chart has `x` value, should provide correponding 'x' value.
35823 * // with 'append' option, the 'data1' will have `[36,30,24,37]`.
35824 * ["x", "2021-02-01T08:00:00"],
35825 * ["data1", 37]
35826 * ],
35827 * append: true
35828 * });
35829 * @example
35830 * // myAPI.json
35831 * // {
35832 * // "data1": [220, 240, 270, 250, 280],
35833 * // "data2": [180, 150, 300, 70, 120]
35834 * // }
35835 *
35836 * chart.load({
35837 * url: './data/myAPI.json',
35838 * mimeType: "json",
35839 *
35840 * // set request header if is needed
35841 * headers: {
35842 * "Content-Type": "text/json"
35843 * }
35844 * });
35845 * @example
35846 * chart.load({
35847 * data: [
35848 * // equivalent as: columns: [["data1", 30, 200, 100]]
35849 * {"data1": 30}, {"data1": 200}, {"data1": 100}
35850 *
35851 * // or
35852 * // equivalent as: columns: [["data1", 10, 20], ["data2", 13, 30]]
35853 * // {"data1": 10, "data2": 13}, {"data1": 20, "data2": 30}}
35854 * ]
35855 * });
35856 * @example
35857 * chart.load({
35858 * json: [
35859 * {name: "www.site1.com", upload: 800, download: 500, total: 400},
35860 * ],
35861 * keys: {
35862 * x: "name",
35863 * value: ["upload", "download"]
35864 * }
35865 * });
35866 * @example
35867 * chart.load({
35868 * json: {
35869 * data1:[30, 20, 50, 40, 60, 50],
35870 * data2:[200, 130, 90, 240, 130, 220],
35871 * }
35872 * });
35873 */
35874 load: function load(args) {
35875 var _this = this,
35876 $$ = this.internal,
35877 config = $$.config;
35878 // update xs if specified
35879 args.xs && $$.addXs(args.xs);
35880
35881 // update names if exists
35882 "names" in args && this.data.names(args.names);
35883
35884 // update classes if exists
35885 "classes" in args && Object.keys(args.classes).forEach(function (id) {
35886 _newArrowCheck(this, _this);
35887 config.data_classes[id] = args.classes[id];
35888 }.bind(this));
35889
35890 // update categories if exists
35891 if ("categories" in args && $$.axis.isCategorized()) {
35892 config.axis_x_categories = args.categories;
35893 }
35894
35895 // update axes if exists
35896 "axes" in args && Object.keys(args.axes).forEach(function (id) {
35897 _newArrowCheck(this, _this);
35898 config.data_axes[id] = args.axes[id];
35899 }.bind(this));
35900
35901 // update colors if exists
35902 "colors" in args && Object.keys(args.colors).forEach(function (id) {
35903 _newArrowCheck(this, _this);
35904 config.data_colors[id] = args.colors[id];
35905 }.bind(this));
35906
35907 // unload if needed
35908 if ("unload" in args && args.unload !== !1) {
35909 // TODO: do not unload if target will load (included in url/rows/columns)
35910 $$.unload($$.mapToTargetIds(args.unload === !0 ? null : args.unload), function () {
35911 var _this2 = this;
35912 _newArrowCheck(this, _this);
35913 // to mitigate improper rendering for multiple consecutive calls
35914 // https://github.com/naver/billboard.js/issues/2121
35915 win.requestIdleCallback(function () {
35916 _newArrowCheck(this, _this2);
35917 return $$.loadFromArgs(args);
35918 }.bind(this));
35919 }.bind(this));
35920 } else {
35921 $$.loadFromArgs(args);
35922 }
35923 },
35924 /**
35925 * Unload data to the chart.<br><br>
35926 * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.
35927 * - <b>Note:</b>
35928 * If you call load API soon after/before unload, unload param of load should be used. Otherwise chart will not be rendered properly because of cancel of animation.<br>
35929 * `done` will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering.
35930 * @function unload
35931 * @instance
35932 * @memberof Chart
35933 * @param {object} argsValue
35934 * | key | Type | Description |
35935 * | --- | --- | --- |
35936 * | ids | String &vert; Array | Target id data to be unloaded. If not given, all data will be unloaded. |
35937 * | done | Fuction | Callback after data is unloaded. |
35938 * @example
35939 * // Unload data2 and data3
35940 * chart.unload({
35941 * ids: ["data2", "data3"],
35942 * done: function() {
35943 * // called after the unloaded
35944 * }
35945 * });
35946 */
35947 unload: function unload(argsValue) {
35948 var _this3 = this,
35949 $$ = this.internal,
35950 args = argsValue || {};
35951 if (isArray(args)) {
35952 args = {
35953 ids: args
35954 };
35955 } else if (isString(args)) {
35956 args = {
35957 ids: [args]
35958 };
35959 }
35960 var ids = $$.mapToTargetIds(args.ids);
35961 $$.unload(ids, function () {
35962 _newArrowCheck(this, _this3);
35963 $$.redraw({
35964 withUpdateOrgXDomain: !0,
35965 withUpdateXDomain: !0,
35966 withLegend: !0
35967 });
35968 $$.cache.remove(ids);
35969 args.done && args.done.call(this);
35970 }.bind(this));
35971 }
35972});
35973;// CONCATENATED MODULE: ./src/Chart/api/show.ts
35974
35975/**
35976 * Copyright (c) 2017 ~ present NAVER Corp.
35977 * billboard.js project is licensed under the MIT license
35978 */
35979
35980
35981/**
35982 * Show/Hide data series
35983 * @param {boolean} show Show or hide
35984 * @param {Array} targetIdsValue Target id values
35985 * @param {object} options Options
35986 * @private
35987 */
35988function showHide(show, targetIdsValue, options) {
35989 var _this = this,
35990 $$ = this.internal,
35991 targetIds = $$.mapToTargetIds(targetIdsValue),
35992 hiddenIds = $$.state.hiddenTargetIds.map(function (v) {
35993 _newArrowCheck(this, _this);
35994 return targetIds.indexOf(v) > -1 && v;
35995 }.bind(this)).filter(Boolean);
35996 $$.state.toggling = !0;
35997 $$[(show ? "remove" : "add") + "HiddenTargetIds"](targetIds);
35998 var targets = $$.$el.svg.selectAll($$.selectorTargets(targetIds)),
35999 opacity = show ? null : "0";
36000 if (show && hiddenIds.length) {
36001 targets.style("display", null);
36002 callFn($$.config.data_onshown, this, hiddenIds);
36003 }
36004 $$.$T(targets).style("opacity", opacity, "important").call(endall, function () {
36005 _newArrowCheck(this, _this);
36006 // https://github.com/naver/billboard.js/issues/1758
36007 if (!show && hiddenIds.length === 0) {
36008 targets.style("display", "none");
36009 callFn($$.config.data_onhidden, this, targetIds);
36010 }
36011 targets.style("opacity", opacity);
36012 }.bind(this));
36013 options.withLegend && $$[(show ? "show" : "hide") + "Legend"](targetIds);
36014 $$.redraw({
36015 withUpdateOrgXDomain: !0,
36016 withUpdateXDomain: !0,
36017 withLegend: !0
36018 });
36019 $$.state.toggling = !1;
36020}
36021/* harmony default export */ var show = ({
36022 /**
36023 * Show data series on chart
36024 * @function show
36025 * @instance
36026 * @memberof Chart
36027 * @param {string|Array} [targetIdsValue] The target id value.
36028 * @param {object} [options] The object can consist with following members:<br>
36029 *
36030 * | Key | Type | default | Description |
36031 * | --- | --- | --- | --- |
36032 * | withLegend | boolean | false | whether or not display legend |
36033 *
36034 * @example
36035 * // show 'data1'
36036 * chart.show("data1");
36037 *
36038 * // show 'data1' and 'data3'
36039 * chart.show(["data1", "data3"]);
36040 */
36041 show: function show(targetIdsValue, options) {
36042 if (options === void 0) {
36043 options = {};
36044 }
36045 showHide.call(this, !0, targetIdsValue, options);
36046 },
36047 /**
36048 * Hide data series from chart
36049 * @function hide
36050 * @instance
36051 * @memberof Chart
36052 * @param {string|Array} [targetIdsValue] The target id value.
36053 * @param {object} [options] The object can consist with following members:<br>
36054 *
36055 * | Key | Type | default | Description |
36056 * | --- | --- | --- | --- |
36057 * | withLegend | boolean | false | whether or not display legend |
36058 *
36059 * @example
36060 * // hide 'data1'
36061 * chart.hide("data1");
36062 *
36063 * // hide 'data1' and 'data3'
36064 * chart.hide(["data1", "data3"]);
36065 */
36066 hide: function hide(targetIdsValue, options) {
36067 if (options === void 0) {
36068 options = {};
36069 }
36070 showHide.call(this, !1, targetIdsValue, options);
36071 },
36072 /**
36073 * Toggle data series on chart. When target data is hidden, it will show. If is shown, it will hide in vice versa.
36074 * @function toggle
36075 * @instance
36076 * @memberof Chart
36077 * @param {string|Array} [targetIds] The target id value.
36078 * @param {object} [options] The object can consist with following members:<br>
36079 *
36080 * | Key | Type | default | Description |
36081 * | --- | --- | --- | --- |
36082 * | withLegend | boolean | false | whether or not display legend |
36083 *
36084 * @example
36085 * // toggle 'data1'
36086 * chart.toggle("data1");
36087 *
36088 * // toggle 'data1' and 'data3'
36089 * chart.toggle(["data1", "data3"]);
36090 */
36091 toggle: function toggle(targetIds, options) {
36092 var _this2 = this;
36093 if (options === void 0) {
36094 options = {};
36095 }
36096 var $$ = this.internal,
36097 targets = {
36098 show: [],
36099 hide: []
36100 };
36101 // sort show & hide target ids
36102 $$.mapToTargetIds(targetIds).forEach(function (id) {
36103 _newArrowCheck(this, _this2);
36104 return targets[$$.isTargetToShow(id) ? "hide" : "show"].push(id);
36105 }.bind(this));
36106
36107 // perform show & hide task separately
36108 // https://github.com/naver/billboard.js/issues/454
36109 targets.show.length && this.show(targets.show, options);
36110 targets.hide.length && setTimeout(function () {
36111 _newArrowCheck(this, _this2);
36112 return this.hide(targets.hide, options);
36113 }.bind(this), 0);
36114 }
36115});
36116;// CONCATENATED MODULE: ./src/Chart/api/tooltip.ts
36117
36118/**
36119 * Copyright (c) 2017 ~ present NAVER Corp.
36120 * billboard.js project is licensed under the MIT license
36121 */
36122
36123
36124/**
36125 * Define tooltip
36126 * @ignore
36127 */
36128var tooltip_tooltip = {
36129 /**
36130 * Show tooltip
36131 * @function tooltip․show
36132 * @instance
36133 * @memberof Chart
36134 * @param {object} args The object can consist with following members:<br>
36135 *
36136 * | Key | Type | Description |
36137 * | --- | --- | --- |
36138 * | index | Number | Determine focus by index |
36139 * | x | Number &vert; Date | Determine focus by x Axis index |
36140 * | mouse | Array | Determine x and y coordinate value relative the targeted '.bb-event-rect' x Axis.<br>It should be used along with `data`, `index` or `x` value. The default value is set as `[0,0]` |
36141 * | data | Object | When [data.xs](Options.html#.data%25E2%2580%25A4xs) option is used or [tooltip.grouped](Options.html#.tooltip) set to 'false', `should be used giving this param`.<br><br>**Key:**<br>- x {number &verbar; Date}: x Axis value<br>- index {number}: x Axis index (useless for data.xs)<br>- id {string}: data id<br>- value {number}: The corresponding value for tooltip. |
36142 *
36143 * @example
36144 * // show the 2nd x Axis coordinate tooltip
36145 * // for Arc(gauge, donut & pie) and radar type, approch showing tooltip by using "index" number.
36146 * chart.tooltip.show({
36147 * index: 1
36148 * });
36149 *
36150 * // show tooltip for the 3rd x Axis in x:50 and y:100 coordinate of '.bb-event-rect' of the x Axis.
36151 * chart.tooltip.show({
36152 * x: 2,
36153 * mouse: [50, 100]
36154 * });
36155 *
36156 * // show tooltip for timeseries x axis
36157 * chart.tooltip.show({
36158 * x: new Date("2018-01-02 00:00")
36159 * });
36160 *
36161 * // when data.xs is used
36162 * chart.tooltip.show({
36163 * data: {
36164 * x: 3, // x Axis value
36165 * id: "data1", // data id
36166 * value: 500 // data value
36167 * }
36168 * });
36169 *
36170 * // when data.xs isn't used, but tooltip.grouped=false is set
36171 * chart.tooltip.show({
36172 * data: {
36173 * index: 3, // or 'x' key value
36174 * id: "data1", // data id
36175 * value: 500 // data value
36176 * }
36177 * });
36178 */
36179 show: function show(args) {
36180 var _this = this,
36181 $$ = this.internal,
36182 config = $$.config,
36183 inputType = $$.state.inputType,
36184 index,
36185 mouse;
36186 // determine mouse position on the chart
36187 if (args.mouse) {
36188 mouse = args.mouse;
36189 }
36190
36191 // determine focus data
36192 if (args.data) {
36193 var data = args.data,
36194 y = $$.getYScaleById(data.id)(data.value);
36195 if ($$.isMultipleX()) {
36196 // if multiple xs, target point will be determined by mouse
36197 mouse = [$$.scale.x(data.x), y];
36198 } else {
36199 if (!config.tooltip_grouped) {
36200 mouse = [0, y];
36201 }
36202 index = isValue(data.index) ? data.index : $$.getIndexByX(data.x);
36203 }
36204 } else if (isDefined(args.x)) {
36205 index = $$.getIndexByX(args.x);
36206 } else if (isDefined(args.index)) {
36207 index = args.index;
36208 }
36209 (inputType === "mouse" ? ["mouseover", "mousemove"] : ["touchstart"]).forEach(function (eventName) {
36210 _newArrowCheck(this, _this);
36211 $$.dispatchEvent(eventName, index, mouse);
36212 }.bind(this));
36213 },
36214 /**
36215 * Hide tooltip
36216 * @function tooltip․hide
36217 * @instance
36218 * @memberof Chart
36219 */
36220 hide: function hide() {
36221 var _this2 = this,
36222 $$ = this.internal,
36223 inputType = $$.state.inputType,
36224 tooltip = $$.$el.tooltip,
36225 data = tooltip == null ? void 0 : tooltip.datum();
36226 if (data) {
36227 var index = JSON.parse(data.current)[0].index;
36228
36229 // make to finalize, possible pending event flow set from '.tooltip.show()' call
36230 (inputType === "mouse" ? ["mouseout"] : ["touchend"]).forEach(function (eventName) {
36231 _newArrowCheck(this, _this2);
36232 $$.dispatchEvent(eventName, index);
36233 }.bind(this));
36234 }
36235
36236 // reset last touch point index
36237 inputType === "touch" && $$.callOverOutForTouch();
36238 $$.hideTooltip(!0);
36239 $$.hideGridFocus();
36240 $$.unexpandCircles == null ? void 0 : $$.unexpandCircles();
36241 $$.expandBarTypeShapes(!1);
36242 }
36243};
36244/* harmony default export */ var api_tooltip = ({
36245 tooltip: tooltip_tooltip
36246});
36247;// CONCATENATED MODULE: ./src/Chart/Chart.ts
36248
36249/**
36250 * Copyright (c) 2017 ~ present NAVER Corp.
36251 * billboard.js project is licensed under the MIT license
36252 */
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266/**
36267 * Main chart class.
36268 * - Note: Instantiated via `bb.generate()`.
36269 * @class Chart
36270 * @example
36271 * var chart = bb.generate({
36272 * data: {
36273 * columns: [
36274 * ["x", "2015-11-02", "2015-12-01", "2016-01-01", "2016-02-01", "2016-03-01"],
36275 * ["count1", 11, 8, 7, 6, 5 ],
36276 * ["count2", 9, 3, 6, 2, 8 ]
36277 * ]}
36278 * }
36279 * @see {@link bb.generate} for the initialization.
36280 */
36281/**
36282 * Access instance's primary node elements
36283 * @member {object} $
36284 * @property {object} $ Access instance's primary node elements
36285 * @property {d3.selection} $.chart Wrapper element
36286 * @property {d3.selection} $.svg Main svg element
36287 * @property {d3.selection} $.defs Definition element
36288 * @property {d3.selection} $.main Main grouping element
36289 * @property {d3.selection} $.tooltip Tooltip element
36290 * @property {d3.selection} $.legend Legend element
36291 * @property {d3.selection} $.title Title element
36292 * @property {d3.selection} $.grid Grid element
36293 * @property {d3.selection} $.arc Arc element
36294 * @property {d3.selection} $.circles Data point circle elements
36295 * @property {object} $.bar Bar element object
36296 * @property {d3.selection} $.bar.bars Bar elements
36297 * @property {d3.selection} $.candlestick Candlestick elements
36298 * @property {object} $.line Line element object
36299 * @property {d3.selection} $.line.lines Line elements
36300 * @property {d3.selection} $.line.areas Areas elements
36301 * @property {object} $.text Text element object
36302 * @property {d3.selection} $.text.texts Data label text elements
36303 * @memberof Chart
36304 * @example
36305 * var chart = bb.generate({ ... });
36306 *
36307 * chart.$.chart; // wrapper element
36308 * chart.$.line.circles; // all data point circle elements
36309 */
36310/**
36311 * Plugin instance array
36312 * @member {Array} plugins
36313 * @memberof Chart
36314 * @example
36315 * var chart = bb.generate({
36316 * ...
36317 * plugins: [
36318 * new bb.plugin.stanford({ ... }),
36319 * new PluginA()
36320 * ]
36321 * });
36322 *
36323 * chart.plugins; // [Stanford, PluginA] - instance array
36324 */
36325var Chart = function Chart(options) {
36326 this.plugins = [];
36327 this.internal = void 0;
36328 var $$ = new ChartInternal(this);
36329 this.internal = $$;
36330
36331 // bind to namespaced APIs
36332 (function bindThis(fn, target, argThis) {
36333 var _this = this;
36334 Object.keys(fn).forEach(function (key) {
36335 _newArrowCheck(this, _this);
36336 var isFunc = isFunction(fn[key]),
36337 isChild = target !== argThis,
36338 isNotNil = notEmpty(fn[key]),
36339 hasChild = isNotNil && Object.keys(fn[key]).length > 0;
36340 if (isFunc && (!isChild && hasChild || isChild)) {
36341 target[key] = fn[key].bind(argThis);
36342 } else if (isNotNil && !isFunc) {
36343 target[key] = {};
36344 } else {
36345 target[key] = fn[key];
36346 }
36347 hasChild && bindThis(fn[key], target[key], argThis);
36348 }.bind(this));
36349 })(Chart.prototype, this, this);
36350 loadConfig.call($$, options);
36351 $$.beforeInit();
36352 $$.init();
36353}; // extend common APIs as part of Chart class
36354
36355util_extend(Chart.prototype, [chart, api_color, api_data, api_export, api_focus, api_legend, api_load, show, api_tooltip]);
36356;// CONCATENATED MODULE: ./src/Chart/api/axis.ts
36357
36358/**
36359 * Copyright (c) 2017 ~ present NAVER Corp.
36360 * billboard.js project is licensed under the MIT license
36361 */
36362
36363/**
36364 * Set the min/max value
36365 * @param {Chart} $$ Chart instance
36366 * @param {string} type Set type 'min' or 'max'
36367 * @param {object} value Value to be set
36368 * @private
36369 */
36370function setMinMax($$, type, value) {
36371 var _this = this,
36372 config = $$.config,
36373 helper = function (key, value) {
36374 _newArrowCheck(this, _this);
36375 var v = isNumber(value) ? value : value === !1 ? undefined : null;
36376 if (v !== null) {
36377 config["axis_" + key + "_" + type] = v;
36378 }
36379 }.bind(this);
36380 if (isDefined(value)) {
36381 if (isObjectType(value)) {
36382 Object.keys(value).forEach(function (key) {
36383 _newArrowCheck(this, _this);
36384 helper(key, value[key]);
36385 }.bind(this));
36386 } else if (isNumber(value) || value === !1) {
36387 // shorthand values affects only y and y2.
36388 ["y", "y2"].forEach(function (key) {
36389 _newArrowCheck(this, _this);
36390 helper(key, value);
36391 }.bind(this));
36392 }
36393 $$.redraw({
36394 withUpdateOrgXDomain: !0,
36395 withUpdateXDomain: !0
36396 });
36397 }
36398}
36399
36400/**
36401 * Get the min/max value
36402 * @param {Chart} $$ Chart instance
36403 * @param {string} type Set type 'min' or 'max'
36404 * @returns {{x, y, y2}}
36405 * @private
36406 */
36407function axis_getMinMax($$, type) {
36408 var config = $$.config;
36409 return {
36410 x: config["axis_x_" + type],
36411 y: config["axis_y_" + type],
36412 y2: config["axis_y2_" + type]
36413 };
36414}
36415
36416/**
36417 * Define axis
36418 * @ignore
36419 */
36420var axis = {
36421 /**
36422 * Get and set axis labels.
36423 * @function axis․labels
36424 * @instance
36425 * @memberof Chart
36426 * @param {object} labels specified axis' label to be updated.
36427 * @param {string} [labels.x] x Axis string
36428 * @param {string} [labels.y] y Axis string
36429 * @param {string} [labels.y2] y2 Axis string
36430 * @returns {object|undefined} axis labels text object
36431 * @example
36432 * // Update axis' label
36433 * chart.axis.labels({
36434 * x: "New X Axis Label",
36435 * y: "New Y Axis Label",
36436 * y2: "New Y2 Axis Label"
36437 * });
36438 *
36439 * chart.axis.labels();
36440 * // --> {
36441 * // x: "New X Axis Label",
36442 * // y: "New Y Axis Label",
36443 * // y2: "New Y2 Axis Label"
36444 * // }
36445 */
36446 labels: function labels(_labels) {
36447 var _this2 = this,
36448 $$ = this.internal,
36449 labelText;
36450 if (_labels) {
36451 Object.keys(_labels).forEach(function (axisId) {
36452 _newArrowCheck(this, _this2);
36453 $$.axis.setLabelText(axisId, _labels[axisId]);
36454 }.bind(this));
36455 $$.axis.updateLabels();
36456 }
36457 ["x", "y", "y2"].forEach(function (v) {
36458 _newArrowCheck(this, _this2);
36459 var text = $$.axis.getLabelText(v);
36460 if (text) {
36461 labelText || (labelText = {});
36462 labelText[v] = text;
36463 }
36464 }.bind(this));
36465 return labelText;
36466 },
36467 /**
36468 * Get and set axis min value.
36469 * @function axis․min
36470 * @instance
36471 * @memberof Chart
36472 * @param {object} min If min is given, specified axis' min value will be updated.<br>
36473 * If no argument is given, the min values set on generating option for each axis will be returned.
36474 * If not set any min values on generation, it will return `undefined`.<br>
36475 * To unset specific axis max, set `false` to each of them.
36476 * @returns {object|undefined}
36477 * @example
36478 * // Update axis' min
36479 * chart.axis.min({
36480 * x: -10,
36481 * y: 1000,
36482 * y2: 100
36483 * });
36484 *
36485 * // To unset specific axis min, set false to each of them.
36486 * chart.axis.min({
36487 * x: false,
36488 * y: false,
36489 * y2: false
36490 * });
36491 *
36492 * // shorthand (only affects y and y2 axis)
36493 * chart.axis.min(-50);
36494 * chart.axis.min(false);
36495 */
36496 min: function min(_min) {
36497 var $$ = this.internal;
36498 return isValue(_min) || _min === !1 ? setMinMax($$, "min", _min) : axis_getMinMax($$, "min");
36499 },
36500 /**
36501 * Get and set axis max value.
36502 * @function axis․max
36503 * @instance
36504 * @memberof Chart
36505 * @param {object} max If max is given, specified axis' max value will be updated.<br>
36506 * If no argument is given, the max values set on generating option for each axis will be returned.
36507 * If not set any max values on generation, it will return `undefined`.<br>
36508 * To unset specific axis max, set `false` to each of them.
36509 * @returns {object|undefined}
36510 * @example
36511 * // Update axis' label
36512 * chart.axis.max({
36513 * x: 100,
36514 * y: 1000,
36515 * y2: 10000
36516 * });
36517 *
36518 * // To unset specific axis max, set false to each of them.
36519 * chart.axis.max({
36520 * x: false,
36521 * y: false,
36522 * y2: false
36523 * });
36524 *
36525 * // shorthand (only affects y and y2 axis)
36526 * chart.axis.max(10);
36527 * chart.axis.max(false);
36528 */
36529 max: function max(_max) {
36530 var $$ = this.internal;
36531 return isValue(_max) || _max === !1 ? setMinMax($$, "max", _max) : axis_getMinMax($$, "max");
36532 },
36533 /**
36534 * Get and set axis min and max value.
36535 * @function axis․range
36536 * @instance
36537 * @memberof Chart
36538 * @param {object} range If range is given, specified axis' min and max value will be updated.
36539 * If no argument is given, the current min and max values for each axis will be returned.<br>
36540 * To unset specific axis max, set `false` to each of them.
36541 * @returns {object|undefined}
36542 * @example
36543 * // Update axis' label
36544 * chart.axis.range({
36545 * min: {
36546 * x: -10,
36547 * y: -1000,
36548 * y2: -10000
36549 * },
36550 * max: {
36551 * x: 100,
36552 * y: 1000,
36553 * y2: 10000
36554 * },
36555 * });
36556 *
36557 * // To unset specific axis max, set false to each of them.
36558 * chart.axis.range({
36559 * min: {
36560 * x: false,
36561 * y: false,
36562 * y2: false
36563 * },
36564 * max: {
36565 * x: false,
36566 * y: false,
36567 * y2: false
36568 * },
36569 * });
36570 *
36571 * // shorthand (only affects y and y2 axis)
36572 * chart.axis.range({ min: -50, max: 1000 });
36573 * chart.axis.range({ min: false, max: false });
36574 */
36575 range: function range(_range) {
36576 var axis = this.axis;
36577 if (arguments.length) {
36578 var min = _range.min,
36579 max = _range.max;
36580 isDefined(max) && axis.max(max);
36581 isDefined(min) && axis.min(min);
36582 } else {
36583 return {
36584 max: axis.max(),
36585 min: axis.min()
36586 };
36587 }
36588 return undefined;
36589 }
36590};
36591/* harmony default export */ var api_axis = ({
36592 axis: axis
36593});
36594;// CONCATENATED MODULE: ./src/Chart/api/category.ts
36595/**
36596 * Copyright (c) 2017 ~ present NAVER Corp.
36597 * billboard.js project is licensed under the MIT license
36598 */
36599/* harmony default export */ var api_category = ({
36600 /**
36601 * Set specified category name on category axis.
36602 * @function category
36603 * @instance
36604 * @memberof Chart
36605 * @param {number} i index of category to be changed
36606 * @param {string} category category value to be changed
36607 * @returns {string}
36608 * @example
36609 * chart.category(2, "Category 3");
36610 */
36611 category: function category(i, _category) {
36612 var $$ = this.internal,
36613 config = $$.config;
36614 if (arguments.length > 1) {
36615 config.axis_x_categories[i] = _category;
36616 $$.redraw();
36617 }
36618 return config.axis_x_categories[i];
36619 },
36620 /**
36621 * Set category names on category axis.
36622 * @function categories
36623 * @instance
36624 * @memberof Chart
36625 * @param {Array} categories This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.
36626 * @returns {Array}
36627 * @example
36628 * chart.categories([
36629 * "Category 1", "Category 2", ...
36630 * ]);
36631 */
36632 categories: function categories(_categories) {
36633 var $$ = this.internal,
36634 config = $$.config;
36635 if (!arguments.length) {
36636 return config.axis_x_categories;
36637 }
36638 config.axis_x_categories = _categories;
36639 $$.redraw();
36640 return config.axis_x_categories;
36641 }
36642});
36643;// CONCATENATED MODULE: ./src/Chart/api/grid.x.ts
36644/**
36645 * Copyright (c) 2017 ~ present NAVER Corp.
36646 * billboard.js project is licensed under the MIT license
36647 */
36648
36649/**
36650 * Update x grid lines.
36651 * @function xgrids
36652 * @instance
36653 * @memberof Chart
36654 * @param {Array} grids X grid lines will be replaced with this argument. The format of this argument is the same as grid.x.lines.
36655 * @returns {object}
36656 * @example
36657 * // Show 2 x grid lines
36658 * chart.xgrids([
36659 * {value: 1, text: "Label 1"},
36660 * {value: 4, text: "Label 4"}
36661 * ]);
36662 * // --> Returns: [{value: 1, text: "Label 1"}, {value: 4, text: "Label 4"}]
36663 */
36664function xgrids(grids) {
36665 var $$ = this.internal,
36666 config = $$.config;
36667 if (!grids) {
36668 return config.grid_x_lines;
36669 }
36670 config.grid_x_lines = grids;
36671 $$.redrawWithoutRescale();
36672 return config.grid_x_lines;
36673}
36674util_extend(xgrids, {
36675 /**
36676 * Add x grid lines.<br>
36677 * This API adds new x grid lines instead of replacing like xgrids.
36678 * @function xgrids․add
36679 * @instance
36680 * @memberof Chart
36681 * @param {Array|object} grids New x grid lines will be added. The format of this argument is the same as grid.x.lines and it's possible to give an Object if only one line will be added.
36682 * @returns {object}
36683 * @example
36684 * // Add a new x grid line
36685 * chart.xgrids.add(
36686 * {value: 4, text: "Label 4"}
36687 * );
36688 *
36689 * // Add new x grid lines
36690 * chart.xgrids.add([
36691 * {value: 2, text: "Label 2"},
36692 * {value: 4, text: "Label 4"}
36693 * ]);
36694 */
36695 add: function add(grids) {
36696 return this.xgrids(this.internal.config.grid_x_lines.concat(grids || []));
36697 },
36698 /**
36699 * Remove x grid lines.<br>
36700 * This API removes x grid lines.
36701 * @function xgrids․remove
36702 * @instance
36703 * @memberof Chart
36704 * @param {object} params This argument should include value or class. If value is given, the x grid lines that have specified x value will be removed. If class is given, the x grid lines that have specified class will be removed. If args is not given, all of x grid lines will be removed.
36705 * @example
36706 * // x grid line on x = 2 will be removed
36707 * chart.xgrids.remove({value: 2});
36708 *
36709 * // x grid lines that have 'grid-A' will be removed
36710 * chart.xgrids.remove({
36711 * class: "grid-A"
36712 * });
36713 *
36714 * // all of x grid lines will be removed
36715 * chart.xgrids.remove();
36716 */
36717 remove: function remove(params) {
36718 // TODO: multiple
36719 this.internal.removeGridLines(params, !0);
36720 }
36721});
36722/* harmony default export */ var grid_x = ({
36723 xgrids: xgrids
36724});
36725;// CONCATENATED MODULE: ./src/Chart/api/grid.y.ts
36726/**
36727 * Copyright (c) 2017 ~ present NAVER Corp.
36728 * billboard.js project is licensed under the MIT license
36729 */
36730
36731
36732/**
36733 * Update y grid lines.
36734 * @function ygrids
36735 * @instance
36736 * @memberof Chart
36737 * @param {Array} grids Y grid lines will be replaced with this argument. The format of this argument is the same as grid.y.lines.
36738 * @returns {object}
36739 * @example
36740 * // Show 2 y grid lines
36741 * chart.ygrids([
36742 * {value: 100, text: "Label 1"},
36743 * {value: 400, text: "Label 4"}
36744 * ]);
36745 * // --> Returns: [{value: 100, text: "Label 1"}, {value: 400, text: "Label 4"}]
36746 */
36747function ygrids(grids) {
36748 var $$ = this.internal,
36749 config = $$.config;
36750 if (!grids) {
36751 return config.grid_y_lines;
36752 }
36753 config.grid_y_lines = grids;
36754 $$.redrawWithoutRescale();
36755 return config.grid_y_lines;
36756}
36757util_extend(ygrids, {
36758 /**
36759 * Add y grid lines.<br>
36760 * This API adds new y grid lines instead of replacing like ygrids.
36761 * @function ygrids․add
36762 * @instance
36763 * @memberof Chart
36764 * @param {Array|object} grids New y grid lines will be added. The format of this argument is the same as grid.y.lines and it's possible to give an Object if only one line will be added.
36765 * @returns {object}
36766 * @example
36767 * // Add a new x grid line
36768 * chart.ygrids.add(
36769 * {value: 400, text: "Label 4"}
36770 * );
36771 *
36772 * // Add new x grid lines
36773 * chart.ygrids.add([
36774 * {value: 200, text: "Label 2"},
36775 * {value: 400, text: "Label 4"}
36776 * ]);
36777 */
36778 add: function add(grids) {
36779 return this.ygrids(this.internal.config.grid_y_lines.concat(grids || []));
36780 },
36781 /**
36782 * Remove y grid lines.<br>
36783 * This API removes x grid lines.
36784 * @function ygrids․remove
36785 * @instance
36786 * @memberof Chart
36787 * @param {object} params This argument should include value or class. If value is given, the y grid lines that have specified y value will be removed. If class is given, the y grid lines that have specified class will be removed. If args is not given, all of y grid lines will be removed.
36788 * @param {number} [params.value] target value
36789 * @param {string} [params.class] target class
36790 * @example
36791 * // y grid line on y = 200 will be removed
36792 * chart.ygrids.remove({value: 200});
36793 *
36794 * // y grid lines that have 'grid-A' will be removed
36795 * chart.ygrids.remove({
36796 * class: "grid-A"
36797 * });
36798 *
36799 * // all of y grid lines will be removed
36800 * chart.ygrids.remove();
36801 */
36802 remove: function remove(params) {
36803 // TODO: multiple
36804 this.internal.removeGridLines(params, !1);
36805 }
36806});
36807/* harmony default export */ var grid_y = ({
36808 ygrids: ygrids
36809});
36810;// CONCATENATED MODULE: ./src/Chart/api/group.ts
36811/**
36812 * Copyright (c) 2017 ~ present NAVER Corp.
36813 * billboard.js project is licensed under the MIT license
36814 */
36815
36816/* harmony default export */ var group = ({
36817 /**
36818 * Update groups for the targets.
36819 * @function groups
36820 * @instance
36821 * @memberof Chart
36822 * @param {Array} groups This argument needs to be an Array that includes one or more Array that includes target ids to be grouped.
36823 * @returns {Array} Grouped data names array
36824 * @example
36825 * // data1 and data2 will be a new group.
36826 * chart.groups([
36827 * ["data1", "data2"]
36828 * ]);
36829 */
36830 groups: function groups(_groups) {
36831 var $$ = this.internal,
36832 config = $$.config;
36833 if (isUndefined(_groups)) {
36834 return config.data_groups;
36835 }
36836 config.data_groups = _groups;
36837 $$.redraw();
36838 return config.data_groups;
36839 }
36840});
36841;// CONCATENATED MODULE: ./src/Chart/api/regions.ts
36842
36843/**
36844 * Copyright (c) 2017 ~ present NAVER Corp.
36845 * billboard.js project is licensed under the MIT license
36846 */
36847
36848
36849/**
36850 * Update regions.
36851 * @function regions
36852 * @instance
36853 * @memberof Chart
36854 * @param {Array} regions Regions will be replaced with this argument. The format of this argument is the same as regions.
36855 * @returns {Array} regions
36856 * @example
36857 * // Show 2 regions
36858 * chart.regions([
36859 * {axis: "x", start: 5, class: "regionX"},
36860 * {axis: "y", end: 50, class: "regionY"}
36861 * ]);
36862 */
36863function regions(regions) {
36864 var $$ = this.internal,
36865 config = $$.config;
36866 if (!regions) {
36867 return config.regions;
36868 }
36869 config.regions = regions;
36870 $$.redrawWithoutRescale();
36871 return regions;
36872}
36873util_extend(regions, {
36874 /**
36875 * Add new region.<br><br>
36876 * This API adds new region instead of replacing like regions.
36877 * @function regions․add
36878 * @instance
36879 * @memberof Chart
36880 * @param {Array|object} regions New region will be added. The format of this argument is the same as regions and it's possible to give an Object if only one region will be added.
36881 * @returns {Array} regions
36882 * @example
36883 * // Add a new region
36884 * chart.regions.add(
36885 * {axis: "x", start: 5, class: "regionX"}
36886 * );
36887 *
36888 * // Add new regions
36889 * chart.regions.add([
36890 * {axis: "x", start: 5, class: "regionX"},
36891 * {axis: "y", end: 50, class: "regionY"}
36892 *]);
36893 */
36894 add: function add(regions) {
36895 var $$ = this.internal,
36896 config = $$.config;
36897 if (!regions) {
36898 return config.regions;
36899 }
36900 config.regions = config.regions.concat(regions);
36901 $$.redrawWithoutRescale();
36902 return config.regions;
36903 },
36904 /**
36905 * Remove regions.<br><br>
36906 * This API removes regions.
36907 * @function regions․remove
36908 * @instance
36909 * @memberof Chart
36910 * @param {object} optionsValue This argument should include classes. If classes is given, the regions that have one of the specified classes will be removed. If args is not given, all of regions will be removed.
36911 * @returns {Array} regions Removed regions
36912 * @example
36913 * // regions that have 'region-A' or 'region-B' will be removed.
36914 * chart.regions.remove({
36915 * classes: [
36916 * "region-A", "region-B"
36917 * ]
36918 * });
36919 *
36920 * // all of regions will be removed.
36921 * chart.regions.remove();
36922 */
36923 remove: function remove(optionsValue) {
36924 var _this = this,
36925 $$ = this.internal,
36926 config = $$.config,
36927 $T = $$.$T,
36928 options = optionsValue || {},
36929 classes = getOption(options, "classes", [$REGION.region]),
36930 regions = $$.$el.main.select("." + $REGION.regions).selectAll(classes.map(function (c) {
36931 _newArrowCheck(this, _this);
36932 return "." + c;
36933 }.bind(this)));
36934 $T(regions).style("opacity", "0").remove();
36935 regions = config.regions;
36936 if (Object.keys(options).length) {
36937 regions = regions.filter(function (region) {
36938 var _this2 = this;
36939 _newArrowCheck(this, _this);
36940 var found = !1;
36941 if (!region.class) {
36942 return !0;
36943 }
36944 region.class.split(" ").forEach(function (c) {
36945 _newArrowCheck(this, _this2);
36946 if (classes.indexOf(c) >= 0) {
36947 found = !0;
36948 }
36949 }.bind(this));
36950 return !found;
36951 }.bind(this));
36952 config.regions = regions;
36953 } else {
36954 config.regions = [];
36955 }
36956 return regions;
36957 }
36958});
36959/* harmony default export */ var api_regions = ({
36960 regions: regions
36961});
36962;// CONCATENATED MODULE: ./src/Chart/api/x.ts
36963/**
36964 * Copyright (c) 2017 ~ present NAVER Corp.
36965 * billboard.js project is licensed under the MIT license
36966 */
36967
36968/* harmony default export */ var x = ({
36969 /**
36970 * Get and set x values for the chart.
36971 * @function x
36972 * @instance
36973 * @memberof Chart
36974 * @param {Array} x If x is given, x values of every target will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.
36975 * @returns {object} xs
36976 * @example
36977 * // Get current x values
36978 * chart.x();
36979 *
36980 * // Update x values for all targets
36981 * chart.x([100, 200, 300, 400, ...]);
36982 */
36983 x: function x(_x) {
36984 var $$ = this.internal,
36985 axis = $$.axis,
36986 data = $$.data,
36987 isCategorized = axis.isCustomX() && axis.isCategorized();
36988 if (isArray(_x)) {
36989 if (isCategorized) {
36990 this.categories(_x);
36991 } else {
36992 $$.updateTargetX(data.targets, _x);
36993 $$.redraw({
36994 withUpdateOrgXDomain: !0,
36995 withUpdateXDomain: !0
36996 });
36997 }
36998 }
36999 return isCategorized ? this.categories() : data.xs;
37000 },
37001 /**
37002 * Get and set x values for the chart.
37003 * @function xs
37004 * @instance
37005 * @memberof Chart
37006 * @param {Array} xs If xs is given, specified target's x values will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.
37007 * @returns {object} xs
37008 * @example
37009 * // Get current x values
37010 * chart.xs();
37011 *
37012 * // Update x values for all targets
37013 * chart.xs({
37014 * data1: [10, 20, 30, 40, ...],
37015 * data2: [100, 200, 300, 400, ...]
37016 * });
37017 */
37018 xs: function xs(_xs) {
37019 var $$ = this.internal;
37020 if (isObject(_xs)) {
37021 $$.updateTargetXs($$.data.targets, _xs);
37022 $$.redraw({
37023 withUpdateOrgXDomain: !0,
37024 withUpdateXDomain: !0
37025 });
37026 }
37027 return $$.data.xs;
37028 }
37029});
37030;// CONCATENATED MODULE: ./src/Chart/api/flow.ts
37031
37032/**
37033 * Copyright (c) 2017 ~ present NAVER Corp.
37034 * billboard.js project is licensed under the MIT license
37035 */
37036
37037/* harmony default export */ var flow = ({
37038 /**
37039 * Flow data to the chart.<br><br>
37040 * By this API, you can append new data points to the chart.
37041 * @function flow
37042 * @instance
37043 * @memberof Chart
37044 * @param {object} args The object can consist with following members:<br>
37045 *
37046 * | Key | Type | Description |
37047 * | --- | --- | --- |
37048 * | json | Object | Data as JSON format (@see [data․json](Options.html#.data%25E2%2580%25A4json)) |
37049 * | rows | Array | Data in array as row format (@see [data․rows](Options.html#.data%25E2%2580%25A4json)) |
37050 * | columns | Array | Data in array as column format (@see [data․columns](Options.html#.data%25E2%2580%25A4columns)) |
37051 * | to | String | The lower x edge will move to that point. If not given, the lower x edge will move by the number of given data points |
37052 * | length | Number | The lower x edge will move by the number of this argument |
37053 * | duration | Number | The duration of the transition will be specified value. If not given, transition.duration will be used as default |
37054 * | done | Function | The specified function will be called when flow ends |
37055 *
37056 * - **NOTE:**
37057 * - If json, rows and columns given, the data will be loaded.
37058 * - If data that has the same target id is given, the chart will be appended.
37059 * - Otherwise, new target will be added. One of these is required when calling.
37060 * - If json specified, keys is required as well as data.json.
37061 * - If tab isn't visible(by evaluating `document.hidden`), will not be executed to prevent unnecessary work.
37062 * @example
37063 * // 2 data points will be apprended to the tail and popped from the head.
37064 * // After that, 4 data points will be appended and no data points will be poppoed.
37065 * chart.flow({
37066 * columns: [
37067 * ["x", "2018-01-11", "2018-01-21"],
37068 * ["data1", 500, 200],
37069 * ["data2", 100, 300],
37070 * ["data3", 200, 120]
37071 * ],
37072 * to: "2013-01-11",
37073 * done: function () {
37074 * chart.flow({
37075 * columns: [
37076 * ["x", "2018-02-11", "2018-02-12", "2018-02-13", "2018-02-14"],
37077 * ["data1", 200, 300, 100, 250],
37078 * ["data2", 100, 90, 40, 120],
37079 * ["data3", 100, 100, 300, 500]
37080 * ],
37081 * length: 2,
37082 * duration: 1500
37083 * });
37084 * }
37085 * });
37086 */
37087 flow: function flow(args) {
37088 var _this = this,
37089 $$ = this.internal,
37090 data;
37091 if (args.json || args.rows || args.columns) {
37092 $$.convertData(args, function (res) {
37093 _newArrowCheck(this, _this);
37094 data = res;
37095 _();
37096 }.bind(this));
37097 }
37098
37099 /**
37100 * Process flows
37101 * @private
37102 */
37103 function _() {
37104 var _this2 = this,
37105 domain,
37106 length = 0,
37107 tail = 0,
37108 diff,
37109 to;
37110 if ($$.state.redrawing || !data || !isTabVisible()) {
37111 return;
37112 }
37113 var notfoundIds = [],
37114 orgDataCount = $$.getMaxDataCount(),
37115 targets = $$.convertDataToTargets(data, !0),
37116 isTimeSeries = $$.axis.isTimeSeries();
37117 // Update/Add data
37118 $$.data.targets.forEach(function (t) {
37119 _newArrowCheck(this, _this2);
37120 var found = !1;
37121 for (var i = 0; i < targets.length; i++) {
37122 if (t.id === targets[i].id) {
37123 found = !0;
37124 if (t.values[t.values.length - 1]) {
37125 tail = t.values[t.values.length - 1].index + 1;
37126 }
37127 length = targets[i].values.length;
37128 for (var j = 0; j < length; j++) {
37129 targets[i].values[j].index = tail + j;
37130 if (!isTimeSeries) {
37131 targets[i].values[j].x = tail + j;
37132 }
37133 }
37134 t.values = t.values.concat(targets[i].values);
37135 targets.splice(i, 1);
37136 break;
37137 }
37138 }
37139 found || notfoundIds.push(t.id);
37140 }.bind(this));
37141
37142 // Append null for not found targets
37143 $$.data.targets.forEach(function (t) {
37144 _newArrowCheck(this, _this2);
37145 for (var i = 0; i < notfoundIds.length; i++) {
37146 if (t.id === notfoundIds[i]) {
37147 tail = t.values[t.values.length - 1].index + 1;
37148 for (var j = 0; j < length; j++) {
37149 t.values.push({
37150 id: t.id,
37151 index: tail + j,
37152 x: isTimeSeries ? $$.getOtherTargetX(tail + j) : tail + j,
37153 value: null
37154 });
37155 }
37156 }
37157 }
37158 }.bind(this));
37159
37160 // Generate null values for new target
37161 if ($$.data.targets.length) {
37162 targets.forEach(function (t) {
37163 var _this3 = this;
37164 _newArrowCheck(this, _this2);
37165 var missing = [];
37166 for (var i = $$.data.targets[0].values[0].index; i < tail; i++) {
37167 missing.push({
37168 id: t.id,
37169 index: i,
37170 x: isTimeSeries ? $$.getOtherTargetX(i) : i,
37171 value: null
37172 });
37173 }
37174 t.values.forEach(function (v) {
37175 _newArrowCheck(this, _this3);
37176 v.index += tail;
37177 if (!isTimeSeries) {
37178 v.x += tail;
37179 }
37180 }.bind(this));
37181 t.values = missing.concat(t.values);
37182 }.bind(this));
37183 }
37184 $$.data.targets = $$.data.targets.concat(targets); // add remained
37185
37186 // check data count because behavior needs to change when it"s only one
37187 // const dataCount = $$.getMaxDataCount();
37188 var baseTarget = $$.data.targets[0],
37189 baseValue = baseTarget.values[0];
37190 // Update length to flow if needed
37191 if (isDefined(args.to)) {
37192 length = 0;
37193 to = isTimeSeries ? parseDate.call($$, args.to) : args.to;
37194 baseTarget.values.forEach(function (v) {
37195 _newArrowCheck(this, _this2);
37196 v.x < to && length++;
37197 }.bind(this));
37198 } else if (isDefined(args.length)) {
37199 length = args.length;
37200 }
37201
37202 // If only one data, update the domain to flow from left edge of the chart
37203 if (!orgDataCount) {
37204 if (isTimeSeries) {
37205 diff = baseTarget.values.length > 1 ? baseTarget.values[baseTarget.values.length - 1].x - baseValue.x : baseValue.x - $$.getXDomain($$.data.targets)[0];
37206 } else {
37207 diff = 1;
37208 }
37209 domain = [baseValue.x - diff, baseValue.x];
37210 } else if (orgDataCount === 1 && isTimeSeries) {
37211 diff = (baseTarget.values[baseTarget.values.length - 1].x - baseValue.x) / 2;
37212 domain = [new Date(+baseValue.x - diff), new Date(+baseValue.x + diff)];
37213 }
37214 domain && $$.updateXDomain(null, !0, !0, !1, domain);
37215
37216 // Set targets
37217 $$.updateTargets($$.data.targets);
37218
37219 // Redraw with new targets
37220 $$.redraw({
37221 flow: {
37222 index: baseValue.index,
37223 length: length,
37224 duration: isValue(args.duration) ? args.duration : $$.config.transition_duration,
37225 done: args.done,
37226 orgDataCount: orgDataCount
37227 },
37228 withLegend: !0,
37229 withTransition: orgDataCount > 1,
37230 withTrimXDomain: !1,
37231 withUpdateXAxis: !0
37232 });
37233 }
37234 }
37235});
37236;// CONCATENATED MODULE: ./node_modules/d3-axis/src/identity.js
37237/* harmony default export */ function d3_axis_src_identity(x) {
37238 return x;
37239}
37240;// CONCATENATED MODULE: ./node_modules/d3-axis/src/axis.js
37241
37242
37243var axis_top = 1,
37244 right = 2,
37245 bottom = 3,
37246 left = 4,
37247 axis_epsilon = 1e-6;
37248function translateX(x) {
37249 return "translate(" + x + ",0)";
37250}
37251function translateY(y) {
37252 return "translate(0," + y + ")";
37253}
37254function axis_number(scale) {
37255 var _this = this;
37256 return function (d) {
37257 _newArrowCheck(this, _this);
37258 return +scale(d);
37259 }.bind(this);
37260}
37261function center(scale, offset) {
37262 var _this2 = this;
37263 offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;
37264 if (scale.round()) offset = Math.round(offset);
37265 return function (d) {
37266 _newArrowCheck(this, _this2);
37267 return +scale(d) + offset;
37268 }.bind(this);
37269}
37270function entering() {
37271 return !this.__axis;
37272}
37273function axis_axis(orient, scale) {
37274 var tickArguments = [],
37275 tickValues = null,
37276 tickFormat = null,
37277 tickSizeInner = 6,
37278 tickSizeOuter = 6,
37279 tickPadding = 3,
37280 offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : .5,
37281 k = orient === axis_top || orient === left ? -1 : 1,
37282 x = orient === left || orient === right ? "x" : "y",
37283 transform = orient === axis_top || orient === bottom ? translateX : translateY;
37284 function axis(context) {
37285 var values = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain() : tickValues,
37286 format = tickFormat == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : d3_axis_src_identity : tickFormat,
37287 spacing = Math.max(tickSizeInner, 0) + tickPadding,
37288 range = scale.range(),
37289 range0 = +range[0] + offset,
37290 range1 = +range[range.length - 1] + offset,
37291 position = (scale.bandwidth ? center : axis_number)(scale.copy(), offset),
37292 selection = context.selection ? context.selection() : context,
37293 path = selection.selectAll(".domain").data([null]),
37294 tick = selection.selectAll(".tick").data(values, scale).order(),
37295 tickExit = tick.exit(),
37296 tickEnter = tick.enter().append("g").attr("class", "tick"),
37297 line = tick.select("line"),
37298 text = tick.select("text");
37299 path = path.merge(path.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor"));
37300 tick = tick.merge(tickEnter);
37301 line = line.merge(tickEnter.append("line").attr("stroke", "currentColor").attr(x + "2", k * tickSizeInner));
37302 text = text.merge(tickEnter.append("text").attr("fill", "currentColor").attr(x, k * spacing).attr("dy", orient === axis_top ? "0em" : orient === bottom ? "0.71em" : "0.32em"));
37303 if (context !== selection) {
37304 path = path.transition(context);
37305 tick = tick.transition(context);
37306 line = line.transition(context);
37307 text = text.transition(context);
37308 tickExit = tickExit.transition(context).attr("opacity", axis_epsilon).attr("transform", function (d) {
37309 return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute("transform");
37310 });
37311 tickEnter.attr("opacity", axis_epsilon).attr("transform", function (d) {
37312 var p = this.parentNode.__axis;
37313 return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset);
37314 });
37315 }
37316 tickExit.remove();
37317 path.attr("d", orient === left || orient === right ? tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1 : tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1);
37318 tick.attr("opacity", 1).attr("transform", function (d) {
37319 return transform(position(d) + offset);
37320 });
37321 line.attr(x + "2", k * tickSizeInner);
37322 text.attr(x, k * spacing).text(format);
37323 selection.filter(entering).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle");
37324 selection.each(function () {
37325 this.__axis = position;
37326 });
37327 }
37328 axis.scale = function (_) {
37329 return arguments.length ? (scale = _, axis) : scale;
37330 };
37331 axis.ticks = function () {
37332 return tickArguments = Array.from(arguments), axis;
37333 };
37334 axis.tickArguments = function (_) {
37335 return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();
37336 };
37337 axis.tickValues = function (_) {
37338 return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();
37339 };
37340 axis.tickFormat = function (_) {
37341 return arguments.length ? (tickFormat = _, axis) : tickFormat;
37342 };
37343 axis.tickSize = function (_) {
37344 return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;
37345 };
37346 axis.tickSizeInner = function (_) {
37347 return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;
37348 };
37349 axis.tickSizeOuter = function (_) {
37350 return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;
37351 };
37352 axis.tickPadding = function (_) {
37353 return arguments.length ? (tickPadding = +_, axis) : tickPadding;
37354 };
37355 axis.offset = function (_) {
37356 return arguments.length ? (offset = +_, axis) : offset;
37357 };
37358 return axis;
37359}
37360function axisTop(scale) {
37361 return axis_axis(axis_top, scale);
37362}
37363function axisRight(scale) {
37364 return axis_axis(right, scale);
37365}
37366function axisBottom(scale) {
37367 return axis_axis(bottom, scale);
37368}
37369function axisLeft(scale) {
37370 return axis_axis(left, scale);
37371}
37372;// CONCATENATED MODULE: ./src/ChartInternal/Axis/AxisRendererHelper.ts
37373
37374/**
37375 * Copyright (c) 2017 ~ present NAVER Corp.
37376 * billboard.js project is licensed under the MIT license
37377 * @ignore
37378 */
37379
37380
37381var AxisRendererHelper = /*#__PURE__*/function () {
37382 function AxisRendererHelper(owner) {
37383 this.owner = void 0;
37384 this.config = void 0;
37385 this.scale = void 0;
37386 var scale = getScale(),
37387 config = owner.config,
37388 params = owner.params;
37389 this.owner = owner;
37390 this.config = config;
37391 this.scale = scale;
37392 if (config.noTransition || !params.config.transition_duration) {
37393 config.withoutTransition = !0;
37394 }
37395
37396 // set range
37397 config.range = this.scaleExtent((params.orgXScale || scale).range());
37398 }
37399
37400 /**
37401 * Compute a character dimension
37402 * @param {d3.selection} node <g class=tick> node
37403 * @returns {{w: number, h: number}}
37404 * @private
37405 */
37406 AxisRendererHelper.getSizeFor1Char = function getSizeFor1Char(node) {
37407 var _this = this,
37408 size = {
37409 w: 5.5,
37410 h: 11.5
37411 };
37412 node.empty() || node.select("text").text("0").call(function (el) {
37413 _newArrowCheck(this, _this);
37414 try {
37415 var _el$node$getBBox = el.node().getBBox(),
37416 width = _el$node$getBBox.width,
37417 height = _el$node$getBBox.height;
37418 if (width && height) {
37419 size.w = width;
37420 size.h = height;
37421 }
37422 } catch (e) {} finally {
37423 el.text("");
37424 }
37425 }.bind(this));
37426 this.getSizeFor1Char = function () {
37427 _newArrowCheck(this, _this);
37428 return size;
37429 }.bind(this);
37430 return size;
37431 }
37432
37433 /**
37434 * Get tick transform setter function
37435 * @param {string} id Axis id
37436 * @returns {Function} transfrom setter function
37437 * @private
37438 */;
37439 var _proto = AxisRendererHelper.prototype;
37440 _proto.getTickTransformSetter = function getTickTransformSetter(id) {
37441 var _this2 = this,
37442 config = this.config,
37443 fn = id === "x" ? function (value) {
37444 _newArrowCheck(this, _this2);
37445 return "translate(" + (value + config.tickOffset) + ",0)";
37446 }.bind(this) : function (value) {
37447 _newArrowCheck(this, _this2);
37448 return "translate(0," + value + ")";
37449 }.bind(this);
37450 return function (selection, scale) {
37451 var _this3 = this;
37452 _newArrowCheck(this, _this2);
37453 selection.attr("transform", function (d) {
37454 _newArrowCheck(this, _this3);
37455 return isValue(d) ? fn(Math.ceil(scale(d))) : null;
37456 }.bind(this));
37457 }.bind(this);
37458 };
37459 _proto.scaleExtent = function scaleExtent(domain) {
37460 var start = domain[0],
37461 stop = domain[domain.length - 1];
37462 return start < stop ? [start, stop] : [stop, start];
37463 };
37464 _proto.generateTicks = function generateTicks(scale, isYAxes) {
37465 var _this4 = this,
37466 tickStepSize = this.owner.params.tickStepSize,
37467 _scale$domain = scale.domain(),
37468 start = _scale$domain[0],
37469 end = _scale$domain[1],
37470 ticks = [];
37471 // When 'axis[y|y2].tick.stepSize' option is set
37472 if (isYAxes && tickStepSize) {
37473 var interval = Math.round(start);
37474 while (interval <= end) {
37475 ticks.push(interval);
37476 interval += tickStepSize;
37477 }
37478 } else if (scale.ticks) {
37479 var tickArguments = this.config.tickArguments;
37480
37481 // adjust excessive tick count show
37482 if (scale.type === "log" && !tickArguments) {
37483 // nicer symlog ticks didn't implemented yet: https://github.com/d3/d3-scale/issues/162
37484 // get ticks values from logScale
37485 var s = getScale("_log").domain([start > 0 ? start : 1, end]).range(scale.range());
37486 ticks = s.ticks();
37487 for (var cnt = end.toFixed().length; ticks.length > 15; cnt--) {
37488 ticks = s.ticks(cnt);
37489 }
37490 ticks.splice(0, 1, start);
37491 ticks.splice(ticks.length - 1, 1, end);
37492 } else {
37493 ticks = scale.ticks.apply(scale, this.config.tickArguments || []);
37494 }
37495 ticks = ticks.map(function (v) {
37496 _newArrowCheck(this, _this4);
37497 // round the tick value if is number
37498 var r = isString(v) && isNumber(v) && !isNaN(v) && Math.round(v * 10) / 10 || v;
37499 return r;
37500 }.bind(this));
37501 } else {
37502 for (var i = Math.ceil(start); i < end; i++) {
37503 ticks.push(i);
37504 }
37505 if (ticks.length > 0 && ticks[0] > 0) {
37506 ticks.unshift(ticks[0] - (ticks[1] - ticks[0]));
37507 }
37508 }
37509 return ticks;
37510 };
37511 _proto.copyScale = function copyScale() {
37512 var newScale = this.scale.copy();
37513 if (!newScale.domain().length) {
37514 newScale.domain(this.scale.domain());
37515 }
37516 newScale.type = this.scale.type;
37517 return newScale;
37518 };
37519 _proto.textFormatted = function textFormatted(v) {
37520 var tickFormat = this.config.tickFormat,
37521 value = /\d+\.\d+0{5,}\d$/.test(v) ? +(v + "").replace(/0+\d$/, "") : v,
37522 formatted = tickFormat ? tickFormat(value) : value; // to round float numbers from 'binary floating point'
37523 // https://en.wikipedia.org/wiki/Double-precision_floating-point_format
37524 // https://stackoverflow.com/questions/17849101/laymans-explanation-for-why-javascript-has-weird-floating-math-ieee-754-stand
37525 return isDefined(formatted) ? formatted : "";
37526 };
37527 _proto.transitionise = function transitionise(selection) {
37528 var config = this.config,
37529 transitionSelection = selection;
37530 if (config.withoutTransition) {
37531 transitionSelection = selection.interrupt();
37532 } else if (config.transition || !this.owner.params.noTransition) {
37533 // prevent for 'transition not found' case
37534 // https://github.com/naver/billboard.js/issues/2140
37535 try {
37536 transitionSelection = selection.transition(config.transition);
37537 } catch (e) {}
37538 }
37539 return transitionSelection;
37540 };
37541 return AxisRendererHelper;
37542}();
37543
37544;// CONCATENATED MODULE: ./src/ChartInternal/Axis/AxisRenderer.ts
37545
37546/**
37547 * Copyright (c) 2017 ~ present NAVER Corp.
37548 * billboard.js project is licensed under the MIT license
37549 * @ignore
37550 */
37551
37552
37553
37554var AxisRenderer = /*#__PURE__*/function () {
37555 function AxisRenderer(params) {
37556 if (params === void 0) {
37557 params = {};
37558 }
37559 this.helper = void 0;
37560 this.config = void 0;
37561 this.params = void 0;
37562 this.g = void 0;
37563 this.generatedTicks = void 0;
37564 var config = {
37565 innerTickSize: 6,
37566 outerTickSize: params.outerTick ? 6 : 0,
37567 orient: "bottom",
37568 range: [],
37569 tickArguments: null,
37570 tickCentered: null,
37571 tickCulling: !0,
37572 tickFormat: null,
37573 tickLength: 9,
37574 tickOffset: 0,
37575 tickPadding: 3,
37576 tickValues: null,
37577 transition: null,
37578 noTransition: params.noTransition
37579 };
37580 config.tickLength = Math.max(config.innerTickSize, 0) + config.tickPadding;
37581 this.config = config;
37582 this.params = params;
37583 this.helper = new AxisRendererHelper(this);
37584 }
37585
37586 /**
37587 * Create axis element
37588 * @param {d3.selection} g Axis selection
37589 * @private
37590 */
37591 var _proto = AxisRenderer.prototype;
37592 _proto.create = function create(g) {
37593 var ctx = this,
37594 config = ctx.config,
37595 helper = ctx.helper,
37596 params = ctx.params,
37597 scale = helper.scale,
37598 orient = config.orient,
37599 splitTickText = this.splitTickText.bind(ctx),
37600 isLeftRight = /^(left|right)$/.test(orient),
37601 isTopBottom = /^(top|bottom)$/.test(orient),
37602 tickTransform = helper.getTickTransformSetter(isTopBottom ? "x" : "y"),
37603 axisPx = tickTransform === helper.axisX ? "y" : "x",
37604 sign = /^(top|left)$/.test(orient) ? -1 : 1,
37605 rotate = params.tickTextRotate;
37606 this.config.range = scale.rangeExtent ? scale.rangeExtent() : helper.scaleExtent((params.orgXScale || scale).range());
37607 var innerTickSize = config.innerTickSize,
37608 tickLength = config.tickLength,
37609 range = config.range,
37610 id = params.id,
37611 tickTextPos = id && /^(x|y|y2)$/.test(id) ? params.config["axis_" + id + "_tick_text_position"] : {
37612 x: 0,
37613 y: 0
37614 },
37615 prefix = id === "subX" ? "subchart_axis_x" : "axis_" + id,
37616 axisShow = params.config[prefix + "_show"],
37617 tickShow = {
37618 tick: axisShow ? params.config[prefix + "_tick_show"] : !1,
37619 text: axisShow ? params.config[prefix + "_tick_text_show"] : !1
37620 },
37621 $g; // // get the axis' tick position configuration
37622 g.each(function () {
37623 var _this = this,
37624 g = src_select(this),
37625 scale0 = this.__chart__ || scale,
37626 scale1 = helper.copyScale();
37627 $g = g;
37628 this.__chart__ = scale1;
37629 config.tickOffset = params.isCategory ? Math.ceil((scale1(1) - scale1(0)) / 2) : 0;
37630
37631 // update selection - data join
37632 var path = g.selectAll(".domain").data([0]);
37633
37634 // enter + update selection
37635 path.enter().append("path").attr("class", "domain")
37636 // https://observablehq.com/@d3/d3-selection-2-0
37637 .merge(path).attr("d", function () {
37638 _newArrowCheck(this, _this);
37639 var outerTickSized = config.outerTickSize * sign;
37640 return isTopBottom ? "M" + range[0] + "," + outerTickSized + "V0H" + range[1] + "V" + outerTickSized : "M" + outerTickSized + "," + range[0] + "H0V" + range[1] + "H" + outerTickSized;
37641 }.bind(this));
37642 if (tickShow.tick || tickShow.text) {
37643 // count of tick data in array
37644 var ticks = config.tickValues || helper.generateTicks(scale1, isLeftRight);
37645
37646 // set generated ticks
37647 ctx.generatedTicks = ticks;
37648
37649 // update selection
37650 var tick = g.selectAll(".tick").data(ticks, scale1),
37651 tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick"),
37652 tickExit = tick.exit().remove(); // enter selection
37653 // enter + update selection
37654 tick = tickEnter.merge(tick);
37655 tickShow.tick && tickEnter.append("line");
37656 tickShow.text && tickEnter.append("text");
37657 var sizeFor1Char = AxisRendererHelper.getSizeFor1Char(tick),
37658 counts = [],
37659 tspan = tick.select("text").selectAll("tspan").data(function (d, index) {
37660 var _this2 = this;
37661 _newArrowCheck(this, _this);
37662 var split = params.tickMultiline ? splitTickText(d, scale1, ticks, isLeftRight, sizeFor1Char.w) : isArray(helper.textFormatted(d)) ? helper.textFormatted(d).concat() : [helper.textFormatted(d)];
37663 counts[index] = split.length;
37664 return split.map(function (splitted) {
37665 _newArrowCheck(this, _this2);
37666 return {
37667 index: index,
37668 splitted: splitted
37669 };
37670 }.bind(this));
37671 }.bind(this));
37672 tspan.exit().remove();
37673 tspan = tspan.enter().append("tspan").merge(tspan).text(function (d) {
37674 _newArrowCheck(this, _this);
37675 return d.splitted;
37676 }.bind(this));
37677
37678 // set <tspan>'s position
37679 tspan.attr("x", isTopBottom ? 0 : tickLength * sign).attr("dx", function () {
37680 _newArrowCheck(this, _this);
37681 var dx = 0;
37682 if (/(top|bottom)/.test(orient) && rotate) {
37683 dx = 8 * Math.sin(Math.PI * (rotate / 180)) * (orient === "top" ? -1 : 1);
37684 }
37685 return dx + (tickTextPos.x || 0);
37686 }.bind(this)()).attr("dy", function (d, i) {
37687 _newArrowCheck(this, _this);
37688 var dy = 0;
37689 if (orient !== "top") {
37690 dy = sizeFor1Char.h;
37691 if (i === 0) {
37692 dy = isLeftRight ? -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - 3) : tickTextPos.y === 0 ? ".71em" : 0;
37693 }
37694 }
37695 return isNumber(dy) && tickTextPos.y ? dy + tickTextPos.y : dy || ".71em";
37696 }.bind(this));
37697 var lineUpdate = tick.select("line"),
37698 textUpdate = tick.select("text");
37699 tickEnter.select("line").attr(axisPx + "2", innerTickSize * sign);
37700 tickEnter.select("text").attr(axisPx, tickLength * sign);
37701 ctx.setTickLineTextPosition(lineUpdate, textUpdate);
37702
37703 // Append <title> for tooltip display
37704 if (params.tickTitle) {
37705 var title = textUpdate.select("title");
37706 (title.empty() ? textUpdate.append("title") : title).text(function (index) {
37707 _newArrowCheck(this, _this);
37708 return params.tickTitle[index];
37709 }.bind(this));
37710 }
37711 if (scale1.bandwidth) {
37712 var x = scale1,
37713 dx = x.bandwidth() / 2;
37714 scale0 = function (d) {
37715 _newArrowCheck(this, _this);
37716 return x(d) + dx;
37717 }.bind(this);
37718 scale1 = scale0;
37719 } else if (scale0.bandwidth) {
37720 scale0 = scale1;
37721 } else {
37722 tickTransform(tickExit, scale1);
37723 }
37724
37725 // when .flow(), it should follow flow's transition config
37726 // otherwise make to use ChartInternals.$T()
37727 tick = params.owner.state.flowing ? helper.transitionise(tick) : params.owner.$T(tick);
37728 tickTransform(tickEnter, scale0);
37729 tickTransform(tick.style("opacity", null), scale1);
37730 }
37731 });
37732 this.g = $g;
37733 }
37734
37735 /**
37736 * Get generated ticks
37737 * @param {number} count Count of ticks
37738 * @returns {Array} Generated ticks
37739 * @private
37740 */;
37741 _proto.getGeneratedTicks = function getGeneratedTicks(count) {
37742 var _this$generatedTicks,
37743 len = ((_this$generatedTicks = this.generatedTicks) == null ? void 0 : _this$generatedTicks.length) - 1,
37744 res = this.generatedTicks,
37745 _this3 = this;
37746 if (len > count) {
37747 var interval = Math.round(len / count + .1);
37748 res = this.generatedTicks.map(function (v, i) {
37749 _newArrowCheck(this, _this3);
37750 return i % interval === 0 ? v : null;
37751 }.bind(this)).filter(function (v) {
37752 _newArrowCheck(this, _this3);
37753 return v !== null;
37754 }.bind(this)).splice(0, count);
37755 }
37756 return res;
37757 }
37758
37759 /**
37760 * Get tick x/y coordinate
37761 * @returns {{x: number, y: number}}
37762 * @private
37763 */;
37764 _proto.getTickXY = function getTickXY() {
37765 var config = this.config,
37766 pos = {
37767 x: 0,
37768 y: 0
37769 };
37770 if (this.params.isCategory) {
37771 pos.x = config.tickCentered ? 0 : config.tickOffset;
37772 pos.y = config.tickCentered ? config.tickOffset : 0;
37773 }
37774 return pos;
37775 }
37776
37777 /**
37778 * Get tick size
37779 * @param {object} d data object
37780 * @returns {number}
37781 * @private
37782 */;
37783 _proto.getTickSize = function getTickSize(d) {
37784 var scale = this.helper.scale,
37785 config = this.config,
37786 _config2 = config,
37787 innerTickSize = _config2.innerTickSize,
37788 range = _config2.range,
37789 tickPosition = scale(d) + (config.tickCentered ? 0 : config.tickOffset);
37790 return range[0] < tickPosition && tickPosition < range[1] ? innerTickSize : 0;
37791 }
37792
37793 /**
37794 * Set tick's line & text position
37795 * @param {d3.selection} lineUpdate Line selection
37796 * @param {d3.selection} textUpdate Text selection
37797 * @private
37798 */;
37799 _proto.setTickLineTextPosition = function setTickLineTextPosition(lineUpdate, textUpdate) {
37800 var _this4 = this,
37801 tickPos = this.getTickXY(),
37802 _this$config = this.config,
37803 innerTickSize = _this$config.innerTickSize,
37804 orient = _this$config.orient,
37805 tickLength = _this$config.tickLength,
37806 tickOffset = _this$config.tickOffset,
37807 rotate = this.params.tickTextRotate,
37808 textAnchorForText = function (r) {
37809 _newArrowCheck(this, _this4);
37810 var value = ["start", "end"];
37811 orient === "top" && value.reverse();
37812 return !r ? "middle" : value[r > 0 ? 0 : 1];
37813 }.bind(this),
37814 textTransform = function (r) {
37815 _newArrowCheck(this, _this4);
37816 return r ? "rotate(" + r + ")" : null;
37817 }.bind(this),
37818 yForText = function (r) {
37819 _newArrowCheck(this, _this4);
37820 var r2 = r / (orient === "bottom" ? 15 : 23);
37821 return r ? 11.5 - 2.5 * r2 * (r > 0 ? 1 : -1) : tickLength;
37822 }.bind(this);
37823 switch (orient) {
37824 case "bottom":
37825 lineUpdate.attr("x1", tickPos.x).attr("x2", tickPos.x).attr("y2", this.getTickSize.bind(this));
37826 textUpdate.attr("x", 0).attr("y", yForText(rotate)).style("text-anchor", textAnchorForText(rotate)).attr("transform", textTransform(rotate));
37827 break;
37828 case "top":
37829 lineUpdate.attr("x2", 0).attr("y2", -innerTickSize);
37830 textUpdate.attr("x", 0).attr("y", -yForText(rotate) * 2).style("text-anchor", textAnchorForText(rotate)).attr("transform", textTransform(rotate));
37831 break;
37832 case "left":
37833 lineUpdate.attr("x2", -innerTickSize).attr("y1", tickPos.y).attr("y2", tickPos.y);
37834 textUpdate.attr("x", -tickLength).attr("y", tickOffset).style("text-anchor", "end");
37835 break;
37836 case "right":
37837 lineUpdate.attr("x2", innerTickSize).attr("y2", 0);
37838 textUpdate.attr("x", tickLength).attr("y", 0).style("text-anchor", "start");
37839 }
37840 }
37841
37842 // this should be called only when category axis
37843 ;
37844 _proto.splitTickText = function splitTickText(d, scale, ticks, isLeftRight, charWidth) {
37845 var params = this.params,
37846 tickText = this.helper.textFormatted(d),
37847 splitted = isString(tickText) && tickText.indexOf("\n") > -1 ? tickText.split("\n") : [];
37848 if (splitted.length) {
37849 return splitted;
37850 }
37851 if (isArray(tickText)) {
37852 return tickText;
37853 }
37854 var tickWidth = params.tickWidth;
37855 if (!tickWidth || tickWidth <= 0) {
37856 tickWidth = isLeftRight ? 95 : params.isCategory ? Math.ceil(scale(ticks[1]) - scale(ticks[0])) - 12 : 110;
37857 }
37858
37859 // split given text by tick width size
37860 // eslint-disable-next-line
37861 function split(splitted, text) {
37862 var subtext, spaceIndex, textWidth;
37863 for (var i = 1; i < text.length; i++) {
37864 if (text.charAt(i) === " ") {
37865 spaceIndex = i;
37866 }
37867 subtext = text.substr(0, i + 1);
37868 textWidth = charWidth * subtext.length;
37869
37870 // if text width gets over tick width, split by space index or current index
37871 if (tickWidth < textWidth) {
37872 return split(splitted.concat(text.substr(0, spaceIndex || i)), text.slice(spaceIndex ? spaceIndex + 1 : i));
37873 }
37874 }
37875 return splitted.concat(text);
37876 }
37877 return split(splitted, tickText + "");
37878 };
37879 _proto.scale = function scale(x) {
37880 if (!arguments.length) {
37881 return this.helper.scale;
37882 }
37883 this.helper.scale = x;
37884 return this;
37885 };
37886 _proto.orient = function orient(x) {
37887 if (!arguments.length) {
37888 return this.config.orient;
37889 }
37890 this.config.orient = x in {
37891 top: 1,
37892 right: 1,
37893 bottom: 1,
37894 left: 1
37895 } ? x + "" : "bottom";
37896 return this;
37897 };
37898 _proto.tickFormat = function tickFormat(format) {
37899 var config = this.config;
37900 if (!arguments.length) {
37901 return config.tickFormat;
37902 }
37903 config.tickFormat = format;
37904 return this;
37905 };
37906 _proto.tickCentered = function tickCentered(isCentered) {
37907 var config = this.config;
37908 if (!arguments.length) {
37909 return config.tickCentered;
37910 }
37911 config.tickCentered = isCentered;
37912 return this;
37913 }
37914
37915 /**
37916 * Return tick's offset value.
37917 * The value will be set for 'category' axis type.
37918 * @returns {number}
37919 * @private
37920 */;
37921 _proto.tickOffset = function tickOffset() {
37922 return this.config.tickOffset;
37923 }
37924
37925 /**
37926 * Get tick interval count
37927 * @private
37928 * @param {number} size Total data size
37929 * @returns {number}
37930 */;
37931 _proto.tickInterval = function tickInterval(size) {
37932 var _this5 = this,
37933 _this$config2 = this.config,
37934 outerTickSize = _this$config2.outerTickSize,
37935 tickOffset = _this$config2.tickOffset,
37936 tickValues = _this$config2.tickValues,
37937 interval;
37938 if (this.params.isCategory) {
37939 interval = tickOffset * 2;
37940 } else {
37941 var length = this.g.select("path.domain").node().getTotalLength() - outerTickSize * 2;
37942 interval = length / (size || this.g.selectAll("line").size());
37943
37944 // get the interval by its values
37945 var intervalByValue = tickValues ? tickValues.map(function (v, i, arr) {
37946 _newArrowCheck(this, _this5);
37947 var next = i + 1;
37948 return next < arr.length ? this.helper.scale(arr[next]) - this.helper.scale(v) : null;
37949 }.bind(this)).filter(Boolean) : [];
37950 interval = Math.min.apply(Math, intervalByValue.concat([interval]));
37951 }
37952 return interval === Infinity ? 0 : interval;
37953 };
37954 _proto.ticks = function ticks() {
37955 for (var config = this.config, _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
37956 args[_key] = arguments[_key];
37957 }
37958 if (!args.length) {
37959 return config.tickArguments;
37960 }
37961 config.tickArguments = toArray(args);
37962 return this;
37963 };
37964 _proto.tickCulling = function tickCulling(culling) {
37965 var config = this.config;
37966 if (!arguments.length) {
37967 return config.tickCulling;
37968 }
37969 config.tickCulling = culling;
37970 return this;
37971 };
37972 _proto.tickValues = function tickValues(x) {
37973 var _this6 = this,
37974 config = this.config;
37975 if (isFunction(x)) {
37976 config.tickValues = function () {
37977 _newArrowCheck(this, _this6);
37978 return x(this.helper.scale.domain());
37979 }.bind(this);
37980 } else {
37981 if (!arguments.length) {
37982 return config.tickValues;
37983 }
37984 config.tickValues = x;
37985 }
37986 return this;
37987 };
37988 _proto.setTransition = function setTransition(t) {
37989 this.config.transition = t;
37990 return this;
37991 };
37992 return AxisRenderer;
37993}();
37994
37995;// CONCATENATED MODULE: ./src/ChartInternal/Axis/Axis.ts
37996
37997/**
37998 * Copyright (c) 2017 ~ present NAVER Corp.
37999 * billboard.js project is licensed under the MIT license
38000 */
38001
38002
38003
38004
38005
38006/* harmony default export */ var Axis = ({
38007 getAxisInstance: function getAxisInstance() {
38008 return this.axis || new Axis_Axis(this);
38009 }
38010});
38011var Axis_Axis = /*#__PURE__*/function () {
38012 function Axis(owner) {
38013 this.owner = void 0;
38014 this.x = void 0;
38015 this.subX = void 0;
38016 this.y = void 0;
38017 this.y2 = void 0;
38018 this.axesList = {};
38019 this.tick = {
38020 x: null,
38021 y: null,
38022 y2: null
38023 };
38024 this.xs = [];
38025 this.orient = {
38026 x: "bottom",
38027 y: "left",
38028 y2: "right",
38029 subX: "bottom"
38030 };
38031 this.owner = owner;
38032 this.setOrient();
38033 }
38034 var _proto = Axis.prototype;
38035 _proto.getAxisClassName = function getAxisClassName(id) {
38036 return $AXIS.axis + " " + $AXIS["axis" + capitalize(id)];
38037 };
38038 _proto.isHorizontal = function isHorizontal($$, forHorizontal) {
38039 var isRotated = $$.config.axis_rotated;
38040 return forHorizontal ? isRotated : !isRotated;
38041 };
38042 _proto.isCategorized = function isCategorized() {
38043 var _this$owner = this.owner,
38044 config = _this$owner.config,
38045 state = _this$owner.state;
38046 return config.axis_x_type.indexOf("category") >= 0 || state.hasRadar;
38047 };
38048 _proto.isCustomX = function isCustomX() {
38049 var config = this.owner.config;
38050 return !this.isTimeSeries() && (config.data_x || notEmpty(config.data_xs));
38051 };
38052 _proto.isTimeSeries = function isTimeSeries(id) {
38053 if (id === void 0) {
38054 id = "x";
38055 }
38056 return this.owner.config["axis_" + id + "_type"] === "timeseries";
38057 };
38058 _proto.isLog = function isLog(id) {
38059 if (id === void 0) {
38060 id = "x";
38061 }
38062 return this.owner.config["axis_" + id + "_type"] === "log";
38063 };
38064 _proto.isTimeSeriesY = function isTimeSeriesY() {
38065 return this.isTimeSeries("y");
38066 };
38067 _proto.getAxisType = function getAxisType(id) {
38068 if (id === void 0) {
38069 id = "x";
38070 }
38071 var type = "linear";
38072 if (this.isTimeSeries(id)) {
38073 type = this.owner.config.axis_x_localtime ? "time" : "utc";
38074 } else if (this.isLog(id)) {
38075 type = "log";
38076 }
38077 return type;
38078 };
38079 _proto.init = function init() {
38080 var _this = this,
38081 $$ = this.owner,
38082 config = $$.config,
38083 _$$$$el = $$.$el,
38084 main = _$$$$el.main,
38085 axis = _$$$$el.axis,
38086 clip = $$.state.clip,
38087 isRotated = config.axis_rotated,
38088 target = ["x", "y"];
38089 config.axis_y2_show && target.push("y2");
38090 target.forEach(function (v) {
38091 var _this2 = this;
38092 _newArrowCheck(this, _this);
38093 var classAxis = this.getAxisClassName(v),
38094 classLabel = $AXIS["axis" + v.toUpperCase() + "Label"];
38095 axis[v] = main.append("g").attr("class", classAxis).attr("clip-path", function () {
38096 _newArrowCheck(this, _this2);
38097 var res = null;
38098 if (v === "x") {
38099 res = clip.pathXAxis;
38100 } else if (v === "y") {
38101 // && config.axis_y_inner) {
38102 res = clip.pathYAxis;
38103 }
38104 return res;
38105 }.bind(this)).attr("transform", $$.getTranslate(v)).style("visibility", config["axis_" + v + "_show"] ? null : "hidden");
38106 axis[v].append("text").attr("class", classLabel).attr("transform", ["rotate(-90)", null][v === "x" ? +!isRotated : +isRotated]).style("text-anchor", function () {
38107 _newArrowCheck(this, _this2);
38108 return this.textAnchorForAxisLabel(v);
38109 }.bind(this));
38110 this.generateAxes(v);
38111 }.bind(this));
38112 }
38113
38114 /**
38115 * Set axis orient according option value
38116 * @private
38117 */;
38118 _proto.setOrient = function setOrient() {
38119 var $$ = this.owner,
38120 _$$$config = $$.config,
38121 isRotated = _$$$config.axis_rotated,
38122 yInner = _$$$config.axis_y_inner,
38123 y2Inner = _$$$config.axis_y2_inner;
38124 this.orient = {
38125 x: isRotated ? "left" : "bottom",
38126 y: isRotated ? yInner ? "top" : "bottom" : yInner ? "right" : "left",
38127 y2: isRotated ? y2Inner ? "bottom" : "top" : y2Inner ? "left" : "right",
38128 subX: isRotated ? "left" : "bottom"
38129 };
38130 }
38131
38132 /**
38133 * Generate axes
38134 * It's used when axis' axes option is set
38135 * @param {string} id Axis id
38136 * @private
38137 */;
38138 _proto.generateAxes = function generateAxes(id) {
38139 var _this3 = this,
38140 $$ = this.owner,
38141 config = $$.config,
38142 axes = [],
38143 axesConfig = config["axis_" + id + "_axes"],
38144 isRotated = config.axis_rotated,
38145 d3Axis;
38146 if (id === "x") {
38147 d3Axis = isRotated ? axisLeft : axisBottom;
38148 } else if (id === "y") {
38149 d3Axis = isRotated ? axisBottom : axisLeft;
38150 } else if (id === "y2") {
38151 d3Axis = isRotated ? axisTop : axisRight;
38152 }
38153 if (axesConfig.length) {
38154 axesConfig.forEach(function (v) {
38155 var _this4 = this;
38156 _newArrowCheck(this, _this3);
38157 var tick = v.tick || {},
38158 scale = $$.scale[id].copy();
38159 v.domain && scale.domain(v.domain);
38160 axes.push(d3Axis(scale).ticks(tick.count).tickFormat(isFunction(tick.format) ? tick.format.bind($$.api) : function (x) {
38161 _newArrowCheck(this, _this4);
38162 return x;
38163 }.bind(this)).tickValues(tick.values).tickSizeOuter(tick.outer === !1 ? 0 : 6));
38164 }.bind(this));
38165 }
38166 this.axesList[id] = axes;
38167 }
38168
38169 /**
38170 * Update axes nodes
38171 * @private
38172 */;
38173 _proto.updateAxes = function updateAxes() {
38174 var _this5 = this,
38175 $$ = this.owner,
38176 config = $$.config,
38177 main = $$.$el.main,
38178 $T = $$.$T;
38179 Object.keys(this.axesList).forEach(function (id) {
38180 var _this6 = this;
38181 _newArrowCheck(this, _this5);
38182 var axesConfig = config["axis_" + id + "_axes"],
38183 scale = $$.scale[id].copy(),
38184 range = scale.range();
38185 this.axesList[id].forEach(function (v, i) {
38186 var _this7 = this;
38187 _newArrowCheck(this, _this6);
38188 var axisRange = v.scale().range();
38189
38190 // adjust range value with the current
38191 // https://github.com/naver/billboard.js/issues/859
38192 if (!range.every(function (v, i) {
38193 _newArrowCheck(this, _this7);
38194 return v === axisRange[i];
38195 }.bind(this))) {
38196 v.scale().range(range);
38197 }
38198 var className = this.getAxisClassName(id) + "-" + (i + 1),
38199 g = main.select("." + className.replace(/\s/, "."));
38200 if (g.empty()) {
38201 g = main.append("g").attr("class", className).style("visibility", config["axis_" + id + "_show"] ? null : "hidden").call(v);
38202 } else {
38203 axesConfig[i].domain && scale.domain(axesConfig[i].domain);
38204 $T(g).call(v.scale(scale));
38205 }
38206 g.attr("transform", $$.getTranslate(id, i + 1));
38207 }.bind(this));
38208 }.bind(this));
38209 }
38210
38211 /**
38212 * Set Axis & tick values
38213 * called from: updateScales()
38214 * @param {string} id Axis id string
38215 * @param {d3Scale} scale Scale
38216 * @param {boolean} outerTick If show outer tick
38217 * @param {boolean} noTransition If with no transition
38218 * @private
38219 */;
38220 _proto.setAxis = function setAxis(id, scale, outerTick, noTransition) {
38221 var $$ = this.owner;
38222 if (id !== "subX") {
38223 this.tick[id] = this.getTickValues(id);
38224 }
38225
38226 // @ts-ignore
38227 this[id] = this.getAxis(id, scale, outerTick,
38228 // do not transit x Axis on zoom and resizing
38229 // https://github.com/naver/billboard.js/issues/1949
38230 id === "x" && ($$.scale.zoom || $$.config.subchart_show || $$.state.resizing) ? !0 : noTransition);
38231 }
38232
38233 // called from : getMaxTickWidth()
38234 ;
38235 _proto.getAxis = function getAxis(id, scale, outerTick, noTransition, noTickTextRotate) {
38236 var _this8 = this,
38237 $$ = this.owner,
38238 config = $$.config,
38239 isX = /^(x|subX)$/.test(id),
38240 type = isX ? "x" : id,
38241 isCategory = isX && this.isCategorized(),
38242 orient = this.orient[id],
38243 tickTextRotate = noTickTextRotate ? 0 : $$.getAxisTickRotate(type),
38244 tickFormat;
38245 if (isX) {
38246 tickFormat = id === "subX" ? $$.format.subXAxisTick : $$.format.xAxisTick;
38247 } else {
38248 var fn = config["axis_" + id + "_tick_format"];
38249 if (isFunction(fn)) {
38250 tickFormat = fn.bind($$.api);
38251 }
38252 }
38253 var tickValues = this.tick[type],
38254 axisParams = mergeObj({
38255 outerTick: outerTick,
38256 noTransition: noTransition,
38257 config: config,
38258 id: id,
38259 tickTextRotate: tickTextRotate,
38260 owner: $$
38261 }, isX && {
38262 isCategory: isCategory,
38263 tickMultiline: config.axis_x_tick_multiline,
38264 tickWidth: config.axis_x_tick_width,
38265 tickTitle: isCategory && config.axis_x_tick_tooltip && $$.api.categories(),
38266 orgXScale: $$.scale.x
38267 });
38268 if (!isX) {
38269 axisParams.tickStepSize = config["axis_" + type + "_tick_stepSize"];
38270 }
38271 var axis = new AxisRenderer(axisParams).scale(isX && $$.scale.zoom || scale).orient(orient);
38272 if (isX && this.isTimeSeries() && tickValues && !isFunction(tickValues)) {
38273 var _fn = parseDate.bind($$);
38274 tickValues = tickValues.map(function (v) {
38275 _newArrowCheck(this, _this8);
38276 return _fn(v);
38277 }.bind(this));
38278 } else if (!isX && this.isTimeSeriesY()) {
38279 // https://github.com/d3/d3/blob/master/CHANGES.md#time-intervals-d3-time
38280 axis.ticks(config.axis_y_tick_time_value);
38281 tickValues = null;
38282 }
38283 tickValues && axis.tickValues(tickValues);
38284
38285 // Set tick
38286 axis.tickFormat(tickFormat || !isX && $$.isStackNormalized() && function (x) {
38287 _newArrowCheck(this, _this8);
38288 return x + "%";
38289 }.bind(this));
38290 if (isCategory) {
38291 axis.tickCentered(config.axis_x_tick_centered);
38292 if (isEmpty(config.axis_x_tick_culling)) {
38293 config.axis_x_tick_culling = !1;
38294 }
38295 }
38296 var tickCount = config["axis_" + type + "_tick_count"];
38297 tickCount && axis.ticks(tickCount);
38298 return axis;
38299 };
38300 _proto.updateXAxisTickValues = function updateXAxisTickValues(targets, axis) {
38301 var $$ = this.owner,
38302 config = $$.config,
38303 fit = config.axis_x_tick_fit,
38304 count = config.axis_x_tick_count,
38305 values;
38306 if (fit || count && fit) {
38307 values = $$.mapTargetsToUniqueXs(targets);
38308
38309 // if given count is greater than the value length, then limit the count.
38310 if (this.isCategorized() && count > values.length) {
38311 count = values.length;
38312 }
38313 values = this.generateTickValues(values, count, this.isTimeSeries());
38314 }
38315 if (axis) {
38316 axis.tickValues(values);
38317 } else if (this.x) {
38318 var _this$subX;
38319 this.x.tickValues(values);
38320 (_this$subX = this.subX) == null ? void 0 : _this$subX.tickValues(values);
38321 }
38322 return values;
38323 };
38324 _proto.getId = function getId(id) {
38325 var _this$owner2 = this.owner,
38326 config = _this$owner2.config,
38327 scale = _this$owner2.scale,
38328 axis = config.data_axes[id];
38329 // when data.axes option has 'y2', but 'axis.y2.show=true' isn't set will return 'y'
38330 if (!axis || !scale[axis]) {
38331 axis = "y";
38332 }
38333 return axis;
38334 };
38335 _proto.getXAxisTickFormat = function getXAxisTickFormat(forSubchart) {
38336 var _this9 = this,
38337 $$ = this.owner,
38338 config = $$.config,
38339 format = $$.format,
38340 tickFormat = forSubchart ? config.subchart_axis_x_tick_format || config.axis_x_tick_format : config.axis_x_tick_format,
38341 isTimeSeries = this.isTimeSeries(),
38342 isCategorized = this.isCategorized(),
38343 currFormat;
38344 if (tickFormat) {
38345 if (isFunction(tickFormat)) {
38346 currFormat = tickFormat.bind($$.api);
38347 } else if (isTimeSeries) {
38348 currFormat = function (date) {
38349 _newArrowCheck(this, _this9);
38350 return date ? format.axisTime(tickFormat)(date) : "";
38351 }.bind(this);
38352 }
38353 } else {
38354 currFormat = isTimeSeries ? format.defaultAxisTime : isCategorized ? $$.categoryName : function (v) {
38355 _newArrowCheck(this, _this9);
38356 return v < 0 ? v.toFixed(0) : v;
38357 }.bind(this);
38358 }
38359 return isFunction(currFormat) ? function (v) {
38360 _newArrowCheck(this, _this9);
38361 return currFormat.apply($$, isCategorized ? [v, $$.categoryName(v)] : [v]);
38362 }.bind(this) : currFormat;
38363 };
38364 _proto.getTickValues = function getTickValues(id) {
38365 var $$ = this.owner,
38366 tickValues = $$.config["axis_" + id + "_tick_values"],
38367 axis = $$[id + "Axis"];
38368 return (isFunction(tickValues) ? tickValues.call($$.api) : tickValues) || (axis ? axis.tickValues() : undefined);
38369 };
38370 _proto.getLabelOptionByAxisId = function getLabelOptionByAxisId(id) {
38371 return this.owner.config["axis_" + id + "_label"];
38372 };
38373 _proto.getLabelText = function getLabelText(id) {
38374 var option = this.getLabelOptionByAxisId(id);
38375 return isString(option) ? option : option ? option.text : null;
38376 };
38377 _proto.setLabelText = function setLabelText(id, text) {
38378 var $$ = this.owner,
38379 config = $$.config,
38380 option = this.getLabelOptionByAxisId(id);
38381 if (isString(option)) {
38382 config["axis_" + id + "_label"] = text;
38383 } else if (option) {
38384 option.text = text;
38385 }
38386 };
38387 _proto.getLabelPosition = function getLabelPosition(id, defaultPosition) {
38388 var _this10 = this,
38389 isRotated = this.owner.config.axis_rotated,
38390 option = this.getLabelOptionByAxisId(id),
38391 position = isObjectType(option) && option.position ? option.position : defaultPosition[+!isRotated],
38392 has = function (v) {
38393 _newArrowCheck(this, _this10);
38394 return !!~position.indexOf(v);
38395 }.bind(this);
38396 return {
38397 isInner: has("inner"),
38398 isOuter: has("outer"),
38399 isLeft: has("left"),
38400 isCenter: has("center"),
38401 isRight: has("right"),
38402 isTop: has("top"),
38403 isMiddle: has("middle"),
38404 isBottom: has("bottom")
38405 };
38406 };
38407 _proto.getAxisLabelPosition = function getAxisLabelPosition(id) {
38408 return this.getLabelPosition(id, id === "x" ? ["inner-top", "inner-right"] : ["inner-right", "inner-top"]);
38409 };
38410 _proto.getLabelPositionById = function getLabelPositionById(id) {
38411 return this.getAxisLabelPosition(id);
38412 };
38413 _proto.xForAxisLabel = function xForAxisLabel(id) {
38414 var $$ = this.owner,
38415 _$$$state = $$.state,
38416 width = _$$$state.width,
38417 height = _$$$state.height,
38418 position = this.getAxisLabelPosition(id),
38419 x = position.isMiddle ? -height / 2 : 0;
38420 if (this.isHorizontal($$, id !== "x")) {
38421 x = position.isLeft ? 0 : position.isCenter ? width / 2 : width;
38422 } else if (position.isBottom) {
38423 x = -height;
38424 }
38425 return x;
38426 };
38427 _proto.dxForAxisLabel = function dxForAxisLabel(id) {
38428 var $$ = this.owner,
38429 position = this.getAxisLabelPosition(id),
38430 dx = position.isBottom ? "0.5em" : "0";
38431 if (this.isHorizontal($$, id !== "x")) {
38432 dx = position.isLeft ? "0.5em" : position.isRight ? "-0.5em" : "0";
38433 } else if (position.isTop) {
38434 dx = "-0.5em";
38435 }
38436 return dx;
38437 };
38438 _proto.textAnchorForAxisLabel = function textAnchorForAxisLabel(id) {
38439 var $$ = this.owner,
38440 position = this.getAxisLabelPosition(id),
38441 anchor = position.isMiddle ? "middle" : "end";
38442 if (this.isHorizontal($$, id !== "x")) {
38443 anchor = position.isLeft ? "start" : position.isCenter ? "middle" : "end";
38444 } else if (position.isBottom) {
38445 anchor = "start";
38446 }
38447 return anchor;
38448 };
38449 _proto.dyForAxisLabel = function dyForAxisLabel(id) {
38450 var $$ = this.owner,
38451 config = $$.config,
38452 isRotated = config.axis_rotated,
38453 isInner = this.getAxisLabelPosition(id).isInner,
38454 tickRotate = config["axis_" + id + "_tick_rotate"] ? $$.getHorizontalAxisHeight(id) : 0,
38455 maxTickWidth = this.getMaxTickWidth(id),
38456 dy;
38457 if (id === "x") {
38458 var xHeight = config.axis_x_height;
38459 if (isRotated) {
38460 dy = isInner ? "1.2em" : -25 - maxTickWidth;
38461 } else if (isInner) {
38462 dy = "-0.5em";
38463 } else if (xHeight) {
38464 dy = xHeight - 10;
38465 } else if (tickRotate) {
38466 dy = tickRotate - 10;
38467 } else {
38468 dy = "3em";
38469 }
38470 } else {
38471 dy = {
38472 y: ["-0.5em", 10, "3em", "1.2em", 10],
38473 y2: ["1.2em", -20, "-2.2em", "-0.5em", 15]
38474 }[id];
38475 if (isRotated) {
38476 if (isInner) {
38477 dy = dy[0];
38478 } else if (tickRotate) {
38479 dy = tickRotate * (id === "y2" ? -1 : 1) - dy[1];
38480 } else {
38481 dy = dy[2];
38482 }
38483 } else {
38484 dy = isInner ? dy[3] : (dy[4] + (config["axis_" + id + "_inner"] ? 0 : maxTickWidth + dy[4])) * (id === "y" ? -1 : 1);
38485 }
38486 }
38487 return dy;
38488 };
38489 _proto.getMaxTickWidth = function getMaxTickWidth(id, withoutRecompute) {
38490 var _this11 = this,
38491 $$ = this.owner,
38492 config = $$.config,
38493 current = $$.state.current,
38494 _$$$$el2 = $$.$el,
38495 svg = _$$$$el2.svg,
38496 chart = _$$$$el2.chart,
38497 currentTickMax = current.maxTickWidths[id],
38498 maxWidth = 0;
38499 if (withoutRecompute || !config["axis_" + id + "_show"] || $$.filterTargetsToShow().length === 0) {
38500 return currentTickMax.size;
38501 }
38502 if (svg) {
38503 var isYAxis = /^y2?$/.test(id),
38504 targetsToShow = $$.filterTargetsToShow($$.data.targets),
38505 _scale = $$.scale[id].copy().domain($$["get" + (isYAxis ? "Y" : "X") + "Domain"](targetsToShow, id)),
38506 domain = _scale.domain(),
38507 isDomainSame = domain[0] === domain[1] && domain.every(function (v) {
38508 _newArrowCheck(this, _this11);
38509 return v > 0;
38510 }.bind(this)),
38511 isCurrentMaxTickDomainSame = isArray(currentTickMax.domain) && currentTickMax.domain[0] === currentTickMax.domain[1] && currentTickMax.domain.every(function (v) {
38512 _newArrowCheck(this, _this11);
38513 return v > 0;
38514 }.bind(this));
38515 // do not compute if domain or currentMaxTickDomain is same
38516 if (isDomainSame || isCurrentMaxTickDomainSame) {
38517 return currentTickMax.size;
38518 } else {
38519 currentTickMax.domain = domain;
38520 }
38521
38522 // reset old max state value to prevent from new data loading
38523 if (!isYAxis) {
38524 currentTickMax.ticks.splice(0);
38525 }
38526 var axis = this.getAxis(id, _scale, !1, !1, !0),
38527 tickCount = config["axis_" + id + "_tick_count"],
38528 tickValues = config["axis_" + id + "_tick_values"];
38529 // Make to generate the final tick text to be rendered
38530 // https://github.com/naver/billboard.js/issues/920
38531 // Do not generate if 'tick values' option is given
38532 // https://github.com/naver/billboard.js/issues/1251
38533 if (!tickValues && tickCount) {
38534 axis.tickValues(this.generateTickValues(domain, tickCount, isYAxis ? this.isTimeSeriesY() : this.isTimeSeries()));
38535 }
38536 isYAxis || this.updateXAxisTickValues(targetsToShow, axis);
38537 var dummy = chart.append("svg").style("visibility", "hidden").style("position", "fixed").style("top", "0").style("left", "0");
38538 axis.create(dummy);
38539 dummy.selectAll("text").each(function (d, i) {
38540 var currentTextWidth = this.getBoundingClientRect().width;
38541 maxWidth = Math.max(maxWidth, currentTextWidth);
38542 // cache tick text width for getXAxisTickTextY2Overflow()
38543 if (!isYAxis) {
38544 currentTickMax.ticks[i] = currentTextWidth;
38545 }
38546 });
38547 dummy.remove();
38548 }
38549 if (maxWidth > 0) {
38550 currentTickMax.size = maxWidth;
38551 }
38552 return currentTickMax.size;
38553 };
38554 _proto.getXAxisTickTextY2Overflow = function getXAxisTickTextY2Overflow(defaultPadding) {
38555 var $$ = this.owner,
38556 axis = $$.axis,
38557 config = $$.config,
38558 state = $$.state,
38559 xAxisTickRotate = $$.getAxisTickRotate("x");
38560 if ((axis.isCategorized() || axis.isTimeSeries()) && config.axis_x_tick_fit && !config.axis_x_tick_culling && !config.axis_x_tick_multiline && xAxisTickRotate > 0 && xAxisTickRotate < 90) {
38561 var widthWithoutCurrentPaddingLeft = state.current.width - $$.getCurrentPaddingLeft(),
38562 maxOverflow = this.getXAxisTickMaxOverflow(xAxisTickRotate, widthWithoutCurrentPaddingLeft - defaultPadding),
38563 xAxisTickTextY2Overflow = Math.max(0, maxOverflow) + defaultPadding;
38564 // for display inconsistencies between browsers
38565
38566 return Math.min(xAxisTickTextY2Overflow, widthWithoutCurrentPaddingLeft / 2);
38567 }
38568 return 0;
38569 };
38570 _proto.getXAxisTickMaxOverflow = function getXAxisTickMaxOverflow(xAxisTickRotate, widthWithoutCurrentPaddingLeft) {
38571 var $$ = this.owner,
38572 axis = $$.axis,
38573 config = $$.config,
38574 state = $$.state,
38575 isTimeSeries = axis.isTimeSeries(),
38576 tickTextWidths = state.current.maxTickWidths.x.ticks,
38577 tickCount = tickTextWidths.length,
38578 _state$axis$x$padding = state.axis.x.padding,
38579 left = _state$axis$x$padding.left,
38580 right = _state$axis$x$padding.right,
38581 maxOverflow = 0,
38582 remaining = tickCount - (isTimeSeries && config.axis_x_tick_fit ? .5 : 0);
38583 for (var i = 0; i < tickCount; i++) {
38584 var tickIndex = i + 1,
38585 rotatedTickTextWidth = Math.cos(Math.PI * xAxisTickRotate / 180) * tickTextWidths[i],
38586 ticksBeforeTickText = tickIndex - (isTimeSeries ? 1 : .5) + left;
38587 // Skip ticks if there are no ticks before them
38588 if (ticksBeforeTickText <= 0) {
38589 continue;
38590 }
38591 var xAxisLengthWithoutTickTextWidth = widthWithoutCurrentPaddingLeft - rotatedTickTextWidth,
38592 tickLength = xAxisLengthWithoutTickTextWidth / ticksBeforeTickText,
38593 remainingTicks = remaining - tickIndex,
38594 paddingRightLength = right * tickLength,
38595 remainingTickWidth = remainingTicks * tickLength + paddingRightLength,
38596 overflow = rotatedTickTextWidth - tickLength / 2 - remainingTickWidth;
38597 maxOverflow = Math.max(maxOverflow, overflow);
38598 }
38599 var filteredTargets = $$.filterTargetsToShow($$.data.targets),
38600 tickOffset = 0;
38601 if (!isTimeSeries && config.axis_x_tick_count <= filteredTargets.length && filteredTargets[0].values.length) {
38602 var _scale2 = getScale($$.axis.getAxisType("x"), 0, widthWithoutCurrentPaddingLeft - maxOverflow).domain([left * -1, $$.getXDomainMax($$.data.targets) + 1 + right]);
38603 tickOffset = Math.ceil((_scale2(1) - _scale2(0)) / 2);
38604 }
38605 return maxOverflow + tickOffset;
38606 };
38607 _proto.updateLabels = function updateLabels(withTransition) {
38608 var _this12 = this,
38609 $$ = this.owner,
38610 main = $$.$el.main,
38611 $T = $$.$T,
38612 labels = {
38613 x: main.select("." + $AXIS.axisX + " ." + $AXIS.axisXLabel),
38614 y: main.select("." + $AXIS.axisY + " ." + $AXIS.axisYLabel),
38615 y2: main.select("." + $AXIS.axisY2 + " ." + $AXIS.axisY2Label)
38616 };
38617 Object.keys(labels).filter(function (id) {
38618 _newArrowCheck(this, _this12);
38619 return !labels[id].empty();
38620 }.bind(this)).forEach(function (v) {
38621 var _this13 = this;
38622 _newArrowCheck(this, _this12);
38623 var node = labels[v];
38624
38625 // @check $$.$T(node, withTransition)
38626 $T(node, withTransition).attr("x", function () {
38627 _newArrowCheck(this, _this13);
38628 return this.xForAxisLabel(v);
38629 }.bind(this)).attr("dx", function () {
38630 _newArrowCheck(this, _this13);
38631 return this.dxForAxisLabel(v);
38632 }.bind(this)).attr("dy", function () {
38633 _newArrowCheck(this, _this13);
38634 return this.dyForAxisLabel(v);
38635 }.bind(this)).text(function () {
38636 _newArrowCheck(this, _this13);
38637 return this.getLabelText(v);
38638 }.bind(this));
38639 }.bind(this));
38640 }
38641
38642 /**
38643 * Get axis padding value
38644 * @param {number|object} padding Padding object
38645 * @param {string} key Key string of padding
38646 * @param {Date|number} defaultValue Default value
38647 * @param {number} domainLength Domain length
38648 * @returns {number} Padding value in scale
38649 * @private
38650 */;
38651 _proto.getPadding = function getPadding(padding, key, defaultValue, domainLength) {
38652 var p = isNumber(padding) ? padding : padding[key];
38653 if (!isValue(p)) {
38654 return defaultValue;
38655 }
38656 return this.owner.convertPixelToScale(/(bottom|top)/.test(key) ? "y" : "x", p, domainLength);
38657 };
38658 _proto.generateTickValues = function generateTickValues(values, tickCount, forTimeSeries) {
38659 var _this14 = this,
38660 tickValues = values;
38661 if (tickCount) {
38662 var targetCount = isFunction(tickCount) ? tickCount() : tickCount;
38663
38664 // compute ticks according to tickCount
38665 if (targetCount === 1) {
38666 tickValues = [values[0]];
38667 } else if (targetCount === 2) {
38668 tickValues = [values[0], values[values.length - 1]];
38669 } else if (targetCount > 2) {
38670 var isCategorized = this.isCategorized(),
38671 count = targetCount - 2,
38672 start = values[0],
38673 end = values[values.length - 1],
38674 tickValue;
38675 // re-construct unique values
38676 tickValues = [start];
38677 for (var i = 0; i < count; i++) {
38678 tickValue = +start + (end - start) / (count + 1) * (i + 1);
38679 tickValues.push(forTimeSeries ? new Date(tickValue) : isCategorized ? Math.round(tickValue) : tickValue);
38680 }
38681 tickValues.push(end);
38682 }
38683 }
38684 if (!forTimeSeries) {
38685 tickValues = tickValues.sort(function (a, b) {
38686 _newArrowCheck(this, _this14);
38687 return a - b;
38688 }.bind(this));
38689 }
38690 return tickValues;
38691 };
38692 _proto.generateTransitions = function generateTransitions(withTransition) {
38693 var _this15 = this,
38694 $$ = this.owner,
38695 axis = $$.$el.axis,
38696 $T = $$.$T,
38697 _map = ["x", "y", "y2", "subX"].map(function (v) {
38698 _newArrowCheck(this, _this15);
38699 return $T(axis[v], withTransition);
38700 }.bind(this)),
38701 axisX = _map[0],
38702 axisY = _map[1],
38703 axisY2 = _map[2],
38704 axisSubX = _map[3];
38705 return {
38706 axisX: axisX,
38707 axisY: axisY,
38708 axisY2: axisY2,
38709 axisSubX: axisSubX
38710 };
38711 };
38712 _proto.redraw = function redraw(transitions, isHidden, isInit) {
38713 var _this16 = this,
38714 $$ = this.owner,
38715 config = $$.config,
38716 $el = $$.$el,
38717 opacity = isHidden ? "0" : null;
38718 ["x", "y", "y2", "subX"].forEach(function (id) {
38719 _newArrowCheck(this, _this16);
38720 var axis = this[id],
38721 $axis = $el.axis[id];
38722 if (axis && $axis) {
38723 if (!isInit && !config.transition_duration) {
38724 axis.config.withoutTransition = !0;
38725 }
38726 $axis.style("opacity", opacity);
38727 axis.create(transitions["axis" + capitalize(id)]);
38728 }
38729 }.bind(this));
38730 this.updateAxes();
38731 }
38732
38733 /**
38734 * Redraw axis
38735 * @param {Array} targetsToShow targets data to be shown
38736 * @param {object} wth option object
38737 * @param {d3.Transition} transitions Transition object
38738 * @param {object} flow flow object
38739 * @param {boolean} isInit called from initialization
38740 * @private
38741 */;
38742 _proto.redrawAxis = function redrawAxis(targetsToShow, wth, transitions, flow, isInit) {
38743 var _this17 = this,
38744 $$ = this.owner,
38745 config = $$.config,
38746 scale = $$.scale,
38747 $el = $$.$el,
38748 hasZoom = !!scale.zoom,
38749 xDomainForZoom;
38750 if (!hasZoom && this.isCategorized() && targetsToShow.length === 0) {
38751 scale.x.domain([0, $el.axis.x.selectAll(".tick").size()]);
38752 }
38753 if (scale.x && targetsToShow.length) {
38754 hasZoom || $$.updateXDomain(targetsToShow, wth.UpdateXDomain, wth.UpdateOrgXDomain, wth.TrimXDomain);
38755 if (!config.axis_x_tick_values) {
38756 this.updateXAxisTickValues(targetsToShow);
38757 }
38758 } else if (this.x) {
38759 var _this$subX2;
38760 this.x.tickValues([]);
38761 (_this$subX2 = this.subX) == null ? void 0 : _this$subX2.tickValues([]);
38762 }
38763 if (config.zoom_rescale && !flow) {
38764 xDomainForZoom = scale.x.orgDomain();
38765 }
38766 ["y", "y2"].forEach(function (key) {
38767 var _this18 = this;
38768 _newArrowCheck(this, _this17);
38769 var prefix = "axis_" + key + "_",
38770 axisScale = scale[key];
38771 if (axisScale) {
38772 var tickValues = config[prefix + "tick_values"],
38773 tickCount = config[prefix + "tick_count"];
38774 axisScale.domain($$.getYDomain(targetsToShow, key, xDomainForZoom));
38775 if (!tickValues && tickCount) {
38776 var axis = $$.axis[key],
38777 domain = axisScale.domain();
38778 axis.tickValues(this.generateTickValues(domain, domain.every(function (v) {
38779 _newArrowCheck(this, _this18);
38780 return v === 0;
38781 }.bind(this)) ? 1 : tickCount, this.isTimeSeriesY()));
38782 }
38783 }
38784 }.bind(this));
38785
38786 // axes
38787 this.redraw(transitions, $$.hasArcType(), isInit);
38788
38789 // Update axis label
38790 this.updateLabels(wth.Transition);
38791
38792 // show/hide if manual culling needed
38793 if ((wth.UpdateXDomain || wth.UpdateXAxis || wth.Y) && targetsToShow.length) {
38794 this.setCulling();
38795 }
38796
38797 // Update sub domain
38798 if (wth.Y) {
38799 var _scale$subY, _scale$subY2;
38800 (_scale$subY = scale.subY) == null ? void 0 : _scale$subY.domain($$.getYDomain(targetsToShow, "y"));
38801 (_scale$subY2 = scale.subY2) == null ? void 0 : _scale$subY2.domain($$.getYDomain(targetsToShow, "y2"));
38802 }
38803 }
38804
38805 /**
38806 * Set manual culling
38807 * @private
38808 */;
38809 _proto.setCulling = function setCulling() {
38810 var _this19 = this,
38811 $$ = this.owner,
38812 config = $$.config,
38813 _$$$state2 = $$.state,
38814 clip = _$$$state2.clip,
38815 current = _$$$state2.current,
38816 $el = $$.$el;
38817 ["subX", "x", "y", "y2"].forEach(function (type) {
38818 _newArrowCheck(this, _this19);
38819 var axis = $el.axis[type],
38820 id = type === "subX" ? "x" : type,
38821 cullingOptionPrefix = "axis_" + id + "_tick_culling",
38822 toCull = config[cullingOptionPrefix]; // subchart x axis should be aligned with x axis culling
38823 if (axis && toCull) {
38824 var tickNodes = axis.selectAll(".tick"),
38825 tickValues = sortValue(tickNodes.data()),
38826 tickSize = tickValues.length,
38827 cullingMax = config[cullingOptionPrefix + "_max"],
38828 lines = config[cullingOptionPrefix + "_lines"],
38829 intervalForCulling;
38830 if (tickSize) {
38831 for (var i = 1; i < tickSize; i++) {
38832 if (tickSize / i < cullingMax) {
38833 intervalForCulling = i;
38834 break;
38835 }
38836 }
38837 tickNodes.each(function (d) {
38838 var node = lines ? this.querySelector("text") : this;
38839 if (node) {
38840 node.style.display = tickValues.indexOf(d) % intervalForCulling ? "none" : null;
38841 }
38842 });
38843 } else {
38844 tickNodes.style("display", null);
38845 }
38846
38847 // set/unset x_axis_tick_clippath
38848 if (type === "x") {
38849 var clipPath = current.maxTickWidths.x.clipPath ? clip.pathXAxisTickTexts : null;
38850 $el.svg.selectAll("." + $AXIS.axisX + " .tick text").attr("clip-path", clipPath);
38851 }
38852 }
38853 }.bind(this));
38854 };
38855 return Axis;
38856}();
38857;// CONCATENATED MODULE: ./src/ChartInternal/interactions/eventrect.ts
38858
38859/**
38860 * Copyright (c) 2017 ~ present NAVER Corp.
38861 * billboard.js project is licensed under the MIT license
38862 */
38863
38864
38865/* harmony default export */ var eventrect = ({
38866 /**
38867 * Initialize the area that detects the event.
38868 * Add a container for the zone that detects the event.
38869 * @private
38870 */
38871 initEventRect: function initEventRect() {
38872 var $$ = this;
38873 $$.$el.main.select("." + $COMMON.chart).append("g").attr("class", $EVENT.eventRects).style("fill-opacity", "0");
38874 },
38875 /**
38876 * Redraws the area that detects the event.
38877 * @private
38878 */
38879 redrawEventRect: function redrawEventRect() {
38880 var $$ = this,
38881 config = $$.config,
38882 state = $$.state,
38883 $el = $$.$el,
38884 isMultipleX = $$.isMultipleX();
38885 if ($el.eventRect) {
38886 $$.updateEventRect($el.eventRect, !0);
38887 } else {
38888 var eventRects = $$.$el.main.select("." + $EVENT.eventRects).style("cursor", config.zoom_enabled && config.zoom_type !== "drag" ? config.axis_rotated ? "ns-resize" : "ew-resize" : null).classed($EVENT.eventRectsMultiple, isMultipleX).classed($EVENT.eventRectsSingle, !isMultipleX),
38889 eventRectUpdate = eventRects.selectAll("." + $EVENT.eventRect).data([0]).enter().append("rect"); // append event <rect>
38890 $$.updateEventRect(eventRectUpdate);
38891
38892 // bind event to <rect> element
38893 isMultipleX ? $$.generateEventRectsForMultipleXs(eventRectUpdate) : $$.generateEventRectsForSingleX(eventRectUpdate);
38894
38895 // bind draggable selection
38896 eventRectUpdate.call($$.getDraggableSelection());
38897 $el.eventRect = eventRectUpdate;
38898 if ($$.state.inputType === "touch" && !$el.svg.on("touchstart.eventRect") && !$$.hasArcType()) {
38899 $$.bindTouchOnEventRect(isMultipleX);
38900 }
38901 }
38902 if (!isMultipleX) {
38903 // Set data and update eventReceiver.data
38904 var xAxisTickValues = $$.getMaxDataCountTarget();
38905
38906 // update data's index value to be alinged with the x Axis
38907 $$.updateDataIndexByX(xAxisTickValues);
38908 $$.updateXs(xAxisTickValues);
38909 $$.updatePointClass == null ? void 0 : $$.updatePointClass(!0);
38910 state.eventReceiver.data = xAxisTickValues;
38911 }
38912 $$.updateEventRectData();
38913 },
38914 bindTouchOnEventRect: function bindTouchOnEventRect(isMultipleX) {
38915 var _this = this,
38916 $$ = this,
38917 config = $$.config,
38918 state = $$.state,
38919 _$$$$el = $$.$el,
38920 eventRect = _$$$$el.eventRect,
38921 svg = _$$$$el.svg,
38922 selectRect = function (context) {
38923 _newArrowCheck(this, _this);
38924 if (isMultipleX) {
38925 $$.selectRectForMultipleXs(context);
38926 } else {
38927 var index = $$.getDataIndexFromEvent(state.event);
38928 $$.callOverOutForTouch(index);
38929 index === -1 ? $$.unselectRect() : $$.selectRectForSingle(context, eventRect, index);
38930 }
38931 }.bind(this),
38932 unselectRect = function () {
38933 _newArrowCheck(this, _this);
38934 $$.unselectRect();
38935 $$.callOverOutForTouch();
38936 }.bind(this),
38937 preventDefault = config.interaction_inputType_touch.preventDefault,
38938 isPrevented = isboolean(preventDefault) && preventDefault || !1,
38939 preventThreshold = !isNaN(preventDefault) && preventDefault || null,
38940 startPx,
38941 preventEvent = function (event) {
38942 _newArrowCheck(this, _this);
38943 var eventType = event.type,
38944 touch = event.changedTouches[0],
38945 currentXY = touch["client" + (config.axis_rotated ? "Y" : "X")];
38946 // prevent document scrolling
38947 if (eventType === "touchstart") {
38948 if (isPrevented) {
38949 event.preventDefault();
38950 } else if (preventThreshold !== null) {
38951 startPx = currentXY;
38952 }
38953 } else if (eventType === "touchmove") {
38954 if (isPrevented || startPx === !0 || preventThreshold !== null && Math.abs(startPx - currentXY) >= preventThreshold) {
38955 // once prevented, keep prevented during whole 'touchmove' context
38956 startPx = !0;
38957 event.preventDefault();
38958 }
38959 }
38960 }.bind(this);
38961 // bind touch events
38962 eventRect.on("touchstart", function (event) {
38963 _newArrowCheck(this, _this);
38964 state.event = event;
38965 $$.updateEventRect();
38966 }.bind(this)).on("touchstart.eventRect touchmove.eventRect", function (event) {
38967 _newArrowCheck(this, _this);
38968 state.event = event;
38969 if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
38970 // if touch points are > 1, means doing zooming interaction. In this case do not execute tooltip codes.
38971 if (state.dragging || state.flowing || $$.hasArcType() || event.touches.length > 1) {
38972 return;
38973 }
38974 preventEvent(event);
38975 selectRect(eventRect.node());
38976 } else {
38977 unselectRect();
38978 }
38979 }.bind(this), !0).on("touchend.eventRect", function (event) {
38980 _newArrowCheck(this, _this);
38981 state.event = event;
38982 if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
38983 if ($$.hasArcType() || !$$.toggleShape || state.cancelClick) {
38984 state.cancelClick && (state.cancelClick = !1);
38985 }
38986 }
38987 }.bind(this), !0);
38988 svg.on("touchstart", function (event) {
38989 _newArrowCheck(this, _this);
38990 state.event = event;
38991 var target = event.target;
38992 if (target && target !== eventRect.node()) {
38993 unselectRect();
38994 }
38995 }.bind(this));
38996 },
38997 /**
38998 * Update event rect size
38999 * @param {d3Selection} eventRect Event <rect> element
39000 * @param {boolean} force Force to update
39001 * @private
39002 */
39003 updateEventRect: function updateEventRect(eventRect, force) {
39004 var _this2 = this;
39005 if (force === void 0) {
39006 force = !1;
39007 }
39008 var $$ = this,
39009 state = $$.state,
39010 $el = $$.$el,
39011 _state = state,
39012 eventReceiver = _state.eventReceiver,
39013 width = _state.width,
39014 height = _state.height,
39015 rendered = _state.rendered,
39016 resizing = _state.resizing,
39017 rectElement = eventRect || $el.eventRect,
39018 updateClientRect = function () {
39019 _newArrowCheck(this, _this2);
39020 eventReceiver && (eventReceiver.rect = rectElement.node().getBoundingClientRect());
39021 }.bind(this);
39022 if (!rendered || resizing || force) {
39023 rectElement.attr("x", 0).attr("y", 0).attr("width", width).attr("height", height);
39024
39025 // only for init
39026 if (!rendered) {
39027 rectElement.attr("class", $EVENT.eventRect);
39028 }
39029 }
39030 updateClientRect();
39031 },
39032 /**
39033 * Updates the location and size of the eventRect.
39034 * @private
39035 */
39036 updateEventRectData: function updateEventRectData() {
39037 var _this3 = this,
39038 $$ = this,
39039 config = $$.config,
39040 scale = $$.scale,
39041 state = $$.state,
39042 xScale = scale.zoom || scale.x,
39043 isRotated = config.axis_rotated,
39044 x,
39045 y,
39046 w,
39047 h;
39048 if ($$.isMultipleX()) {
39049 // TODO: rotated not supported yet
39050 x = 0;
39051 y = 0;
39052 w = state.width;
39053 h = state.height;
39054 } else {
39055 var rectW, rectX;
39056 if ($$.axis.isCategorized()) {
39057 rectW = $$.getEventRectWidth();
39058 rectX = function (d) {
39059 _newArrowCheck(this, _this3);
39060 return xScale(d.x) - rectW / 2;
39061 }.bind(this);
39062 } else {
39063 var getPrevNextX = function (_ref) {
39064 var index = _ref.index;
39065 _newArrowCheck(this, _this3);
39066 return {
39067 prev: $$.getPrevX(index),
39068 next: $$.getNextX(index)
39069 };
39070 }.bind(this);
39071 rectW = function (d) {
39072 var _this4 = this;
39073 _newArrowCheck(this, _this3);
39074 var x = getPrevNextX(d),
39075 xDomain = xScale.domain(),
39076 val;
39077 // if there this is a single data point make the eventRect full width (or height)
39078 if (x.prev === null && x.next === null) {
39079 val = isRotated ? state.height : state.width;
39080 } else if (x.prev === null) {
39081 val = (xScale(x.next) + xScale(d.x)) / 2;
39082 } else if (x.next === null) {
39083 val = xScale(xDomain[1]) - (xScale(x.prev) + xScale(d.x)) / 2;
39084 } else {
39085 Object.keys(x).forEach(function (key, i) {
39086 var _x$key;
39087 _newArrowCheck(this, _this4);
39088 x[key] = (_x$key = x[key]) != null ? _x$key : xDomain[i];
39089 }.bind(this));
39090 val = Math.max(0, (xScale(x.next) - xScale(x.prev)) / 2);
39091 }
39092 return val;
39093 }.bind(this);
39094 rectX = function (d) {
39095 _newArrowCheck(this, _this3);
39096 var x = getPrevNextX(d),
39097 val;
39098 // if there this is a single data point position the eventRect at 0
39099 if (x.prev === null && x.next === null) {
39100 val = 0;
39101 } else if (x.prev === null) {
39102 val = xScale(xScale.domain()[0]);
39103 } else {
39104 val = (xScale(d.x) + xScale(x.prev)) / 2;
39105 }
39106 return val;
39107 }.bind(this);
39108 }
39109 x = isRotated ? 0 : rectX;
39110 y = isRotated ? rectX : 0;
39111 w = isRotated ? state.width : rectW;
39112 h = isRotated ? rectW : state.height;
39113 }
39114 var eventReceiver = state.eventReceiver,
39115 call = function (fn, v) {
39116 _newArrowCheck(this, _this3);
39117 return isFunction(fn) ? fn(v) : fn;
39118 }.bind(this);
39119 // reset for possible remains coords data before the data loading
39120 eventReceiver.coords.splice(eventReceiver.data.length);
39121 eventReceiver.data.forEach(function (d, i) {
39122 _newArrowCheck(this, _this3);
39123 eventReceiver.coords[i] = {
39124 x: call(x, d),
39125 y: call(y, d),
39126 w: call(w, d),
39127 h: call(h, d)
39128 };
39129 }.bind(this));
39130 },
39131 selectRectForMultipleXs: function selectRectForMultipleXs(context) {
39132 var _this5 = this,
39133 $$ = this,
39134 config = $$.config,
39135 state = $$.state,
39136 targetsToShow = $$.filterTargetsToShow($$.data.targets);
39137 // do nothing when dragging
39138 if (state.dragging || $$.hasArcType(targetsToShow)) {
39139 return;
39140 }
39141 var mouse = getPointer(state.event, context),
39142 closest = $$.findClosestFromTargets(targetsToShow, mouse);
39143 if (state.mouseover && (!closest || closest.id !== state.mouseover.id)) {
39144 config.data_onout.call($$.api, state.mouseover);
39145 state.mouseover = undefined;
39146 }
39147 if (!closest) {
39148 $$.unselectRect();
39149 return;
39150 }
39151 var sameXData = $$.isBubbleType(closest) || $$.isScatterType(closest) || !config.tooltip_grouped ? [closest] : $$.filterByX(targetsToShow, closest.x),
39152 selectedData = sameXData.map(function (d) {
39153 _newArrowCheck(this, _this5);
39154 return $$.addName(d);
39155 }.bind(this)); // show tooltip when cursor is close to some point
39156 $$.showTooltip(selectedData, context);
39157
39158 // expand points
39159 $$.setExpand(closest.index, closest.id, !0);
39160
39161 // Show xgrid focus line
39162 $$.showGridFocus(selectedData);
39163
39164 // Show cursor as pointer if point is close to mouse position
39165 if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
39166 $$.$el.svg.select("." + $EVENT.eventRect).style("cursor", "pointer");
39167 if (!state.mouseover) {
39168 config.data_onover.call($$.api, closest);
39169 state.mouseover = closest;
39170 }
39171 }
39172 },
39173 /**
39174 * Unselect EventRect.
39175 * @private
39176 */
39177 unselectRect: function unselectRect() {
39178 var $$ = this,
39179 config = $$.config,
39180 _$$$$el2 = $$.$el,
39181 circle = _$$$$el2.circle,
39182 tooltip = _$$$$el2.tooltip;
39183 $$.$el.svg.select("." + $EVENT.eventRect).style("cursor", null);
39184 $$.hideGridFocus();
39185 if (tooltip) {
39186 $$.hideTooltip();
39187 $$._handleLinkedCharts(!1);
39188 }
39189 circle && !config.point_focus_only && $$.unexpandCircles();
39190 $$.expandBarTypeShapes(!1);
39191 },
39192 /**
39193 * Create eventRect for each data on the x-axis.
39194 * Register touch and drag events.
39195 * @param {object} eventRectEnter d3.select($EVENT.eventRects) object.
39196 * @returns {object} d3.select($EVENT.eventRects) object.
39197 * @private
39198 */
39199 generateEventRectsForSingleX: function generateEventRectsForSingleX(eventRectEnter) {
39200 var _this6 = this,
39201 $$ = this,
39202 config = $$.config,
39203 state = $$.state,
39204 eventReceiver = state.eventReceiver,
39205 rect = eventRectEnter.style("cursor", config.data_selection_enabled && config.data_selection_grouped ? "pointer" : null).on("click", function (event) {
39206 state.event = event;
39207 var currentIdx = eventReceiver.currentIdx,
39208 data = eventReceiver.data,
39209 d = data[currentIdx === -1 ? $$.getDataIndexFromEvent(event) : currentIdx];
39210 $$.clickHandlerForSingleX.bind(this)(d, $$);
39211 });
39212 if (state.inputType === "mouse") {
39213 var getData = function (event) {
39214 _newArrowCheck(this, _this6);
39215 var index = event ? $$.getDataIndexFromEvent(event) : eventReceiver.currentIdx;
39216 return index > -1 ? eventReceiver.data[index] : null;
39217 }.bind(this);
39218 rect.on("mouseover", function (event) {
39219 _newArrowCheck(this, _this6);
39220 state.event = event;
39221 $$.updateEventRect();
39222 }.bind(this)).on("mousemove", function (event) {
39223 var d = getData(event);
39224 state.event = event;
39225 if (!d) {
39226 return;
39227 }
39228 var index = d.index,
39229 stepType = config.line_step_type;
39230 // tooltip position match for step-before & step-after
39231 if (config.line_step_tooltipMatch && $$.hasType("step") && /^step\-(before|after)$/.test(stepType)) {
39232 var scale = $$.scale.zoom || $$.scale.x,
39233 xs = $$.axis.xs[index],
39234 inverted = scale.invert(getPointer(event, this)[0]);
39235 if (stepType === "step-after" && inverted < xs) {
39236 index -= 1;
39237 } else if (stepType === "step-before" && inverted > xs) {
39238 index += 1;
39239 }
39240 }
39241
39242 // do nothing while dragging/flowing
39243 if (state.dragging || state.flowing || $$.hasArcType() || config.tooltip_grouped && index === eventReceiver.currentIdx) {
39244 return;
39245 }
39246 if (index !== eventReceiver.currentIdx) {
39247 $$.setOverOut(!1, eventReceiver.currentIdx);
39248 eventReceiver.currentIdx = index;
39249 }
39250 index === -1 ? $$.unselectRect() : $$.selectRectForSingle(this, rect, index);
39251
39252 // As of individual data point(or <path>) element can't bind mouseover/out event
39253 // to determine current interacting element, so use 'mousemove' event instead.
39254 $$.setOverOut(index !== -1, index);
39255 }).on("mouseout", function (event) {
39256 _newArrowCheck(this, _this6);
39257 state.event = event;
39258
39259 // chart is destroyed
39260 if (!config || $$.hasArcType() || eventReceiver.currentIdx === -1) {
39261 return;
39262 }
39263 $$.unselectRect();
39264 $$.setOverOut(!1, eventReceiver.currentIdx);
39265
39266 // reset the event current index
39267 eventReceiver.currentIdx = -1;
39268 }.bind(this));
39269 }
39270 return rect;
39271 },
39272 clickHandlerForSingleX: function clickHandlerForSingleX(d, ctx) {
39273 var $$ = ctx,
39274 config = $$.config,
39275 state = $$.state,
39276 main = $$.$el.main;
39277 if (!d || $$.hasArcType() || state.cancelClick) {
39278 state.cancelClick && (state.cancelClick = !1);
39279 return;
39280 }
39281 var index = d.index;
39282 main.selectAll("." + $SHAPE.shape + "-" + index).each(function (d2) {
39283 if (config.data_selection_grouped || $$.isWithinShape(this, d2)) {
39284 $$.toggleShape == null ? void 0 : $$.toggleShape(this, d2, index);
39285 config.data_onclick.bind($$.api)(d2, this);
39286 }
39287 });
39288 },
39289 /**
39290 * Create an eventRect,
39291 * Register touch and drag events.
39292 * @param {object} eventRectEnter d3.select($EVENT.eventRects) object.
39293 * @private
39294 */
39295 generateEventRectsForMultipleXs: function generateEventRectsForMultipleXs(eventRectEnter) {
39296 var _this7 = this,
39297 $$ = this,
39298 state = $$.state;
39299 eventRectEnter.on("click", function (event) {
39300 state.event = event;
39301 $$.clickHandlerForMultipleXS.bind(this)($$);
39302 });
39303 if (state.inputType === "mouse") {
39304 eventRectEnter.on("mouseover mousemove", function (event) {
39305 state.event = event;
39306 $$.selectRectForMultipleXs(this);
39307 }).on("mouseout", function (event) {
39308 _newArrowCheck(this, _this7);
39309 state.event = event;
39310
39311 // chart is destroyed
39312 if (!$$.config || $$.hasArcType()) {
39313 return;
39314 }
39315 $$.unselectRect();
39316 }.bind(this));
39317 }
39318 },
39319 clickHandlerForMultipleXS: function clickHandlerForMultipleXS(ctx) {
39320 var $$ = ctx,
39321 config = $$.config,
39322 state = $$.state,
39323 targetsToShow = $$.filterTargetsToShow($$.data.targets);
39324 if ($$.hasArcType(targetsToShow)) {
39325 return;
39326 }
39327 var mouse = getPointer(state.event, this),
39328 closest = $$.findClosestFromTargets(targetsToShow, mouse);
39329 if (!closest) {
39330 return;
39331 }
39332
39333 // select if selection enabled
39334 if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
39335 $$.$el.main.selectAll("." + $SHAPE.shapes + $$.getTargetSelectorSuffix(closest.id)).selectAll("." + $SHAPE.shape + "-" + closest.index).each(function () {
39336 if (config.data_selection_grouped || $$.isWithinShape(this, closest)) {
39337 $$.toggleShape == null ? void 0 : $$.toggleShape(this, closest, closest.index);
39338 config.data_onclick.bind($$.api)(closest, this);
39339 }
39340 });
39341 }
39342 }
39343});
39344;// CONCATENATED MODULE: ./node_modules/d3-ease/src/linear.js
39345
39346var linear_this = undefined;
39347var src_linear_linear = function (t) {
39348 _newArrowCheck(this, linear_this);
39349 return +t;
39350}.bind(undefined);
39351;// CONCATENATED MODULE: ./src/ChartInternal/interactions/flow.ts
39352
39353/**
39354 * Copyright (c) 2017 ~ present NAVER Corp.
39355 * billboard.js project is licensed under the MIT license
39356 */
39357
39358
39359
39360
39361/* harmony default export */ var interactions_flow = ({
39362 /**
39363 * Generate flow
39364 * @param {object} args option object
39365 * @returns {Function}
39366 * @private
39367 */
39368 generateFlow: function generateFlow(args) {
39369 var $$ = this,
39370 data = $$.data,
39371 state = $$.state,
39372 $el = $$.$el;
39373 return function () {
39374 var _this = this,
39375 flowLength = args.flow.length;
39376 // set flag
39377 state.flowing = !0;
39378
39379 // remove head data after rendered
39380 data.targets.forEach(function (d) {
39381 _newArrowCheck(this, _this);
39382 d.values.splice(0, flowLength);
39383 }.bind(this));
39384
39385 // update elements related to x scale
39386 if ($$.updateXGrid) {
39387 $$.updateXGrid(!0);
39388 }
39389
39390 // target elements
39391 var elements = {};
39392 ["axis.x", "grid.x", "gridLines.x", "region.list", "text", "bar", "line", "area", "circle"].forEach(function (v) {
39393 var _node;
39394 _newArrowCheck(this, _this);
39395 var name = v.split("."),
39396 node = $el[name[0]];
39397 if (node && name.length > 1) {
39398 node = node[name[1]];
39399 }
39400 if ((_node = node) != null && _node.size()) {
39401 elements[v] = node;
39402 }
39403 }.bind(this));
39404 $$.hideGridFocus();
39405 $$.setFlowList(elements, args);
39406 };
39407 },
39408 /**
39409 * Set flow list
39410 * @param {object} elements Target elements
39411 * @param {object} args option object
39412 * @private
39413 */
39414 setFlowList: function setFlowList(elements, args) {
39415 var _this2 = this,
39416 $$ = this,
39417 flow = args.flow,
39418 targets = args.targets,
39419 _flow = flow,
39420 _flow$duration = _flow.duration,
39421 duration = _flow$duration === void 0 ? args.duration : _flow$duration,
39422 flowIndex = _flow.index,
39423 flowLength = _flow.length,
39424 orgDataCount = _flow.orgDataCount,
39425 transform = $$.getFlowTransform(targets, orgDataCount, flowIndex, flowLength),
39426 wait = generateWait(),
39427 n;
39428 wait.add(Object.keys(elements).map(function (v) {
39429 var _this3 = this;
39430 _newArrowCheck(this, _this2);
39431 n = elements[v].transition().ease(src_linear_linear).duration(duration);
39432 if (v === "axis.x") {
39433 n = n.call(function (g) {
39434 _newArrowCheck(this, _this3);
39435 $$.axis.x.setTransition(g).create(g);
39436 }.bind(this));
39437 } else if (v === "region.list") {
39438 n = n.filter($$.isRegionOnX).attr("transform", transform);
39439 } else {
39440 n = n.attr("transform", transform);
39441 }
39442 return n;
39443 }.bind(this)));
39444 n.call(wait, function () {
39445 _newArrowCheck(this, _this2);
39446 $$.cleanUpFlow(elements, args);
39447 }.bind(this));
39448 },
39449 /**
39450 * Clean up flow
39451 * @param {object} elements Target elements
39452 * @param {object} args option object
39453 * @private
39454 */
39455 cleanUpFlow: function cleanUpFlow(elements, args) {
39456 var _this4 = this,
39457 $$ = this,
39458 config = $$.config,
39459 state = $$.state,
39460 svg = $$.$el.svg,
39461 isRotated = config.axis_rotated,
39462 flow = args.flow,
39463 shape = args.shape,
39464 xv = args.xv,
39465 _shape$pos = shape.pos,
39466 cx = _shape$pos.cx,
39467 cy = _shape$pos.cy,
39468 xForText = _shape$pos.xForText,
39469 yForText = _shape$pos.yForText,
39470 _flow2 = flow,
39471 _flow2$done = _flow2.done,
39472 done = _flow2$done === void 0 ? function () {
39473 _newArrowCheck(this, _this4);
39474 }.bind(this) : _flow2$done,
39475 flowLength = _flow2.length;
39476 // Remove flowed elements
39477 if (flowLength) {
39478 ["circle", "text", "shape", "eventRect"].forEach(function (v) {
39479 _newArrowCheck(this, _this4);
39480 var target = [];
39481 for (var i = 0; i < flowLength; i++) {
39482 target.push("." + classes[v] + "-" + i);
39483 }
39484 svg.selectAll("." + classes[v + "s"]) // circles, shapes, texts, eventRects
39485 .selectAll(target).remove();
39486 }.bind(this));
39487 svg.select("." + classes.xgrid).remove();
39488 }
39489
39490 // draw again for removing flowed elements and reverting attr
39491 Object.keys(elements).forEach(function (v) {
39492 var _this5 = this;
39493 _newArrowCheck(this, _this4);
39494 var n = elements[v];
39495 if (v !== "axis.x") {
39496 n.attr("transform", null);
39497 }
39498 if (v === "grid.x") {
39499 n.attr(state.xgridAttr);
39500 } else if (v === "gridLines.x") {
39501 n.attr("x1", isRotated ? 0 : xv).attr("x2", isRotated ? state.width : xv);
39502 } else if (v === "gridLines.x") {
39503 n.select("line").attr("x1", isRotated ? 0 : xv).attr("x2", isRotated ? state.width : xv);
39504 n.select("text").attr("x", isRotated ? state.width : 0).attr("y", xv);
39505 } else if (/^(area|bar|line)$/.test(v)) {
39506 n.attr("d", shape.type[v]);
39507 } else if (v === "text") {
39508 n.attr("x", xForText).attr("y", yForText).style("fill-opacity", $$.opacityForText.bind($$));
39509 } else if (v === "circle") {
39510 if ($$.isCirclePoint()) {
39511 n.attr("cx", cx).attr("cy", cy);
39512 } else {
39513 var xFunc = function (d) {
39514 _newArrowCheck(this, _this5);
39515 return cx(d) - config.point_r;
39516 }.bind(this),
39517 yFunc = function (d) {
39518 _newArrowCheck(this, _this5);
39519 return cy(d) - config.point_r;
39520 }.bind(this);
39521 n.attr("x", xFunc).attr("y", yFunc).attr("cx", cx) // when pattern is used, it possibly contain 'circle' also.
39522 .attr("cy", cy);
39523 }
39524 } else if (v === "region.list") {
39525 n.select("rect").filter($$.isRegionOnX).attr("x", $$.regionX.bind($$)).attr("width", $$.regionWidth.bind($$));
39526 }
39527 }.bind(this));
39528 config.interaction_enabled && $$.redrawEventRect();
39529
39530 // callback for end of flow
39531 done.call($$.api);
39532 state.flowing = !1;
39533 },
39534 /**
39535 * Get flow transform value
39536 * @param {object} targets target
39537 * @param {number} orgDataCount original data count
39538 * @param {number} flowIndex flow index
39539 * @param {number} flowLength flow length
39540 * @returns {string}
39541 * @private
39542 */
39543 getFlowTransform: function getFlowTransform(targets, orgDataCount, flowIndex, flowLength) {
39544 var _flowStart,
39545 _flowEnd,
39546 $$ = this,
39547 data = $$.data,
39548 x = $$.scale.x,
39549 dataValues = data.targets[0].values,
39550 flowStart = $$.getValueOnIndex(dataValues, flowIndex),
39551 flowEnd = $$.getValueOnIndex(dataValues, flowIndex + flowLength),
39552 translateX,
39553 orgDomain = x.domain(),
39554 domain = $$.updateXDomain(targets, !0, !0);
39555 // generate transform to flow
39556 if (!orgDataCount) {
39557 // if empty
39558 if (dataValues.length !== 1) {
39559 translateX = x(orgDomain[0]) - x(domain[0]);
39560 } else {
39561 if ($$.axis.isTimeSeries()) {
39562 flowStart = $$.getValueOnIndex(dataValues, 0);
39563 flowEnd = $$.getValueOnIndex(dataValues, dataValues.length - 1);
39564 translateX = x(flowStart.x) - x(flowEnd.x);
39565 } else {
39566 translateX = diffDomain(domain) / 2;
39567 }
39568 }
39569 } else if (orgDataCount === 1 || ((_flowStart = flowStart) == null ? void 0 : _flowStart.x) === ((_flowEnd = flowEnd) == null ? void 0 : _flowEnd.x)) {
39570 translateX = x(orgDomain[0]) - x(domain[0]);
39571 } else {
39572 var _flowStart2;
39573 translateX = $$.axis.isTimeSeries() ? x(orgDomain[0]) - x(domain[0]) : x(((_flowStart2 = flowStart) == null ? void 0 : _flowStart2.x) || 0) - x(flowEnd.x);
39574 }
39575 var scaleX = diffDomain(orgDomain) / diffDomain(domain);
39576 return "translate(" + translateX + ",0) scale(" + scaleX + ",1)";
39577 }
39578});
39579;// CONCATENATED MODULE: ./src/ChartInternal/internals/clip.ts
39580/**
39581 * Copyright (c) 2017 ~ present NAVER Corp.
39582 * billboard.js project is licensed under the MIT license
39583 */
39584
39585/* harmony default export */ var clip = ({
39586 initClip: function initClip() {
39587 var $$ = this,
39588 clip = $$.state.clip;
39589 // MEMO: clipId needs to be unique because it conflicts when multiple charts exist
39590 clip.id = $$.state.datetimeId + "-clip";
39591 clip.idXAxis = clip.id + "-xaxis";
39592 clip.idYAxis = clip.id + "-yaxis";
39593 clip.idGrid = clip.id + "-grid";
39594
39595 // Define 'clip-path' attribute values
39596 clip.path = $$.getClipPath(clip.id);
39597 clip.pathXAxis = $$.getClipPath(clip.idXAxis);
39598 clip.pathYAxis = $$.getClipPath(clip.idYAxis);
39599 clip.pathGrid = $$.getClipPath(clip.idGrid);
39600 },
39601 getClipPath: function getClipPath(id) {
39602 var $$ = this,
39603 config = $$.config;
39604 if (!config.clipPath && /-clip$/.test(id) || !config.axis_x_clipPath && /-clip-xaxis$/.test(id) || !config.axis_y_clipPath && /-clip-yaxis$/.test(id)) {
39605 return null;
39606 }
39607 var isIE9 = win.navigator ? win.navigator.appVersion.toLowerCase().indexOf("msie 9.") >= 0 : !1;
39608 return "url(" + (isIE9 ? "" : browser_doc.URL.split("#")[0]) + "#" + id + ")";
39609 },
39610 appendClip: function appendClip(parent, id) {
39611 id && parent.append("clipPath").attr("id", id).append("rect");
39612 },
39613 /**
39614 * Set x Axis clipPath dimension
39615 * @param {d3Selecton} node clipPath <rect> selection
39616 * @private
39617 */
39618 setXAxisClipPath: function setXAxisClipPath(node) {
39619 var $$ = this,
39620 config = $$.config,
39621 _$$$state = $$.state,
39622 margin = _$$$state.margin,
39623 width = _$$$state.width,
39624 height = _$$$state.height,
39625 isRotated = config.axis_rotated,
39626 left = Math.max(30, margin.left) - (isRotated ? 0 : 20),
39627 x = isRotated ? -(1 + left) : -(left - 1),
39628 y = -Math.max(15, margin.top),
39629 w = isRotated ? margin.left + 20 : width + 10 + left,
39630 h = (isRotated ? margin.top + height + 10 : margin.bottom) + 20;
39631 node.attr("x", x).attr("y", y).attr("width", w).attr("height", h);
39632 },
39633 /**
39634 * Set y Axis clipPath dimension
39635 * @param {d3Selecton} node clipPath <rect> selection
39636 * @private
39637 */
39638 setYAxisClipPath: function setYAxisClipPath(node) {
39639 var $$ = this,
39640 config = $$.config,
39641 _$$$state2 = $$.state,
39642 margin = _$$$state2.margin,
39643 width = _$$$state2.width,
39644 height = _$$$state2.height,
39645 isRotated = config.axis_rotated,
39646 left = Math.max(30, margin.left) - (isRotated ? 20 : 0),
39647 isInner = config.axis_y_inner,
39648 x = isInner ? -1 : isRotated ? -(1 + left) : -(left - 1),
39649 y = -(isRotated ? 20 : margin.top),
39650 w = (isRotated ? width + 15 + left : margin.left + 20) + (isInner ? 20 : 0),
39651 h = (isRotated ? margin.bottom : margin.top + height) + 10;
39652 node.attr("x", x).attr("y", y).attr("width", w).attr("height", h);
39653 },
39654 updateXAxisTickClip: function updateXAxisTickClip() {
39655 var $$ = this,
39656 config = $$.config,
39657 _$$$state3 = $$.state,
39658 clip = _$$$state3.clip,
39659 xAxisHeight = _$$$state3.xAxisHeight,
39660 defs = $$.$el.defs,
39661 newXAxisHeight = $$.getHorizontalAxisHeight("x");
39662 if (defs && !clip.idXAxisTickTexts) {
39663 var clipId = clip.id + "-xaxisticktexts";
39664 $$.appendClip(defs, clipId);
39665 clip.pathXAxisTickTexts = $$.getClipPath(clip.idXAxisTickTexts);
39666 clip.idXAxisTickTexts = clipId;
39667 }
39668 if (!config.axis_x_tick_multiline && $$.getAxisTickRotate("x") && newXAxisHeight !== xAxisHeight) {
39669 $$.setXAxisTickClipWidth();
39670 $$.setXAxisTickTextClipPathWidth();
39671 }
39672 $$.state.xAxisHeight = newXAxisHeight;
39673 },
39674 setXAxisTickClipWidth: function setXAxisTickClipWidth() {
39675 var $$ = this,
39676 config = $$.config,
39677 maxTickWidths = $$.state.current.maxTickWidths,
39678 xAxisTickRotate = $$.getAxisTickRotate("x");
39679 if (!config.axis_x_tick_multiline && xAxisTickRotate) {
39680 var sinRotation = Math.sin(Math.PI / 180 * Math.abs(xAxisTickRotate));
39681 maxTickWidths.x.clipPath = ($$.getHorizontalAxisHeight("x") - 20) / sinRotation;
39682 } else {
39683 maxTickWidths.x.clipPath = null;
39684 }
39685 },
39686 setXAxisTickTextClipPathWidth: function setXAxisTickTextClipPathWidth() {
39687 var $$ = this,
39688 _$$$state4 = $$.state,
39689 clip = _$$$state4.clip,
39690 current = _$$$state4.current,
39691 svg = $$.$el.svg;
39692 if (svg) {
39693 svg.select("#" + clip.idXAxisTickTexts + " rect").attr("width", current.maxTickWidths.x.clipPath).attr("height", 30);
39694 }
39695 }
39696});
39697;// CONCATENATED MODULE: ./src/ChartInternal/internals/grid.ts
39698
39699var grid_this = undefined;
39700/**
39701 * Copyright (c) 2017 ~ present NAVER Corp.
39702 * billboard.js project is licensed under the MIT license
39703 */
39704
39705
39706
39707
39708// Grid position and text anchor helpers
39709var getGridTextAnchor = function (d) {
39710 _newArrowCheck(this, grid_this);
39711 return isValue(d.position) || "end";
39712 }.bind(undefined),
39713 getGridTextDx = function (d) {
39714 _newArrowCheck(this, grid_this);
39715 return d.position === "start" ? 4 : d.position === "middle" ? 0 : -4;
39716 }.bind(undefined);
39717/**
39718 * Get grid text x value getter function
39719 * @param {boolean} isX Is x Axis
39720 * @param {number} width Width value
39721 * @param {number} height Height value
39722 * @returns {Function}
39723 * @private
39724 */
39725function getGridTextX(isX, width, height) {
39726 var _this2 = this;
39727 return function (d) {
39728 _newArrowCheck(this, _this2);
39729 var x = isX ? 0 : width;
39730 if (d.position === "start") {
39731 x = isX ? -height : 0;
39732 } else if (d.position === "middle") {
39733 x = (isX ? -height : width) / 2;
39734 }
39735 return x;
39736 }.bind(this);
39737}
39738
39739/**
39740 * Update coordinate attributes value
39741 * @param {d3.selection} el Target node
39742 * @param {string} type Type
39743 * @private
39744 */
39745function smoothLines(el, type) {
39746 if (type === "grid") {
39747 el.each(function () {
39748 var _this3 = this,
39749 g = src_select(this);
39750 ["x1", "x2", "y1", "y2"].forEach(function (v) {
39751 _newArrowCheck(this, _this3);
39752 return g.attr(v, Math.ceil(+g.attr(v)));
39753 }.bind(this));
39754 });
39755 }
39756}
39757/* harmony default export */ var grid = ({
39758 hasGrid: function hasGrid() {
39759 var _this4 = this,
39760 config = this.config;
39761 return ["x", "y"].some(function (v) {
39762 _newArrowCheck(this, _this4);
39763 return config["grid_" + v + "_show"] || config["grid_" + v + "_lines"].length;
39764 }.bind(this));
39765 },
39766 initGrid: function initGrid() {
39767 var $$ = this;
39768 $$.hasGrid() && $$.initGridLines();
39769 $$.initFocusGrid();
39770 },
39771 initGridLines: function initGridLines() {
39772 var $$ = this,
39773 config = $$.config,
39774 clip = $$.state.clip,
39775 $el = $$.$el;
39776 if (config.grid_x_lines.length || config.grid_y_lines.length) {
39777 $el.gridLines.main = $el.main.insert("g", "." + $COMMON.chart + (config.grid_lines_front ? " + *" : "")).attr("clip-path", clip.pathGrid).attr("class", $GRID.grid + " " + $GRID.gridLines);
39778 $el.gridLines.main.append("g").attr("class", $GRID.xgridLines);
39779 $el.gridLines.main.append("g").attr("class", $GRID.ygridLines);
39780 $el.gridLines.x = src_selectAll([]);
39781 }
39782 },
39783 updateXGrid: function updateXGrid(withoutUpdate) {
39784 var _this5 = this,
39785 $$ = this,
39786 config = $$.config,
39787 scale = $$.scale,
39788 state = $$.state,
39789 _$$$$el = $$.$el,
39790 main = _$$$$el.main,
39791 grid = _$$$$el.grid,
39792 isRotated = config.axis_rotated,
39793 xgridData = $$.generateGridData(config.grid_x_type, scale.x),
39794 tickOffset = $$.axis.isCategorized() ? $$.axis.x.tickOffset() : 0,
39795 pos = function (d) {
39796 _newArrowCheck(this, _this5);
39797 return (scale.zoom || scale.x)(d) + tickOffset * (isRotated ? -1 : 1);
39798 }.bind(this);
39799 state.xgridAttr = isRotated ? {
39800 "x1": 0,
39801 "x2": state.width,
39802 "y1": pos,
39803 "y2": pos
39804 } : {
39805 "x1": pos,
39806 "x2": pos,
39807 "y1": 0,
39808 "y2": state.height
39809 };
39810 grid.x = main.select("." + $GRID.xgrids).selectAll("." + $GRID.xgrid).data(xgridData);
39811 grid.x.exit().remove();
39812 grid.x = grid.x.enter().append("line").attr("class", $GRID.xgrid).merge(grid.x);
39813 if (!withoutUpdate) {
39814 grid.x.each(function () {
39815 var _this6 = this,
39816 grid = src_select(this);
39817 Object.keys(state.xgridAttr).forEach(function (id) {
39818 var _this7 = this;
39819 _newArrowCheck(this, _this6);
39820 grid.attr(id, state.xgridAttr[id]).style("opacity", function () {
39821 _newArrowCheck(this, _this7);
39822 return grid.attr(isRotated ? "y1" : "x1") === (isRotated ? state.height : 0) ? "0" : null;
39823 }.bind(this));
39824 }.bind(this));
39825 });
39826 }
39827 },
39828 updateYGrid: function updateYGrid() {
39829 var _this8 = this,
39830 $$ = this,
39831 axis = $$.axis,
39832 config = $$.config,
39833 scale = $$.scale,
39834 state = $$.state,
39835 _$$$$el2 = $$.$el,
39836 grid = _$$$$el2.grid,
39837 main = _$$$$el2.main,
39838 isRotated = config.axis_rotated,
39839 pos = function (d) {
39840 _newArrowCheck(this, _this8);
39841 return Math.ceil(scale.y(d));
39842 }.bind(this),
39843 gridValues = axis.y.getGeneratedTicks(config.grid_y_ticks) || $$.scale.y.ticks(config.grid_y_ticks);
39844 grid.y = main.select("." + $GRID.ygrids).selectAll("." + $GRID.ygrid).data(gridValues);
39845 grid.y.exit().remove();
39846 grid.y = grid.y.enter().append("line").attr("class", $GRID.ygrid).merge(grid.y);
39847 grid.y.attr("x1", isRotated ? pos : 0).attr("x2", isRotated ? pos : state.width).attr("y1", isRotated ? 0 : pos).attr("y2", isRotated ? state.height : pos);
39848 smoothLines(grid.y, "grid");
39849 },
39850 updateGrid: function updateGrid() {
39851 var $$ = this,
39852 _$$$$el3 = $$.$el,
39853 grid = _$$$$el3.grid,
39854 gridLines = _$$$$el3.gridLines;
39855 gridLines.main || $$.initGridLines();
39856
39857 // hide if arc type
39858 grid.main.style("visibility", $$.hasArcType() ? "hidden" : null);
39859 $$.hideGridFocus();
39860 $$.updateXGridLines();
39861 $$.updateYGridLines();
39862 },
39863 /**
39864 * Update X Grid lines
39865 * @private
39866 */
39867 updateXGridLines: function updateXGridLines() {
39868 var _this9 = this,
39869 $$ = this,
39870 config = $$.config,
39871 _$$$$el4 = $$.$el,
39872 gridLines = _$$$$el4.gridLines,
39873 main = _$$$$el4.main,
39874 $T = $$.$T,
39875 isRotated = config.axis_rotated;
39876 config.grid_x_show && $$.updateXGrid();
39877 var xLines = main.select("." + $GRID.xgridLines).selectAll("." + $GRID.xgridLine).data(config.grid_x_lines);
39878
39879 // exit
39880 $T(xLines.exit()).style("opacity", "0").remove();
39881
39882 // enter
39883 var xgridLine = xLines.enter().append("g");
39884 xgridLine.append("line").style("opacity", "0");
39885 xgridLine.append("text").attr("transform", isRotated ? "" : "rotate(-90)").attr("dy", -5).style("opacity", "0");
39886 xLines = xgridLine.merge(xLines);
39887 $T(xLines.attr("class", function (d) {
39888 _newArrowCheck(this, _this9);
39889 return ($GRID.xgridLine + " " + (d.class || "")).trim();
39890 }.bind(this)).select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx)).text(function (d) {
39891 _newArrowCheck(this, _this9);
39892 return d.text;
39893 }.bind(this)).style("opacity", null);
39894 gridLines.x = xLines;
39895 },
39896 /**
39897 * Update Y Grid lines
39898 * @private
39899 */
39900 updateYGridLines: function updateYGridLines() {
39901 var _this10 = this,
39902 $$ = this,
39903 config = $$.config,
39904 _$$$state = $$.state,
39905 width = _$$$state.width,
39906 height = _$$$state.height,
39907 $el = $$.$el,
39908 $T = $$.$T,
39909 isRotated = config.axis_rotated;
39910 config.grid_y_show && $$.updateYGrid();
39911 var ygridLines = $el.main.select("." + $GRID.ygridLines).selectAll("." + $GRID.ygridLine).data(config.grid_y_lines);
39912
39913 // exit
39914 $T(ygridLines.exit()).style("opacity", "0").remove();
39915
39916 // enter
39917 var ygridLine = ygridLines.enter().append("g");
39918 ygridLine.append("line").style("opacity", "0");
39919 ygridLine.append("text").attr("transform", isRotated ? "rotate(-90)" : "").style("opacity", "0");
39920 ygridLines = ygridLine.merge(ygridLines);
39921
39922 // update
39923 var yv = $$.yv.bind($$);
39924 $T(ygridLines.attr("class", function (d) {
39925 _newArrowCheck(this, _this10);
39926 return ($GRID.ygridLine + " " + (d.class || "")).trim();
39927 }.bind(this)).select("line")).attr("x1", isRotated ? yv : 0).attr("x2", isRotated ? yv : width).attr("y1", isRotated ? 0 : yv).attr("y2", isRotated ? height : yv).style("opacity", null);
39928 $T(ygridLines.select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx)).attr("dy", -5).attr("x", getGridTextX(isRotated, width, height)).attr("y", yv).text(function (d) {
39929 _newArrowCheck(this, _this10);
39930 return d.text;
39931 }.bind(this)).style("opacity", null);
39932 $el.gridLines.y = ygridLines;
39933 },
39934 redrawGrid: function redrawGrid(withTransition) {
39935 var _this11 = this,
39936 $$ = this,
39937 isRotated = $$.config.axis_rotated,
39938 _$$$state2 = $$.state,
39939 width = _$$$state2.width,
39940 height = _$$$state2.height,
39941 gridLines = $$.$el.gridLines,
39942 $T = $$.$T,
39943 xv = $$.xv.bind($$),
39944 lines = gridLines.x.select("line"),
39945 texts = gridLines.x.select("text");
39946 lines = $T(lines, withTransition).attr("x1", isRotated ? 0 : xv).attr("x2", isRotated ? width : xv).attr("y1", isRotated ? xv : 0).attr("y2", isRotated ? xv : height);
39947 texts = $T(texts, withTransition).attr("x", getGridTextX(!isRotated, width, height)).attr("y", xv).text(function (d) {
39948 _newArrowCheck(this, _this11);
39949 return d.text;
39950 }.bind(this));
39951 return [lines.style("opacity", null), texts.style("opacity", null)];
39952 },
39953 initFocusGrid: function initFocusGrid() {
39954 var $$ = this,
39955 config = $$.config,
39956 clip = $$.state.clip,
39957 $el = $$.$el,
39958 isFront = config.grid_front,
39959 className = "." + (isFront && $el.gridLines.main ? $GRID.gridLines : $COMMON.chart) + (isFront ? " + *" : ""),
39960 grid = $el.main.insert("g", className).attr("clip-path", clip.pathGrid).attr("class", $GRID.grid);
39961 $el.grid.main = grid;
39962 config.grid_x_show && grid.append("g").attr("class", $GRID.xgrids);
39963 config.grid_y_show && grid.append("g").attr("class", $GRID.ygrids);
39964 if (config.interaction_enabled && config.grid_focus_show) {
39965 grid.append("g").attr("class", $FOCUS.xgridFocus).append("line").attr("class", $FOCUS.xgridFocus);
39966
39967 // to show xy focus grid line, should be 'tooltip.grouped=false'
39968 if (config.grid_focus_y && !config.tooltip_grouped) {
39969 grid.append("g").attr("class", $FOCUS.ygridFocus).append("line").attr("class", $FOCUS.ygridFocus);
39970 }
39971 }
39972 },
39973 /**
39974 * Show grid focus line
39975 * @param {Array} data Selected data
39976 * @private
39977 */
39978 showGridFocus: function showGridFocus(data) {
39979 var _this12 = this,
39980 $$ = this,
39981 config = $$.config,
39982 _$$$state3 = $$.state,
39983 width = _$$$state3.width,
39984 height = _$$$state3.height,
39985 isRotated = config.axis_rotated,
39986 focusEl = $$.$el.main.selectAll("line." + $FOCUS.xgridFocus + ", line." + $FOCUS.ygridFocus),
39987 dataToShow = (data || [focusEl.datum()]).filter(function (d) {
39988 _newArrowCheck(this, _this12);
39989 return d && isValue($$.getBaseValue(d));
39990 }.bind(this));
39991 // Hide when bubble/scatter/stanford plot exists
39992 if (!config.tooltip_show || dataToShow.length === 0 || $$.hasType("bubble") || $$.hasArcType()) {
39993 return;
39994 }
39995 var isEdge = config.grid_focus_edge && !config.tooltip_grouped,
39996 xx = $$.xx.bind($$);
39997 focusEl.style("visibility", null).data(dataToShow.concat(dataToShow)).each(function (d) {
39998 var _this13 = this,
39999 el = src_select(this),
40000 pos = {
40001 x: xx(d),
40002 y: $$.getYScaleById(d.id)(d.value)
40003 },
40004 xy;
40005 if (el.classed($FOCUS.xgridFocus)) {
40006 // will contain 'x1, y1, x2, y2' order
40007 xy = isRotated ? [null,
40008 // x1
40009 pos.x,
40010 // y1
40011 isEdge ? pos.y : width,
40012 // x2
40013 pos.x // y2
40014 ] : [pos.x, isEdge ? pos.y : null, pos.x, height];
40015 } else {
40016 var isY2 = $$.axis.getId(d.id) === "y2";
40017 xy = isRotated ? [pos.y,
40018 // x1
40019 isEdge && !isY2 ? pos.x : null,
40020 // y1
40021 pos.y,
40022 // x2
40023 isEdge && isY2 ? pos.x : height // y2
40024 ] : [isEdge && isY2 ? pos.x : null, pos.y, isEdge && !isY2 ? pos.x : width, pos.y];
40025 }
40026 ["x1", "y1", "x2", "y2"].forEach(function (v, i) {
40027 _newArrowCheck(this, _this13);
40028 return el.attr(v, xy[i]);
40029 }.bind(this));
40030 });
40031 smoothLines(focusEl, "grid");
40032 $$.showCircleFocus == null ? void 0 : $$.showCircleFocus(data);
40033 },
40034 hideGridFocus: function hideGridFocus() {
40035 var $$ = this,
40036 _$$$state4 = $$.state,
40037 inputType = _$$$state4.inputType,
40038 resizing = _$$$state4.resizing,
40039 main = $$.$el.main;
40040 if (inputType === "mouse" || !resizing) {
40041 main.selectAll("line." + $FOCUS.xgridFocus + ", line." + $FOCUS.ygridFocus).style("visibility", "hidden");
40042 $$.hideCircleFocus == null ? void 0 : $$.hideCircleFocus();
40043 }
40044 },
40045 updateGridFocus: function updateGridFocus() {
40046 var $$ = this,
40047 _$$$state5 = $$.state,
40048 inputType = _$$$state5.inputType,
40049 width = _$$$state5.width,
40050 height = _$$$state5.height,
40051 resizing = _$$$state5.resizing,
40052 grid = $$.$el.grid,
40053 xgridFocus = grid.main.select("line." + $FOCUS.xgridFocus);
40054 if (inputType === "touch") {
40055 if (xgridFocus.empty()) {
40056 resizing && ($$.showCircleFocus == null ? void 0 : $$.showCircleFocus());
40057 } else {
40058 $$.showGridFocus();
40059 }
40060 } else {
40061 var _isRotated = $$.config.axis_rotated;
40062 xgridFocus.attr("x1", _isRotated ? 0 : -10).attr("x2", _isRotated ? width : -10).attr("y1", _isRotated ? -10 : 0).attr("y2", _isRotated ? -10 : height);
40063 }
40064
40065 // need to return 'true' as of being pushed to the redraw list
40066 // ref: getRedrawList()
40067 return !0;
40068 },
40069 generateGridData: function generateGridData(type, scale) {
40070 var _this14 = this,
40071 $$ = this,
40072 tickNum = $$.$el.main.select("." + $AXIS.axisX).selectAll(".tick").size(),
40073 gridData = [];
40074 if (type === "year") {
40075 var xDomain = $$.getXDomain(),
40076 _xDomain$map = xDomain.map(function (v) {
40077 _newArrowCheck(this, _this14);
40078 return v.getFullYear();
40079 }.bind(this)),
40080 firstYear = _xDomain$map[0],
40081 lastYear = _xDomain$map[1];
40082 for (var i = firstYear; i <= lastYear; i++) {
40083 gridData.push(new Date(i + "-01-01 00:00:00"));
40084 }
40085 } else {
40086 gridData = scale.ticks(10);
40087 if (gridData.length > tickNum) {
40088 // use only int
40089 gridData = gridData.filter(function (d) {
40090 _newArrowCheck(this, _this14);
40091 return (d + "").indexOf(".") < 0;
40092 }.bind(this));
40093 }
40094 }
40095 return gridData;
40096 },
40097 getGridFilterToRemove: function getGridFilterToRemove(params) {
40098 var _this15 = this;
40099 return params ? function (line) {
40100 var _this16 = this;
40101 _newArrowCheck(this, _this15);
40102 var found = !1;
40103 (isArray(params) ? params.concat() : [params]).forEach(function (param) {
40104 _newArrowCheck(this, _this16);
40105 if ("value" in param && line.value === param.value || "class" in param && line.class === param.class) {
40106 found = !0;
40107 }
40108 }.bind(this));
40109 return found;
40110 }.bind(this) : function () {
40111 _newArrowCheck(this, _this15);
40112 return !0;
40113 }.bind(this);
40114 },
40115 removeGridLines: function removeGridLines(params, forX) {
40116 var _this17 = this,
40117 $$ = this,
40118 config = $$.config,
40119 $T = $$.$T,
40120 toRemove = $$.getGridFilterToRemove(params),
40121 toShow = function (line) {
40122 _newArrowCheck(this, _this17);
40123 return !toRemove(line);
40124 }.bind(this),
40125 classLines = forX ? $GRID.xgridLines : $GRID.ygridLines,
40126 classLine = forX ? $GRID.xgridLine : $GRID.ygridLine;
40127 $T($$.$el.main.select("." + classLines).selectAll("." + classLine).filter(toRemove)).style("opacity", "0").remove();
40128 var gridLines = "grid_" + (forX ? "x" : "y") + "_lines";
40129 config[gridLines] = config[gridLines].filter(toShow);
40130 }
40131});
40132;// CONCATENATED MODULE: ./src/ChartInternal/internals/region.ts
40133
40134/**
40135 * Copyright (c) 2017 ~ present NAVER Corp.
40136 * billboard.js project is licensed under the MIT license
40137 */
40138 // selection
40139
40140
40141/* harmony default export */ var region = ({
40142 initRegion: function initRegion() {
40143 var $$ = this,
40144 $el = $$.$el;
40145 $el.region.main = $el.main.insert("g", ":first-child").attr("clip-path", $$.state.clip.path).attr("class", $REGION.regions);
40146 },
40147 updateRegion: function updateRegion() {
40148 var $$ = this,
40149 config = $$.config,
40150 region = $$.$el.region,
40151 $T = $$.$T;
40152 if (!region.main) {
40153 $$.initRegion();
40154 }
40155
40156 // hide if arc type
40157 region.main.style("visibility", $$.hasArcType() ? "hidden" : null);
40158 // select <g> element
40159
40160 var list = region.main.selectAll("." + $REGION.region).data(config.regions);
40161 $T(list.exit()).style("opacity", "0").remove();
40162 list = list.enter().append("g").merge(list).attr("class", $$.classRegion.bind($$));
40163 list.append("rect").style("fill-opacity", "0");
40164 region.list = list;
40165 },
40166 redrawRegion: function redrawRegion(withTransition) {
40167 var _this = this,
40168 $$ = this,
40169 region = $$.$el.region,
40170 $T = $$.$T,
40171 regions = region.list.select("rect");
40172 regions = $T(regions, withTransition).attr("x", $$.regionX.bind($$)).attr("y", $$.regionY.bind($$)).attr("width", $$.regionWidth.bind($$)).attr("height", $$.regionHeight.bind($$));
40173 return [regions.style("fill-opacity", function (d) {
40174 _newArrowCheck(this, _this);
40175 return isValue(d.opacity) ? d.opacity : null;
40176 }.bind(this)).on("end", function () {
40177 // remove unnecessary rect after transition
40178 src_select(this.parentNode).selectAll("rect:not([x])").remove();
40179 })];
40180 },
40181 getRegionXY: function getRegionXY(type, d) {
40182 var $$ = this,
40183 config = $$.config,
40184 scale = $$.scale,
40185 isRotated = config.axis_rotated,
40186 isX = type === "x",
40187 key = "start",
40188 currScale,
40189 pos = 0;
40190 if (d.axis === "y" || d.axis === "y2") {
40191 if (!isX) {
40192 key = "end";
40193 }
40194 if ((isX ? isRotated : !isRotated) && key in d) {
40195 currScale = scale[d.axis];
40196 pos = currScale(d[key]);
40197 }
40198 } else if ((isX ? !isRotated : isRotated) && key in d) {
40199 currScale = scale.zoom || scale.x;
40200 pos = currScale($$.axis.isTimeSeries() ? parseDate.call($$, d[key]) : d[key]);
40201 }
40202 return pos;
40203 },
40204 regionX: function regionX(d) {
40205 return this.getRegionXY("x", d);
40206 },
40207 regionY: function regionY(d) {
40208 return this.getRegionXY("y", d);
40209 },
40210 getRegionSize: function getRegionSize(type, d) {
40211 var $$ = this,
40212 config = $$.config,
40213 scale = $$.scale,
40214 state = $$.state,
40215 isRotated = config.axis_rotated,
40216 isWidth = type === "width",
40217 start = $$[isWidth ? "regionX" : "regionY"](d),
40218 currScale,
40219 key = "end",
40220 end = state[type];
40221 if (d.axis === "y" || d.axis === "y2") {
40222 if (!isWidth) {
40223 key = "start";
40224 }
40225 if ((isWidth ? isRotated : !isRotated) && key in d) {
40226 currScale = scale[d.axis];
40227 end = currScale(d[key]);
40228 }
40229 } else if ((isWidth ? !isRotated : isRotated) && key in d) {
40230 currScale = scale.zoom || scale.x;
40231 end = currScale($$.axis.isTimeSeries() ? parseDate.call($$, d[key]) : d[key]);
40232 }
40233 return end < start ? 0 : end - start;
40234 },
40235 regionWidth: function regionWidth(d) {
40236 return this.getRegionSize("width", d);
40237 },
40238 regionHeight: function regionHeight(d) {
40239 return this.getRegionSize("height", d);
40240 },
40241 isRegionOnX: function isRegionOnX(d) {
40242 return !d.axis || d.axis === "x";
40243 }
40244});
40245;// CONCATENATED MODULE: ./src/ChartInternal/internals/size.axis.ts
40246/**
40247 * Copyright (c) 2017 ~ present NAVER Corp.
40248 * billboard.js project is licensed under the MIT license
40249 */
40250
40251/* harmony default export */ var size_axis = ({
40252 /**
40253 * Get Axis size according its position
40254 * @param {string} id Axis id value - x, y or y2
40255 * @returns {number} size Axis size value
40256 * @private
40257 */
40258 getAxisSize: function getAxisSize(id) {
40259 var $$ = this,
40260 isRotated = $$.config.axis_rotated;
40261 return isRotated && id === "x" || !isRotated && /y2?/.test(id) ? $$.getAxisWidthByAxisId(id, !0) : $$.getHorizontalAxisHeight(id);
40262 },
40263 getAxisWidthByAxisId: function getAxisWidthByAxisId(id, withoutRecompute) {
40264 var $$ = this;
40265 if ($$.axis) {
40266 var _$$$axis,
40267 position = (_$$$axis = $$.axis) == null ? void 0 : _$$$axis.getLabelPositionById(id),
40268 width = $$.axis.getMaxTickWidth(id, withoutRecompute),
40269 gap = width === 0 ? .5 : 0;
40270 return width + (position.isInner ? 20 + gap : 40);
40271 } else {
40272 return 40;
40273 }
40274 },
40275 getHorizontalAxisHeight: function getHorizontalAxisHeight(id) {
40276 var $$ = this,
40277 config = $$.config,
40278 state = $$.state,
40279 _state = state,
40280 current = _state.current,
40281 rotatedPadding = _state.rotatedPadding,
40282 isLegendRight = _state.isLegendRight,
40283 isLegendInset = _state.isLegendInset,
40284 isRotated = config.axis_rotated,
40285 h = 30;
40286 if (id === "x" && !config.axis_x_show) {
40287 return 8;
40288 }
40289 if (id === "x" && config.axis_x_height) {
40290 return config.axis_x_height;
40291 }
40292 if (id === "y" && !config.axis_y_show) {
40293 return config.legend_show && !isLegendRight && !isLegendInset ? 10 : 1;
40294 }
40295 if (id === "y2" && !config.axis_y2_show) {
40296 return rotatedPadding.top;
40297 }
40298 var rotate = $$.getAxisTickRotate(id);
40299
40300 // Calculate x/y axis height when tick rotated
40301 if ((id === "x" && !isRotated || /y2?/.test(id) && isRotated) && rotate) {
40302 h = 30 + $$.axis.getMaxTickWidth(id) * Math.cos(Math.PI * (90 - Math.abs(rotate)) / 180);
40303 if (!config.axis_x_tick_multiline && current.height) {
40304 if (h > current.height / 2) {
40305 h = current.height / 2;
40306 }
40307 }
40308 }
40309 return h + ($$.axis.getLabelPositionById(id).isInner ? 0 : 10) + (id === "y2" && !isRotated ? -10 : 0);
40310 },
40311 getEventRectWidth: function getEventRectWidth() {
40312 return Math.max(0, this.axis.x.tickInterval());
40313 },
40314 /**
40315 * Get axis tick test rotate value
40316 * @param {string} id Axis id
40317 * @returns {number} rotate value
40318 * @private
40319 */
40320 getAxisTickRotate: function getAxisTickRotate(id) {
40321 var $$ = this,
40322 axis = $$.axis,
40323 config = $$.config,
40324 state = $$.state,
40325 $el = $$.$el,
40326 rotate = config["axis_" + id + "_tick_rotate"];
40327 if (id === "x") {
40328 var allowedXAxisTypes = axis.isCategorized() || axis.isTimeSeries();
40329 if (config.axis_x_tick_fit && allowedXAxisTypes) {
40330 var xTickCount = config.axis_x_tick_count,
40331 currentXTicksLength = state.current.maxTickWidths.x.ticks.length,
40332 tickCount = 0;
40333 if (xTickCount) {
40334 tickCount = xTickCount > currentXTicksLength ? currentXTicksLength : xTickCount;
40335 } else if (currentXTicksLength) {
40336 tickCount = currentXTicksLength;
40337 }
40338 if (tickCount !== state.axis.x.tickCount) {
40339 var targets = $$.data.targets;
40340 state.axis.x.padding = $$.getXDomainPadding([$$.getXDomainMinMax(targets, "min"), $$.getXDomainMinMax(targets, "max")], tickCount);
40341 }
40342 state.axis.x.tickCount = tickCount;
40343 }
40344 if ($el.svg && config.axis_x_tick_fit && !config.axis_x_tick_multiline && !config.axis_x_tick_culling && config.axis_x_tick_autorotate && allowedXAxisTypes) {
40345 rotate = $$.needToRotateXAxisTickTexts() ? config.axis_x_tick_rotate : 0;
40346 }
40347 }
40348 return rotate;
40349 },
40350 /**
40351 * Check weather axis tick text needs to be rotated
40352 * @returns {boolean}
40353 * @private
40354 */
40355 needToRotateXAxisTickTexts: function needToRotateXAxisTickTexts() {
40356 var $$ = this,
40357 _$$$state = $$.state,
40358 axis = _$$$state.axis,
40359 current = _$$$state.current,
40360 xAxisLength = current.width - $$.getCurrentPaddingLeft(!1) - $$.getCurrentPaddingRight(),
40361 tickCountWithPadding = axis.x.tickCount + axis.x.padding.left + axis.x.padding.right,
40362 maxTickWidth = $$.axis.getMaxTickWidth("x"),
40363 tickLength = tickCountWithPadding ? xAxisLength / tickCountWithPadding : 0;
40364 return maxTickWidth > tickLength;
40365 }
40366});
40367;// CONCATENATED MODULE: ./src/config/Options/data/axis.ts
40368/**
40369 * Copyright (c) 2017 ~ present NAVER Corp.
40370 * billboard.js project is licensed under the MIT license
40371 */
40372/**
40373 * Axis based chart data config options
40374 */
40375/* harmony default export */ var data_axis = ({
40376 /**
40377 * Specify the keys of the x values for each data.<br><br>
40378 * This option can be used if we want to show the data that has different x values.
40379 * @name data․xs
40380 * @memberof Options
40381 * @type {object}
40382 * @default {}
40383 * @example
40384 * data: {
40385 * xs: {
40386 * data1: "x1",
40387 * data2: "x2"
40388 * }
40389 * }
40390 */
40391 data_xs: {},
40392 /**
40393 * Set a format specifier to parse string specifed as x.
40394 * @name data․xFormat
40395 * @memberof Options
40396 * @type {string}
40397 * @default %Y-%m-%d
40398 * @example
40399 * data: {
40400 * x: "x",
40401 * columns: [
40402 * ["x", "01012019", "02012019", "03012019"],
40403 * ["data1", 30, 200, 100]
40404 * ],
40405 * // Format specifier to parse as datetime for given 'x' string value
40406 * xFormat: "%m%d%Y"
40407 * },
40408 * axis: {
40409 * x: {
40410 * type: "timeseries"
40411 * }
40412 * }
40413 * @see [D3's time specifier](https://github.com/d3/d3-time-format#locale_format)
40414 */
40415 data_xFormat: "%Y-%m-%d",
40416 /**
40417 * Set localtime format to parse x axis.
40418 * @name data․xLocaltime
40419 * @memberof Options
40420 * @type {boolean}
40421 * @default true
40422 * @example
40423 * data: {
40424 * xLocaltime: false
40425 * }
40426 */
40427 data_xLocaltime: !0,
40428 /**
40429 * Sort on x axis.
40430 * @name data․xSort
40431 * @memberof Options
40432 * @type {boolean}
40433 * @default true
40434 * @example
40435 * data: {
40436 * xSort: false
40437 * }
40438 */
40439 data_xSort: !0,
40440 /**
40441 * Set y axis the data related to. y and y2 can be used.
40442 * - **NOTE:** If all data is related to one of the axes, the domain of axis without related data will be replaced by the domain from the axis with related data
40443 * @name data․axes
40444 * @memberof Options
40445 * @type {object}
40446 * @default {}
40447 * @example
40448 * data: {
40449 * axes: {
40450 * data1: "y",
40451 * data2: "y2"
40452 * }
40453 * }
40454 */
40455 data_axes: {},
40456 /**
40457 * Define regions for each data.<br>
40458 * The values must be an array for each data and it should include an object that has `start`, `end` and `style`.
40459 * - The object type should be as:
40460 * - start {number}: Start data point number. If not set, the start will be the first data point.
40461 * - [end] {number}: End data point number. If not set, the end will be the last data point.
40462 * - [style.dasharray="2 2"] {object}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area.
40463 * - **NOTE:** Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions.
40464 * @name data․regions
40465 * @memberof Options
40466 * @type {object}
40467 * @default {}
40468 * @example
40469 * data: {
40470 * regions: {
40471 * data1: [{
40472 * start: 1,
40473 * end: 2,
40474 * style: {
40475 * dasharray: "5 2"
40476 * }
40477 * }, {
40478 * start: 3
40479 * }],
40480 * ...
40481 * }
40482 * }
40483 */
40484 data_regions: {},
40485 /**
40486 * Set the stacking to be normalized
40487 * - **NOTE:**
40488 * - For stacking, '[data.groups](#.data%25E2%2580%25A4groups)' option should be set
40489 * - y Axis will be set in percentage value (0 ~ 100%)
40490 * - Must have postive values
40491 * @name data․stack․normalize
40492 * @memberof Options
40493 * @type {boolean}
40494 * @default false
40495 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataStackNormalized)
40496 * @example
40497 * data: {
40498 * stack: {
40499 * normalize: true
40500 * }
40501 * }
40502 */
40503 data_stack_normalize: !1
40504});
40505;// CONCATENATED MODULE: ./src/config/Options/axis/x.ts
40506/**
40507 * Copyright (c) 2017 ~ present NAVER Corp.
40508 * billboard.js project is licensed under the MIT license
40509 */
40510/**
40511 * x Axis config options
40512 */
40513/* harmony default export */ var axis_x = ({
40514 /**
40515 * Set clip-path attribute for x axis element
40516 * @name axis․x․clipPath
40517 * @memberof Options
40518 * @type {boolean}
40519 * @default true
40520 * @see [Demo]()
40521 * @example
40522 * // don't set 'clip-path' attribute
40523 * clipPath: false
40524 */
40525 axis_x_clipPath: !0,
40526 /**
40527 * Show or hide x axis.
40528 * @name axis․x․show
40529 * @memberof Options
40530 * @type {boolean}
40531 * @default true
40532 * @example
40533 * axis: {
40534 * x: {
40535 * show: false
40536 * }
40537 * }
40538 */
40539 axis_x_show: !0,
40540 /**
40541 * Set type of x axis.<br><br>
40542 * **Available Values:**
40543 * - category
40544 * - indexed
40545 * - log
40546 * - timeseries
40547 *
40548 * **NOTE:**<br>
40549 * - **log** type:
40550 * - the x values specified by [`data.x`](#.data%25E2%2580%25A4x)(or by any equivalent option), must be exclusively-positive.
40551 * - x axis min value should be >= 0.
40552 *
40553 * @name axis․x․type
40554 * @memberof Options
40555 * @type {string}
40556 * @default indexed
40557 * @see [Demo: indexed](https://naver.github.io/billboard.js/demo/#Chart.AreaChart)
40558 * @see [Demo: timeseries](https://naver.github.io/billboard.js/demo/#Chart.TimeseriesChart)
40559 * @see [Demo: category](https://naver.github.io/billboard.js/demo/#Data.CategoryData)
40560 * @see [Demo: log](https://naver.github.io/billboard.js/demo/#Axis.LogScales)
40561 * @example
40562 * axis: {
40563 * x: {
40564 * type: "timeseries"
40565 * }
40566 * }
40567 */
40568 axis_x_type: "indexed",
40569 /**
40570 * Set how to treat the timezone of x values.<br>
40571 * If true, treat x value as localtime. If false, convert to UTC internally.
40572 * @name axis․x․localtime
40573 * @memberof Options
40574 * @type {boolean}
40575 * @default true
40576 * @example
40577 * axis: {
40578 * x: {
40579 * localtime: false
40580 * }
40581 * }
40582 */
40583 axis_x_localtime: !0,
40584 /**
40585 * Set category names on category axis.
40586 * This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.
40587 * @name axis․x․categories
40588 * @memberof Options
40589 * @type {Array}
40590 * @default []
40591 * @example
40592 * axis: {
40593 * x: {
40594 * categories: ["Category 1", "Category 2", ...]
40595 * }
40596 * }
40597 */
40598 axis_x_categories: [],
40599 /**
40600 * centerize ticks on category axis.
40601 * @name axis․x․tick․centered
40602 * @memberof Options
40603 * @type {boolean}
40604 * @default false
40605 * @example
40606 * axis: {
40607 * x: {
40608 * tick: {
40609 * centered: true
40610 * }
40611 * }
40612 * }
40613 */
40614 axis_x_tick_centered: !1,
40615 /**
40616 * A function to format tick value. Format string is also available for timeseries data.
40617 * @name axis․x․tick․format
40618 * @memberof Options
40619 * @type {Function|string}
40620 * @default undefined
40621 * @see [D3's time specifier](https://github.com/d3/d3-time-format#locale_format)
40622 * @example
40623 * axis: {
40624 * x: {
40625 * tick: {
40626 * // for timeseries, a 'datetime' object is given as parameter
40627 * format: function(x) {
40628 * return x.getFullYear();
40629 * }
40630 *
40631 * // for category, index(Number) and categoryName(String) are given as parameter
40632 * format: function(index, categoryName) {
40633 * return categoryName.substr(0, 10);
40634 * },
40635 *
40636 * // for timeseries format specifier
40637 * format: "%Y-%m-%d %H:%M:%S"
40638 * }
40639 * }
40640 * }
40641 */
40642 axis_x_tick_format: undefined,
40643 /**
40644 * Setting for culling ticks.
40645 * - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
40646 * This option does not hide the tick lines by default, if want to hide tick lines, set `axis.x.tick.culling.lines=false`.
40647 * - `false`: all of ticks will be shown.<br><br>
40648 * The number of ticks to be shown can be chaned by `axis.x.tick.culling.max`.
40649 * @name axis․x․tick․culling
40650 * @memberof Options
40651 * @type {boolean}
40652 * @default
40653 * `true` for indexed axis and timeseries axis, `false` for category axis
40654 * @example
40655 * axis: {
40656 * x: {
40657 * tick: {
40658 * culling: false
40659 * }
40660 * }
40661 * }
40662 */
40663 axis_x_tick_culling: {},
40664 /**
40665 * The number of tick texts will be adjusted to less than this value.
40666 * @name axis․x․tick․culling․max
40667 * @memberof Options
40668 * @type {number}
40669 * @default 10
40670 * @example
40671 * axis: {
40672 * x: {
40673 * tick: {
40674 * culling: {
40675 * max: 5
40676 * }
40677 * }
40678 * }
40679 * }
40680 */
40681 axis_x_tick_culling_max: 10,
40682 /**
40683 * Control visibility of tick lines within culling option, along with tick text.
40684 * @name axis․x․tick․culling․lines
40685 * @memberof Options
40686 * @type {boolean}
40687 * @default true
40688 * @example
40689 * axis: {
40690 * x: {
40691 * tick: {
40692 * culling: {
40693 * lines: false,
40694 * }
40695 * }
40696 * }
40697 * }
40698 */
40699 axis_x_tick_culling_lines: !0,
40700 /**
40701 * The number of x axis ticks to show.<br><br>
40702 * This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value).
40703 * @name axis․x․tick․count
40704 * @memberof Options
40705 * @type {number}
40706 * @default undefined
40707 * @example
40708 * axis: {
40709 * x: {
40710 * tick: {
40711 * count: 5
40712 * }
40713 * }
40714 * }
40715 */
40716 axis_x_tick_count: undefined,
40717 /**
40718 * Show or hide x axis tick line.
40719 * @name axis․x․tick․show
40720 * @memberof Options
40721 * @type {boolean}
40722 * @default true
40723 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)
40724 * @example
40725 * axis: {
40726 * x: {
40727 * tick: {
40728 * show: false
40729 * }
40730 * }
40731 * }
40732 */
40733 axis_x_tick_show: !0,
40734 /**
40735 * Show or hide x axis tick text.
40736 * @name axis․x․tick․text․show
40737 * @memberof Options
40738 * @type {boolean}
40739 * @default true
40740 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)
40741 * @example
40742 * axis: {
40743 * x: {
40744 * tick: {
40745 * text: {
40746 * show: false
40747 * }
40748 * }
40749 * }
40750 * }
40751 */
40752 axis_x_tick_text_show: !0,
40753 /**
40754 * Set the x Axis tick text's position relatively its original position
40755 * @name axis․x․tick․text․position
40756 * @memberof Options
40757 * @type {object}
40758 * @default {x: 0, y:0}
40759 * @example
40760 * axis: {
40761 * x: {
40762 * tick: {
40763 * text: {
40764 * position: {
40765 * x: 10,
40766 * y: 10
40767 * }
40768 * }
40769 * }
40770 * }
40771 * }
40772 */
40773 axis_x_tick_text_position: {
40774 x: 0,
40775 y: 0
40776 },
40777 /**
40778 * Fit x axis ticks.
40779 * - **true**: ticks will be shown according to x value of the data points.
40780 * - **false**: ticks will be shown as to have same intervals.
40781 * @name axis․x․tick․fit
40782 * @memberof Options
40783 * @type {boolean}
40784 * @default true
40785 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickFitting)
40786 * @see [Demo: for timeseries zoom](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickTimeseries)
40787 * @example
40788 * axis: {
40789 * x: {
40790 * tick: {
40791 * fit: false
40792 * }
40793 * }
40794 * }
40795 */
40796 axis_x_tick_fit: !0,
40797 /**
40798 * Set the x values of ticks manually.<br><br>
40799 * If this option is provided, the position of the ticks will be determined based on those values.<br>
40800 * This option works with `timeseries` data and the x values will be parsed accoding to the type of the value and data.xFormat option.
40801 * @name axis․x․tick․values
40802 * @memberof Options
40803 * @type {Array|Function}
40804 * @default null
40805 * @example
40806 * axis: {
40807 * x: {
40808 * tick: {
40809 * values: [1, 2, 4, 8, 16, 32, ...],
40810 *
40811 * // an Array value should be returned
40812 * values: function() {
40813 * return [ ... ];
40814 * }
40815 * }
40816 * }
40817 * }
40818 */
40819 axis_x_tick_values: null,
40820 /**
40821 * Rotate x axis tick text if there is not enough space for 'category' and 'timeseries' type axis.
40822 * - **NOTE:** The conditions where `autorotate` is enabled are:
40823 * - axis.x.type='category' or 'timeseries
40824 * - axis.x.tick.multiline=false
40825 * - axis.x.tick.culling=false
40826 * - axis.x.tick.fit=true
40827 * - **NOTE:** axis.x.tick.clippath=false is necessary for calculating the overflow padding between the end of x axis and the width of the SVG
40828 * @name axis․x․tick․autorotate
40829 * @memberof Options
40830 * @type {boolean}
40831 * @default false
40832 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickAutorotate)
40833 * @example
40834 * axis: {
40835 * x: {
40836 * tick: {
40837 * rotate: 15,
40838 * autorotate: true,
40839 * multiline: false,
40840 * culling: false,
40841 * fit: true
40842 * },
40843 * clipPath: false
40844 * }
40845 * }
40846 */
40847 axis_x_tick_autorotate: !1,
40848 /**
40849 * Rotate x axis tick text.
40850 * - If you set negative value, it will rotate to opposite direction.
40851 * - Applied when [`axis.rotated`](#.axis%25E2%2580%25A4rotated) option is `false`.
40852 * - As long as `axis_x_tick_fit` is set to `true` it will calculate an overflow for the y2 axis and add this value to the right padding.
40853 * @name axis․x․tick․rotate
40854 * @memberof Options
40855 * @type {number}
40856 * @default 0
40857 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.RotateXAxisTickText)
40858 * @example
40859 * axis: {
40860 * x: {
40861 * tick: {
40862 * rotate: 60
40863 * }
40864 * }
40865 * }
40866 */
40867 axis_x_tick_rotate: 0,
40868 /**
40869 * Show x axis outer tick.
40870 * @name axis․x․tick․outer
40871 * @memberof Options
40872 * @type {boolean}
40873 * @default true
40874 * @example
40875 * axis: {
40876 * x: {
40877 * tick: {
40878 * outer: false
40879 * }
40880 * }
40881 * }
40882 */
40883 axis_x_tick_outer: !0,
40884 /**
40885 * Set tick text to be multiline
40886 * - **NOTE:**
40887 * > When x tick text contains `\n`, it's used as line break and 'axis.x.tick.width' option is ignored.
40888 * @name axis․x․tick․multiline
40889 * @memberof Options
40890 * @type {boolean}
40891 * @default true
40892 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickMultiline)
40893 * @example
40894 * axis: {
40895 * x: {
40896 * tick: {
40897 * multiline: false
40898 * }
40899 * }
40900 * }
40901 * @example
40902 * // example of line break with '\n'
40903 * // In this case, 'axis.x.tick.width' is ignored
40904 * data: {
40905 * x: "x",
40906 * columns: [
40907 * ["x", "long\ntext", "Another\nLong\nText"],
40908 * ...
40909 * ],
40910 * }
40911 */
40912 axis_x_tick_multiline: !0,
40913 /**
40914 * Set tick width
40915 * - **NOTE:**
40916 * > When x tick text contains `\n`, this option is ignored.
40917 * @name axis․x․tick․width
40918 * @memberof Options
40919 * @type {number}
40920 * @default null
40921 * @example
40922 * axis: {
40923 * x: {
40924 * tick: {
40925 * width: 50
40926 * }
40927 * }
40928 * }
40929 */
40930 axis_x_tick_width: null,
40931 /**
40932 * Set to display system tooltip(via 'title' attribute) for tick text
40933 * - **NOTE:** Only available for category axis type (`axis.x.type='category'`)
40934 * @name axis․x․tick․tooltip
40935 * @memberof Options
40936 * @type {boolean}
40937 * @default false
40938 * @example
40939 * axis: {
40940 * x: {
40941 * tick: {
40942 * tooltip: true
40943 * }
40944 * }
40945 * }
40946 */
40947 axis_x_tick_tooltip: !1,
40948 /**
40949 * Set max value of x axis range.
40950 * @name axis․x․max
40951 * @memberof Options
40952 * @property {number} max Set the max value
40953 * @property {boolean} [max.fit=false] When specified `max.value` is greater than the bound data value, setting `true` will make x axis max to be fitted to the bound data max value.
40954 * - **NOTE:** If the bound data max value is greater than the `max.value`, the x axis max will be limited as the given `max.value`.
40955 * @property {number} [max.value] Set the max value
40956 * @example
40957 * axis: {
40958 * x: {
40959 * max: 100,
40960 *
40961 * max: {
40962 * // 'fit=true' will make x axis max to be limited as the bound data value max when 'max.value' is greater.
40963 * // - when bound data max is '10' and max.value: '100' ==> x axis max will be '10'
40964 * // - when bound data max is '1000' and max.value: '100' ==> x axis max will be '100'
40965 * fit: true,
40966 * value: 100
40967 * }
40968 * }
40969 * }
40970 */
40971 axis_x_max: undefined,
40972 /**
40973 * Set min value of x axis range.
40974 * @name axis․x․min
40975 * @memberof Options
40976 * @property {number} min Set the min value
40977 * @property {boolean} [min.fit=false] When specified `min.value` is lower than the bound data value, setting `true` will make x axis min to be fitted to the bound data min value.
40978 * - **NOTE:** If the bound data min value is lower than the `min.value`, the x axis min will be limited as the given `min.value`.
40979 * @property {number} [min.value] Set the min value
40980 * @example
40981 * axis: {
40982 * x: {
40983 * min: -100,
40984 *
40985 * min: {
40986 * // 'fit=true' will make x axis min to be limited as the bound data value min when 'min.value' is lower.
40987 * // - when bound data min is '-10' and min.value: '-100' ==> x axis min will be '-10'
40988 * // - when bound data min is '-1000' and min.value: '-100' ==> x axis min will be '-100'
40989 * fit: true,
40990 * value: -100
40991 * }
40992 * }
40993 * }
40994 */
40995 axis_x_min: undefined,
40996 /**
40997 * Set padding for x axis.<br><br>
40998 * If this option is set, the range of x axis will increase/decrease according to the values.
40999 * If no padding is needed in the rage of x axis, 0 should be set.
41000 * By default, left/right padding are set depending on x axis type or chart types.
41001 * - **NOTE:**
41002 * - The meaning of padding values, differs according axis types:<br>
41003 * - **category/indexed:** The unit of tick value
41004 * ex. the given value `1`, is same as the width of 1 tick width
41005 * - **timeseries:** Numeric time value
41006 * ex. the given value `1000*60*60*24`, which is numeric time equivalent of a day, is same as the width of 1 tick width
41007 * - If want values to be treated as pixels, specify `unit:"px"`.
41008 * - The pixel value will be convered based on the scale values. Hence can not reflect accurate padding result.
41009 * @name axis․x․padding
41010 * @memberof Options
41011 * @type {object|number}
41012 * @default {}
41013 * @example
41014 * axis: {
41015 * x: {
41016 * padding: {
41017 * // when axis type is 'category'
41018 * left: 1, // set left padding width of equivalent value of a tick's width
41019 * right: 0.5 // set right padding width as half of equivalent value of tick's width
41020 *
41021 * // when axis type is 'timeseries'
41022 * left: 1000*60*60*24, // set left padding width of equivalent value of a day tick's width
41023 * right: 1000*60*60*12 // set right padding width as half of equivalent value of a day tick's width
41024 * },
41025 *
41026 * // or set both values at once.
41027 * padding: 10,
41028 *
41029 * // or set padding values as pixel unit.
41030 * padding: {
41031 * left: 100,
41032 * right: 50,
41033 * unit: "px"
41034 * },
41035 * }
41036 * }
41037 */
41038 axis_x_padding: {},
41039 /**
41040 * Set height of x axis.<br><br>
41041 * The height of x axis can be set manually by this option. If you need more space for x axis, please use this option for that. The unit is pixel.
41042 * @name axis․x․height
41043 * @memberof Options
41044 * @type {number}
41045 * @default undefined
41046 * @example
41047 * axis: {
41048 * x: {
41049 * height: 20
41050 * }
41051 * }
41052 */
41053 axis_x_height: undefined,
41054 /**
41055 * Set default extent for subchart and zoom. This can be an array or function that returns an array.
41056 * @name axis․x․extent
41057 * @memberof Options
41058 * @type {Array|Function}
41059 * @default undefined
41060 * @example
41061 * axis: {
41062 * x: {
41063 * // extent range as a pixel value
41064 * extent: [0, 200],
41065 *
41066 * // when axis is 'timeseries', parsable datetime string
41067 * extent: ["2019-03-01", "2019-03-05"],
41068 *
41069 * // return extent value
41070 * extent: function(domain, scale) {
41071 * var extent = domain.map(function(v) {
41072 * return scale(v);
41073 * });
41074 *
41075 * // it should return a format of array
41076 * // ex) [0, 584]
41077 * return extent;
41078 * }
41079 * }
41080 * }
41081 */
41082 axis_x_extent: undefined,
41083 /**
41084 * Set label on x axis.<br><br>
41085 * You can set x axis label and change its position by this option.
41086 * `string` and `object` can be passed and we can change the poisiton by passing object that has position key.<br>
41087 * Available position differs according to the axis direction (vertical or horizontal).
41088 * If string set, the position will be the default.
41089 *
41090 * - **If it's horizontal axis:**
41091 * - inner-right [default]
41092 * - inner-center
41093 * - inner-left
41094 * - outer-right
41095 * - outer-center
41096 * - outer-left
41097 * - **If it's vertical axis:**
41098 * - inner-top [default]
41099 * - inner-middle
41100 * - inner-bottom
41101 * - outer-top
41102 * - outer-middle
41103 * - outer-bottom
41104 * @name axis․x․label
41105 * @memberof Options
41106 * @type {string|object}
41107 * @default undefined
41108 * @example
41109 * axis: {
41110 * x: {
41111 * label: "Your X Axis"
41112 * }
41113 * }
41114 *
41115 * axis: {
41116 * x: {
41117 * label: {
41118 * text: "Your X Axis",
41119 * position: "outer-center"
41120 * }
41121 * }
41122 * }
41123 */
41124 axis_x_label: {},
41125 /**
41126 * Set additional axes for x Axis.
41127 * - **NOTE:** Axis' scale is based on x Axis value if domain option isn't set.
41128 *
41129 * Each axis object should consist with following options:
41130 *
41131 * | Name | Type | Default | Description |
41132 * | --- | --- | --- | --- |
41133 * | domain | Array | - | Set the domain value |
41134 * | tick.outer | boolean | true | Show outer tick |
41135 * | tick.format | Function | - | Set formatter for tick text |
41136 * | tick.count | Number | - | Set the number of y axis ticks |
41137 * | tick.values | Array | - | Set tick values manually |
41138 * @name axis․x․axes
41139 * @memberof Options
41140 * @type {Array}
41141 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.MultiAxes)
41142 * @see [Demo: Domain](https://naver.github.io/billboard.js/demo/#Axis.MultiAxesDomain)
41143 * @example
41144 * x: {
41145 * axes: [
41146 * {
41147 * // if set, will not be correlated with the main x Axis domain value
41148 * domain: [0, 1000],
41149 * tick: {
41150 * outer: false,
41151 * format: function(x) {
41152 * return x + "%";
41153 * },
41154 * count: 2,
41155 * values: [10, 20, 30]
41156 * }
41157 * },
41158 * ...
41159 * ]
41160 * }
41161 */
41162 axis_x_axes: []
41163});
41164;// CONCATENATED MODULE: ./src/config/Options/axis/y.ts
41165/**
41166 * Copyright (c) 2017 ~ present NAVER Corp.
41167 * billboard.js project is licensed under the MIT license
41168 */
41169/**
41170 * y Axis config options
41171 */
41172/* harmony default export */ var y = ({
41173 /**
41174 * Set clip-path attribute for y axis element
41175 * - **NOTE**: `clip-path` attribute for y Axis is set only when `axis.y.inner` option is true.
41176 * @name axis․y․clipPath
41177 * @memberof Options
41178 * @type {boolean}
41179 * @default true
41180 * @example
41181 * // don't set 'clip-path' attribute
41182 * clipPath: false
41183 */
41184 axis_y_clipPath: !0,
41185 /**
41186 * Show or hide y axis.
41187 * @name axis․y․show
41188 * @memberof Options
41189 * @type {boolean}
41190 * @default true
41191 * @example
41192 * axis: {
41193 * y: {
41194 * show: false
41195 * }
41196 * }
41197 */
41198 axis_y_show: !0,
41199 /**
41200 * Set type of y axis.<br><br>
41201 * **Available Values:**
41202 * - indexed
41203 * - log
41204 * - timeseries
41205 *
41206 * **NOTE:**<br>
41207 * - **log** type:
41208 * - the bound data values must be exclusively-positive.
41209 * - y axis min value should be >= 0.
41210 * - [`data.groups`](#.data%25E2%2580%25A4groups)(stacked data) option aren't supported.
41211 *
41212 * @name axis․y․type
41213 * @memberof Options
41214 * @type {string}
41215 * @default "indexed"
41216 * @see [Demo: log](https://naver.github.io/billboard.js/demo/#Axis.LogScales)
41217 * @example
41218 * axis: {
41219 * y: {
41220 * type: "log"
41221 * }
41222 * }
41223 */
41224 axis_y_type: "indexed",
41225 /**
41226 * Set max value of y axis.
41227 * - **NOTE:** Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).
41228 * @name axis․y․max
41229 * @memberof Options
41230 * @type {number}
41231 * @default undefined
41232 * @example
41233 * axis: {
41234 * y: {
41235 * max: 1000
41236 * }
41237 * }
41238 */
41239 axis_y_max: undefined,
41240 /**
41241 * Set min value of y axis.
41242 * - **NOTE:**
41243 * Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).
41244 * @name axis․y․min
41245 * @memberof Options
41246 * @type {number}
41247 * @default undefined
41248 * @example
41249 * axis: {
41250 * y: {
41251 * min: 1000
41252 * }
41253 * }
41254 */
41255 axis_y_min: undefined,
41256 /**
41257 * Change the direction of y axis.<br><br>
41258 * If true set, the direction will be from the top to the bottom.
41259 * @name axis․y․inverted
41260 * @memberof Options
41261 * @type {boolean}
41262 * @default false
41263 * @example
41264 * axis: {
41265 * y: {
41266 * inverted: true
41267 * }
41268 * }
41269 */
41270 axis_y_inverted: !1,
41271 /**
41272 * Set center value of y axis.
41273 * @name axis․y․center
41274 * @memberof Options
41275 * @type {number}
41276 * @default undefined
41277 * @example
41278 * axis: {
41279 * y: {
41280 * center: 0
41281 * }
41282 * }
41283 */
41284 axis_y_center: undefined,
41285 /**
41286 * Show y axis inside of the chart.
41287 * @name axis․y․inner
41288 * @memberof Options
41289 * @type {boolean}
41290 * @default false
41291 * @example
41292 * axis: {
41293 * y: {
41294 * inner: true
41295 * }
41296 * }
41297 */
41298 axis_y_inner: !1,
41299 /**
41300 * Set label on y axis.<br><br>
41301 * You can set y axis label and change its position by this option. This option works in the same way as [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label).
41302 * @name axis․y․label
41303 * @memberof Options
41304 * @type {string|object}
41305 * @default {}
41306 * @see [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label) for position string value.
41307 * @example
41308 * axis: {
41309 * y: {
41310 * label: "Your Y Axis"
41311 * }
41312 * }
41313 *
41314 * axis: {
41315 * y: {
41316 * label: {
41317 * text: "Your Y Axis",
41318 * position: "outer-middle"
41319 * }
41320 * }
41321 * }
41322 */
41323 axis_y_label: {},
41324 /**
41325 * Set formatter for y axis tick text.<br><br>
41326 * This option accepts d3.format object as well as a function you define.
41327 * @name axis․y․tick․format
41328 * @memberof Options
41329 * @type {Function}
41330 * @default undefined
41331 * @example
41332 * axis: {
41333 * y: {
41334 * tick: {
41335 * format: function(x) {
41336 * return x.getFullYear();
41337 * }
41338 * }
41339 * }
41340 * }
41341 */
41342 axis_y_tick_format: undefined,
41343 /**
41344 * Setting for culling ticks.
41345 * - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
41346 * This option does not hide the tick lines by default, if want to hide tick lines, set `axis.y.tick.culling.lines=false`.
41347 * - `false`: all of ticks will be shown.<br><br>
41348 * The number of ticks to be shown can be chaned by `axis.y.tick.culling.max`.
41349 * @name axis․y․tick․culling
41350 * @memberof Options
41351 * @type {boolean}
41352 * @default false
41353 * @example
41354 * axis: {
41355 * y: {
41356 * tick: {
41357 * culling: false
41358 * }
41359 * }
41360 * }
41361 */
41362 axis_y_tick_culling: !1,
41363 /**
41364 * The number of tick texts will be adjusted to less than this value.
41365 * @name axis․y․tick․culling․max
41366 * @memberof Options
41367 * @type {number}
41368 * @default 5
41369 * @example
41370 * axis: {
41371 * y: {
41372 * tick: {
41373 * culling: {
41374 * max: 5
41375 * }
41376 * }
41377 * }
41378 * }
41379 */
41380 axis_y_tick_culling_max: 5,
41381 /**
41382 * Control visibility of tick lines within culling option, along with tick text.
41383 * @name axis․y․tick․culling․lines
41384 * @memberof Options
41385 * @type {boolean}
41386 * @default true
41387 * @example
41388 * axis: {
41389 * y: {
41390 * tick: {
41391 * culling: {
41392 * lines: false,
41393 * }
41394 * }
41395 * }
41396 * }
41397 */
41398 axis_y_tick_culling_lines: !0,
41399 /**
41400 * Show y axis outer tick.
41401 * @name axis․y․tick․outer
41402 * @memberof Options
41403 * @type {boolean}
41404 * @default true
41405 * @example
41406 * axis: {
41407 * y: {
41408 * tick: {
41409 * outer: false
41410 * }
41411 * }
41412 * }
41413 */
41414 axis_y_tick_outer: !0,
41415 /**
41416 * Set y axis tick values manually.
41417 * @name axis․y․tick․values
41418 * @memberof Options
41419 * @type {Array|Function}
41420 * @default null
41421 * @example
41422 * axis: {
41423 * y: {
41424 * tick: {
41425 * values: [100, 1000, 10000],
41426 *
41427 * // an Array value should be returned
41428 * values: function() {
41429 * return [ ... ];
41430 * }
41431 * }
41432 * }
41433 * }
41434 */
41435 axis_y_tick_values: null,
41436 /**
41437 * Rotate y axis tick text.
41438 * - If you set negative value, it will rotate to opposite direction.
41439 * - Applied when [`axis.rotated`](#.axis%25E2%2580%25A4rotated) option is `true`.
41440 * @name axis․y․tick․rotate
41441 * @memberof Options
41442 * @type {number}
41443 * @default 0
41444 * @example
41445 * axis: {
41446 * y: {
41447 * tick: {
41448 * rotate: 60
41449 * }
41450 * }
41451 * }
41452 */
41453 axis_y_tick_rotate: 0,
41454 /**
41455 * Set the number of y axis ticks.<br><br>
41456 * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.
41457 * @name axis․y․tick․count
41458 * @memberof Options
41459 * @type {number}
41460 * @default undefined
41461 * @example
41462 * axis: {
41463 * y: {
41464 * tick: {
41465 * count: 5
41466 * }
41467 * }
41468 * }
41469 */
41470 axis_y_tick_count: undefined,
41471 /**
41472 * Show or hide y axis tick line.
41473 * @name axis․y․tick․show
41474 * @memberof Options
41475 * @type {boolean}
41476 * @default true
41477 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)
41478 * @example
41479 * axis: {
41480 * y: {
41481 * tick: {
41482 * show: false
41483 * }
41484 * }
41485 * }
41486 */
41487 axis_y_tick_show: !0,
41488 /**
41489 * Set axis tick step(interval) size.
41490 * - **NOTE:** Will be ignored if `axis.y.tick.count` or `axis.y.tick.values` options are set.
41491 * @name axis․y․tick․stepSize
41492 * @memberof Options
41493 * @type {number}
41494 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.StepSizeForYAxis)
41495 * @example
41496 * axis: {
41497 * y: {
41498 * tick: {
41499 * // tick value will step as indicated interval value.
41500 * // ex) 'stepSize=15' ==> [0, 15, 30, 45, 60]
41501 * stepSize: 15
41502 * }
41503 * }
41504 * }
41505 */
41506 axis_y_tick_stepSize: null,
41507 /**
41508 * Show or hide y axis tick text.
41509 * @name axis․y․tick․text․show
41510 * @memberof Options
41511 * @type {boolean}
41512 * @default true
41513 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)
41514 * @example
41515 * axis: {
41516 * y: {
41517 * tick: {
41518 * text: {
41519 * show: false
41520 * }
41521 * }
41522 * }
41523 * }
41524 */
41525 axis_y_tick_text_show: !0,
41526 /**
41527 * Set the y Axis tick text's position relatively its original position
41528 * @name axis․y․tick․text․position
41529 * @memberof Options
41530 * @type {object}
41531 * @default {x: 0, y:0}
41532 * @example
41533 * axis: {
41534 * y: {
41535 * tick: {
41536 * text: {
41537 * position: {
41538 * x: 10,
41539 * y: 10
41540 * }
41541 * }
41542 * }
41543 * }
41544 * }
41545 */
41546 axis_y_tick_text_position: {
41547 x: 0,
41548 y: 0
41549 },
41550 /**
41551 * Set the number of y axis ticks.<br><br>
41552 * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.
41553 * @name axis․y․tick․time
41554 * @memberof Options
41555 * @private
41556 * @type {object}
41557 * @property {object} time time object
41558 * @property {Function} [time.value] D3's time interval function (https://github.com/d3/d3-time#intervals)
41559 * @example
41560 * axis: {
41561 * y: {
41562 * tick: {
41563 * time: {
41564 * // ticks at 15-minute intervals
41565 * // https://github.com/d3/d3-scale/blob/master/README.md#time_ticks
41566 * value: d3.timeMinute.every(15)
41567 * }
41568 * }
41569 * }
41570 * }
41571 */
41572 // @TODO: not fully implemented yet
41573 axis_y_tick_time_value: undefined,
41574 /**
41575 * Set padding for y axis.<br><br>
41576 * You can set padding for y axis to create more space on the edge of the axis.
41577 * This option accepts object and it can include top and bottom. top, bottom will be treated as pixels.
41578 *
41579 * - **NOTE:**
41580 * - Given values are translated relative to the y Axis domain value for padding
41581 * - For area and bar type charts, [area.zerobased](#.area) or [bar.zerobased](#.bar) options should be set to 'false` to get padded bottom.
41582 * @name axis․y․padding
41583 * @memberof Options
41584 * @type {object|number}
41585 * @default {}
41586 * @example
41587 * axis: {
41588 * y: {
41589 * padding: {
41590 * top: 0,
41591 * bottom: 0
41592 * },
41593 *
41594 * // or set both values at once.
41595 * padding: 10
41596 * }
41597 * }
41598 */
41599 axis_y_padding: {},
41600 /**
41601 * Set default range of y axis.<br><br>
41602 * This option set the default value for y axis when there is no data on init.
41603 * @name axis․y․default
41604 * @memberof Options
41605 * @type {Array}
41606 * @default undefined
41607 * @example
41608 * axis: {
41609 * y: {
41610 * default: [0, 1000]
41611 * }
41612 * }
41613 */
41614 axis_y_default: undefined,
41615 /**
41616 * Set additional axes for y Axis.
41617 * - **NOTE:** Axis' scale is based on y Axis value if domain option isn't set.
41618 *
41619 * Each axis object should consist with following options:
41620 *
41621 * | Name | Type | Default | Description |
41622 * | --- | --- | --- | --- |
41623 * | domain | Array | - | Set the domain value |
41624 * | tick.outer | boolean | true | Show outer tick |
41625 * | tick.format | Function | - | Set formatter for tick text |
41626 * | tick.count | Number | - | Set the number of y axis ticks |
41627 * | tick.values | Array | - | Set tick values manually |
41628 * @name axis․y․axes
41629 * @memberof Options
41630 * @type {Array}
41631 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.MultiAxes)
41632 * @see [Demo: Domain](https://naver.github.io/billboard.js/demo/#Axis.MultiAxesDomain)
41633 * @example
41634 * y: {
41635 * axes: [
41636 * {
41637 * // if set, will not be correlated with the main y Axis domain value
41638 * domain: [0, 1000],
41639 * tick: {
41640 * outer: false,
41641 * format: function(x) {
41642 * return x + "%";
41643 * },
41644 * count: 2,
41645 * values: [10, 20, 30]
41646 * }
41647 * },
41648 * ...
41649 * ]
41650 * }
41651 */
41652 axis_y_axes: []
41653});
41654;// CONCATENATED MODULE: ./src/config/Options/axis/y2.ts
41655/**
41656 * Copyright (c) 2017 ~ present NAVER Corp.
41657 * billboard.js project is licensed under the MIT license
41658 */
41659/**
41660 * y2 Axis config options
41661 */
41662/* harmony default export */ var y2 = ({
41663 /**
41664 * Show or hide y2 axis.
41665 * - **NOTE**:
41666 * - When set to `false` will not generate y2 axis node. In this case, all 'y2' axis related functionality won't work properly.
41667 * - If need to use 'y2' related options while y2 isn't visible, set the value `true` and control visibility by css display property.
41668 * @name axis․y2․show
41669 * @memberof Options
41670 * @type {boolean}
41671 * @default false
41672 * @example
41673 * axis: {
41674 * y2: {
41675 * show: true
41676 * }
41677 * }
41678 */
41679 axis_y2_show: !1,
41680 /**
41681 * Set type of y2 axis.<br><br>
41682 * **Available Values:**
41683 * - indexed
41684 * - log
41685 * - timeseries
41686 *
41687 * **NOTE:**<br>
41688 * - **log** type:
41689 * - the bound data values must be exclusively-positive.
41690 * - y2 axis min value should be >= 0.
41691 * - [`data.groups`](#.data%25E2%2580%25A4groups)(stacked data) option aren't supported.
41692 *
41693 * @name axis․y2․type
41694 * @memberof Options
41695 * @type {string}
41696 * @default "indexed"
41697 * @see [Demo: log](https://naver.github.io/billboard.js/demo/#Axis.LogScales)
41698 * @example
41699 * axis: {
41700 * y2: {
41701 * type: "indexed"
41702 * }
41703 * }
41704 */
41705 axis_y2_type: "indexed",
41706 /**
41707 * Set max value of y2 axis.
41708 * @name axis․y2․max
41709 * @memberof Options
41710 * @type {number}
41711 * @default undefined
41712 * @example
41713 * axis: {
41714 * y2: {
41715 * max: 1000
41716 * }
41717 * }
41718 */
41719 axis_y2_max: undefined,
41720 /**
41721 * Set min value of y2 axis.
41722 * @name axis․y2․min
41723 * @memberof Options
41724 * @type {number}
41725 * @default undefined
41726 * @example
41727 * axis: {
41728 * y2: {
41729 * min: -1000
41730 * }
41731 * }
41732 */
41733 axis_y2_min: undefined,
41734 /**
41735 * Change the direction of y2 axis.<br><br>
41736 * If true set, the direction will be from the top to the bottom.
41737 * @name axis․y2․inverted
41738 * @memberof Options
41739 * @type {boolean}
41740 * @default false
41741 * @example
41742 * axis: {
41743 * y2: {
41744 * inverted: true
41745 * }
41746 * }
41747 */
41748 axis_y2_inverted: !1,
41749 /**
41750 * Set center value of y2 axis.
41751 * @name axis․y2․center
41752 * @memberof Options
41753 * @type {number}
41754 * @default undefined
41755 * @example
41756 * axis: {
41757 * y2: {
41758 * center: 0
41759 * }
41760 * }
41761 */
41762 axis_y2_center: undefined,
41763 /**
41764 * Show y2 axis inside of the chart.
41765 * @name axis․y2․inner
41766 * @memberof Options
41767 * @type {boolean}
41768 * @default false
41769 * @example
41770 * axis: {
41771 * y2: {
41772 * inner: true
41773 * }
41774 * }
41775 */
41776 axis_y2_inner: !1,
41777 /**
41778 * Set label on y2 axis.<br><br>
41779 * You can set y2 axis label and change its position by this option. This option works in the same way as [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label).
41780 * @name axis․y2․label
41781 * @memberof Options
41782 * @type {string|object}
41783 * @default {}
41784 * @see [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label) for position string value.
41785 * @example
41786 * axis: {
41787 * y2: {
41788 * label: "Your Y2 Axis"
41789 * }
41790 * }
41791 *
41792 * axis: {
41793 * y2: {
41794 * label: {
41795 * text: "Your Y2 Axis",
41796 * position: "outer-middle"
41797 * }
41798 * }
41799 * }
41800 */
41801 axis_y2_label: {},
41802 /**
41803 * Set formatter for y2 axis tick text.<br><br>
41804 * This option works in the same way as axis.y.format.
41805 * @name axis․y2․tick․format
41806 * @memberof Options
41807 * @type {Function}
41808 * @default undefined
41809 * @example
41810 * axis: {
41811 * y2: {
41812 * tick: {
41813 * format: d3.format("$,")
41814 * //or format: function(d) { return "$" + d; }
41815 * }
41816 * }
41817 * }
41818 */
41819 axis_y2_tick_format: undefined,
41820 /**
41821 * Setting for culling ticks.
41822 * - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
41823 * This option does not hide the tick lines by default, if want to hide tick lines, set `axis.y2.tick.culling.lines=false`.
41824 * - `false`: all of ticks will be shown.<br><br>
41825 * The number of ticks to be shown can be chaned by `axis.y2.tick.culling.max`.
41826 * @name axis․y2․tick․culling
41827 * @memberof Options
41828 * @type {boolean}
41829 * @default false
41830 * @example
41831 * axis: {
41832 * y2: {
41833 * tick: {
41834 * culling: false
41835 * }
41836 * }
41837 * }
41838 */
41839 axis_y2_tick_culling: !1,
41840 /**
41841 * The number of tick texts will be adjusted to less than this value.
41842 * @name axis․y2․tick․culling․max
41843 * @memberof Options
41844 * @type {number}
41845 * @default 5
41846 * @example
41847 * axis: {
41848 * y2: {
41849 * tick: {
41850 * culling: {
41851 * max: 5
41852 * }
41853 * }
41854 * }
41855 * }
41856 */
41857 axis_y2_tick_culling_max: 5,
41858 /**
41859 * Control visibility of tick lines within culling option, along with tick text.
41860 * @name axis․y2․tick․culling․lines
41861 * @memberof Options
41862 * @type {boolean}
41863 * @default true
41864 * @example
41865 * axis: {
41866 * y2: {
41867 * tick: {
41868 * culling: {
41869 * lines: false,
41870 * }
41871 * }
41872 * }
41873 * }
41874 */
41875 axis_y2_tick_culling_lines: !0,
41876 /**
41877 * Show or hide y2 axis outer tick.
41878 * @name axis․y2․tick․outer
41879 * @memberof Options
41880 * @type {boolean}
41881 * @default true
41882 * @example
41883 * axis: {
41884 * y2: {
41885 * tick: {
41886 * outer: false
41887 * }
41888 * }
41889 * }
41890 */
41891 axis_y2_tick_outer: !0,
41892 /**
41893 * Set y2 axis tick values manually.
41894 * @name axis․y2․tick․values
41895 * @memberof Options
41896 * @type {Array|Function}
41897 * @default null
41898 * @example
41899 * axis: {
41900 * y2: {
41901 * tick: {
41902 * values: [100, 1000, 10000],
41903 *
41904 * // an Array value should be returned
41905 * values: function() {
41906 * return [ ... ];
41907 * }
41908 * }
41909 * }
41910 * }
41911 */
41912 axis_y2_tick_values: null,
41913 /**
41914 * Rotate y2 axis tick text.
41915 * - If you set negative value, it will rotate to opposite direction.
41916 * - Applied when [`axis.rotated`](#.axis%25E2%2580%25A4rotated) option is `true`.
41917 * @name axis․y2․tick․rotate
41918 * @memberof Options
41919 * @type {number}
41920 * @default 0
41921 * @example
41922 * axis: {
41923 * y2: {
41924 * tick: {
41925 * rotate: 60
41926 * }
41927 * }
41928 * }
41929 */
41930 axis_y2_tick_rotate: 0,
41931 /**
41932 * Set the number of y2 axis ticks.
41933 * - **NOTE:** This works in the same way as axis.y.tick.count.
41934 * @name axis․y2․tick․count
41935 * @memberof Options
41936 * @type {number}
41937 * @default undefined
41938 * @example
41939 * axis: {
41940 * y2: {
41941 * tick: {
41942 * count: 5
41943 * }
41944 * }
41945 * }
41946 */
41947 axis_y2_tick_count: undefined,
41948 /**
41949 * Show or hide y2 axis tick line.
41950 * @name axis․y2․tick․show
41951 * @memberof Options
41952 * @type {boolean}
41953 * @default true
41954 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)
41955 * @example
41956 * axis: {
41957 * y2: {
41958 * tick: {
41959 * show: false
41960 * }
41961 * }
41962 * }
41963 */
41964 axis_y2_tick_show: !0,
41965 /**
41966 * Set axis tick step(interval) size.
41967 * - **NOTE:** Will be ignored if `axis.y2.tick.count` or `axis.y2.tick.values` options are set.
41968 * @name axis․y2․tick․stepSize
41969 * @memberof Options
41970 * @type {number}
41971 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.StepSizeForYAxis)
41972 * @example
41973 * axis: {
41974 * y2: {
41975 * tick: {
41976 * // tick value will step as indicated interval value.
41977 * // ex) 'stepSize=15' ==> [0, 15, 30, 45, 60]
41978 * stepSize: 15
41979 * }
41980 * }
41981 * }
41982 */
41983 axis_y2_tick_stepSize: null,
41984 /**
41985 * Show or hide y2 axis tick text.
41986 * @name axis․y2․tick․text․show
41987 * @memberof Options
41988 * @type {boolean}
41989 * @default true
41990 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)
41991 * @example
41992 * axis: {
41993 * y2: {
41994 * tick: {
41995 * text: {
41996 * show: false
41997 * }
41998 * }
41999 * }
42000 * }
42001 */
42002 axis_y2_tick_text_show: !0,
42003 /**
42004 * Set the y2 Axis tick text's position relatively its original position
42005 * @name axis․y2․tick․text․position
42006 * @memberof Options
42007 * @type {object}
42008 * @default {x: 0, y:0}
42009 * @example
42010 * axis: {
42011 * y2: {
42012 * tick: {
42013 * text: {
42014 * position: {
42015 * x: 10,
42016 * y: 10
42017 * }
42018 * }
42019 * }
42020 * }
42021 * }
42022 */
42023 axis_y2_tick_text_position: {
42024 x: 0,
42025 y: 0
42026 },
42027 /**
42028 * Set padding for y2 axis.<br><br>
42029 * You can set padding for y2 axis to create more space on the edge of the axis.
42030 * This option accepts object and it can include top and bottom. top, bottom will be treated as pixels.
42031 *
42032 * - **NOTE:**
42033 * - Given values are translated relative to the y2 Axis domain value for padding
42034 * - For area and bar type charts, [area.zerobased](#.area) or [bar.zerobased](#.bar) options should be set to 'false` to get padded bottom.
42035 * @name axis․y2․padding
42036 * @memberof Options
42037 * @type {object|number}
42038 * @default {}
42039 * @example
42040 * axis: {
42041 * y2: {
42042 * padding: {
42043 * top: 100,
42044 * bottom: 100
42045 * }
42046 *
42047 * // or set both values at once.
42048 * padding: 10
42049 * }
42050 */
42051 axis_y2_padding: {},
42052 /**
42053 * Set default range of y2 axis.<br><br>
42054 * This option set the default value for y2 axis when there is no data on init.
42055 * @name axis․y2․default
42056 * @memberof Options
42057 * @type {Array}
42058 * @default undefined
42059 * @example
42060 * axis: {
42061 * y2: {
42062 * default: [0, 1000]
42063 * }
42064 * }
42065 */
42066 axis_y2_default: undefined,
42067 /**
42068 * Set additional axes for y2 Axis.
42069 * - **NOTE:** Axis' scale is based on y2 Axis value if domain option isn't set.
42070 *
42071 * Each axis object should consist with following options:
42072 *
42073 * | Name | Type | Default | Description |
42074 * | --- | --- | --- | --- |
42075 * | domain | Array | - | Set the domain value |
42076 * | tick.outer | boolean | true | Show outer tick |
42077 * | tick.format | Function | - | Set formatter for tick text |
42078 * | tick.count | Number | - | Set the number of y axis ticks |
42079 * | tick.values | Array | - | Set tick values manually |
42080 * @name axis․y2․axes
42081 * @memberof Options
42082 * @type {Array}
42083 * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.MultiAxes)
42084 * @see [Demo: Domain](https://naver.github.io/billboard.js/demo/#Axis.MultiAxesDomain)
42085 * @example
42086 * y2: {
42087 * axes: [
42088 * {
42089 * // if set, will not be correlated with the main y2 Axis domain value
42090 * domain: [0, 1000],
42091 * tick: {
42092 * outer: false,
42093 * format: function(x) {
42094 * return x + "%";
42095 * },
42096 * count: 2,
42097 * values: [10, 20, 30]
42098 * }
42099 * },
42100 * ...
42101 * ]
42102 * }
42103 */
42104 axis_y2_axes: []
42105});
42106;// CONCATENATED MODULE: ./src/config/Options/axis/axis.ts
42107
42108function axis_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
42109function axis_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? axis_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : axis_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
42110/**
42111 * Copyright (c) 2017 ~ present NAVER Corp.
42112 * billboard.js project is licensed under the MIT license
42113 */
42114
42115
42116
42117
42118/**
42119 * y Axis config options
42120 */
42121/* harmony default export */ var Options_axis_axis = (axis_objectSpread(axis_objectSpread(axis_objectSpread({
42122 /**
42123 * Switch x and y axis position.
42124 * @name axis․rotated
42125 * @memberof Options
42126 * @type {boolean}
42127 * @default false
42128 * @example
42129 * axis: {
42130 * rotated: true
42131 * }
42132 */
42133 axis_rotated: !1
42134}, axis_x), y), y2));
42135;// CONCATENATED MODULE: ./src/config/Options/common/grid.ts
42136/**
42137 * Copyright (c) 2017 ~ present NAVER Corp.
42138 * billboard.js project is licensed under the MIT license
42139 */
42140/**
42141 * grid config options
42142 */
42143
42144/* harmony default export */ var common_grid = ({
42145 /**
42146 * Set related options
42147 * @name grid
42148 * @memberof Options
42149 * @type {object}
42150 * @property {boolean} [front=false] Set 'grid & focus lines' to be positioned over grid lines and chart elements.
42151 * @property {object} x Grid x object
42152 * @property {boolean} [x.show=false] Show grids along x axis.
42153 * @property {Array} [x.lines=[]] Show additional grid lines along x axis.<br>
42154 * This option accepts array including object that has value, text, position and class. text, position and class are optional. For position, start, middle and end (default) are available.
42155 * If x axis is category axis, value can be category name. If x axis is timeseries axis, value can be date string, Date object and unixtime integer.
42156 * @property {object} y Grid y object
42157 * @property {boolean} [y.show=false] Show grids along x axis.
42158 * @property {Array} [y.lines=[]] Show additional grid lines along y axis.<br>
42159 * This option accepts array including object that has value, text, position and class.
42160 * @property {number} [y.ticks=undefined] Number of y grids to be shown.
42161 * @property {object} focus Grid focus object
42162 * @property {boolean} [focus.edge=false] Show edged focus grid line.<br>**NOTE:** Available when [`tooltip.grouped=false`](#.tooltip) option is set.
42163 * @property {boolean} [focus.show=true] Show grid line when focus.
42164 * @property {boolean} [focus.y=false] Show y coordinate focus grid line.<br>**NOTE:** Available when [`tooltip.grouped=false`](#.tooltip) option is set.
42165 * @property {object} lines Grid lines object
42166 * @property {boolean} [lines.front=true] Set grid lines to be positioned over chart elements.
42167 * @default undefined
42168 * @see [Demo](https://naver.github.io/billboard.js/demo/#Grid.GridLines)
42169 * @see [Demo: X Grid Lines](https://naver.github.io/billboard.js/demo/#Grid.OptionalXGridLines)
42170 * @see [Demo: Y Grid Lines](https://naver.github.io/billboard.js/demo/#Grid.OptionalYGridLines)
42171 * @example
42172 * grid: {
42173 * x: {
42174 * show: true,
42175 * lines: [
42176 * {value: 2, text: "Label on 2"},
42177 * {value: 5, text: "Label on 5", class: "label-5"},
42178 * {value: 6, text: "Label on 6", position: "start"}
42179 * ]
42180 * },
42181 * y: {
42182 * show: true,
42183 * lines: [
42184 * {value: 100, text: "Label on 100"},
42185 * {value: 200, text: "Label on 200", class: "label-200"},
42186 * {value: 300, text: "Label on 300", position: 'middle'}
42187 * ],
42188 * ticks: 5
42189 * },
42190 * front: true,
42191 * focus: {
42192 * show: false,
42193 *
42194 * // Below options are available when 'tooltip.grouped=false' option is set
42195 * edge: true,
42196 * y: true
42197 * },
42198 * lines: {
42199 * front: false
42200 * }
42201 * }
42202 */
42203 grid_x_show: !1,
42204 grid_x_type: "tick",
42205 grid_x_lines: [],
42206 grid_y_show: !1,
42207 grid_y_lines: [],
42208 grid_y_ticks: undefined,
42209 grid_focus_edge: !1,
42210 grid_focus_show: !0,
42211 grid_focus_y: !1,
42212 grid_front: !1,
42213 grid_lines_front: !0
42214});
42215;// CONCATENATED MODULE: ./src/config/resolver/axis.ts
42216/**
42217 * Copyright (c) 2017 ~ present NAVER Corp.
42218 * billboard.js project is licensed under the MIT license
42219 */
42220/**
42221 * Modules exports for Axis based chart
42222 */
42223// Chart
42224
42225
42226
42227
42228
42229
42230
42231
42232
42233// ChartInternal
42234
42235
42236
42237
42238
42239
42240
42241
42242// Axis based options
42243
42244
42245
42246var api = [api_axis, api_category, grid_x, grid_y, flow, group, api_regions, x];
42247var internal = [Axis, clip, eventrect, interactions_flow, grid, region, size_axis];
42248var options = [data_axis, Options_axis_axis, common_grid];
42249;// CONCATENATED MODULE: ./node_modules/d3-shape/src/array.js
42250var slice = Array.prototype.slice;
42251/* harmony default export */ function d3_shape_src_array(x) {
42252 return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like
42253 : Array.from(x); // Map, Set, iterable, string, or anything else
42254}
42255;// CONCATENATED MODULE: ./node_modules/d3-shape/src/constant.js
42256/* harmony default export */ function d3_shape_src_constant(x) {
42257 return function () {
42258 return x;
42259 };
42260}
42261;// CONCATENATED MODULE: ./node_modules/d3-shape/src/descending.js
42262/* harmony default export */ function src_descending(a, b) {
42263 return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
42264}
42265;// CONCATENATED MODULE: ./node_modules/d3-shape/src/identity.js
42266/* harmony default export */ function d3_shape_src_identity(d) {
42267 return d;
42268}
42269;// CONCATENATED MODULE: ./node_modules/d3-shape/src/pie.js
42270
42271
42272
42273
42274
42275/* harmony default export */ function pie() {
42276 var value = d3_shape_src_identity,
42277 sortValues = src_descending,
42278 sort = null,
42279 startAngle = d3_shape_src_constant(0),
42280 endAngle = d3_shape_src_constant(tau),
42281 padAngle = d3_shape_src_constant(0);
42282 function pie(data) {
42283 var i,
42284 n = (data = d3_shape_src_array(data)).length,
42285 j,
42286 k,
42287 sum = 0,
42288 index = Array(n),
42289 arcs = Array(n),
42290 a0 = +startAngle.apply(this, arguments),
42291 da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),
42292 a1,
42293 p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),
42294 pa = p * (da < 0 ? -1 : 1),
42295 v;
42296 for (i = 0; i < n; ++i) {
42297 if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {
42298 sum += v;
42299 }
42300 }
42301
42302 // Optionally sort the arcs by previously-computed values or by data.
42303 if (sortValues != null) index.sort(function (i, j) {
42304 return sortValues(arcs[i], arcs[j]);
42305 });else if (sort != null) index.sort(function (i, j) {
42306 return sort(data[i], data[j]);
42307 });
42308
42309 // Compute the arcs! They are stored in the original data's order.
42310 for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {
42311 j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {
42312 data: data[j],
42313 index: i,
42314 value: v,
42315 startAngle: a0,
42316 endAngle: a1,
42317 padAngle: p
42318 };
42319 }
42320 return arcs;
42321 }
42322 pie.value = function (_) {
42323 return arguments.length ? (value = typeof _ === "function" ? _ : d3_shape_src_constant(+_), pie) : value;
42324 };
42325 pie.sortValues = function (_) {
42326 return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;
42327 };
42328 pie.sort = function (_) {
42329 return arguments.length ? (sort = _, sortValues = null, pie) : sort;
42330 };
42331 pie.startAngle = function (_) {
42332 return arguments.length ? (startAngle = typeof _ === "function" ? _ : d3_shape_src_constant(+_), pie) : startAngle;
42333 };
42334 pie.endAngle = function (_) {
42335 return arguments.length ? (endAngle = typeof _ === "function" ? _ : d3_shape_src_constant(+_), pie) : endAngle;
42336 };
42337 pie.padAngle = function (_) {
42338 return arguments.length ? (padAngle = typeof _ === "function" ? _ : d3_shape_src_constant(+_), pie) : padAngle;
42339 };
42340 return pie;
42341}
42342;// CONCATENATED MODULE: ./node_modules/d3-path/src/path.js
42343var path_pi = Math.PI,
42344 path_tau = 2 * path_pi,
42345 path_epsilon = 1e-6,
42346 tauEpsilon = path_tau - path_epsilon;
42347function Path() {
42348 this._x0 = this._y0 =
42349 // start of current subpath
42350 this._x1 = this._y1 = null; // end of current subpath
42351 this._ = "";
42352}
42353function path() {
42354 return new Path();
42355}
42356Path.prototype = path.prototype = {
42357 constructor: Path,
42358 moveTo: function moveTo(x, y) {
42359 this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y);
42360 },
42361 closePath: function closePath() {
42362 if (this._x1 !== null) {
42363 this._x1 = this._x0, this._y1 = this._y0;
42364 this._ += "Z";
42365 }
42366 },
42367 lineTo: function lineTo(x, y) {
42368 this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y);
42369 },
42370 quadraticCurveTo: function quadraticCurveTo(x1, y1, x, y) {
42371 this._ += "Q" + +x1 + "," + +y1 + "," + (this._x1 = +x) + "," + (this._y1 = +y);
42372 },
42373 bezierCurveTo: function bezierCurveTo(x1, y1, x2, y2, x, y) {
42374 this._ += "C" + +x1 + "," + +y1 + "," + +x2 + "," + +y2 + "," + (this._x1 = +x) + "," + (this._y1 = +y);
42375 },
42376 arcTo: function arcTo(x1, y1, x2, y2, r) {
42377 x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
42378 var x0 = this._x1,
42379 y0 = this._y1,
42380 x21 = x2 - x1,
42381 y21 = y2 - y1,
42382 x01 = x0 - x1,
42383 y01 = y0 - y1,
42384 l01_2 = x01 * x01 + y01 * y01;
42385
42386 // Is the radius negative? Error.
42387 if (r < 0) throw new Error("negative radius: " + r);
42388
42389 // Is this path empty? Move to (x1,y1).
42390 if (this._x1 === null) {
42391 this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
42392 }
42393
42394 // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
42395 else if (!(l01_2 > path_epsilon)) ;
42396
42397 // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
42398 // Equivalently, is (x1,y1) coincident with (x2,y2)?
42399 // Or, is the radius zero? Line to (x1,y1).
42400 else if (!(Math.abs(y01 * x21 - y21 * x01) > path_epsilon) || !r) {
42401 this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
42402 }
42403
42404 // Otherwise, draw an arc!
42405 else {
42406 var x20 = x2 - x0,
42407 y20 = y2 - y0,
42408 l21_2 = x21 * x21 + y21 * y21,
42409 l21 = Math.sqrt(l21_2),
42410 l01 = Math.sqrt(l01_2),
42411 l = r * Math.tan((path_pi - Math.acos((l21_2 + l01_2 - (x20 * x20 + y20 * y20)) / (2 * l21 * l01))) / 2),
42412 t01 = l / l01,
42413 t21 = l / l21;
42414
42415 // If the start tangent is not coincident with (x0,y0), line to.
42416 if (Math.abs(t01 - 1) > path_epsilon) {
42417 this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
42418 }
42419 this._ += "A" + r + "," + r + ",0,0," + +(y01 * x20 > x01 * y20) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
42420 }
42421 },
42422 arc: function arc(x, y, r, a0, a1, ccw) {
42423 x = +x, y = +y, r = +r, ccw = !!ccw;
42424 var dx = r * Math.cos(a0),
42425 dy = r * Math.sin(a0),
42426 x0 = x + dx,
42427 y0 = y + dy,
42428 cw = 1 ^ ccw,
42429 da = ccw ? a0 - a1 : a1 - a0;
42430
42431 // Is the radius negative? Error.
42432 if (r < 0) throw new Error("negative radius: " + r);
42433
42434 // Is this path empty? Move to (x0,y0).
42435 if (this._x1 === null) {
42436 this._ += "M" + x0 + "," + y0;
42437 }
42438
42439 // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
42440 else if (Math.abs(this._x1 - x0) > path_epsilon || Math.abs(this._y1 - y0) > path_epsilon) {
42441 this._ += "L" + x0 + "," + y0;
42442 }
42443
42444 // Is this arc empty? We’re done.
42445 if (!r) return;
42446
42447 // Does the angle go the wrong way? Flip the direction.
42448 if (da < 0) da = da % path_tau + path_tau;
42449
42450 // Is this a complete circle? Draw two arcs to complete the circle.
42451 if (da > tauEpsilon) {
42452 this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
42453 }
42454
42455 // Is this arc non-empty? Draw an arc!
42456 else if (da > path_epsilon) {
42457 this._ += "A" + r + "," + r + ",0," + +(da >= path_pi) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
42458 }
42459 },
42460 rect: function rect(x, y, w, h) {
42461 this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + +w + "v" + +h + "h" + -w + "Z";
42462 },
42463 toString: function toString() {
42464 return this._;
42465 }
42466};
42467/* harmony default export */ var src_path = (path);
42468;// CONCATENATED MODULE: ./node_modules/d3-shape/src/arc.js
42469
42470
42471
42472function arcInnerRadius(d) {
42473 return d.innerRadius;
42474}
42475function arcOuterRadius(d) {
42476 return d.outerRadius;
42477}
42478function arcStartAngle(d) {
42479 return d.startAngle;
42480}
42481function arcEndAngle(d) {
42482 return d.endAngle;
42483}
42484function arcPadAngle(d) {
42485 return d && d.padAngle; // Note: optional!
42486}
42487
42488function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
42489 var x10 = x1 - x0,
42490 y10 = y1 - y0,
42491 x32 = x3 - x2,
42492 y32 = y3 - y2,
42493 t = y32 * x10 - x32 * y10;
42494 if (t * t < epsilon) return;
42495 t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
42496 return [x0 + t * x10, y0 + t * y10];
42497}
42498
42499// Compute perpendicular offset line of length rc.
42500// http://mathworld.wolfram.com/Circle-LineIntersection.html
42501function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
42502 var x01 = x0 - x1,
42503 y01 = y0 - y1,
42504 lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),
42505 ox = lo * y01,
42506 oy = -lo * x01,
42507 x11 = x0 + ox,
42508 y11 = y0 + oy,
42509 x10 = x1 + ox,
42510 y10 = y1 + oy,
42511 x00 = (x11 + x10) / 2,
42512 y00 = (y11 + y10) / 2,
42513 dx = x10 - x11,
42514 dy = y10 - y11,
42515 d2 = dx * dx + dy * dy,
42516 r = r1 - rc,
42517 D = x11 * y10 - x10 * y11,
42518 d = (dy < 0 ? -1 : 1) * sqrt(math_max(0, r * r * d2 - D * D)),
42519 cx0 = (D * dy - dx * d) / d2,
42520 cy0 = (-D * dx - dy * d) / d2,
42521 cx1 = (D * dy + dx * d) / d2,
42522 cy1 = (-D * dx + dy * d) / d2,
42523 dx0 = cx0 - x00,
42524 dy0 = cy0 - y00,
42525 dx1 = cx1 - x00,
42526 dy1 = cy1 - y00;
42527
42528 // Pick the closer of the two intersection points.
42529 // TODO Is there a faster way to determine which intersection to use?
42530 if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;
42531 return {
42532 cx: cx0,
42533 cy: cy0,
42534 x01: -ox,
42535 y01: -oy,
42536 x11: cx0 * (r1 / r - 1),
42537 y11: cy0 * (r1 / r - 1)
42538 };
42539}
42540/* harmony default export */ function src_arc() {
42541 var innerRadius = arcInnerRadius,
42542 outerRadius = arcOuterRadius,
42543 cornerRadius = d3_shape_src_constant(0),
42544 padRadius = null,
42545 startAngle = arcStartAngle,
42546 endAngle = arcEndAngle,
42547 padAngle = arcPadAngle,
42548 context = null;
42549 function arc() {
42550 var buffer,
42551 r,
42552 r0 = +innerRadius.apply(this, arguments),
42553 r1 = +outerRadius.apply(this, arguments),
42554 a0 = startAngle.apply(this, arguments) - halfPi,
42555 a1 = endAngle.apply(this, arguments) - halfPi,
42556 da = math_abs(a1 - a0),
42557 cw = a1 > a0;
42558 if (!context) context = buffer = src_path();
42559
42560 // Ensure that the outer radius is always larger than the inner radius.
42561 if (r1 < r0) r = r1, r1 = r0, r0 = r;
42562
42563 // Is it a point?
42564 if (!(r1 > epsilon)) context.moveTo(0, 0);
42565
42566 // Or is it a circle or annulus?
42567 else if (da > tau - epsilon) {
42568 context.moveTo(r1 * cos(a0), r1 * sin(a0));
42569 context.arc(0, 0, r1, a0, a1, !cw);
42570 if (r0 > epsilon) {
42571 context.moveTo(r0 * cos(a1), r0 * sin(a1));
42572 context.arc(0, 0, r0, a1, a0, cw);
42573 }
42574 }
42575
42576 // Or is it a circular or annular sector?
42577 else {
42578 var a01 = a0,
42579 a11 = a1,
42580 a00 = a0,
42581 a10 = a1,
42582 da0 = da,
42583 da1 = da,
42584 ap = padAngle.apply(this, arguments) / 2,
42585 rp = ap > epsilon && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),
42586 rc = math_min(math_abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
42587 rc0 = rc,
42588 rc1 = rc,
42589 t0,
42590 t1;
42591
42592 // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.
42593 if (rp > epsilon) {
42594 var p0 = asin(rp / r0 * sin(ap)),
42595 p1 = asin(rp / r1 * sin(ap));
42596 if ((da0 -= p0 * 2) > epsilon) p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;else da0 = 0, a00 = a10 = (a0 + a1) / 2;
42597 if ((da1 -= p1 * 2) > epsilon) p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;else da1 = 0, a01 = a11 = (a0 + a1) / 2;
42598 }
42599 var x01 = r1 * cos(a01),
42600 y01 = r1 * sin(a01),
42601 x10 = r0 * cos(a10),
42602 y10 = r0 * sin(a10);
42603
42604 // Apply rounded corners?
42605 if (rc > epsilon) {
42606 var x11 = r1 * cos(a11),
42607 y11 = r1 * sin(a11),
42608 x00 = r0 * cos(a00),
42609 y00 = r0 * sin(a00),
42610 oc;
42611
42612 // Restrict the corner radius according to the sector angle.
42613 if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {
42614 var ax = x01 - oc[0],
42615 ay = y01 - oc[1],
42616 bx = x11 - oc[0],
42617 by = y11 - oc[1],
42618 kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),
42619 lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
42620 rc0 = math_min(rc, (r0 - lc) / (kc - 1));
42621 rc1 = math_min(rc, (r1 - lc) / (kc + 1));
42622 }
42623 }
42624
42625 // Is the sector collapsed to a line?
42626 if (!(da1 > epsilon)) context.moveTo(x01, y01);
42627
42628 // Does the sector’s outer ring have rounded corners?
42629 else if (rc1 > epsilon) {
42630 t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
42631 t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
42632 context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
42633
42634 // Have the corners merged?
42635 if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
42636
42637 // Otherwise, draw the two corners and the ring.
42638 else {
42639 context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
42640 context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
42641 context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
42642 }
42643 }
42644
42645 // Or is the outer ring just a circular arc?
42646 else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
42647
42648 // Is there no inner ring, and it’s a circular sector?
42649 // Or perhaps it’s an annular sector collapsed due to padding?
42650 if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);
42651
42652 // Does the sector’s inner ring (or point) have rounded corners?
42653 else if (rc0 > epsilon) {
42654 t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
42655 t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
42656 context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
42657
42658 // Have the corners merged?
42659 if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
42660
42661 // Otherwise, draw the two corners and the ring.
42662 else {
42663 context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
42664 context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);
42665 context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
42666 }
42667 }
42668
42669 // Or is the inner ring just a circular arc?
42670 else context.arc(0, 0, r0, a10, a00, cw);
42671 }
42672 context.closePath();
42673 if (buffer) return context = null, buffer + "" || null;
42674 }
42675 arc.centroid = function () {
42676 var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,
42677 a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
42678 return [cos(a) * r, sin(a) * r];
42679 };
42680 arc.innerRadius = function (_) {
42681 return arguments.length ? (innerRadius = typeof _ === "function" ? _ : d3_shape_src_constant(+_), arc) : innerRadius;
42682 };
42683 arc.outerRadius = function (_) {
42684 return arguments.length ? (outerRadius = typeof _ === "function" ? _ : d3_shape_src_constant(+_), arc) : outerRadius;
42685 };
42686 arc.cornerRadius = function (_) {
42687 return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : d3_shape_src_constant(+_), arc) : cornerRadius;
42688 };
42689 arc.padRadius = function (_) {
42690 return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : d3_shape_src_constant(+_), arc) : padRadius;
42691 };
42692 arc.startAngle = function (_) {
42693 return arguments.length ? (startAngle = typeof _ === "function" ? _ : d3_shape_src_constant(+_), arc) : startAngle;
42694 };
42695 arc.endAngle = function (_) {
42696 return arguments.length ? (endAngle = typeof _ === "function" ? _ : d3_shape_src_constant(+_), arc) : endAngle;
42697 };
42698 arc.padAngle = function (_) {
42699 return arguments.length ? (padAngle = typeof _ === "function" ? _ : d3_shape_src_constant(+_), arc) : padAngle;
42700 };
42701 arc.context = function (_) {
42702 return arguments.length ? (context = _ == null ? null : _, arc) : context;
42703 };
42704 return arc;
42705}
42706;// CONCATENATED MODULE: ./src/ChartInternal/shape/arc.ts
42707
42708/**
42709 * Copyright (c) 2017 ~ present NAVER Corp.
42710 * billboard.js project is licensed under the MIT license
42711 */
42712
42713
42714
42715
42716
42717
42718/* harmony default export */ var arc = ({
42719 initPie: function initPie() {
42720 var _this2 = this,
42721 $$ = this,
42722 config = $$.config,
42723 dataType = config.data_type,
42724 padding = config[dataType + "_padding"],
42725 startingAngle = config[dataType + "_startingAngle"] || 0,
42726 padAngle = (padding ? padding * .01 : config[dataType + "_padAngle"]) || 0;
42727 $$.pie = pie().startAngle(startingAngle).endAngle(startingAngle + 2 * Math.PI).padAngle(padAngle).value(function (d) {
42728 var _this3 = this;
42729 _newArrowCheck(this, _this2);
42730 return d.values.reduce(function (a, b) {
42731 _newArrowCheck(this, _this3);
42732 return a + b.value;
42733 }.bind(this), 0);
42734 }.bind(this)).sort($$.getSortCompareFn.bind($$)(!0));
42735 },
42736 updateRadius: function updateRadius() {
42737 var $$ = this,
42738 config = $$.config,
42739 state = $$.state,
42740 dataType = config.data_type,
42741 padding = config[dataType + "_padding"],
42742 w = config.gauge_width || config.donut_width,
42743 gaugeArcWidth = $$.filterTargetsToShow($$.data.targets).length * config.gauge_arcs_minWidth;
42744 // determine radius
42745 state.radiusExpanded = Math.min(state.arcWidth, state.arcHeight) / 2 * ($$.hasMultiArcGauge() && config.gauge_label_show ? .85 : 1);
42746 state.radius = state.radiusExpanded * .95;
42747 state.innerRadiusRatio = w ? (state.radius - w) / state.radius : .6;
42748 state.gaugeArcWidth = w || (gaugeArcWidth <= state.radius - state.innerRadius ? state.radius - state.innerRadius : gaugeArcWidth <= state.radius ? gaugeArcWidth : state.radius);
42749 var innerRadius = config.pie_innerRadius || (padding ? padding * (state.innerRadiusRatio + .1) : 0);
42750
42751 // NOTE: inner/outerRadius can be an object by user setting, only for 'pie' type
42752 state.outerRadius = config.pie_outerRadius;
42753 state.innerRadius = $$.hasType("donut") || $$.hasType("gauge") ? state.radius * state.innerRadiusRatio : innerRadius;
42754 },
42755 /**
42756 * Get pie's inner & outer radius value
42757 * @param {object|undefined} d Data object
42758 * @returns {object}
42759 * @private
42760 */
42761 getRadius: function getRadius(d) {
42762 var $$ = this,
42763 data = d == null ? void 0 : d.data,
42764 _$$$state = $$.state,
42765 innerRadius = _$$$state.innerRadius,
42766 outerRadius = _$$$state.outerRadius;
42767 if (!isNumber(innerRadius) && data) {
42768 innerRadius = innerRadius[data.id] || 0;
42769 }
42770 if (isObject(outerRadius) && data && data.id in outerRadius) {
42771 outerRadius = outerRadius[data.id];
42772 } else if (!isNumber(outerRadius)) {
42773 outerRadius = $$.state.radius;
42774 }
42775 return {
42776 innerRadius: innerRadius,
42777 outerRadius: outerRadius
42778 };
42779 },
42780 updateArc: function updateArc() {
42781 var $$ = this;
42782 $$.updateRadius();
42783 $$.svgArc = $$.getSvgArc();
42784 $$.svgArcExpanded = $$.getSvgArcExpanded();
42785 },
42786 getArcLength: function getArcLength() {
42787 var $$ = this,
42788 config = $$.config,
42789 arcLengthInPercent = config.gauge_arcLength * 3.6,
42790 len = 2 * (arcLengthInPercent / 360);
42791 if (arcLengthInPercent < -360) {
42792 len = -2;
42793 } else if (arcLengthInPercent > 360) {
42794 len = 2;
42795 }
42796 return len * Math.PI;
42797 },
42798 getStartAngle: function getStartAngle() {
42799 var $$ = this,
42800 config = $$.config,
42801 isFullCircle = config.gauge_fullCircle,
42802 defaultStartAngle = -1 * Math.PI / 2,
42803 defaultEndAngle = Math.PI / 2,
42804 startAngle = config.gauge_startingAngle;
42805 if (!isFullCircle && startAngle <= defaultStartAngle) {
42806 startAngle = defaultStartAngle;
42807 } else if (!isFullCircle && startAngle >= defaultEndAngle) {
42808 startAngle = defaultEndAngle;
42809 } else if (startAngle > Math.PI || startAngle < -1 * Math.PI) {
42810 startAngle = Math.PI;
42811 }
42812 return startAngle;
42813 },
42814 updateAngle: function updateAngle(dValue) {
42815 var _this4 = this,
42816 $$ = this,
42817 config = $$.config,
42818 state = $$.state,
42819 pie = $$.pie,
42820 d = dValue,
42821 found = !1;
42822 if (!config) {
42823 return null;
42824 }
42825 var gStart = $$.getStartAngle(),
42826 radius = config.gauge_fullCircle ? $$.getArcLength() : gStart * -2;
42827 if (d.data && $$.isGaugeType(d.data) && !$$.hasMultiArcGauge()) {
42828 var min = config.gauge_min,
42829 max = config.gauge_max,
42830 totalSum = $$.getTotalDataSum(state.rendered); // to prevent excluding total data sum during the init(when data.hide option is used), use $$.rendered state value
42831 pie = pie.startAngle(gStart).endAngle(radius * ((totalSum - min) / (max - min)) + gStart);
42832 }
42833 pie($$.filterTargetsToShow()).forEach(function (t, i) {
42834 _newArrowCheck(this, _this4);
42835 if (!found && t.data.id === d.data.id) {
42836 found = !0;
42837 d = t;
42838 d.index = i;
42839 }
42840 }.bind(this));
42841 if (isNaN(d.startAngle)) {
42842 d.startAngle = 0;
42843 }
42844 if (isNaN(d.endAngle)) {
42845 d.endAngle = d.startAngle;
42846 }
42847 if (d.data && $$.hasMultiArcGauge()) {
42848 var gMin = config.gauge_min,
42849 gMax = config.gauge_max,
42850 gValue = d.value < gMin ? 0 : d.value < gMax ? d.value - gMin : gMax - gMin;
42851 d.startAngle = gStart;
42852 d.endAngle = gStart + radius / (gMax - gMin) * gValue;
42853 }
42854 return found ? d : null;
42855 },
42856 getSvgArc: function getSvgArc() {
42857 var _this5 = this,
42858 $$ = this,
42859 state = $$.state,
42860 singleArcWidth = state.gaugeArcWidth / $$.filterTargetsToShow($$.data.targets).length,
42861 hasMultiArcGauge = $$.hasMultiArcGauge(),
42862 hasPolar = $$.hasType("polar"),
42863 arc = src_arc().innerRadius(function (d) {
42864 _newArrowCheck(this, _this5);
42865 var _$$$getRadius = $$.getRadius(d),
42866 innerRadius = _$$$getRadius.innerRadius;
42867 return hasMultiArcGauge ? state.radius - singleArcWidth * (d.index + 1) : isNumber(innerRadius) ? innerRadius : 0;
42868 }.bind(this)).outerRadius(function (d) {
42869 _newArrowCheck(this, _this5);
42870 var _$$$getRadius2 = $$.getRadius(d),
42871 outerRadius = _$$$getRadius2.outerRadius,
42872 radius = outerRadius;
42873 if (hasMultiArcGauge) {
42874 radius = state.radius - singleArcWidth * d.index;
42875 } else if (hasPolar) {
42876 radius = $$.getPolarOuterRadius(d, outerRadius);
42877 }
42878 return radius;
42879 }.bind(this)),
42880 newArc = function (d, withoutUpdate) {
42881 var path = "M 0 0";
42882 if (d.value || d.data) {
42883 var updated = !withoutUpdate && $$.updateAngle(d);
42884 if (withoutUpdate) {
42885 path = arc(d);
42886 } else if (updated) {
42887 path = arc(updated);
42888 }
42889 }
42890 return path;
42891 };
42892 // TODO: extends all function
42893 newArc.centroid = arc.centroid;
42894 return newArc;
42895 },
42896 getSvgArcExpanded: function getSvgArcExpanded(rate) {
42897 var _this6 = this,
42898 $$ = this,
42899 state = $$.state,
42900 newRate = rate || 1,
42901 singleArcWidth = state.gaugeArcWidth / $$.filterTargetsToShow($$.data.targets).length,
42902 hasMultiArcGauge = $$.hasMultiArcGauge(),
42903 expandWidth = Math.min(state.radiusExpanded * newRate - state.radius, singleArcWidth * .8 - (1 - newRate) * 100),
42904 arc = src_arc().innerRadius(function (d) {
42905 _newArrowCheck(this, _this6);
42906 return hasMultiArcGauge ? state.radius - singleArcWidth * (d.index + 1) : $$.getRadius(d).innerRadius;
42907 }.bind(this)).outerRadius(function (d) {
42908 _newArrowCheck(this, _this6);
42909 var radius;
42910 if (hasMultiArcGauge) {
42911 radius = state.radius - singleArcWidth * d.index + expandWidth;
42912 } else {
42913 var _$$$getRadius3 = $$.getRadius(d),
42914 outerRadius = _$$$getRadius3.outerRadius,
42915 radiusExpanded = state.radiusExpanded;
42916 if (state.radius !== outerRadius) {
42917 radiusExpanded -= Math.abs(state.radius - outerRadius);
42918 }
42919 radius = radiusExpanded * newRate;
42920 }
42921 return radius;
42922 }.bind(this));
42923 return function (d) {
42924 var updated = $$.updateAngle(d);
42925 return updated ? arc(updated) : "M 0 0";
42926 };
42927 },
42928 getArc: function getArc(d, withoutUpdate, force) {
42929 return force || this.isArcType(d.data) ? this.svgArc(d, withoutUpdate) : "M 0 0";
42930 },
42931 /**
42932 * Set transform attributes to arc label text
42933 * @param {object} d Data object
42934 * @returns {string} Translate attribute string
42935 * @private
42936 */
42937 transformForArcLabel: function transformForArcLabel(d) {
42938 var _this7 = this,
42939 $$ = this,
42940 config = $$.config,
42941 radiusExpanded = $$.state.radiusExpanded,
42942 updated = $$.updateAngle(d),
42943 translate = "";
42944 if (updated) {
42945 if ($$.hasMultiArcGauge()) {
42946 var y1 = Math.sin(updated.endAngle - Math.PI / 2),
42947 x = Math.cos(updated.endAngle - Math.PI / 2) * (radiusExpanded + 25),
42948 y = y1 * (radiusExpanded + 15 - Math.abs(y1 * 10)) + 3;
42949 translate = "translate(" + x + "," + y + ")";
42950 } else if (!$$.hasType("gauge") || $$.data.targets.length > 1) {
42951 var _filter$map,
42952 _$$$getRadius4 = $$.getRadius(d),
42953 outerRadius = _$$$getRadius4.outerRadius;
42954 if ($$.hasType("polar")) {
42955 outerRadius = $$.getPolarOuterRadius(d, outerRadius);
42956 }
42957 var c = this.svgArc.centroid(updated),
42958 _c$map = c.map(function (v) {
42959 _newArrowCheck(this, _this7);
42960 return isNaN(v) ? 0 : v;
42961 }.bind(this)),
42962 x = _c$map[0],
42963 y = _c$map[1],
42964 h = Math.sqrt(x * x + y * y),
42965 ratio = (_filter$map = ["donut", "pie", "polar"].filter($$.hasType.bind($$)).map(function (v) {
42966 _newArrowCheck(this, _this7);
42967 return config[v + "_label_ratio"];
42968 }.bind(this))) == null ? void 0 : _filter$map[0];
42969 if (ratio) {
42970 ratio = isFunction(ratio) ? ratio.bind($$.api)(d, outerRadius, h) : ratio;
42971 } else {
42972 ratio = outerRadius && (h ? (36 / outerRadius > .375 ? 1.175 - 36 / outerRadius : .8) * outerRadius / h : 0);
42973 }
42974 translate = "translate(" + x * ratio + "," + y * ratio + ")";
42975 }
42976 }
42977 return translate;
42978 },
42979 convertToArcData: function convertToArcData(d) {
42980 return this.addName({
42981 id: d.data ? d.data.id : d.id,
42982 value: d.value,
42983 ratio: this.getRatio("arc", d),
42984 index: d.index
42985 });
42986 },
42987 textForArcLabel: function textForArcLabel(selection) {
42988 var $$ = this,
42989 hasGauge = $$.hasType("gauge");
42990 if ($$.shouldShowArcLabel()) {
42991 selection.style("fill", $$.updateTextColor.bind($$)).attr("filter", $$.updateTextBacgroundColor.bind($$)).each(function (d) {
42992 var _filter,
42993 node = src_select(this),
42994 updated = $$.updateAngle(d),
42995 ratio = $$.getRatio("arc", updated),
42996 isUnderThreshold = $$.meetsLabelThreshold(ratio, (_filter = ["donut", "gauge", "pie", "polar"].filter($$.hasType.bind($$))) == null ? void 0 : _filter[0]);
42997 if (isUnderThreshold) {
42998 var value = (updated || d).value,
42999 text = ($$.getArcLabelFormat() || $$.defaultArcValueFormat)(value, ratio, d.data.id).toString();
43000 setTextValue(node, text, [-1, 1], hasGauge);
43001 } else {
43002 node.text("");
43003 }
43004 });
43005 }
43006 },
43007 expandArc: function expandArc(targetIds) {
43008 var _this8 = this,
43009 $$ = this,
43010 transiting = $$.state.transiting,
43011 $el = $$.$el;
43012 // MEMO: avoid to cancel transition
43013 if (transiting) {
43014 var interval = setInterval(function () {
43015 _newArrowCheck(this, _this8);
43016 if (!transiting) {
43017 clearInterval(interval);
43018 $el.legend.selectAll("." + $FOCUS.legendItemFocused).size() > 0 && $$.expandArc(targetIds);
43019 }
43020 }.bind(this), 10);
43021 return;
43022 }
43023 var newTargetIds = $$.mapToTargetIds(targetIds);
43024 $el.svg.selectAll($$.selectorTargets(newTargetIds, "." + $ARC.chartArc)).each(function (d) {
43025 if (!$$.shouldExpand(d.data.id)) {
43026 return;
43027 }
43028 var expandDuration = $$.getExpandConfig(d.data.id, "duration"),
43029 svgArcExpandedSub = $$.getSvgArcExpanded($$.getExpandConfig(d.data.id, "rate"));
43030 src_select(this).selectAll("path").transition().duration(expandDuration).attr("d", $$.svgArcExpanded).transition().duration(expandDuration * 2).attr("d", svgArcExpandedSub);
43031 });
43032 },
43033 unexpandArc: function unexpandArc(targetIds) {
43034 var _this9 = this,
43035 $$ = this,
43036 transiting = $$.state.transiting,
43037 svg = $$.$el.svg;
43038 if (transiting) {
43039 return;
43040 }
43041 var newTargetIds = $$.mapToTargetIds(targetIds);
43042 svg.selectAll($$.selectorTargets(newTargetIds, "." + $ARC.chartArc)).selectAll("path").transition().duration(function (d) {
43043 _newArrowCheck(this, _this9);
43044 return $$.getExpandConfig(d.data.id, "duration");
43045 }.bind(this)).attr("d", $$.svgArc);
43046 svg.selectAll("" + $ARC.arc).style("opacity", null);
43047 },
43048 /**
43049 * Get expand config value
43050 * @param {string} id data ID
43051 * @param {string} key config key: 'duration | rate'
43052 * @returns {number}
43053 * @private
43054 */
43055 getExpandConfig: function getExpandConfig(id, key) {
43056 var $$ = this,
43057 config = $$.config,
43058 type;
43059 if ($$.isDonutType(id)) {
43060 type = "donut";
43061 } else if ($$.isGaugeType(id)) {
43062 type = "gauge";
43063 } else if ($$.isPieType(id)) {
43064 type = "pie";
43065 }
43066 return type ? config[type + "_expand_" + key] : {
43067 duration: 50,
43068 rate: .98
43069 }[key];
43070 },
43071 shouldExpand: function shouldExpand(id) {
43072 var $$ = this,
43073 config = $$.config;
43074 return $$.isDonutType(id) && config.donut_expand || $$.isGaugeType(id) && config.gauge_expand || $$.isPieType(id) && config.pie_expand;
43075 },
43076 shouldShowArcLabel: function shouldShowArcLabel() {
43077 var _this10 = this,
43078 $$ = this,
43079 config = $$.config;
43080 return ["donut", "gauge", "pie", "polar"].some(function (v) {
43081 _newArrowCheck(this, _this10);
43082 return $$.hasType(v) && config[v + "_label_show"];
43083 }.bind(this));
43084 },
43085 getArcLabelFormat: function getArcLabelFormat() {
43086 var _this11 = this,
43087 $$ = this,
43088 config = $$.config,
43089 format = function (v) {
43090 _newArrowCheck(this, _this11);
43091 return v;
43092 }.bind(this);
43093 ["donut", "gauge", "pie", "polar"].filter($$.hasType.bind($$)).forEach(function (v) {
43094 _newArrowCheck(this, _this11);
43095 format = config[v + "_label_format"];
43096 }.bind(this));
43097 return isFunction(format) ? format.bind($$.api) : format;
43098 },
43099 getArcTitle: function getArcTitle() {
43100 var $$ = this,
43101 type = $$.hasType("donut") && "donut" || $$.hasType("gauge") && "gauge";
43102 return type ? $$.config[type + "_title"] : "";
43103 },
43104 updateTargetsForArc: function updateTargetsForArc(targets) {
43105 var _this12 = this,
43106 $$ = this,
43107 $el = $$.$el,
43108 hasGauge = $$.hasType("gauge"),
43109 classChartArc = $$.getChartClass("Arc"),
43110 classArcs = $$.getClass("arcs", !0),
43111 classFocus = $$.classFocus.bind($$),
43112 chartArcs = $el.main.select("." + $ARC.chartArcs),
43113 mainPieUpdate = chartArcs.selectAll("." + $ARC.chartArc).data($$.pie(targets)).attr("class", function (d) {
43114 _newArrowCheck(this, _this12);
43115 return classChartArc(d) + classFocus(d.data);
43116 }.bind(this)),
43117 mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc).call(this.setCssRule(!1, "." + $ARC.chartArcs + " text", ["pointer-events:none", "text-anchor:middle"]));
43118 mainPieEnter.append("g").attr("class", classArcs).merge(mainPieUpdate);
43119 mainPieEnter.append("text").attr("dy", hasGauge && !$$.hasMultiTargets() ? "-.1em" : ".35em").style("opacity", "0").style("text-anchor", $$.getStylePropValue("middle")).style("pointer-events", $$.getStylePropValue("none"));
43120 $el.text = chartArcs.selectAll("." + $COMMON.target + " text");
43121 // MEMO: can not keep same color..., but not bad to update color in redraw
43122 // mainPieUpdate.exit().remove();
43123 },
43124 initArc: function initArc() {
43125 var $$ = this,
43126 $el = $$.$el;
43127 $el.arcs = $el.main.select("." + $COMMON.chart).append("g").attr("class", $ARC.chartArcs).attr("transform", $$.getTranslate("arc"));
43128 $$.setArcTitle();
43129 },
43130 /**
43131 * Set arc title text
43132 * @private
43133 */
43134 setArcTitle: function setArcTitle() {
43135 var $$ = this,
43136 title = $$.getArcTitle(),
43137 hasGauge = $$.hasType("gauge");
43138 if (title) {
43139 var text = $$.$el.arcs.append("text").attr("class", hasGauge ? $GAUGE.chartArcsGaugeTitle : $ARC.chartArcsTitle).style("text-anchor", "middle");
43140 hasGauge && text.attr("dy", "-0.3em");
43141 setTextValue(text, title, hasGauge ? undefined : [-.6, 1.35], !0);
43142 }
43143 },
43144 redrawArc: function redrawArc(duration, durationForExit, withTransform) {
43145 var _this13 = this,
43146 $$ = this,
43147 config = $$.config,
43148 state = $$.state,
43149 main = $$.$el.main,
43150 hasInteraction = config.interaction_enabled,
43151 isSelectable = hasInteraction && config.data_selection_isselectable,
43152 mainArc = main.selectAll("." + $ARC.arcs).selectAll("." + $ARC.arc).data($$.arcData.bind($$));
43153 mainArc.exit().transition().duration(durationForExit).style("opacity", "0").remove();
43154 mainArc = mainArc.enter().append("path").attr("class", $$.getClass("arc", !0)).style("fill", function (d) {
43155 _newArrowCheck(this, _this13);
43156 return $$.color(d.data);
43157 }.bind(this)).style("cursor", function (d) {
43158 _newArrowCheck(this, _this13);
43159 return isSelectable != null && isSelectable.bind != null && isSelectable.bind($$.api)(d) ? "pointer" : null;
43160 }.bind(this)).style("opacity", "0").each(function (d) {
43161 if ($$.isGaugeType(d.data)) {
43162 d.startAngle = config.gauge_startingAngle;
43163 d.endAngle = config.gauge_startingAngle;
43164 }
43165 this._current = d;
43166 }).merge(mainArc);
43167 if ($$.hasType("gauge")) {
43168 $$.updateGaugeMax();
43169 $$.hasMultiArcGauge() && $$.redrawMultiArcGauge();
43170 }
43171 mainArc.attr("transform", function (d) {
43172 _newArrowCheck(this, _this13);
43173 return !$$.isGaugeType(d.data) && withTransform ? "scale(0)" : "";
43174 }.bind(this)).style("opacity", function (d) {
43175 return d === this._current ? "0" : null;
43176 }).each(function () {
43177 _newArrowCheck(this, _this13);
43178 state.transiting = !0;
43179 }.bind(this)).transition().duration(duration).attrTween("d", function (d) {
43180 var _this14 = this,
43181 updated = $$.updateAngle(d);
43182 if (!updated) {
43183 return function () {
43184 _newArrowCheck(this, _this14);
43185 return "M 0 0";
43186 }.bind(this);
43187 }
43188 if (isNaN(this._current.startAngle)) {
43189 this._current.startAngle = 0;
43190 }
43191 if (isNaN(this._current.endAngle)) {
43192 this._current.endAngle = this._current.startAngle;
43193 }
43194 var interpolate = value(this._current, updated);
43195 this._current = interpolate(0);
43196 return function (t) {
43197 var interpolated = interpolate(t);
43198 interpolated.data = d.data; // data.id will be updated by interporator
43199
43200 return $$.getArc(interpolated, !0);
43201 };
43202 }).attr("transform", withTransform ? "scale(1)" : "").style("fill", function (d) {
43203 _newArrowCheck(this, _this13);
43204 var color;
43205 if ($$.levelColor) {
43206 color = $$.levelColor(d.data.values[0].value);
43207
43208 // update data's color
43209 config.data_colors[d.data.id] = color;
43210 } else {
43211 color = $$.color(d.data);
43212 }
43213 return color;
43214 }.bind(this))
43215 // Where gauge reading color would receive customization.
43216 .style("opacity", null).call(endall, function () {
43217 if ($$.levelColor) {
43218 var path = src_select(this),
43219 d = path.datum();
43220 $$.updateLegendItemColor(d.data.id, path.style("fill"));
43221 }
43222 state.transiting = !1;
43223 callFn(config.onrendered, $$.api);
43224 });
43225
43226 // bind arc events
43227 hasInteraction && $$.bindArcEvent(mainArc);
43228 $$.hasType("polar") && $$.redrawPolar();
43229 $$.hasType("gauge") && $$.redrawBackgroundArcs();
43230 $$.redrawArcText(duration);
43231 },
43232 redrawBackgroundArcs: function redrawBackgroundArcs() {
43233 var _this15 = this,
43234 $$ = this,
43235 config = $$.config,
43236 state = $$.state,
43237 hasMultiArcGauge = $$.hasMultiArcGauge(),
43238 isFullCircle = config.gauge_fullCircle,
43239 startAngle = $$.getStartAngle(),
43240 endAngle = isFullCircle ? startAngle + $$.getArcLength() : startAngle * -1,
43241 backgroundArc = $$.$el.arcs.select((hasMultiArcGauge ? "g" : "") + "." + $ARC.chartArcsBackground);
43242 if (hasMultiArcGauge) {
43243 var index = 0;
43244 backgroundArc = backgroundArc.selectAll("path." + $ARC.chartArcsBackground).data($$.data.targets);
43245 backgroundArc.enter().append("path").attr("class", function (d, i) {
43246 _newArrowCheck(this, _this15);
43247 return $ARC.chartArcsBackground + " " + $ARC.chartArcsBackground + "-" + i;
43248 }.bind(this)).merge(backgroundArc).style("fill", config.gauge_background || null).attr("d", function (_ref2) {
43249 var id = _ref2.id;
43250 _newArrowCheck(this, _this15);
43251 if (state.hiddenTargetIds.indexOf(id) >= 0) {
43252 return "M 0 0";
43253 }
43254 var d = {
43255 data: [{
43256 value: config.gauge_max
43257 }],
43258 startAngle: startAngle,
43259 endAngle: endAngle,
43260 index: index++
43261 };
43262 return $$.getArc(d, !0, !0);
43263 }.bind(this));
43264 backgroundArc.exit().remove();
43265 } else {
43266 backgroundArc.attr("d", function () {
43267 _newArrowCheck(this, _this15);
43268 var d = {
43269 data: [{
43270 value: config.gauge_max
43271 }],
43272 startAngle: startAngle,
43273 endAngle: endAngle
43274 };
43275 return $$.getArc(d, !0, !0);
43276 }.bind(this));
43277 }
43278 },
43279 bindArcEvent: function bindArcEvent(arc) {
43280 var _this16 = this,
43281 $$ = this,
43282 config = $$.config,
43283 state = $$.state,
43284 isTouch = state.inputType === "touch",
43285 isMouse = state.inputType === "mouse";
43286 // eslint-disable-next-line
43287 function selectArc(_this, arcData, id) {
43288 // transitions
43289 $$.expandArc(id);
43290 $$.api.focus(id);
43291 $$.toggleFocusLegend(id, !0);
43292 $$.showTooltip([arcData], _this);
43293 }
43294
43295 // eslint-disable-next-line
43296 function unselectArc(arcData) {
43297 var id = (arcData == null ? void 0 : arcData.id) || undefined;
43298 $$.unexpandArc(id);
43299 $$.api.revert();
43300 $$.revertLegend();
43301 $$.hideTooltip();
43302 }
43303 arc.on("click", function (event, d, i) {
43304 var updated = $$.updateAngle(d),
43305 arcData;
43306 if (updated) {
43307 arcData = $$.convertToArcData(updated);
43308 $$.toggleShape == null ? void 0 : $$.toggleShape(this, arcData, i);
43309 config.data_onclick.bind($$.api)(arcData, this);
43310 }
43311 });
43312
43313 // mouse events
43314 if (isMouse) {
43315 arc.on("mouseover", function (event, d) {
43316 var _arcData;
43317 if (state.transiting) {
43318 // skip while transiting
43319 return;
43320 }
43321 state.event = event;
43322 var updated = $$.updateAngle(d),
43323 arcData = updated ? $$.convertToArcData(updated) : null,
43324 id = ((_arcData = arcData) == null ? void 0 : _arcData.id) || undefined;
43325 selectArc(this, arcData, id);
43326 $$.setOverOut(!0, arcData);
43327 }).on("mouseout", function (event, d) {
43328 _newArrowCheck(this, _this16);
43329 if (state.transiting) {
43330 // skip while transiting
43331 return;
43332 }
43333 state.event = event;
43334 var updated = $$.updateAngle(d),
43335 arcData = updated ? $$.convertToArcData(updated) : null;
43336 unselectArc();
43337 $$.setOverOut(!1, arcData);
43338 }.bind(this)).on("mousemove", function (event, d) {
43339 var updated = $$.updateAngle(d),
43340 arcData = updated ? $$.convertToArcData(updated) : null;
43341 state.event = event;
43342 $$.showTooltip([arcData], this);
43343 });
43344 }
43345
43346 // touch events
43347 if (isTouch && $$.hasArcType() && !$$.radars) {
43348 var getEventArc = function (event) {
43349 _newArrowCheck(this, _this16);
43350 var touch = event.changedTouches[0],
43351 eventArc = src_select(browser_doc.elementFromPoint(touch.clientX, touch.clientY));
43352 return eventArc;
43353 }.bind(this);
43354 $$.$el.svg.on("touchstart touchmove", function (event) {
43355 var _datum, _arcData2;
43356 if (state.transiting) {
43357 // skip while transiting
43358 return;
43359 }
43360 state.event = event;
43361 var eventArc = getEventArc(event),
43362 datum = eventArc.datum(),
43363 updated = (_datum = datum) != null && _datum.data && datum.data.id ? $$.updateAngle(datum) : null,
43364 arcData = updated ? $$.convertToArcData(updated) : null,
43365 id = ((_arcData2 = arcData) == null ? void 0 : _arcData2.id) || undefined;
43366 $$.callOverOutForTouch(arcData);
43367 isUndefined(id) ? unselectArc() : selectArc(this, arcData, id);
43368 });
43369 }
43370 },
43371 redrawArcText: function redrawArcText(duration) {
43372 var _this17 = this,
43373 $$ = this,
43374 config = $$.config,
43375 state = $$.state,
43376 _$$$$el = $$.$el,
43377 main = _$$$$el.main,
43378 arcs = _$$$$el.arcs,
43379 hasGauge = $$.hasType("gauge"),
43380 hasMultiArcGauge = $$.hasMultiArcGauge(),
43381 text;
43382 // for gauge type, update text when has no title & multi data
43383 if (!(hasGauge && $$.data.targets.length === 1 && config.gauge_title)) {
43384 text = main.selectAll("." + $ARC.chartArc).select("text").style("opacity", "0").attr("class", function (d) {
43385 _newArrowCheck(this, _this17);
43386 return $$.isGaugeType(d.data) ? $GAUGE.gaugeValue : null;
43387 }.bind(this)).call($$.textForArcLabel.bind($$)).attr("transform", $$.transformForArcLabel.bind($$)).style("font-size", function (d) {
43388 _newArrowCheck(this, _this17);
43389 return $$.isGaugeType(d.data) && $$.data.targets.length === 1 && !hasMultiArcGauge ? Math.round(state.radius / 5) + "px" : null;
43390 }.bind(this)).transition().duration(duration).style("opacity", function (d) {
43391 _newArrowCheck(this, _this17);
43392 return $$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? null : "0";
43393 }.bind(this));
43394 hasMultiArcGauge && text.attr("dy", "-.1em");
43395 }
43396 main.select("." + $ARC.chartArcsTitle).style("opacity", $$.hasType("donut") || hasGauge ? null : "0");
43397 if (hasGauge) {
43398 var _text,
43399 isFullCircle = config.gauge_fullCircle;
43400 isFullCircle && ((_text = text) == null ? void 0 : _text.attr("dy", "" + (hasMultiArcGauge ? 0 : Math.round(state.radius / 14))));
43401 if (config.gauge_label_show) {
43402 arcs.select("." + $GAUGE.chartArcsGaugeUnit).attr("dy", (isFullCircle ? 1.5 : .75) + "em").text(config.gauge_units);
43403 arcs.select("." + $GAUGE.chartArcsGaugeMin).attr("dx", -1 * (state.innerRadius + (state.radius - state.innerRadius) / (isFullCircle ? 1 : 2)) + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_min, !1));
43404
43405 // show max text when isn't fullCircle
43406 isFullCircle || arcs.select("." + $GAUGE.chartArcsGaugeMax).attr("dx", state.innerRadius + (state.radius - state.innerRadius) / 2 + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_max, !0));
43407 }
43408 }
43409 }
43410});
43411;// CONCATENATED MODULE: ./node_modules/d3-shape/src/point.js
43412function point_x(p) {
43413 return p[0];
43414}
43415function point_y(p) {
43416 return p[1];
43417}
43418;// CONCATENATED MODULE: ./node_modules/d3-shape/src/line.js
43419
43420
43421
43422
43423
43424/* harmony default export */ function src_line(x, y) {
43425 var defined = d3_shape_src_constant(!0),
43426 context = null,
43427 curve = curve_linear,
43428 output = null;
43429 x = typeof x === "function" ? x : x === undefined ? point_x : d3_shape_src_constant(x);
43430 y = typeof y === "function" ? y : y === undefined ? point_y : d3_shape_src_constant(y);
43431 function line(data) {
43432 var i,
43433 n = (data = d3_shape_src_array(data)).length,
43434 d,
43435 defined0 = !1,
43436 buffer;
43437 if (context == null) output = curve(buffer = src_path());
43438 for (i = 0; i <= n; ++i) {
43439 if (!(i < n && defined(d = data[i], i, data)) === defined0) {
43440 if (defined0 = !defined0) output.lineStart();else output.lineEnd();
43441 }
43442 if (defined0) output.point(+x(d, i, data), +y(d, i, data));
43443 }
43444 if (buffer) return output = null, buffer + "" || null;
43445 }
43446 line.x = function (_) {
43447 return arguments.length ? (x = typeof _ === "function" ? _ : d3_shape_src_constant(+_), line) : x;
43448 };
43449 line.y = function (_) {
43450 return arguments.length ? (y = typeof _ === "function" ? _ : d3_shape_src_constant(+_), line) : y;
43451 };
43452 line.defined = function (_) {
43453 return arguments.length ? (defined = typeof _ === "function" ? _ : d3_shape_src_constant(!!_), line) : defined;
43454 };
43455 line.curve = function (_) {
43456 return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
43457 };
43458 line.context = function (_) {
43459 return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
43460 };
43461 return line;
43462}
43463;// CONCATENATED MODULE: ./node_modules/d3-shape/src/area.js
43464
43465
43466
43467
43468
43469
43470/* harmony default export */ function src_area(x0, y0, y1) {
43471 var x1 = null,
43472 defined = d3_shape_src_constant(!0),
43473 context = null,
43474 curve = curve_linear,
43475 output = null;
43476 x0 = typeof x0 === "function" ? x0 : x0 === undefined ? point_x : d3_shape_src_constant(+x0);
43477 y0 = typeof y0 === "function" ? y0 : y0 === undefined ? d3_shape_src_constant(0) : d3_shape_src_constant(+y0);
43478 y1 = typeof y1 === "function" ? y1 : y1 === undefined ? point_y : d3_shape_src_constant(+y1);
43479 function area(data) {
43480 var i,
43481 j,
43482 k,
43483 n = (data = d3_shape_src_array(data)).length,
43484 d,
43485 defined0 = !1,
43486 buffer,
43487 x0z = Array(n),
43488 y0z = Array(n);
43489 if (context == null) output = curve(buffer = src_path());
43490 for (i = 0; i <= n; ++i) {
43491 if (!(i < n && defined(d = data[i], i, data)) === defined0) {
43492 if (defined0 = !defined0) {
43493 j = i;
43494 output.areaStart();
43495 output.lineStart();
43496 } else {
43497 output.lineEnd();
43498 output.lineStart();
43499 for (k = i - 1; k >= j; --k) {
43500 output.point(x0z[k], y0z[k]);
43501 }
43502 output.lineEnd();
43503 output.areaEnd();
43504 }
43505 }
43506 if (defined0) {
43507 x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);
43508 output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);
43509 }
43510 }
43511 if (buffer) return output = null, buffer + "" || null;
43512 }
43513 function arealine() {
43514 return src_line().defined(defined).curve(curve).context(context);
43515 }
43516 area.x = function (_) {
43517 return arguments.length ? (x0 = typeof _ === "function" ? _ : d3_shape_src_constant(+_), x1 = null, area) : x0;
43518 };
43519 area.x0 = function (_) {
43520 return arguments.length ? (x0 = typeof _ === "function" ? _ : d3_shape_src_constant(+_), area) : x0;
43521 };
43522 area.x1 = function (_) {
43523 return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : d3_shape_src_constant(+_), area) : x1;
43524 };
43525 area.y = function (_) {
43526 return arguments.length ? (y0 = typeof _ === "function" ? _ : d3_shape_src_constant(+_), y1 = null, area) : y0;
43527 };
43528 area.y0 = function (_) {
43529 return arguments.length ? (y0 = typeof _ === "function" ? _ : d3_shape_src_constant(+_), area) : y0;
43530 };
43531 area.y1 = function (_) {
43532 return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : d3_shape_src_constant(+_), area) : y1;
43533 };
43534 area.lineX0 = area.lineY0 = function () {
43535 return arealine().x(x0).y(y0);
43536 };
43537 area.lineY1 = function () {
43538 return arealine().x(x0).y(y1);
43539 };
43540 area.lineX1 = function () {
43541 return arealine().x(x1).y(y0);
43542 };
43543 area.defined = function (_) {
43544 return arguments.length ? (defined = typeof _ === "function" ? _ : d3_shape_src_constant(!!_), area) : defined;
43545 };
43546 area.curve = function (_) {
43547 return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;
43548 };
43549 area.context = function (_) {
43550 return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;
43551 };
43552 return area;
43553}
43554;// CONCATENATED MODULE: ./src/ChartInternal/shape/area.ts
43555
43556/**
43557 * Copyright (c) 2017 ~ present NAVER Corp.
43558 * billboard.js project is licensed under the MIT license
43559 */
43560
43561
43562
43563
43564/* harmony default export */ var shape_area = ({
43565 initArea: function initArea(mainLine) {
43566 var $$ = this,
43567 config = $$.config;
43568 mainLine.insert("g", "." + (config.area_front ? $CIRCLE.circles : $LINE.lines)).attr("class", $$.getClass("areas", !0));
43569 },
43570 /**
43571 * Update area color
43572 * @param {object} d Data object
43573 * @returns {string} Color string
43574 * @private
43575 */
43576 updateAreaColor: function updateAreaColor(d) {
43577 var $$ = this;
43578 return $$.config.area_linearGradient ? $$.getGradienColortUrl(d.id) : $$.color(d);
43579 },
43580 /**
43581 * Generate/Update elements
43582 * @param {boolean} withTransition Transition for exit elements
43583 * @param {boolean} isSub Subchart draw
43584 * @private
43585 */
43586 updateArea: function updateArea(withTransition, isSub) {
43587 if (isSub === void 0) {
43588 isSub = !1;
43589 }
43590 var $$ = this,
43591 config = $$.config,
43592 state = $$.state,
43593 $el = $$.$el,
43594 $T = $$.$T,
43595 $root = isSub ? $el.subchart : $el;
43596 config.area_linearGradient && $$.updateLinearGradient();
43597 var area = $root.main.selectAll("." + $AREA.areas).selectAll("." + $AREA.area).data($$.lineData.bind($$));
43598 $T(area.exit(), withTransition).style("opacity", "0").remove();
43599 $root.area = area.enter().append("path").attr("class", $$.getClass("area", !0)).style("fill", $$.updateAreaColor.bind($$)).style("opacity", function () {
43600 state.orgAreaOpacity = src_select(this).style("opacity");
43601 return "0";
43602 }).merge(area);
43603 area.style("opacity", state.orgAreaOpacity);
43604 },
43605 /**
43606 * Redraw function
43607 * @param {Function} drawFn Retuned functino from .generateDrawCandlestick()
43608 * @param {boolean} withTransition With or without transition
43609 * @param {boolean} isSub Subchart draw
43610 * @returns {Array}
43611 */
43612 redrawArea: function redrawArea(drawFn, withTransition, isSub) {
43613 var _this = this;
43614 if (isSub === void 0) {
43615 isSub = !1;
43616 }
43617 var $$ = this,
43618 _ref = isSub ? this.$el.subchart : this.$el,
43619 area = _ref.area,
43620 orgAreaOpacity = $$.state.orgAreaOpacity;
43621 return [$$.$T(area, withTransition, getRandom()).attr("d", drawFn).style("fill", $$.updateAreaColor.bind($$)).style("opacity", function (d) {
43622 _newArrowCheck(this, _this);
43623 return ($$.isAreaRangeType(d) ? orgAreaOpacity / 1.75 : orgAreaOpacity) + "";
43624 }.bind(this))];
43625 },
43626 /**
43627 * Generate area path data
43628 * @param {object} areaIndices Indices
43629 * @param {boolean} isSub Weather is sub axis
43630 * @returns {Function}
43631 * @private
43632 */
43633 generateDrawArea: function generateDrawArea(areaIndices, isSub) {
43634 var _this2 = this,
43635 $$ = this,
43636 config = $$.config,
43637 lineConnectNull = config.line_connectNull,
43638 isRotated = config.axis_rotated,
43639 getPoints = $$.generateGetAreaPoints(areaIndices, isSub),
43640 yScale = $$.getYScaleById.bind($$),
43641 xValue = function (d) {
43642 _newArrowCheck(this, _this2);
43643 return (isSub ? $$.subxx : $$.xx).call($$, d);
43644 }.bind(this),
43645 value0 = function (d, i) {
43646 _newArrowCheck(this, _this2);
43647 return $$.isGrouped(d.id) ? getPoints(d, i)[0][1] : yScale(d.id, isSub)($$.isAreaRangeType(d) ? $$.getRangedData(d, "high") : $$.getShapeYMin(d.id));
43648 }.bind(this),
43649 value1 = function (d, i) {
43650 _newArrowCheck(this, _this2);
43651 return $$.isGrouped(d.id) ? getPoints(d, i)[1][1] : yScale(d.id, isSub)($$.isAreaRangeType(d) ? $$.getRangedData(d, "low") : d.value);
43652 }.bind(this);
43653 return function (d) {
43654 var _this3 = this;
43655 _newArrowCheck(this, _this2);
43656 var values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values,
43657 x0 = 0,
43658 y0 = 0,
43659 path;
43660 if ($$.isAreaType(d)) {
43661 var area = src_area();
43662 area = isRotated ? area.y(xValue).x0(value0).x1(value1) : area.x(xValue).y0(config.area_above ? 0 : config.area_below ? $$.state.height : value0).y1(value1);
43663 if (!lineConnectNull) {
43664 area = area.defined(function (d) {
43665 _newArrowCheck(this, _this3);
43666 return $$.getBaseValue(d) !== null;
43667 }.bind(this));
43668 }
43669 if ($$.isStepType(d)) {
43670 values = $$.convertValuesToStep(values);
43671 }
43672 path = area.curve($$.getCurve(d))(values);
43673 } else {
43674 if (values[0]) {
43675 x0 = $$.scale.x(values[0].x);
43676 y0 = $$.getYScaleById(d.id)(values[0].value);
43677 }
43678 path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0;
43679 }
43680 return path || "M 0 0";
43681 }.bind(this);
43682 },
43683 generateGetAreaPoints: function generateGetAreaPoints(areaIndices, isSub) {
43684 // partial duplication of generateGetBarPoints
43685 var $$ = this,
43686 config = $$.config,
43687 x = $$.getShapeX(0, areaIndices, isSub),
43688 y = $$.getShapeY(!!isSub),
43689 areaOffset = $$.getShapeOffset($$.isAreaType, areaIndices, isSub),
43690 yScale = $$.getYScaleById.bind($$);
43691 return function (d, i) {
43692 var y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
43693 offset = areaOffset(d, i) || y0,
43694 posX = x(d),
43695 value = d.value,
43696 posY = y(d);
43697 // fix posY not to overflow opposite quadrant
43698 if (config.axis_rotated && (value > 0 && posY < y0 || value < 0 && y0 < posY)) {
43699 posY = y0;
43700 }
43701
43702 // 1 point that marks the area position
43703 return [[posX, offset], [posX, posY - (y0 - offset)], [posX, posY - (y0 - offset)],
43704 // needed for compatibility
43705 [posX, offset] // needed for compatibility
43706 ];
43707 };
43708 }
43709});
43710;// CONCATENATED MODULE: ./src/ChartInternal/shape/bar.ts
43711
43712/**
43713 * Copyright (c) 2017 ~ present NAVER Corp.
43714 * billboard.js project is licensed under the MIT license
43715 */
43716
43717
43718
43719/* harmony default export */ var bar = ({
43720 initBar: function initBar() {
43721 var $el = this.$el,
43722 config = this.config,
43723 clip = this.state.clip;
43724 $el.bar = $el.main.select("." + $COMMON.chart)
43725 // should positioned at the beginning of the shape node to not overlap others
43726 .insert("g", ":first-child").attr("class", $BAR.chartBars).call(this.setCssRule(!1, "." + $BAR.chartBars, ["pointer-events:none"]));
43727
43728 // set clip-path attribute when condition meet
43729 // https://github.com/naver/billboard.js/issues/2421
43730 if (config.clipPath === !1 && (config.bar_radius || config.bar_radius_ratio)) {
43731 $el.bar.attr("clip-path", clip.pathXAxis.replace(/#[^)]*/, "#" + clip.id));
43732 }
43733 },
43734 updateTargetsForBar: function updateTargetsForBar(targets) {
43735 var _this = this,
43736 $$ = this,
43737 config = $$.config,
43738 $el = $$.$el,
43739 classChartBar = $$.getChartClass("Bar"),
43740 classBars = $$.getClass("bars", !0),
43741 classFocus = $$.classFocus.bind($$),
43742 isSelectable = config.interaction_enabled && config.data_selection_isselectable;
43743 if (!$el.bar) {
43744 $$.initBar();
43745 }
43746 var mainBarUpdate = $$.$el.main.select("." + $BAR.chartBars).selectAll("." + $BAR.chartBar).data(
43747 // remove
43748 targets.filter(function (v) {
43749 var _this2 = this;
43750 _newArrowCheck(this, _this);
43751 return v.values.some(function (d) {
43752 _newArrowCheck(this, _this2);
43753 return isNumber(d.value) || $$.isBarRangeType(d);
43754 }.bind(this));
43755 }.bind(this))).attr("class", function (d) {
43756 _newArrowCheck(this, _this);
43757 return classChartBar(d) + classFocus(d);
43758 }.bind(this)),
43759 mainBarEnter = mainBarUpdate.enter().append("g").attr("class", classChartBar).style("opacity", "0").style("pointer-events", $$.getStylePropValue("none"));
43760 // Bars for each data
43761 mainBarEnter.append("g").attr("class", classBars).style("cursor", function (d) {
43762 _newArrowCheck(this, _this);
43763 return isSelectable != null && isSelectable.bind != null && isSelectable.bind($$.api)(d) ? "pointer" : null;
43764 }.bind(this)).call($$.setCssRule(!0, " ." + $BAR.bar, ["fill"], $$.color));
43765 },
43766 /**
43767 * Generate/Update elements
43768 * @param {boolean} withTransition Transition for exit elements
43769 * @param {boolean} isSub Subchart draw
43770 * @private
43771 */
43772 updateBar: function updateBar(withTransition, isSub) {
43773 if (isSub === void 0) {
43774 isSub = !1;
43775 }
43776 var $$ = this,
43777 config = $$.config,
43778 $el = $$.$el,
43779 $T = $$.$T,
43780 $root = isSub ? $el.subchart : $el,
43781 classBar = $$.getClass("bar", !0),
43782 initialOpacity = $$.initialOpacity.bind($$);
43783 config.bar_linearGradient && $$.updateLinearGradient();
43784 var bar = $root.main.selectAll("." + $BAR.bars).selectAll("." + $BAR.bar).data($$.labelishData.bind($$));
43785 $T(bar.exit(), withTransition).style("opacity", "0").remove();
43786 $root.bar = bar.enter().append("path").attr("class", classBar).style("fill", $$.updateBarColor.bind($$)).merge(bar).style("opacity", initialOpacity);
43787 },
43788 /**
43789 * Update bar color
43790 * @param {object} d Data object
43791 * @returns {string} Color string
43792 * @private
43793 */
43794 updateBarColor: function updateBarColor(d) {
43795 var $$ = this,
43796 fn = $$.getStylePropValue($$.color);
43797 return $$.config.bar_linearGradient ? $$.getGradienColortUrl(d.id) : fn ? fn(d) : null;
43798 },
43799 /**
43800 * Redraw function
43801 * @param {Function} drawFn Retuned function from .getDrawShape() => .generateDrawBar()
43802 * @param {boolean} withTransition With or without transition
43803 * @param {boolean} isSub Subchart draw
43804 * @returns {Array}
43805 * @private
43806 */
43807 redrawBar: function redrawBar(drawFn, withTransition, isSub) {
43808 var _this3 = this;
43809 if (isSub === void 0) {
43810 isSub = !1;
43811 }
43812 var $$ = this,
43813 _ref = isSub ? $$.$el.subchart : $$.$el,
43814 bar = _ref.bar;
43815 return [$$.$T(bar, withTransition, getRandom()).attr("d", function (d) {
43816 _newArrowCheck(this, _this3);
43817 return (isNumber(d.value) || $$.isBarRangeType(d)) && drawFn(d);
43818 }.bind(this)).style("fill", $$.updateBarColor.bind($$)).style("opacity", null)];
43819 },
43820 /**
43821 * Generate draw function
43822 * @param {object} barIndices data order within x axis.
43823 * barIndices ==> {data1: 0, data2: 0, data3: 1, data4: 1, __max__: 1}
43824 *
43825 * When gropus given as:
43826 * groups: [
43827 * ["data1", "data2"],
43828 * ["data3", "data4"]
43829 * ],
43830 *
43831 * Will be rendered as:
43832 * data1 data3 data1 data3
43833 * data2 data4 data2 data4
43834 * -------------------------
43835 * 0 1
43836 * @param {boolean} isSub If is for subchart
43837 * @returns {Function}
43838 * @private
43839 */
43840 generateDrawBar: function generateDrawBar(barIndices, isSub) {
43841 var _this4 = this,
43842 $$ = this,
43843 config = $$.config,
43844 getPoints = $$.generateGetBarPoints(barIndices, isSub),
43845 isRotated = config.axis_rotated,
43846 barRadius = config.bar_radius,
43847 barRadiusRatio = config.bar_radius_ratio,
43848 getRadius = isNumber(barRadius) && barRadius > 0 ? function () {
43849 _newArrowCheck(this, _this4);
43850 return barRadius;
43851 }.bind(this) : isNumber(barRadiusRatio) ? function (w) {
43852 _newArrowCheck(this, _this4);
43853 return w * barRadiusRatio;
43854 }.bind(this) : null;
43855 return function (d, i) {
43856 _newArrowCheck(this, _this4);
43857 // 4 points that make a bar
43858 var points = getPoints(d, i),
43859 indexX = +isRotated,
43860 indexY = +!indexX,
43861 isNegative = d.value < 0,
43862 pathRadius = ["", ""],
43863 radius = 0,
43864 isGrouped = $$.isGrouped(d.id),
43865 isRadiusData = getRadius && isGrouped ? $$.isStackingRadiusData(d) : !1; // switch points if axis is rotated, not applicable for sub chart
43866 if (getRadius && (!isGrouped || isRadiusData)) {
43867 var index = isRotated ? indexY : indexX,
43868 barW = points[2][index] - points[0][index];
43869 radius = getRadius(barW);
43870 var arc = "a" + radius + "," + radius + " " + (isNegative ? "1 0 0" : "0 0 1") + " ";
43871 pathRadius[+!isRotated] = "" + arc + radius + "," + radius;
43872 pathRadius[+isRotated] = "" + arc + [-radius, radius][isRotated ? "sort" : "reverse"]();
43873 isNegative && pathRadius.reverse();
43874 }
43875
43876 // path string data shouldn't be containing new line chars
43877 // https://github.com/naver/billboard.js/issues/530
43878 var path = isRotated ? "H" + (points[1][indexX] - radius) + " " + pathRadius[0] + "V" + (points[2][indexY] - radius) + " " + pathRadius[1] + "H" + points[3][indexX] : "V" + (points[1][indexY] + (isNegative ? -radius : radius)) + " " + pathRadius[0] + "H" + (points[2][indexX] - radius) + " " + pathRadius[1] + "V" + points[3][indexY];
43879 return "M" + points[0][indexX] + "," + points[0][indexY] + path + "z";
43880 }.bind(this);
43881 },
43882 /**
43883 * Determine if given stacking bar data is radius type
43884 * @param {object} d Data row
43885 * @returns {boolean}
43886 */
43887 isStackingRadiusData: function isStackingRadiusData(d) {
43888 var _this5 = this,
43889 $$ = this,
43890 $el = $$.$el,
43891 config = $$.config,
43892 data = $$.data,
43893 state = $$.state,
43894 id = d.id,
43895 index = d.index,
43896 value = d.value;
43897 // when the data is hidden, check if has rounded edges
43898 if (state.hiddenTargetIds.indexOf(id) > -1) {
43899 var target = $el.bar.filter(function (d) {
43900 _newArrowCheck(this, _this5);
43901 return d.id === id && d.value === value;
43902 }.bind(this));
43903 return !target.empty() && /a\d+/i.test(target.attr("d"));
43904 }
43905
43906 // Find same grouped ids
43907 var keys = config.data_groups.find(function (v) {
43908 _newArrowCheck(this, _this5);
43909 return v.indexOf(id) > -1;
43910 }.bind(this)),
43911 sortedList = $$.orderTargets($$.filterTargetsToShow(data.targets.filter($$.isBarType, $$))).filter(function (v) {
43912 _newArrowCheck(this, _this5);
43913 return keys.indexOf(v.id) > -1;
43914 }.bind(this)),
43915 sortedIds = sortedList.map(function (v) {
43916 var _this6 = this;
43917 _newArrowCheck(this, _this5);
43918 return v.values.filter(function (v2) {
43919 _newArrowCheck(this, _this6);
43920 return v2.index === index && (isNumber(value) && value > 0 ? v2.value > 0 : v2.value < 0);
43921 }.bind(this))[0];
43922 }.bind(this)).filter(Boolean).map(function (v) {
43923 _newArrowCheck(this, _this5);
43924 return v.id;
43925 }.bind(this)); // Get sorted list
43926 // If the given id stays in the last position, then radius should be applied.
43927 return value !== 0 && sortedIds.indexOf(id) === sortedIds.length - 1;
43928 },
43929 /**
43930 * Generate bar coordinate points data
43931 * @param {object} barIndices Data order within x axis.
43932 * @param {boolean} isSub If is for subchart
43933 * @returns {Array} Array of coordinate points
43934 * @private
43935 */
43936 generateGetBarPoints: function generateGetBarPoints(barIndices, isSub) {
43937 var _this7 = this,
43938 $$ = this,
43939 config = $$.config,
43940 axis = isSub ? $$.axis.subX : $$.axis.x,
43941 barTargetsNum = $$.getIndicesMax(barIndices) + 1,
43942 barW = $$.getBarW("bar", axis, barTargetsNum),
43943 barX = $$.getShapeX(barW, barIndices, !!isSub),
43944 barY = $$.getShapeY(!!isSub),
43945 barOffset = $$.getShapeOffset($$.isBarType, barIndices, !!isSub),
43946 yScale = $$.getYScaleById.bind($$);
43947 return function (d, i) {
43948 _newArrowCheck(this, _this7);
43949 var y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
43950 offset = barOffset(d, i) || y0,
43951 width = isNumber(barW) ? barW : barW[d.id] || barW._$width,
43952 value = d.value,
43953 posX = barX(d),
43954 posY = barY(d);
43955 // fix posY not to overflow opposite quadrant
43956 if (config.axis_rotated && (value > 0 && posY < y0 || value < 0 && y0 < posY)) {
43957 posY = y0;
43958 }
43959 if (!$$.isBarRangeType(d)) {
43960 posY -= y0 - offset;
43961 }
43962 var startPosX = posX + width;
43963
43964 // 4 points that make a bar
43965 return [[posX, offset], [posX, posY], [startPosX, posY], [startPosX, offset]];
43966 }.bind(this);
43967 }
43968});
43969;// CONCATENATED MODULE: ./src/ChartInternal/shape/candlestick.ts
43970
43971
43972function candlestick_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
43973function candlestick_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? candlestick_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : candlestick_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
43974/**
43975 * Copyright (c) 2017 ~ present NAVER Corp.
43976 * billboard.js project is licensed under the MIT license
43977 */
43978
43979
43980
43981/* harmony default export */ var candlestick = ({
43982 initCandlestick: function initCandlestick() {
43983 var $el = this.$el;
43984 $el.candlestick = $el.main.select("." + $COMMON.chart)
43985 // should positioned at the beginning of the shape node to not overlap others
43986 .append("g").attr("class", $CANDLESTICK.chartCandlesticks);
43987 },
43988 /**
43989 * Update targets by its data
43990 * called from: ChartInternal.updateTargets()
43991 * @param {Array} targets Filtered target by type
43992 * @private
43993 */
43994 updateTargetsForCandlestick: function updateTargetsForCandlestick(targets) {
43995 var _this = this,
43996 $$ = this,
43997 $el = $$.$el,
43998 classChart = $$.getChartClass("Candlestick"),
43999 classFocus = $$.classFocus.bind($$);
44000 if (!$el.candlestick) {
44001 $$.initCandlestick();
44002 }
44003 var mainUpdate = $$.$el.main.select("." + $CANDLESTICK.chartCandlesticks).selectAll("." + $CANDLESTICK.chartCandlestick).data(targets).attr("class", function (d) {
44004 _newArrowCheck(this, _this);
44005 return classChart(d) + classFocus(d);
44006 }.bind(this));
44007 mainUpdate.enter().append("g").attr("class", classChart).style("pointer-events", "none");
44008 },
44009 /**
44010 * Generate/Update elements
44011 * @param {boolean} withTransition Transition for exit elements
44012 * @param {boolean} isSub Subchart draw
44013 * @private
44014 */
44015 updateCandlestick: function updateCandlestick(withTransition, isSub) {
44016 var _this2 = this;
44017 if (isSub === void 0) {
44018 isSub = !1;
44019 }
44020 var $$ = this,
44021 $el = $$.$el,
44022 $T = $$.$T,
44023 $root = isSub ? $el.subchart : $el,
44024 classSetter = $$.getClass("candlestick", !0),
44025 initialOpacity = $$.initialOpacity.bind($$),
44026 candlestick = $root.main.selectAll("." + $CANDLESTICK.chartCandlestick).selectAll("." + $CANDLESTICK.candlestick).data($$.labelishData.bind($$));
44027 $T(candlestick.exit(), withTransition).style("opacity", "0").remove();
44028 var candlestickEnter = candlestick.enter().filter(function (d) {
44029 _newArrowCheck(this, _this2);
44030 return d.value;
44031 }.bind(this)).append("g").attr("class", classSetter);
44032 candlestickEnter.append("line");
44033 candlestickEnter.append("path");
44034 if (!$root.candlestick) {
44035 $root.candlestick = {};
44036 }
44037 $root.candlestick = candlestick.merge(candlestickEnter).style("opacity", initialOpacity);
44038 },
44039 /**
44040 * Get draw function
44041 * @param {object} indices Indice data
44042 * @param {boolean} isSub Subchart draw
44043 * @returns {Function}
44044 * @private
44045 */
44046 generateDrawCandlestick: function generateDrawCandlestick(indices, isSub) {
44047 var _this3 = this,
44048 $$ = this,
44049 config = $$.config,
44050 getPoints = $$.generateGetCandlestickPoints(indices, isSub),
44051 isRotated = config.axis_rotated,
44052 downColor = config.candlestick_color_down;
44053 return function (d, i, g) {
44054 var _value,
44055 _this4 = this;
44056 _newArrowCheck(this, _this3);
44057 var points = getPoints(d, i),
44058 value = $$.getCandlestickData(d),
44059 isUp = (_value = value) == null ? void 0 : _value._isUp,
44060 indexX = +isRotated;
44061 if (g.classed) {
44062 g.classed($CANDLESTICK[isUp ? "valueUp" : "valueDown"], !0);
44063 }
44064 var path = isRotated ? "H" + points[1][1] + " V" + points[1][0] + " H" + points[0][1] : "V" + points[1][1] + " H" + points[1][0] + " V" + points[0][1];
44065 g.select("path").attr("d", "M" + points[0][indexX] + "," + points[0][+!indexX] + path + "z").style("fill", function (d) {
44066 _newArrowCheck(this, _this4);
44067 var color = isUp ? $$.color(d) : isObject(downColor) ? downColor[d.id] : downColor;
44068 return color || $$.color(d);
44069 }.bind(this));
44070
44071 // set line position
44072 var line = g.select("line"),
44073 pos = isRotated ? {
44074 x1: points[2][1],
44075 x2: points[2][2],
44076 y1: points[2][0],
44077 y2: points[2][0]
44078 } : {
44079 x1: points[2][0],
44080 x2: points[2][0],
44081 y1: points[2][1],
44082 y2: points[2][2]
44083 };
44084 for (var x in pos) {
44085 line.attr(x, pos[x]);
44086 }
44087 }.bind(this);
44088 },
44089 /**
44090 * Generate shape drawing points
44091 * @param {object} indices Indice data
44092 * @param {boolean} isSub Subchart draw
44093 * @returns {Function}
44094 */
44095 generateGetCandlestickPoints: function generateGetCandlestickPoints(indices, isSub) {
44096 var _this5 = this;
44097 if (isSub === void 0) {
44098 isSub = !1;
44099 }
44100 var $$ = this,
44101 config = $$.config,
44102 axis = isSub ? $$.axis.subX : $$.axis.x,
44103 targetsNum = $$.getIndicesMax(indices) + 1,
44104 barW = $$.getBarW("candlestick", axis, targetsNum),
44105 x = $$.getShapeX(barW, indices, !!isSub),
44106 y = $$.getShapeY(!!isSub),
44107 shapeOffset = $$.getShapeOffset($$.isBarType, indices, !!isSub),
44108 yScale = $$.getYScaleById.bind($$);
44109 return function (d, i) {
44110 _newArrowCheck(this, _this5);
44111 var y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
44112 offset = shapeOffset(d, i) || y0,
44113 width = isNumber(barW) ? barW : barW[d.id] || barW._$width,
44114 value = $$.getCandlestickData(d),
44115 points;
44116 if (value) {
44117 var posX = {
44118 start: x(d),
44119 end: 0
44120 };
44121 posX.end = posX.start + width;
44122 var posY = {
44123 start: y(value.open),
44124 end: y(value.close)
44125 },
44126 posLine = {
44127 x: posX.start + width / 2,
44128 high: y(value.high),
44129 low: y(value.low)
44130 };
44131 // fix posY not to overflow opposite quadrant
44132 if (config.axis_rotated && (d.value > 0 && posY.start < y0 || d.value < 0 && y0 < posY.start)) {
44133 posY.start = y0;
44134 }
44135 posY.start -= y0 - offset;
44136 points = [[posX.start, posY.start], [posX.end, posY.end], [posLine.x, posLine.low, posLine.high]];
44137 } else {
44138 points = [[0, 0], [0, 0], [0, 0, 0]];
44139 }
44140 return points;
44141 }.bind(this);
44142 },
44143 /**
44144 * Redraw function
44145 * @param {Function} drawFn Retuned functino from .generateDrawCandlestick()
44146 * @param {boolean} withTransition With or without transition
44147 * @param {boolean} isSub Subchart draw
44148 * @returns {Array}
44149 */
44150 redrawCandlestick: function redrawCandlestick(drawFn, withTransition, isSub) {
44151 if (isSub === void 0) {
44152 isSub = !1;
44153 }
44154 var $$ = this,
44155 $el = $$.$el,
44156 $T = $$.$T,
44157 _ref = isSub ? $el.subchart : $el,
44158 candlestick = _ref.candlestick,
44159 rand = getRandom(!0);
44160 return [candlestick.each(function (d, i) {
44161 var g = $T(src_select(this), withTransition, rand);
44162 drawFn(d, i, g);
44163 }).style("opacity", null)];
44164 },
44165 /**
44166 * Get candlestick data as object
44167 * @param {object} param Data object
44168 * @param {Array|object} param.value Data value
44169 * @returns {object|null} Converted data object
44170 * @private
44171 */
44172 getCandlestickData: function getCandlestickData(_ref2) {
44173 var value = _ref2.value,
44174 d;
44175 if (isArray(value)) {
44176 var open = value[0],
44177 high = value[1],
44178 low = value[2],
44179 close = value[3],
44180 _value$ = value[4],
44181 volume = _value$ === void 0 ? !1 : _value$;
44182 d = {
44183 open: open,
44184 high: high,
44185 low: low,
44186 close: close
44187 };
44188 if (volume !== !1) {
44189 d.volume = volume;
44190 }
44191 } else if (isObject(value)) {
44192 d = candlestick_objectSpread({}, value);
44193 }
44194 if (d) {
44195 d._isUp = d.close >= d.open;
44196 }
44197 return d || null;
44198 }
44199});
44200;// CONCATENATED MODULE: ./src/ChartInternal/shape/gauge.ts
44201
44202/**
44203 * Copyright (c) 2017 ~ present NAVER Corp.
44204 * billboard.js project is licensed under the MIT license
44205 */
44206
44207
44208
44209/* harmony default export */ var gauge = ({
44210 initGauge: function initGauge() {
44211 var _this = this,
44212 $$ = this,
44213 config = $$.config,
44214 arcs = $$.$el.arcs,
44215 appendText = function (className) {
44216 _newArrowCheck(this, _this);
44217 arcs.append("text").attr("class", className).style("text-anchor", "middle").style("pointer-events", "none");
44218 }.bind(this);
44219 if ($$.hasType("gauge")) {
44220 var hasMulti = $$.hasMultiArcGauge();
44221 arcs.append(hasMulti ? "g" : "path").attr("class", $ARC.chartArcsBackground).style("fill", !hasMulti && config.gauge_background || null);
44222 config.gauge_units && appendText($GAUGE.chartArcsGaugeUnit);
44223 if (config.gauge_label_show) {
44224 appendText($GAUGE.chartArcsGaugeMin);
44225 config.gauge_fullCircle || appendText($GAUGE.chartArcsGaugeMax);
44226 }
44227 }
44228 },
44229 updateGaugeMax: function updateGaugeMax() {
44230 var $$ = this,
44231 config = $$.config,
44232 state = $$.state,
44233 hasMultiGauge = $$.hasMultiArcGauge(),
44234 max = hasMultiGauge ? $$.getMinMaxData().max[0].value : $$.getTotalDataSum(state.rendered);
44235 // if gauge_max less than max, make max to max value
44236 if (max + config.gauge_min * (config.gauge_min > 0 ? -1 : 1) > config.gauge_max) {
44237 config.gauge_max = max - config.gauge_min;
44238 }
44239 },
44240 redrawMultiArcGauge: function redrawMultiArcGauge() {
44241 var _this2 = this,
44242 $$ = this,
44243 config = $$.config,
44244 state = $$.state,
44245 $el = $$.$el,
44246 hiddenTargetIds = $$.state.hiddenTargetIds,
44247 arcLabelLines = $el.main.selectAll("." + $ARC.arcs).selectAll("." + $ARC.arcLabelLine).data($$.arcData.bind($$)),
44248 mainArcLabelLine = arcLabelLines.enter().append("rect").attr("class", function (d) {
44249 _newArrowCheck(this, _this2);
44250 return $ARC.arcLabelLine + " " + $COMMON.target + " " + $COMMON.target + "-" + d.data.id;
44251 }.bind(this)).merge(arcLabelLines);
44252 mainArcLabelLine.style("fill", function (d) {
44253 _newArrowCheck(this, _this2);
44254 return $$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data);
44255 }.bind(this)).style("display", config.gauge_label_show ? null : "none").each(function (d) {
44256 var lineLength = 0,
44257 lineThickness = 2,
44258 x = 0,
44259 y = 0,
44260 transform = "";
44261 if (hiddenTargetIds.indexOf(d.data.id) < 0) {
44262 var updated = $$.updateAngle(d),
44263 innerLineLength = state.gaugeArcWidth / $$.filterTargetsToShow($$.data.targets).length * (updated.index + 1),
44264 lineAngle = updated.endAngle - Math.PI / 2,
44265 arcInnerRadius = state.radius - innerLineLength,
44266 linePositioningAngle = lineAngle - (arcInnerRadius === 0 ? 0 : 1 / arcInnerRadius);
44267 lineLength = state.radiusExpanded - state.radius + innerLineLength;
44268 x = Math.cos(linePositioningAngle) * arcInnerRadius;
44269 y = Math.sin(linePositioningAngle) * arcInnerRadius;
44270 transform = "rotate(" + lineAngle * 180 / Math.PI + ", " + x + ", " + y + ")";
44271 }
44272 src_select(this).attr("x", x).attr("y", y).attr("width", lineLength).attr("height", lineThickness).attr("transform", transform).style("stroke-dasharray", "0, " + (lineLength + lineThickness) + ", 0");
44273 });
44274 },
44275 textForGaugeMinMax: function textForGaugeMinMax(value, isMax) {
44276 var $$ = this,
44277 config = $$.config,
44278 format = config.gauge_label_extents;
44279 return isFunction(format) ? format.bind($$.api)(value, isMax) : value;
44280 },
44281 getGaugeLabelHeight: function getGaugeLabelHeight() {
44282 var config = this.config;
44283 return this.config.gauge_label_show && !config.gauge_fullCircle ? 20 : 0;
44284 },
44285 getPaddingBottomForGauge: function getPaddingBottomForGauge() {
44286 var $$ = this;
44287 return $$.getGaugeLabelHeight() * ($$.config.gauge_label_show ? 2 : 2.5);
44288 }
44289});
44290;// CONCATENATED MODULE: ./src/ChartInternal/shape/bubble.ts
44291
44292/**
44293 * Copyright (c) 2017 ~ present NAVER Corp.
44294 * billboard.js project is licensed under the MIT license
44295 */
44296
44297
44298/* harmony default export */ var bubble = ({
44299 /**
44300 * Initializer
44301 * @private
44302 */
44303 initBubble: function initBubble() {
44304 var $$ = this,
44305 config = $$.config;
44306 if ($$.hasType("bubble")) {
44307 config.point_show = !0;
44308 config.point_type = "circle";
44309 config.point_sensitivity = 25;
44310 }
44311 },
44312 /**
44313 * Get user agent's computed value
44314 * @returns {number}
44315 * @private
44316 */
44317 getBaseLength: function getBaseLength() {
44318 var $$ = this,
44319 _$$$state = $$.state,
44320 width = _$$$state.width,
44321 height = _$$$state.height,
44322 cacheKey = KEY.bubbleBaseLength,
44323 baseLength = $$.cache.get(cacheKey);
44324 if (!baseLength) {
44325 $$.cache.add(cacheKey, baseLength = getMinMax("min", [width, height]));
44326 }
44327 return baseLength;
44328 },
44329 /**
44330 * Get the radius value for bubble circle
44331 * @param {object} d Data object
44332 * @returns {number}
44333 * @private
44334 */
44335 getBubbleR: function getBubbleR(d) {
44336 var _this = this,
44337 $$ = this,
44338 maxR = $$.config.bubble_maxR;
44339 if (isFunction(maxR)) {
44340 maxR = maxR.bind($$.api)(d);
44341 } else if (!isNumber(maxR)) {
44342 maxR = $$.getBaseLength() / ($$.getMaxDataCount() * 2) + 12;
44343 }
44344 var max = getMinMax("max", $$.getMinMaxData().max.map(function (d) {
44345 _newArrowCheck(this, _this);
44346 return $$.isBubbleZType(d) ? $$.getBubbleZData(d.value, "y") : isObject(d.value) ? d.value.mid : d.value;
44347 }.bind(this))),
44348 maxArea = maxR * maxR * Math.PI,
44349 area = ($$.isBubbleZType(d) ? $$.getBubbleZData(d.value, "z") : d.value) * (maxArea / max);
44350 return Math.sqrt(area / Math.PI);
44351 },
44352 /**
44353 * Get bubble dimension data
44354 * @param {object|Array} d data value
44355 * @param {string} type - y or z
44356 * @returns {number}
44357 * @private
44358 */
44359 getBubbleZData: function getBubbleZData(d, type) {
44360 return isObject(d) ? d[type] : d[type === "y" ? 0 : 1];
44361 }
44362});
44363;// CONCATENATED MODULE: ./src/ChartInternal/shape/line.ts
44364
44365/**
44366 * Copyright (c) 2017 ~ present NAVER Corp.
44367 * billboard.js project is licensed under the MIT license
44368 */
44369
44370
44371
44372
44373/* harmony default export */ var line = ({
44374 initLine: function initLine() {
44375 var $el = this.$el;
44376 $el.line = $el.main.select("." + $COMMON.chart).append("g").attr("class", $LINE.chartLines).call(this.setCssRule(!1, "." + $LINE.chartLines, ["pointer-events:none"]));
44377 },
44378 updateTargetsForLine: function updateTargetsForLine(t) {
44379 var _this = this,
44380 $$ = this,
44381 _$$$$el = $$.$el,
44382 area = _$$$$el.area,
44383 line = _$$$$el.line,
44384 main = _$$$$el.main,
44385 classChartLine = $$.getChartClass("Line"),
44386 classLines = $$.getClass("lines", !0),
44387 classFocus = $$.classFocus.bind($$);
44388 if (!line) {
44389 $$.initLine();
44390 }
44391 var targets = t.filter(function (d) {
44392 _newArrowCheck(this, _this);
44393 return !($$.isScatterType(d) || $$.isBubbleType(d));
44394 }.bind(this)),
44395 mainLineUpdate = main.select("." + $LINE.chartLines).selectAll("." + $LINE.chartLine).data(targets).attr("class", function (d) {
44396 _newArrowCheck(this, _this);
44397 return classChartLine(d) + classFocus(d);
44398 }.bind(this)),
44399 mainLineEnter = mainLineUpdate.enter().append("g").attr("class", classChartLine).style("opacity", "0").style("pointer-events", $$.getStylePropValue("none"));
44400 // Lines for each data
44401 mainLineEnter.append("g").attr("class", classLines);
44402
44403 // Areas
44404 if ($$.hasTypeOf("Area")) {
44405 var mainLine = (!area && mainLineEnter.empty() ? mainLineUpdate : mainLineEnter).filter($$.isAreaType.bind($$));
44406 $$.initArea(mainLine);
44407 }
44408 $$.updateTargetForCircle(targets, mainLineEnter);
44409 },
44410 /**
44411 * Generate/Update elements
44412 * @param {boolean} withTransition Transition for exit elements
44413 * @param {boolean} isSub Subchart draw
44414 * @private
44415 */
44416 updateLine: function updateLine(withTransition, isSub) {
44417 var _this2 = this;
44418 if (isSub === void 0) {
44419 isSub = !1;
44420 }
44421 var $$ = this,
44422 extraLineClasses = $$.format.extraLineClasses,
44423 $el = $$.$el,
44424 $T = $$.$T,
44425 $root = isSub ? $el.subchart : $el,
44426 line = $root.main.selectAll("." + $LINE.lines).selectAll("." + $LINE.line).data($$.lineData.bind($$));
44427 $T(line.exit(), withTransition).style("opacity", "0").remove();
44428 $root.line = line.enter().append("path").attr("class", function (d) {
44429 _newArrowCheck(this, _this2);
44430 return $$.getClass("line", !0)(d) + " " + (extraLineClasses(d) || "");
44431 }.bind(this)).style("stroke", $$.color).merge(line).style("opacity", $$.initialOpacity.bind($$)).style("shape-rendering", function (d) {
44432 _newArrowCheck(this, _this2);
44433 return $$.isStepType(d) ? "crispEdges" : "";
44434 }.bind(this)).attr("transform", null);
44435 },
44436 /**
44437 * Redraw function
44438 * @param {Function} drawFn Retuned functino from .generateDrawCandlestick()
44439 * @param {boolean} withTransition With or without transition
44440 * @param {boolean} isSub Subchart draw
44441 * @returns {Array}
44442 */
44443 redrawLine: function redrawLine(drawFn, withTransition, isSub) {
44444 if (isSub === void 0) {
44445 isSub = !1;
44446 }
44447 var $$ = this,
44448 $el = $$.$el,
44449 $T = $$.$T,
44450 _ref = isSub ? $el.subchart : $el,
44451 line = _ref.line;
44452 return [$T(line, withTransition, getRandom()).attr("d", drawFn).style("stroke", this.color).style("opacity", null)];
44453 },
44454 /**
44455 * Get the curve interpolate
44456 * @param {Array} d Data object
44457 * @returns {Function}
44458 * @private
44459 */
44460 getCurve: function getCurve(d) {
44461 var _this3 = this,
44462 $$ = this,
44463 isRotatedStepType = $$.config.axis_rotated && $$.isStepType(d);
44464 // when is step & rotated, should be computed in different way
44465 // https://github.com/naver/billboard.js/issues/471
44466 return isRotatedStepType ? function (context) {
44467 _newArrowCheck(this, _this3);
44468 var step = $$.getInterpolate(d)(context);
44469
44470 // keep the original method
44471 step.orgPoint = step.point;
44472
44473 // to get rotated path data
44474 step.pointRotated = function (x, y) {
44475 this._point === 1 && (this._point = 2);
44476 var y1 = this._y * (1 - this._t) + y * this._t;
44477 this._context.lineTo(this._x, y1);
44478 this._context.lineTo(x, y1);
44479 this._x = x;
44480 this._y = y;
44481 };
44482 step.point = function (x, y) {
44483 this._point === 0 ? this.orgPoint(x, y) : this.pointRotated(x, y);
44484 };
44485 return step;
44486 }.bind(this) : $$.getInterpolate(d);
44487 },
44488 generateDrawLine: function generateDrawLine(lineIndices, isSub) {
44489 var _this4 = this,
44490 $$ = this,
44491 config = $$.config,
44492 scale = $$.scale,
44493 lineConnectNull = config.line_connectNull,
44494 isRotated = config.axis_rotated,
44495 getPoints = $$.generateGetLinePoints(lineIndices, isSub),
44496 yScale = $$.getYScaleById.bind($$),
44497 xValue = function (d) {
44498 _newArrowCheck(this, _this4);
44499 return (isSub ? $$.subxx : $$.xx).call($$, d);
44500 }.bind(this),
44501 yValue = function (d, i) {
44502 _newArrowCheck(this, _this4);
44503 return $$.isGrouped(d.id) ? getPoints(d, i)[0][1] : yScale(d.id, isSub)($$.getBaseValue(d));
44504 }.bind(this),
44505 line = src_line();
44506 line = isRotated ? line.x(yValue).y(xValue) : line.x(xValue).y(yValue);
44507 if (!lineConnectNull) {
44508 line = line.defined(function (d) {
44509 _newArrowCheck(this, _this4);
44510 return $$.getBaseValue(d) !== null;
44511 }.bind(this));
44512 }
44513 var x = isSub ? scale.subX : scale.x;
44514 return function (d) {
44515 _newArrowCheck(this, _this4);
44516 var y = yScale(d.id, isSub),
44517 values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values,
44518 x0 = 0,
44519 y0 = 0,
44520 path;
44521 if ($$.isLineType(d)) {
44522 var regions = config.data_regions[d.id];
44523 if (regions) {
44524 path = $$.lineWithRegions(values, scale.zoom || x, y, regions);
44525 } else {
44526 if ($$.isStepType(d)) {
44527 values = $$.convertValuesToStep(values);
44528 }
44529 path = line.curve($$.getCurve(d))(values);
44530 }
44531 } else {
44532 if (values[0]) {
44533 x0 = x(values[0].x);
44534 y0 = y(values[0].value);
44535 }
44536 path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0;
44537 }
44538 return path || "M 0 0";
44539 }.bind(this);
44540 },
44541 lineWithRegions: function lineWithRegions(d, x, y, _regions) {
44542 var _this5 = this,
44543 $$ = this,
44544 config = $$.config,
44545 isRotated = config.axis_rotated,
44546 isTimeSeries = $$.axis.isTimeSeries(),
44547 xOffset = $$.axis.isCategorized() ? .5 : 0,
44548 regions = [],
44549 dasharray = "2 2",
44550 xp,
44551 yp,
44552 diff,
44553 diffx2,
44554 isWithinRegions = function (withinX, withinRegions) {
44555 _newArrowCheck(this, _this5);
44556 for (var i = 0, reg; reg = withinRegions[i]; i++) {
44557 if (reg.start < withinX && withinX <= reg.end) {
44558 return reg.style;
44559 }
44560 }
44561 return !1;
44562 }.bind(this);
44563 // Check start/end of regions
44564 if (isDefined(_regions)) {
44565 var getValue = function (v, def) {
44566 _newArrowCheck(this, _this5);
44567 return isUndefined(v) ? def : isTimeSeries ? parseDate.call($$, v) : v;
44568 }.bind(this);
44569 for (var i = 0, reg; reg = _regions[i]; i++) {
44570 var start = getValue(reg.start, d[0].x),
44571 end = getValue(reg.end, d[d.length - 1].x),
44572 style = reg.style || {
44573 dasharray: dasharray
44574 };
44575 regions[i] = {
44576 start: start,
44577 end: end,
44578 style: style
44579 };
44580 }
44581 }
44582
44583 // Set scales
44584 var xValue = isRotated ? function (dt) {
44585 _newArrowCheck(this, _this5);
44586 return y(dt.value);
44587 }.bind(this) : function (dt) {
44588 _newArrowCheck(this, _this5);
44589 return x(dt.x);
44590 }.bind(this),
44591 yValue = isRotated ? function (dt) {
44592 _newArrowCheck(this, _this5);
44593 return x(dt.x);
44594 }.bind(this) : function (dt) {
44595 _newArrowCheck(this, _this5);
44596 return y(dt.value);
44597 }.bind(this),
44598 generateM = function (points) {
44599 _newArrowCheck(this, _this5);
44600 return "M" + points[0][0] + "," + points[0][1] + "L" + points[1][0] + "," + points[1][1];
44601 }.bind(this),
44602 sWithRegion = isTimeSeries ? function (d0, d1, k, timeseriesDiff) {
44603 _newArrowCheck(this, _this5);
44604 var x0 = d0.x.getTime(),
44605 xDiff = d1.x - d0.x,
44606 xv0 = new Date(x0 + xDiff * k),
44607 xv1 = new Date(x0 + xDiff * (k + timeseriesDiff)),
44608 points = isRotated ? [[y(yp(k)), x(xv0)], [y(yp(k + diff)), x(xv1)]] : [[x(xv0), y(yp(k))], [x(xv1), y(yp(k + diff))]];
44609 return generateM(points);
44610 }.bind(this) : function (d0, d1, k, otherDiff) {
44611 _newArrowCheck(this, _this5);
44612 var points = isRotated ? [[y(yp(k), !0), x(xp(k))], [y(yp(k + otherDiff), !0), x(xp(k + otherDiff))]] : [[x(xp(k), !0), y(yp(k))], [x(xp(k + otherDiff), !0), y(yp(k + otherDiff))]];
44613 return generateM(points);
44614 }.bind(this),
44615 axisType = {
44616 x: $$.axis.getAxisType("x"),
44617 y: $$.axis.getAxisType("y")
44618 },
44619 path = "";
44620 for (var _i = 0, data; data = d[_i]; _i++) {
44621 var prevData = d[_i - 1],
44622 hasPrevData = prevData && isValue(prevData.value),
44623 style = isWithinRegions(data.x, regions);
44624 // https://github.com/naver/billboard.js/issues/1172
44625 if (!isValue(data.value)) {
44626 continue;
44627 }
44628
44629 // Draw as normal
44630 if (isUndefined(regions) || !style || !hasPrevData) {
44631 path += "" + (_i && hasPrevData ? "L" : "M") + xValue(data) + "," + yValue(data);
44632 } else if (hasPrevData) {
44633 try {
44634 style = style.dasharray.split(" ");
44635 } catch (e) {
44636 style = dasharray.split(" ");
44637 }
44638
44639 // Draw with region // TODO: Fix for horizotal charts
44640 xp = getScale(axisType.x, prevData.x + xOffset, data.x + xOffset);
44641 yp = getScale(axisType.y, prevData.value, data.value);
44642 var dx = x(data.x) - x(prevData.x),
44643 dy = y(data.value) - y(prevData.value),
44644 dd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));
44645 diff = style[0] / dd;
44646 diffx2 = diff * style[1];
44647 for (var j = diff; j <= 1; j += diffx2) {
44648 path += sWithRegion(prevData, data, j, diff);
44649
44650 // to make sure correct line drawing
44651 if (j + diffx2 >= 1) {
44652 path += sWithRegion(prevData, data, 1, 0);
44653 }
44654 }
44655 }
44656 }
44657 return path;
44658 },
44659 isWithinStep: function isWithinStep(that, y) {
44660 return Math.abs(y - getPointer(this.state.event, that)[1]) < 30;
44661 },
44662 shouldDrawPointsForLine: function shouldDrawPointsForLine(d) {
44663 var linePoint = this.config.line_point;
44664 return linePoint === !0 || isArray(linePoint) && linePoint.indexOf(d.id) !== -1;
44665 }
44666});
44667;// CONCATENATED MODULE: ./src/ChartInternal/shape/point.ts
44668
44669var point_this = undefined;
44670/**
44671 * Copyright (c) 2017 ~ present NAVER Corp.
44672 * billboard.js project is licensed under the MIT license
44673 */
44674
44675
44676
44677
44678var getTransitionName = function () {
44679 _newArrowCheck(this, point_this);
44680 return getRandom();
44681}.bind(undefined);
44682/* harmony default export */ var point = ({
44683 hasValidPointType: function hasValidPointType(type) {
44684 return /^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type);
44685 },
44686 hasValidPointDrawMethods: function hasValidPointDrawMethods(type) {
44687 var pointType = type || this.config.point_type;
44688 return isObjectType(pointType) && isFunction(pointType.create) && isFunction(pointType.update);
44689 },
44690 initialOpacityForCircle: function initialOpacityForCircle(d) {
44691 var config = this.config,
44692 withoutFadeIn = this.state.withoutFadeIn,
44693 opacity = config.point_opacity;
44694 if (isUndefined(opacity)) {
44695 opacity = this.getBaseValue(d) !== null && withoutFadeIn[d.id] ? this.opacityForCircle(d) : "0";
44696 }
44697 return opacity;
44698 },
44699 opacityForCircle: function opacityForCircle(d) {
44700 var config = this.config,
44701 opacity = config.point_opacity;
44702 if (isUndefined(opacity)) {
44703 opacity = config.point_show && !config.point_focus_only ? null : "0";
44704 opacity = isValue(this.getBaseValue(d)) ? this.isBubbleType(d) || this.isScatterType(d) ? "0.5" : opacity : "0";
44705 }
44706 return opacity;
44707 },
44708 initCircle: function initCircle() {
44709 var $$ = this,
44710 main = $$.$el.main;
44711 $$.point = $$.generatePoint();
44712 if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select("." + $CIRCLE.chartCircles).empty()) {
44713 main.select("." + $COMMON.chart).append("g").attr("class", $CIRCLE.chartCircles);
44714 }
44715 },
44716 updateTargetForCircle: function updateTargetForCircle(targetsValue, enterNodeValue) {
44717 var _this2 = this,
44718 $$ = this,
44719 config = $$.config,
44720 data = $$.data,
44721 $el = $$.$el,
44722 selectionEnabled = config.interaction_enabled && config.data_selection_enabled,
44723 isSelectable = selectionEnabled && config.data_selection_isselectable,
44724 classCircles = $$.getClass("circles", !0);
44725 if (!config.point_show) {
44726 return;
44727 }
44728 $el.circle || $$.initCircle();
44729 var targets = targetsValue,
44730 enterNode = enterNodeValue;
44731 // only for scatter & bubble type should generate seprate <g> node
44732 if (!targets) {
44733 targets = data.targets.filter(function (d) {
44734 _newArrowCheck(this, _this2);
44735 return this.isScatterType(d) || this.isBubbleType(d);
44736 }.bind(this));
44737 var mainCircle = $el.main.select("." + $CIRCLE.chartCircles).style("pointer-events", "none").selectAll("." + $CIRCLE.circles).data(targets);
44738 mainCircle.exit().remove();
44739 enterNode = mainCircle.enter();
44740 }
44741
44742 // Circles for each data point on lines
44743 selectionEnabled && enterNode.append("g").attr("class", function (d) {
44744 _newArrowCheck(this, _this2);
44745 return $$.generateClass($SELECT.selectedCircles, d.id);
44746 }.bind(this));
44747 enterNode.append("g").attr("class", classCircles).call(function (selection) {
44748 _newArrowCheck(this, _this2);
44749 $$.setCssRule(!0, "." + $CIRCLE.circles, ["cursor:pointer"], isSelectable)(selection);
44750 $$.setCssRule(!0, " ." + $CIRCLE.circle, ["fill", "stroke"], $$.color)(selection);
44751 }.bind(this)).style("opacity", function () {
44752 var parent = src_select(this.parentNode);
44753
44754 // if the parent node is .bb-chart-circles (bubble, scatter), initialize <g bb-circles> with opacity "0"
44755 return parent.attr("class").indexOf($CIRCLE.chartCircles) > -1 ? "0" : null;
44756 });
44757
44758 // Update date for selected circles
44759 selectionEnabled && targets.forEach(function (t) {
44760 var _this3 = this;
44761 _newArrowCheck(this, _this2);
44762 $el.main.selectAll("." + $SELECT.selectedCircles + $$.getTargetSelectorSuffix(t.id)).selectAll("" + $SELECT.selectedCircle).each(function (d) {
44763 _newArrowCheck(this, _this3);
44764 d.value = t.values[d.index].value;
44765 }.bind(this));
44766 }.bind(this));
44767 },
44768 updateCircle: function updateCircle(isSub) {
44769 var _this4 = this;
44770 if (isSub === void 0) {
44771 isSub = !1;
44772 }
44773 var $$ = this,
44774 config = $$.config,
44775 state = $$.state,
44776 $el = $$.$el,
44777 focusOnly = config.point_focus_only,
44778 $root = isSub ? $el.subchart : $el;
44779 if (config.point_show && !state.toggling) {
44780 var circles = $root.main.selectAll("." + $CIRCLE.circles).selectAll("." + $CIRCLE.circle).data(function (d) {
44781 _newArrowCheck(this, _this4);
44782 return $$.isLineType(d) && $$.shouldDrawPointsForLine(d) || $$.isBubbleType(d) || $$.isRadarType(d) || $$.isScatterType(d) ? focusOnly ? [d.values[0]] : d.values : [];
44783 }.bind(this));
44784 circles.exit().remove();
44785 circles.enter().filter(Boolean).append($$.point("create", this, $$.pointR.bind($$), $$.getStylePropValue($$.color)));
44786 $root.circle = $root.main.selectAll("." + $CIRCLE.circles + " ." + $CIRCLE.circle).style("stroke", $$.getStylePropValue($$.color)).style("opacity", $$.initialOpacityForCircle.bind($$));
44787 }
44788 },
44789 redrawCircle: function redrawCircle(cx, cy, withTransition, flow, isSub) {
44790 if (isSub === void 0) {
44791 isSub = !1;
44792 }
44793 var $$ = this,
44794 rendered = $$.state.rendered,
44795 $el = $$.$el,
44796 $T = $$.$T,
44797 $root = isSub ? $el.subchart : $el,
44798 selectedCircles = $root.main.selectAll("." + $SELECT.selectedCircle);
44799 if (!$$.config.point_show) {
44800 return [];
44801 }
44802 var fn = $$.point("update", $$, cx, cy, $$.getStylePropValue($$.color), withTransition, flow, selectedCircles),
44803 posAttr = $$.isCirclePoint() ? "c" : "",
44804 t = getRandom(),
44805 opacityStyleFn = $$.opacityForCircle.bind($$),
44806 mainCircles = [];
44807 $root.circle.each(function (d) {
44808 var result = fn.bind(this)(d);
44809 result = $T(result, withTransition || !rendered, t).style("opacity", opacityStyleFn);
44810 mainCircles.push(result);
44811 });
44812 return [mainCircles, $T(selectedCircles, withTransition).attr(posAttr + "x", cx).attr(posAttr + "y", cy)];
44813 },
44814 /**
44815 * Show focused data point circle
44816 * @param {object} d Selected data
44817 * @private
44818 */
44819 showCircleFocus: function showCircleFocus(d) {
44820 var $$ = this,
44821 config = $$.config,
44822 _$$$state = $$.state,
44823 hasRadar = _$$$state.hasRadar,
44824 resizing = _$$$state.resizing,
44825 toggling = _$$$state.toggling,
44826 transiting = _$$$state.transiting,
44827 $el = $$.$el,
44828 circle = $el.circle;
44829 if (transiting === !1 && config.point_focus_only && circle) {
44830 var cx = (hasRadar ? $$.radarCircleX : $$.circleX).bind($$),
44831 cy = (hasRadar ? $$.radarCircleY : $$.circleY).bind($$),
44832 withTransition = toggling || isUndefined(d),
44833 fn = $$.point("update", $$, cx, cy, $$.getStylePropValue($$.color), resizing ? !1 : withTransition);
44834 if (d) {
44835 circle = circle.filter(function (t) {
44836 var _this5 = this,
44837 data = d.filter(function (v) {
44838 _newArrowCheck(this, _this5);
44839 return v.id === t.id;
44840 }.bind(this));
44841 return data.length ? src_select(this).datum(data[0]) : !1;
44842 });
44843 }
44844 circle.attr("class", this.updatePointClass.bind(this)).style("opacity", null).each(function (d) {
44845 var id = d.id,
44846 index = d.index,
44847 value = d.value,
44848 visibility = "hidden";
44849 if (isValue(value)) {
44850 fn.bind(this)(d);
44851 $$.expandCircles(index, id);
44852 visibility = "";
44853 }
44854 this.style.visibility = visibility;
44855 });
44856 }
44857 },
44858 /**
44859 * Hide focused data point circle
44860 * @private
44861 */
44862 hideCircleFocus: function hideCircleFocus() {
44863 var $$ = this,
44864 config = $$.config,
44865 circle = $$.$el.circle;
44866 if (config.point_focus_only && circle) {
44867 $$.unexpandCircles();
44868 circle.style("visibility", "hidden");
44869 }
44870 },
44871 circleX: function circleX(d) {
44872 return this.xx(d);
44873 },
44874 updateCircleY: function updateCircleY(isSub) {
44875 var _this6 = this;
44876 if (isSub === void 0) {
44877 isSub = !1;
44878 }
44879 var $$ = this,
44880 getPoints = $$.generateGetLinePoints($$.getShapeIndices($$.isLineType), isSub);
44881 return function (d, i) {
44882 _newArrowCheck(this, _this6);
44883 var id = d.id;
44884 return $$.isGrouped(id) ? getPoints(d, i)[0][1] : $$.getYScaleById(id, isSub)($$.getBaseValue(d));
44885 }.bind(this);
44886 },
44887 expandCircles: function expandCircles(i, id, reset) {
44888 var $$ = this,
44889 r = $$.pointExpandedR.bind($$);
44890 reset && $$.unexpandCircles();
44891 var circles = $$.getShapeByIndex("circle", i, id).classed($COMMON.EXPANDED, !0),
44892 scale = r(circles) / $$.config.point_r,
44893 ratio = 1 - scale;
44894 if ($$.isCirclePoint()) {
44895 circles.attr("r", r);
44896 } else {
44897 // transform must be applied to each node individually
44898 circles.each(function () {
44899 var point = src_select(this);
44900 if (this.tagName === "circle") {
44901 point.attr("r", r);
44902 } else {
44903 var _this$getBBox = this.getBBox(),
44904 width = _this$getBBox.width,
44905 height = _this$getBBox.height,
44906 x = ratio * (+point.attr("x") + width / 2),
44907 y = ratio * (+point.attr("y") + height / 2);
44908 point.attr("transform", "translate(" + x + " " + y + ") scale(" + scale + ")");
44909 }
44910 });
44911 }
44912 },
44913 unexpandCircles: function unexpandCircles(i) {
44914 var $$ = this,
44915 r = $$.pointR.bind($$),
44916 circles = $$.getShapeByIndex("circle", i).filter(function () {
44917 return src_select(this).classed($COMMON.EXPANDED);
44918 }).classed($COMMON.EXPANDED, !1);
44919 circles.attr("r", r);
44920 if (!$$.isCirclePoint()) {
44921 var _scale = r(circles) / $$.config.point_r;
44922 circles.attr("transform", _scale !== 1 ? "scale(" + _scale + ")" : null);
44923 }
44924 },
44925 pointR: function (d) {
44926 var $$ = this,
44927 config = $$.config,
44928 pointR = config.point_r,
44929 r = pointR;
44930 if ($$.isBubbleType(d)) {
44931 r = $$.getBubbleR(d);
44932 } else if (isFunction(pointR)) {
44933 r = pointR.bind($$.api)(d);
44934 }
44935 return r;
44936 },
44937 pointExpandedR: function pointExpandedR(d) {
44938 var $$ = this,
44939 config = $$.config,
44940 scale = $$.isBubbleType(d) ? 1.15 : 1.75;
44941 return config.point_focus_expand_enabled ? config.point_focus_expand_r || $$.pointR(d) * scale : $$.pointR(d);
44942 },
44943 pointSelectR: function pointSelectR(d) {
44944 var $$ = this,
44945 selectR = $$.config.point_select_r;
44946 return isFunction(selectR) ? selectR(d) : selectR || $$.pointR(d) * 4;
44947 },
44948 isWithinCircle: function isWithinCircle(node, r) {
44949 var mouse = getPointer(this.state.event, node),
44950 element = src_select(node),
44951 prefix = this.isCirclePoint(node) ? "c" : "",
44952 cx = +element.attr(prefix + "x"),
44953 cy = +element.attr(prefix + "y");
44954 // if node don't have cx/y or x/y attribute value
44955 if (!(cx || cy) && node.nodeType === 1) {
44956 var _getBoundingRect = getBoundingRect(node),
44957 x = _getBoundingRect.x,
44958 y = _getBoundingRect.y;
44959 cx = x;
44960 cy = y;
44961 }
44962 return Math.sqrt(Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)) < (r || this.config.point_sensitivity);
44963 },
44964 insertPointInfoDefs: function insertPointInfoDefs(point, id) {
44965 var _this7 = this,
44966 $$ = this,
44967 copyAttr = function (from, target) {
44968 _newArrowCheck(this, _this7);
44969 for (var attribs = from.attributes, i = 0, name; name = attribs[i]; i++) {
44970 name = name.name;
44971 target.setAttribute(name, from.getAttribute(name));
44972 }
44973 }.bind(this),
44974 doc = new DOMParser().parseFromString(point, "image/svg+xml"),
44975 node = doc.documentElement,
44976 clone = browser_doc.createElementNS(namespaces.svg, node.nodeName.toLowerCase()),
44977 _node$childNodes;
44978 clone.id = id;
44979 clone.style.fill = "inherit";
44980 clone.style.stroke = "inherit";
44981 copyAttr(node, clone);
44982 if ((_node$childNodes = node.childNodes) != null && _node$childNodes.length) {
44983 var parent = src_select(clone);
44984 if ("innerHTML" in clone) {
44985 parent.html(node.innerHTML);
44986 } else {
44987 toArray(node.childNodes).forEach(function (v) {
44988 _newArrowCheck(this, _this7);
44989 copyAttr(v, parent.append(v.tagName).node());
44990 }.bind(this));
44991 }
44992 }
44993 $$.$el.defs.node().appendChild(clone);
44994 },
44995 pointFromDefs: function pointFromDefs(id) {
44996 return this.$el.defs.select("#" + id);
44997 },
44998 updatePointClass: function updatePointClass(d) {
44999 var $$ = this,
45000 circle = $$.$el.circle,
45001 pointClass = !1;
45002 if (isObject(d) || circle) {
45003 pointClass = d === !0 ? circle.each(function (d) {
45004 var className = $$.getClass("circle", !0)(d);
45005 if (this.getAttribute("class").indexOf($COMMON.EXPANDED) > -1) {
45006 className += " " + $COMMON.EXPANDED;
45007 }
45008 this.setAttribute("class", className);
45009 }) : $$.getClass("circle", !0)(d);
45010 }
45011 return pointClass;
45012 },
45013 generateGetLinePoints: function generateGetLinePoints(lineIndices, isSub) {
45014 var _this8 = this,
45015 $$ = this,
45016 config = $$.config,
45017 x = $$.getShapeX(0, lineIndices, isSub),
45018 y = $$.getShapeY(isSub),
45019 lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, isSub),
45020 yScale = $$.getYScaleById.bind($$);
45021 return function (d, i) {
45022 _newArrowCheck(this, _this8);
45023 var y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
45024 offset = lineOffset(d, i) || y0,
45025 posX = x(d),
45026 posY = y(d);
45027 // fix posY not to overflow opposite quadrant
45028 if (config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY)) {
45029 posY = y0;
45030 }
45031
45032 // 1 point that marks the line position
45033 var point = [posX, posY - (y0 - offset)];
45034 return [point, point,
45035 // from here and below, needed for compatibility
45036 point, point];
45037 }.bind(this);
45038 },
45039 generatePoint: function generatePoint() {
45040 var $$ = this,
45041 config = $$.config,
45042 datetimeId = $$.state.datetimeId,
45043 ids = [],
45044 pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];
45045 return function (method, context) {
45046 for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
45047 args[_key - 2] = arguments[_key];
45048 }
45049 return function (d) {
45050 var _d$data,
45051 id = $$.getTargetSelectorSuffix(d.id || ((_d$data = d.data) == null ? void 0 : _d$data.id) || d),
45052 element = src_select(this);
45053 ids.indexOf(id) < 0 && ids.push(id);
45054 var point = pattern[ids.indexOf(id) % pattern.length];
45055 if ($$.hasValidPointType(point)) {
45056 point = $$[point];
45057 } else if (!$$.hasValidPointDrawMethods(point)) {
45058 var pointId = datetimeId + "-point" + id,
45059 pointFromDefs = $$.pointFromDefs(pointId);
45060 if (pointFromDefs.size() < 1) {
45061 $$.insertPointInfoDefs(point, pointId);
45062 }
45063 if (method === "create") {
45064 return $$.custom.create.bind(context).apply(void 0, [element, pointId].concat(args));
45065 } else if (method === "update") {
45066 return $$.custom.update.bind(context).apply(void 0, [element].concat(args));
45067 }
45068 }
45069 return point[method].bind(context).apply(void 0, [element].concat(args));
45070 };
45071 };
45072 },
45073 custom: {
45074 create: function create(element, id, fillStyleFn) {
45075 return element.append("use").attr("xlink:href", "#" + id).attr("class", this.updatePointClass.bind(this)).style("fill", fillStyleFn).node();
45076 },
45077 update: function update(element, xPosFn, yPosFn, fillStyleFn, withTransition, flow, selectedCircles) {
45078 var _this9 = this,
45079 $$ = this,
45080 _element$node$getBBox = element.node().getBBox(),
45081 width = _element$node$getBBox.width,
45082 height = _element$node$getBBox.height,
45083 xPosFn2 = function (d) {
45084 _newArrowCheck(this, _this9);
45085 return isValue(d.value) ? xPosFn(d) - width / 2 : 0;
45086 }.bind(this),
45087 yPosFn2 = function (d) {
45088 _newArrowCheck(this, _this9);
45089 return isValue(d.value) ? yPosFn(d) - height / 2 : 0;
45090 }.bind(this),
45091 mainCircles = element;
45092 if (withTransition) {
45093 flow && mainCircles.attr("x", xPosFn2);
45094 mainCircles = $$.$T(mainCircles, withTransition, getTransitionName());
45095 selectedCircles && $$.$T(selectedCircles, withTransition, getTransitionName());
45096 }
45097 return mainCircles.attr("x", xPosFn2).attr("y", yPosFn2).style("fill", fillStyleFn);
45098 }
45099 },
45100 // 'circle' data point
45101 circle: {
45102 create: function create(element, sizeFn, fillStyleFn) {
45103 return element.append("circle").attr("class", this.updatePointClass.bind(this)).attr("r", sizeFn).style("fill", fillStyleFn).node();
45104 },
45105 update: function update(element, xPosFn, yPosFn, fillStyleFn, withTransition, flow, selectedCircles) {
45106 var $$ = this,
45107 mainCircles = element;
45108 // when '.load()' called, bubble size should be updated
45109 if ($$.hasType("bubble")) {
45110 mainCircles.attr("r", $$.pointR.bind($$));
45111 }
45112 if (withTransition) {
45113 flow && mainCircles.attr("cx", xPosFn);
45114 if (mainCircles.attr("cx")) {
45115 mainCircles = $$.$T(mainCircles, withTransition, getTransitionName());
45116 }
45117 selectedCircles && $$.$T(mainCircles, withTransition, getTransitionName());
45118 }
45119 return mainCircles.attr("cx", xPosFn).attr("cy", yPosFn).style("fill", fillStyleFn);
45120 }
45121 },
45122 // 'rectangle' data point
45123 rectangle: {
45124 create: function create(element, sizeFn, fillStyleFn) {
45125 var _this10 = this,
45126 rectSizeFn = function (d) {
45127 _newArrowCheck(this, _this10);
45128 return sizeFn(d) * 2;
45129 }.bind(this);
45130 return element.append("rect").attr("class", this.updatePointClass.bind(this)).attr("width", rectSizeFn).attr("height", rectSizeFn).style("fill", fillStyleFn).node();
45131 },
45132 update: function update(element, xPosFn, yPosFn, fillStyleFn, withTransition, flow, selectedCircles) {
45133 var _this11 = this,
45134 $$ = this,
45135 r = $$.config.point_r,
45136 rectXPosFn = function (d) {
45137 _newArrowCheck(this, _this11);
45138 return xPosFn(d) - r;
45139 }.bind(this),
45140 rectYPosFn = function (d) {
45141 _newArrowCheck(this, _this11);
45142 return yPosFn(d) - r;
45143 }.bind(this),
45144 mainCircles = element;
45145 if (withTransition) {
45146 flow && mainCircles.attr("x", rectXPosFn);
45147 mainCircles = $$.$T(mainCircles, withTransition, getTransitionName());
45148 selectedCircles && $$.$T(selectedCircles, withTransition, getTransitionName());
45149 }
45150 return mainCircles.attr("x", rectXPosFn).attr("y", rectYPosFn).style("fill", fillStyleFn);
45151 }
45152 }
45153});
45154;// CONCATENATED MODULE: ./src/ChartInternal/shape/polar.ts
45155
45156/**
45157 * Copyright (c) 2017 ~ present NAVER Corp.
45158 * billboard.js project is licensed under the MIT license
45159 */
45160
45161
45162/**
45163 * Get data max value
45164 * @param {object} $$ ChartInternal instance
45165 * @returns {number} max value
45166 * @private
45167 */
45168function getDataMax($$) {
45169 var levelMax = $$.config.polar_level_max,
45170 dataMax = $$.getMinMaxData().max[0].value;
45171 // Apply level max only when is greater than the data max value
45172 if (levelMax && levelMax > dataMax) {
45173 dataMax = levelMax;
45174 }
45175 return dataMax;
45176}
45177/* harmony default export */ var polar = ({
45178 /**
45179 * Initialize polar
45180 * @private
45181 */
45182 initPolar: function initPolar() {
45183 var $$ = this,
45184 arcs = $$.$el.arcs,
45185 config = $$.config,
45186 levelTextShow = config.polar_level_text_show,
45187 levelTextBgColor = config.polar_level_text_backgroundColor;
45188 // append <g> for level
45189 arcs.levels = arcs.append("g").attr("class", $LEVEL.levels);
45190
45191 // set level text background color
45192 if (levelTextShow && levelTextBgColor) {
45193 $$.generateDataLabelBackgroundColorFilter(levelTextBgColor);
45194 }
45195 },
45196 /**
45197 * Get polar outer radius according to the data value
45198 * @param {object} d Data object
45199 * @param {numbet} outerRadius Outer radius
45200 * @returns {number} outer radius
45201 * @private
45202 */
45203 getPolarOuterRadius: function getPolarOuterRadius(d, outerRadius) {
45204 var _d$data$values$0$valu,
45205 dataMax = getDataMax(this);
45206 return ((_d$data$values$0$valu = d == null ? void 0 : d.data.values[0].value) != null ? _d$data$values$0$valu : 0) / dataMax * outerRadius;
45207 },
45208 /**
45209 * Update polar based on given data array
45210 * @param {object} targets Data object
45211 * @private
45212 */
45213 updateTargetsForPolar: function updateTargetsForPolar(targets) {
45214 // borrow from Arc
45215 this.updateTargetsForArc(targets);
45216 },
45217 /**
45218 * Called whenever redraw happens
45219 * @private
45220 */
45221 redrawPolar: function redrawPolar() {
45222 var $$ = this,
45223 config = $$.config;
45224 config.polar_level_show && $$.updatePolarLevel();
45225 },
45226 /**
45227 * Update polar level circle
45228 * @private
45229 */
45230 updatePolarLevel: function updatePolarLevel() {
45231 var _this = this,
45232 $$ = this,
45233 config = $$.config,
45234 state = $$.state,
45235 levels = $$.$el.arcs.levels,
45236 depth = config.polar_level_depth,
45237 dataMax = getDataMax($$),
45238 levelData = getRange(0, depth),
45239 outerRadius = state.radius,
45240 levelRatio = levelData.map(function (l) {
45241 _newArrowCheck(this, _this);
45242 return outerRadius * ((l + 1) / depth);
45243 }.bind(this)),
45244 levelTextFormat = (config.polar_level_text_format || function () {}).bind($$.api),
45245 level = levels.selectAll("." + $LEVEL.level).data(levelData);
45246 level.exit().remove();
45247 var levelEnter = level.enter().append("g").attr("class", function (d, i) {
45248 _newArrowCheck(this, _this);
45249 return $LEVEL.level + " " + $LEVEL.level + "-" + i;
45250 }.bind(this));
45251
45252 // cx, cy, translate: Set center as origin (0,0) so that it can share same center with arcs
45253 levelEnter.append("circle");
45254 levelEnter.merge(level).selectAll("circle").style("visibility", config.polar_level_show ? null : "hidden").attr("cx", 0).attr("cy", 0).attr("r", function (d) {
45255 _newArrowCheck(this, _this);
45256 return levelRatio[d];
45257 }.bind(this));
45258 if (config.polar_level_text_show) {
45259 var levelTextBackgroundColor = config.polar_level_text_backgroundColor,
45260 defsId = "#" + state.datetimeId + "-labels-bg" + $$.getTargetSelectorSuffix(levelTextBackgroundColor);
45261 levelEnter.append("text").style("text-anchor", "middle");
45262 levelEnter.merge(level).selectAll("text").attr("dy", function (d) {
45263 _newArrowCheck(this, _this);
45264 return -levelRatio[d] + 5;
45265 }.bind(this)).attr("filter", levelTextBackgroundColor ? "url(" + defsId + ")" : null).text(function (d) {
45266 _newArrowCheck(this, _this);
45267 return levelTextFormat(dataMax / levelData.length * (d + 1));
45268 }.bind(this));
45269 }
45270 }
45271});
45272;// CONCATENATED MODULE: ./src/ChartInternal/shape/radar.ts
45273
45274/**
45275 * Copyright (c) 2017 ~ present NAVER Corp.
45276 * billboard.js project is licensed under the MIT license
45277 */
45278
45279
45280
45281
45282
45283/**
45284 * Get the position value
45285 * @param {boolean} isClockwise If the direction is clockwise
45286 * @param {string} type Coordinate type 'x' or 'y'
45287 * @param {number} edge Number of edge
45288 * @param {number} pos The indexed position
45289 * @param {number} range Range value
45290 * @param {number} ratio Ratio value
45291 * @returns {number}
45292 * @private
45293 */
45294function getPosition(isClockwise, type, edge, pos, range, ratio) {
45295 var index = isClockwise && pos > 0 ? edge - pos : pos,
45296 r = 2 * Math.PI,
45297 func = type === "x" ? Math.sin : Math.cos;
45298 return range * (1 - ratio * func(index * r / edge));
45299}
45300
45301// cache key
45302var cacheKey = KEY.radarPoints;
45303/* harmony default export */ var radar = ({
45304 initRadar: function initRadar() {
45305 var $$ = this,
45306 config = $$.config,
45307 current = $$.state.current,
45308 $el = $$.$el;
45309 if ($$.hasType("radar")) {
45310 $el.radar = $el.main.select("." + $COMMON.chart).append("g").attr("class", $RADAR.chartRadars);
45311
45312 // level
45313 $el.radar.levels = $el.radar.append("g").attr("class", $LEVEL.levels);
45314
45315 // axis
45316 $el.radar.axes = $el.radar.append("g").attr("class", $AXIS.axis);
45317
45318 // shapes
45319 $el.radar.shapes = $el.radar.append("g").attr("class", $SHAPE.shapes);
45320 current.dataMax = config.radar_axis_max || $$.getMinMaxData().max[0].value;
45321 }
45322 },
45323 getRadarSize: function getRadarSize() {
45324 var $$ = this,
45325 config = $$.config,
45326 _$$$state = $$.state,
45327 arcWidth = _$$$state.arcWidth,
45328 arcHeight = _$$$state.arcHeight,
45329 padding = config.axis_x_categories.length < 4 ? -20 : 10,
45330 size = (Math.min(arcWidth, arcHeight) - padding) / 2;
45331 return [size, size];
45332 },
45333 updateTargetsForRadar: function updateTargetsForRadar(targets) {
45334 var _this = this,
45335 $$ = this,
45336 config = $$.config;
45337 if (isEmpty(config.axis_x_categories)) {
45338 config.axis_x_categories = getRange(0, getMinMax("max", targets.map(function (v) {
45339 _newArrowCheck(this, _this);
45340 return v.values.length;
45341 }.bind(this))));
45342 }
45343 $$.generateRadarPoints();
45344 },
45345 getRadarPosition: function getRadarPosition(type, index, range, ratio) {
45346 var _this2 = this,
45347 $$ = this,
45348 config = $$.config,
45349 _$$$getRadarSize = $$.getRadarSize(),
45350 width = _$$$getRadarSize[0],
45351 height = _$$$getRadarSize[1],
45352 edge = config.axis_x_categories.length,
45353 isClockwise = config.radar_direction_clockwise,
45354 pos = toArray(type).map(function (v) {
45355 _newArrowCheck(this, _this2);
45356 return getPosition(isClockwise, v, edge, index, isDefined(range) ? range : type === "x" ? width : height, isNumber(ratio) ? ratio : config.radar_size_ratio);
45357 }.bind(this));
45358 return pos.length === 1 ? pos[0] : pos;
45359 },
45360 /**
45361 * Generate data points
45362 * @private
45363 */
45364 generateRadarPoints: function generateRadarPoints() {
45365 var _this3 = this,
45366 $$ = this,
45367 targets = $$.data.targets,
45368 _$$$getRadarSize2 = $$.getRadarSize(),
45369 width = _$$$getRadarSize2[0],
45370 height = _$$$getRadarSize2[1],
45371 points = $$.cache.get(cacheKey) || {},
45372 size = points._size;
45373 // recalculate position only when the previous dimension has been changed
45374 if (!size || size.width !== width && size.height !== height) {
45375 targets.forEach(function (d) {
45376 var _this4 = this;
45377 _newArrowCheck(this, _this3);
45378 points[d.id] = d.values.map(function (v, i) {
45379 _newArrowCheck(this, _this4);
45380 return $$.getRadarPosition(["x", "y"], i, undefined, $$.getRatio("radar", v));
45381 }.bind(this));
45382 }.bind(this));
45383 points._size = {
45384 width: width,
45385 height: height
45386 };
45387 $$.cache.add(cacheKey, points);
45388 }
45389 },
45390 redrawRadar: function redrawRadar() {
45391 var $$ = this,
45392 _$$$$el = $$.$el,
45393 radar = _$$$$el.radar,
45394 main = _$$$$el.main,
45395 translate = $$.getTranslate("radar");
45396 // Adjust radar, circles and texts' position
45397 if (translate) {
45398 radar.attr("transform", translate);
45399 main.select("." + $TEXT.chartTexts).attr("transform", translate);
45400 $$.generateRadarPoints();
45401 $$.updateRadarLevel();
45402 $$.updateRadarAxes();
45403 $$.updateRadarShape();
45404 }
45405 },
45406 generateGetRadarPoints: function generateGetRadarPoints() {
45407 var _this5 = this,
45408 points = this.cache.get(cacheKey);
45409 return function (d, i) {
45410 _newArrowCheck(this, _this5);
45411 var point = points[d.id][i];
45412 return [point, point, point, point];
45413 }.bind(this);
45414 },
45415 updateRadarLevel: function updateRadarLevel() {
45416 var _this6 = this,
45417 $$ = this,
45418 config = $$.config,
45419 state = $$.state,
45420 radar = $$.$el.radar,
45421 _$$$getRadarSize3 = $$.getRadarSize(),
45422 width = _$$$getRadarSize3[0],
45423 height = _$$$getRadarSize3[1],
45424 depth = config.radar_level_depth,
45425 edge = config.axis_x_categories.length,
45426 showText = config.radar_level_text_show,
45427 radarLevels = radar.levels,
45428 levelData = getRange(0, depth),
45429 radius = config.radar_size_ratio * Math.min(width, height),
45430 levelRatio = levelData.map(function (l) {
45431 _newArrowCheck(this, _this6);
45432 return radius * ((l + 1) / depth);
45433 }.bind(this)),
45434 levelTextFormat = (config.radar_level_text_format || function () {}).bind($$.api),
45435 points = levelData.map(function (v) {
45436 var _this7 = this;
45437 _newArrowCheck(this, _this6);
45438 var range = levelRatio[v],
45439 pos = getRange(0, edge).map(function (i) {
45440 _newArrowCheck(this, _this7);
45441 return $$.getRadarPosition(["x", "y"], i, range, 1).join(",");
45442 }.bind(this));
45443 return pos.join(" ");
45444 }.bind(this)),
45445 level = radarLevels.selectAll("." + $LEVEL.level).data(levelData);
45446 level.exit().remove();
45447 var levelEnter = level.enter().append("g").attr("class", function (d, i) {
45448 _newArrowCheck(this, _this6);
45449 return $LEVEL.level + " " + $LEVEL.level + "-" + i;
45450 }.bind(this));
45451 levelEnter.append("polygon").style("visibility", config.radar_level_show ? null : "hidden");
45452 if (showText) {
45453 if (radarLevels.select("text").empty()) {
45454 radarLevels.append("text").attr("dx", "-.5em").attr("dy", "-.7em").style("text-anchor", "end").text(function () {
45455 _newArrowCheck(this, _this6);
45456 return levelTextFormat(0);
45457 }.bind(this));
45458 }
45459 levelEnter.append("text").attr("dx", "-.5em").style("text-anchor", "end").text(function (d) {
45460 _newArrowCheck(this, _this6);
45461 return levelTextFormat(state.current.dataMax / levelData.length * (d + 1));
45462 }.bind(this));
45463 }
45464 levelEnter.merge(level).attr("transform", function (d) {
45465 _newArrowCheck(this, _this6);
45466 return "translate(" + (width - levelRatio[d]) + ", " + (height - levelRatio[d]) + ")";
45467 }.bind(this)).selectAll("polygon").attr("points", function (d) {
45468 _newArrowCheck(this, _this6);
45469 return points[d];
45470 }.bind(this));
45471
45472 // update level text position
45473 if (showText) {
45474 radarLevels.selectAll("text").attr("x", function (d) {
45475 _newArrowCheck(this, _this6);
45476 return isUndefined(d) ? width : points[d].split(",")[0];
45477 }.bind(this)).attr("y", function (d) {
45478 _newArrowCheck(this, _this6);
45479 return isUndefined(d) ? height : 0;
45480 }.bind(this));
45481 }
45482 },
45483 updateRadarAxes: function updateRadarAxes() {
45484 var _this8 = this,
45485 $$ = this,
45486 config = $$.config,
45487 radar = $$.$el.radar,
45488 _$$$getRadarSize4 = $$.getRadarSize(),
45489 width = _$$$getRadarSize4[0],
45490 height = _$$$getRadarSize4[1],
45491 categories = config.axis_x_categories,
45492 axis = radar.axes.selectAll("g").data(categories);
45493 axis.exit().remove();
45494 var axisEnter = axis.enter().append("g").attr("class", function (d, i) {
45495 _newArrowCheck(this, _this8);
45496 return $AXIS.axis + "-" + i;
45497 }.bind(this));
45498 config.radar_axis_line_show && axisEnter.append("line");
45499 config.radar_axis_text_show && axisEnter.append("text");
45500 axis = axisEnter.merge(axis);
45501
45502 // axis line
45503 if (config.radar_axis_line_show) {
45504 axis.select("line").attr("x1", width).attr("y1", height).attr("x2", function (d, i) {
45505 _newArrowCheck(this, _this8);
45506 return $$.getRadarPosition("x", i);
45507 }.bind(this)).attr("y2", function (d, i) {
45508 _newArrowCheck(this, _this8);
45509 return $$.getRadarPosition("y", i);
45510 }.bind(this));
45511 }
45512
45513 // axis text
45514 if (config.radar_axis_text_show) {
45515 var _config$radar_axis_te = config.radar_axis_text_position,
45516 _config$radar_axis_te2 = _config$radar_axis_te.x,
45517 x = _config$radar_axis_te2 === void 0 ? 0 : _config$radar_axis_te2,
45518 _config$radar_axis_te3 = _config$radar_axis_te.y,
45519 y = _config$radar_axis_te3 === void 0 ? 0 : _config$radar_axis_te3;
45520 axis.select("text").style("text-anchor", "middle").attr("dy", ".5em").call(function (selection) {
45521 _newArrowCheck(this, _this8);
45522 selection.each(function (d) {
45523 setTextValue(src_select(this), d + "", [-.6, 1.2]);
45524 });
45525 }.bind(this)).datum(function (d, i) {
45526 _newArrowCheck(this, _this8);
45527 return {
45528 index: i
45529 };
45530 }.bind(this)).attr("transform", function (d) {
45531 if (isUndefined(this.width)) {
45532 // cache evaluated axis text width
45533 this.width = this.getBoundingClientRect().width / 2;
45534 }
45535 var posX = $$.getRadarPosition("x", d.index, undefined, 1),
45536 posY = Math.round($$.getRadarPosition("y", d.index, undefined, 1));
45537 if (posX > width) {
45538 posX += this.width + x;
45539 } else if (Math.round(posX) < width) {
45540 posX -= this.width + x;
45541 }
45542 if (posY > height) {
45543 // update vertical centered edge axis text dy position
45544 if (posY / 2 === height && this.firstChild.tagName === "tspan") {
45545 this.firstChild.setAttribute("dy", "0em");
45546 }
45547 posY += y;
45548 } else if (posY < height) {
45549 posY -= y;
45550 }
45551 return "translate(" + posX + " " + posY + ")";
45552 });
45553 }
45554 $$.bindEvent();
45555 },
45556 bindEvent: function bindEvent() {
45557 var _this9 = this,
45558 $$ = this,
45559 config = $$.config,
45560 state = $$.state,
45561 _$$$$el2 = $$.$el,
45562 radar = _$$$$el2.radar,
45563 svg = _$$$$el2.svg,
45564 focusOnly = config.point_focus_only,
45565 _state = state,
45566 inputType = _state.inputType,
45567 transiting = _state.transiting;
45568 if (config.interaction_enabled) {
45569 var isMouse = inputType === "mouse",
45570 getIndex = function (event) {
45571 _newArrowCheck(this, _this9);
45572 var target = event.target;
45573
45574 // in case of multilined axis text
45575 if (/tspan/i.test(target.tagName)) {
45576 target = target.parentNode;
45577 }
45578 var d = src_select(target).datum();
45579 return d && Object.keys(d).length === 1 ? d.index : undefined;
45580 }.bind(this),
45581 hide = function (event) {
45582 _newArrowCheck(this, _this9);
45583 state.event = event;
45584 var index = getIndex(event),
45585 noIndex = isUndefined(index);
45586 if (isMouse || noIndex) {
45587 $$.hideTooltip();
45588 focusOnly ? $$.hideCircleFocus() : $$.unexpandCircles();
45589 if (isMouse) {
45590 $$.setOverOut(!1, index);
45591 } else if (noIndex) {
45592 $$.callOverOutForTouch();
45593 }
45594 }
45595 }.bind(this);
45596 radar.axes.selectAll("text").on(isMouse ? "mouseover " : "touchstart", function (event) {
45597 _newArrowCheck(this, _this9);
45598 if (transiting) {
45599 // skip while transiting
45600 return;
45601 }
45602 state.event = event;
45603 var index = getIndex(event);
45604 $$.selectRectForSingle(svg.node(), null, index);
45605 isMouse ? $$.setOverOut(!0, index) : $$.callOverOutForTouch(index);
45606 }.bind(this)).on("mouseout", isMouse ? hide : null);
45607 if (!isMouse) {
45608 svg.on("touchstart", hide);
45609 }
45610 }
45611 },
45612 updateRadarShape: function updateRadarShape() {
45613 var _this10 = this,
45614 $$ = this,
45615 targets = $$.data.targets.filter(function (d) {
45616 _newArrowCheck(this, _this10);
45617 return $$.isRadarType(d);
45618 }.bind(this)),
45619 points = $$.cache.get(cacheKey),
45620 areas = $$.$el.radar.shapes.selectAll("polygon").data(targets),
45621 areasEnter = areas.enter().append("g").attr("class", $$.getChartClass("Radar"));
45622 $$.$T(areas.exit()).remove();
45623 areasEnter.append("polygon").merge(areas).style("fill", $$.color).style("stroke", $$.color).attr("points", function (d) {
45624 _newArrowCheck(this, _this10);
45625 return points[d.id].join(" ");
45626 }.bind(this));
45627 $$.updateTargetForCircle(targets, areasEnter);
45628 },
45629 /**
45630 * Get data point x coordinate
45631 * @param {object} d Data object
45632 * @returns {number}
45633 * @private
45634 */
45635 radarCircleX: function radarCircleX(d) {
45636 return this.cache.get(cacheKey)[d.id][d.index][0];
45637 },
45638 /**
45639 * Get data point y coordinate
45640 * @param {object} d Data object
45641 * @returns {number}
45642 * @private
45643 */
45644 radarCircleY: function radarCircleY(d) {
45645 return this.cache.get(cacheKey)[d.id][d.index][1];
45646 }
45647});
45648;// CONCATENATED MODULE: ./src/config/Options/common/point.ts
45649/**
45650 * Copyright (c) 2017 ~ present NAVER Corp.
45651 * billboard.js project is licensed under the MIT license
45652 */
45653/**
45654 * point config options
45655 */
45656/* harmony default export */ var common_point = ({
45657 /**
45658 * Set point options
45659 * @name point
45660 * @memberof Options
45661 * @type {object}
45662 * @property {object} point Point object
45663 * @property {boolean} [point.show=true] Whether to show each point in line.
45664 * @property {number|Function} [point.r=2.5] The radius size of each point.
45665 * - **NOTE:** Disabled for 'bubble' type
45666 * @property {boolean} [point.focus.expand.enabled=true] Whether to expand each point on focus.
45667 * @property {number} [point.focus.expand.r=point.r*1.75] The radius size of each point on focus.
45668 * - **NOTE:** For 'bubble' type, the default is `bubbleSize*1.15`
45669 * @property {boolean} [point.focus.only=false] Show point only when is focused.
45670 * @property {number|null} [point.opacity=undefined] Set point opacity value.
45671 * - **NOTE:**
45672 * - `null` will make to not set inline 'opacity' css prop.
45673 * - when no value(or undefined) is set, it defaults to set opacity value according its chart types.
45674 * @property {number} [point.sensitivity=10] The senstivity value for interaction boundary.
45675 * @property {number} [point.select.r=point.r*4] The radius size of each point on selected.
45676 * @property {string} [point.type="circle"] The type of point to be drawn
45677 * - **NOTE:**
45678 * - If chart has 'bubble' type, only circle can be used.
45679 * - For IE, non circle point expansions are not supported due to lack of transform support.
45680 * - **Available Values:**
45681 * - circle
45682 * - rectangle
45683 * @property {Array} [point.pattern=[]] The type of point or svg shape as string, to be drawn for each line
45684 * - **NOTE:**
45685 * - This is an `experimental` feature and can have some unexpected behaviors.
45686 * - If chart has 'bubble' type, only circle can be used.
45687 * - For IE, non circle point expansions are not supported due to lack of transform support.
45688 * - **Available Values:**
45689 * - circle
45690 * - rectangle
45691 * - svg shape tag interpreted as string<br>
45692 * (ex. `<polygon points='2.5 0 0 5 5 5'></polygon>`)
45693 * @see [Demo: point type](https://naver.github.io/billboard.js/demo/#Point.RectanglePoints)
45694 * @see [Demo: point focus only](https://naver.github.io/billboard.js/demo/#Point.FocusOnly)
45695 * @example
45696 * point: {
45697 * show: false,
45698 * r: 5,
45699 *
45700 * // or customize the radius
45701 * r: function(d) {
45702 * ...
45703 * return r;
45704 * },
45705 *
45706 * focus: {
45707 * expand: {
45708 * enabled: true,
45709 * r: 1
45710 * },
45711 * only: true
45712 * },
45713 *
45714 * // do not set inline 'opacity' css prop setting
45715 * opacity: null,
45716 *
45717 * // set every data point's opacity value
45718 * opacity: 0.7,
45719 *
45720 * select: {
45721 * r: 3
45722 * },
45723 *
45724 * // having lower value, means how closer to be for interaction
45725 * sensitivity: 3,
45726 *
45727 * // valid values are "circle" or "rectangle"
45728 * type: "rectangle",
45729 *
45730 * // or indicate as pattern
45731 * pattern: [
45732 * "circle",
45733 * "rectangle",
45734 * "<polygon points='0 6 4 0 -4 0'></polygon>"
45735 * ],
45736 * }
45737 */
45738 point_show: !0,
45739 point_r: 2.5,
45740 point_sensitivity: 10,
45741 point_focus_expand_enabled: !0,
45742 point_focus_expand_r: undefined,
45743 point_focus_only: !1,
45744 point_opacity: undefined,
45745 point_pattern: [],
45746 point_select_r: undefined,
45747 point_type: "circle"
45748});
45749;// CONCATENATED MODULE: ./src/config/Options/shape/area.ts
45750/**
45751 * Copyright (c) 2017 ~ present NAVER Corp.
45752 * billboard.js project is licensed under the MIT license
45753 */
45754/**
45755 * area config options
45756 */
45757/* harmony default export */ var Options_shape_area = ({
45758 /**
45759 * Set area options
45760 * @name area
45761 * @memberof Options
45762 * @type {object}
45763 * @property {object} area Area object
45764 * @property {boolean} [area.above=false] Set background area `above` the data chart line.
45765 * @property {boolean} [area.below=false] Set background area `below` the data chart line.
45766 * - **NOTE**: Can't be used along with `above` option. When above & below options are set to true, `above` will be prioritized.
45767 * @property {boolean} [area.front=true] Set area node to be positioned over line node.
45768 * @property {boolean|object} [area.linearGradient=false] Set the linear gradient on area.<br><br>
45769 * Or customize by giving below object value:
45770 * - x {Array}: `x1`, `x2` value
45771 * - y {Array}: `y1`, `y2` value
45772 * - stops {Array}: Each item should be having `[offset, stop-color, stop-opacity]` values.
45773 * @property {boolean} [area.zerobased=true] Set if min or max value will be 0 on area chart.
45774 * @see [MDN's &lt;linearGradient>](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient), [&lt;stop>](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/stop)
45775 * @see [Demo](https://naver.github.io/billboard.js/demo/#Chart.AreaChart)
45776 * @see [Demo: above](https://naver.github.io/billboard.js/demo/#AreaChartOptions.Above)
45777 * @see [Demo: below](https://naver.github.io/billboard.js/demo/#AreaChartOptions.Below)
45778 * @see [Demo: linearGradient](https://naver.github.io/billboard.js/demo/#AreaChartOptions.LinearGradient)
45779 * @example
45780 * area: {
45781 * above: true,
45782 * below: false,
45783 * zerobased: false,
45784 *
45785 * // <g class='bb-areas'> will be positioned behind the line <g class='bb-lines'> in stacking order
45786 * front: false,
45787 *
45788 * // will generate follwing linearGradient:
45789 * // <linearGradient x1="0" x2="0" y1="0" y2="1">
45790 * // <stop offset="0" stop-color="$DATA_COLOR" stop-opacity="1"></stop>
45791 * // <stop offset="1" stop-color="$DATA_COLOR" stop-opacity="0"></stop>
45792 * // </linearGradient>
45793 * linearGradient: true,
45794 *
45795 * // Or customized gradient
45796 * linearGradient: {
45797 * x: [0, 0], // x1, x2 attributes
45798 * y: [0, 0], // y1, y2 attributes
45799 * stops: [
45800 * // offset, stop-color, stop-opacity
45801 * [0, "#7cb5ec", 1],
45802 *
45803 * // setting 'null' for stop-color, will set its original data color
45804 * [0.5, null, 0],
45805 *
45806 * // setting 'function' for stop-color, will pass data id as argument.
45807 * // It should return color string or null value
45808 * [1, function(id) { return id === "data1" ? "red" : "blue"; }, 0],
45809 * ]
45810 * }
45811 * }
45812 */
45813 area_above: !1,
45814 area_below: !1,
45815 area_front: !0,
45816 area_linearGradient: !1,
45817 area_zerobased: !0
45818});
45819;// CONCATENATED MODULE: ./src/config/Options/shape/bar.ts
45820/**
45821 * Copyright (c) 2017 ~ present NAVER Corp.
45822 * billboard.js project is licensed under the MIT license
45823 */
45824/**
45825 * bar config options
45826 */
45827/* harmony default export */ var shape_bar = ({
45828 /**
45829 * Set bar options
45830 * @name bar
45831 * @memberof Options
45832 * @type {object}
45833 * @property {object} bar Bar object
45834 * @property {number} [bar.indices.removeNull=false] Remove nullish data on bar indices positions.
45835 * @property {number} [bar.label.threshold=0] Set threshold ratio to show/hide labels.
45836 * @property {boolean|object} [bar.linearGradient=false] Set the linear gradient on bar.<br><br>
45837 * Or customize by giving below object value:
45838 * - x {Array}: `x1`, `x2` value
45839 * - y {Array}: `y1`, `y2` value
45840 * - stops {Array}: Each item should be having `[offset, stop-color, stop-opacity]` values.
45841 * @property {boolean} [bar.overlap=false] Bars will be rendered at same position, which will be overlapped each other. (for non-grouped bars only)
45842 * @property {number} [bar.padding=0] The padding pixel value between each bar.
45843 * @property {number} [bar.radius] Set the radius of bar edge in pixel.
45844 * @property {number} [bar.radius.ratio] Set the radius ratio of bar edge in relative the bar's width.
45845 * @property {number} [bar.sensitivity=2] The senstivity offset value for interaction boundary.
45846 * @property {number} [bar.width] Change the width of bar chart.
45847 * @property {number} [bar.width.ratio=0.6] Change the width of bar chart by ratio.
45848 * @property {number} [bar.width.max] The maximum width value for ratio.
45849 * @property {number} [bar.width.dataname] Change the width of bar for indicated dataset only.
45850 * - **NOTE:**
45851 * - Works only for non-stacked bar
45852 * - Bars are centered accoding its total width value
45853 * @property {number} [bar.width.dataname.ratio=0.6] Change the width of bar chart by ratio.
45854 * @property {number} [bar.width.dataname.max] The maximum width value for ratio.
45855 * @property {boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.
45856 * @see [Demo: bar indices](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarIndices)
45857 * @see [Demo: bar overlap](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarOverlap)
45858 * @see [Demo: bar padding](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarPadding)
45859 * @see [Demo: bar radius](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarRadius)
45860 * @see [Demo: bar width](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidth)
45861 * @see [Demo: bar width variant](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidthVariant)
45862 * @example
45863 * bar: {
45864 * // remove nullish data on bar indices postions
45865 * indices: {
45866 * removeNull: true
45867 * },
45868 *
45869 * // will generate follwing linearGradient:
45870 * // <linearGradient x1="0" x2="0" y1="0" y2="1">
45871 * // <stop offset="0" stop-color="$DATA_COLOR" stop-opacity="1"></stop>
45872 * // <stop offset="1" stop-color="$DATA_COLOR" stop-opacity="0"></stop>
45873 * // </linearGradient>
45874 * linearGradient: true,
45875 *
45876 * // Or customized gradient
45877 * linearGradient: {
45878 * x: [0, 0], // x1, x2 attributes
45879 * y: [0, 0], // y1, y2 attributes
45880 * stops: [
45881 * // offset, stop-color, stop-opacity
45882 * [0, "#7cb5ec", 1],
45883 *
45884 * // setting 'null' for stop-color, will set its original data color
45885 * [0.5, null, 0],
45886 *
45887 * // setting 'function' for stop-color, will pass data id as argument.
45888 * // It should return color string or null value
45889 * [1, function(id) { return id === "data1" ? "red" : "blue"; }, 0],
45890 * ]
45891 * },
45892 *
45893 * // remove nullish da
45894 * overlap: true,
45895 *
45896 * padding: 1,
45897 *
45898 * // bar radius
45899 * radius: 10,
45900 * // or
45901 * radius: {
45902 * ratio: 0.5
45903 * }
45904 *
45905 * label: {
45906 * // 0.1(10%) ratio value means, the minimum ratio to show text label relative to the y Axis domain range value.
45907 * // if data value is below than 0.1, text label will be hidden.
45908 * threshold: 0.1,
45909 * },
45910 *
45911 * // will not have offset between each bar elements for interaction
45912 * sensitivity: 0,
45913 *
45914 * width: 10,
45915 *
45916 * // or
45917 * width: {
45918 * ratio: 0.2,
45919 * max: 20
45920 * },
45921 *
45922 * // or specify width per dataset
45923 * width: {
45924 * data1: 20,
45925 * data2: {
45926 * ratio: 0.2,
45927 * max: 20
45928 * }
45929 * },
45930 *
45931 * zerobased: false
45932 * }
45933 */
45934 bar_label_threshold: 0,
45935 bar_linearGradient: !1,
45936 bar_indices_removeNull: !1,
45937 bar_overlap: !1,
45938 bar_padding: 0,
45939 bar_radius: undefined,
45940 bar_radius_ratio: undefined,
45941 bar_sensitivity: 2,
45942 bar_width: undefined,
45943 bar_width_ratio: .6,
45944 bar_width_max: undefined,
45945 bar_zerobased: !0
45946});
45947;// CONCATENATED MODULE: ./src/config/Options/shape/bubble.ts
45948/**
45949 * Copyright (c) 2017 ~ present NAVER Corp.
45950 * billboard.js project is licensed under the MIT license
45951 */
45952/**
45953 * bubble config options
45954 */
45955/* harmony default export */ var shape_bubble = ({
45956 /**
45957 * Set bubble options
45958 * @name bubble
45959 * @memberof Options
45960 * @type {object}
45961 * @property {object} bubble bubble object
45962 * @property {number|Function} [bubble.maxR=35] Set the max bubble radius value
45963 * @property {boolean} [bubble.zerobased=false] Set if min or max value will be 0 on bubble chart.
45964 * @example
45965 * bubble: {
45966 * // ex) If 100 is the highest value among data bound, the representation bubble of 100 will have radius of 50.
45967 * // And the lesser will have radius relatively from tha max value.
45968 * maxR: 50,
45969 *
45970 * // or set radius callback
45971 * maxR: function(d) {
45972 * // ex. of d param - {x: Fri Oct 06 2017 00:00:00 GMT+0900, value: 80, id: "data2", index: 5}
45973 * ...
45974 * return Math.sqrt(d.value * 2);
45975 * },
45976 * zerobased: false
45977 * }
45978 */
45979 bubble_maxR: 35,
45980 bubble_zerobased: !1
45981});
45982;// CONCATENATED MODULE: ./src/config/Options/shape/candlestick.ts
45983/**
45984 * Copyright (c) 2017 ~ present NAVER Corp.
45985 * billboard.js project is licensed under the MIT license
45986 */
45987/**
45988 * candlestick config options
45989 */
45990/* harmony default export */ var shape_candlestick = ({
45991 /**
45992 * Set candlestick options
45993 * @name candlestick
45994 * @memberof Options
45995 * @type {object}
45996 * @property {object} candlestick Candlestick object
45997 * @property {number} [candlestick.width] Change the width.
45998 * @property {number} [candlestick.width.ratio=0.6] Change the width by ratio.
45999 * @property {number} [candlestick.width.max] The maximum width value for ratio.
46000 * @property {number} [candlestick.width.dataname] Change the width for indicated dataset only.
46001 * @property {number} [candlestick.width.dataname.ratio=0.6] Change the width of bar chart by ratio.
46002 * @property {number} [candlestick.width.dataname.max] The maximum width value for ratio.
46003 * @property {object} [candlestick.color] Color setting.
46004 * @property {string|object} [candlestick.color.down] Change down(bearish) value color.
46005 * @property {string} [candlestick.color.down.dataname] Change down value color for indicated dataset only.
46006 *
46007 * @see [Demo](https://naver.github.io/billboard.js/demo/##Chart.CandlestickChart)
46008 * @example
46009 * candlestick: {
46010 * width: 10,
46011 *
46012 * // or
46013 * width: {
46014 * ratio: 0.2,
46015 * max: 20
46016 * },
46017 *
46018 * // or specify width per dataset
46019 * width: {
46020 * data1: 20,
46021 * data2: {
46022 * ratio: 0.2,
46023 * max: 20
46024 * }
46025 * },
46026 * color: {
46027 * // spcify bearish color
46028 * down: "red",
46029 *
46030 * // or specify color per dataset
46031 * down: {
46032 * data1: "red",
46033 * data2: "blue",
46034 * }
46035 * }
46036 * }
46037 */
46038 candlestick_width: undefined,
46039 candlestick_width_ratio: .6,
46040 candlestick_width_max: undefined,
46041 candlestick_color_down: "red"
46042});
46043;// CONCATENATED MODULE: ./src/config/Options/shape/line.ts
46044/**
46045 * Copyright (c) 2017 ~ present NAVER Corp.
46046 * billboard.js project is licensed under the MIT license
46047 */
46048/**
46049 * line config options
46050 */
46051/* harmony default export */ var shape_line = ({
46052 /**
46053 * Set line options
46054 * @name line
46055 * @memberof Options
46056 * @type {object}
46057 * @property {object} line Line object
46058 * @property {boolean} [line.connectNull=false] Set if null data point will be connected or not.<br>
46059 * If true set, the region of null data will be connected without any data point. If false set, the region of null data will not be connected and get empty.
46060 * @property {Array} [line.classes=undefined] If set, used to set a css class on each line.
46061 * @property {boolean} [line.step.type=step] Change step type for step chart.<br>
46062 * **Available values:**
46063 * - step
46064 * - step-before
46065 * - step-after
46066 * @property {boolean} [line.step.tooltipMatch=false] Set to `true` for `step-before` and `step-after` types to have cursor/tooltip match to hovered step's point instead of nearest point.
46067 * @property {boolean|Array} [line.point=true] Set to false to not draw points on linecharts. Or pass an array of line ids to draw points for.
46068 * @property {boolean} [line.zerobased=false] Set if min or max value will be 0 on line chart.
46069 * @example
46070 * line: {
46071 * connectNull: true,
46072 * classes: [
46073 * "line-class1",
46074 * "line-class2"
46075 * ],
46076 * step: {
46077 * type: "step-after",
46078 *
46079 * // to have cursor/tooltip match to hovered step's point instead of nearest point.
46080 * tooltipMatch: true
46081 * },
46082 *
46083 * // hide all data points ('point.show=false' also has similar effect)
46084 * point: false,
46085 *
46086 * // show data points for only indicated datas
46087 * point: [
46088 * "data1", "data3"
46089 * ],
46090 *
46091 * zerobased: false
46092 * }
46093 */
46094 line_connectNull: !1,
46095 line_step_type: "step",
46096 line_step_tooltipMatch: !1,
46097 line_zerobased: !1,
46098 line_classes: undefined,
46099 line_point: !0
46100});
46101;// CONCATENATED MODULE: ./src/config/Options/shape/scatter.ts
46102/**
46103 * Copyright (c) 2017 ~ present NAVER Corp.
46104 * billboard.js project is licensed under the MIT license
46105 */
46106/**
46107 * scatter config options
46108 */
46109/* harmony default export */ var scatter = ({
46110 /**
46111 * Set scatter options
46112 * @name scatter
46113 * @memberof Options
46114 * @type {object}
46115 * @property {object} [scatter] scatter object
46116 * @property {boolean} [scatter.zerobased=false] Set if min or max value will be 0 on scatter chart.
46117 * @example
46118 * scatter: {
46119 * connectNull: true,
46120 * step: {
46121 * type: "step-after"
46122 * },
46123 *
46124 * // hide all data points ('point.show=false' also has similar effect)
46125 * point: false,
46126 *
46127 * // show data points for only indicated datas
46128 * point: [
46129 * "data1", "data3"
46130 * ],
46131 *
46132 * zerobased: false
46133 * }
46134 */
46135 scatter_zerobased: !1
46136});
46137;// CONCATENATED MODULE: ./src/config/Options/shape/spline.ts
46138/**
46139 * Copyright (c) 2017 ~ present NAVER Corp.
46140 * billboard.js project is licensed under the MIT license
46141 */
46142/**
46143 * x Axis config options
46144 */
46145/* harmony default export */ var spline = ({
46146 /**
46147 * Set spline options
46148 * - **Available interpolation type values:**
46149 * - basis (d3.curveBasis)
46150 * - basis-closed (d3.curveBasisClosed)
46151 * - basis-open (d3.curveBasisOpen)
46152 * - bundle (d3.curveBundle)
46153 * - cardinal (d3.curveCardinal)
46154 * - cardinal-closed (d3.curveCardinalClosed)
46155 * - cardinal-open (d3.curveCardinalOpen)
46156 * - catmull-rom (d3.curveCatmullRom)
46157 * - catmull-rom-closed (d3.curveCatmullRomClosed)
46158 * - catmull-rom-open (d3.curveCatmullRomOpen)
46159 * - monotone-x (d3.curveMonotoneX)
46160 * - monotone-y (d3.curveMonotoneY)
46161 * - natural (d3.curveNatural)
46162 * - linear-closed (d3.curveLinearClosed)
46163 * - linear (d3.curveLinear)
46164 * - step (d3.curveStep)
46165 * - step-after (d3.curveStepAfter)
46166 * - step-before (d3.curveStepBefore)
46167 * @name spline
46168 * @memberof Options
46169 * @type {object}
46170 * @property {object} spline Spline object
46171 * @property {object} spline.interpolation Spline interpolation object
46172 * @property {string} [spline.interpolation.type="cardinal"] Interpolation type
46173 * @see [Interpolation (d3 v4)](http://bl.ocks.org/emmasaunders/c25a147970def2b02d8c7c2719dc7502)
46174 * @example
46175 * spline: {
46176 * interpolation: {
46177 * type: "cardinal"
46178 * }
46179 * }
46180 */
46181 spline_interpolation_type: "cardinal"
46182});
46183;// CONCATENATED MODULE: ./src/config/Options/shape/donut.ts
46184/**
46185 * Copyright (c) 2017 ~ present NAVER Corp.
46186 * billboard.js project is licensed under the MIT license
46187 */
46188/**
46189 * donut config options
46190 */
46191/* harmony default export */ var donut = ({
46192 /**
46193 * Set donut options
46194 * @name donut
46195 * @memberof Options
46196 * @type {object}
46197 * @property {object} donut Donut object
46198 * @property {boolean} [donut.label.show=true] Show or hide label on each donut piece.
46199 * @property {Function} [donut.label.format] Set formatter for the label on each donut piece.
46200 * @property {number} [donut.label.threshold=0.05] Set threshold ratio to show/hide labels.
46201 * @property {number|Function} [donut.label.ratio=undefined] Set ratio of labels position.
46202 * @property {boolean} [donut.expand=true] Enable or disable expanding donut pieces.
46203 * @property {number} [donut.expand.rate=0.98] Set expand rate.
46204 * @property {number} [donut.expand.duration=50] Set expand transition time in ms.
46205 * @property {number} [donut.width] Set width of donut chart.
46206 * @property {string} [donut.title=""] Set title of donut chart. Use `\n` character for line break.
46207 * @property {number} [donut.padAngle=0] Set padding between data.
46208 * @property {number} [donut.startingAngle=0] Set starting angle where data draws.
46209 * @example
46210 * donut: {
46211 * label: {
46212 * show: false,
46213 * format: function(value, ratio, id) {
46214 * return d3.format("$")(value);
46215 *
46216 * // to multiline, return with '\n' character
46217 * // return value +"%\nLine1\n2Line2";
46218 * },
46219 *
46220 * // 0.1(10%) ratio value means, the minimum ratio to show text label relative to the total value.
46221 * // if data value is below than 0.1, text label will be hidden.
46222 * threshold: 0.1,
46223 *
46224 * // set ratio callback. Should return ratio value
46225 * ratio: function(d, radius, h) {
46226 * ...
46227 * return ratio;
46228 * },
46229 * // or set ratio number
46230 * ratio: 0.5
46231 * },
46232 *
46233 * // disable expand transition for interaction
46234 * expand: false,
46235 *
46236 * expand: {
46237 * // set duration of expand transition to 500ms.
46238 * duration: 500,
46239 *
46240 * // set expand area rate
46241 * rate: 1
46242 * },
46243 *
46244 * width: 10,
46245 * padAngle: 0.2,
46246 * startingAngle: 1,
46247 * title: "Donut Title"
46248 *
46249 * // title with line break
46250 * title: "Title1\nTitle2"
46251 * }
46252 */
46253 donut_label_show: !0,
46254 donut_label_format: undefined,
46255 donut_label_threshold: .05,
46256 donut_label_ratio: undefined,
46257 donut_width: undefined,
46258 donut_title: "",
46259 donut_expand: {},
46260 donut_expand_rate: .98,
46261 donut_expand_duration: 50,
46262 donut_padAngle: 0,
46263 donut_startingAngle: 0
46264});
46265;// CONCATENATED MODULE: ./src/config/Options/shape/gauge.ts
46266/**
46267 * Copyright (c) 2017 ~ present NAVER Corp.
46268 * billboard.js project is licensed under the MIT license
46269 */
46270/**
46271 * gauge config options
46272 */
46273/* harmony default export */ var shape_gauge = ({
46274 /**
46275 * Set gauge options
46276 * @name gauge
46277 * @memberof Options
46278 * @type {object}
46279 * @property {object} gauge Gauge object
46280 * @property {boolean} [gauge.background=""] Set background color. (The `.bb-chart-arcs-background` element)
46281 * @property {boolean} [gauge.fullCircle=false] Show full circle as donut. When set to 'true', the max label will not be showed due to start and end points are same location.
46282 * @property {boolean} [gauge.label.show=true] Show or hide label on gauge.
46283 * @property {Function} [gauge.label.format] Set formatter for the label on gauge. Label text can be multilined with `\n` character.<br>
46284 * Will pass following arguments to the given function:
46285 * - value {number}: absolute value
46286 * - ratio {number}: value's ratio
46287 * - id {string}: data's id value
46288 * @property {Function} [gauge.label.extents] Set customized min/max label text.
46289 * @property {number} [gauge.label.threshold=0] Set threshold ratio to show/hide labels.
46290 * @property {boolean} [gauge.expand=true] Enable or disable expanding gauge.
46291 * @property {number} [gauge.expand.rate=0.98] Set expand rate.
46292 * @property {number} [gauge.expand.duration=50] Set the expand transition time in milliseconds.
46293 * @property {number} [gauge.min=0] Set min value of the gauge.
46294 * @property {number} [gauge.max=100] Set max value of the gauge.
46295 * @property {number} [gauge.startingAngle=-1 * Math.PI / 2] Set starting angle where data draws.
46296 *
46297 * **Limitations:**
46298 * - when `gauge.fullCircle=false`:
46299 * - -1 * Math.PI / 2 <= startingAngle <= Math.PI / 2
46300 * - `startingAngle <= -1 * Math.PI / 2` defaults to `-1 * Math.PI / 2`
46301 * - `startingAngle >= Math.PI / 2` defaults to `Math.PI / 2`
46302 * - when `gauge.fullCircle=true`:
46303 * - -1 * Math.PI < startingAngle < Math.PI
46304 * - `startingAngle < -1 * Math.PI` defaults to `Math.PI`
46305 * - `startingAngle > Math.PI` defaults to `Math.PI`
46306 * @property {number} [gauge.arcLength=100] Set the length of the arc to be drawn in percent from -100 to 100.<br>
46307 * Negative value will draw the arc **counterclockwise**.
46308 *
46309 * **Limitations:**
46310 * - -100 <= arcLength (in percent) <= 100
46311 * - 'arcLength < -100' defaults to -100
46312 * - 'arcLength > 100' defaults to 100
46313 * @property {string} [gauge.title=""] Set title of gauge chart. Use `\n` character for line break.
46314 * @property {string} [gauge.units] Set units of the gauge.
46315 * @property {number} [gauge.width] Set width of gauge chart.
46316 * @property {string} [gauge.type="single"] Set type of gauge to be displayed.<br><br>
46317 * **Available Values:**
46318 * - single
46319 * - multi
46320 * @property {string} [gauge.arcs.minWidth=5] Set minimal width of gauge arcs until the innerRadius disappears.
46321 * @see [Demo: archLength](https://naver.github.io/billboard.js/demo/#GaugeChartOptions.GaugeArcLength)
46322 * @see [Demo: startingAngle](https://naver.github.io/billboard.js/demo/#GaugeChartOptions.GaugeStartingAngle)
46323 * @example
46324 * gauge: {
46325 * background: "#eee", // will set 'fill' css prop for '.bb-chart-arcs-background' classed element.
46326 * fullCircle: false,
46327 * label: {
46328 * show: false,
46329 * format: function(value, ratio, id) {
46330 * return value;
46331 *
46332 * // to multiline, return with '\n' character
46333 * // return value +"%\nLine1\n2Line2";
46334 * },
46335 *
46336 * extents: function(value, isMax) {
46337 * return (isMax ? "Max:" : "Min:") + value;
46338 * },
46339 *
46340 * // 0.1(10%) ratio value means, the minimum ratio to show text label relative to the total value.
46341 * // if data value is below than 0.1, text label will be hidden.
46342 * threshold: 0.1,
46343 * },
46344 *
46345 * // disable expand transition for interaction
46346 * expand: false,
46347 *
46348 * expand: {
46349 * // set duration of expand transition to 500ms.
46350 * duration: 500,
46351 *
46352 * // set expand area rate
46353 * rate: 1
46354 * },
46355 *
46356 * min: -100,
46357 * max: 200,
46358 * type: "single" // or 'multi'
46359 * title: "Title Text",
46360 * units: "%",
46361 * width: 10,
46362 * startingAngle: -1 * Math.PI / 2,
46363 * arcLength: 100,
46364 * arcs: {
46365 * minWidth: 5
46366 * }
46367 * }
46368 */
46369 gauge_background: "",
46370 gauge_fullCircle: !1,
46371 gauge_label_show: !0,
46372 gauge_label_format: undefined,
46373 gauge_label_extents: undefined,
46374 gauge_label_threshold: 0,
46375 gauge_min: 0,
46376 gauge_max: 100,
46377 gauge_type: "single",
46378 gauge_startingAngle: -1 * Math.PI / 2,
46379 gauge_arcLength: 100,
46380 gauge_title: "",
46381 gauge_units: undefined,
46382 gauge_width: undefined,
46383 gauge_arcs_minWidth: 5,
46384 gauge_expand: {},
46385 gauge_expand_rate: .98,
46386 gauge_expand_duration: 50
46387});
46388;// CONCATENATED MODULE: ./src/config/Options/shape/pie.ts
46389/**
46390 * Copyright (c) 2017 ~ present NAVER Corp.
46391 * billboard.js project is licensed under the MIT license
46392 */
46393/**
46394 * x Axis config options
46395 */
46396/* harmony default export */ var shape_pie = ({
46397 /**
46398 * Set pie options
46399 * @name pie
46400 * @memberof Options
46401 * @type {object}
46402 * @property {object} pie Pie object
46403 * @property {boolean} [pie.label.show=true] Show or hide label on each pie piece.
46404 * @property {Function} [pie.label.format] Set formatter for the label on each pie piece.
46405 * @property {number} [pie.label.threshold=0.05] Set threshold ratio to show/hide labels.
46406 * @property {number|Function} [pie.label.ratio=undefined] Set ratio of labels position.
46407 * @property {boolean|object} [pie.expand=true] Enable or disable expanding pie pieces.
46408 * @property {number} [pie.expand.rate=0.98] Set expand rate.
46409 * @property {number} [pie.expand.duration=50] Set expand transition time in ms.
46410 * @property {number|object} [pie.innerRadius=0] Sets the inner radius of pie arc.
46411 * @property {number|object|undefined} [pie.outerRadius=undefined] Sets the outer radius of pie arc.
46412 * @property {number} [pie.padAngle=0] Set padding between data.
46413 * @property {number} [pie.padding=0] Sets the gap between pie arcs.
46414 * @property {number} [pie.startingAngle=0] Set starting angle where data draws.
46415 * @see [Demo: expand.rate](https://naver.github.io/billboard.js/demo/#PieChartOptions.ExpandRate)
46416 * @see [Demo: innerRadius](https://naver.github.io/billboard.js/demo/#PieChartOptions.InnerRadius)
46417 * @see [Demo: outerRadius](https://naver.github.io/billboard.js/demo/#PieChartOptions.OuterRadius)
46418 * @see [Demo: startingAngle](https://naver.github.io/billboard.js/demo/#PieChartOptions.StartingAngle)
46419 * @example
46420 * pie: {
46421 * label: {
46422 * show: false,
46423 * format: function(value, ratio, id) {
46424 * return d3.format("$")(value);
46425 *
46426 * // to multiline, return with '\n' character
46427 * // return value +"%\nLine1\n2Line2";
46428 * },
46429 *
46430 * // 0.1(10%) ratio value means, the minimum ratio to show text label relative to the total value.
46431 * // if data value is below than 0.1, text label will be hidden.
46432 * threshold: 0.1,
46433 *
46434 * // set ratio callback. Should return ratio value
46435 * ratio: function(d, radius, h) {
46436 * ...
46437 * return ratio;
46438 * },
46439 * // or set ratio number
46440 * ratio: 0.5
46441 * },
46442 *
46443 * // disable expand transition for interaction
46444 * expand: false,
46445 *
46446 * expand: {
46447 * // set duration of expand transition to 500ms.
46448 * duration: 500,
46449 *
46450 * // set expand area rate
46451 * rate: 1
46452 * },
46453 *
46454 * innerRadius: 0,
46455 *
46456 * // set different innerRadius for each data
46457 * innerRadius: {
46458 * data1: 10,
46459 * data2: 0
46460 * },
46461 *
46462 * outerRadius: 100,
46463 *
46464 * // set different outerRadius for each data
46465 * outerRadius: {
46466 * data1: 50,
46467 * data2: 100
46468 * }
46469 *
46470 * padAngle: 0.1,
46471 * padding: 0,
46472 * startingAngle: 1
46473 * }
46474 */
46475 pie_label_show: !0,
46476 pie_label_format: undefined,
46477 pie_label_threshold: .05,
46478 pie_label_ratio: undefined,
46479 pie_expand: {},
46480 pie_expand_rate: .98,
46481 pie_expand_duration: 50,
46482 pie_innerRadius: 0,
46483 pie_outerRadius: undefined,
46484 pie_padAngle: 0,
46485 pie_padding: 0,
46486 pie_startingAngle: 0
46487});
46488;// CONCATENATED MODULE: ./src/config/Options/shape/polar.ts
46489
46490var polar_this = undefined;
46491/**
46492 * Copyright (c) 2017 ~ present NAVER Corp.
46493 * billboard.js project is licensed under the MIT license
46494 */
46495/**
46496 * x Axis config options
46497 */
46498/* harmony default export */ var shape_polar = ({
46499 /**
46500 * Set polar options
46501 * @name polar
46502 * @memberof Options
46503 * @type {object}
46504 * @property {object} polar Polar object
46505 * @property {boolean} [polar.label.show=true] Show or hide label on each polar piece.
46506 * @property {Function} [polar.label.format] Set formatter for the label on each polar piece.
46507 * @property {number} [polar.label.threshold=0.05] Set threshold ratio to show/hide labels.
46508 * @property {number|Function} [polar.label.ratio=undefined] Set ratio of labels position.
46509 * @property {number} [polar.level.depth=3] Set the level depth.
46510 * @property {boolean} [polar.level.show=true] Show or hide level.
46511 * @property {string} [polar.level.text.backgroundColor="#fff"] Set label text's background color.
46512 * @property {Function} [polar.level.text.format] Set format function for the level value.<br>- Default value: `(x) => x % 1 === 0 ? x : x.toFixed(2)`
46513 * @property {boolean} [polar.level.text.show=true] Show or hide level text.
46514 * @property {number} [polar.padAngle=0] Set padding between data.
46515 * @property {number} [polar.padding=0] Sets the gap between pie arcs.
46516 * @property {number} [polar.startingAngle=0] Set starting angle where data draws.
46517 * @see [Demo](https://naver.github.io/billboard.js/demo/#Chart.PolarChart)
46518 * @example
46519 * polar: {
46520 * label: {
46521 * show: false,
46522 * format: function(value, ratio, id) {
46523 * return d3.format("$")(value);
46524 *
46525 * // to multiline, return with '\n' character
46526 * // return value +"%\nLine1\n2Line2";
46527 * },
46528 *
46529 * // 0.1(10%) ratio value means, the minimum ratio to show text label relative to the total value.
46530 * // if data value is below than 0.1, text label will be hidden.
46531 * threshold: 0.1,
46532 *
46533 * // set ratio callback. Should return ratio value
46534 * ratio: function(d, radius, h) {
46535 * ...
46536 * return ratio;
46537 * },
46538 * // or set ratio number
46539 * ratio: 0.5
46540 * },
46541 * level: {
46542 * depth: 3,
46543 * max: 500,
46544 * show: true,
46545 * text: {
46546 * format: function(x) {
46547 * return x + "%";
46548 * },
46549 * show: true,
46550 * backgroundColor: "red"
46551 * }
46552 * },
46553 * padAngle: 0.1,
46554 * padding: 0,
46555 * startingAngle: 1
46556 * }
46557 */
46558 polar_label_show: !0,
46559 polar_label_format: undefined,
46560 polar_label_threshold: .05,
46561 polar_label_ratio: undefined,
46562 polar_level_depth: 3,
46563 polar_level_max: undefined,
46564 polar_level_show: !0,
46565 polar_level_text_backgroundColor: "#fff",
46566 polar_level_text_format: function polar_level_text_format(x) {
46567 _newArrowCheck(this, polar_this);
46568 return x % 1 === 0 ? x : x.toFixed(2);
46569 }.bind(undefined),
46570 polar_level_text_show: !0,
46571 polar_padAngle: 0,
46572 polar_padding: 0,
46573 polar_startingAngle: 0
46574});
46575;// CONCATENATED MODULE: ./src/config/Options/shape/radar.ts
46576
46577var radar_this = undefined;
46578/**
46579 * Copyright (c) 2017 ~ present NAVER Corp.
46580 * billboard.js project is licensed under the MIT license
46581 */
46582/**
46583 * x Axis config options
46584 */
46585/* harmony default export */ var shape_radar = ({
46586 /**
46587 * Set radar options
46588 * - **NOTE:**
46589 * > When x tick text contains `\n`, it's used as line break.
46590 * @name radar
46591 * @memberof Options
46592 * @type {object}
46593 * @property {object} radar Radar object
46594 * @property {number} [radar.axis.max=undefined] The max value of axis. If not given, it'll take the max value from the given data.
46595 * @property {boolean} [radar.axis.line.show=true] Show or hide axis line.
46596 * @property {number} [radar.axis.text.position.x=0] x coordinate position, relative the original.
46597 * @property {number} [radar.axis.text.position.y=0] y coordinate position, relative the original.
46598 * @property {boolean} [radar.axis.text.show=true] Show or hide axis text.
46599 * @property {boolean} [radar.direction.clockwise=false] Set the direction to be drawn.
46600 * @property {number} [radar.level.depth=3] Set the level depth.
46601 * @property {boolean} [radar.level.show=true] Show or hide level.
46602 * @property {Function} [radar.level.text.format] Set format function for the level value.<br>- Default value: `(x) => x % 1 === 0 ? x : x.toFixed(2)`
46603 * @property {boolean} [radar.level.text.show=true] Show or hide level text.
46604 * @property {number} [radar.size.ratio=0.87] Set size ratio.
46605 * @see [Demo](https://naver.github.io/billboard.js/demo/#Chart.RadarChart)
46606 * @see [Demo: radar axis](https://naver.github.io/billboard.js/demo/#RadarChartOptions.RadarAxis)
46607 * @see [Demo: radar level](https://naver.github.io/billboard.js/demo/#RadarChartOptions.RadarLevel)
46608 * @see [Demo: radar size](https://naver.github.io/billboard.js/demo/#RadarChartOptions.RadarSize)
46609 * @see [Demo: radar axis multiline](https://naver.github.io/billboard.js/demo/#RadarChartOptions.RadarAxisMultiline)
46610 * @example
46611 * radar: {
46612 * axis: {
46613 * max: 50,
46614 * line: {
46615 * show: false
46616 * },
46617 * text: {
46618 * position: {
46619 * x: 0,
46620 * y: 0
46621 * },
46622 * show: false
46623 * }
46624 * },
46625 * direction: {
46626 * clockwise: true
46627 * },
46628 * level: {
46629 * show: false,
46630 * text: {
46631 * format: function(x) {
46632 * return x + "%";
46633 * },
46634 * show: true
46635 * }
46636 * },
46637 * size: {
46638 * ratio: 0.7
46639 * }
46640 * }
46641 */
46642 radar_axis_max: undefined,
46643 radar_axis_line_show: !0,
46644 radar_axis_text_show: !0,
46645 radar_axis_text_position: {},
46646 radar_level_depth: 3,
46647 radar_level_show: !0,
46648 radar_level_text_format: function radar_level_text_format(x) {
46649 _newArrowCheck(this, radar_this);
46650 return x % 1 === 0 ? x : x.toFixed(2);
46651 }.bind(undefined),
46652 radar_level_text_show: !0,
46653 radar_size_ratio: .87,
46654 radar_direction_clockwise: !1
46655});
46656;// CONCATENATED MODULE: ./src/config/resolver/shape.ts
46657
46658var shape_this = undefined;
46659/**
46660 * Copyright (c) 2017 ~ present NAVER Corp.
46661 * billboard.js project is licensed under the MIT license
46662 */
46663
46664
46665
46666
46667
46668
46669// Axis
46670
46671
46672// Shape
46673
46674
46675
46676
46677
46678
46679
46680
46681
46682
46683
46684// Options
46685
46686
46687
46688
46689
46690
46691
46692
46693
46694// Non-Axis based
46695
46696
46697
46698
46699
46700
46701
46702/**
46703 * Extend Axis
46704 * @param {Array} module Module to be extended
46705 * @param {Array} option Option object to be extended
46706 * @private
46707 */
46708function extendAxis(module, option) {
46709 util_extend(ChartInternal.prototype, internal.concat(module));
46710 util_extend(Chart.prototype, api);
46711 Options.setOptions(options.concat(option || []));
46712}
46713
46714/**
46715 * Extend Line type modules
46716 * @param {object} module Module to be extended
46717 * @param {Array} option Option object to be extended
46718 * @private
46719 */
46720function extendLine(module, option) {
46721 extendAxis([point, line].concat(module || []));
46722 Options.setOptions([common_point, shape_line].concat(option || []));
46723}
46724
46725/**
46726 * Extend Arc type modules
46727 * @param {Array} module Module to be extended
46728 * @param {Array} option Option object to be extended
46729 * @private
46730 */
46731function extendArc(module, option) {
46732 util_extend(ChartInternal.prototype, [arc].concat(module || []));
46733 Options.setOptions(option);
46734}
46735
46736// Area types
46737var _area = function area() {
46738 var _this2 = this;
46739 _newArrowCheck(this, shape_this);
46740 return extendLine(shape_area, [Options_shape_area]), (_area = function () {
46741 _newArrowCheck(this, _this2);
46742 return TYPE.AREA;
46743 }.bind(this))();
46744 }.bind(undefined),
46745 areaLineRange = function () {
46746 var _this3 = this;
46747 _newArrowCheck(this, shape_this);
46748 return extendLine(shape_area, [Options_shape_area]), (areaLineRange = function () {
46749 _newArrowCheck(this, _this3);
46750 return TYPE.AREA_LINE_RANGE;
46751 }.bind(this))();
46752 }.bind(undefined),
46753 areaSpline = function () {
46754 var _this4 = this;
46755 _newArrowCheck(this, shape_this);
46756 return extendLine(shape_area, [Options_shape_area, spline]), (areaSpline = function () {
46757 _newArrowCheck(this, _this4);
46758 return TYPE.AREA_SPLINE;
46759 }.bind(this))();
46760 }.bind(undefined),
46761 areaSplineRange = function () {
46762 var _this5 = this;
46763 _newArrowCheck(this, shape_this);
46764 return extendLine(shape_area, [Options_shape_area, spline]), (areaSplineRange = function () {
46765 _newArrowCheck(this, _this5);
46766 return TYPE.AREA_SPLINE_RANGE;
46767 }.bind(this))();
46768 }.bind(undefined),
46769 areaStep = function () {
46770 var _this6 = this;
46771 _newArrowCheck(this, shape_this);
46772 return extendLine(shape_area, [Options_shape_area]), (areaStep = function () {
46773 _newArrowCheck(this, _this6);
46774 return TYPE.AREA_STEP;
46775 }.bind(this))();
46776 }.bind(undefined),
46777 resolver_shape_line = function () {
46778 var _this7 = this;
46779 _newArrowCheck(this, shape_this);
46780 return extendLine(), (resolver_shape_line = function () {
46781 _newArrowCheck(this, _this7);
46782 return TYPE.LINE;
46783 }.bind(this))();
46784 }.bind(undefined),
46785 shape_spline = function () {
46786 var _this8 = this;
46787 _newArrowCheck(this, shape_this);
46788 return extendLine(undefined, [spline]), (shape_spline = function () {
46789 _newArrowCheck(this, _this8);
46790 return TYPE.SPLINE;
46791 }.bind(this))();
46792 }.bind(undefined),
46793 shape_step = function () {
46794 var _this9 = this;
46795 _newArrowCheck(this, shape_this);
46796 return extendLine(), (shape_step = function () {
46797 _newArrowCheck(this, _this9);
46798 return TYPE.STEP;
46799 }.bind(this))();
46800 }.bind(undefined),
46801 shape_donut = function () {
46802 var _this10 = this;
46803 _newArrowCheck(this, shape_this);
46804 return extendArc(undefined, [donut]), (shape_donut = function () {
46805 _newArrowCheck(this, _this10);
46806 return TYPE.DONUT;
46807 }.bind(this))();
46808 }.bind(undefined),
46809 resolver_shape_gauge = function () {
46810 var _this11 = this;
46811 _newArrowCheck(this, shape_this);
46812 return extendArc([gauge], [shape_gauge]), (resolver_shape_gauge = function () {
46813 _newArrowCheck(this, _this11);
46814 return TYPE.GAUGE;
46815 }.bind(this))();
46816 }.bind(undefined),
46817 resolver_shape_pie = function () {
46818 var _this12 = this;
46819 _newArrowCheck(this, shape_this);
46820 return extendArc(undefined, [shape_pie]), (resolver_shape_pie = function () {
46821 _newArrowCheck(this, _this12);
46822 return TYPE.PIE;
46823 }.bind(this))();
46824 }.bind(undefined),
46825 resolver_shape_polar = function () {
46826 var _this13 = this;
46827 _newArrowCheck(this, shape_this);
46828 return extendArc([polar], [shape_polar]), (resolver_shape_polar = function () {
46829 _newArrowCheck(this, _this13);
46830 return TYPE.POLAR;
46831 }.bind(this))();
46832 }.bind(undefined),
46833 resolver_shape_radar = function () {
46834 var _this14 = this;
46835 _newArrowCheck(this, shape_this);
46836 return extendArc([point, radar], [common_point, shape_radar]), (resolver_shape_radar = function () {
46837 _newArrowCheck(this, _this14);
46838 return TYPE.RADAR;
46839 }.bind(this))();
46840 }.bind(undefined),
46841 resolver_shape_bar = function () {
46842 var _this15 = this;
46843 _newArrowCheck(this, shape_this);
46844 return extendAxis([bar], shape_bar), (resolver_shape_bar = function () {
46845 _newArrowCheck(this, _this15);
46846 return TYPE.BAR;
46847 }.bind(this))();
46848 }.bind(undefined),
46849 resolver_shape_bubble = function () {
46850 var _this16 = this;
46851 _newArrowCheck(this, shape_this);
46852 return extendAxis([point, bubble], [shape_bubble, common_point]), (resolver_shape_bubble = function () {
46853 _newArrowCheck(this, _this16);
46854 return TYPE.BUBBLE;
46855 }.bind(this))();
46856 }.bind(undefined),
46857 resolver_shape_candlestick = function () {
46858 var _this17 = this;
46859 _newArrowCheck(this, shape_this);
46860 return extendAxis([candlestick], [shape_candlestick]), (resolver_shape_candlestick = function () {
46861 _newArrowCheck(this, _this17);
46862 return TYPE.CANDLESTICK;
46863 }.bind(this))();
46864 }.bind(undefined),
46865 shape_scatter = function () {
46866 var _this18 = this;
46867 _newArrowCheck(this, shape_this);
46868 return extendAxis([point], [common_point, scatter]), (shape_scatter = function () {
46869 _newArrowCheck(this, _this18);
46870 return TYPE.SCATTER;
46871 }.bind(this))();
46872 }.bind(undefined);
46873;// CONCATENATED MODULE: ./src/Chart/api/selection.ts
46874
46875/**
46876 * Copyright (c) 2017 ~ present NAVER Corp.
46877 * billboard.js project is licensed under the MIT license
46878 */
46879
46880
46881
46882/* harmony default export */ var api_selection = ({
46883 /**
46884 * Get selected data points.<br><br>
46885 * By this API, you can get selected data points information. To use this API, data.selection.enabled needs to be set true.
46886 * @function selected
46887 * @instance
46888 * @memberof Chart
46889 * @param {string} [targetId] You can filter the result by giving target id that you want to get. If not given, all of data points will be returned.
46890 * @returns {Array} dataPoint Array of the data points.<br>ex.) `[{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ...]`
46891 * @example
46892 * // all selected data points will be returned.
46893 * chart.selected();
46894 * // --> ex.) [{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ... ]
46895 *
46896 * // all selected data points of data1 will be returned.
46897 * chart.selected("data1");
46898 */
46899 selected: function selected(targetId) {
46900 var _this = this,
46901 $$ = this.internal,
46902 dataPoint = [];
46903 $$.$el.main.selectAll("." + ($SHAPE.shapes + $$.getTargetSelectorSuffix(targetId))).selectAll("." + $SHAPE.shape).filter(function () {
46904 return src_select(this).classed($SELECT.SELECTED);
46905 }).each(function (d) {
46906 _newArrowCheck(this, _this);
46907 return dataPoint.push(d);
46908 }.bind(this));
46909 return dataPoint;
46910 },
46911 /**
46912 * Set data points to be selected. ([`data.selection.enabled`](Options.html#.data%25E2%2580%25A4selection%25E2%2580%25A4enabled) option should be set true to use this method)
46913 * @function select
46914 * @instance
46915 * @memberof Chart
46916 * @param {string|Array} [ids] id value to get selected.
46917 * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points.
46918 * @param {boolean} [resetOther] Unselect already selected.
46919 * @example
46920 * // select all data points
46921 * chart.select();
46922 *
46923 * // select all from 'data2'
46924 * chart.select("data2");
46925 *
46926 * // select all from 'data1' and 'data2'
46927 * chart.select(["data1", "data2"]);
46928 *
46929 * // select from 'data1', indices 2 and unselect others selected
46930 * chart.select("data1", [2], true);
46931 *
46932 * // select from 'data1', indices 0, 3 and 5
46933 * chart.select("data1", [0, 3, 5]);
46934 */
46935 select: function select(ids, indices, resetOther) {
46936 var $$ = this.internal,
46937 config = $$.config,
46938 $el = $$.$el;
46939 if (!config.data_selection_enabled) {
46940 return;
46941 }
46942 $el.main.selectAll("." + $SHAPE.shapes).selectAll("." + $SHAPE.shape).each(function (d, i) {
46943 var shape = src_select(this),
46944 id = d.data ? d.data.id : d.id,
46945 toggle = $$.getToggle(this, d).bind($$),
46946 isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,
46947 isTargetIndex = !indices || indices.indexOf(i) >= 0,
46948 isSelected = shape.classed($SELECT.SELECTED);
46949 // line/area selection not supported yet
46950 if (shape.classed($LINE.line) || shape.classed($AREA.area)) {
46951 return;
46952 }
46953 if (isTargetId && isTargetIndex) {
46954 if (config.data_selection_isselectable.bind($$.api)(d) && !isSelected) {
46955 toggle(!0, shape.classed($SELECT.SELECTED, !0), d, i);
46956 }
46957 } else if (isDefined(resetOther) && resetOther && isSelected) {
46958 toggle(!1, shape.classed($SELECT.SELECTED, !1), d, i);
46959 }
46960 });
46961 },
46962 /**
46963 * Set data points to be un-selected.
46964 * @function unselect
46965 * @instance
46966 * @memberof Chart
46967 * @param {string|Array} [ids] id value to be unselected.
46968 * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points.
46969 * @example
46970 * // unselect all data points
46971 * chart.unselect();
46972 *
46973 * // unselect all from 'data1'
46974 * chart.unselect("data1");
46975 *
46976 * // unselect from 'data1', indices 2
46977 * chart.unselect("data1", [2]);
46978 */
46979 unselect: function unselect(ids, indices) {
46980 var $$ = this.internal,
46981 config = $$.config,
46982 $el = $$.$el;
46983 if (!config.data_selection_enabled) {
46984 return;
46985 }
46986 $el.main.selectAll("." + $SHAPE.shapes).selectAll("." + $SHAPE.shape).each(function (d, i) {
46987 var shape = src_select(this),
46988 id = d.data ? d.data.id : d.id,
46989 toggle = $$.getToggle(this, d).bind($$),
46990 isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,
46991 isTargetIndex = !indices || indices.indexOf(i) >= 0,
46992 isSelected = shape.classed($SELECT.SELECTED);
46993 // line/area selection not supported yet
46994 if (shape.classed($LINE.line) || shape.classed($AREA.area)) {
46995 return;
46996 }
46997 if (isTargetId && isTargetIndex && config.data_selection_isselectable.bind($$.api)(d) && isSelected) {
46998 toggle(!1, shape.classed($SELECT.SELECTED, !1), d, i);
46999 }
47000 });
47001 }
47002});
47003;// CONCATENATED MODULE: ./src/Chart/api/subchart.ts
47004/**
47005 * Copyright (c) 2017 ~ present NAVER Corp.
47006 * billboard.js project is licensed under the MIT license
47007 */
47008
47009/* harmony default export */ var subchart = ({
47010 subchart: {
47011 /**
47012 * Show subchart
47013 * - **NOTE:** for ESM imports, needs to import 'subchart' exports and instantiate it by calling `subchart()`.
47014 * @function subchart․show
47015 * @instance
47016 * @memberof Chart
47017 * @example
47018 * // for ESM imports, needs to import 'subchart' and must be instantiated first to enable subchart's API.
47019 * import {subchart} from "billboard.js";
47020 *
47021 * const chart = bb.generate({
47022 * ...
47023 * subchart: {
47024 * // need to be instantiated by calling 'subchart()'
47025 * enabled: subchart()
47026 *
47027 * // in case don't want subchart to be shown at initialization, instantiate with '!subchart()'
47028 * enabled: !subchart()
47029 * }
47030 * });
47031 *
47032 * chart.subchart.show();
47033 */
47034 show: function () {
47035 var $$ = this.internal,
47036 subchart = $$.$el.subchart,
47037 config = $$.config,
47038 show = config.subchart_show;
47039 if (!show) {
47040 var _$target, _subchart$main2;
47041 // unbind zoom event bound to chart rect area
47042 $$.unbindZoomEvent();
47043 config.subchart_show = !show;
47044 subchart.main || $$.initSubchart();
47045 var $target = subchart.main.selectAll("." + $COMMON.target);
47046
47047 // need to cover when new data has been loaded
47048 if ($$.data.targets.length !== $target.size()) {
47049 var _subchart$main;
47050 $$.updateSizes();
47051 $$.updateTargetsForSubchart($$.data.targets);
47052 $target = (_subchart$main = subchart.main) == null ? void 0 : _subchart$main.selectAll("." + $COMMON.target);
47053 }
47054 (_$target = $target) == null ? void 0 : _$target.style("opacity", null);
47055 (_subchart$main2 = subchart.main) == null ? void 0 : _subchart$main2.style("display", null);
47056 this.resize();
47057 }
47058 },
47059 /**
47060 * Hide generated subchart
47061 * - **NOTE:** for ESM imports, needs to import 'subchart' exports and instantiate it by calling `subchart()`.
47062 * @function subchart․hide
47063 * @instance
47064 * @memberof Chart
47065 * @example
47066 * chart.subchart.hide();
47067 */
47068 hide: function hide() {
47069 var $$ = this.internal,
47070 main = $$.$el.subchart.main,
47071 config = $$.config;
47072 if (config.subchart_show && (main == null ? void 0 : main.style("display")) !== "none") {
47073 config.subchart_show = !1;
47074 main.style("display", "none");
47075 this.resize();
47076 }
47077 },
47078 /**
47079 * Toggle the visiblity of subchart
47080 * - **NOTE:** for ESM imports, needs to import 'subchart' exports and instantiate it by calling `subchart()`.
47081 * @function subchart․toggle
47082 * @instance
47083 * @memberof Chart
47084 * @example
47085 * // When subchart is hidden, will be shown
47086 * // When subchart is shown, will be hidden
47087 * chart.subchart.toggle();
47088 */
47089 toggle: function toggle() {
47090 var $$ = this.internal,
47091 config = $$.config;
47092 this.subchart[config.subchart_show ? "hide" : "show"]();
47093 }
47094 }
47095});
47096;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/zoom.js
47097var epsilon2 = 1e-12;
47098function cosh(x) {
47099 return ((x = Math.exp(x)) + 1 / x) / 2;
47100}
47101function sinh(x) {
47102 return ((x = Math.exp(x)) - 1 / x) / 2;
47103}
47104function tanh(x) {
47105 return ((x = Math.exp(2 * x)) - 1) / (x + 1);
47106}
47107/* harmony default export */ var src_zoom = ((function zoomRho(rho, rho2, rho4) {
47108 // p0 = [ux0, uy0, w0]
47109 // p1 = [ux1, uy1, w1]
47110 function zoom(p0, p1) {
47111 var ux0 = p0[0],
47112 uy0 = p0[1],
47113 w0 = p0[2],
47114 ux1 = p1[0],
47115 uy1 = p1[1],
47116 w1 = p1[2],
47117 dx = ux1 - ux0,
47118 dy = uy1 - uy0,
47119 d2 = dx * dx + dy * dy,
47120 i,
47121 S;
47122
47123 // Special case for u0 ≅ u1.
47124 if (d2 < epsilon2) {
47125 S = Math.log(w1 / w0) / rho;
47126 i = function (t) {
47127 return [ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S)];
47128 };
47129 }
47130
47131 // General case.
47132 else {
47133 var d1 = Math.sqrt(d2),
47134 b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
47135 b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
47136 r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
47137 r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
47138 S = (r1 - r0) / rho;
47139 i = function (t) {
47140 var s = t * S,
47141 coshr0 = cosh(r0),
47142 u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
47143 return [ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0)];
47144 };
47145 }
47146 i.duration = S * 1e3 * rho / Math.SQRT2;
47147 return i;
47148 }
47149 zoom.rho = function (_) {
47150 var _1 = Math.max(1e-3, +_),
47151 _2 = _1 * _1;
47152 return zoomRho(_1, _2, _2 * _2);
47153 };
47154 return zoom;
47155})(Math.SQRT2, 2, 4));
47156;// CONCATENATED MODULE: ./node_modules/d3-zoom/src/constant.js
47157
47158var d3_zoom_src_constant_this = undefined;
47159/* harmony default export */ var d3_zoom_src_constant = ((function (x) {
47160 var _this2 = this;
47161 _newArrowCheck(this, d3_zoom_src_constant_this);
47162 return function () {
47163 _newArrowCheck(this, _this2);
47164 return x;
47165 }.bind(this);
47166}).bind(undefined));
47167;// CONCATENATED MODULE: ./node_modules/d3-zoom/src/event.js
47168function ZoomEvent(type, _ref) {
47169 var sourceEvent = _ref.sourceEvent,
47170 target = _ref.target,
47171 transform = _ref.transform,
47172 dispatch = _ref.dispatch;
47173 Object.defineProperties(this, {
47174 type: {
47175 value: type,
47176 enumerable: !0,
47177 configurable: !0
47178 },
47179 sourceEvent: {
47180 value: sourceEvent,
47181 enumerable: !0,
47182 configurable: !0
47183 },
47184 target: {
47185 value: target,
47186 enumerable: !0,
47187 configurable: !0
47188 },
47189 transform: {
47190 value: transform,
47191 enumerable: !0,
47192 configurable: !0
47193 },
47194 _: {
47195 value: dispatch
47196 }
47197 });
47198}
47199;// CONCATENATED MODULE: ./node_modules/d3-zoom/src/transform.js
47200function Transform(k, x, y) {
47201 this.k = k;
47202 this.x = x;
47203 this.y = y;
47204}
47205Transform.prototype = {
47206 constructor: Transform,
47207 scale: function scale(k) {
47208 return k === 1 ? this : new Transform(this.k * k, this.x, this.y);
47209 },
47210 translate: function translate(x, y) {
47211 return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);
47212 },
47213 apply: function apply(point) {
47214 return [point[0] * this.k + this.x, point[1] * this.k + this.y];
47215 },
47216 applyX: function applyX(x) {
47217 return x * this.k + this.x;
47218 },
47219 applyY: function applyY(y) {
47220 return y * this.k + this.y;
47221 },
47222 invert: function invert(location) {
47223 return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
47224 },
47225 invertX: function invertX(x) {
47226 return (x - this.x) / this.k;
47227 },
47228 invertY: function invertY(y) {
47229 return (y - this.y) / this.k;
47230 },
47231 rescaleX: function rescaleX(x) {
47232 return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));
47233 },
47234 rescaleY: function rescaleY(y) {
47235 return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));
47236 },
47237 toString: function toString() {
47238 return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
47239 }
47240};
47241var transform_identity = new Transform(1, 0, 0);
47242transform_transform.prototype = Transform.prototype;
47243function transform_transform(node) {
47244 while (!node.__zoom) {
47245 if (!(node = node.parentNode)) return transform_identity;
47246 }
47247 return node.__zoom;
47248}
47249;// CONCATENATED MODULE: ./node_modules/d3-zoom/src/noevent.js
47250function src_noevent_nopropagation(event) {
47251 event.stopImmediatePropagation();
47252}
47253/* harmony default export */ function d3_zoom_src_noevent(event) {
47254 event.preventDefault();
47255 event.stopImmediatePropagation();
47256}
47257;// CONCATENATED MODULE: ./node_modules/d3-zoom/src/zoom.js
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268// Ignore right-click, since that should open the context menu.
47269// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event
47270function zoom_defaultFilter(event) {
47271 return (!event.ctrlKey || event.type === 'wheel') && !event.button;
47272}
47273function zoom_defaultExtent() {
47274 var e = this;
47275 if (e instanceof SVGElement) {
47276 e = e.ownerSVGElement || e;
47277 if (e.hasAttribute("viewBox")) {
47278 e = e.viewBox.baseVal;
47279 return [[e.x, e.y], [e.x + e.width, e.y + e.height]];
47280 }
47281 return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];
47282 }
47283 return [[0, 0], [e.clientWidth, e.clientHeight]];
47284}
47285function defaultTransform() {
47286 return this.__zoom || transform_identity;
47287}
47288function defaultWheelDelta(event) {
47289 return -event.deltaY * (event.deltaMode === 1 ? .05 : event.deltaMode ? 1 : .002) * (event.ctrlKey ? 10 : 1);
47290}
47291function zoom_defaultTouchable() {
47292 return navigator.maxTouchPoints || "ontouchstart" in this;
47293}
47294function defaultConstrain(transform, extent, translateExtent) {
47295 var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],
47296 dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],
47297 dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],
47298 dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];
47299 return transform.translate(dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1));
47300}
47301/* harmony default export */ function d3_zoom_src_zoom() {
47302 var filter = zoom_defaultFilter,
47303 extent = zoom_defaultExtent,
47304 constrain = defaultConstrain,
47305 wheelDelta = defaultWheelDelta,
47306 touchable = zoom_defaultTouchable,
47307 scaleExtent = [0, Infinity],
47308 translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],
47309 duration = 250,
47310 interpolate = src_zoom,
47311 listeners = src_dispatch("start", "zoom", "end"),
47312 touchstarting,
47313 touchfirst,
47314 touchending,
47315 clickDistance2 = 0,
47316 tapDistance = 10;
47317 function zoom(selection) {
47318 selection.property("__zoom", defaultTransform).on("wheel.zoom", wheeled, {
47319 passive: !1
47320 }).on("mousedown.zoom", mousedowned).on("dblclick.zoom", dblclicked).filter(touchable).on("touchstart.zoom", touchstarted).on("touchmove.zoom", touchmoved).on("touchend.zoom touchcancel.zoom", touchended).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
47321 }
47322 zoom.transform = function (collection, transform, point, event) {
47323 var selection = collection.selection ? collection.selection() : collection;
47324 selection.property("__zoom", defaultTransform);
47325 if (collection !== selection) {
47326 schedule(collection, transform, point, event);
47327 } else {
47328 selection.interrupt().each(function () {
47329 gesture(this, arguments).event(event).start().zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform).end();
47330 });
47331 }
47332 };
47333 zoom.scaleBy = function (selection, k, p, event) {
47334 zoom.scaleTo(selection, function () {
47335 var k0 = this.__zoom.k,
47336 k1 = typeof k === "function" ? k.apply(this, arguments) : k;
47337 return k0 * k1;
47338 }, p, event);
47339 };
47340 zoom.scaleTo = function (selection, k, p, event) {
47341 zoom.transform(selection, function () {
47342 var e = extent.apply(this, arguments),
47343 t0 = this.__zoom,
47344 p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p,
47345 p1 = t0.invert(p0),
47346 k1 = typeof k === "function" ? k.apply(this, arguments) : k;
47347 return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);
47348 }, p, event);
47349 };
47350 zoom.translateBy = function (selection, x, y, event) {
47351 zoom.transform(selection, function () {
47352 return constrain(this.__zoom.translate(typeof x === "function" ? x.apply(this, arguments) : x, typeof y === "function" ? y.apply(this, arguments) : y), extent.apply(this, arguments), translateExtent);
47353 }, null, event);
47354 };
47355 zoom.translateTo = function (selection, x, y, p, event) {
47356 zoom.transform(selection, function () {
47357 var e = extent.apply(this, arguments),
47358 t = this.__zoom,
47359 p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p;
47360 return constrain(transform_identity.translate(p0[0], p0[1]).scale(t.k).translate(typeof x === "function" ? -x.apply(this, arguments) : -x, typeof y === "function" ? -y.apply(this, arguments) : -y), e, translateExtent);
47361 }, p, event);
47362 };
47363 function scale(transform, k) {
47364 k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));
47365 return k === transform.k ? transform : new Transform(k, transform.x, transform.y);
47366 }
47367 function translate(transform, p0, p1) {
47368 var x = p0[0] - p1[0] * transform.k,
47369 y = p0[1] - p1[1] * transform.k;
47370 return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);
47371 }
47372 function centroid(extent) {
47373 return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];
47374 }
47375 function schedule(transition, transform, point, event) {
47376 transition.on("start.zoom", function () {
47377 gesture(this, arguments).event(event).start();
47378 }).on("interrupt.zoom end.zoom", function () {
47379 gesture(this, arguments).event(event).end();
47380 }).tween("zoom", function () {
47381 var that = this,
47382 args = arguments,
47383 g = gesture(that, args).event(event),
47384 e = extent.apply(that, args),
47385 p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point,
47386 w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),
47387 a = that.__zoom,
47388 b = typeof transform === "function" ? transform.apply(that, args) : transform,
47389 i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
47390 return function (t) {
47391 if (t === 1) t = b; // Avoid rounding error on end.
47392 else {
47393 var l = i(t),
47394 k = w / l[2];
47395 t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k);
47396 }
47397 g.zoom(null, t);
47398 };
47399 });
47400 }
47401 function gesture(that, args, clean) {
47402 return !clean && that.__zooming || new Gesture(that, args);
47403 }
47404 function Gesture(that, args) {
47405 this.that = that;
47406 this.args = args;
47407 this.active = 0;
47408 this.sourceEvent = null;
47409 this.extent = extent.apply(that, args);
47410 this.taps = 0;
47411 }
47412 Gesture.prototype = {
47413 event: function event(_event) {
47414 if (_event) this.sourceEvent = _event;
47415 return this;
47416 },
47417 start: function start() {
47418 if (++this.active === 1) {
47419 this.that.__zooming = this;
47420 this.emit("start");
47421 }
47422 return this;
47423 },
47424 zoom: function zoom(key, transform) {
47425 if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]);
47426 if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]);
47427 if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]);
47428 this.that.__zoom = transform;
47429 this.emit("zoom");
47430 return this;
47431 },
47432 end: function end() {
47433 if (--this.active === 0) {
47434 delete this.that.__zooming;
47435 this.emit("end");
47436 }
47437 return this;
47438 },
47439 emit: function emit(type) {
47440 var d = src_select(this.that).datum();
47441 listeners.call(type, this.that, new ZoomEvent(type, {
47442 sourceEvent: this.sourceEvent,
47443 target: zoom,
47444 type: type,
47445 transform: this.that.__zoom,
47446 dispatch: listeners
47447 }), d);
47448 }
47449 };
47450 function wheeled(event) {
47451 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
47452 args[_key - 1] = arguments[_key];
47453 }
47454 if (!filter.apply(this, arguments)) return;
47455 var g = gesture(this, args).event(event),
47456 t = this.__zoom,
47457 k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),
47458 p = src_pointer(event);
47459
47460 // If the mouse is in the same location as before, reuse it.
47461 // If there were recent wheel events, reset the wheel idle timeout.
47462 if (g.wheel) {
47463 if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
47464 g.mouse[1] = t.invert(g.mouse[0] = p);
47465 }
47466 clearTimeout(g.wheel);
47467 }
47468
47469 // If this wheel event won’t trigger a transform change, ignore it.
47470 else if (t.k === k) return;
47471
47472 // Otherwise, capture the mouse point and location at the start.
47473 else {
47474 g.mouse = [p, t.invert(p)];
47475 interrupt(this);
47476 g.start();
47477 }
47478 d3_zoom_src_noevent(event);
47479 g.wheel = setTimeout(wheelidled, 150);
47480 g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));
47481 function wheelidled() {
47482 g.wheel = null;
47483 g.end();
47484 }
47485 }
47486 function mousedowned(event) {
47487 for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
47488 args[_key2 - 1] = arguments[_key2];
47489 }
47490 if (touchending || !filter.apply(this, arguments)) return;
47491 var currentTarget = event.currentTarget,
47492 g = gesture(this, args, !0).event(event),
47493 v = src_select(event.view).on("mousemove.zoom", mousemoved, !0).on("mouseup.zoom", mouseupped, !0),
47494 p = src_pointer(event, currentTarget),
47495 x0 = event.clientX,
47496 y0 = event.clientY;
47497 nodrag(event.view);
47498 src_noevent_nopropagation(event);
47499 g.mouse = [p, this.__zoom.invert(p)];
47500 interrupt(this);
47501 g.start();
47502 function mousemoved(event) {
47503 d3_zoom_src_noevent(event);
47504 if (!g.moved) {
47505 var dx = event.clientX - x0,
47506 dy = event.clientY - y0;
47507 g.moved = dx * dx + dy * dy > clickDistance2;
47508 }
47509 g.event(event).zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = src_pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));
47510 }
47511 function mouseupped(event) {
47512 v.on("mousemove.zoom mouseup.zoom", null);
47513 yesdrag(event.view, g.moved);
47514 d3_zoom_src_noevent(event);
47515 g.event(event).end();
47516 }
47517 }
47518 function dblclicked(event) {
47519 for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
47520 args[_key3 - 1] = arguments[_key3];
47521 }
47522 if (!filter.apply(this, arguments)) return;
47523 var t0 = this.__zoom,
47524 p0 = src_pointer(event.changedTouches ? event.changedTouches[0] : event, this),
47525 p1 = t0.invert(p0),
47526 k1 = t0.k * (event.shiftKey ? .5 : 2),
47527 t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
47528 d3_zoom_src_noevent(event);
47529 if (duration > 0) src_select(this).transition().duration(duration).call(schedule, t1, p0, event);else src_select(this).call(zoom.transform, t1, p0, event);
47530 }
47531 function touchstarted(event) {
47532 for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
47533 args[_key4 - 1] = arguments[_key4];
47534 }
47535 if (!filter.apply(this, arguments)) return;
47536 var touches = event.touches,
47537 n = touches.length,
47538 g = gesture(this, args, event.changedTouches.length === n).event(event),
47539 started,
47540 i,
47541 t,
47542 p;
47543 src_noevent_nopropagation(event);
47544 for (i = 0; i < n; ++i) {
47545 t = touches[i], p = src_pointer(t, this);
47546 p = [p, this.__zoom.invert(p), t.identifier];
47547 if (!g.touch0) g.touch0 = p, started = !0, g.taps = 1 + !!touchstarting;else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;
47548 }
47549 if (touchstarting) touchstarting = clearTimeout(touchstarting);
47550 if (started) {
47551 if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function () {
47552 touchstarting = null;
47553 }, 500);
47554 interrupt(this);
47555 g.start();
47556 }
47557 }
47558 function touchmoved(event) {
47559 if (!this.__zooming) return;
47560 for (var _len5 = arguments.length, args = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
47561 args[_key5 - 1] = arguments[_key5];
47562 }
47563 var g = gesture(this, args).event(event),
47564 touches = event.changedTouches,
47565 n = touches.length,
47566 i,
47567 t,
47568 p,
47569 l;
47570 d3_zoom_src_noevent(event);
47571 for (i = 0; i < n; ++i) {
47572 t = touches[i], p = src_pointer(t, this);
47573 if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
47574 }
47575 t = g.that.__zoom;
47576 if (g.touch1) {
47577 var p0 = g.touch0[0],
47578 l0 = g.touch0[1],
47579 p1 = g.touch1[0],
47580 l1 = g.touch1[1],
47581 dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,
47582 dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;
47583 t = scale(t, Math.sqrt(dp / dl));
47584 p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
47585 l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
47586 } else if (g.touch0) p = g.touch0[0], l = g.touch0[1];else return;
47587 g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
47588 }
47589 function touchended(event) {
47590 for (var _len6 = arguments.length, args = Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
47591 args[_key6 - 1] = arguments[_key6];
47592 }
47593 if (!this.__zooming) return;
47594 var g = gesture(this, args).event(event),
47595 touches = event.changedTouches,
47596 n = touches.length,
47597 i,
47598 t;
47599 src_noevent_nopropagation(event);
47600 if (touchending) clearTimeout(touchending);
47601 touchending = setTimeout(function () {
47602 touchending = null;
47603 }, 500);
47604 for (i = 0; i < n; ++i) {
47605 t = touches[i];
47606 if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
47607 }
47608 if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;
47609 if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);else {
47610 g.end();
47611 // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.
47612 if (g.taps === 2) {
47613 t = src_pointer(t, this);
47614 if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {
47615 var p = src_select(this).on("dblclick.zoom");
47616 if (p) p.apply(this, arguments);
47617 }
47618 }
47619 }
47620 }
47621 zoom.wheelDelta = function (_) {
47622 return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : d3_zoom_src_constant(+_), zoom) : wheelDelta;
47623 };
47624 zoom.filter = function (_) {
47625 return arguments.length ? (filter = typeof _ === "function" ? _ : d3_zoom_src_constant(!!_), zoom) : filter;
47626 };
47627 zoom.touchable = function (_) {
47628 return arguments.length ? (touchable = typeof _ === "function" ? _ : d3_zoom_src_constant(!!_), zoom) : touchable;
47629 };
47630 zoom.extent = function (_) {
47631 return arguments.length ? (extent = typeof _ === "function" ? _ : d3_zoom_src_constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
47632 };
47633 zoom.scaleExtent = function (_) {
47634 return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];
47635 };
47636 zoom.translateExtent = function (_) {
47637 return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];
47638 };
47639 zoom.constrain = function (_) {
47640 return arguments.length ? (constrain = _, zoom) : constrain;
47641 };
47642 zoom.duration = function (_) {
47643 return arguments.length ? (duration = +_, zoom) : duration;
47644 };
47645 zoom.interpolate = function (_) {
47646 return arguments.length ? (interpolate = _, zoom) : interpolate;
47647 };
47648 zoom.on = function () {
47649 var value = listeners.on.apply(listeners, arguments);
47650 return value === listeners ? zoom : value;
47651 };
47652 zoom.clickDistance = function (_) {
47653 return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);
47654 };
47655 zoom.tapDistance = function (_) {
47656 return arguments.length ? (tapDistance = +_, zoom) : tapDistance;
47657 };
47658 return zoom;
47659}
47660;// CONCATENATED MODULE: ./node_modules/d3-zoom/src/index.js
47661
47662
47663;// CONCATENATED MODULE: ./src/Chart/api/zoom.ts
47664
47665/**
47666 * Copyright (c) 2017 ~ present NAVER Corp.
47667 * billboard.js project is licensed under the MIT license
47668 */
47669
47670
47671
47672/**
47673 * Check if the given domain is within zoom range
47674 * @param {Array} domain Target domain value
47675 * @param {Array} current Current zoom domain value
47676 * @param {Array} range Zoom range value
47677 * @returns {boolean}
47678 * @private
47679 */
47680function withinRange(domain, current, range) {
47681 var _this = this,
47682 min = range[0],
47683 max = range[1];
47684 return domain.every(function (v, i) {
47685 var _this2 = this;
47686 _newArrowCheck(this, _this);
47687 return (i === 0 ? v >= min : v <= max) && !domain.every(function (v, i) {
47688 _newArrowCheck(this, _this2);
47689 return v === current[i];
47690 }.bind(this));
47691 }.bind(this));
47692}
47693
47694/**
47695 * Zoom by giving x domain range.
47696 * - **NOTE:**
47697 * - For `wheel` type zoom, the minimum zoom range will be set as the given domain range. To get the initial state, [.unzoom()](#unzoom) should be called.
47698 * - To be used [zoom.enabled](Options.html#.zoom) option should be set as `truthy`.
47699 * @function zoom
47700 * @instance
47701 * @memberof Chart
47702 * @param {Array} domainValue If domain range is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned.
47703 * @returns {Array} domain value in array
47704 * @example
47705 * // Zoom to specified domain range
47706 * chart.zoom([10, 20]);
47707 *
47708 * // For timeseries, the domain value can be string, but the format should match with the 'data.xFormat' option.
47709 * chart.zoom(["2021-02-03", "2021-02-08"]);
47710 *
47711 * // Get the current zoomed domain range
47712 * chart.zoom();
47713 */
47714var zoom = function (domainValue) {
47715 var _this3 = this,
47716 $$ = this.internal,
47717 $el = $$.$el,
47718 axis = $$.axis,
47719 config = $$.config,
47720 org = $$.org,
47721 scale = $$.scale,
47722 isRotated = config.axis_rotated,
47723 isCategorized = axis.isCategorized(),
47724 domain = domainValue;
47725 if (config.zoom_enabled && domain) {
47726 if (axis.isTimeSeries()) {
47727 domain = domain.map(function (x) {
47728 _newArrowCheck(this, _this3);
47729 return parseDate.bind($$)(x);
47730 }.bind(this));
47731 }
47732 if (withinRange(domain, $$.getZoomDomain(!0), $$.getZoomDomain())) {
47733 if (isCategorized) {
47734 domain = domain.map(function (v, i) {
47735 _newArrowCheck(this, _this3);
47736 return +v + (i === 0 ? 0 : 1);
47737 }.bind(this));
47738 }
47739
47740 // hide any possible tooltip show before the zoom
47741 $$.api.tooltip.hide();
47742 if (config.subchart_show) {
47743 var x = scale.zoom || scale.x;
47744 $$.brush.getSelection().call($$.brush.move, domain.map(x));
47745 // resultDomain = domain;
47746 } else {
47747 var _d3ZoomIdentity$scale,
47748 _x = isCategorized ? scale.x.orgScale() : org.xScale || scale.x,
47749 translate = [-_x(domain[0]), 0],
47750 transform = (_d3ZoomIdentity$scale = transform_identity.scale(_x.range()[1] / (_x(domain[1]) - _x(domain[0])))).translate.apply(_d3ZoomIdentity$scale, isRotated ? translate.reverse() : translate);
47751 $el.eventRect.call($$.zoom.transform, transform);
47752 }
47753 $$.setZoomResetButton();
47754 }
47755 } else {
47756 domain = scale.zoom ? scale.zoom.domain() : scale.x.orgDomain();
47757 }
47758 return domain;
47759};
47760util_extend(zoom, {
47761 /**
47762 * Enable and disable zooming.
47763 * @function zoom․enable
47764 * @instance
47765 * @memberof Chart
47766 * @param {string|boolean} enabled Possible string values are "wheel" or "drag". If enabled is true, "wheel" will be used. If false is given, zooming will be disabled.<br>When set to false, the current zooming status will be reset.
47767 * @example
47768 * // Enable zooming using the mouse wheel
47769 * chart.zoom.enable(true);
47770 * // Or
47771 * chart.zoom.enable("wheel");
47772 *
47773 * // Enable zooming by dragging
47774 * chart.zoom.enable("drag");
47775 *
47776 * // Disable zooming
47777 * chart.zoom.enable(false);
47778 */
47779 enable: function enable(enabled) {
47780 var $$ = this.internal,
47781 config = $$.config;
47782 if (/^(drag|wheel)$/.test(enabled)) {
47783 config.zoom_type = enabled;
47784 }
47785 config.zoom_enabled = !!enabled;
47786 if (!$$.zoom) {
47787 $$.initZoom();
47788 $$.bindZoomEvent();
47789 } else if (enabled === !1) {
47790 $$.bindZoomEvent(!1);
47791 }
47792 $$.updateAndRedraw();
47793 },
47794 /**
47795 * Set or get x Axis maximum zoom range value
47796 * @function zoom․max
47797 * @instance
47798 * @memberof Chart
47799 * @param {number} [max] maximum value to set for zoom
47800 * @returns {number} zoom max value
47801 * @example
47802 * // Set maximum range value
47803 * chart.zoom.max(20);
47804 */
47805 max: function max(_max) {
47806 var $$ = this.internal,
47807 config = $$.config,
47808 xDomain = $$.org.xDomain;
47809 if (_max === 0 || _max) {
47810 config.zoom_x_max = getMinMax("max", [xDomain[1], _max]);
47811 }
47812 return config.zoom_x_max;
47813 },
47814 /**
47815 * Set or get x Axis minimum zoom range value
47816 * @function zoom․min
47817 * @instance
47818 * @memberof Chart
47819 * @param {number} [min] minimum value to set for zoom
47820 * @returns {number} zoom min value
47821 * @example
47822 * // Set minimum range value
47823 * chart.zoom.min(-1);
47824 */
47825 min: function min(_min) {
47826 var $$ = this.internal,
47827 config = $$.config,
47828 xDomain = $$.org.xDomain;
47829 if (_min === 0 || _min) {
47830 config.zoom_x_min = getMinMax("min", [xDomain[0], _min]);
47831 }
47832 return config.zoom_x_min;
47833 },
47834 /**
47835 * Set zoom range
47836 * @function zoom․range
47837 * @instance
47838 * @memberof Chart
47839 * @param {object} [range] zoom range
47840 * @returns {object} zoom range value
47841 * {
47842 * min: 0,
47843 * max: 100
47844 * }
47845 * @example
47846 * chart.zoom.range({
47847 * min: 10,
47848 * max: 100
47849 * });
47850 */
47851 range: function range(_range) {
47852 var zoom = this.zoom;
47853 if (isObject(_range)) {
47854 var min = _range.min,
47855 max = _range.max;
47856 isDefined(min) && zoom.min(min);
47857 isDefined(max) && zoom.max(max);
47858 }
47859 return {
47860 min: zoom.min(),
47861 max: zoom.max()
47862 };
47863 }
47864});
47865/* harmony default export */ var api_zoom = ({
47866 zoom: zoom,
47867 /**
47868 * Unzoom zoomed area
47869 * - **NOTE:** Calling .unzoom() will not trigger zoom events.
47870 * @function unzoom
47871 * @instance
47872 * @memberof Chart
47873 * @example
47874 * chart.unzoom();
47875 */
47876 unzoom: function unzoom() {
47877 var $$ = this.internal,
47878 config = $$.config,
47879 _$$$$el = $$.$el,
47880 eventRect = _$$$$el.eventRect,
47881 zoomResetBtn = _$$$$el.zoomResetBtn;
47882 if ($$.scale.zoom) {
47883 config.subchart_show ? $$.brush.getSelection().call($$.brush.move, null) : $$.zoom.updateTransformScale(transform_identity);
47884 $$.updateZoom(!0);
47885 zoomResetBtn == null ? void 0 : zoomResetBtn.style("display", "none");
47886
47887 // reset transform
47888 if (transform_transform(eventRect.node()) !== transform_identity) {
47889 $$.zoom.transform(eventRect, transform_identity);
47890 }
47891 }
47892 }
47893});
47894;// CONCATENATED MODULE: ./src/ChartInternal/interactions/drag.ts
47895
47896/**
47897 * Copyright (c) 2017 ~ present NAVER Corp.
47898 * billboard.js project is licensed under the MIT license
47899 */
47900
47901
47902
47903
47904/**
47905 * Module used for data.selection.draggable option
47906 */
47907/* harmony default export */ var interactions_drag = ({
47908 /**
47909 * Called when dragging.
47910 * Data points can be selected.
47911 * @private
47912 * @param {object} mouse Object
47913 */
47914 drag: function drag(mouse) {
47915 var _this = this,
47916 $$ = this,
47917 config = $$.config,
47918 state = $$.state,
47919 main = $$.$el.main,
47920 isSelectionGrouped = config.data_selection_grouped,
47921 isSelectable = config.interaction_enabled && config.data_selection_isselectable;
47922 if ($$.hasArcType() || !config.data_selection_enabled ||
47923 // do nothing if not selectable
47924 config.zoom_enabled && !$$.zoom.altDomain ||
47925 // skip if zoomable because of conflict drag behavior
47926 !config.data_selection_multiple // skip when single selection because drag is used for multiple selection
47927 ) {
47928 return;
47929 }
47930 var _ref = state.dragStart || [0, 0],
47931 sx = _ref[0],
47932 sy = _ref[1],
47933 mx = mouse[0],
47934 my = mouse[1],
47935 minX = Math.min(sx, mx),
47936 maxX = Math.max(sx, mx),
47937 minY = isSelectionGrouped ? state.margin.top : Math.min(sy, my),
47938 maxY = isSelectionGrouped ? state.height : Math.max(sy, my);
47939 main.select("." + $DRAG.dragarea).attr("x", minX).attr("y", minY).attr("width", maxX - minX).attr("height", maxY - minY);
47940
47941 // TODO: binary search when multiple xs
47942 main.selectAll("." + $SHAPE.shapes).selectAll("." + $SHAPE.shape).filter(function (d) {
47943 _newArrowCheck(this, _this);
47944 return isSelectable == null ? void 0 : isSelectable.bind($$.api)(d);
47945 }.bind(this)).each(function (d, i) {
47946 var shape = src_select(this),
47947 isSelected = shape.classed($SELECT.SELECTED),
47948 isIncluded = shape.classed($DRAG.INCLUDED),
47949 isWithin = !1,
47950 toggle;
47951 if (shape.classed($CIRCLE.circle)) {
47952 var x = +shape.attr("cx") * 1,
47953 y = +shape.attr("cy") * 1;
47954 toggle = $$.togglePoint;
47955 isWithin = minX < x && x < maxX && minY < y && y < maxY;
47956 } else if (shape.classed($BAR.bar)) {
47957 var _getPathBox = getPathBox(this),
47958 _x = _getPathBox.x,
47959 y = _getPathBox.y,
47960 width = _getPathBox.width,
47961 height = _getPathBox.height;
47962 toggle = $$.togglePath;
47963 isWithin = !(maxX < _x || _x + width < minX) && !(maxY < y || y + height < minY);
47964 } else {
47965 // line/area selection not supported yet
47966 return;
47967 }
47968
47969 // @ts-ignore
47970 if (isWithin ^ isIncluded) {
47971 shape.classed($DRAG.INCLUDED, !isIncluded);
47972 // TODO: included/unincluded callback here
47973 shape.classed($SELECT.SELECTED, !isSelected);
47974 toggle.call($$, !isSelected, shape, d, i);
47975 }
47976 });
47977 },
47978 /**
47979 * Called when the drag starts.
47980 * Adds and Shows the drag area.
47981 * @private
47982 * @param {object} mouse Object
47983 */
47984 dragstart: function dragstart(mouse) {
47985 var $$ = this,
47986 config = $$.config,
47987 state = $$.state,
47988 main = $$.$el.main;
47989 if ($$.hasArcType() || !config.data_selection_enabled) {
47990 return;
47991 }
47992 state.dragStart = mouse;
47993 main.select("." + $COMMON.chart).append("rect").attr("class", $DRAG.dragarea).style("opacity", "0.1");
47994 $$.setDragStatus(!0);
47995 },
47996 /**
47997 * Called when the drag finishes.
47998 * Removes the drag area.
47999 * @private
48000 */
48001 dragend: function dragend() {
48002 var $$ = this,
48003 config = $$.config,
48004 main = $$.$el.main,
48005 $T = $$.$T;
48006 if ($$.hasArcType() || !config.data_selection_enabled) {
48007 // do nothing if not selectable
48008 return;
48009 }
48010 $T(main.select("." + $DRAG.dragarea)).style("opacity", "0").remove();
48011 main.selectAll("." + $SHAPE.shape).classed($DRAG.INCLUDED, !1);
48012 $$.setDragStatus(!1);
48013 }
48014});
48015;// CONCATENATED MODULE: ./src/ChartInternal/internals/selection.ts
48016
48017
48018function selection_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
48019function selection_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? selection_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : selection_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
48020/**
48021 * Copyright (c) 2017 ~ present NAVER Corp.
48022 * billboard.js project is licensed under the MIT license
48023 */
48024
48025
48026
48027
48028/* harmony default export */ var internals_selection = (selection_objectSpread(selection_objectSpread({}, interactions_drag), {}, {
48029 /**
48030 * Select a point
48031 * @param {object} target Target point
48032 * @param {object} d Data object
48033 * @param {number} i Index number
48034 * @private
48035 */
48036 selectPoint: function selectPoint(target, d, i) {
48037 var _this = this,
48038 $$ = this,
48039 config = $$.config,
48040 main = $$.$el.main,
48041 $T = $$.$T,
48042 isRotated = config.axis_rotated,
48043 cx = (isRotated ? $$.circleY : $$.circleX).bind($$),
48044 cy = (isRotated ? $$.circleX : $$.circleY).bind($$),
48045 r = $$.pointSelectR.bind($$);
48046 callFn(config.data_onselected, $$.api, d, target.node());
48047
48048 // add selected-circle on low layer g
48049 $T(main.select("." + $SELECT.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + $SELECT.selectedCircle + "-" + i).data([d]).enter().append("circle").attr("class", function () {
48050 _newArrowCheck(this, _this);
48051 return $$.generateClass($SELECT.selectedCircle, i);
48052 }.bind(this)).attr("cx", cx).attr("cy", cy).attr("stroke", $$.color).attr("r", function (d2) {
48053 _newArrowCheck(this, _this);
48054 return $$.pointSelectR(d2) * 1.4;
48055 }.bind(this))).attr("r", r);
48056 },
48057 /**
48058 * Unelect a point
48059 * @param {object} target Target point
48060 * @param {object} d Data object
48061 * @param {number} i Index number
48062 * @private
48063 */
48064 unselectPoint: function unselectPoint(target, d, i) {
48065 var $$ = this,
48066 config = $$.config,
48067 main = $$.$el.main,
48068 $T = $$.$T;
48069 callFn(config.data_onunselected, $$.api, d, target.node());
48070
48071 // remove selected-circle from low layer g
48072 $T(main.select("." + $SELECT.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + $SELECT.selectedCircle + "-" + i)).attr("r", 0).remove();
48073 },
48074 /**
48075 * Toggles the selection of points
48076 * @param {boolean} selected whether or not to select.
48077 * @param {object} target Target object
48078 * @param {object} d Data object
48079 * @param {number} i Index number
48080 * @private
48081 */
48082 togglePoint: function togglePoint(selected, target, d, i) {
48083 var method = (selected ? "" : "un") + "selectPoint";
48084 this[method](target, d, i);
48085 },
48086 /**
48087 * Select a path
48088 * @param {object} target Target path
48089 * @param {object} d Data object
48090 * @private
48091 */
48092 selectPath: function selectPath(target, d) {
48093 var $$ = this,
48094 config = $$.config;
48095 callFn(config.data_onselected, $$.api, d, target.node());
48096 if (config.interaction_brighten) {
48097 target.style("filter", "brightness(1.25)");
48098 }
48099 },
48100 /**
48101 * Unelect a path
48102 * @private
48103 * @param {object} target Target path
48104 * @param {object} d Data object
48105 */
48106 unselectPath: function unselectPath(target, d) {
48107 var $$ = this,
48108 config = $$.config;
48109 callFn(config.data_onunselected, $$.api, d, target.node());
48110 if (config.interaction_brighten) {
48111 target.style("filter", null);
48112 }
48113 },
48114 /**
48115 * Toggles the selection of lines
48116 * @param {boolean} selected whether or not to select.
48117 * @param {object} target Target object
48118 * @param {object} d Data object
48119 * @param {number} i Index number
48120 * @private
48121 */
48122 togglePath: function togglePath(selected, target, d, i) {
48123 this[(selected ? "" : "un") + "selectPath"](target, d, i);
48124 },
48125 /**
48126 * Returns the toggle method of the target
48127 * @param {object} that shape
48128 * @param {object} d Data object
48129 * @returns {Function} toggle method
48130 * @private
48131 */
48132 getToggle: function getToggle(that, d) {
48133 var _this2 = this,
48134 $$ = this;
48135 return that.nodeName === "path" ? $$.togglePath : $$.isStepType(d) ? function () {
48136 _newArrowCheck(this, _this2);
48137 }.bind(this) :
48138 // circle is hidden in step chart, so treat as within the click area
48139 $$.togglePoint;
48140 },
48141 /**
48142 * Toggles the selection of shapes
48143 * @param {object} that shape
48144 * @param {object} d Data object
48145 * @param {number} i Index number
48146 * @private
48147 */
48148 toggleShape: function toggleShape(that, d, i) {
48149 var $$ = this,
48150 config = $$.config,
48151 main = $$.$el.main;
48152 if (config.data_selection_enabled && config.data_selection_isselectable.bind($$.api)(d)) {
48153 var shape = src_select(that),
48154 isSelected = shape.classed($SELECT.SELECTED),
48155 toggle = $$.getToggle(that, d).bind($$),
48156 toggledShape;
48157 if (!config.data_selection_multiple) {
48158 var selector = "." + $SHAPE.shapes;
48159 if (config.data_selection_grouped) {
48160 selector += $$.getTargetSelectorSuffix(d.id);
48161 }
48162 main.selectAll(selector).selectAll("." + $SHAPE.shape).each(function (d, i) {
48163 var shape = src_select(this);
48164 if (shape.classed($SELECT.SELECTED)) {
48165 toggledShape = shape;
48166 toggle(!1, shape.classed($SELECT.SELECTED, !1), d, i);
48167 }
48168 });
48169 }
48170 if (!toggledShape || toggledShape.node() !== shape.node()) {
48171 shape.classed($SELECT.SELECTED, !isSelected);
48172 toggle(!isSelected, shape, d, i);
48173 }
48174 }
48175 }
48176}));
48177;// CONCATENATED MODULE: ./src/ChartInternal/interactions/subchart.ts
48178
48179/**
48180 * Copyright (c) 2017 ~ present NAVER Corp.
48181 * billboard.js project is licensed under the MIT license
48182 */
48183
48184
48185
48186
48187/* harmony default export */ var interactions_subchart = ({
48188 /**
48189 * Initialize the brush.
48190 * @private
48191 */
48192 initBrush: function initBrush() {
48193 var _this = this,
48194 $$ = this,
48195 config = $$.config,
48196 scale = $$.scale,
48197 subchart = $$.$el.subchart,
48198 isRotated = config.axis_rotated,
48199 lastDomain,
48200 timeout;
48201 // set the brush
48202 $$.brush = (isRotated ? brushY() : brushX()).handleSize(5);
48203 var getBrushSize = function () {
48204 _newArrowCheck(this, _this);
48205 var brush = $$.$el.svg.select("." + classes.brush + " .overlay"),
48206 brushSize = {
48207 width: 0,
48208 height: 0
48209 };
48210 if (brush.size()) {
48211 brushSize.width = +brush.attr("width");
48212 brushSize.height = +brush.attr("height");
48213 }
48214 return brushSize[isRotated ? "width" : "height"];
48215 }.bind(this);
48216
48217 // bind brush event
48218 $$.brush.on("start brush end", function (event) {
48219 var _this2 = this;
48220 _newArrowCheck(this, _this);
48221 var selection = event.selection,
48222 target = event.target,
48223 type = event.type;
48224 if (type === "start") {
48225 $$.state.inputType === "touch" && $$.hideTooltip();
48226 }
48227 if (/(start|brush)/.test(type)) {
48228 $$.redrawForBrush();
48229 }
48230 if (type === "end") {
48231 lastDomain = scale.x.orgDomain();
48232 }
48233
48234 // handle brush's handle position & visibility
48235 if (target != null && target.handle) {
48236 if (selection === null) {
48237 $$.brush.handle.attr("display", "none");
48238 } else {
48239 $$.brush.handle.attr("display", null).attr("transform", function (d, i) {
48240 _newArrowCheck(this, _this2);
48241 var pos = isRotated ? [33, selection[i] - (i === 0 ? 30 : 24)] : [selection[i], 3];
48242 return "translate(" + pos + ")";
48243 }.bind(this));
48244 }
48245 }
48246 }.bind(this));
48247 $$.brush.updateResize = function () {
48248 var _this3 = this;
48249 timeout && clearTimeout(timeout);
48250 timeout = setTimeout(function () {
48251 _newArrowCheck(this, _this3);
48252 var selection = this.getSelection();
48253 lastDomain && brushSelection(selection.node()) && this.move(selection, lastDomain.map(scale.subX.orgScale()));
48254 }.bind(this), 0);
48255 };
48256 $$.brush.update = function () {
48257 var _this4 = this,
48258 extent = this.extent()();
48259 if (extent[1].filter(function (v) {
48260 _newArrowCheck(this, _this4);
48261 return isNaN(v);
48262 }.bind(this)).length === 0) {
48263 var _subchart$main;
48264 (_subchart$main = subchart.main) == null ? void 0 : _subchart$main.select("." + classes.brush).call(this);
48265 }
48266 return this;
48267 };
48268
48269 // set the brush extent
48270 $$.brush.scale = function (scale) {
48271 var _this5 = this,
48272 h = config.subchart_size_height || getBrushSize(),
48273 extent = $$.getExtent();
48274 if (!extent && scale.range) {
48275 extent = [[0, 0], [scale.range()[1], h]];
48276 } else if (isArray(extent)) {
48277 extent = extent.map(function (v, i) {
48278 _newArrowCheck(this, _this5);
48279 return [v, i > 0 ? h : i];
48280 }.bind(this));
48281 }
48282
48283 // [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner
48284 isRotated && extent[1].reverse();
48285 this.extent(extent);
48286
48287 // when extent updates, brush selection also be re-applied
48288 // https://github.com/d3/d3/issues/2918
48289 this.update();
48290 };
48291 $$.brush.getSelection = function () {
48292 _newArrowCheck(this, _this);
48293 return (
48294 // @ts-ignore
48295 subchart.main ? subchart.main.select("." + classes.brush) : src_select([])
48296 );
48297 }.bind(this);
48298 },
48299 /**
48300 * Initialize the subchart.
48301 * @private
48302 */
48303 initSubchart: function initSubchart() {
48304 var _this6 = this,
48305 $$ = this,
48306 config = $$.config,
48307 _$$$state = $$.state,
48308 clip = _$$$state.clip,
48309 hasAxis = _$$$state.hasAxis,
48310 _$$$$el = $$.$el,
48311 defs = _$$$$el.defs,
48312 svg = _$$$$el.svg,
48313 subchart = _$$$$el.subchart,
48314 axis = _$$$$el.axis;
48315 if (!hasAxis) {
48316 return;
48317 }
48318 var visibility = config.subchart_show ? null : "hidden",
48319 clipId = clip.id + "-subchart",
48320 clipPath = $$.getClipPath(clipId);
48321 clip.idSubchart = clipId;
48322 $$.appendClip(defs, clipId);
48323 $$.initBrush();
48324 subchart.main = svg.append("g").classed(classes.subchart, !0).attr("transform", $$.getTranslate("context"));
48325 var main = subchart.main;
48326 main.style("visibility", visibility);
48327
48328 // Define g for chart area
48329 main.append("g").attr("clip-path", clipPath).attr("class", classes.chart);
48330
48331 // Define g for chart types area
48332 ["bar", "line", "bubble", "candlestick", "scatter"].forEach(function (v) {
48333 _newArrowCheck(this, _this6);
48334 var type = capitalize(/^(bubble|scatter)$/.test(v) ? "circle" : v);
48335 if ($$.hasType(v) || $$.hasTypeOf(type)) {
48336 var chart = main.select("." + classes.chart),
48337 chartClassName = classes["chart" + type + "s"];
48338 if (chart.select("." + chartClassName).empty()) {
48339 chart.append("g").attr("class", chartClassName);
48340 }
48341 }
48342 }.bind(this));
48343
48344 // Add extent rect for Brush
48345 var brush = main.append("g").attr("clip-path", clipPath).attr("class", classes.brush).call($$.brush);
48346 config.subchart_showHandle && $$.addBrushHandle(brush);
48347
48348 // ATTENTION: This must be called AFTER chart added
48349 // Add Axis
48350 axis.subX = main.append("g").attr("class", classes.axisX).attr("transform", $$.getTranslate("subX")).attr("clip-path", config.axis_rotated ? "" : clip.pathXAxis).style("visibility", config.subchart_axis_x_show ? visibility : "hidden");
48351 },
48352 /**
48353 * Add brush handle
48354 * Enabled when: subchart.showHandle=true
48355 * @param {d3Selection} brush Brush selection
48356 * @private
48357 */
48358 addBrushHandle: function addBrushHandle(brush) {
48359 var _this7 = this,
48360 $$ = this,
48361 config = $$.config,
48362 isRotated = config.axis_rotated,
48363 initRange = config.subchart_init_range,
48364 path = isRotated ? ["M 5.2491724,29.749209 a 6,6 0 0 0 -5.50000003,-6.5 H -5.7508276 a 6,6 0 0 0 -6.0000004,6.5 z m -5.00000003,-2 H -6.7508276 m 6.99999997,-2 H -6.7508276Z", "M 5.2491724,23.249172 a 6,-6 0 0 1 -5.50000003,6.5 H -5.7508276 a 6,-6 0 0 1 -6.0000004,-6.5 z m -5.00000003,2 H -6.7508276 m 6.99999997,2 H -6.7508276Z"] : ["M 0 18 A 6 6 0 0 0 -6.5 23.5 V 29 A 6 6 0 0 0 0 35 Z M -2 23 V 30 M -4 23 V 30Z", "M 0 18 A 6 6 0 0 1 6.5 23.5 V 29 A 6 6 0 0 1 0 35 Z M 2 23 V 30 M 4 23 V 30Z"];
48365 $$.brush.handle = brush.selectAll(".handle--custom").data(isRotated ? [{
48366 type: "n"
48367 }, {
48368 type: "s"
48369 }] : [{
48370 type: "w"
48371 }, {
48372 type: "e"
48373 }]).enter().append("path").attr("class", "handle--custom").attr("cursor", (isRotated ? "ns" : "ew") + "-resize").attr("d", function (d) {
48374 _newArrowCheck(this, _this7);
48375 return path[+/[se]/.test(d.type)];
48376 }.bind(this)).attr("display", initRange ? null : "none");
48377 },
48378 /**
48379 * Update sub chart
48380 * @param {object} targets $$.data.targets
48381 * @private
48382 */
48383 updateTargetsForSubchart: function updateTargetsForSubchart(targets) {
48384 var _this8 = this,
48385 $$ = this,
48386 config = $$.config,
48387 state = $$.state,
48388 main = $$.$el.subchart.main;
48389 if (config.subchart_show) {
48390 ["bar", "line", "bubble", "candlestick", "scatter"].filter(function (v) {
48391 _newArrowCheck(this, _this8);
48392 return $$.hasType(v) || $$.hasTypeOf(capitalize(v));
48393 }.bind(this)).forEach(function (v) {
48394 _newArrowCheck(this, _this8);
48395 var isPointType = /^(bubble|scatter)$/.test(v),
48396 name = capitalize(isPointType ? "circle" : v),
48397 chartClass = $$.getChartClass(name, !0),
48398 shapeClass = $$.getClass(isPointType ? "circles" : v + "s", !0),
48399 shapeChart = main.select("." + classes["chart" + (name + "s")]);
48400 if (isPointType) {
48401 var circle = shapeChart.selectAll("." + classes.circles).data(targets.filter($$["is" + capitalize(v) + "Type"].bind($$))).attr("class", shapeClass);
48402 circle.exit().remove();
48403 circle.enter().append("g").attr("class", shapeClass);
48404 } else {
48405 var shapeUpdate = shapeChart.selectAll("." + classes["chart" + name]).attr("class", chartClass).data(targets.filter($$["is" + name + "Type"].bind($$))),
48406 shapeEnter = shapeUpdate.enter().append("g").style("opacity", "0").attr("class", chartClass).append("g").attr("class", shapeClass);
48407 shapeUpdate.exit().remove();
48408
48409 // Area
48410 v === "line" && $$.hasTypeOf("Area") && shapeEnter.append("g").attr("class", $$.getClass("areas", !0));
48411 }
48412 }.bind(this));
48413
48414 // -- Brush --//
48415 main.selectAll("." + classes.brush + " rect").attr(config.axis_rotated ? "width" : "height", config.axis_rotated ? state.width2 : state.height2);
48416 }
48417 },
48418 /**
48419 * Redraw subchart.
48420 * @private
48421 * @param {boolean} withSubchart whether or not to show subchart
48422 * @param {number} duration duration
48423 * @param {object} shape Shape's info
48424 */
48425 redrawSubchart: function redrawSubchart(withSubchart, duration, shape) {
48426 var _this9 = this,
48427 $$ = this,
48428 config = $$.config,
48429 main = $$.$el.subchart.main,
48430 state = $$.state,
48431 withTransition = !!duration;
48432 main.style("visibility", config.subchart_show ? null : "hidden");
48433
48434 // subchart
48435 if (config.subchart_show) {
48436 var _state$event;
48437 // reflect main chart to extent on subchart if zoomed
48438 if (((_state$event = state.event) == null ? void 0 : _state$event.type) === "zoom") {
48439 $$.brush.update();
48440 }
48441
48442 // update subchart elements if needed
48443 if (withSubchart) {
48444 var initRange = config.subchart_init_range;
48445
48446 // extent rect
48447 brushEmpty($$) || $$.brush.update();
48448 Object.keys(shape.type).forEach(function (v) {
48449 _newArrowCheck(this, _this9);
48450 var name = capitalize(v),
48451 drawFn = $$["generateDraw" + name](shape.indices[v], !0);
48452 // call shape's update & redraw method
48453 $$["update" + name](withTransition, !0);
48454 $$["redraw" + name](drawFn, withTransition, !0);
48455 }.bind(this));
48456 if ($$.hasType("bubble") || $$.hasType("scatter")) {
48457 var cx = shape.pos.cx,
48458 cy = $$.updateCircleY(!0);
48459 $$.updateCircle(!0);
48460 $$.redrawCircle(cx, cy, withTransition, undefined, !0);
48461 }
48462 !state.rendered && initRange && $$.brush.move($$.brush.getSelection(), initRange.map($$.scale.x));
48463 }
48464 }
48465 },
48466 /**
48467 * Redraw the brush.
48468 * @private
48469 */
48470 redrawForBrush: function redrawForBrush() {
48471 var $$ = this,
48472 _$$$config = $$.config,
48473 onBrush = _$$$config.subchart_onbrush,
48474 withY = _$$$config.zoom_rescale,
48475 scale = $$.scale;
48476 $$.redraw({
48477 withTransition: !1,
48478 withY: withY,
48479 withSubchart: !1,
48480 withUpdateXDomain: !0,
48481 withDimension: !1
48482 });
48483 onBrush.bind($$.api)(scale.x.orgDomain());
48484 },
48485 /**
48486 * Transform context
48487 * @param {boolean} withTransition indicates transition is enabled
48488 * @param {object} transitions The return value of the generateTransitions method of Axis.
48489 * @private
48490 */
48491 transformContext: function transformContext(withTransition, transitions) {
48492 var $$ = this,
48493 subchart = $$.$el.subchart,
48494 $T = $$.$T,
48495 subXAxis = transitions != null && transitions.axisSubX ? transitions.axisSubX : $T(subchart.main.select("." + classes.axisX), withTransition);
48496 subchart.main.attr("transform", $$.getTranslate("context"));
48497 subXAxis.attr("transform", $$.getTranslate("subX"));
48498 },
48499 /**
48500 * Get extent value
48501 * @returns {Array} default extent
48502 * @private
48503 */
48504 getExtent: function getExtent() {
48505 var _this10 = this,
48506 $$ = this,
48507 config = $$.config,
48508 scale = $$.scale,
48509 extent = config.axis_x_extent;
48510 if (extent) {
48511 if (isFunction(extent)) {
48512 extent = extent.bind($$.api)($$.getXDomain($$.data.targets), scale.subX);
48513 } else if ($$.axis.isTimeSeries() && extent.every(isNaN)) {
48514 var fn = parseDate.bind($$);
48515 extent = extent.map(function (v) {
48516 _newArrowCheck(this, _this10);
48517 return scale.subX(fn(v));
48518 }.bind(this));
48519 }
48520 }
48521 return extent;
48522 }
48523});
48524;// CONCATENATED MODULE: ./src/ChartInternal/interactions/zoom.ts
48525
48526/**
48527 * Copyright (c) 2017 ~ present NAVER Corp.
48528 * billboard.js project is licensed under the MIT license
48529 */
48530
48531
48532
48533
48534/* harmony default export */ var interactions_zoom = ({
48535 /**
48536 * Initialize zoom.
48537 * @private
48538 */
48539 initZoom: function initZoom() {
48540 var $$ = this;
48541 $$.scale.zoom = null;
48542 $$.generateZoom();
48543 $$.initZoomBehaviour();
48544 },
48545 /**
48546 * Bind zoom event
48547 * @param {boolean} bind Weather bind or unbound
48548 * @private
48549 */
48550 bindZoomEvent: function bindZoomEvent(bind) {
48551 if (bind === void 0) {
48552 bind = !0;
48553 }
48554 var $$ = this,
48555 config = $$.config,
48556 zoomEnabled = config.zoom_enabled;
48557 if (zoomEnabled && bind) {
48558 // Do not bind zoom event when subchart is shown
48559 config.subchart_show || $$.bindZoomOnEventRect();
48560 } else if (bind === !1) {
48561 $$.api.unzoom();
48562 $$.unbindZoomEvent();
48563 }
48564 },
48565 /**
48566 * Generate zoom
48567 * @private
48568 */
48569 generateZoom: function generateZoom() {
48570 var _this = this,
48571 $$ = this,
48572 config = $$.config,
48573 org = $$.org,
48574 scale = $$.scale,
48575 zoom = d3_zoom_src_zoom().duration(0).on("start", $$.onZoomStart.bind($$)).on("zoom", $$.onZoom.bind($$)).on("end", $$.onZoomEnd.bind($$));
48576 // get zoom extent
48577 // @ts-ignore
48578 zoom.orgScaleExtent = function () {
48579 _newArrowCheck(this, _this);
48580 var extent = config.zoom_extent || [1, 10];
48581 return [extent[0], Math.max($$.getMaxDataCount() / extent[1], extent[1])];
48582 }.bind(this);
48583
48584 // @ts-ignore
48585 zoom.updateScaleExtent = function () {
48586 var ratio = diffDomain($$.scale.x.orgDomain()) / diffDomain($$.getZoomDomain()),
48587 extent = this.orgScaleExtent();
48588 this.scaleExtent([extent[0] * ratio, extent[1] * ratio]);
48589 return this;
48590 };
48591
48592 /**
48593 * Update scale according zoom transform value
48594 * @param {object} transform transform object
48595 * @param {boolean} correctTransform if the d3 transform should be updated after rescaling
48596 * @private
48597 */
48598 // @ts-ignore
48599 zoom.updateTransformScale = function (transform, correctTransform) {
48600 var _org$xScale;
48601 _newArrowCheck(this, _this);
48602 var isRotated = config.axis_rotated;
48603
48604 // in case of resize, update range of orgXScale
48605 (_org$xScale = org.xScale) == null ? void 0 : _org$xScale.range(scale.x.range());
48606
48607 // rescale from the original scale
48608 var newScale = transform[isRotated ? "rescaleY" : "rescaleX"](org.xScale || scale.x),
48609 domain = $$.trimXDomain(newScale.domain()),
48610 rescale = config.zoom_rescale;
48611 newScale.domain(domain, org.xDomain);
48612
48613 // prevent chart from panning off the edge and feeling "stuck"
48614 // https://github.com/naver/billboard.js/issues/2588
48615 if (correctTransform) {
48616 var t = newScale(scale.x.domain()[0]),
48617 tX = isRotated ? transform.x : t,
48618 tY = isRotated ? t : transform.y;
48619 $$.$el.eventRect.property("__zoom", transform_identity.translate(tX, tY).scale(transform.k));
48620 }
48621 if (!$$.state.xTickOffset) {
48622 $$.state.xTickOffset = $$.axis.x.tickOffset();
48623 }
48624 scale.zoom = $$.getCustomizedScale(newScale);
48625 $$.axis.x.scale(scale.zoom);
48626 if (rescale) {
48627 // copy current initial x scale in case of rescale option is used
48628 org.xScale || (org.xScale = scale.x.copy());
48629 scale.x.domain(domain);
48630 }
48631 }.bind(this);
48632
48633 /**
48634 * Get zoom domain
48635 * @returns {Array} zoom domain
48636 * @private
48637 */
48638 // @ts-ignore
48639 zoom.getDomain = function () {
48640 _newArrowCheck(this, _this);
48641 var domain = scale[scale.zoom ? "zoom" : "subX"].domain(),
48642 isCategorized = $$.axis.isCategorized();
48643 if (isCategorized) {
48644 domain[1] -= 2;
48645 }
48646 return domain;
48647 }.bind(this);
48648 $$.zoom = zoom;
48649 },
48650 /**
48651 * 'start' event listener
48652 * @param {object} event Event object
48653 * @private
48654 */
48655 onZoomStart: function onZoomStart(event) {
48656 var $$ = this,
48657 sourceEvent = event.sourceEvent;
48658 if (sourceEvent) {
48659 $$.zoom.startEvent = sourceEvent;
48660 $$.state.zooming = !0;
48661 callFn($$.config.zoom_onzoomstart, $$.api, event);
48662 }
48663 },
48664 /**
48665 * 'zoom' event listener
48666 * @param {object} event Event object
48667 * @private
48668 */
48669 onZoom: function onZoom(event) {
48670 var _this2 = this,
48671 $$ = this,
48672 config = $$.config,
48673 scale = $$.scale,
48674 state = $$.state,
48675 org = $$.org,
48676 sourceEvent = event.sourceEvent,
48677 isUnZoom = (event == null ? void 0 : event.transform) === transform_identity;
48678 if (!config.zoom_enabled || $$.filterTargetsToShow($$.data.targets).length === 0 || !scale.zoom && (sourceEvent == null ? void 0 : sourceEvent.type.indexOf("touch")) > -1 && (sourceEvent == null ? void 0 : sourceEvent.touches.length) === 1) {
48679 return;
48680 }
48681 if (event.sourceEvent) {
48682 state.zooming = !0;
48683 }
48684 var isMousemove = (sourceEvent == null ? void 0 : sourceEvent.type) === "mousemove",
48685 isZoomOut = (sourceEvent == null ? void 0 : sourceEvent.wheelDelta) < 0,
48686 transform = event.transform;
48687 if (!isMousemove && isZoomOut && scale.x.domain().every(function (v, i) {
48688 _newArrowCheck(this, _this2);
48689 return v !== org.xDomain[i];
48690 }.bind(this))) {
48691 scale.x.domain(org.xDomain);
48692 }
48693 $$.zoom.updateTransformScale(transform, config.zoom_type === "wheel" && sourceEvent);
48694
48695 // do zoom transiton when:
48696 // - zoom type 'drag'
48697 // - when .unzoom() is called (event.transform === d3ZoomIdentity)
48698 var doTransition = config.transition_duration > 0 && !config.subchart_show && (state.dragging || isUnZoom || !event.sourceEvent);
48699 $$.redraw({
48700 withTransition: doTransition,
48701 withY: config.zoom_rescale,
48702 withSubchart: !1,
48703 withEventRect: !1,
48704 withDimension: !1
48705 });
48706 $$.state.cancelClick = isMousemove;
48707
48708 // do not call event cb when is .unzoom() is called
48709 isUnZoom || callFn(config.zoom_onzoom, $$.api, $$.zoom.getDomain());
48710 },
48711 /**
48712 * 'end' event listener
48713 * @param {object} event Event object
48714 * @private
48715 */
48716 onZoomEnd: function onZoomEnd(event) {
48717 var _startEvent,
48718 $$ = this,
48719 config = $$.config,
48720 state = $$.state,
48721 startEvent = $$.zoom.startEvent,
48722 e = event == null ? void 0 : event.sourceEvent,
48723 isUnZoom = (event == null ? void 0 : event.transform) === transform_identity;
48724 if (((_startEvent = startEvent) == null ? void 0 : _startEvent.type.indexOf("touch")) > -1) {
48725 var _e, _e$changedTouches;
48726 startEvent = startEvent.changedTouches[0];
48727 e = (_e = e) == null ? void 0 : (_e$changedTouches = _e.changedTouches) == null ? void 0 : _e$changedTouches[0];
48728 }
48729
48730 // if click, do nothing. otherwise, click interaction will be canceled.
48731 if (config.zoom_type === "drag" && e && startEvent.clientX === e.clientX && startEvent.clientY === e.clientY) {
48732 return;
48733 }
48734 $$.redrawEventRect();
48735 $$.updateZoom();
48736 state.zooming = !1;
48737
48738 // do not call event cb when is .unzoom() is called
48739 !isUnZoom && (e || state.dragging) && callFn(config.zoom_onzoomend, $$.api, $$.zoom.getDomain());
48740 },
48741 /**
48742 * Update zoom
48743 * @param {boolean} force Force unzoom
48744 * @private
48745 */
48746 updateZoom: function updateZoom(force) {
48747 var $$ = this,
48748 _$$$scale = $$.scale,
48749 subX = _$$$scale.subX,
48750 x = _$$$scale.x,
48751 zoom = _$$$scale.zoom;
48752 if (zoom) {
48753 var zoomDomain = zoom.domain(),
48754 xDomain = subX.domain(),
48755 delta = .015,
48756 isfullyShown = (zoomDomain[0] <= xDomain[0] || zoomDomain[0] - delta <= xDomain[0]) && (xDomain[1] <= zoomDomain[1] || xDomain[1] <= zoomDomain[1] - delta);
48757 // check if the zoomed chart is fully shown, then reset scale when zoom is out as initial
48758 if (force || isfullyShown) {
48759 $$.axis.x.scale(subX);
48760 x.domain(subX.orgDomain());
48761 $$.scale.zoom = null;
48762 }
48763 }
48764 },
48765 /**
48766 * Attach zoom event on <rect>
48767 * @private
48768 */
48769 bindZoomOnEventRect: function bindZoomOnEventRect() {
48770 var _this3 = this,
48771 $$ = this,
48772 config = $$.config,
48773 eventRect = $$.$el.eventRect,
48774 behaviour = config.zoom_type === "drag" ? $$.zoomBehaviour : $$.zoom;
48775 // Since Chrome 89, wheel zoom not works properly
48776 // Applying the workaround: https://github.com/d3/d3-zoom/issues/231#issuecomment-802305692
48777 $$.$el.svg.on("wheel", function () {
48778 _newArrowCheck(this, _this3);
48779 }.bind(this));
48780 eventRect.call(behaviour).on("dblclick.zoom", null);
48781 },
48782 /**
48783 * Initialize the drag behaviour used for zooming.
48784 * @private
48785 */
48786 initZoomBehaviour: function initZoomBehaviour() {
48787 var _this4 = this,
48788 $$ = this,
48789 config = $$.config,
48790 state = $$.state,
48791 isRotated = config.axis_rotated,
48792 start = 0,
48793 end = 0,
48794 zoomRect,
48795 prop = {
48796 axis: isRotated ? "y" : "x",
48797 attr: isRotated ? "height" : "width",
48798 index: isRotated ? 1 : 0
48799 };
48800 $$.zoomBehaviour = drag().clickDistance(4).on("start", function (event) {
48801 state.event = event;
48802 $$.setDragStatus(!0);
48803 $$.unselectRect();
48804 if (!zoomRect) {
48805 zoomRect = $$.$el.main.append("rect").attr("clip-path", state.clip.path).attr("class", $ZOOM.zoomBrush).attr("width", isRotated ? state.width : 0).attr("height", isRotated ? 0 : state.height);
48806 }
48807 start = getPointer(event, this)[prop.index];
48808 end = start;
48809 zoomRect.attr(prop.axis, start).attr(prop.attr, 0);
48810 $$.onZoomStart(event);
48811 }).on("drag", function (event) {
48812 end = getPointer(event, this)[prop.index];
48813 zoomRect.attr(prop.axis, Math.min(start, end)).attr(prop.attr, Math.abs(end - start));
48814 }).on("end", function (event) {
48815 var _this5 = this;
48816 _newArrowCheck(this, _this4);
48817 var scale = $$.scale.zoom || $$.scale.x;
48818 state.event = event;
48819 zoomRect.attr(prop.axis, 0).attr(prop.attr, 0);
48820 if (start > end) {
48821 var _ref = [end, start];
48822 start = _ref[0];
48823 end = _ref[1];
48824 }
48825 if (start < 0) {
48826 end += Math.abs(start);
48827 start = 0;
48828 }
48829 if (start !== end) {
48830 $$.api.zoom([start, end].map(function (v) {
48831 _newArrowCheck(this, _this5);
48832 return scale.invert(v);
48833 }.bind(this)));
48834 }
48835 $$.setDragStatus(!1);
48836 }.bind(this));
48837 },
48838 setZoomResetButton: function setZoomResetButton() {
48839 var $$ = this,
48840 config = $$.config,
48841 $el = $$.$el,
48842 resetButton = config.zoom_resetButton;
48843 if (resetButton && config.zoom_type === "drag") {
48844 if (!$el.zoomResetBtn) {
48845 $el.zoomResetBtn = $$.$el.chart.append("div").classed($COMMON.button, !0).append("span").on("click", function () {
48846 isFunction(resetButton.onclick) && resetButton.onclick.bind($$.api)(this);
48847 $$.api.unzoom();
48848 }).classed($ZOOM.buttonZoomReset, !0).text(resetButton.text || "Reset Zoom");
48849 } else {
48850 $el.zoomResetBtn.style("display", null);
48851 }
48852 }
48853 }
48854});
48855;// CONCATENATED MODULE: ./src/config/Options/data/selection.ts
48856
48857var selection_this = undefined;
48858/**
48859 * Copyright (c) 2017 ~ present NAVER Corp.
48860 * billboard.js project is licensed under the MIT license
48861 */
48862/**
48863 * data.selection config options
48864 */
48865/* harmony default export */ var data_selection = ({
48866 /**
48867 * Set data selection enabled<br><br>
48868 * If this option is set true, we can select the data points and get/set its state of selection by API (e.g. select, unselect, selected).
48869 * - **NOTE:** for ESM imports, needs to import 'selection' exports and instantiate it by calling `selection()`.
48870 * - `enabled: selection()`
48871 * @name data․selection․enabled
48872 * @memberof Options
48873 * @type {boolean}
48874 * @default false
48875 * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataSelection)
48876 * @example
48877 * data: {
48878 * selection: {
48879 * enabled: true
48880 * }
48881 * }
48882 * @example
48883 * // importing ESM
48884 * import bb, {selection} from "billboard.js";
48885 *
48886 * data: {
48887 * selection: {
48888 * enabled: selection(),
48889 * ...
48890 * }
48891 * }
48892 */
48893 data_selection_enabled: !1,
48894 /**
48895 * Set grouped selection enabled.<br><br>
48896 * If this option set true, multiple data points that have same x value will be selected by one selection.
48897 * @name data․selection․grouped
48898 * @memberof Options
48899 * @type {boolean}
48900 * @default false
48901 * @example
48902 * data: {
48903 * selection: {
48904 * grouped: true
48905 * }
48906 * }
48907 */
48908 data_selection_grouped: !1,
48909 /**
48910 * Set a callback for each data point to determine if it's selectable or not.<br><br>
48911 * The callback will receive d as an argument and it has some parameters like id, value, index. This callback should return boolean.
48912 * @name data․selection․isselectable
48913 * @memberof Options
48914 * @type {Function}
48915 * @default function() { return true; }
48916 * @example
48917 * data: {
48918 * selection: {
48919 * isselectable: function(d) { ... }
48920 * }
48921 * }
48922 */
48923 data_selection_isselectable: function data_selection_isselectable() {
48924 _newArrowCheck(this, selection_this);
48925 return !0;
48926 }.bind(undefined),
48927 /**
48928 * Set multiple data points selection enabled.<br><br>
48929 * If this option set true, multile data points can have the selected state at the same time. If false set, only one data point can have the selected state and the others will be unselected when the new data point is selected.
48930 * @name data․selection․multiple
48931 * @memberof Options
48932 * @type {boolean}
48933 * @default true
48934 * @example
48935 * data: {
48936 * selection: {
48937 * multiple: false
48938 * }
48939 * }
48940 */
48941 data_selection_multiple: !0,
48942 /**
48943 * Enable to select data points by dragging.
48944 * If this option set true, data points can be selected by dragging.
48945 * - **NOTE:** If this option set true, scrolling on the chart will be disabled because dragging event will handle the event.
48946 * @name data․selection․draggable
48947 * @memberof Options
48948 * @type {boolean}
48949 * @default false
48950 * @example
48951 * data: {
48952 * selection: {
48953 * draggable: true
48954 * }
48955 * }
48956 */
48957 data_selection_draggable: !1,
48958 /**
48959 * Set a callback for on data selection.
48960 * @name data․onselected
48961 * @memberof Options
48962 * @type {Function}
48963 * @default function() {}
48964 * @example
48965 * data: {
48966 * onselected: function(d, element) {
48967 * // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"}
48968 * // element - <circle>
48969 * ...
48970 * }
48971 * }
48972 */
48973 data_onselected: function data_onselected() {
48974 _newArrowCheck(this, selection_this);
48975 }.bind(undefined),
48976 /**
48977 * Set a callback for on data un-selection.
48978 * @name data․onunselected
48979 * @memberof Options
48980 * @type {Function}
48981 * @default function() {}
48982 * @example
48983 * data: {
48984 * onunselected: function(d, element) {
48985 * // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"}
48986 * // element - <circle>
48987 * ...
48988 * }
48989 * }
48990 */
48991 data_onunselected: function data_onunselected() {
48992 _newArrowCheck(this, selection_this);
48993 }.bind(undefined)
48994});
48995;// CONCATENATED MODULE: ./src/config/Options/interaction/subchart.ts
48996
48997var subchart_this = undefined;
48998/**
48999 * Copyright (c) 2017 ~ present NAVER Corp.
49000 * billboard.js project is licensed under the MIT license
49001 */
49002/**
49003 * x Axis config options
49004 */
49005/* harmony default export */ var interaction_subchart = ({
49006 /**
49007 * Set subchart options.
49008 * - **NOTE:** Not supported for `bubble`, `scatter` and non-Axis based(pie, donut, gauge, radar) types.
49009 * @name subchart
49010 * @memberof Options
49011 * @type {object}
49012 * @property {object} subchart Subchart object
49013 * @property {boolean} [subchart.show=false] Show sub chart on the bottom of the chart.
49014 * - **NOTE:** for ESM imports, needs to import 'subchart' exports and instantiate it by calling `subchart()`.
49015 * - `show: subchart()`
49016 * @property {boolean} [subchart.showHandle=false] Show sub chart's handle.
49017 * @property {boolean} [subchart.axis.x.show=true] Show or hide x axis.
49018 * @property {boolean} [subchart.axis.x.tick.show=true] Show or hide x axis tick line.
49019 * @property {Function|string} [subchart.axis.x.tick.format] Use custom format for x axis ticks - see [axis.x.tick.format](#.axis․x․tick․format) for details.
49020 * @property {boolean} [subchart.axis.x.tick.text.show=true] Show or hide x axis tick text.
49021 * @property {Array} [subchart.init.range] Set initial selection domain range.
49022 * @property {number} [subchart.size.height] Change the height of the subchart.
49023 * @property {Function} [subchart.onbrush] Set callback for brush event.<br>
49024 * Specified function receives the current zoomed x domain.
49025 * @see [Demo](https://naver.github.io/billboard.js/demo/#Interaction.SubChart)
49026 * @example
49027 * subchart: {
49028 * show: true,
49029 * showHandle: true,
49030 * size: {
49031 * height: 20
49032 * },
49033 * init: {
49034 * // specify initial range domain selection
49035 * range: [1, 2]
49036 * },
49037 * axis: {
49038 * x: {
49039 * show: true,
49040 * tick: {
49041 * show: true,
49042 * format: (x) => d3Format(".1f")(x)
49043 * text: {
49044 * show: false
49045 * }
49046 * }
49047 * }
49048 * },
49049 * onbrush: function(domain) { ... }
49050 * }
49051 * @example
49052 * // importing ESM
49053 * import bb, {subchart} from "billboard.js";
49054 *
49055 * subchart: {
49056 * show: subchart(),
49057 * ...
49058 * }
49059 */
49060 subchart_show: !1,
49061 subchart_showHandle: !1,
49062 subchart_size_height: 60,
49063 subchart_axis_x_show: !0,
49064 subchart_axis_x_tick_show: !0,
49065 subchart_axis_x_tick_format: undefined,
49066 subchart_axis_x_tick_text_show: !0,
49067 subchart_init_range: undefined,
49068 subchart_onbrush: function subchart_onbrush() {
49069 _newArrowCheck(this, subchart_this);
49070 }.bind(undefined)
49071});
49072;// CONCATENATED MODULE: ./src/config/Options/interaction/zoom.ts
49073/**
49074 * Copyright (c) 2017 ~ present NAVER Corp.
49075 * billboard.js project is licensed under the MIT license
49076 */
49077/**
49078 * zoom config options
49079 */
49080/* harmony default export */ var interaction_zoom = ({
49081 /**
49082 * Set zoom options
49083 * @name zoom
49084 * @memberof Options
49085 * @type {object}
49086 * @property {object} zoom Zoom object
49087 * @property {boolean} [zoom.enabled=false] Enable zooming.
49088 * - **NOTE:** for ESM imports, needs to import 'zoom' exports and instantiate it by calling `zoom()`.
49089 * - `enabled: zoom()`
49090 * @property {string} [zoom.type='wheel'] Set zoom interaction type.
49091 * - **Available types:**
49092 * - wheel
49093 * - drag
49094 * @property {boolean} [zoom.rescale=false] Enable to rescale after zooming.<br>
49095 * If true set, y domain will be updated according to the zoomed region.
49096 * @property {Array} [zoom.extent=[1, 10]] Change zoom extent.
49097 * @property {number|Date} [zoom.x.min] Set x Axis minimum zoom range
49098 * @property {number|Date} [zoom.x.max] Set x Axis maximum zoom range
49099 * @property {Function} [zoom.onzoomstart=undefined] Set callback that is called when zooming starts.<br>
49100 * Specified function receives the zoom event.
49101 * @property {Function} [zoom.onzoom=undefined] Set callback that is called when the chart is zooming.<br>
49102 * Specified function receives the zoomed domain.
49103 * @property {Function} [zoom.onzoomend=undefined] Set callback that is called when zooming ends.<br>
49104 * Specified function receives the zoomed domain.
49105 * @property {boolean|object} [zoom.resetButton=true] Set to display zoom reset button for 'drag' type zoom
49106 * @property {Function} [zoom.resetButton.onclick] Set callback when clicks the reset button. The callback will receive reset button element reference as argument.
49107 * @property {string} [zoom.resetButton.text='Reset Zoom'] Text value for zoom reset button.
49108 * @see [Demo:zoom](https://naver.github.io/billboard.js/demo/#Interaction.Zoom)
49109 * @see [Demo:drag zoom](https://naver.github.io/billboard.js/demo/#Interaction.DragZoom)
49110 * @example
49111 * zoom: {
49112 * enabled: true,
49113 * type: "drag",
49114 * rescale: true,
49115 * extent: [1, 100] // enable more zooming
49116 * x: {
49117 * min: -1, // set min range
49118 * max: 10 // set max range
49119 * },
49120 * onzoomstart: function(event) { ... },
49121 * onzoom: function(domain) { ... },
49122 * onzoomend: function(domain) { ... },
49123 *
49124 * // show reset button when is zoomed-in
49125 * resetButton: true,
49126 *
49127 * resetButton: {
49128 * // onclick callback when reset button is clicked
49129 * onclick: function(button) {
49130 * button; // Reset button element reference
49131 * ...
49132 * },
49133 *
49134 * // customized text value for reset zoom button
49135 * text: "Unzoom"
49136 * }
49137 * }
49138 * @example
49139 * // importing ESM
49140 * import bb, {zoom} from "billboard.js";
49141 *
49142 * zoom: {
49143 * enabled: zoom(),
49144 * ...
49145 * }
49146 */
49147 zoom_enabled: !1,
49148 zoom_type: "wheel",
49149 zoom_extent: undefined,
49150 zoom_privileged: !1,
49151 zoom_rescale: !1,
49152 zoom_onzoom: undefined,
49153 zoom_onzoomstart: undefined,
49154 zoom_onzoomend: undefined,
49155 zoom_resetButton: !0,
49156 zoom_x_min: undefined,
49157 zoom_x_max: undefined
49158});
49159;// CONCATENATED MODULE: ./src/config/resolver/interaction.ts
49160
49161var interaction_this = undefined;
49162/**
49163 * Copyright (c) 2017 ~ present NAVER Corp.
49164 * billboard.js project is licensed under the MIT license
49165 */
49166
49167
49168
49169
49170
49171// Chart
49172
49173
49174
49175
49176// ChartInternal
49177
49178
49179
49180
49181// Axis based options
49182
49183
49184
49185
49186var _selectionModule = function selectionModule() {
49187 var _this2 = this;
49188 _newArrowCheck(this, interaction_this);
49189 util_extend(ChartInternal.prototype, internals_selection);
49190 util_extend(Chart.prototype, api_selection);
49191 Options.setOptions([data_selection]);
49192 return (_selectionModule = function () {
49193 _newArrowCheck(this, _this2);
49194 return !0;
49195 }.bind(this))();
49196 }.bind(undefined),
49197 subchartModule = function () {
49198 var _this3 = this;
49199 _newArrowCheck(this, interaction_this);
49200 util_extend(ChartInternal.prototype, interactions_subchart);
49201 util_extend(Chart.prototype, subchart);
49202 Options.setOptions([interaction_subchart]);
49203 return (subchartModule = function () {
49204 _newArrowCheck(this, _this3);
49205 return !0;
49206 }.bind(this))();
49207 }.bind(undefined),
49208 zoomModule = function () {
49209 var _this4 = this;
49210 _newArrowCheck(this, interaction_this);
49211 util_extend(ChartInternal.prototype, interactions_zoom);
49212 util_extend(Chart.prototype, api_zoom);
49213 Options.setOptions([interaction_zoom]);
49214 return (zoomModule = function () {
49215 _newArrowCheck(this, _this4);
49216 return !0;
49217 }.bind(this))();
49218 }.bind(undefined);
49219;// CONCATENATED MODULE: ./src/core.ts
49220/**
49221 * Copyright (c) 2017 ~ present NAVER Corp.
49222 * billboard project is licensed under the MIT license
49223 */
49224
49225
49226
49227// eslint-disable-next-line no-use-before-define
49228
49229var _defaults = {},
49230 bb = {
49231 /**
49232 * Version information
49233 * @property {string} version version
49234 * @example
49235 * bb.version; // "1.0.0"
49236 * @memberof bb
49237 */
49238 version: "3.6.3",
49239 /**
49240 * Generate chart
49241 * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
49242 * - Unused option value is given.
49243 * - ex) For `data.type="pie"` option, setting 'axis' option can cause unexpected generation error.
49244 * - Insufficient value is given for certain option used.
49245 * - ex) `data: { x: "x", columns: [["x"], ["data1", 30, 200, 100]] }`
49246 * @param {Options} config chart options
49247 * @memberof bb
49248 * @returns {Chart}
49249 * @see {@link Options} for different generation options
49250 * @see {@link Chart} for different methods API
49251 * @example
49252 * <!-- chart holder -->
49253 * <div id="LineChart"></div>
49254 * @example
49255 * // Generate chart with options
49256 * var chart = bb.generate({
49257 * "bindto": "#LineChart"
49258 * "data": {
49259 * "columns": [
49260 * ["data1", 30, 200, 100, 400, 150, 250],
49261 * ["data2", 50, 20, 10, 40, 15, 25]
49262 * ],
49263 * "type": "line"
49264 * }
49265 * });
49266 *
49267 * // call some API
49268 * // ex) get the data of 'data1'
49269 * chart.data("data1");
49270 * @example
49271 * // Generate chart by importing ESM
49272 * // Import types to be used only, where this will make smaller bundle size.
49273 * import bb, {
49274 * area,
49275 * areaLineRange,
49276 * areaSpline,
49277 * areaSplineRange,
49278 * areaStep,
49279 * bar,
49280 * bubble,
49281 * donut,
49282 * gauge,
49283 * line,
49284 * pie,
49285 * polar,
49286 * radar,
49287 * scatter,
49288 * spline,
49289 * step
49290 * }
49291 *
49292 * bb.generate({
49293 * "bindto": "#LineChart"
49294 * "data": {
49295 * "columns": [
49296 * ["data1", 30, 200, 100, 400, 150, 250],
49297 * ["data2", 50, 20, 10, 40, 15, 25]
49298 * ]
49299 * },
49300 * type: line(),
49301 *
49302 * // or
49303 * types: {
49304 * data1: bar(),
49305 * data2: step()
49306 * }
49307 * });
49308 */
49309 generate: function generate(config) {
49310 var options = mergeObj({}, _defaults, config),
49311 inst = new Chart(options);
49312 inst.internal.charts = this.instance;
49313 this.instance.push(inst);
49314 return inst;
49315 },
49316 /**
49317 * Set or get global default options.
49318 * - **NOTE:**
49319 * - The options values settings are valid within page context only.
49320 * - If is called multiple times, will override the last value.
49321 * @param {Options} options chart options
49322 * @memberof bb
49323 * @returns {Options}
49324 * @see {@link Options}
49325 * @example
49326 * // Set same option value as for `.generate()`
49327 * bb.defaults({
49328 * data: {
49329 * type: "bar"
49330 * }
49331 * });
49332 *
49333 * bb.defaults(); // {data:{type: "bar"}}
49334 *
49335 * // data.type defaults to 'bar'
49336 * var chart = bb.generate({ ... });
49337 */
49338 defaults: function defaults(options) {
49339 if (isObject(options)) {
49340 _defaults = options;
49341 }
49342 return _defaults;
49343 },
49344 /**
49345 * An array containing instance created
49346 * @property {Array} instance instance array
49347 * @example
49348 * // generate charts
49349 * var chart1 = bb.generate(...);
49350 * var chart2 = bb.generate(...);
49351 *
49352 * bb.instance; // [ chart1, chart2, ... ]
49353 * @memberof bb
49354 */
49355 instance: [],
49356 /**
49357 * Namespace for plugins
49358 * @property {object} plugin plugin namespace
49359 * @example
49360 * // Stanford diagram plugin
49361 * bb.plugin.stanford;
49362 * @memberof bb
49363 */
49364 plugin: {}
49365 };
49366/**
49367 * @namespace bb
49368 * @version 3.6.3
49369 */
49370;// CONCATENATED MODULE: ./src/index.ts
49371
49372var src_this = undefined;
49373/**
49374 * Copyright (c) 2017 ~ present NAVER Corp.
49375 * billboard project is licensed under the MIT license
49376 */
49377
49378
49379
49380// extends shape modules
49381Object.keys(resolver_shape_namespaceObject).forEach(function (v) {
49382 _newArrowCheck(this, src_this);
49383 return resolver_shape_namespaceObject[v]();
49384}.bind(undefined));
49385
49386// extends interaction modules
49387Object.keys(resolver_interaction_namespaceObject).forEach(function (v) {
49388 _newArrowCheck(this, src_this);
49389 return resolver_interaction_namespaceObject[v]();
49390}.bind(undefined));
49391
49392
49393/***/ }),
49394/* 503 */
49395/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
49396
49397// TODO(Babel 8): Remove this file.
49398
49399var runtime = __webpack_require__(504)();
49400module.exports = runtime;
49401
49402// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
49403try {
49404 regeneratorRuntime = runtime;
49405} catch (accidentalStrictMode) {
49406 if (typeof globalThis === "object") {
49407 globalThis.regeneratorRuntime = runtime;
49408 } else {
49409 Function("r", "regeneratorRuntime = r")(runtime);
49410 }
49411}
49412
49413
49414/***/ }),
49415/* 504 */
49416/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
49417
49418var _typeof = (__webpack_require__(505)["default"]);
49419function _regeneratorRuntime() {
49420 "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
49421 module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
49422 return exports;
49423 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
49424 var exports = {},
49425 Op = Object.prototype,
49426 hasOwn = Op.hasOwnProperty,
49427 defineProperty = Object.defineProperty || function (obj, key, desc) {
49428 obj[key] = desc.value;
49429 },
49430 $Symbol = "function" == typeof Symbol ? Symbol : {},
49431 iteratorSymbol = $Symbol.iterator || "@@iterator",
49432 asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
49433 toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
49434 function define(obj, key, value) {
49435 return Object.defineProperty(obj, key, {
49436 value: value,
49437 enumerable: !0,
49438 configurable: !0,
49439 writable: !0
49440 }), obj[key];
49441 }
49442 try {
49443 define({}, "");
49444 } catch (err) {
49445 define = function define(obj, key, value) {
49446 return obj[key] = value;
49447 };
49448 }
49449 function wrap(innerFn, outerFn, self, tryLocsList) {
49450 var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
49451 generator = Object.create(protoGenerator.prototype),
49452 context = new Context(tryLocsList || []);
49453 return defineProperty(generator, "_invoke", {
49454 value: makeInvokeMethod(innerFn, self, context)
49455 }), generator;
49456 }
49457 function tryCatch(fn, obj, arg) {
49458 try {
49459 return {
49460 type: "normal",
49461 arg: fn.call(obj, arg)
49462 };
49463 } catch (err) {
49464 return {
49465 type: "throw",
49466 arg: err
49467 };
49468 }
49469 }
49470 exports.wrap = wrap;
49471 var ContinueSentinel = {};
49472 function Generator() {}
49473 function GeneratorFunction() {}
49474 function GeneratorFunctionPrototype() {}
49475 var IteratorPrototype = {};
49476 define(IteratorPrototype, iteratorSymbol, function () {
49477 return this;
49478 });
49479 var getProto = Object.getPrototypeOf,
49480 NativeIteratorPrototype = getProto && getProto(getProto(values([])));
49481 NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
49482 var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
49483 function defineIteratorMethods(prototype) {
49484 ["next", "throw", "return"].forEach(function (method) {
49485 define(prototype, method, function (arg) {
49486 return this._invoke(method, arg);
49487 });
49488 });
49489 }
49490 function AsyncIterator(generator, PromiseImpl) {
49491 function invoke(method, arg, resolve, reject) {
49492 var record = tryCatch(generator[method], generator, arg);
49493 if ("throw" !== record.type) {
49494 var result = record.arg,
49495 value = result.value;
49496 return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
49497 invoke("next", value, resolve, reject);
49498 }, function (err) {
49499 invoke("throw", err, resolve, reject);
49500 }) : PromiseImpl.resolve(value).then(function (unwrapped) {
49501 result.value = unwrapped, resolve(result);
49502 }, function (error) {
49503 return invoke("throw", error, resolve, reject);
49504 });
49505 }
49506 reject(record.arg);
49507 }
49508 var previousPromise;
49509 defineProperty(this, "_invoke", {
49510 value: function value(method, arg) {
49511 function callInvokeWithMethodAndArg() {
49512 return new PromiseImpl(function (resolve, reject) {
49513 invoke(method, arg, resolve, reject);
49514 });
49515 }
49516 return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
49517 }
49518 });
49519 }
49520 function makeInvokeMethod(innerFn, self, context) {
49521 var state = "suspendedStart";
49522 return function (method, arg) {
49523 if ("executing" === state) throw new Error("Generator is already running");
49524 if ("completed" === state) {
49525 if ("throw" === method) throw arg;
49526 return doneResult();
49527 }
49528 for (context.method = method, context.arg = arg;;) {
49529 var delegate = context.delegate;
49530 if (delegate) {
49531 var delegateResult = maybeInvokeDelegate(delegate, context);
49532 if (delegateResult) {
49533 if (delegateResult === ContinueSentinel) continue;
49534 return delegateResult;
49535 }
49536 }
49537 if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
49538 if ("suspendedStart" === state) throw state = "completed", context.arg;
49539 context.dispatchException(context.arg);
49540 } else "return" === context.method && context.abrupt("return", context.arg);
49541 state = "executing";
49542 var record = tryCatch(innerFn, self, context);
49543 if ("normal" === record.type) {
49544 if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
49545 return {
49546 value: record.arg,
49547 done: context.done
49548 };
49549 }
49550 "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
49551 }
49552 };
49553 }
49554 function maybeInvokeDelegate(delegate, context) {
49555 var method = delegate.iterator[context.method];
49556 if (undefined === method) {
49557 if (context.delegate = null, "throw" === context.method) {
49558 if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
49559 context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
49560 }
49561 return ContinueSentinel;
49562 }
49563 var record = tryCatch(method, delegate.iterator, context.arg);
49564 if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
49565 var info = record.arg;
49566 return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
49567 }
49568 function pushTryEntry(locs) {
49569 var entry = {
49570 tryLoc: locs[0]
49571 };
49572 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
49573 }
49574 function resetTryEntry(entry) {
49575 var record = entry.completion || {};
49576 record.type = "normal", delete record.arg, entry.completion = record;
49577 }
49578 function Context(tryLocsList) {
49579 this.tryEntries = [{
49580 tryLoc: "root"
49581 }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
49582 }
49583 function values(iterable) {
49584 if (iterable) {
49585 var iteratorMethod = iterable[iteratorSymbol];
49586 if (iteratorMethod) return iteratorMethod.call(iterable);
49587 if ("function" == typeof iterable.next) return iterable;
49588 if (!isNaN(iterable.length)) {
49589 var i = -1,
49590 next = function next() {
49591 for (; ++i < iterable.length;) {
49592 if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
49593 }
49594 return next.value = undefined, next.done = !0, next;
49595 };
49596 return next.next = next;
49597 }
49598 }
49599 return {
49600 next: doneResult
49601 };
49602 }
49603 function doneResult() {
49604 return {
49605 value: undefined,
49606 done: !0
49607 };
49608 }
49609 return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
49610 value: GeneratorFunctionPrototype,
49611 configurable: !0
49612 }), defineProperty(GeneratorFunctionPrototype, "constructor", {
49613 value: GeneratorFunction,
49614 configurable: !0
49615 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
49616 var ctor = "function" == typeof genFun && genFun.constructor;
49617 return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
49618 }, exports.mark = function (genFun) {
49619 return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
49620 }, exports.awrap = function (arg) {
49621 return {
49622 __await: arg
49623 };
49624 }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
49625 return this;
49626 }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
49627 void 0 === PromiseImpl && (PromiseImpl = Promise);
49628 var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
49629 return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
49630 return result.done ? result.value : iter.next();
49631 });
49632 }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
49633 return this;
49634 }), define(Gp, "toString", function () {
49635 return "[object Generator]";
49636 }), exports.keys = function (val) {
49637 var object = Object(val),
49638 keys = [];
49639 for (var key in object) {
49640 keys.push(key);
49641 }
49642 return keys.reverse(), function next() {
49643 for (; keys.length;) {
49644 var key = keys.pop();
49645 if (key in object) return next.value = key, next.done = !1, next;
49646 }
49647 return next.done = !0, next;
49648 };
49649 }, exports.values = values, Context.prototype = {
49650 constructor: Context,
49651 reset: function reset(skipTempReset) {
49652 if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
49653 "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
49654 }
49655 },
49656 stop: function stop() {
49657 this.done = !0;
49658 var rootRecord = this.tryEntries[0].completion;
49659 if ("throw" === rootRecord.type) throw rootRecord.arg;
49660 return this.rval;
49661 },
49662 dispatchException: function dispatchException(exception) {
49663 if (this.done) throw exception;
49664 var context = this;
49665 function handle(loc, caught) {
49666 return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
49667 }
49668 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
49669 var entry = this.tryEntries[i],
49670 record = entry.completion;
49671 if ("root" === entry.tryLoc) return handle("end");
49672 if (entry.tryLoc <= this.prev) {
49673 var hasCatch = hasOwn.call(entry, "catchLoc"),
49674 hasFinally = hasOwn.call(entry, "finallyLoc");
49675 if (hasCatch && hasFinally) {
49676 if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
49677 if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
49678 } else if (hasCatch) {
49679 if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
49680 } else {
49681 if (!hasFinally) throw new Error("try statement without catch or finally");
49682 if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
49683 }
49684 }
49685 }
49686 },
49687 abrupt: function abrupt(type, arg) {
49688 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
49689 var entry = this.tryEntries[i];
49690 if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
49691 var finallyEntry = entry;
49692 break;
49693 }
49694 }
49695 finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
49696 var record = finallyEntry ? finallyEntry.completion : {};
49697 return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
49698 },
49699 complete: function complete(record, afterLoc) {
49700 if ("throw" === record.type) throw record.arg;
49701 return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
49702 },
49703 finish: function finish(finallyLoc) {
49704 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
49705 var entry = this.tryEntries[i];
49706 if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
49707 }
49708 },
49709 "catch": function _catch(tryLoc) {
49710 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
49711 var entry = this.tryEntries[i];
49712 if (entry.tryLoc === tryLoc) {
49713 var record = entry.completion;
49714 if ("throw" === record.type) {
49715 var thrown = record.arg;
49716 resetTryEntry(entry);
49717 }
49718 return thrown;
49719 }
49720 }
49721 throw new Error("illegal catch attempt");
49722 },
49723 delegateYield: function delegateYield(iterable, resultName, nextLoc) {
49724 return this.delegate = {
49725 iterator: values(iterable),
49726 resultName: resultName,
49727 nextLoc: nextLoc
49728 }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
49729 }
49730 }, exports;
49731}
49732module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
49733
49734/***/ }),
49735/* 505 */
49736/***/ (function(module) {
49737
49738function _typeof(obj) {
49739 "@babel/helpers - typeof";
49740
49741 return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
49742 return typeof obj;
49743 } : function (obj) {
49744 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
49745 }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
49746}
49747module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
49748
49749/***/ })
49750/******/ ]);
49751/************************************************************************/
49752/******/ // The module cache
49753/******/ var __webpack_module_cache__ = {};
49754/******/
49755/******/ // The require function
49756/******/ function __webpack_require__(moduleId) {
49757/******/ // Check if module is in cache
49758/******/ var cachedModule = __webpack_module_cache__[moduleId];
49759/******/ if (cachedModule !== undefined) {
49760/******/ return cachedModule.exports;
49761/******/ }
49762/******/ // Create a new module (and put it into the cache)
49763/******/ var module = __webpack_module_cache__[moduleId] = {
49764/******/ // no module.id needed
49765/******/ // no module.loaded needed
49766/******/ exports: {}
49767/******/ };
49768/******/
49769/******/ // Execute the module function
49770/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
49771/******/
49772/******/ // Return the exports of the module
49773/******/ return module.exports;
49774/******/ }
49775/******/
49776/************************************************************************/
49777/******/ /* webpack/runtime/define property getters */
49778/******/ !function() {
49779/******/ // define getter functions for harmony exports
49780/******/ __webpack_require__.d = function(exports, definition) {
49781/******/ for(var key in definition) {
49782/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
49783/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
49784/******/ }
49785/******/ }
49786/******/ };
49787/******/ }();
49788/******/
49789/******/ /* webpack/runtime/hasOwnProperty shorthand */
49790/******/ !function() {
49791/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
49792/******/ }();
49793/******/
49794/******/ /* webpack/runtime/make namespace object */
49795/******/ !function() {
49796/******/ // define __esModule on exports
49797/******/ __webpack_require__.r = function(exports) {
49798/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
49799/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
49800/******/ }
49801/******/ Object.defineProperty(exports, '__esModule', { value: true });
49802/******/ };
49803/******/ }();
49804/******/
49805/************************************************************************/
49806/******/
49807/******/ // startup
49808/******/ // Load entry module and return exports
49809/******/ // This entry module used 'module' so it can't be inlined
49810/******/ __webpack_require__(0);
49811/******/ var __webpack_exports__ = __webpack_require__(502);
49812/******/
49813/******/ return __webpack_exports__;
49814/******/ })()
49815;
49816});
\No newline at end of file