bk-magic-vue 2.3.2-beta.4 → 2.3.2-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/bk-magic-vue.css +4 -4
  2. package/dist/bk-magic-vue.js +1507 -2471
  3. package/dist/bk-magic-vue.min.css +1 -1
  4. package/dist/bk-magic-vue.min.css.gz +0 -0
  5. package/dist/bk-magic-vue.min.css.map +1 -1
  6. package/dist/bk-magic-vue.min.js +1 -1
  7. package/dist/bk-magic-vue.min.js.gz +0 -0
  8. package/dist/bk-magic-vue.min.js.map +1 -1
  9. package/lib/alert.js +5 -11
  10. package/lib/animate-number.js +2 -9
  11. package/lib/badge.js +7 -25
  12. package/lib/big-tree.js +2549 -2788
  13. package/lib/breadcrumb-item.js +3 -10
  14. package/lib/breadcrumb.js +1 -9
  15. package/lib/button.js +1 -9
  16. package/lib/card.js +41 -70
  17. package/lib/cascade.js +442 -698
  18. package/lib/checkbox-group.js +2 -16
  19. package/lib/checkbox.js +972 -1179
  20. package/lib/col.js +9 -17
  21. package/lib/collapse-item.js +1 -10
  22. package/lib/collapse.js +1 -9
  23. package/lib/color-picker.js +38 -96
  24. package/lib/compose-form-item.js +1 -4
  25. package/lib/container.js +3 -11
  26. package/lib/date-picker.js +202 -330
  27. package/lib/dialog.js +2572 -2782
  28. package/lib/diff.js +2 -10
  29. package/lib/directives/clickoutside.js +2 -2
  30. package/lib/directives/overflow-tips.js +57 -73
  31. package/lib/directives/tooltips.js +65 -79
  32. package/lib/directives/transfer-dom.js +1 -4
  33. package/lib/divider.js +1 -9
  34. package/lib/dropdown-menu.js +7 -17
  35. package/lib/exception.js +5 -14
  36. package/lib/fixed-navbar.js +2 -13
  37. package/lib/form-item.js +253 -483
  38. package/lib/form.js +5 -22
  39. package/lib/icon.js +4 -5
  40. package/lib/image-viewer.js +22 -35
  41. package/lib/image.js +45 -72
  42. package/lib/info-box.js +2701 -2918
  43. package/lib/input.js +10 -33
  44. package/lib/link.js +1 -9
  45. package/lib/loading.js +9 -21
  46. package/lib/locale/index.js +5 -11
  47. package/lib/message.js +10 -22
  48. package/lib/navigation-menu-group.js +0 -4
  49. package/lib/navigation-menu-item.js +6 -19
  50. package/lib/navigation-menu.js +1046 -1252
  51. package/lib/navigation.js +34 -39
  52. package/lib/notify.js +20 -34
  53. package/lib/option-group.js +5 -10
  54. package/lib/option.js +15 -20
  55. package/lib/pagination.js +6706 -7013
  56. package/lib/popconfirm.js +66 -83
  57. package/lib/popover.js +55 -66
  58. package/lib/process.js +2 -17
  59. package/lib/progress.js +4 -10
  60. package/lib/radio-button.js +6 -13
  61. package/lib/radio-group.js +2 -9
  62. package/lib/radio.js +6 -13
  63. package/lib/rate.js +5 -21
  64. package/lib/resize-layout.js +11 -20
  65. package/lib/round-progress.js +1 -9
  66. package/lib/row.js +5 -18
  67. package/lib/search-select.js +409 -635
  68. package/lib/select.js +5989 -6261
  69. package/lib/sideslider.js +1560 -1769
  70. package/lib/slider.js +78 -127
  71. package/lib/star.js +3 -11
  72. package/lib/steps.js +1754 -1961
  73. package/lib/swiper.js +20 -33
  74. package/lib/switcher.js +3 -12
  75. package/lib/tab-panel.js +2 -9
  76. package/lib/tab.js +2330 -2536
  77. package/lib/table-column.js +328 -547
  78. package/lib/table-setting-content.js +321 -558
  79. package/lib/table.js +566 -917
  80. package/lib/tag-input.js +397 -649
  81. package/lib/tag.js +2 -10
  82. package/lib/time-picker.js +144 -219
  83. package/lib/timeline.js +23 -35
  84. package/lib/transfer.js +111 -161
  85. package/lib/transition.js +1 -9
  86. package/lib/tree.js +31 -75
  87. package/lib/ui/bk-magic-vue.css +4 -4
  88. package/lib/ui/bk-magic-vue.min.css +1 -1
  89. package/lib/ui/bk-magic-vue.min.css.gz +0 -0
  90. package/lib/ui/bk-magic-vue.min.css.map +1 -1
  91. package/lib/ui/button.css +1 -1
  92. package/lib/ui/button.min.css +1 -1
  93. package/lib/ui/button.min.css.map +1 -1
  94. package/lib/ui/dialog.css +2 -2
  95. package/lib/ui/dialog.min.css +1 -1
  96. package/lib/ui/dialog.min.css.map +1 -1
  97. package/lib/ui/info-box.css +2 -2
  98. package/lib/ui/info-box.min.css +1 -1
  99. package/lib/ui/info-box.min.css.map +1 -1
  100. package/lib/ui/popconfirm.css +1 -1
  101. package/lib/ui/popconfirm.min.css +1 -1
  102. package/lib/ui/popconfirm.min.css.map +1 -1
  103. package/lib/upload.js +63 -87
  104. package/lib/utils/deepmerge.js +5 -11
  105. package/lib/utils/pinyin.js +5 -11
  106. package/lib/utils/pop-manager.js +2 -2
  107. package/lib/utils/tippy.js +48 -49
  108. package/lib/version-detail.js +5854 -6081
  109. package/lib/virtual-scroll.js +17 -23
  110. package/lib/zoom-image.js +3 -11
  111. package/package.json +1 -1
package/lib/tab.js CHANGED
@@ -1,2541 +1,2335 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global.library = {}));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+ (global = global || self, factory(global.library = {}));
5
5
  }(this, function (exports) { 'use strict';
6
6
 
7
- function createCommonjsModule(fn, module) {
8
- return module = { exports: {} }, fn(module, module.exports), module.exports;
9
- }
10
-
11
- var runtime_1 = createCommonjsModule(function (module) {
12
- var runtime = (function (exports) {
13
- var Op = Object.prototype;
14
- var hasOwn = Op.hasOwnProperty;
15
- var undefined$1;
16
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
17
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
18
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
19
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
20
- function define(obj, key, value) {
21
- Object.defineProperty(obj, key, {
22
- value: value,
23
- enumerable: true,
24
- configurable: true,
25
- writable: true
26
- });
27
- return obj[key];
28
- }
29
- try {
30
- define({}, "");
31
- } catch (err) {
32
- define = function(obj, key, value) {
33
- return obj[key] = value;
34
- };
35
- }
36
- function wrap(innerFn, outerFn, self, tryLocsList) {
37
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
38
- var generator = Object.create(protoGenerator.prototype);
39
- var context = new Context(tryLocsList || []);
40
- generator._invoke = makeInvokeMethod(innerFn, self, context);
41
- return generator;
42
- }
43
- exports.wrap = wrap;
44
- function tryCatch(fn, obj, arg) {
45
- try {
46
- return { type: "normal", arg: fn.call(obj, arg) };
47
- } catch (err) {
48
- return { type: "throw", arg: err };
49
- }
50
- }
51
- var GenStateSuspendedStart = "suspendedStart";
52
- var GenStateSuspendedYield = "suspendedYield";
53
- var GenStateExecuting = "executing";
54
- var GenStateCompleted = "completed";
55
- var ContinueSentinel = {};
56
- function Generator() {}
57
- function GeneratorFunction() {}
58
- function GeneratorFunctionPrototype() {}
59
- var IteratorPrototype = {};
60
- IteratorPrototype[iteratorSymbol] = function () {
61
- return this;
62
- };
63
- var getProto = Object.getPrototypeOf;
64
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
65
- if (NativeIteratorPrototype &&
66
- NativeIteratorPrototype !== Op &&
67
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
68
- IteratorPrototype = NativeIteratorPrototype;
69
- }
70
- var Gp = GeneratorFunctionPrototype.prototype =
71
- Generator.prototype = Object.create(IteratorPrototype);
72
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
73
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
74
- GeneratorFunction.displayName = define(
75
- GeneratorFunctionPrototype,
76
- toStringTagSymbol,
77
- "GeneratorFunction"
78
- );
79
- function defineIteratorMethods(prototype) {
80
- ["next", "throw", "return"].forEach(function(method) {
81
- define(prototype, method, function(arg) {
82
- return this._invoke(method, arg);
83
- });
84
- });
85
- }
86
- exports.isGeneratorFunction = function(genFun) {
87
- var ctor = typeof genFun === "function" && genFun.constructor;
88
- return ctor
89
- ? ctor === GeneratorFunction ||
90
- (ctor.displayName || ctor.name) === "GeneratorFunction"
91
- : false;
92
- };
93
- exports.mark = function(genFun) {
94
- if (Object.setPrototypeOf) {
95
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
96
- } else {
97
- genFun.__proto__ = GeneratorFunctionPrototype;
98
- define(genFun, toStringTagSymbol, "GeneratorFunction");
99
- }
100
- genFun.prototype = Object.create(Gp);
101
- return genFun;
102
- };
103
- exports.awrap = function(arg) {
104
- return { __await: arg };
105
- };
106
- function AsyncIterator(generator, PromiseImpl) {
107
- function invoke(method, arg, resolve, reject) {
108
- var record = tryCatch(generator[method], generator, arg);
109
- if (record.type === "throw") {
110
- reject(record.arg);
111
- } else {
112
- var result = record.arg;
113
- var value = result.value;
114
- if (value &&
115
- typeof value === "object" &&
116
- hasOwn.call(value, "__await")) {
117
- return PromiseImpl.resolve(value.__await).then(function(value) {
118
- invoke("next", value, resolve, reject);
119
- }, function(err) {
120
- invoke("throw", err, resolve, reject);
121
- });
122
- }
123
- return PromiseImpl.resolve(value).then(function(unwrapped) {
124
- result.value = unwrapped;
125
- resolve(result);
126
- }, function(error) {
127
- return invoke("throw", error, resolve, reject);
128
- });
129
- }
130
- }
131
- var previousPromise;
132
- function enqueue(method, arg) {
133
- function callInvokeWithMethodAndArg() {
134
- return new PromiseImpl(function(resolve, reject) {
135
- invoke(method, arg, resolve, reject);
136
- });
137
- }
138
- return previousPromise =
139
- previousPromise ? previousPromise.then(
140
- callInvokeWithMethodAndArg,
141
- callInvokeWithMethodAndArg
142
- ) : callInvokeWithMethodAndArg();
143
- }
144
- this._invoke = enqueue;
145
- }
146
- defineIteratorMethods(AsyncIterator.prototype);
147
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
148
- return this;
149
- };
150
- exports.AsyncIterator = AsyncIterator;
151
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
152
- if (PromiseImpl === void 0) PromiseImpl = Promise;
153
- var iter = new AsyncIterator(
154
- wrap(innerFn, outerFn, self, tryLocsList),
155
- PromiseImpl
156
- );
157
- return exports.isGeneratorFunction(outerFn)
158
- ? iter
159
- : iter.next().then(function(result) {
160
- return result.done ? result.value : iter.next();
161
- });
162
- };
163
- function makeInvokeMethod(innerFn, self, context) {
164
- var state = GenStateSuspendedStart;
165
- return function invoke(method, arg) {
166
- if (state === GenStateExecuting) {
167
- throw new Error("Generator is already running");
168
- }
169
- if (state === GenStateCompleted) {
170
- if (method === "throw") {
171
- throw arg;
172
- }
173
- return doneResult();
174
- }
175
- context.method = method;
176
- context.arg = arg;
177
- while (true) {
178
- var delegate = context.delegate;
179
- if (delegate) {
180
- var delegateResult = maybeInvokeDelegate(delegate, context);
181
- if (delegateResult) {
182
- if (delegateResult === ContinueSentinel) continue;
183
- return delegateResult;
184
- }
185
- }
186
- if (context.method === "next") {
187
- context.sent = context._sent = context.arg;
188
- } else if (context.method === "throw") {
189
- if (state === GenStateSuspendedStart) {
190
- state = GenStateCompleted;
191
- throw context.arg;
192
- }
193
- context.dispatchException(context.arg);
194
- } else if (context.method === "return") {
195
- context.abrupt("return", context.arg);
196
- }
197
- state = GenStateExecuting;
198
- var record = tryCatch(innerFn, self, context);
199
- if (record.type === "normal") {
200
- state = context.done
201
- ? GenStateCompleted
202
- : GenStateSuspendedYield;
203
- if (record.arg === ContinueSentinel) {
204
- continue;
205
- }
206
- return {
207
- value: record.arg,
208
- done: context.done
209
- };
210
- } else if (record.type === "throw") {
211
- state = GenStateCompleted;
212
- context.method = "throw";
213
- context.arg = record.arg;
214
- }
215
- }
216
- };
217
- }
218
- function maybeInvokeDelegate(delegate, context) {
219
- var method = delegate.iterator[context.method];
220
- if (method === undefined$1) {
221
- context.delegate = null;
222
- if (context.method === "throw") {
223
- if (delegate.iterator["return"]) {
224
- context.method = "return";
225
- context.arg = undefined$1;
226
- maybeInvokeDelegate(delegate, context);
227
- if (context.method === "throw") {
228
- return ContinueSentinel;
229
- }
230
- }
231
- context.method = "throw";
232
- context.arg = new TypeError(
233
- "The iterator does not provide a 'throw' method");
234
- }
235
- return ContinueSentinel;
236
- }
237
- var record = tryCatch(method, delegate.iterator, context.arg);
238
- if (record.type === "throw") {
239
- context.method = "throw";
240
- context.arg = record.arg;
241
- context.delegate = null;
242
- return ContinueSentinel;
243
- }
244
- var info = record.arg;
245
- if (! info) {
246
- context.method = "throw";
247
- context.arg = new TypeError("iterator result is not an object");
248
- context.delegate = null;
249
- return ContinueSentinel;
250
- }
251
- if (info.done) {
252
- context[delegate.resultName] = info.value;
253
- context.next = delegate.nextLoc;
254
- if (context.method !== "return") {
255
- context.method = "next";
256
- context.arg = undefined$1;
257
- }
258
- } else {
259
- return info;
260
- }
261
- context.delegate = null;
262
- return ContinueSentinel;
263
- }
264
- defineIteratorMethods(Gp);
265
- define(Gp, toStringTagSymbol, "Generator");
266
- Gp[iteratorSymbol] = function() {
267
- return this;
268
- };
269
- Gp.toString = function() {
270
- return "[object Generator]";
271
- };
272
- function pushTryEntry(locs) {
273
- var entry = { tryLoc: locs[0] };
274
- if (1 in locs) {
275
- entry.catchLoc = locs[1];
276
- }
277
- if (2 in locs) {
278
- entry.finallyLoc = locs[2];
279
- entry.afterLoc = locs[3];
280
- }
281
- this.tryEntries.push(entry);
282
- }
283
- function resetTryEntry(entry) {
284
- var record = entry.completion || {};
285
- record.type = "normal";
286
- delete record.arg;
287
- entry.completion = record;
288
- }
289
- function Context(tryLocsList) {
290
- this.tryEntries = [{ tryLoc: "root" }];
291
- tryLocsList.forEach(pushTryEntry, this);
292
- this.reset(true);
293
- }
294
- exports.keys = function(object) {
295
- var keys = [];
296
- for (var key in object) {
297
- keys.push(key);
298
- }
299
- keys.reverse();
300
- return function next() {
301
- while (keys.length) {
302
- var key = keys.pop();
303
- if (key in object) {
304
- next.value = key;
305
- next.done = false;
306
- return next;
307
- }
308
- }
309
- next.done = true;
310
- return next;
311
- };
312
- };
313
- function values(iterable) {
314
- if (iterable) {
315
- var iteratorMethod = iterable[iteratorSymbol];
316
- if (iteratorMethod) {
317
- return iteratorMethod.call(iterable);
318
- }
319
- if (typeof iterable.next === "function") {
320
- return iterable;
321
- }
322
- if (!isNaN(iterable.length)) {
323
- var i = -1, next = function next() {
324
- while (++i < iterable.length) {
325
- if (hasOwn.call(iterable, i)) {
326
- next.value = iterable[i];
327
- next.done = false;
328
- return next;
329
- }
330
- }
331
- next.value = undefined$1;
332
- next.done = true;
333
- return next;
334
- };
335
- return next.next = next;
336
- }
337
- }
338
- return { next: doneResult };
339
- }
340
- exports.values = values;
341
- function doneResult() {
342
- return { value: undefined$1, done: true };
343
- }
344
- Context.prototype = {
345
- constructor: Context,
346
- reset: function(skipTempReset) {
347
- this.prev = 0;
348
- this.next = 0;
349
- this.sent = this._sent = undefined$1;
350
- this.done = false;
351
- this.delegate = null;
352
- this.method = "next";
353
- this.arg = undefined$1;
354
- this.tryEntries.forEach(resetTryEntry);
355
- if (!skipTempReset) {
356
- for (var name in this) {
357
- if (name.charAt(0) === "t" &&
358
- hasOwn.call(this, name) &&
359
- !isNaN(+name.slice(1))) {
360
- this[name] = undefined$1;
361
- }
362
- }
363
- }
364
- },
365
- stop: function() {
366
- this.done = true;
367
- var rootEntry = this.tryEntries[0];
368
- var rootRecord = rootEntry.completion;
369
- if (rootRecord.type === "throw") {
370
- throw rootRecord.arg;
371
- }
372
- return this.rval;
373
- },
374
- dispatchException: function(exception) {
375
- if (this.done) {
376
- throw exception;
377
- }
378
- var context = this;
379
- function handle(loc, caught) {
380
- record.type = "throw";
381
- record.arg = exception;
382
- context.next = loc;
383
- if (caught) {
384
- context.method = "next";
385
- context.arg = undefined$1;
386
- }
387
- return !! caught;
388
- }
389
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
390
- var entry = this.tryEntries[i];
391
- var record = entry.completion;
392
- if (entry.tryLoc === "root") {
393
- return handle("end");
394
- }
395
- if (entry.tryLoc <= this.prev) {
396
- var hasCatch = hasOwn.call(entry, "catchLoc");
397
- var hasFinally = hasOwn.call(entry, "finallyLoc");
398
- if (hasCatch && hasFinally) {
399
- if (this.prev < entry.catchLoc) {
400
- return handle(entry.catchLoc, true);
401
- } else if (this.prev < entry.finallyLoc) {
402
- return handle(entry.finallyLoc);
403
- }
404
- } else if (hasCatch) {
405
- if (this.prev < entry.catchLoc) {
406
- return handle(entry.catchLoc, true);
407
- }
408
- } else if (hasFinally) {
409
- if (this.prev < entry.finallyLoc) {
410
- return handle(entry.finallyLoc);
411
- }
412
- } else {
413
- throw new Error("try statement without catch or finally");
414
- }
415
- }
416
- }
417
- },
418
- abrupt: function(type, arg) {
419
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
420
- var entry = this.tryEntries[i];
421
- if (entry.tryLoc <= this.prev &&
422
- hasOwn.call(entry, "finallyLoc") &&
423
- this.prev < entry.finallyLoc) {
424
- var finallyEntry = entry;
425
- break;
426
- }
427
- }
428
- if (finallyEntry &&
429
- (type === "break" ||
430
- type === "continue") &&
431
- finallyEntry.tryLoc <= arg &&
432
- arg <= finallyEntry.finallyLoc) {
433
- finallyEntry = null;
434
- }
435
- var record = finallyEntry ? finallyEntry.completion : {};
436
- record.type = type;
437
- record.arg = arg;
438
- if (finallyEntry) {
439
- this.method = "next";
440
- this.next = finallyEntry.finallyLoc;
441
- return ContinueSentinel;
442
- }
443
- return this.complete(record);
444
- },
445
- complete: function(record, afterLoc) {
446
- if (record.type === "throw") {
447
- throw record.arg;
448
- }
449
- if (record.type === "break" ||
450
- record.type === "continue") {
451
- this.next = record.arg;
452
- } else if (record.type === "return") {
453
- this.rval = this.arg = record.arg;
454
- this.method = "return";
455
- this.next = "end";
456
- } else if (record.type === "normal" && afterLoc) {
457
- this.next = afterLoc;
458
- }
459
- return ContinueSentinel;
460
- },
461
- finish: function(finallyLoc) {
462
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
463
- var entry = this.tryEntries[i];
464
- if (entry.finallyLoc === finallyLoc) {
465
- this.complete(entry.completion, entry.afterLoc);
466
- resetTryEntry(entry);
467
- return ContinueSentinel;
468
- }
469
- }
470
- },
471
- "catch": function(tryLoc) {
472
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
473
- var entry = this.tryEntries[i];
474
- if (entry.tryLoc === tryLoc) {
475
- var record = entry.completion;
476
- if (record.type === "throw") {
477
- var thrown = record.arg;
478
- resetTryEntry(entry);
479
- }
480
- return thrown;
481
- }
482
- }
483
- throw new Error("illegal catch attempt");
484
- },
485
- delegateYield: function(iterable, resultName, nextLoc) {
486
- this.delegate = {
487
- iterator: values(iterable),
488
- resultName: resultName,
489
- nextLoc: nextLoc
490
- };
491
- if (this.method === "next") {
492
- this.arg = undefined$1;
493
- }
494
- return ContinueSentinel;
495
- }
496
- };
497
- return exports;
498
- }(
499
- module.exports
500
- ));
501
- try {
502
- regeneratorRuntime = runtime;
503
- } catch (accidentalStrictMode) {
504
- Function("r", "regeneratorRuntime = r")(runtime);
505
- }
506
- });
507
-
508
- var regenerator = runtime_1;
509
-
510
- var ceil = Math.ceil;
511
- var floor = Math.floor;
512
- var _toInteger = function (it) {
513
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
514
- };
515
-
516
- var _defined = function (it) {
517
- if (it == undefined) throw TypeError("Can't call method on " + it);
518
- return it;
519
- };
520
-
521
- var _stringAt = function (TO_STRING) {
522
- return function (that, pos) {
523
- var s = String(_defined(that));
524
- var i = _toInteger(pos);
525
- var l = s.length;
526
- var a, b;
527
- if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
528
- a = s.charCodeAt(i);
529
- return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
530
- ? TO_STRING ? s.charAt(i) : a
531
- : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
532
- };
533
- };
534
-
535
- var _library = true;
536
-
537
- var _global = createCommonjsModule(function (module) {
538
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
539
- ? window : typeof self != 'undefined' && self.Math == Math ? self
540
- : Function('return this')();
541
- if (typeof __g == 'number') __g = global;
542
- });
543
-
544
- var _core = createCommonjsModule(function (module) {
545
- var core = module.exports = { version: '2.6.12' };
546
- if (typeof __e == 'number') __e = core;
547
- });
548
- var _core_1 = _core.version;
549
-
550
- var _aFunction = function (it) {
551
- if (typeof it != 'function') throw TypeError(it + ' is not a function!');
552
- return it;
553
- };
554
-
555
- var _ctx = function (fn, that, length) {
556
- _aFunction(fn);
557
- if (that === undefined) return fn;
558
- switch (length) {
559
- case 1: return function (a) {
560
- return fn.call(that, a);
561
- };
562
- case 2: return function (a, b) {
563
- return fn.call(that, a, b);
564
- };
565
- case 3: return function (a, b, c) {
566
- return fn.call(that, a, b, c);
567
- };
568
- }
569
- return function () {
570
- return fn.apply(that, arguments);
571
- };
572
- };
573
-
574
- var _isObject = function (it) {
575
- return typeof it === 'object' ? it !== null : typeof it === 'function';
576
- };
577
-
578
- var _anObject = function (it) {
579
- if (!_isObject(it)) throw TypeError(it + ' is not an object!');
580
- return it;
581
- };
582
-
583
- var _fails = function (exec) {
584
- try {
585
- return !!exec();
586
- } catch (e) {
587
- return true;
588
- }
589
- };
590
-
591
- var _descriptors = !_fails(function () {
592
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
593
- });
594
-
595
- var document$1 = _global.document;
596
- var is = _isObject(document$1) && _isObject(document$1.createElement);
597
- var _domCreate = function (it) {
598
- return is ? document$1.createElement(it) : {};
599
- };
600
-
601
- var _ie8DomDefine = !_descriptors && !_fails(function () {
602
- return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7;
603
- });
604
-
605
- var _toPrimitive = function (it, S) {
606
- if (!_isObject(it)) return it;
607
- var fn, val;
608
- if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
609
- if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;
610
- if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
611
- throw TypeError("Can't convert object to primitive value");
612
- };
613
-
614
- var dP = Object.defineProperty;
615
- var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
616
- _anObject(O);
617
- P = _toPrimitive(P, true);
618
- _anObject(Attributes);
619
- if (_ie8DomDefine) try {
620
- return dP(O, P, Attributes);
621
- } catch (e) { }
622
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
623
- if ('value' in Attributes) O[P] = Attributes.value;
624
- return O;
625
- };
626
- var _objectDp = {
627
- f: f
628
- };
629
-
630
- var _propertyDesc = function (bitmap, value) {
631
- return {
632
- enumerable: !(bitmap & 1),
633
- configurable: !(bitmap & 2),
634
- writable: !(bitmap & 4),
635
- value: value
636
- };
637
- };
638
-
639
- var _hide = _descriptors ? function (object, key, value) {
640
- return _objectDp.f(object, key, _propertyDesc(1, value));
641
- } : function (object, key, value) {
642
- object[key] = value;
643
- return object;
644
- };
645
-
646
- var hasOwnProperty = {}.hasOwnProperty;
647
- var _has = function (it, key) {
648
- return hasOwnProperty.call(it, key);
649
- };
650
-
651
- var PROTOTYPE = 'prototype';
652
- var $export = function (type, name, source) {
653
- var IS_FORCED = type & $export.F;
654
- var IS_GLOBAL = type & $export.G;
655
- var IS_STATIC = type & $export.S;
656
- var IS_PROTO = type & $export.P;
657
- var IS_BIND = type & $export.B;
658
- var IS_WRAP = type & $export.W;
659
- var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
660
- var expProto = exports[PROTOTYPE];
661
- var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE];
662
- var key, own, out;
663
- if (IS_GLOBAL) source = name;
664
- for (key in source) {
665
- own = !IS_FORCED && target && target[key] !== undefined;
666
- if (own && _has(exports, key)) continue;
667
- out = own ? target[key] : source[key];
668
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
669
- : IS_BIND && own ? _ctx(out, _global)
670
- : IS_WRAP && target[key] == out ? (function (C) {
671
- var F = function (a, b, c) {
672
- if (this instanceof C) {
673
- switch (arguments.length) {
674
- case 0: return new C();
675
- case 1: return new C(a);
676
- case 2: return new C(a, b);
677
- } return new C(a, b, c);
678
- } return C.apply(this, arguments);
679
- };
680
- F[PROTOTYPE] = C[PROTOTYPE];
681
- return F;
682
- })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out;
683
- if (IS_PROTO) {
684
- (exports.virtual || (exports.virtual = {}))[key] = out;
685
- if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out);
686
- }
687
- }
688
- };
689
- $export.F = 1;
690
- $export.G = 2;
691
- $export.S = 4;
692
- $export.P = 8;
693
- $export.B = 16;
694
- $export.W = 32;
695
- $export.U = 64;
696
- $export.R = 128;
697
- var _export = $export;
698
-
699
- var _redefine = _hide;
700
-
701
- var _iterators = {};
702
-
703
- var toString = {}.toString;
704
- var _cof = function (it) {
705
- return toString.call(it).slice(8, -1);
706
- };
707
-
708
- var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
709
- return _cof(it) == 'String' ? it.split('') : Object(it);
710
- };
711
-
712
- var _toIobject = function (it) {
713
- return _iobject(_defined(it));
714
- };
715
-
716
- var min = Math.min;
717
- var _toLength = function (it) {
718
- return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0;
719
- };
720
-
721
- var max = Math.max;
722
- var min$1 = Math.min;
723
- var _toAbsoluteIndex = function (index, length) {
724
- index = _toInteger(index);
725
- return index < 0 ? max(index + length, 0) : min$1(index, length);
726
- };
727
-
728
- var _arrayIncludes = function (IS_INCLUDES) {
729
- return function ($this, el, fromIndex) {
730
- var O = _toIobject($this);
731
- var length = _toLength(O.length);
732
- var index = _toAbsoluteIndex(fromIndex, length);
733
- var value;
734
- if (IS_INCLUDES && el != el) while (length > index) {
735
- value = O[index++];
736
- if (value != value) return true;
737
- } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
738
- if (O[index] === el) return IS_INCLUDES || index || 0;
739
- } return !IS_INCLUDES && -1;
740
- };
741
- };
742
-
743
- var _shared = createCommonjsModule(function (module) {
744
- var SHARED = '__core-js_shared__';
745
- var store = _global[SHARED] || (_global[SHARED] = {});
746
- (module.exports = function (key, value) {
747
- return store[key] || (store[key] = value !== undefined ? value : {});
748
- })('versions', []).push({
749
- version: _core.version,
750
- mode: 'pure' ,
751
- copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
752
- });
753
- });
754
-
755
- var id = 0;
756
- var px = Math.random();
757
- var _uid = function (key) {
758
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
759
- };
760
-
761
- var shared = _shared('keys');
762
- var _sharedKey = function (key) {
763
- return shared[key] || (shared[key] = _uid(key));
764
- };
765
-
766
- var arrayIndexOf = _arrayIncludes(false);
767
- var IE_PROTO = _sharedKey('IE_PROTO');
768
- var _objectKeysInternal = function (object, names) {
769
- var O = _toIobject(object);
770
- var i = 0;
771
- var result = [];
772
- var key;
773
- for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key);
774
- while (names.length > i) if (_has(O, key = names[i++])) {
775
- ~arrayIndexOf(result, key) || result.push(key);
776
- }
777
- return result;
778
- };
779
-
780
- var _enumBugKeys = (
781
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
782
- ).split(',');
783
-
784
- var _objectKeys = Object.keys || function keys(O) {
785
- return _objectKeysInternal(O, _enumBugKeys);
786
- };
787
-
788
- var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
789
- _anObject(O);
790
- var keys = _objectKeys(Properties);
791
- var length = keys.length;
792
- var i = 0;
793
- var P;
794
- while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]);
795
- return O;
796
- };
797
-
798
- var document$2 = _global.document;
799
- var _html = document$2 && document$2.documentElement;
800
-
801
- var IE_PROTO$1 = _sharedKey('IE_PROTO');
802
- var Empty = function () { };
803
- var PROTOTYPE$1 = 'prototype';
804
- var createDict = function () {
805
- var iframe = _domCreate('iframe');
806
- var i = _enumBugKeys.length;
807
- var lt = '<';
808
- var gt = '>';
809
- var iframeDocument;
810
- iframe.style.display = 'none';
811
- _html.appendChild(iframe);
812
- iframe.src = 'javascript:';
813
- iframeDocument = iframe.contentWindow.document;
814
- iframeDocument.open();
815
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
816
- iframeDocument.close();
817
- createDict = iframeDocument.F;
818
- while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]];
819
- return createDict();
820
- };
821
- var _objectCreate = Object.create || function create(O, Properties) {
822
- var result;
823
- if (O !== null) {
824
- Empty[PROTOTYPE$1] = _anObject(O);
825
- result = new Empty();
826
- Empty[PROTOTYPE$1] = null;
827
- result[IE_PROTO$1] = O;
828
- } else result = createDict();
829
- return Properties === undefined ? result : _objectDps(result, Properties);
830
- };
831
-
832
- var _wks = createCommonjsModule(function (module) {
833
- var store = _shared('wks');
834
- var Symbol = _global.Symbol;
835
- var USE_SYMBOL = typeof Symbol == 'function';
836
- var $exports = module.exports = function (name) {
837
- return store[name] || (store[name] =
838
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name));
839
- };
840
- $exports.store = store;
841
- });
842
-
843
- var def = _objectDp.f;
844
- var TAG = _wks('toStringTag');
845
- var _setToStringTag = function (it, tag, stat) {
846
- if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
847
- };
848
-
849
- var IteratorPrototype = {};
850
- _hide(IteratorPrototype, _wks('iterator'), function () { return this; });
851
- var _iterCreate = function (Constructor, NAME, next) {
852
- Constructor.prototype = _objectCreate(IteratorPrototype, { next: _propertyDesc(1, next) });
853
- _setToStringTag(Constructor, NAME + ' Iterator');
854
- };
855
-
856
- var _toObject = function (it) {
857
- return Object(_defined(it));
858
- };
859
-
860
- var IE_PROTO$2 = _sharedKey('IE_PROTO');
861
- var ObjectProto = Object.prototype;
862
- var _objectGpo = Object.getPrototypeOf || function (O) {
863
- O = _toObject(O);
864
- if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2];
865
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
866
- return O.constructor.prototype;
867
- } return O instanceof Object ? ObjectProto : null;
868
- };
869
-
870
- var ITERATOR = _wks('iterator');
871
- var BUGGY = !([].keys && 'next' in [].keys());
872
- var FF_ITERATOR = '@@iterator';
873
- var KEYS = 'keys';
874
- var VALUES = 'values';
875
- var returnThis = function () { return this; };
876
- var _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
877
- _iterCreate(Constructor, NAME, next);
878
- var getMethod = function (kind) {
879
- if (!BUGGY && kind in proto) return proto[kind];
880
- switch (kind) {
881
- case KEYS: return function keys() { return new Constructor(this, kind); };
882
- case VALUES: return function values() { return new Constructor(this, kind); };
883
- } return function entries() { return new Constructor(this, kind); };
884
- };
885
- var TAG = NAME + ' Iterator';
886
- var DEF_VALUES = DEFAULT == VALUES;
887
- var VALUES_BUG = false;
888
- var proto = Base.prototype;
889
- var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
890
- var $default = $native || getMethod(DEFAULT);
891
- var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
892
- var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
893
- var methods, key, IteratorPrototype;
894
- if ($anyNative) {
895
- IteratorPrototype = _objectGpo($anyNative.call(new Base()));
896
- if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
897
- _setToStringTag(IteratorPrototype, TAG, true);
898
- }
899
- }
900
- if (DEF_VALUES && $native && $native.name !== VALUES) {
901
- VALUES_BUG = true;
902
- $default = function values() { return $native.call(this); };
903
- }
904
- if (( FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
905
- _hide(proto, ITERATOR, $default);
906
- }
907
- _iterators[NAME] = $default;
908
- _iterators[TAG] = returnThis;
909
- if (DEFAULT) {
910
- methods = {
911
- values: DEF_VALUES ? $default : getMethod(VALUES),
912
- keys: IS_SET ? $default : getMethod(KEYS),
913
- entries: $entries
914
- };
915
- if (FORCED) for (key in methods) {
916
- if (!(key in proto)) _redefine(proto, key, methods[key]);
917
- } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods);
918
- }
919
- return methods;
920
- };
921
-
922
- var $at = _stringAt(true);
923
- _iterDefine(String, 'String', function (iterated) {
924
- this._t = String(iterated);
925
- this._i = 0;
926
- }, function () {
927
- var O = this._t;
928
- var index = this._i;
929
- var point;
930
- if (index >= O.length) return { value: undefined, done: true };
931
- point = $at(O, index);
932
- this._i += point.length;
933
- return { value: point, done: false };
934
- });
935
-
936
- var _iterStep = function (done, value) {
937
- return { value: value, done: !!done };
938
- };
939
-
940
- var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) {
941
- this._t = _toIobject(iterated);
942
- this._i = 0;
943
- this._k = kind;
944
- }, function () {
945
- var O = this._t;
946
- var kind = this._k;
947
- var index = this._i++;
948
- if (!O || index >= O.length) {
949
- this._t = undefined;
950
- return _iterStep(1);
951
- }
952
- if (kind == 'keys') return _iterStep(0, index);
953
- if (kind == 'values') return _iterStep(0, O[index]);
954
- return _iterStep(0, [index, O[index]]);
955
- }, 'values');
956
- _iterators.Arguments = _iterators.Array;
957
-
958
- var TO_STRING_TAG = _wks('toStringTag');
959
- var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
960
- 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
961
- 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
962
- 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
963
- 'TextTrackList,TouchList').split(',');
964
- for (var i = 0; i < DOMIterables.length; i++) {
965
- var NAME = DOMIterables[i];
966
- var Collection = _global[NAME];
967
- var proto = Collection && Collection.prototype;
968
- if (proto && !proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME);
969
- _iterators[NAME] = _iterators.Array;
970
- }
971
-
972
- var TAG$1 = _wks('toStringTag');
973
- var ARG = _cof(function () { return arguments; }()) == 'Arguments';
974
- var tryGet = function (it, key) {
975
- try {
976
- return it[key];
977
- } catch (e) { }
978
- };
979
- var _classof = function (it) {
980
- var O, T, B;
981
- return it === undefined ? 'Undefined' : it === null ? 'Null'
982
- : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T
983
- : ARG ? _cof(O)
984
- : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
985
- };
986
-
987
- var _anInstance = function (it, Constructor, name, forbiddenField) {
988
- if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
989
- throw TypeError(name + ': incorrect invocation!');
990
- } return it;
991
- };
992
-
993
- var _iterCall = function (iterator, fn, value, entries) {
994
- try {
995
- return entries ? fn(_anObject(value)[0], value[1]) : fn(value);
996
- } catch (e) {
997
- var ret = iterator['return'];
998
- if (ret !== undefined) _anObject(ret.call(iterator));
999
- throw e;
1000
- }
1001
- };
1002
-
1003
- var ITERATOR$1 = _wks('iterator');
1004
- var ArrayProto = Array.prototype;
1005
- var _isArrayIter = function (it) {
1006
- return it !== undefined && (_iterators.Array === it || ArrayProto[ITERATOR$1] === it);
1007
- };
1008
-
1009
- var ITERATOR$2 = _wks('iterator');
1010
- var core_getIteratorMethod = _core.getIteratorMethod = function (it) {
1011
- if (it != undefined) return it[ITERATOR$2]
1012
- || it['@@iterator']
1013
- || _iterators[_classof(it)];
1014
- };
1015
-
1016
- var _forOf = createCommonjsModule(function (module) {
1017
- var BREAK = {};
1018
- var RETURN = {};
1019
- var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
1020
- var iterFn = ITERATOR ? function () { return iterable; } : core_getIteratorMethod(iterable);
1021
- var f = _ctx(fn, that, entries ? 2 : 1);
1022
- var index = 0;
1023
- var length, step, iterator, result;
1024
- if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
1025
- if (_isArrayIter(iterFn)) for (length = _toLength(iterable.length); length > index; index++) {
1026
- result = entries ? f(_anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
1027
- if (result === BREAK || result === RETURN) return result;
1028
- } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
1029
- result = _iterCall(iterator, f, step.value, entries);
1030
- if (result === BREAK || result === RETURN) return result;
1031
- }
1032
- };
1033
- exports.BREAK = BREAK;
1034
- exports.RETURN = RETURN;
1035
- });
1036
-
1037
- var SPECIES = _wks('species');
1038
- var _speciesConstructor = function (O, D) {
1039
- var C = _anObject(O).constructor;
1040
- var S;
1041
- return C === undefined || (S = _anObject(C)[SPECIES]) == undefined ? D : _aFunction(S);
1042
- };
1043
-
1044
- var _invoke = function (fn, args, that) {
1045
- var un = that === undefined;
1046
- switch (args.length) {
1047
- case 0: return un ? fn()
1048
- : fn.call(that);
1049
- case 1: return un ? fn(args[0])
1050
- : fn.call(that, args[0]);
1051
- case 2: return un ? fn(args[0], args[1])
1052
- : fn.call(that, args[0], args[1]);
1053
- case 3: return un ? fn(args[0], args[1], args[2])
1054
- : fn.call(that, args[0], args[1], args[2]);
1055
- case 4: return un ? fn(args[0], args[1], args[2], args[3])
1056
- : fn.call(that, args[0], args[1], args[2], args[3]);
1057
- } return fn.apply(that, args);
1058
- };
1059
-
1060
- var process = _global.process;
1061
- var setTask = _global.setImmediate;
1062
- var clearTask = _global.clearImmediate;
1063
- var MessageChannel = _global.MessageChannel;
1064
- var Dispatch = _global.Dispatch;
1065
- var counter = 0;
1066
- var queue = {};
1067
- var ONREADYSTATECHANGE = 'onreadystatechange';
1068
- var defer, channel, port;
1069
- var run = function () {
1070
- var id = +this;
1071
- if (queue.hasOwnProperty(id)) {
1072
- var fn = queue[id];
1073
- delete queue[id];
1074
- fn();
1075
- }
1076
- };
1077
- var listener = function (event) {
1078
- run.call(event.data);
1079
- };
1080
- if (!setTask || !clearTask) {
1081
- setTask = function setImmediate(fn) {
1082
- var args = [];
1083
- var i = 1;
1084
- while (arguments.length > i) args.push(arguments[i++]);
1085
- queue[++counter] = function () {
1086
- _invoke(typeof fn == 'function' ? fn : Function(fn), args);
1087
- };
1088
- defer(counter);
1089
- return counter;
1090
- };
1091
- clearTask = function clearImmediate(id) {
1092
- delete queue[id];
1093
- };
1094
- if (_cof(process) == 'process') {
1095
- defer = function (id) {
1096
- process.nextTick(_ctx(run, id, 1));
1097
- };
1098
- } else if (Dispatch && Dispatch.now) {
1099
- defer = function (id) {
1100
- Dispatch.now(_ctx(run, id, 1));
1101
- };
1102
- } else if (MessageChannel) {
1103
- channel = new MessageChannel();
1104
- port = channel.port2;
1105
- channel.port1.onmessage = listener;
1106
- defer = _ctx(port.postMessage, port, 1);
1107
- } else if (_global.addEventListener && typeof postMessage == 'function' && !_global.importScripts) {
1108
- defer = function (id) {
1109
- _global.postMessage(id + '', '*');
1110
- };
1111
- _global.addEventListener('message', listener, false);
1112
- } else if (ONREADYSTATECHANGE in _domCreate('script')) {
1113
- defer = function (id) {
1114
- _html.appendChild(_domCreate('script'))[ONREADYSTATECHANGE] = function () {
1115
- _html.removeChild(this);
1116
- run.call(id);
1117
- };
1118
- };
1119
- } else {
1120
- defer = function (id) {
1121
- setTimeout(_ctx(run, id, 1), 0);
1122
- };
1123
- }
1124
- }
1125
- var _task = {
1126
- set: setTask,
1127
- clear: clearTask
1128
- };
1129
-
1130
- var macrotask = _task.set;
1131
- var Observer = _global.MutationObserver || _global.WebKitMutationObserver;
1132
- var process$1 = _global.process;
1133
- var Promise$1 = _global.Promise;
1134
- var isNode = _cof(process$1) == 'process';
1135
- var _microtask = function () {
1136
- var head, last, notify;
1137
- var flush = function () {
1138
- var parent, fn;
1139
- if (isNode && (parent = process$1.domain)) parent.exit();
1140
- while (head) {
1141
- fn = head.fn;
1142
- head = head.next;
1143
- try {
1144
- fn();
1145
- } catch (e) {
1146
- if (head) notify();
1147
- else last = undefined;
1148
- throw e;
1149
- }
1150
- } last = undefined;
1151
- if (parent) parent.enter();
1152
- };
1153
- if (isNode) {
1154
- notify = function () {
1155
- process$1.nextTick(flush);
1156
- };
1157
- } else if (Observer && !(_global.navigator && _global.navigator.standalone)) {
1158
- var toggle = true;
1159
- var node = document.createTextNode('');
1160
- new Observer(flush).observe(node, { characterData: true });
1161
- notify = function () {
1162
- node.data = toggle = !toggle;
1163
- };
1164
- } else if (Promise$1 && Promise$1.resolve) {
1165
- var promise = Promise$1.resolve(undefined);
1166
- notify = function () {
1167
- promise.then(flush);
1168
- };
1169
- } else {
1170
- notify = function () {
1171
- macrotask.call(_global, flush);
1172
- };
1173
- }
1174
- return function (fn) {
1175
- var task = { fn: fn, next: undefined };
1176
- if (last) last.next = task;
1177
- if (!head) {
1178
- head = task;
1179
- notify();
1180
- } last = task;
1181
- };
1182
- };
1183
-
1184
- function PromiseCapability(C) {
1185
- var resolve, reject;
1186
- this.promise = new C(function ($$resolve, $$reject) {
1187
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
1188
- resolve = $$resolve;
1189
- reject = $$reject;
1190
- });
1191
- this.resolve = _aFunction(resolve);
1192
- this.reject = _aFunction(reject);
1193
- }
1194
- var f$1 = function (C) {
1195
- return new PromiseCapability(C);
1196
- };
1197
- var _newPromiseCapability = {
1198
- f: f$1
1199
- };
1200
-
1201
- var _perform = function (exec) {
1202
- try {
1203
- return { e: false, v: exec() };
1204
- } catch (e) {
1205
- return { e: true, v: e };
1206
- }
1207
- };
1208
-
1209
- var navigator = _global.navigator;
1210
- var _userAgent = navigator && navigator.userAgent || '';
1211
-
1212
- var _promiseResolve = function (C, x) {
1213
- _anObject(C);
1214
- if (_isObject(x) && x.constructor === C) return x;
1215
- var promiseCapability = _newPromiseCapability.f(C);
1216
- var resolve = promiseCapability.resolve;
1217
- resolve(x);
1218
- return promiseCapability.promise;
1219
- };
1220
-
1221
- var _redefineAll = function (target, src, safe) {
1222
- for (var key in src) {
1223
- if (safe && target[key]) target[key] = src[key];
1224
- else _hide(target, key, src[key]);
1225
- } return target;
1226
- };
1227
-
1228
- var SPECIES$1 = _wks('species');
1229
- var _setSpecies = function (KEY) {
1230
- var C = typeof _core[KEY] == 'function' ? _core[KEY] : _global[KEY];
1231
- if (_descriptors && C && !C[SPECIES$1]) _objectDp.f(C, SPECIES$1, {
1232
- configurable: true,
1233
- get: function () { return this; }
1234
- });
1235
- };
1236
-
1237
- var ITERATOR$3 = _wks('iterator');
1238
- var SAFE_CLOSING = false;
1239
- try {
1240
- var riter = [7][ITERATOR$3]();
1241
- riter['return'] = function () { SAFE_CLOSING = true; };
1242
- Array.from(riter, function () { throw 2; });
1243
- } catch (e) { }
1244
- var _iterDetect = function (exec, skipClosing) {
1245
- if (!skipClosing && !SAFE_CLOSING) return false;
1246
- var safe = false;
1247
- try {
1248
- var arr = [7];
1249
- var iter = arr[ITERATOR$3]();
1250
- iter.next = function () { return { done: safe = true }; };
1251
- arr[ITERATOR$3] = function () { return iter; };
1252
- exec(arr);
1253
- } catch (e) { }
1254
- return safe;
1255
- };
1256
-
1257
- var task = _task.set;
1258
- var microtask = _microtask();
1259
- var PROMISE = 'Promise';
1260
- var TypeError$1 = _global.TypeError;
1261
- var process$2 = _global.process;
1262
- var versions = process$2 && process$2.versions;
1263
- var v8 = versions && versions.v8 || '';
1264
- var $Promise = _global[PROMISE];
1265
- var isNode$1 = _classof(process$2) == 'process';
1266
- var empty = function () { };
1267
- var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
1268
- var newPromiseCapability = newGenericPromiseCapability = _newPromiseCapability.f;
1269
- var USE_NATIVE = !!function () {
1270
- try {
1271
- var promise = $Promise.resolve(1);
1272
- var FakePromise = (promise.constructor = {})[_wks('species')] = function (exec) {
1273
- exec(empty, empty);
1274
- };
1275
- return (isNode$1 || typeof PromiseRejectionEvent == 'function')
1276
- && promise.then(empty) instanceof FakePromise
1277
- && v8.indexOf('6.6') !== 0
1278
- && _userAgent.indexOf('Chrome/66') === -1;
1279
- } catch (e) { }
1280
- }();
1281
- var isThenable = function (it) {
1282
- var then;
1283
- return _isObject(it) && typeof (then = it.then) == 'function' ? then : false;
1284
- };
1285
- var notify = function (promise, isReject) {
1286
- if (promise._n) return;
1287
- promise._n = true;
1288
- var chain = promise._c;
1289
- microtask(function () {
1290
- var value = promise._v;
1291
- var ok = promise._s == 1;
1292
- var i = 0;
1293
- var run = function (reaction) {
1294
- var handler = ok ? reaction.ok : reaction.fail;
1295
- var resolve = reaction.resolve;
1296
- var reject = reaction.reject;
1297
- var domain = reaction.domain;
1298
- var result, then, exited;
1299
- try {
1300
- if (handler) {
1301
- if (!ok) {
1302
- if (promise._h == 2) onHandleUnhandled(promise);
1303
- promise._h = 1;
1304
- }
1305
- if (handler === true) result = value;
1306
- else {
1307
- if (domain) domain.enter();
1308
- result = handler(value);
1309
- if (domain) {
1310
- domain.exit();
1311
- exited = true;
1312
- }
1313
- }
1314
- if (result === reaction.promise) {
1315
- reject(TypeError$1('Promise-chain cycle'));
1316
- } else if (then = isThenable(result)) {
1317
- then.call(result, resolve, reject);
1318
- } else resolve(result);
1319
- } else reject(value);
1320
- } catch (e) {
1321
- if (domain && !exited) domain.exit();
1322
- reject(e);
1323
- }
1324
- };
1325
- while (chain.length > i) run(chain[i++]);
1326
- promise._c = [];
1327
- promise._n = false;
1328
- if (isReject && !promise._h) onUnhandled(promise);
1329
- });
1330
- };
1331
- var onUnhandled = function (promise) {
1332
- task.call(_global, function () {
1333
- var value = promise._v;
1334
- var unhandled = isUnhandled(promise);
1335
- var result, handler, console;
1336
- if (unhandled) {
1337
- result = _perform(function () {
1338
- if (isNode$1) {
1339
- process$2.emit('unhandledRejection', value, promise);
1340
- } else if (handler = _global.onunhandledrejection) {
1341
- handler({ promise: promise, reason: value });
1342
- } else if ((console = _global.console) && console.error) {
1343
- console.error('Unhandled promise rejection', value);
1344
- }
1345
- });
1346
- promise._h = isNode$1 || isUnhandled(promise) ? 2 : 1;
1347
- } promise._a = undefined;
1348
- if (unhandled && result.e) throw result.v;
1349
- });
1350
- };
1351
- var isUnhandled = function (promise) {
1352
- return promise._h !== 1 && (promise._a || promise._c).length === 0;
1353
- };
1354
- var onHandleUnhandled = function (promise) {
1355
- task.call(_global, function () {
1356
- var handler;
1357
- if (isNode$1) {
1358
- process$2.emit('rejectionHandled', promise);
1359
- } else if (handler = _global.onrejectionhandled) {
1360
- handler({ promise: promise, reason: promise._v });
1361
- }
1362
- });
1363
- };
1364
- var $reject = function (value) {
1365
- var promise = this;
1366
- if (promise._d) return;
1367
- promise._d = true;
1368
- promise = promise._w || promise;
1369
- promise._v = value;
1370
- promise._s = 2;
1371
- if (!promise._a) promise._a = promise._c.slice();
1372
- notify(promise, true);
1373
- };
1374
- var $resolve = function (value) {
1375
- var promise = this;
1376
- var then;
1377
- if (promise._d) return;
1378
- promise._d = true;
1379
- promise = promise._w || promise;
1380
- try {
1381
- if (promise === value) throw TypeError$1("Promise can't be resolved itself");
1382
- if (then = isThenable(value)) {
1383
- microtask(function () {
1384
- var wrapper = { _w: promise, _d: false };
1385
- try {
1386
- then.call(value, _ctx($resolve, wrapper, 1), _ctx($reject, wrapper, 1));
1387
- } catch (e) {
1388
- $reject.call(wrapper, e);
1389
- }
1390
- });
1391
- } else {
1392
- promise._v = value;
1393
- promise._s = 1;
1394
- notify(promise, false);
1395
- }
1396
- } catch (e) {
1397
- $reject.call({ _w: promise, _d: false }, e);
1398
- }
1399
- };
1400
- if (!USE_NATIVE) {
1401
- $Promise = function Promise(executor) {
1402
- _anInstance(this, $Promise, PROMISE, '_h');
1403
- _aFunction(executor);
1404
- Internal.call(this);
1405
- try {
1406
- executor(_ctx($resolve, this, 1), _ctx($reject, this, 1));
1407
- } catch (err) {
1408
- $reject.call(this, err);
1409
- }
1410
- };
1411
- Internal = function Promise(executor) {
1412
- this._c = [];
1413
- this._a = undefined;
1414
- this._s = 0;
1415
- this._d = false;
1416
- this._v = undefined;
1417
- this._h = 0;
1418
- this._n = false;
1419
- };
1420
- Internal.prototype = _redefineAll($Promise.prototype, {
1421
- then: function then(onFulfilled, onRejected) {
1422
- var reaction = newPromiseCapability(_speciesConstructor(this, $Promise));
1423
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
1424
- reaction.fail = typeof onRejected == 'function' && onRejected;
1425
- reaction.domain = isNode$1 ? process$2.domain : undefined;
1426
- this._c.push(reaction);
1427
- if (this._a) this._a.push(reaction);
1428
- if (this._s) notify(this, false);
1429
- return reaction.promise;
1430
- },
1431
- 'catch': function (onRejected) {
1432
- return this.then(undefined, onRejected);
1433
- }
1434
- });
1435
- OwnPromiseCapability = function () {
1436
- var promise = new Internal();
1437
- this.promise = promise;
1438
- this.resolve = _ctx($resolve, promise, 1);
1439
- this.reject = _ctx($reject, promise, 1);
1440
- };
1441
- _newPromiseCapability.f = newPromiseCapability = function (C) {
1442
- return C === $Promise || C === Wrapper
1443
- ? new OwnPromiseCapability(C)
1444
- : newGenericPromiseCapability(C);
1445
- };
1446
- }
1447
- _export(_export.G + _export.W + _export.F * !USE_NATIVE, { Promise: $Promise });
1448
- _setToStringTag($Promise, PROMISE);
1449
- _setSpecies(PROMISE);
1450
- Wrapper = _core[PROMISE];
1451
- _export(_export.S + _export.F * !USE_NATIVE, PROMISE, {
1452
- reject: function reject(r) {
1453
- var capability = newPromiseCapability(this);
1454
- var $$reject = capability.reject;
1455
- $$reject(r);
1456
- return capability.promise;
1457
- }
1458
- });
1459
- _export(_export.S + _export.F * (_library ), PROMISE, {
1460
- resolve: function resolve(x) {
1461
- return _promiseResolve( this === Wrapper ? $Promise : this, x);
1462
- }
1463
- });
1464
- _export(_export.S + _export.F * !(USE_NATIVE && _iterDetect(function (iter) {
1465
- $Promise.all(iter)['catch'](empty);
1466
- })), PROMISE, {
1467
- all: function all(iterable) {
1468
- var C = this;
1469
- var capability = newPromiseCapability(C);
1470
- var resolve = capability.resolve;
1471
- var reject = capability.reject;
1472
- var result = _perform(function () {
1473
- var values = [];
1474
- var index = 0;
1475
- var remaining = 1;
1476
- _forOf(iterable, false, function (promise) {
1477
- var $index = index++;
1478
- var alreadyCalled = false;
1479
- values.push(undefined);
1480
- remaining++;
1481
- C.resolve(promise).then(function (value) {
1482
- if (alreadyCalled) return;
1483
- alreadyCalled = true;
1484
- values[$index] = value;
1485
- --remaining || resolve(values);
1486
- }, reject);
1487
- });
1488
- --remaining || resolve(values);
1489
- });
1490
- if (result.e) reject(result.v);
1491
- return capability.promise;
1492
- },
1493
- race: function race(iterable) {
1494
- var C = this;
1495
- var capability = newPromiseCapability(C);
1496
- var reject = capability.reject;
1497
- var result = _perform(function () {
1498
- _forOf(iterable, false, function (promise) {
1499
- C.resolve(promise).then(capability.resolve, reject);
1500
- });
1501
- });
1502
- if (result.e) reject(result.v);
1503
- return capability.promise;
1504
- }
1505
- });
1506
-
1507
- _export(_export.P + _export.R, 'Promise', { 'finally': function (onFinally) {
1508
- var C = _speciesConstructor(this, _core.Promise || _global.Promise);
1509
- var isFunction = typeof onFinally == 'function';
1510
- return this.then(
1511
- isFunction ? function (x) {
1512
- return _promiseResolve(C, onFinally()).then(function () { return x; });
1513
- } : onFinally,
1514
- isFunction ? function (e) {
1515
- return _promiseResolve(C, onFinally()).then(function () { throw e; });
1516
- } : onFinally
1517
- );
1518
- } });
1519
-
1520
- _export(_export.S, 'Promise', { 'try': function (callbackfn) {
1521
- var promiseCapability = _newPromiseCapability.f(this);
1522
- var result = _perform(callbackfn);
1523
- (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
1524
- return promiseCapability.promise;
1525
- } });
1526
-
1527
- var promise = _core.Promise;
1528
-
1529
- var promise$1 = promise;
1530
-
1531
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1532
- try {
1533
- var info = gen[key](arg);
1534
- var value = info.value;
1535
- } catch (error) {
1536
- reject(error);
1537
- return;
1538
- }
1539
-
1540
- if (info.done) {
1541
- resolve(value);
1542
- } else {
1543
- Promise.resolve(value).then(_next, _throw);
1544
- }
1545
- }
1546
-
1547
- function _asyncToGenerator(fn) {
1548
- return function () {
1549
- var self = this,
1550
- args = arguments;
1551
- return new Promise(function (resolve, reject) {
1552
- var gen = fn.apply(self, args);
1553
-
1554
- function _next(value) {
1555
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
1556
- }
1557
-
1558
- function _throw(err) {
1559
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
1560
- }
1561
-
1562
- _next(undefined);
1563
- });
1564
- };
1565
- }
1566
-
1567
- function throttle (delay, noTrailing, callback, debounceMode) {
1568
- var timeoutID;
1569
- var cancelled = false;
1570
- var lastExec = 0;
1571
- function clearExistingTimeout() {
1572
- if (timeoutID) {
1573
- clearTimeout(timeoutID);
1574
- }
1575
- }
1576
- function cancel() {
1577
- clearExistingTimeout();
1578
- cancelled = true;
1579
- }
1580
- if (typeof noTrailing !== 'boolean') {
1581
- debounceMode = callback;
1582
- callback = noTrailing;
1583
- noTrailing = undefined;
1584
- }
1585
- function wrapper() {
1586
- var self = this;
1587
- var elapsed = Date.now() - lastExec;
1588
- var args = arguments;
1589
- if (cancelled) {
1590
- return;
1591
- }
1592
- function exec() {
1593
- lastExec = Date.now();
1594
- callback.apply(self, args);
1595
- }
1596
- function clear() {
1597
- timeoutID = undefined;
1598
- }
1599
- if (debounceMode && !timeoutID) {
1600
- exec();
1601
- }
1602
- clearExistingTimeout();
1603
- if (debounceMode === undefined && elapsed > delay) {
1604
- exec();
1605
- } else if (noTrailing !== true) {
1606
- timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
1607
- }
1608
- }
1609
- wrapper.cancel = cancel;
1610
- return wrapper;
1611
- }
1612
- function debounce (delay, atBegin, callback) {
1613
- return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
1614
- }
1615
-
1616
- var requestFrame = function () {
1617
- var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) {
1618
- return window.setTimeout(fn, 20);
1619
- };
1620
- return function (fn) {
1621
- return raf(fn);
1622
- };
1623
- }();
1624
- var cancelFrame = function () {
1625
- var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
1626
- return function (id) {
1627
- return cancel(id);
1628
- };
1629
- }();
1630
- var resetTrigger = function resetTrigger(element) {
1631
- var trigger = element.__resizeTrigger__;
1632
- var expand = trigger.firstElementChild;
1633
- var contract = trigger.lastElementChild;
1634
- var expandChild = expand.firstElementChild;
1635
- contract.scrollLeft = contract.scrollWidth;
1636
- contract.scrollTop = contract.scrollHeight;
1637
- expandChild.style.width = expand.offsetWidth + 1 + 'px';
1638
- expandChild.style.height = expand.offsetHeight + 1 + 'px';
1639
- expand.scrollLeft = expand.scrollWidth;
1640
- expand.scrollTop = expand.scrollHeight;
1641
- };
1642
- var checkTriggers = function checkTriggers(element) {
1643
- return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;
1644
- };
1645
- var scrollListener = function scrollListener(event) {
1646
- var _this = this;
1647
- resetTrigger(this);
1648
- if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);
1649
- this.__resizeRAF__ = requestFrame(function () {
1650
- if (checkTriggers(_this)) {
1651
- _this.__resizeLast__.width = _this.offsetWidth;
1652
- _this.__resizeLast__.height = _this.offsetHeight;
1653
- _this.__resizeListeners__.forEach(function (fn) {
1654
- fn.call(_this, event);
1655
- });
1656
- }
1657
- });
1658
- };
1659
- var attachEvent = document.attachEvent;
1660
- var DOM_PREFIXES = 'Webkit Moz O ms'.split(' ');
1661
- var START_EVENTS = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' ');
1662
- var RESIZE_ANIMATION_NAME = 'resizeanim';
1663
- var animation = false;
1664
- var keyFramePrefix = '';
1665
- var animationStartEvent = 'animationstart';
1666
- if (!attachEvent) {
1667
- var testElement = document.createElement('fakeelement');
1668
- if (testElement.style.animationName !== undefined) {
1669
- animation = true;
1670
- }
1671
- if (animation === false) {
1672
- var prefix = '';
1673
- for (var i$1 = 0; i$1 < DOM_PREFIXES.length; i$1++) {
1674
- if (testElement.style[DOM_PREFIXES[i$1] + 'AnimationName'] !== undefined) {
1675
- prefix = DOM_PREFIXES[i$1];
1676
- keyFramePrefix = '-' + prefix.toLowerCase() + '-';
1677
- animationStartEvent = START_EVENTS[i$1];
1678
- animation = true;
1679
- break;
1680
- }
1681
- }
1682
- }
1683
- }
1684
- var stylesCreated = false;
1685
- var createStyles = function createStyles() {
1686
- if (!stylesCreated) {
1687
- var animationKeyframes = "@".concat(keyFramePrefix, "keyframes ").concat(RESIZE_ANIMATION_NAME, " { from { opacity: 0; } to { opacity: 0; } } ");
1688
- var animationStyle = "".concat(keyFramePrefix, "animation: 1ms ").concat(RESIZE_ANIMATION_NAME, ";");
1689
- var css = "".concat(animationKeyframes, "\n .resize-triggers { ").concat(animationStyle, " visibility: hidden; opacity: 0; }\n .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1 }\n .resize-triggers > div { background: #eee; overflow: auto; }\n .contract-trigger:before { width: 200%; height: 200%; }");
1690
- var head = document.head || document.getElementsByTagName('head')[0];
1691
- var style = document.createElement('style');
1692
- style.type = 'text/css';
1693
- if (style.styleSheet) {
1694
- style.styleSheet.cssText = css;
1695
- } else {
1696
- style.appendChild(document.createTextNode(css));
1697
- }
1698
- head.appendChild(style);
1699
- stylesCreated = true;
1700
- }
1701
- };
1702
- var addResizeListener = function addResizeListener(element, fn) {
1703
- if (attachEvent) {
1704
- element.attachEvent('onresize', fn);
1705
- } else {
1706
- if (!element.__resizeTrigger__) {
1707
- if (getComputedStyle(element).position === 'static') {
1708
- element.style.position = 'relative';
1709
- }
1710
- createStyles();
1711
- element.__resizeLast__ = {};
1712
- element.__resizeListeners__ = [];
1713
- var resizeTrigger = element.__resizeTrigger__ = document.createElement('div');
1714
- resizeTrigger.className = 'resize-triggers';
1715
- resizeTrigger.innerHTML = '<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';
1716
- element.appendChild(resizeTrigger);
1717
- resetTrigger(element);
1718
- element.addEventListener('scroll', scrollListener, true);
1719
- if (animationStartEvent) {
1720
- resizeTrigger.addEventListener(animationStartEvent, function (event) {
1721
- if (event.animationName === RESIZE_ANIMATION_NAME) {
1722
- resetTrigger(element);
1723
- }
1724
- });
1725
- }
1726
- }
1727
- element.__resizeListeners__.push(fn);
1728
- }
1729
- };
1730
- var removeResizeListener = function removeResizeListener(element, fn) {
1731
- if (!element || !element.__resizeListeners__) return;
1732
- if (attachEvent) {
1733
- element.detachEvent('onresize', fn);
1734
- } else {
1735
- element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
1736
- if (!element.__resizeListeners__.length) {
1737
- element.removeEventListener('scroll', scrollListener);
1738
- element.__resizeTrigger__ = !element.removeChild(element.__resizeTrigger__);
1739
- }
1740
- }
1741
- };
1742
-
1743
- var bkTabLabel = {
1744
- name: 'bk-tab-label',
1745
- props: ['panel', 'index', 'closable', 'isSidePosition'],
1746
- render: function render(h) {
1747
- var _this = this;
1748
- var _this$panel = this.panel,
1749
- renderLabel = _this$panel.renderLabel,
1750
- $slots = _this$panel.$slots,
1751
- label = _this$panel.label,
1752
- name = _this$panel.name;
1753
- var labelContent = renderLabel && renderLabel(h, name) || $slots.label || label;
1754
- return h("li", {
1755
- "on": {
1756
- "click": function click() {
1757
- return _this.$parent.togglePanel(_this.panel);
1758
- }
1759
- },
1760
- "class": this.showClose && !this.isSidePosition ? 'has-close' : ''
1761
- }, [h("div", {
1762
- "class": "bk-tab-label"
1763
- }, [labelContent]), this.showClose ? h("i", {
1764
- "class": "bk-tab-close-controller",
1765
- "on": {
1766
- "click": function click($event) {
1767
- return _this.handleClosePanel($event);
1768
- }
1769
- }
1770
- }) : '']);
1771
- },
1772
- computed: {
1773
- showClose: function showClose() {
1774
- if (this.panel.disabled) {
1775
- return false;
1776
- }
1777
- if (this.panel.closable !== undefined) {
1778
- return this.panel.closable;
1779
- }
1780
- return this.closable;
1781
- }
1782
- },
1783
- methods: {
1784
- handleClosePanel: function handleClosePanel(event) {
1785
- event.stopPropagation();
1786
- this.$parent.handleClosePanel(this.index, this.panel);
1787
- }
1788
- }
1789
- };
1790
-
1791
- var script = {
1792
- name: 'bk-tab',
1793
- components: {
1794
- bkTabLabel: bkTabLabel
1795
- },
1796
- props: {
1797
- active: {
1798
- type: [String, Number],
1799
- default: ''
1800
- },
1801
- type: {
1802
- type: String,
1803
- default: 'border-card',
1804
- validator: function validator(val) {
1805
- return ['card', 'border-card', 'unborder-card', 'vertical-card'].includes(val);
1806
- }
1807
- },
1808
- tabPosition: {
1809
- type: String,
1810
- default: 'top',
1811
- validator: function validator(val) {
1812
- return ['left', 'right', 'top'].includes(val);
1813
- }
1814
- },
1815
- scrollStep: {
1816
- type: Number,
1817
- default: 200
1818
- },
1819
- validateActive: {
1820
- type: Boolean,
1821
- default: true
1822
- },
1823
- closable: Boolean,
1824
- addable: Boolean,
1825
- beforeToggle: Function,
1826
- extCls: {
1827
- type: String,
1828
- default: ''
1829
- },
1830
- showHeader: {
1831
- type: Boolean,
1832
- default: true
1833
- },
1834
- changeOnHover: Boolean,
1835
- changeOnHoverDelay: {
1836
- type: Number,
1837
- default: 1000
1838
- },
1839
- labelHeight: {
1840
- type: Number,
1841
- default: 50,
1842
- validator: function validator(val) {
1843
- if (val < 42) {
1844
- console.error('选项卡 label 的高度,最小值为 42');
1845
- return false;
1846
- }
1847
- return true;
1848
- }
1849
- }
1850
- },
1851
- data: function data() {
1852
- return {
1853
- isTab: true,
1854
- localActive: this.active,
1855
- scrollState: {
1856
- show: false,
1857
- position: 'left',
1858
- offset: 0,
1859
- basicStep: this.scrollStep,
1860
- wrapperRect: null,
1861
- listRect: null
1862
- },
1863
- panelInstance: [],
1864
- resizeHandler: null,
1865
- promise: {
1866
- toggle: {
1867
- previousPanel: null,
1868
- rejector: null
1869
- }
1870
- },
1871
- hoverTimer: null,
1872
- activeBarStyle: {
1873
- left: 0,
1874
- width: 0,
1875
- height: 0,
1876
- transform: ''
1877
- }
1878
- };
1879
- },
1880
- computed: {
1881
- panelNames: function panelNames() {
1882
- return this.panelInstance.map(function (panel) {
1883
- return panel.name;
1884
- });
1885
- },
1886
- activePanel: function activePanel() {
1887
- var _this = this;
1888
- return this.panelInstance.find(function (panel) {
1889
- return panel.name === _this.localActive;
1890
- });
1891
- },
1892
- visiblePanels: function visiblePanels() {
1893
- return this.panelInstance.filter(function (panel) {
1894
- return panel.visible;
1895
- });
1896
- },
1897
- tabStyle: function tabStyle() {
1898
- if (this.isSidePosition) {
1899
- var paddingValue = 21;
1900
- return {
1901
- minHeight: "".concat(this.labelHeight * 4 + paddingValue, "px")
1902
- };
1903
- }
1904
- return {};
1905
- },
1906
- headerStyle: function headerStyle() {
1907
- if (this.tabPosition === 'top') {
1908
- var diffValue = this.type === 'border-card' ? 2 : 1;
1909
- return {
1910
- height: "".concat(this.labelHeight, "px"),
1911
- backgroundImage: "linear-gradient(transparent ".concat(this.labelHeight - diffValue, "px, #dcdee5 1px)")
1912
- };
1913
- }
1914
- return {};
1915
- },
1916
- isSidePosition: function isSidePosition() {
1917
- return ['left', 'right'].includes(this.tabPosition);
1918
- },
1919
- isEmpty: function isEmpty() {
1920
- return this.panelInstance.length < 1;
1921
- },
1922
- hasActiveBar: function hasActiveBar() {
1923
- return (this.type === 'unborder-card' || this.isSidePosition) && !this.isEmpty;
1924
- },
1925
- tabLabelListStyle: function tabLabelListStyle() {
1926
- if (this.isEmpty) {
1927
- return {};
1928
- }
1929
- if (this.hasActiveBar) {
1930
- return {
1931
- transform: "translateX(".concat(this.scrollState.offset, "px)"),
1932
- height: "".concat(this.labelHeight, "px"),
1933
- '--activeBarLeft': this.activeBarStyle.left,
1934
- '--activeBarWidth': this.activeBarStyle.width,
1935
- '--activeBarHeight': this.activeBarStyle.height,
1936
- '--activeBarTransform': this.activeBarStyle.transform
1937
- };
1938
- }
1939
- return {
1940
- transform: "translateX(".concat(this.scrollState.offset, "px)"),
1941
- height: "".concat(this.labelHeight, "px")
1942
- };
1943
- }
1944
- },
1945
- watch: {
1946
- panelNames: function panelNames(names) {
1947
- this.checkActiveName();
1948
- },
1949
- active: function active(_active) {
1950
- this.updateActiveBarPosition(_active);
1951
- if (this.localActive !== _active) {
1952
- this.localActive = _active;
1953
- if (this.promise.toggle.rejector) {
1954
- this.promise.toggle.rejector(false);
1955
- this.clearToggleStatus();
1956
- }
1957
- }
1958
- },
1959
- localActive: function localActive(_localActive) {
1960
- if (_localActive !== this.active) {
1961
- this.$emit('update:active', _localActive);
1962
- this.$emit('tab-change', _localActive, this.activePanel);
1963
- this.updateActivePosition(_localActive);
1964
- }
1965
- },
1966
- showHeader: function showHeader(value) {
1967
- if (value) {
1968
- this.resizeHandler();
1969
- }
1970
- },
1971
- tabPosition: function tabPosition() {
1972
- this.updateActiveBarPosition(this.localActive);
1973
- }
1974
- },
1975
- created: function created() {
1976
- this.resizeHandler = debounce(100, this.calculateScroller);
1977
- },
1978
- mounted: function mounted() {
1979
- this.updateActiveBarPosition(this.localActive);
1980
- addResizeListener(this.$refs.labelList, this.resizeHandler);
1981
- addResizeListener(this.$refs.labelWrapper, this.resizeHandler);
1982
- this.caluclateVerticalPadding();
1983
- },
1984
- beforeDestroy: function beforeDestroy() {
1985
- removeResizeListener(this.$refs.labelList, this.resizeHandler);
1986
- removeResizeListener(this.$refs.labelWrapper, this.resizeHandler);
1987
- },
1988
- methods: {
1989
- caluclateVerticalPadding: function caluclateVerticalPadding() {
1990
- var _this2 = this;
1991
- if (this.type !== 'vertical-card') return;
1992
- this.$nextTick(function () {
1993
- var width = _this2.$refs.tabHeader.offsetWidth;
1994
- _this2.$refs.tabSection.style["padding-".concat(_this2.verticalPosition)] = "".concat(width + 20, "px");
1995
- });
1996
- },
1997
- registerPanel: function registerPanel(panel) {
1998
- this.panelInstance.push(panel);
1999
- },
2000
- deletePanel: function deletePanel(panel) {
2001
- var index = this.panelInstance.indexOf(panel);
2002
- if (index !== -1) {
2003
- this.panelInstance.splice(index, 1);
2004
- }
2005
- },
2006
- togglePanel: function togglePanel(panel) {
2007
- var _this3 = this;
2008
- return _asyncToGenerator( regenerator.mark(function _callee2() {
2009
- var toggleStatus, shouldToggle;
2010
- return regenerator.wrap(function _callee2$(_context2) {
2011
- while (1) {
2012
- switch (_context2.prev = _context2.next) {
2013
- case 0:
2014
- if (!panel.disabled) {
2015
- _context2.next = 2;
2016
- break;
2017
- }
2018
- return _context2.abrupt("return", false);
2019
- case 2:
2020
- _this3.handleClearHoverTimer();
2021
- toggleStatus = _this3.promise.toggle;
2022
- if (!(panel.name === _this3.localActive)) {
2023
- _context2.next = 7;
2024
- break;
2025
- }
2026
- if (toggleStatus.rejector) {
2027
- toggleStatus.rejector(false);
2028
- }
2029
- return _context2.abrupt("return", false);
2030
- case 7:
2031
- if (!(typeof _this3.beforeToggle === 'function')) {
2032
- _context2.next = 29;
2033
- break;
2034
- }
2035
- if (!toggleStatus.previousPanel) {
2036
- _context2.next = 14;
2037
- break;
2038
- }
2039
- if (!(toggleStatus.previousPanel === panel)) {
2040
- _context2.next = 13;
2041
- break;
2042
- }
2043
- return _context2.abrupt("return", false);
2044
- case 13:
2045
- toggleStatus.rejector(false);
2046
- case 14:
2047
- _context2.prev = 14;
2048
- _context2.next = 17;
2049
- return new promise$1( function () {
2050
- var _ref = _asyncToGenerator( regenerator.mark(function _callee(resolve, reject) {
2051
- var confirmed;
2052
- return regenerator.wrap(function _callee$(_context) {
2053
- while (1) {
2054
- switch (_context.prev = _context.next) {
2055
- case 0:
2056
- toggleStatus.previousPanel = panel;
2057
- toggleStatus.rejector = reject;
2058
- _context.next = 4;
2059
- return _this3.beforeToggle(panel.name, panel);
2060
- case 4:
2061
- confirmed = _context.sent;
2062
- confirmed ? resolve(confirmed) : reject(confirmed);
2063
- case 6:
2064
- case "end":
2065
- return _context.stop();
2066
- }
2067
- }
2068
- }, _callee);
2069
- }));
2070
- return function (_x, _x2) {
2071
- return _ref.apply(this, arguments);
2072
- };
2073
- }());
2074
- case 17:
2075
- shouldToggle = _context2.sent;
2076
- if (shouldToggle) {
2077
- _this3.localActive = panel.name;
2078
- }
2079
- _context2.next = 24;
2080
- break;
2081
- case 21:
2082
- _context2.prev = 21;
2083
- _context2.t0 = _context2["catch"](14);
2084
- console.log('Previous tab toggle canceled');
2085
- case 24:
2086
- _context2.prev = 24;
2087
- _this3.clearToggleStatus();
2088
- return _context2.finish(24);
2089
- case 27:
2090
- _context2.next = 30;
2091
- break;
2092
- case 29:
2093
- _this3.localActive = panel.name;
2094
- case 30:
2095
- case "end":
2096
- return _context2.stop();
2097
- }
2098
- }
2099
- }, _callee2, null, [[14, 21, 24, 27]]);
2100
- }))();
2101
- },
2102
- clearToggleStatus: function clearToggleStatus() {
2103
- this.promise.toggle = {
2104
- previousPanel: null,
2105
- rejector: null
2106
- };
2107
- },
2108
- checkActiveName: function checkActiveName() {
2109
- if (this.validateActive && !this.panelNames.includes(this.localActive)) {
2110
- var newActivePanel = this.panelInstance.length ? this.panelInstance[0] : null;
2111
- this.localActive = newActivePanel ? newActivePanel.name : '';
2112
- }
2113
- },
2114
- calculateScroller: function calculateScroller() {
2115
- var _this4 = this;
2116
- if (!this.showHeader) {
2117
- return false;
2118
- }
2119
- this.$nextTick(function () {
2120
- var _this4$$refs = _this4.$refs,
2121
- labelWrapper = _this4$$refs.labelWrapper,
2122
- labelList = _this4$$refs.labelList,
2123
- addController = _this4$$refs.addController;
2124
- var labelWrapperRect = labelWrapper.getBoundingClientRect();
2125
- var labelListRect = labelList.getBoundingClientRect();
2126
- var addControllerRect = addController ? addController.getBoundingClientRect() : {
2127
- width: 0
2128
- };
2129
- _this4.scrollState.show = labelListRect.width + addControllerRect.width > labelWrapperRect.width;
2130
- if (!_this4.scrollState.show) {
2131
- _this4.scrollState.offset = 0;
2132
- _this4.scrollState.position = 'left';
2133
- } else {
2134
- _this4.compensateOffset(labelWrapperRect, labelListRect);
2135
- }
2136
- _this4.scrollState.wrapperRect = labelWrapperRect;
2137
- _this4.scrollState.listRect = labelListRect;
2138
- _this4.updateActivePosition(_this4.localActive);
2139
- });
2140
- },
2141
- compensateOffset: function compensateOffset(newWrapperRect, newListRect) {
2142
- var oldWrapperRect = this.scrollState.wrapperRect;
2143
- if (!oldWrapperRect) {
2144
- return false;
2145
- }
2146
- var overplusWidth = newWrapperRect.width - this.scrollState.offset - newListRect.width;
2147
- if (overplusWidth > 0) {
2148
- this.scrollState.offset = newWrapperRect.width - newListRect.width - this.getControllerWidth();
2149
- this.scrollState.position = 'right';
2150
- } else {
2151
- this.scrollState.position = this.scrollState.position === 'left' ? 'left' : 'middle';
2152
- }
2153
- },
2154
- getControllerWidth: function getControllerWidth() {
2155
- return this.getLeftControllerWidth() + this.getRightControllerWidth();
2156
- },
2157
- getLeftControllerWidth: function getLeftControllerWidth() {
2158
- var prevController = this.$refs.prevController;
2159
- var controllers = [prevController];
2160
- var width = 0;
2161
- controllers.forEach(function (controller) {
2162
- width += controller ? controller.offsetWidth : 0;
2163
- });
2164
- return width;
2165
- },
2166
- getRightControllerWidth: function getRightControllerWidth() {
2167
- var _this$$refs = this.$refs,
2168
- nextController = _this$$refs.nextController,
2169
- addController = _this$$refs.addController;
2170
- var controllers = [nextController, addController];
2171
- var width = 0;
2172
- controllers.forEach(function (controller) {
2173
- width += controller ? controller.offsetWidth : 0;
2174
- });
2175
- return width;
2176
- },
2177
- updateActiveBarPosition: function updateActiveBarPosition(active) {
2178
- var _this5 = this;
2179
- if (!this.showHeader) {
2180
- return false;
2181
- }
2182
- this.$nextTick(function () {
2183
- var index = _this5.panelNames.indexOf(active);
2184
- if (index !== -1) {
2185
- var tabLabel = _this5.$refs.tabLabel[index].$el;
2186
- var tabLabelRect = tabLabel.getBoundingClientRect();
2187
- if (!_this5.isSidePosition) {
2188
- _this5.activeBarStyle.width = "".concat(tabLabelRect.width - 24, "px");
2189
- _this5.activeBarStyle.height = '2px';
2190
- _this5.activeBarStyle.transform = "translateX(".concat(tabLabel.offsetLeft + 12, "px)");
2191
- _this5.activeBarStyle.left = 0;
2192
- } else {
2193
- _this5.activeBarStyle.width = '2px';
2194
- _this5.activeBarStyle.height = "".concat(tabLabelRect.height, "px");
2195
- _this5.activeBarStyle.transform = "translateY(".concat(tabLabel.offsetTop, "px)");
2196
- if (_this5.tabPosition === 'right') {
2197
- _this5.activeBarStyle.left = 0;
2198
- } else {
2199
- _this5.activeBarStyle.left = "".concat(tabLabelRect.width - 2, "px");
2200
- }
2201
- }
2202
- }
2203
- });
2204
- },
2205
- updateActivePosition: function updateActivePosition(active) {
2206
- var _this6 = this;
2207
- if (!this.scrollState.show || !this.showHeader) {
2208
- return false;
2209
- }
2210
- this.$nextTick(function () {
2211
- var index = _this6.panelNames.indexOf(active);
2212
- if (index !== -1) {
2213
- var _this6$scrollState = _this6.scrollState,
2214
- wrapperRect = _this6$scrollState.wrapperRect,
2215
- listRect = _this6$scrollState.listRect;
2216
- var tabLabel = _this6.$refs.tabLabel[index].$el;
2217
- var tabLabelRect = tabLabel.getBoundingClientRect();
2218
- var labelWrapperWidth = wrapperRect.width - _this6.getControllerWidth();
2219
- var leftThreshold = tabLabel.offsetLeft;
2220
- var rightThreshold = Math.abs(tabLabel.offsetLeft - labelWrapperWidth + tabLabelRect.width);
2221
- var isLeftOutside = tabLabelRect.left < wrapperRect.left + _this6.getLeftControllerWidth();
2222
- var isRightOutside = tabLabelRect.right > wrapperRect.right - _this6.getRightControllerWidth();
2223
- if (isLeftOutside) {
2224
- _this6.scrollState.offset = -1 * leftThreshold;
2225
- _this6.scrollState.position = leftThreshold ? 'middle' : 'left';
2226
- } else if (isRightOutside) {
2227
- _this6.scrollState.offset = -1 * rightThreshold;
2228
- _this6.scrollState.position = listRect.width - rightThreshold === labelWrapperWidth ? 'right' : 'middle';
2229
- }
2230
- }
2231
- });
2232
- },
2233
- stepToPrev: function stepToPrev() {
2234
- var _this$scrollState = this.scrollState,
2235
- position = _this$scrollState.position,
2236
- basicStep = _this$scrollState.basicStep,
2237
- offset = _this$scrollState.offset;
2238
- if (position === 'left') {
2239
- return false;
2240
- }
2241
- var newOffset = offset + basicStep;
2242
- if (newOffset > 0) {
2243
- newOffset = 0;
2244
- this.scrollState.position = 'left';
2245
- } else {
2246
- this.scrollState.position = 'middle';
2247
- }
2248
- this.scrollState.offset = newOffset;
2249
- },
2250
- stepToNext: function stepToNext() {
2251
- var _this$scrollState2 = this.scrollState,
2252
- position = _this$scrollState2.position,
2253
- basicStep = _this$scrollState2.basicStep,
2254
- wrapperRect = _this$scrollState2.wrapperRect,
2255
- listRect = _this$scrollState2.listRect,
2256
- offset = _this$scrollState2.offset;
2257
- if (position === 'right') {
2258
- return false;
2259
- }
2260
- var controllerWidth = this.getControllerWidth();
2261
- var newOffset = offset - basicStep;
2262
- if (wrapperRect.width - controllerWidth - newOffset > listRect.width) {
2263
- newOffset = wrapperRect.width - listRect.width - controllerWidth;
2264
- this.scrollState.position = 'right';
2265
- } else {
2266
- this.scrollState.position = 'middle';
2267
- }
2268
- this.scrollState.offset = newOffset;
2269
- },
2270
- handleAddPanel: function handleAddPanel() {
2271
- this.$emit('add-panel');
2272
- },
2273
- handleClosePanel: function handleClosePanel(index, panel) {
2274
- this.$emit('close-panel', index, panel);
2275
- },
2276
- handleLabelHover: function handleLabelHover(panel) {
2277
- var _this7 = this;
2278
- if (!this.changeOnHover || panel.disabled || panel.name === this.localActive) {
2279
- return false;
2280
- }
2281
- this.handleClearHoverTimer();
2282
- this.hoverTimer = setTimeout(function () {
2283
- _this7.togglePanel(panel);
2284
- }, this.changeOnHoverDelay);
2285
- },
2286
- handleClearHoverTimer: function handleClearHoverTimer() {
2287
- this.hoverTimer && clearTimeout(this.hoverTimer);
2288
- this.hoverTimer = null;
2289
- }
2290
- }
2291
- };
2292
-
2293
- function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
2294
- , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
2295
- if (typeof shadowMode !== 'boolean') {
2296
- createInjectorSSR = createInjector;
2297
- createInjector = shadowMode;
2298
- shadowMode = false;
2299
- }
2300
- var options = typeof script === 'function' ? script.options : script;
2301
- if (template && template.render) {
2302
- options.render = template.render;
2303
- options.staticRenderFns = template.staticRenderFns;
2304
- options._compiled = true;
2305
- if (isFunctionalTemplate) {
2306
- options.functional = true;
2307
- }
2308
- }
2309
- if (scopeId) {
2310
- options._scopeId = scopeId;
2311
- }
2312
- var hook;
2313
- if (moduleIdentifier) {
2314
- hook = function hook(context) {
2315
- context = context ||
2316
- this.$vnode && this.$vnode.ssrContext ||
2317
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
2318
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
2319
- context = __VUE_SSR_CONTEXT__;
2320
- }
2321
- if (style) {
2322
- style.call(this, createInjectorSSR(context));
2323
- }
2324
- if (context && context._registeredComponents) {
2325
- context._registeredComponents.add(moduleIdentifier);
2326
- }
2327
- };
2328
- options._ssrRegister = hook;
2329
- } else if (style) {
2330
- hook = shadowMode ? function () {
2331
- style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
2332
- } : function (context) {
2333
- style.call(this, createInjector(context));
2334
- };
2335
- }
2336
- if (hook) {
2337
- if (options.functional) {
2338
- var originalRender = options.render;
2339
- options.render = function renderWithStyleInjection(h, context) {
2340
- hook.call(context);
2341
- return originalRender(h, context);
2342
- };
2343
- } else {
2344
- var existing = options.beforeCreate;
2345
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
2346
- }
2347
- }
2348
- return script;
2349
- }
2350
- var normalizeComponent_1 = normalizeComponent;
2351
-
2352
- /* script */
2353
- var __vue_script__ = script;
2354
- /* template */
2355
-
2356
- var __vue_render__ = function __vue_render__() {
2357
- var _vm = this;
2358
-
2359
- var _h = _vm.$createElement;
2360
-
2361
- var _c = _vm._self._c || _h;
2362
-
2363
- return _c('div', {
2364
- class: ['bk-tab', _vm.tabPosition === 'top' ? "bk-tab-" + _vm.type : "position-" + _vm.tabPosition, _vm.extCls],
2365
- style: _vm.tabStyle
2366
- }, [_c('div', {
2367
- directives: [{
2368
- name: "show",
2369
- rawName: "v-show",
2370
- value: _vm.showHeader,
2371
- expression: "showHeader"
2372
- }],
2373
- ref: "tabHeader",
2374
- staticClass: "bk-tab-header",
2375
- style: _vm.headerStyle
2376
- }, [_c('div', {
2377
- staticClass: "bk-tab-header-setting",
2378
- class: {
2379
- 'has-setting': _vm.$slots.setting
2380
- },
2381
- style: {
2382
- height: _vm.labelHeight + "px",
2383
- lineHeight: _vm.labelHeight + "px"
2384
- }
2385
- }, [_vm._t("setting")], 2), _c('div', {
2386
- ref: "labelWrapper",
2387
- staticClass: "bk-tab-label-wrapper",
2388
- class: {
2389
- 'has-scroller': _vm.scrollState.show && !_vm.isSidePosition,
2390
- 'has-add': _vm.addable && !_vm.isSidePosition
2391
- }
2392
- }, [_c('ul', {
2393
- ref: "labelList",
2394
- class: ['bk-tab-label-list', {
2395
- 'bk-tab-label-list-has-bar': _vm.hasActiveBar
2396
- }],
2397
- style: _vm.tabLabelListStyle
2398
- }, _vm._l(_vm.visiblePanels, function (panel, index) {
2399
- return _c("bk-tab-label", {
2400
- key: panel.name + index,
2401
- ref: "tabLabel",
2402
- refInFor: true,
2403
- tag: "li",
2404
- staticClass: "bk-tab-label-item",
2405
- class: {
2406
- active: panel.name === _vm.localActive,
2407
- 'is-first': index === 0,
2408
- 'is-last': index === _vm.visiblePanels.length - 1,
2409
- 'is-disabled': panel.disabled
2410
- },
2411
- style: {
2412
- lineHeight: _vm.labelHeight + "px"
2413
- },
2414
- attrs: {
2415
- "panel": panel,
2416
- "index": index,
2417
- "closable": _vm.closable,
2418
- "is-side-position": _vm.isSidePosition
2419
- },
2420
- nativeOn: {
2421
- "&mouseenter": function mouseenter($event) {
2422
- _vm.handleLabelHover(panel);
2423
- },
2424
- "&mouseleave": function mouseleave($event) {
2425
- _vm.handleClearHoverTimer(panel);
2426
- }
2427
- }
2428
- });
2429
- }), 1), _vm.addable && !_vm.isSidePosition ? _c('i', {
2430
- ref: "addController",
2431
- staticClass: "bk-tab-add-controller bk-icon icon-plus",
2432
- class: _vm.visiblePanels.length ? '' : 'left-border',
2433
- style: {
2434
- height: _vm.labelHeight + "px",
2435
- lineHeight: _vm.labelHeight + "px"
2436
- },
2437
- on: {
2438
- "click": _vm.handleAddPanel
2439
- }
2440
- }) : _vm._e(), _vm.scrollState.show ? [_c('i', {
2441
- ref: "prevController",
2442
- staticClass: "bk-tab-scroll-controller prev bk-icon icon-angle-left",
2443
- class: {
2444
- 'disabled': _vm.scrollState.position === 'left'
2445
- },
2446
- style: {
2447
- height: _vm.labelHeight - 1 + "px",
2448
- lineHeight: _vm.labelHeight + "px"
2449
- },
2450
- on: {
2451
- "click": _vm.stepToPrev
2452
- }
2453
- }), _c('i', {
2454
- ref: "nextController",
2455
- staticClass: "bk-tab-scroll-controller next bk-icon icon-angle-right",
2456
- class: {
2457
- 'disabled': _vm.scrollState.position === 'right'
2458
- },
2459
- style: {
2460
- height: _vm.labelHeight - 1 + "px",
2461
- lineHeight: _vm.labelHeight + "px"
2462
- },
2463
- on: {
2464
- "click": _vm.stepToNext
2465
- }
2466
- })] : _vm._e()], 2)]), _c('div', {
2467
- ref: "tabSection",
2468
- staticClass: "bk-tab-section"
2469
- }, [_vm._t("default")], 2)]);
2470
- };
2471
-
2472
- var __vue_staticRenderFns__ = [];
2473
- /* style */
2474
-
2475
- var __vue_inject_styles__ = undefined;
2476
- /* scoped */
2477
-
2478
- var __vue_scope_id__ = undefined;
2479
- /* module identifier */
2480
-
2481
- var __vue_module_identifier__ = undefined;
2482
- /* functional template */
2483
-
2484
- var __vue_is_functional_template__ = false;
2485
- /* style inject */
2486
-
2487
- /* style inject SSR */
2488
-
2489
- /* style inject shadow dom */
2490
-
2491
- var __vue_component__ = /*#__PURE__*/normalizeComponent_1({
2492
- render: __vue_render__,
2493
- staticRenderFns: __vue_staticRenderFns__
2494
- }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
2495
-
2496
- var _objectSap = function (KEY, exec) {
2497
- var fn = (_core.Object || {})[KEY] || Object[KEY];
2498
- var exp = {};
2499
- exp[KEY] = exec(fn);
2500
- _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp);
2501
- };
2502
-
2503
- _objectSap('keys', function () {
2504
- return function keys(it) {
2505
- return _objectKeys(_toObject(it));
2506
- };
2507
- });
2508
-
2509
- var keys = _core.Object.keys;
2510
-
2511
- var keys$1 = keys;
2512
-
2513
- function setInstaller (component, afterInstall) {
2514
- component.install = function (Vue) {
2515
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2516
- var props = component.props || {};
2517
- keys$1(options).forEach(function (key) {
2518
- if (props.hasOwnProperty(key)) {
2519
- if (typeof props[key] === 'function' || props[key] instanceof Array) {
2520
- props[key] = {
2521
- type: props[key],
2522
- default: options[key]
2523
- };
2524
- } else {
2525
- props[key].default = options[key];
2526
- }
2527
- }
2528
- });
2529
- component.name = options.namespace ? component.name.replace('bk', options.namespace) : component.name;
2530
- Vue.component(component.name, component);
2531
- typeof afterInstall === 'function' && afterInstall(Vue, options);
2532
- };
2533
- }
2534
-
2535
- setInstaller(__vue_component__);
2536
-
2537
- exports.default = __vue_component__;
2538
-
2539
- Object.defineProperty(exports, '__esModule', { value: true });
7
+ function _regeneratorRuntime() {
8
+ _regeneratorRuntime = function () {
9
+ return exports;
10
+ };
11
+ var exports = {},
12
+ Op = Object.prototype,
13
+ hasOwn = Op.hasOwnProperty,
14
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
15
+ obj[key] = desc.value;
16
+ },
17
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
18
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
19
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
20
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
21
+ function define(obj, key, value) {
22
+ return Object.defineProperty(obj, key, {
23
+ value: value,
24
+ enumerable: !0,
25
+ configurable: !0,
26
+ writable: !0
27
+ }), obj[key];
28
+ }
29
+ try {
30
+ define({}, "");
31
+ } catch (err) {
32
+ define = function (obj, key, value) {
33
+ return obj[key] = value;
34
+ };
35
+ }
36
+ function wrap(innerFn, outerFn, self, tryLocsList) {
37
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
38
+ generator = Object.create(protoGenerator.prototype),
39
+ context = new Context(tryLocsList || []);
40
+ return defineProperty(generator, "_invoke", {
41
+ value: makeInvokeMethod(innerFn, self, context)
42
+ }), generator;
43
+ }
44
+ function tryCatch(fn, obj, arg) {
45
+ try {
46
+ return {
47
+ type: "normal",
48
+ arg: fn.call(obj, arg)
49
+ };
50
+ } catch (err) {
51
+ return {
52
+ type: "throw",
53
+ arg: err
54
+ };
55
+ }
56
+ }
57
+ exports.wrap = wrap;
58
+ var ContinueSentinel = {};
59
+ function Generator() {}
60
+ function GeneratorFunction() {}
61
+ function GeneratorFunctionPrototype() {}
62
+ var IteratorPrototype = {};
63
+ define(IteratorPrototype, iteratorSymbol, function () {
64
+ return this;
65
+ });
66
+ var getProto = Object.getPrototypeOf,
67
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
68
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
69
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
70
+ function defineIteratorMethods(prototype) {
71
+ ["next", "throw", "return"].forEach(function (method) {
72
+ define(prototype, method, function (arg) {
73
+ return this._invoke(method, arg);
74
+ });
75
+ });
76
+ }
77
+ function AsyncIterator(generator, PromiseImpl) {
78
+ function invoke(method, arg, resolve, reject) {
79
+ var record = tryCatch(generator[method], generator, arg);
80
+ if ("throw" !== record.type) {
81
+ var result = record.arg,
82
+ value = result.value;
83
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
84
+ invoke("next", value, resolve, reject);
85
+ }, function (err) {
86
+ invoke("throw", err, resolve, reject);
87
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
88
+ result.value = unwrapped, resolve(result);
89
+ }, function (error) {
90
+ return invoke("throw", error, resolve, reject);
91
+ });
92
+ }
93
+ reject(record.arg);
94
+ }
95
+ var previousPromise;
96
+ defineProperty(this, "_invoke", {
97
+ value: function (method, arg) {
98
+ function callInvokeWithMethodAndArg() {
99
+ return new PromiseImpl(function (resolve, reject) {
100
+ invoke(method, arg, resolve, reject);
101
+ });
102
+ }
103
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
104
+ }
105
+ });
106
+ }
107
+ function makeInvokeMethod(innerFn, self, context) {
108
+ var state = "suspendedStart";
109
+ return function (method, arg) {
110
+ if ("executing" === state) throw new Error("Generator is already running");
111
+ if ("completed" === state) {
112
+ if ("throw" === method) throw arg;
113
+ return doneResult();
114
+ }
115
+ for (context.method = method, context.arg = arg;;) {
116
+ var delegate = context.delegate;
117
+ if (delegate) {
118
+ var delegateResult = maybeInvokeDelegate(delegate, context);
119
+ if (delegateResult) {
120
+ if (delegateResult === ContinueSentinel) continue;
121
+ return delegateResult;
122
+ }
123
+ }
124
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
125
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
126
+ context.dispatchException(context.arg);
127
+ } else "return" === context.method && context.abrupt("return", context.arg);
128
+ state = "executing";
129
+ var record = tryCatch(innerFn, self, context);
130
+ if ("normal" === record.type) {
131
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
132
+ return {
133
+ value: record.arg,
134
+ done: context.done
135
+ };
136
+ }
137
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
138
+ }
139
+ };
140
+ }
141
+ function maybeInvokeDelegate(delegate, context) {
142
+ var method = delegate.iterator[context.method];
143
+ if (undefined === method) {
144
+ if (context.delegate = null, "throw" === context.method) {
145
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
146
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
147
+ }
148
+ return ContinueSentinel;
149
+ }
150
+ var record = tryCatch(method, delegate.iterator, context.arg);
151
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
152
+ var info = record.arg;
153
+ 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);
154
+ }
155
+ function pushTryEntry(locs) {
156
+ var entry = {
157
+ tryLoc: locs[0]
158
+ };
159
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
160
+ }
161
+ function resetTryEntry(entry) {
162
+ var record = entry.completion || {};
163
+ record.type = "normal", delete record.arg, entry.completion = record;
164
+ }
165
+ function Context(tryLocsList) {
166
+ this.tryEntries = [{
167
+ tryLoc: "root"
168
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
169
+ }
170
+ function values(iterable) {
171
+ if (iterable) {
172
+ var iteratorMethod = iterable[iteratorSymbol];
173
+ if (iteratorMethod) return iteratorMethod.call(iterable);
174
+ if ("function" == typeof iterable.next) return iterable;
175
+ if (!isNaN(iterable.length)) {
176
+ var i = -1,
177
+ next = function next() {
178
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
179
+ return next.value = undefined, next.done = !0, next;
180
+ };
181
+ return next.next = next;
182
+ }
183
+ }
184
+ return {
185
+ next: doneResult
186
+ };
187
+ }
188
+ function doneResult() {
189
+ return {
190
+ value: undefined,
191
+ done: !0
192
+ };
193
+ }
194
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
195
+ value: GeneratorFunctionPrototype,
196
+ configurable: !0
197
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
198
+ value: GeneratorFunction,
199
+ configurable: !0
200
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
201
+ var ctor = "function" == typeof genFun && genFun.constructor;
202
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
203
+ }, exports.mark = function (genFun) {
204
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
205
+ }, exports.awrap = function (arg) {
206
+ return {
207
+ __await: arg
208
+ };
209
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
210
+ return this;
211
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
212
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
213
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
214
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
215
+ return result.done ? result.value : iter.next();
216
+ });
217
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
218
+ return this;
219
+ }), define(Gp, "toString", function () {
220
+ return "[object Generator]";
221
+ }), exports.keys = function (val) {
222
+ var object = Object(val),
223
+ keys = [];
224
+ for (var key in object) keys.push(key);
225
+ return keys.reverse(), function next() {
226
+ for (; keys.length;) {
227
+ var key = keys.pop();
228
+ if (key in object) return next.value = key, next.done = !1, next;
229
+ }
230
+ return next.done = !0, next;
231
+ };
232
+ }, exports.values = values, Context.prototype = {
233
+ constructor: Context,
234
+ reset: function (skipTempReset) {
235
+ 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) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
236
+ },
237
+ stop: function () {
238
+ this.done = !0;
239
+ var rootRecord = this.tryEntries[0].completion;
240
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
241
+ return this.rval;
242
+ },
243
+ dispatchException: function (exception) {
244
+ if (this.done) throw exception;
245
+ var context = this;
246
+ function handle(loc, caught) {
247
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
248
+ }
249
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
250
+ var entry = this.tryEntries[i],
251
+ record = entry.completion;
252
+ if ("root" === entry.tryLoc) return handle("end");
253
+ if (entry.tryLoc <= this.prev) {
254
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
255
+ hasFinally = hasOwn.call(entry, "finallyLoc");
256
+ if (hasCatch && hasFinally) {
257
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
258
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
259
+ } else if (hasCatch) {
260
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
261
+ } else {
262
+ if (!hasFinally) throw new Error("try statement without catch or finally");
263
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
264
+ }
265
+ }
266
+ }
267
+ },
268
+ abrupt: function (type, arg) {
269
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
270
+ var entry = this.tryEntries[i];
271
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
272
+ var finallyEntry = entry;
273
+ break;
274
+ }
275
+ }
276
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
277
+ var record = finallyEntry ? finallyEntry.completion : {};
278
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
279
+ },
280
+ complete: function (record, afterLoc) {
281
+ if ("throw" === record.type) throw record.arg;
282
+ 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;
283
+ },
284
+ finish: function (finallyLoc) {
285
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
286
+ var entry = this.tryEntries[i];
287
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
288
+ }
289
+ },
290
+ catch: function (tryLoc) {
291
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
292
+ var entry = this.tryEntries[i];
293
+ if (entry.tryLoc === tryLoc) {
294
+ var record = entry.completion;
295
+ if ("throw" === record.type) {
296
+ var thrown = record.arg;
297
+ resetTryEntry(entry);
298
+ }
299
+ return thrown;
300
+ }
301
+ }
302
+ throw new Error("illegal catch attempt");
303
+ },
304
+ delegateYield: function (iterable, resultName, nextLoc) {
305
+ return this.delegate = {
306
+ iterator: values(iterable),
307
+ resultName: resultName,
308
+ nextLoc: nextLoc
309
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
310
+ }
311
+ }, exports;
312
+ }
313
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
314
+ try {
315
+ var info = gen[key](arg);
316
+ var value = info.value;
317
+ } catch (error) {
318
+ reject(error);
319
+ return;
320
+ }
321
+ if (info.done) {
322
+ resolve(value);
323
+ } else {
324
+ Promise.resolve(value).then(_next, _throw);
325
+ }
326
+ }
327
+ function _asyncToGenerator(fn) {
328
+ return function () {
329
+ var self = this,
330
+ args = arguments;
331
+ return new Promise(function (resolve, reject) {
332
+ var gen = fn.apply(self, args);
333
+ function _next(value) {
334
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
335
+ }
336
+ function _throw(err) {
337
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
338
+ }
339
+ _next(undefined);
340
+ });
341
+ };
342
+ }
343
+
344
+ var ceil = Math.ceil;
345
+ var floor = Math.floor;
346
+ var _toInteger = function (it) {
347
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
348
+ };
349
+
350
+ var _defined = function (it) {
351
+ if (it == undefined) throw TypeError("Can't call method on " + it);
352
+ return it;
353
+ };
354
+
355
+ var _stringAt = function (TO_STRING) {
356
+ return function (that, pos) {
357
+ var s = String(_defined(that));
358
+ var i = _toInteger(pos);
359
+ var l = s.length;
360
+ var a, b;
361
+ if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
362
+ a = s.charCodeAt(i);
363
+ return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
364
+ ? TO_STRING ? s.charAt(i) : a
365
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
366
+ };
367
+ };
368
+
369
+ var _library = true;
370
+
371
+ function createCommonjsModule(fn, module) {
372
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
373
+ }
374
+
375
+ var _global = createCommonjsModule(function (module) {
376
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
377
+ ? window : typeof self != 'undefined' && self.Math == Math ? self
378
+ : Function('return this')();
379
+ if (typeof __g == 'number') __g = global;
380
+ });
381
+
382
+ var _core = createCommonjsModule(function (module) {
383
+ var core = module.exports = { version: '2.6.12' };
384
+ if (typeof __e == 'number') __e = core;
385
+ });
386
+ var _core_1 = _core.version;
387
+
388
+ var _aFunction = function (it) {
389
+ if (typeof it != 'function') throw TypeError(it + ' is not a function!');
390
+ return it;
391
+ };
392
+
393
+ var _ctx = function (fn, that, length) {
394
+ _aFunction(fn);
395
+ if (that === undefined) return fn;
396
+ switch (length) {
397
+ case 1: return function (a) {
398
+ return fn.call(that, a);
399
+ };
400
+ case 2: return function (a, b) {
401
+ return fn.call(that, a, b);
402
+ };
403
+ case 3: return function (a, b, c) {
404
+ return fn.call(that, a, b, c);
405
+ };
406
+ }
407
+ return function () {
408
+ return fn.apply(that, arguments);
409
+ };
410
+ };
411
+
412
+ var _isObject = function (it) {
413
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
414
+ };
415
+
416
+ var _anObject = function (it) {
417
+ if (!_isObject(it)) throw TypeError(it + ' is not an object!');
418
+ return it;
419
+ };
420
+
421
+ var _fails = function (exec) {
422
+ try {
423
+ return !!exec();
424
+ } catch (e) {
425
+ return true;
426
+ }
427
+ };
428
+
429
+ var _descriptors = !_fails(function () {
430
+ return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
431
+ });
432
+
433
+ var document$1 = _global.document;
434
+ var is = _isObject(document$1) && _isObject(document$1.createElement);
435
+ var _domCreate = function (it) {
436
+ return is ? document$1.createElement(it) : {};
437
+ };
438
+
439
+ var _ie8DomDefine = !_descriptors && !_fails(function () {
440
+ return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7;
441
+ });
442
+
443
+ var _toPrimitive = function (it, S) {
444
+ if (!_isObject(it)) return it;
445
+ var fn, val;
446
+ if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
447
+ if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;
448
+ if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
449
+ throw TypeError("Can't convert object to primitive value");
450
+ };
451
+
452
+ var dP = Object.defineProperty;
453
+ var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
454
+ _anObject(O);
455
+ P = _toPrimitive(P, true);
456
+ _anObject(Attributes);
457
+ if (_ie8DomDefine) try {
458
+ return dP(O, P, Attributes);
459
+ } catch (e) { }
460
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
461
+ if ('value' in Attributes) O[P] = Attributes.value;
462
+ return O;
463
+ };
464
+ var _objectDp = {
465
+ f: f
466
+ };
467
+
468
+ var _propertyDesc = function (bitmap, value) {
469
+ return {
470
+ enumerable: !(bitmap & 1),
471
+ configurable: !(bitmap & 2),
472
+ writable: !(bitmap & 4),
473
+ value: value
474
+ };
475
+ };
476
+
477
+ var _hide = _descriptors ? function (object, key, value) {
478
+ return _objectDp.f(object, key, _propertyDesc(1, value));
479
+ } : function (object, key, value) {
480
+ object[key] = value;
481
+ return object;
482
+ };
483
+
484
+ var hasOwnProperty = {}.hasOwnProperty;
485
+ var _has = function (it, key) {
486
+ return hasOwnProperty.call(it, key);
487
+ };
488
+
489
+ var PROTOTYPE = 'prototype';
490
+ var $export = function (type, name, source) {
491
+ var IS_FORCED = type & $export.F;
492
+ var IS_GLOBAL = type & $export.G;
493
+ var IS_STATIC = type & $export.S;
494
+ var IS_PROTO = type & $export.P;
495
+ var IS_BIND = type & $export.B;
496
+ var IS_WRAP = type & $export.W;
497
+ var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
498
+ var expProto = exports[PROTOTYPE];
499
+ var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE];
500
+ var key, own, out;
501
+ if (IS_GLOBAL) source = name;
502
+ for (key in source) {
503
+ own = !IS_FORCED && target && target[key] !== undefined;
504
+ if (own && _has(exports, key)) continue;
505
+ out = own ? target[key] : source[key];
506
+ exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
507
+ : IS_BIND && own ? _ctx(out, _global)
508
+ : IS_WRAP && target[key] == out ? (function (C) {
509
+ var F = function (a, b, c) {
510
+ if (this instanceof C) {
511
+ switch (arguments.length) {
512
+ case 0: return new C();
513
+ case 1: return new C(a);
514
+ case 2: return new C(a, b);
515
+ } return new C(a, b, c);
516
+ } return C.apply(this, arguments);
517
+ };
518
+ F[PROTOTYPE] = C[PROTOTYPE];
519
+ return F;
520
+ })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out;
521
+ if (IS_PROTO) {
522
+ (exports.virtual || (exports.virtual = {}))[key] = out;
523
+ if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out);
524
+ }
525
+ }
526
+ };
527
+ $export.F = 1;
528
+ $export.G = 2;
529
+ $export.S = 4;
530
+ $export.P = 8;
531
+ $export.B = 16;
532
+ $export.W = 32;
533
+ $export.U = 64;
534
+ $export.R = 128;
535
+ var _export = $export;
536
+
537
+ var _redefine = _hide;
538
+
539
+ var _iterators = {};
540
+
541
+ var toString = {}.toString;
542
+ var _cof = function (it) {
543
+ return toString.call(it).slice(8, -1);
544
+ };
545
+
546
+ var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
547
+ return _cof(it) == 'String' ? it.split('') : Object(it);
548
+ };
549
+
550
+ var _toIobject = function (it) {
551
+ return _iobject(_defined(it));
552
+ };
553
+
554
+ var min = Math.min;
555
+ var _toLength = function (it) {
556
+ return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0;
557
+ };
558
+
559
+ var max = Math.max;
560
+ var min$1 = Math.min;
561
+ var _toAbsoluteIndex = function (index, length) {
562
+ index = _toInteger(index);
563
+ return index < 0 ? max(index + length, 0) : min$1(index, length);
564
+ };
565
+
566
+ var _arrayIncludes = function (IS_INCLUDES) {
567
+ return function ($this, el, fromIndex) {
568
+ var O = _toIobject($this);
569
+ var length = _toLength(O.length);
570
+ var index = _toAbsoluteIndex(fromIndex, length);
571
+ var value;
572
+ if (IS_INCLUDES && el != el) while (length > index) {
573
+ value = O[index++];
574
+ if (value != value) return true;
575
+ } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
576
+ if (O[index] === el) return IS_INCLUDES || index || 0;
577
+ } return !IS_INCLUDES && -1;
578
+ };
579
+ };
580
+
581
+ var _shared = createCommonjsModule(function (module) {
582
+ var SHARED = '__core-js_shared__';
583
+ var store = _global[SHARED] || (_global[SHARED] = {});
584
+ (module.exports = function (key, value) {
585
+ return store[key] || (store[key] = value !== undefined ? value : {});
586
+ })('versions', []).push({
587
+ version: _core.version,
588
+ mode: 'pure' ,
589
+ copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
590
+ });
591
+ });
592
+
593
+ var id = 0;
594
+ var px = Math.random();
595
+ var _uid = function (key) {
596
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
597
+ };
598
+
599
+ var shared = _shared('keys');
600
+ var _sharedKey = function (key) {
601
+ return shared[key] || (shared[key] = _uid(key));
602
+ };
603
+
604
+ var arrayIndexOf = _arrayIncludes(false);
605
+ var IE_PROTO = _sharedKey('IE_PROTO');
606
+ var _objectKeysInternal = function (object, names) {
607
+ var O = _toIobject(object);
608
+ var i = 0;
609
+ var result = [];
610
+ var key;
611
+ for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key);
612
+ while (names.length > i) if (_has(O, key = names[i++])) {
613
+ ~arrayIndexOf(result, key) || result.push(key);
614
+ }
615
+ return result;
616
+ };
617
+
618
+ var _enumBugKeys = (
619
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
620
+ ).split(',');
621
+
622
+ var _objectKeys = Object.keys || function keys(O) {
623
+ return _objectKeysInternal(O, _enumBugKeys);
624
+ };
625
+
626
+ var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
627
+ _anObject(O);
628
+ var keys = _objectKeys(Properties);
629
+ var length = keys.length;
630
+ var i = 0;
631
+ var P;
632
+ while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]);
633
+ return O;
634
+ };
635
+
636
+ var document$2 = _global.document;
637
+ var _html = document$2 && document$2.documentElement;
638
+
639
+ var IE_PROTO$1 = _sharedKey('IE_PROTO');
640
+ var Empty = function () { };
641
+ var PROTOTYPE$1 = 'prototype';
642
+ var createDict = function () {
643
+ var iframe = _domCreate('iframe');
644
+ var i = _enumBugKeys.length;
645
+ var lt = '<';
646
+ var gt = '>';
647
+ var iframeDocument;
648
+ iframe.style.display = 'none';
649
+ _html.appendChild(iframe);
650
+ iframe.src = 'javascript:';
651
+ iframeDocument = iframe.contentWindow.document;
652
+ iframeDocument.open();
653
+ iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
654
+ iframeDocument.close();
655
+ createDict = iframeDocument.F;
656
+ while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]];
657
+ return createDict();
658
+ };
659
+ var _objectCreate = Object.create || function create(O, Properties) {
660
+ var result;
661
+ if (O !== null) {
662
+ Empty[PROTOTYPE$1] = _anObject(O);
663
+ result = new Empty();
664
+ Empty[PROTOTYPE$1] = null;
665
+ result[IE_PROTO$1] = O;
666
+ } else result = createDict();
667
+ return Properties === undefined ? result : _objectDps(result, Properties);
668
+ };
669
+
670
+ var _wks = createCommonjsModule(function (module) {
671
+ var store = _shared('wks');
672
+ var Symbol = _global.Symbol;
673
+ var USE_SYMBOL = typeof Symbol == 'function';
674
+ var $exports = module.exports = function (name) {
675
+ return store[name] || (store[name] =
676
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name));
677
+ };
678
+ $exports.store = store;
679
+ });
680
+
681
+ var def = _objectDp.f;
682
+ var TAG = _wks('toStringTag');
683
+ var _setToStringTag = function (it, tag, stat) {
684
+ if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
685
+ };
686
+
687
+ var IteratorPrototype = {};
688
+ _hide(IteratorPrototype, _wks('iterator'), function () { return this; });
689
+ var _iterCreate = function (Constructor, NAME, next) {
690
+ Constructor.prototype = _objectCreate(IteratorPrototype, { next: _propertyDesc(1, next) });
691
+ _setToStringTag(Constructor, NAME + ' Iterator');
692
+ };
693
+
694
+ var _toObject = function (it) {
695
+ return Object(_defined(it));
696
+ };
697
+
698
+ var IE_PROTO$2 = _sharedKey('IE_PROTO');
699
+ var ObjectProto = Object.prototype;
700
+ var _objectGpo = Object.getPrototypeOf || function (O) {
701
+ O = _toObject(O);
702
+ if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2];
703
+ if (typeof O.constructor == 'function' && O instanceof O.constructor) {
704
+ return O.constructor.prototype;
705
+ } return O instanceof Object ? ObjectProto : null;
706
+ };
707
+
708
+ var ITERATOR = _wks('iterator');
709
+ var BUGGY = !([].keys && 'next' in [].keys());
710
+ var FF_ITERATOR = '@@iterator';
711
+ var KEYS = 'keys';
712
+ var VALUES = 'values';
713
+ var returnThis = function () { return this; };
714
+ var _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
715
+ _iterCreate(Constructor, NAME, next);
716
+ var getMethod = function (kind) {
717
+ if (!BUGGY && kind in proto) return proto[kind];
718
+ switch (kind) {
719
+ case KEYS: return function keys() { return new Constructor(this, kind); };
720
+ case VALUES: return function values() { return new Constructor(this, kind); };
721
+ } return function entries() { return new Constructor(this, kind); };
722
+ };
723
+ var TAG = NAME + ' Iterator';
724
+ var DEF_VALUES = DEFAULT == VALUES;
725
+ var VALUES_BUG = false;
726
+ var proto = Base.prototype;
727
+ var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
728
+ var $default = $native || getMethod(DEFAULT);
729
+ var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
730
+ var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
731
+ var methods, key, IteratorPrototype;
732
+ if ($anyNative) {
733
+ IteratorPrototype = _objectGpo($anyNative.call(new Base()));
734
+ if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
735
+ _setToStringTag(IteratorPrototype, TAG, true);
736
+ }
737
+ }
738
+ if (DEF_VALUES && $native && $native.name !== VALUES) {
739
+ VALUES_BUG = true;
740
+ $default = function values() { return $native.call(this); };
741
+ }
742
+ if (( FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
743
+ _hide(proto, ITERATOR, $default);
744
+ }
745
+ _iterators[NAME] = $default;
746
+ _iterators[TAG] = returnThis;
747
+ if (DEFAULT) {
748
+ methods = {
749
+ values: DEF_VALUES ? $default : getMethod(VALUES),
750
+ keys: IS_SET ? $default : getMethod(KEYS),
751
+ entries: $entries
752
+ };
753
+ if (FORCED) for (key in methods) {
754
+ if (!(key in proto)) _redefine(proto, key, methods[key]);
755
+ } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods);
756
+ }
757
+ return methods;
758
+ };
759
+
760
+ var $at = _stringAt(true);
761
+ _iterDefine(String, 'String', function (iterated) {
762
+ this._t = String(iterated);
763
+ this._i = 0;
764
+ }, function () {
765
+ var O = this._t;
766
+ var index = this._i;
767
+ var point;
768
+ if (index >= O.length) return { value: undefined, done: true };
769
+ point = $at(O, index);
770
+ this._i += point.length;
771
+ return { value: point, done: false };
772
+ });
773
+
774
+ var _iterStep = function (done, value) {
775
+ return { value: value, done: !!done };
776
+ };
777
+
778
+ var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) {
779
+ this._t = _toIobject(iterated);
780
+ this._i = 0;
781
+ this._k = kind;
782
+ }, function () {
783
+ var O = this._t;
784
+ var kind = this._k;
785
+ var index = this._i++;
786
+ if (!O || index >= O.length) {
787
+ this._t = undefined;
788
+ return _iterStep(1);
789
+ }
790
+ if (kind == 'keys') return _iterStep(0, index);
791
+ if (kind == 'values') return _iterStep(0, O[index]);
792
+ return _iterStep(0, [index, O[index]]);
793
+ }, 'values');
794
+ _iterators.Arguments = _iterators.Array;
795
+
796
+ var TO_STRING_TAG = _wks('toStringTag');
797
+ var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
798
+ 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
799
+ 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
800
+ 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
801
+ 'TextTrackList,TouchList').split(',');
802
+ for (var i = 0; i < DOMIterables.length; i++) {
803
+ var NAME = DOMIterables[i];
804
+ var Collection = _global[NAME];
805
+ var proto = Collection && Collection.prototype;
806
+ if (proto && !proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME);
807
+ _iterators[NAME] = _iterators.Array;
808
+ }
809
+
810
+ var TAG$1 = _wks('toStringTag');
811
+ var ARG = _cof(function () { return arguments; }()) == 'Arguments';
812
+ var tryGet = function (it, key) {
813
+ try {
814
+ return it[key];
815
+ } catch (e) { }
816
+ };
817
+ var _classof = function (it) {
818
+ var O, T, B;
819
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
820
+ : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T
821
+ : ARG ? _cof(O)
822
+ : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
823
+ };
824
+
825
+ var _anInstance = function (it, Constructor, name, forbiddenField) {
826
+ if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
827
+ throw TypeError(name + ': incorrect invocation!');
828
+ } return it;
829
+ };
830
+
831
+ var _iterCall = function (iterator, fn, value, entries) {
832
+ try {
833
+ return entries ? fn(_anObject(value)[0], value[1]) : fn(value);
834
+ } catch (e) {
835
+ var ret = iterator['return'];
836
+ if (ret !== undefined) _anObject(ret.call(iterator));
837
+ throw e;
838
+ }
839
+ };
840
+
841
+ var ITERATOR$1 = _wks('iterator');
842
+ var ArrayProto = Array.prototype;
843
+ var _isArrayIter = function (it) {
844
+ return it !== undefined && (_iterators.Array === it || ArrayProto[ITERATOR$1] === it);
845
+ };
846
+
847
+ var ITERATOR$2 = _wks('iterator');
848
+ var core_getIteratorMethod = _core.getIteratorMethod = function (it) {
849
+ if (it != undefined) return it[ITERATOR$2]
850
+ || it['@@iterator']
851
+ || _iterators[_classof(it)];
852
+ };
853
+
854
+ var _forOf = createCommonjsModule(function (module) {
855
+ var BREAK = {};
856
+ var RETURN = {};
857
+ var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
858
+ var iterFn = ITERATOR ? function () { return iterable; } : core_getIteratorMethod(iterable);
859
+ var f = _ctx(fn, that, entries ? 2 : 1);
860
+ var index = 0;
861
+ var length, step, iterator, result;
862
+ if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
863
+ if (_isArrayIter(iterFn)) for (length = _toLength(iterable.length); length > index; index++) {
864
+ result = entries ? f(_anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
865
+ if (result === BREAK || result === RETURN) return result;
866
+ } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
867
+ result = _iterCall(iterator, f, step.value, entries);
868
+ if (result === BREAK || result === RETURN) return result;
869
+ }
870
+ };
871
+ exports.BREAK = BREAK;
872
+ exports.RETURN = RETURN;
873
+ });
874
+
875
+ var SPECIES = _wks('species');
876
+ var _speciesConstructor = function (O, D) {
877
+ var C = _anObject(O).constructor;
878
+ var S;
879
+ return C === undefined || (S = _anObject(C)[SPECIES]) == undefined ? D : _aFunction(S);
880
+ };
881
+
882
+ var _invoke = function (fn, args, that) {
883
+ var un = that === undefined;
884
+ switch (args.length) {
885
+ case 0: return un ? fn()
886
+ : fn.call(that);
887
+ case 1: return un ? fn(args[0])
888
+ : fn.call(that, args[0]);
889
+ case 2: return un ? fn(args[0], args[1])
890
+ : fn.call(that, args[0], args[1]);
891
+ case 3: return un ? fn(args[0], args[1], args[2])
892
+ : fn.call(that, args[0], args[1], args[2]);
893
+ case 4: return un ? fn(args[0], args[1], args[2], args[3])
894
+ : fn.call(that, args[0], args[1], args[2], args[3]);
895
+ } return fn.apply(that, args);
896
+ };
897
+
898
+ var process = _global.process;
899
+ var setTask = _global.setImmediate;
900
+ var clearTask = _global.clearImmediate;
901
+ var MessageChannel = _global.MessageChannel;
902
+ var Dispatch = _global.Dispatch;
903
+ var counter = 0;
904
+ var queue = {};
905
+ var ONREADYSTATECHANGE = 'onreadystatechange';
906
+ var defer, channel, port;
907
+ var run = function () {
908
+ var id = +this;
909
+ if (queue.hasOwnProperty(id)) {
910
+ var fn = queue[id];
911
+ delete queue[id];
912
+ fn();
913
+ }
914
+ };
915
+ var listener = function (event) {
916
+ run.call(event.data);
917
+ };
918
+ if (!setTask || !clearTask) {
919
+ setTask = function setImmediate(fn) {
920
+ var args = [];
921
+ var i = 1;
922
+ while (arguments.length > i) args.push(arguments[i++]);
923
+ queue[++counter] = function () {
924
+ _invoke(typeof fn == 'function' ? fn : Function(fn), args);
925
+ };
926
+ defer(counter);
927
+ return counter;
928
+ };
929
+ clearTask = function clearImmediate(id) {
930
+ delete queue[id];
931
+ };
932
+ if (_cof(process) == 'process') {
933
+ defer = function (id) {
934
+ process.nextTick(_ctx(run, id, 1));
935
+ };
936
+ } else if (Dispatch && Dispatch.now) {
937
+ defer = function (id) {
938
+ Dispatch.now(_ctx(run, id, 1));
939
+ };
940
+ } else if (MessageChannel) {
941
+ channel = new MessageChannel();
942
+ port = channel.port2;
943
+ channel.port1.onmessage = listener;
944
+ defer = _ctx(port.postMessage, port, 1);
945
+ } else if (_global.addEventListener && typeof postMessage == 'function' && !_global.importScripts) {
946
+ defer = function (id) {
947
+ _global.postMessage(id + '', '*');
948
+ };
949
+ _global.addEventListener('message', listener, false);
950
+ } else if (ONREADYSTATECHANGE in _domCreate('script')) {
951
+ defer = function (id) {
952
+ _html.appendChild(_domCreate('script'))[ONREADYSTATECHANGE] = function () {
953
+ _html.removeChild(this);
954
+ run.call(id);
955
+ };
956
+ };
957
+ } else {
958
+ defer = function (id) {
959
+ setTimeout(_ctx(run, id, 1), 0);
960
+ };
961
+ }
962
+ }
963
+ var _task = {
964
+ set: setTask,
965
+ clear: clearTask
966
+ };
967
+
968
+ var macrotask = _task.set;
969
+ var Observer = _global.MutationObserver || _global.WebKitMutationObserver;
970
+ var process$1 = _global.process;
971
+ var Promise$1 = _global.Promise;
972
+ var isNode = _cof(process$1) == 'process';
973
+ var _microtask = function () {
974
+ var head, last, notify;
975
+ var flush = function () {
976
+ var parent, fn;
977
+ if (isNode && (parent = process$1.domain)) parent.exit();
978
+ while (head) {
979
+ fn = head.fn;
980
+ head = head.next;
981
+ try {
982
+ fn();
983
+ } catch (e) {
984
+ if (head) notify();
985
+ else last = undefined;
986
+ throw e;
987
+ }
988
+ } last = undefined;
989
+ if (parent) parent.enter();
990
+ };
991
+ if (isNode) {
992
+ notify = function () {
993
+ process$1.nextTick(flush);
994
+ };
995
+ } else if (Observer && !(_global.navigator && _global.navigator.standalone)) {
996
+ var toggle = true;
997
+ var node = document.createTextNode('');
998
+ new Observer(flush).observe(node, { characterData: true });
999
+ notify = function () {
1000
+ node.data = toggle = !toggle;
1001
+ };
1002
+ } else if (Promise$1 && Promise$1.resolve) {
1003
+ var promise = Promise$1.resolve(undefined);
1004
+ notify = function () {
1005
+ promise.then(flush);
1006
+ };
1007
+ } else {
1008
+ notify = function () {
1009
+ macrotask.call(_global, flush);
1010
+ };
1011
+ }
1012
+ return function (fn) {
1013
+ var task = { fn: fn, next: undefined };
1014
+ if (last) last.next = task;
1015
+ if (!head) {
1016
+ head = task;
1017
+ notify();
1018
+ } last = task;
1019
+ };
1020
+ };
1021
+
1022
+ function PromiseCapability(C) {
1023
+ var resolve, reject;
1024
+ this.promise = new C(function ($$resolve, $$reject) {
1025
+ if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
1026
+ resolve = $$resolve;
1027
+ reject = $$reject;
1028
+ });
1029
+ this.resolve = _aFunction(resolve);
1030
+ this.reject = _aFunction(reject);
1031
+ }
1032
+ var f$1 = function (C) {
1033
+ return new PromiseCapability(C);
1034
+ };
1035
+ var _newPromiseCapability = {
1036
+ f: f$1
1037
+ };
1038
+
1039
+ var _perform = function (exec) {
1040
+ try {
1041
+ return { e: false, v: exec() };
1042
+ } catch (e) {
1043
+ return { e: true, v: e };
1044
+ }
1045
+ };
1046
+
1047
+ var navigator = _global.navigator;
1048
+ var _userAgent = navigator && navigator.userAgent || '';
1049
+
1050
+ var _promiseResolve = function (C, x) {
1051
+ _anObject(C);
1052
+ if (_isObject(x) && x.constructor === C) return x;
1053
+ var promiseCapability = _newPromiseCapability.f(C);
1054
+ var resolve = promiseCapability.resolve;
1055
+ resolve(x);
1056
+ return promiseCapability.promise;
1057
+ };
1058
+
1059
+ var _redefineAll = function (target, src, safe) {
1060
+ for (var key in src) {
1061
+ if (safe && target[key]) target[key] = src[key];
1062
+ else _hide(target, key, src[key]);
1063
+ } return target;
1064
+ };
1065
+
1066
+ var SPECIES$1 = _wks('species');
1067
+ var _setSpecies = function (KEY) {
1068
+ var C = typeof _core[KEY] == 'function' ? _core[KEY] : _global[KEY];
1069
+ if (_descriptors && C && !C[SPECIES$1]) _objectDp.f(C, SPECIES$1, {
1070
+ configurable: true,
1071
+ get: function () { return this; }
1072
+ });
1073
+ };
1074
+
1075
+ var ITERATOR$3 = _wks('iterator');
1076
+ var SAFE_CLOSING = false;
1077
+ try {
1078
+ var riter = [7][ITERATOR$3]();
1079
+ riter['return'] = function () { SAFE_CLOSING = true; };
1080
+ Array.from(riter, function () { throw 2; });
1081
+ } catch (e) { }
1082
+ var _iterDetect = function (exec, skipClosing) {
1083
+ if (!skipClosing && !SAFE_CLOSING) return false;
1084
+ var safe = false;
1085
+ try {
1086
+ var arr = [7];
1087
+ var iter = arr[ITERATOR$3]();
1088
+ iter.next = function () { return { done: safe = true }; };
1089
+ arr[ITERATOR$3] = function () { return iter; };
1090
+ exec(arr);
1091
+ } catch (e) { }
1092
+ return safe;
1093
+ };
1094
+
1095
+ var task = _task.set;
1096
+ var microtask = _microtask();
1097
+ var PROMISE = 'Promise';
1098
+ var TypeError$1 = _global.TypeError;
1099
+ var process$2 = _global.process;
1100
+ var versions = process$2 && process$2.versions;
1101
+ var v8 = versions && versions.v8 || '';
1102
+ var $Promise = _global[PROMISE];
1103
+ var isNode$1 = _classof(process$2) == 'process';
1104
+ var empty = function () { };
1105
+ var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
1106
+ var newPromiseCapability = newGenericPromiseCapability = _newPromiseCapability.f;
1107
+ var USE_NATIVE = !!function () {
1108
+ try {
1109
+ var promise = $Promise.resolve(1);
1110
+ var FakePromise = (promise.constructor = {})[_wks('species')] = function (exec) {
1111
+ exec(empty, empty);
1112
+ };
1113
+ return (isNode$1 || typeof PromiseRejectionEvent == 'function')
1114
+ && promise.then(empty) instanceof FakePromise
1115
+ && v8.indexOf('6.6') !== 0
1116
+ && _userAgent.indexOf('Chrome/66') === -1;
1117
+ } catch (e) { }
1118
+ }();
1119
+ var isThenable = function (it) {
1120
+ var then;
1121
+ return _isObject(it) && typeof (then = it.then) == 'function' ? then : false;
1122
+ };
1123
+ var notify = function (promise, isReject) {
1124
+ if (promise._n) return;
1125
+ promise._n = true;
1126
+ var chain = promise._c;
1127
+ microtask(function () {
1128
+ var value = promise._v;
1129
+ var ok = promise._s == 1;
1130
+ var i = 0;
1131
+ var run = function (reaction) {
1132
+ var handler = ok ? reaction.ok : reaction.fail;
1133
+ var resolve = reaction.resolve;
1134
+ var reject = reaction.reject;
1135
+ var domain = reaction.domain;
1136
+ var result, then, exited;
1137
+ try {
1138
+ if (handler) {
1139
+ if (!ok) {
1140
+ if (promise._h == 2) onHandleUnhandled(promise);
1141
+ promise._h = 1;
1142
+ }
1143
+ if (handler === true) result = value;
1144
+ else {
1145
+ if (domain) domain.enter();
1146
+ result = handler(value);
1147
+ if (domain) {
1148
+ domain.exit();
1149
+ exited = true;
1150
+ }
1151
+ }
1152
+ if (result === reaction.promise) {
1153
+ reject(TypeError$1('Promise-chain cycle'));
1154
+ } else if (then = isThenable(result)) {
1155
+ then.call(result, resolve, reject);
1156
+ } else resolve(result);
1157
+ } else reject(value);
1158
+ } catch (e) {
1159
+ if (domain && !exited) domain.exit();
1160
+ reject(e);
1161
+ }
1162
+ };
1163
+ while (chain.length > i) run(chain[i++]);
1164
+ promise._c = [];
1165
+ promise._n = false;
1166
+ if (isReject && !promise._h) onUnhandled(promise);
1167
+ });
1168
+ };
1169
+ var onUnhandled = function (promise) {
1170
+ task.call(_global, function () {
1171
+ var value = promise._v;
1172
+ var unhandled = isUnhandled(promise);
1173
+ var result, handler, console;
1174
+ if (unhandled) {
1175
+ result = _perform(function () {
1176
+ if (isNode$1) {
1177
+ process$2.emit('unhandledRejection', value, promise);
1178
+ } else if (handler = _global.onunhandledrejection) {
1179
+ handler({ promise: promise, reason: value });
1180
+ } else if ((console = _global.console) && console.error) {
1181
+ console.error('Unhandled promise rejection', value);
1182
+ }
1183
+ });
1184
+ promise._h = isNode$1 || isUnhandled(promise) ? 2 : 1;
1185
+ } promise._a = undefined;
1186
+ if (unhandled && result.e) throw result.v;
1187
+ });
1188
+ };
1189
+ var isUnhandled = function (promise) {
1190
+ return promise._h !== 1 && (promise._a || promise._c).length === 0;
1191
+ };
1192
+ var onHandleUnhandled = function (promise) {
1193
+ task.call(_global, function () {
1194
+ var handler;
1195
+ if (isNode$1) {
1196
+ process$2.emit('rejectionHandled', promise);
1197
+ } else if (handler = _global.onrejectionhandled) {
1198
+ handler({ promise: promise, reason: promise._v });
1199
+ }
1200
+ });
1201
+ };
1202
+ var $reject = function (value) {
1203
+ var promise = this;
1204
+ if (promise._d) return;
1205
+ promise._d = true;
1206
+ promise = promise._w || promise;
1207
+ promise._v = value;
1208
+ promise._s = 2;
1209
+ if (!promise._a) promise._a = promise._c.slice();
1210
+ notify(promise, true);
1211
+ };
1212
+ var $resolve = function (value) {
1213
+ var promise = this;
1214
+ var then;
1215
+ if (promise._d) return;
1216
+ promise._d = true;
1217
+ promise = promise._w || promise;
1218
+ try {
1219
+ if (promise === value) throw TypeError$1("Promise can't be resolved itself");
1220
+ if (then = isThenable(value)) {
1221
+ microtask(function () {
1222
+ var wrapper = { _w: promise, _d: false };
1223
+ try {
1224
+ then.call(value, _ctx($resolve, wrapper, 1), _ctx($reject, wrapper, 1));
1225
+ } catch (e) {
1226
+ $reject.call(wrapper, e);
1227
+ }
1228
+ });
1229
+ } else {
1230
+ promise._v = value;
1231
+ promise._s = 1;
1232
+ notify(promise, false);
1233
+ }
1234
+ } catch (e) {
1235
+ $reject.call({ _w: promise, _d: false }, e);
1236
+ }
1237
+ };
1238
+ if (!USE_NATIVE) {
1239
+ $Promise = function Promise(executor) {
1240
+ _anInstance(this, $Promise, PROMISE, '_h');
1241
+ _aFunction(executor);
1242
+ Internal.call(this);
1243
+ try {
1244
+ executor(_ctx($resolve, this, 1), _ctx($reject, this, 1));
1245
+ } catch (err) {
1246
+ $reject.call(this, err);
1247
+ }
1248
+ };
1249
+ Internal = function Promise(executor) {
1250
+ this._c = [];
1251
+ this._a = undefined;
1252
+ this._s = 0;
1253
+ this._d = false;
1254
+ this._v = undefined;
1255
+ this._h = 0;
1256
+ this._n = false;
1257
+ };
1258
+ Internal.prototype = _redefineAll($Promise.prototype, {
1259
+ then: function then(onFulfilled, onRejected) {
1260
+ var reaction = newPromiseCapability(_speciesConstructor(this, $Promise));
1261
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
1262
+ reaction.fail = typeof onRejected == 'function' && onRejected;
1263
+ reaction.domain = isNode$1 ? process$2.domain : undefined;
1264
+ this._c.push(reaction);
1265
+ if (this._a) this._a.push(reaction);
1266
+ if (this._s) notify(this, false);
1267
+ return reaction.promise;
1268
+ },
1269
+ 'catch': function (onRejected) {
1270
+ return this.then(undefined, onRejected);
1271
+ }
1272
+ });
1273
+ OwnPromiseCapability = function () {
1274
+ var promise = new Internal();
1275
+ this.promise = promise;
1276
+ this.resolve = _ctx($resolve, promise, 1);
1277
+ this.reject = _ctx($reject, promise, 1);
1278
+ };
1279
+ _newPromiseCapability.f = newPromiseCapability = function (C) {
1280
+ return C === $Promise || C === Wrapper
1281
+ ? new OwnPromiseCapability(C)
1282
+ : newGenericPromiseCapability(C);
1283
+ };
1284
+ }
1285
+ _export(_export.G + _export.W + _export.F * !USE_NATIVE, { Promise: $Promise });
1286
+ _setToStringTag($Promise, PROMISE);
1287
+ _setSpecies(PROMISE);
1288
+ Wrapper = _core[PROMISE];
1289
+ _export(_export.S + _export.F * !USE_NATIVE, PROMISE, {
1290
+ reject: function reject(r) {
1291
+ var capability = newPromiseCapability(this);
1292
+ var $$reject = capability.reject;
1293
+ $$reject(r);
1294
+ return capability.promise;
1295
+ }
1296
+ });
1297
+ _export(_export.S + _export.F * (_library ), PROMISE, {
1298
+ resolve: function resolve(x) {
1299
+ return _promiseResolve( this === Wrapper ? $Promise : this, x);
1300
+ }
1301
+ });
1302
+ _export(_export.S + _export.F * !(USE_NATIVE && _iterDetect(function (iter) {
1303
+ $Promise.all(iter)['catch'](empty);
1304
+ })), PROMISE, {
1305
+ all: function all(iterable) {
1306
+ var C = this;
1307
+ var capability = newPromiseCapability(C);
1308
+ var resolve = capability.resolve;
1309
+ var reject = capability.reject;
1310
+ var result = _perform(function () {
1311
+ var values = [];
1312
+ var index = 0;
1313
+ var remaining = 1;
1314
+ _forOf(iterable, false, function (promise) {
1315
+ var $index = index++;
1316
+ var alreadyCalled = false;
1317
+ values.push(undefined);
1318
+ remaining++;
1319
+ C.resolve(promise).then(function (value) {
1320
+ if (alreadyCalled) return;
1321
+ alreadyCalled = true;
1322
+ values[$index] = value;
1323
+ --remaining || resolve(values);
1324
+ }, reject);
1325
+ });
1326
+ --remaining || resolve(values);
1327
+ });
1328
+ if (result.e) reject(result.v);
1329
+ return capability.promise;
1330
+ },
1331
+ race: function race(iterable) {
1332
+ var C = this;
1333
+ var capability = newPromiseCapability(C);
1334
+ var reject = capability.reject;
1335
+ var result = _perform(function () {
1336
+ _forOf(iterable, false, function (promise) {
1337
+ C.resolve(promise).then(capability.resolve, reject);
1338
+ });
1339
+ });
1340
+ if (result.e) reject(result.v);
1341
+ return capability.promise;
1342
+ }
1343
+ });
1344
+
1345
+ _export(_export.P + _export.R, 'Promise', { 'finally': function (onFinally) {
1346
+ var C = _speciesConstructor(this, _core.Promise || _global.Promise);
1347
+ var isFunction = typeof onFinally == 'function';
1348
+ return this.then(
1349
+ isFunction ? function (x) {
1350
+ return _promiseResolve(C, onFinally()).then(function () { return x; });
1351
+ } : onFinally,
1352
+ isFunction ? function (e) {
1353
+ return _promiseResolve(C, onFinally()).then(function () { throw e; });
1354
+ } : onFinally
1355
+ );
1356
+ } });
1357
+
1358
+ _export(_export.S, 'Promise', { 'try': function (callbackfn) {
1359
+ var promiseCapability = _newPromiseCapability.f(this);
1360
+ var result = _perform(callbackfn);
1361
+ (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
1362
+ return promiseCapability.promise;
1363
+ } });
1364
+
1365
+ var promise = _core.Promise;
1366
+
1367
+ var promise$1 = promise;
1368
+
1369
+ function throttle (delay, noTrailing, callback, debounceMode) {
1370
+ var timeoutID;
1371
+ var cancelled = false;
1372
+ var lastExec = 0;
1373
+ function clearExistingTimeout() {
1374
+ if (timeoutID) {
1375
+ clearTimeout(timeoutID);
1376
+ }
1377
+ }
1378
+ function cancel() {
1379
+ clearExistingTimeout();
1380
+ cancelled = true;
1381
+ }
1382
+ if (typeof noTrailing !== 'boolean') {
1383
+ debounceMode = callback;
1384
+ callback = noTrailing;
1385
+ noTrailing = undefined;
1386
+ }
1387
+ function wrapper() {
1388
+ var self = this;
1389
+ var elapsed = Date.now() - lastExec;
1390
+ var args = arguments;
1391
+ if (cancelled) {
1392
+ return;
1393
+ }
1394
+ function exec() {
1395
+ lastExec = Date.now();
1396
+ callback.apply(self, args);
1397
+ }
1398
+ function clear() {
1399
+ timeoutID = undefined;
1400
+ }
1401
+ if (debounceMode && !timeoutID) {
1402
+ exec();
1403
+ }
1404
+ clearExistingTimeout();
1405
+ if (debounceMode === undefined && elapsed > delay) {
1406
+ exec();
1407
+ } else if (noTrailing !== true) {
1408
+ timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
1409
+ }
1410
+ }
1411
+ wrapper.cancel = cancel;
1412
+ return wrapper;
1413
+ }
1414
+ function debounce (delay, atBegin, callback) {
1415
+ return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
1416
+ }
1417
+
1418
+ var requestFrame = function () {
1419
+ var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) {
1420
+ return window.setTimeout(fn, 20);
1421
+ };
1422
+ return function (fn) {
1423
+ return raf(fn);
1424
+ };
1425
+ }();
1426
+ var cancelFrame = function () {
1427
+ var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
1428
+ return function (id) {
1429
+ return cancel(id);
1430
+ };
1431
+ }();
1432
+ var resetTrigger = function resetTrigger(element) {
1433
+ var trigger = element.__resizeTrigger__;
1434
+ var expand = trigger.firstElementChild;
1435
+ var contract = trigger.lastElementChild;
1436
+ var expandChild = expand.firstElementChild;
1437
+ contract.scrollLeft = contract.scrollWidth;
1438
+ contract.scrollTop = contract.scrollHeight;
1439
+ expandChild.style.width = expand.offsetWidth + 1 + 'px';
1440
+ expandChild.style.height = expand.offsetHeight + 1 + 'px';
1441
+ expand.scrollLeft = expand.scrollWidth;
1442
+ expand.scrollTop = expand.scrollHeight;
1443
+ };
1444
+ var checkTriggers = function checkTriggers(element) {
1445
+ return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;
1446
+ };
1447
+ var scrollListener = function scrollListener(event) {
1448
+ var _this = this;
1449
+ resetTrigger(this);
1450
+ if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);
1451
+ this.__resizeRAF__ = requestFrame(function () {
1452
+ if (checkTriggers(_this)) {
1453
+ _this.__resizeLast__.width = _this.offsetWidth;
1454
+ _this.__resizeLast__.height = _this.offsetHeight;
1455
+ _this.__resizeListeners__.forEach(function (fn) {
1456
+ fn.call(_this, event);
1457
+ });
1458
+ }
1459
+ });
1460
+ };
1461
+ var attachEvent = document.attachEvent;
1462
+ var DOM_PREFIXES = 'Webkit Moz O ms'.split(' ');
1463
+ var START_EVENTS = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' ');
1464
+ var RESIZE_ANIMATION_NAME = 'resizeanim';
1465
+ var animation = false;
1466
+ var keyFramePrefix = '';
1467
+ var animationStartEvent = 'animationstart';
1468
+ if (!attachEvent) {
1469
+ var testElement = document.createElement('fakeelement');
1470
+ if (testElement.style.animationName !== undefined) {
1471
+ animation = true;
1472
+ }
1473
+ if (animation === false) {
1474
+ var prefix = '';
1475
+ for (var i$1 = 0; i$1 < DOM_PREFIXES.length; i$1++) {
1476
+ if (testElement.style[DOM_PREFIXES[i$1] + 'AnimationName'] !== undefined) {
1477
+ prefix = DOM_PREFIXES[i$1];
1478
+ keyFramePrefix = '-' + prefix.toLowerCase() + '-';
1479
+ animationStartEvent = START_EVENTS[i$1];
1480
+ animation = true;
1481
+ break;
1482
+ }
1483
+ }
1484
+ }
1485
+ }
1486
+ var stylesCreated = false;
1487
+ var createStyles = function createStyles() {
1488
+ if (!stylesCreated) {
1489
+ var animationKeyframes = "@".concat(keyFramePrefix, "keyframes ").concat(RESIZE_ANIMATION_NAME, " { from { opacity: 0; } to { opacity: 0; } } ");
1490
+ var animationStyle = "".concat(keyFramePrefix, "animation: 1ms ").concat(RESIZE_ANIMATION_NAME, ";");
1491
+ var css = "".concat(animationKeyframes, "\n .resize-triggers { ").concat(animationStyle, " visibility: hidden; opacity: 0; }\n .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1 }\n .resize-triggers > div { background: #eee; overflow: auto; }\n .contract-trigger:before { width: 200%; height: 200%; }");
1492
+ var head = document.head || document.getElementsByTagName('head')[0];
1493
+ var style = document.createElement('style');
1494
+ style.type = 'text/css';
1495
+ if (style.styleSheet) {
1496
+ style.styleSheet.cssText = css;
1497
+ } else {
1498
+ style.appendChild(document.createTextNode(css));
1499
+ }
1500
+ head.appendChild(style);
1501
+ stylesCreated = true;
1502
+ }
1503
+ };
1504
+ var addResizeListener = function addResizeListener(element, fn) {
1505
+ if (attachEvent) {
1506
+ element.attachEvent('onresize', fn);
1507
+ } else {
1508
+ if (!element.__resizeTrigger__) {
1509
+ if (getComputedStyle(element).position === 'static') {
1510
+ element.style.position = 'relative';
1511
+ }
1512
+ createStyles();
1513
+ element.__resizeLast__ = {};
1514
+ element.__resizeListeners__ = [];
1515
+ var resizeTrigger = element.__resizeTrigger__ = document.createElement('div');
1516
+ resizeTrigger.className = 'resize-triggers';
1517
+ resizeTrigger.innerHTML = '<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';
1518
+ element.appendChild(resizeTrigger);
1519
+ resetTrigger(element);
1520
+ element.addEventListener('scroll', scrollListener, true);
1521
+ if (animationStartEvent) {
1522
+ resizeTrigger.addEventListener(animationStartEvent, function (event) {
1523
+ if (event.animationName === RESIZE_ANIMATION_NAME) {
1524
+ resetTrigger(element);
1525
+ }
1526
+ });
1527
+ }
1528
+ }
1529
+ element.__resizeListeners__.push(fn);
1530
+ }
1531
+ };
1532
+ var removeResizeListener = function removeResizeListener(element, fn) {
1533
+ if (!element || !element.__resizeListeners__) return;
1534
+ if (attachEvent) {
1535
+ element.detachEvent('onresize', fn);
1536
+ } else {
1537
+ element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
1538
+ if (!element.__resizeListeners__.length) {
1539
+ element.removeEventListener('scroll', scrollListener);
1540
+ element.__resizeTrigger__ = !element.removeChild(element.__resizeTrigger__);
1541
+ }
1542
+ }
1543
+ };
1544
+
1545
+ var bkTabLabel = {
1546
+ name: 'bk-tab-label',
1547
+ props: ['panel', 'index', 'closable', 'isSidePosition'],
1548
+ render: function render(h) {
1549
+ var _this = this;
1550
+ var _this$panel = this.panel,
1551
+ renderLabel = _this$panel.renderLabel,
1552
+ $slots = _this$panel.$slots,
1553
+ label = _this$panel.label,
1554
+ name = _this$panel.name;
1555
+ var labelContent = renderLabel && renderLabel(h, name) || $slots.label || label;
1556
+ return h("li", {
1557
+ "on": {
1558
+ "click": function click() {
1559
+ return _this.$parent.togglePanel(_this.panel);
1560
+ }
1561
+ },
1562
+ "class": this.showClose && !this.isSidePosition ? 'has-close' : ''
1563
+ }, [h("div", {
1564
+ "class": "bk-tab-label"
1565
+ }, [labelContent]), this.showClose ? h("i", {
1566
+ "class": "bk-tab-close-controller",
1567
+ "on": {
1568
+ "click": function click($event) {
1569
+ return _this.handleClosePanel($event);
1570
+ }
1571
+ }
1572
+ }) : '']);
1573
+ },
1574
+ computed: {
1575
+ showClose: function showClose() {
1576
+ if (this.panel.disabled) {
1577
+ return false;
1578
+ }
1579
+ if (this.panel.closable !== undefined) {
1580
+ return this.panel.closable;
1581
+ }
1582
+ return this.closable;
1583
+ }
1584
+ },
1585
+ methods: {
1586
+ handleClosePanel: function handleClosePanel(event) {
1587
+ event.stopPropagation();
1588
+ this.$parent.handleClosePanel(this.index, this.panel);
1589
+ }
1590
+ }
1591
+ };
1592
+
1593
+ var script = {
1594
+ name: 'bk-tab',
1595
+ components: {
1596
+ bkTabLabel: bkTabLabel
1597
+ },
1598
+ props: {
1599
+ active: {
1600
+ type: [String, Number],
1601
+ default: ''
1602
+ },
1603
+ type: {
1604
+ type: String,
1605
+ default: 'border-card',
1606
+ validator: function validator(val) {
1607
+ return ['card', 'border-card', 'unborder-card', 'vertical-card'].includes(val);
1608
+ }
1609
+ },
1610
+ tabPosition: {
1611
+ type: String,
1612
+ default: 'top',
1613
+ validator: function validator(val) {
1614
+ return ['left', 'right', 'top'].includes(val);
1615
+ }
1616
+ },
1617
+ scrollStep: {
1618
+ type: Number,
1619
+ default: 200
1620
+ },
1621
+ validateActive: {
1622
+ type: Boolean,
1623
+ default: true
1624
+ },
1625
+ closable: Boolean,
1626
+ addable: Boolean,
1627
+ beforeToggle: Function,
1628
+ extCls: {
1629
+ type: String,
1630
+ default: ''
1631
+ },
1632
+ showHeader: {
1633
+ type: Boolean,
1634
+ default: true
1635
+ },
1636
+ changeOnHover: Boolean,
1637
+ changeOnHoverDelay: {
1638
+ type: Number,
1639
+ default: 1000
1640
+ },
1641
+ labelHeight: {
1642
+ type: Number,
1643
+ default: 50,
1644
+ validator: function validator(val) {
1645
+ if (val < 42) {
1646
+ console.error('选项卡 label 的高度,最小值为 42');
1647
+ return false;
1648
+ }
1649
+ return true;
1650
+ }
1651
+ }
1652
+ },
1653
+ data: function data() {
1654
+ return {
1655
+ isTab: true,
1656
+ localActive: this.active,
1657
+ scrollState: {
1658
+ show: false,
1659
+ position: 'left',
1660
+ offset: 0,
1661
+ basicStep: this.scrollStep,
1662
+ wrapperRect: null,
1663
+ listRect: null
1664
+ },
1665
+ panelInstance: [],
1666
+ resizeHandler: null,
1667
+ promise: {
1668
+ toggle: {
1669
+ previousPanel: null,
1670
+ rejector: null
1671
+ }
1672
+ },
1673
+ hoverTimer: null,
1674
+ activeBarStyle: {
1675
+ left: 0,
1676
+ width: 0,
1677
+ height: 0,
1678
+ transform: ''
1679
+ }
1680
+ };
1681
+ },
1682
+ computed: {
1683
+ panelNames: function panelNames() {
1684
+ return this.panelInstance.map(function (panel) {
1685
+ return panel.name;
1686
+ });
1687
+ },
1688
+ activePanel: function activePanel() {
1689
+ var _this = this;
1690
+ return this.panelInstance.find(function (panel) {
1691
+ return panel.name === _this.localActive;
1692
+ });
1693
+ },
1694
+ visiblePanels: function visiblePanels() {
1695
+ return this.panelInstance.filter(function (panel) {
1696
+ return panel.visible;
1697
+ });
1698
+ },
1699
+ tabStyle: function tabStyle() {
1700
+ if (this.isSidePosition) {
1701
+ var paddingValue = 21;
1702
+ return {
1703
+ minHeight: "".concat(this.labelHeight * 4 + paddingValue, "px")
1704
+ };
1705
+ }
1706
+ return {};
1707
+ },
1708
+ headerStyle: function headerStyle() {
1709
+ if (this.tabPosition === 'top') {
1710
+ var diffValue = this.type === 'border-card' ? 2 : 1;
1711
+ return {
1712
+ height: "".concat(this.labelHeight, "px"),
1713
+ backgroundImage: "linear-gradient(transparent ".concat(this.labelHeight - diffValue, "px, #dcdee5 1px)")
1714
+ };
1715
+ }
1716
+ return {};
1717
+ },
1718
+ isSidePosition: function isSidePosition() {
1719
+ return ['left', 'right'].includes(this.tabPosition);
1720
+ },
1721
+ isEmpty: function isEmpty() {
1722
+ return this.panelInstance.length < 1;
1723
+ },
1724
+ hasActiveBar: function hasActiveBar() {
1725
+ return (this.type === 'unborder-card' || this.isSidePosition) && !this.isEmpty;
1726
+ },
1727
+ tabLabelListStyle: function tabLabelListStyle() {
1728
+ if (this.isEmpty) {
1729
+ return {};
1730
+ }
1731
+ if (this.hasActiveBar) {
1732
+ return {
1733
+ transform: "translateX(".concat(this.scrollState.offset, "px)"),
1734
+ height: "".concat(this.labelHeight, "px"),
1735
+ '--activeBarLeft': this.activeBarStyle.left,
1736
+ '--activeBarWidth': this.activeBarStyle.width,
1737
+ '--activeBarHeight': this.activeBarStyle.height,
1738
+ '--activeBarTransform': this.activeBarStyle.transform
1739
+ };
1740
+ }
1741
+ return {
1742
+ transform: "translateX(".concat(this.scrollState.offset, "px)"),
1743
+ height: "".concat(this.labelHeight, "px")
1744
+ };
1745
+ }
1746
+ },
1747
+ watch: {
1748
+ panelNames: function panelNames(names) {
1749
+ this.checkActiveName();
1750
+ },
1751
+ active: function active(_active) {
1752
+ this.updateActiveBarPosition(_active);
1753
+ if (this.localActive !== _active) {
1754
+ this.localActive = _active;
1755
+ if (this.promise.toggle.rejector) {
1756
+ this.promise.toggle.rejector(false);
1757
+ this.clearToggleStatus();
1758
+ }
1759
+ }
1760
+ },
1761
+ localActive: function localActive(_localActive) {
1762
+ if (_localActive !== this.active) {
1763
+ this.$emit('update:active', _localActive);
1764
+ this.$emit('tab-change', _localActive, this.activePanel);
1765
+ this.updateActivePosition(_localActive);
1766
+ }
1767
+ },
1768
+ showHeader: function showHeader(value) {
1769
+ if (value) {
1770
+ this.resizeHandler();
1771
+ }
1772
+ },
1773
+ tabPosition: function tabPosition() {
1774
+ this.updateActiveBarPosition(this.localActive);
1775
+ }
1776
+ },
1777
+ created: function created() {
1778
+ this.resizeHandler = debounce(100, this.calculateScroller);
1779
+ },
1780
+ mounted: function mounted() {
1781
+ this.updateActiveBarPosition(this.localActive);
1782
+ addResizeListener(this.$refs.labelList, this.resizeHandler);
1783
+ addResizeListener(this.$refs.labelWrapper, this.resizeHandler);
1784
+ this.caluclateVerticalPadding();
1785
+ },
1786
+ beforeDestroy: function beforeDestroy() {
1787
+ removeResizeListener(this.$refs.labelList, this.resizeHandler);
1788
+ removeResizeListener(this.$refs.labelWrapper, this.resizeHandler);
1789
+ },
1790
+ methods: {
1791
+ caluclateVerticalPadding: function caluclateVerticalPadding() {
1792
+ var _this2 = this;
1793
+ if (this.type !== 'vertical-card') return;
1794
+ this.$nextTick(function () {
1795
+ var width = _this2.$refs.tabHeader.offsetWidth;
1796
+ _this2.$refs.tabSection.style["padding-".concat(_this2.verticalPosition)] = "".concat(width + 20, "px");
1797
+ });
1798
+ },
1799
+ registerPanel: function registerPanel(panel) {
1800
+ this.panelInstance.push(panel);
1801
+ },
1802
+ deletePanel: function deletePanel(panel) {
1803
+ var index = this.panelInstance.indexOf(panel);
1804
+ if (index !== -1) {
1805
+ this.panelInstance.splice(index, 1);
1806
+ }
1807
+ },
1808
+ togglePanel: function togglePanel(panel) {
1809
+ var _this3 = this;
1810
+ return _asyncToGenerator( _regeneratorRuntime().mark(function _callee2() {
1811
+ var toggleStatus, shouldToggle;
1812
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1813
+ while (1) {
1814
+ switch (_context2.prev = _context2.next) {
1815
+ case 0:
1816
+ if (!panel.disabled) {
1817
+ _context2.next = 2;
1818
+ break;
1819
+ }
1820
+ return _context2.abrupt("return", false);
1821
+ case 2:
1822
+ _this3.handleClearHoverTimer();
1823
+ toggleStatus = _this3.promise.toggle;
1824
+ if (!(panel.name === _this3.localActive)) {
1825
+ _context2.next = 7;
1826
+ break;
1827
+ }
1828
+ if (toggleStatus.rejector) {
1829
+ toggleStatus.rejector(false);
1830
+ }
1831
+ return _context2.abrupt("return", false);
1832
+ case 7:
1833
+ if (!(typeof _this3.beforeToggle === 'function')) {
1834
+ _context2.next = 29;
1835
+ break;
1836
+ }
1837
+ if (!toggleStatus.previousPanel) {
1838
+ _context2.next = 14;
1839
+ break;
1840
+ }
1841
+ if (!(toggleStatus.previousPanel === panel)) {
1842
+ _context2.next = 13;
1843
+ break;
1844
+ }
1845
+ return _context2.abrupt("return", false);
1846
+ case 13:
1847
+ toggleStatus.rejector(false);
1848
+ case 14:
1849
+ _context2.prev = 14;
1850
+ _context2.next = 17;
1851
+ return new promise$1( function () {
1852
+ var _ref = _asyncToGenerator( _regeneratorRuntime().mark(function _callee(resolve, reject) {
1853
+ var confirmed;
1854
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1855
+ while (1) {
1856
+ switch (_context.prev = _context.next) {
1857
+ case 0:
1858
+ toggleStatus.previousPanel = panel;
1859
+ toggleStatus.rejector = reject;
1860
+ _context.next = 4;
1861
+ return _this3.beforeToggle(panel.name, panel);
1862
+ case 4:
1863
+ confirmed = _context.sent;
1864
+ confirmed ? resolve(confirmed) : reject(confirmed);
1865
+ case 6:
1866
+ case "end":
1867
+ return _context.stop();
1868
+ }
1869
+ }
1870
+ }, _callee);
1871
+ }));
1872
+ return function (_x, _x2) {
1873
+ return _ref.apply(this, arguments);
1874
+ };
1875
+ }());
1876
+ case 17:
1877
+ shouldToggle = _context2.sent;
1878
+ if (shouldToggle) {
1879
+ _this3.localActive = panel.name;
1880
+ }
1881
+ _context2.next = 24;
1882
+ break;
1883
+ case 21:
1884
+ _context2.prev = 21;
1885
+ _context2.t0 = _context2["catch"](14);
1886
+ console.log('Previous tab toggle canceled');
1887
+ case 24:
1888
+ _context2.prev = 24;
1889
+ _this3.clearToggleStatus();
1890
+ return _context2.finish(24);
1891
+ case 27:
1892
+ _context2.next = 30;
1893
+ break;
1894
+ case 29:
1895
+ _this3.localActive = panel.name;
1896
+ case 30:
1897
+ case "end":
1898
+ return _context2.stop();
1899
+ }
1900
+ }
1901
+ }, _callee2, null, [[14, 21, 24, 27]]);
1902
+ }))();
1903
+ },
1904
+ clearToggleStatus: function clearToggleStatus() {
1905
+ this.promise.toggle = {
1906
+ previousPanel: null,
1907
+ rejector: null
1908
+ };
1909
+ },
1910
+ checkActiveName: function checkActiveName() {
1911
+ if (this.validateActive && !this.panelNames.includes(this.localActive)) {
1912
+ var newActivePanel = this.panelInstance.length ? this.panelInstance[0] : null;
1913
+ this.localActive = newActivePanel ? newActivePanel.name : '';
1914
+ }
1915
+ },
1916
+ calculateScroller: function calculateScroller() {
1917
+ var _this4 = this;
1918
+ if (!this.showHeader) {
1919
+ return false;
1920
+ }
1921
+ this.$nextTick(function () {
1922
+ var _this4$$refs = _this4.$refs,
1923
+ labelWrapper = _this4$$refs.labelWrapper,
1924
+ labelList = _this4$$refs.labelList,
1925
+ addController = _this4$$refs.addController;
1926
+ var labelWrapperRect = labelWrapper.getBoundingClientRect();
1927
+ var labelListRect = labelList.getBoundingClientRect();
1928
+ var addControllerRect = addController ? addController.getBoundingClientRect() : {
1929
+ width: 0
1930
+ };
1931
+ _this4.scrollState.show = labelListRect.width + addControllerRect.width > labelWrapperRect.width;
1932
+ if (!_this4.scrollState.show) {
1933
+ _this4.scrollState.offset = 0;
1934
+ _this4.scrollState.position = 'left';
1935
+ } else {
1936
+ _this4.compensateOffset(labelWrapperRect, labelListRect);
1937
+ }
1938
+ _this4.scrollState.wrapperRect = labelWrapperRect;
1939
+ _this4.scrollState.listRect = labelListRect;
1940
+ _this4.updateActivePosition(_this4.localActive);
1941
+ });
1942
+ },
1943
+ compensateOffset: function compensateOffset(newWrapperRect, newListRect) {
1944
+ var oldWrapperRect = this.scrollState.wrapperRect;
1945
+ if (!oldWrapperRect) {
1946
+ return false;
1947
+ }
1948
+ var overplusWidth = newWrapperRect.width - this.scrollState.offset - newListRect.width;
1949
+ if (overplusWidth > 0) {
1950
+ this.scrollState.offset = newWrapperRect.width - newListRect.width - this.getControllerWidth();
1951
+ this.scrollState.position = 'right';
1952
+ } else {
1953
+ this.scrollState.position = this.scrollState.position === 'left' ? 'left' : 'middle';
1954
+ }
1955
+ },
1956
+ getControllerWidth: function getControllerWidth() {
1957
+ return this.getLeftControllerWidth() + this.getRightControllerWidth();
1958
+ },
1959
+ getLeftControllerWidth: function getLeftControllerWidth() {
1960
+ var prevController = this.$refs.prevController;
1961
+ var controllers = [prevController];
1962
+ var width = 0;
1963
+ controllers.forEach(function (controller) {
1964
+ width += controller ? controller.offsetWidth : 0;
1965
+ });
1966
+ return width;
1967
+ },
1968
+ getRightControllerWidth: function getRightControllerWidth() {
1969
+ var _this$$refs = this.$refs,
1970
+ nextController = _this$$refs.nextController,
1971
+ addController = _this$$refs.addController;
1972
+ var controllers = [nextController, addController];
1973
+ var width = 0;
1974
+ controllers.forEach(function (controller) {
1975
+ width += controller ? controller.offsetWidth : 0;
1976
+ });
1977
+ return width;
1978
+ },
1979
+ updateActiveBarPosition: function updateActiveBarPosition(active) {
1980
+ var _this5 = this;
1981
+ if (!this.showHeader) {
1982
+ return false;
1983
+ }
1984
+ this.$nextTick(function () {
1985
+ var index = _this5.panelNames.indexOf(active);
1986
+ if (index !== -1) {
1987
+ var tabLabel = _this5.$refs.tabLabel[index].$el;
1988
+ var tabLabelRect = tabLabel.getBoundingClientRect();
1989
+ if (!_this5.isSidePosition) {
1990
+ _this5.activeBarStyle.width = "".concat(tabLabelRect.width - 24, "px");
1991
+ _this5.activeBarStyle.height = '2px';
1992
+ _this5.activeBarStyle.transform = "translateX(".concat(tabLabel.offsetLeft + 12, "px)");
1993
+ _this5.activeBarStyle.left = 0;
1994
+ } else {
1995
+ _this5.activeBarStyle.width = '2px';
1996
+ _this5.activeBarStyle.height = "".concat(tabLabelRect.height, "px");
1997
+ _this5.activeBarStyle.transform = "translateY(".concat(tabLabel.offsetTop, "px)");
1998
+ if (_this5.tabPosition === 'right') {
1999
+ _this5.activeBarStyle.left = 0;
2000
+ } else {
2001
+ _this5.activeBarStyle.left = "".concat(tabLabelRect.width - 2, "px");
2002
+ }
2003
+ }
2004
+ }
2005
+ });
2006
+ },
2007
+ updateActivePosition: function updateActivePosition(active) {
2008
+ var _this6 = this;
2009
+ if (!this.scrollState.show || !this.showHeader) {
2010
+ return false;
2011
+ }
2012
+ this.$nextTick(function () {
2013
+ var index = _this6.panelNames.indexOf(active);
2014
+ if (index !== -1) {
2015
+ var _this6$scrollState = _this6.scrollState,
2016
+ wrapperRect = _this6$scrollState.wrapperRect,
2017
+ listRect = _this6$scrollState.listRect;
2018
+ var tabLabel = _this6.$refs.tabLabel[index].$el;
2019
+ var tabLabelRect = tabLabel.getBoundingClientRect();
2020
+ var labelWrapperWidth = wrapperRect.width - _this6.getControllerWidth();
2021
+ var leftThreshold = tabLabel.offsetLeft;
2022
+ var rightThreshold = Math.abs(tabLabel.offsetLeft - labelWrapperWidth + tabLabelRect.width);
2023
+ var isLeftOutside = tabLabelRect.left < wrapperRect.left + _this6.getLeftControllerWidth();
2024
+ var isRightOutside = tabLabelRect.right > wrapperRect.right - _this6.getRightControllerWidth();
2025
+ if (isLeftOutside) {
2026
+ _this6.scrollState.offset = -1 * leftThreshold;
2027
+ _this6.scrollState.position = leftThreshold ? 'middle' : 'left';
2028
+ } else if (isRightOutside) {
2029
+ _this6.scrollState.offset = -1 * rightThreshold;
2030
+ _this6.scrollState.position = listRect.width - rightThreshold === labelWrapperWidth ? 'right' : 'middle';
2031
+ }
2032
+ }
2033
+ });
2034
+ },
2035
+ stepToPrev: function stepToPrev() {
2036
+ var _this$scrollState = this.scrollState,
2037
+ position = _this$scrollState.position,
2038
+ basicStep = _this$scrollState.basicStep,
2039
+ offset = _this$scrollState.offset;
2040
+ if (position === 'left') {
2041
+ return false;
2042
+ }
2043
+ var newOffset = offset + basicStep;
2044
+ if (newOffset > 0) {
2045
+ newOffset = 0;
2046
+ this.scrollState.position = 'left';
2047
+ } else {
2048
+ this.scrollState.position = 'middle';
2049
+ }
2050
+ this.scrollState.offset = newOffset;
2051
+ },
2052
+ stepToNext: function stepToNext() {
2053
+ var _this$scrollState2 = this.scrollState,
2054
+ position = _this$scrollState2.position,
2055
+ basicStep = _this$scrollState2.basicStep,
2056
+ wrapperRect = _this$scrollState2.wrapperRect,
2057
+ listRect = _this$scrollState2.listRect,
2058
+ offset = _this$scrollState2.offset;
2059
+ if (position === 'right') {
2060
+ return false;
2061
+ }
2062
+ var controllerWidth = this.getControllerWidth();
2063
+ var newOffset = offset - basicStep;
2064
+ if (wrapperRect.width - controllerWidth - newOffset > listRect.width) {
2065
+ newOffset = wrapperRect.width - listRect.width - controllerWidth;
2066
+ this.scrollState.position = 'right';
2067
+ } else {
2068
+ this.scrollState.position = 'middle';
2069
+ }
2070
+ this.scrollState.offset = newOffset;
2071
+ },
2072
+ handleAddPanel: function handleAddPanel() {
2073
+ this.$emit('add-panel');
2074
+ },
2075
+ handleClosePanel: function handleClosePanel(index, panel) {
2076
+ this.$emit('close-panel', index, panel);
2077
+ },
2078
+ handleLabelHover: function handleLabelHover(panel) {
2079
+ var _this7 = this;
2080
+ if (!this.changeOnHover || panel.disabled || panel.name === this.localActive) {
2081
+ return false;
2082
+ }
2083
+ this.handleClearHoverTimer();
2084
+ this.hoverTimer = setTimeout(function () {
2085
+ _this7.togglePanel(panel);
2086
+ }, this.changeOnHoverDelay);
2087
+ },
2088
+ handleClearHoverTimer: function handleClearHoverTimer() {
2089
+ this.hoverTimer && clearTimeout(this.hoverTimer);
2090
+ this.hoverTimer = null;
2091
+ }
2092
+ }
2093
+ };
2094
+
2095
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
2096
+ , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
2097
+ if (typeof shadowMode !== 'boolean') {
2098
+ createInjectorSSR = createInjector;
2099
+ createInjector = shadowMode;
2100
+ shadowMode = false;
2101
+ }
2102
+ var options = typeof script === 'function' ? script.options : script;
2103
+ if (template && template.render) {
2104
+ options.render = template.render;
2105
+ options.staticRenderFns = template.staticRenderFns;
2106
+ options._compiled = true;
2107
+ if (isFunctionalTemplate) {
2108
+ options.functional = true;
2109
+ }
2110
+ }
2111
+ if (scopeId) {
2112
+ options._scopeId = scopeId;
2113
+ }
2114
+ var hook;
2115
+ if (moduleIdentifier) {
2116
+ hook = function hook(context) {
2117
+ context = context ||
2118
+ this.$vnode && this.$vnode.ssrContext ||
2119
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
2120
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
2121
+ context = __VUE_SSR_CONTEXT__;
2122
+ }
2123
+ if (style) {
2124
+ style.call(this, createInjectorSSR(context));
2125
+ }
2126
+ if (context && context._registeredComponents) {
2127
+ context._registeredComponents.add(moduleIdentifier);
2128
+ }
2129
+ };
2130
+ options._ssrRegister = hook;
2131
+ } else if (style) {
2132
+ hook = shadowMode ? function () {
2133
+ style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
2134
+ } : function (context) {
2135
+ style.call(this, createInjector(context));
2136
+ };
2137
+ }
2138
+ if (hook) {
2139
+ if (options.functional) {
2140
+ var originalRender = options.render;
2141
+ options.render = function renderWithStyleInjection(h, context) {
2142
+ hook.call(context);
2143
+ return originalRender(h, context);
2144
+ };
2145
+ } else {
2146
+ var existing = options.beforeCreate;
2147
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
2148
+ }
2149
+ }
2150
+ return script;
2151
+ }
2152
+ var normalizeComponent_1 = normalizeComponent;
2153
+
2154
+ /* script */
2155
+ var __vue_script__ = script;
2156
+ /* template */
2157
+ var __vue_render__ = function __vue_render__() {
2158
+ var _vm = this;
2159
+ var _h = _vm.$createElement;
2160
+ var _c = _vm._self._c || _h;
2161
+ return _c('div', {
2162
+ class: ['bk-tab', _vm.tabPosition === 'top' ? "bk-tab-" + _vm.type : "position-" + _vm.tabPosition, _vm.extCls],
2163
+ style: _vm.tabStyle
2164
+ }, [_c('div', {
2165
+ directives: [{
2166
+ name: "show",
2167
+ rawName: "v-show",
2168
+ value: _vm.showHeader,
2169
+ expression: "showHeader"
2170
+ }],
2171
+ ref: "tabHeader",
2172
+ staticClass: "bk-tab-header",
2173
+ style: _vm.headerStyle
2174
+ }, [_c('div', {
2175
+ staticClass: "bk-tab-header-setting",
2176
+ class: {
2177
+ 'has-setting': _vm.$slots.setting
2178
+ },
2179
+ style: {
2180
+ height: _vm.labelHeight + "px",
2181
+ lineHeight: _vm.labelHeight + "px"
2182
+ }
2183
+ }, [_vm._t("setting")], 2), _c('div', {
2184
+ ref: "labelWrapper",
2185
+ staticClass: "bk-tab-label-wrapper",
2186
+ class: {
2187
+ 'has-scroller': _vm.scrollState.show && !_vm.isSidePosition,
2188
+ 'has-add': _vm.addable && !_vm.isSidePosition
2189
+ }
2190
+ }, [_c('ul', {
2191
+ ref: "labelList",
2192
+ class: ['bk-tab-label-list', {
2193
+ 'bk-tab-label-list-has-bar': _vm.hasActiveBar
2194
+ }],
2195
+ style: _vm.tabLabelListStyle
2196
+ }, _vm._l(_vm.visiblePanels, function (panel, index) {
2197
+ return _c("bk-tab-label", {
2198
+ key: panel.name + index,
2199
+ ref: "tabLabel",
2200
+ refInFor: true,
2201
+ tag: "li",
2202
+ staticClass: "bk-tab-label-item",
2203
+ class: {
2204
+ active: panel.name === _vm.localActive,
2205
+ 'is-first': index === 0,
2206
+ 'is-last': index === _vm.visiblePanels.length - 1,
2207
+ 'is-disabled': panel.disabled
2208
+ },
2209
+ style: {
2210
+ lineHeight: _vm.labelHeight + "px"
2211
+ },
2212
+ attrs: {
2213
+ "panel": panel,
2214
+ "index": index,
2215
+ "closable": _vm.closable,
2216
+ "is-side-position": _vm.isSidePosition
2217
+ },
2218
+ nativeOn: {
2219
+ "&mouseenter": function mouseenter($event) {
2220
+ return _vm.handleLabelHover(panel);
2221
+ },
2222
+ "&mouseleave": function mouseleave($event) {
2223
+ return _vm.handleClearHoverTimer(panel);
2224
+ }
2225
+ }
2226
+ });
2227
+ }), 1), _vm.addable && !_vm.isSidePosition ? _c('i', {
2228
+ ref: "addController",
2229
+ staticClass: "bk-tab-add-controller bk-icon icon-plus",
2230
+ class: _vm.visiblePanels.length ? '' : 'left-border',
2231
+ style: {
2232
+ height: _vm.labelHeight + "px",
2233
+ lineHeight: _vm.labelHeight + "px"
2234
+ },
2235
+ on: {
2236
+ "click": _vm.handleAddPanel
2237
+ }
2238
+ }) : _vm._e(), _vm.scrollState.show ? [_c('i', {
2239
+ ref: "prevController",
2240
+ staticClass: "bk-tab-scroll-controller prev bk-icon icon-angle-left",
2241
+ class: {
2242
+ 'disabled': _vm.scrollState.position === 'left'
2243
+ },
2244
+ style: {
2245
+ height: _vm.labelHeight - 1 + "px",
2246
+ lineHeight: _vm.labelHeight + "px"
2247
+ },
2248
+ on: {
2249
+ "click": _vm.stepToPrev
2250
+ }
2251
+ }), _c('i', {
2252
+ ref: "nextController",
2253
+ staticClass: "bk-tab-scroll-controller next bk-icon icon-angle-right",
2254
+ class: {
2255
+ 'disabled': _vm.scrollState.position === 'right'
2256
+ },
2257
+ style: {
2258
+ height: _vm.labelHeight - 1 + "px",
2259
+ lineHeight: _vm.labelHeight + "px"
2260
+ },
2261
+ on: {
2262
+ "click": _vm.stepToNext
2263
+ }
2264
+ })] : _vm._e()], 2)]), _c('div', {
2265
+ ref: "tabSection",
2266
+ staticClass: "bk-tab-section"
2267
+ }, [_vm._t("default")], 2)]);
2268
+ };
2269
+ var __vue_staticRenderFns__ = [];
2270
+
2271
+ /* style */
2272
+ var __vue_inject_styles__ = undefined;
2273
+ /* scoped */
2274
+ var __vue_scope_id__ = undefined;
2275
+ /* module identifier */
2276
+ var __vue_module_identifier__ = undefined;
2277
+ /* functional template */
2278
+ var __vue_is_functional_template__ = false;
2279
+ /* style inject */
2280
+
2281
+ /* style inject SSR */
2282
+
2283
+ /* style inject shadow dom */
2284
+
2285
+ var __vue_component__ = /*#__PURE__*/normalizeComponent_1({
2286
+ render: __vue_render__,
2287
+ staticRenderFns: __vue_staticRenderFns__
2288
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
2289
+
2290
+ var _objectSap = function (KEY, exec) {
2291
+ var fn = (_core.Object || {})[KEY] || Object[KEY];
2292
+ var exp = {};
2293
+ exp[KEY] = exec(fn);
2294
+ _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp);
2295
+ };
2296
+
2297
+ _objectSap('keys', function () {
2298
+ return function keys(it) {
2299
+ return _objectKeys(_toObject(it));
2300
+ };
2301
+ });
2302
+
2303
+ var keys = _core.Object.keys;
2304
+
2305
+ var keys$1 = keys;
2306
+
2307
+ function setInstaller (component, afterInstall) {
2308
+ component.install = function (Vue) {
2309
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2310
+ var props = component.props || {};
2311
+ keys$1(options).forEach(function (key) {
2312
+ if (props.hasOwnProperty(key)) {
2313
+ if (typeof props[key] === 'function' || props[key] instanceof Array) {
2314
+ props[key] = {
2315
+ type: props[key],
2316
+ default: options[key]
2317
+ };
2318
+ } else {
2319
+ props[key].default = options[key];
2320
+ }
2321
+ }
2322
+ });
2323
+ component.name = options.namespace ? component.name.replace('bk', options.namespace) : component.name;
2324
+ Vue.component(component.name, component);
2325
+ typeof afterInstall === 'function' && afterInstall(Vue, options);
2326
+ };
2327
+ }
2328
+
2329
+ setInstaller(__vue_component__);
2330
+
2331
+ exports.default = __vue_component__;
2332
+
2333
+ Object.defineProperty(exports, '__esModule', { value: true });
2540
2334
 
2541
2335
  }));