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
@@ -1,1257 +1,1051 @@
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
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
511
- try {
512
- var info = gen[key](arg);
513
- var value = info.value;
514
- } catch (error) {
515
- reject(error);
516
- return;
517
- }
518
-
519
- if (info.done) {
520
- resolve(value);
521
- } else {
522
- Promise.resolve(value).then(_next, _throw);
523
- }
524
- }
525
-
526
- function _asyncToGenerator(fn) {
527
- return function () {
528
- var self = this,
529
- args = arguments;
530
- return new Promise(function (resolve, reject) {
531
- var gen = fn.apply(self, args);
532
-
533
- function _next(value) {
534
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
535
- }
536
-
537
- function _throw(err) {
538
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
539
- }
540
-
541
- _next(undefined);
542
- });
543
- };
544
- }
545
-
546
- function _extends() {
547
- _extends = Object.assign || function (target) {
548
- for (var i = 1; i < arguments.length; i++) {
549
- var source = arguments[i];
550
-
551
- for (var key in source) {
552
- if (Object.prototype.hasOwnProperty.call(source, key)) {
553
- target[key] = source[key];
554
- }
555
- }
556
- }
557
-
558
- return target;
559
- };
560
-
561
- return _extends.apply(this, arguments);
562
- }
563
-
564
- var _defined = function (it) {
565
- if (it == undefined) throw TypeError("Can't call method on " + it);
566
- return it;
567
- };
568
-
569
- var _toObject = function (it) {
570
- return Object(_defined(it));
571
- };
572
-
573
- var hasOwnProperty = {}.hasOwnProperty;
574
- var _has = function (it, key) {
575
- return hasOwnProperty.call(it, key);
576
- };
577
-
578
- var toString = {}.toString;
579
- var _cof = function (it) {
580
- return toString.call(it).slice(8, -1);
581
- };
582
-
583
- var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
584
- return _cof(it) == 'String' ? it.split('') : Object(it);
585
- };
586
-
587
- var _toIobject = function (it) {
588
- return _iobject(_defined(it));
589
- };
590
-
591
- var ceil = Math.ceil;
592
- var floor = Math.floor;
593
- var _toInteger = function (it) {
594
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
595
- };
596
-
597
- var min = Math.min;
598
- var _toLength = function (it) {
599
- return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0;
600
- };
601
-
602
- var max = Math.max;
603
- var min$1 = Math.min;
604
- var _toAbsoluteIndex = function (index, length) {
605
- index = _toInteger(index);
606
- return index < 0 ? max(index + length, 0) : min$1(index, length);
607
- };
608
-
609
- var _arrayIncludes = function (IS_INCLUDES) {
610
- return function ($this, el, fromIndex) {
611
- var O = _toIobject($this);
612
- var length = _toLength(O.length);
613
- var index = _toAbsoluteIndex(fromIndex, length);
614
- var value;
615
- if (IS_INCLUDES && el != el) while (length > index) {
616
- value = O[index++];
617
- if (value != value) return true;
618
- } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
619
- if (O[index] === el) return IS_INCLUDES || index || 0;
620
- } return !IS_INCLUDES && -1;
621
- };
622
- };
623
-
624
- var _core = createCommonjsModule(function (module) {
625
- var core = module.exports = { version: '2.6.12' };
626
- if (typeof __e == 'number') __e = core;
627
- });
628
- var _core_1 = _core.version;
629
-
630
- var _global = createCommonjsModule(function (module) {
631
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
632
- ? window : typeof self != 'undefined' && self.Math == Math ? self
633
- : Function('return this')();
634
- if (typeof __g == 'number') __g = global;
635
- });
636
-
637
- var _shared = createCommonjsModule(function (module) {
638
- var SHARED = '__core-js_shared__';
639
- var store = _global[SHARED] || (_global[SHARED] = {});
640
- (module.exports = function (key, value) {
641
- return store[key] || (store[key] = value !== undefined ? value : {});
642
- })('versions', []).push({
643
- version: _core.version,
644
- mode: 'pure' ,
645
- copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
646
- });
647
- });
648
-
649
- var id = 0;
650
- var px = Math.random();
651
- var _uid = function (key) {
652
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
653
- };
654
-
655
- var shared = _shared('keys');
656
- var _sharedKey = function (key) {
657
- return shared[key] || (shared[key] = _uid(key));
658
- };
659
-
660
- var arrayIndexOf = _arrayIncludes(false);
661
- var IE_PROTO = _sharedKey('IE_PROTO');
662
- var _objectKeysInternal = function (object, names) {
663
- var O = _toIobject(object);
664
- var i = 0;
665
- var result = [];
666
- var key;
667
- for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key);
668
- while (names.length > i) if (_has(O, key = names[i++])) {
669
- ~arrayIndexOf(result, key) || result.push(key);
670
- }
671
- return result;
672
- };
673
-
674
- var _enumBugKeys = (
675
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
676
- ).split(',');
677
-
678
- var _objectKeys = Object.keys || function keys(O) {
679
- return _objectKeysInternal(O, _enumBugKeys);
680
- };
681
-
682
- var _aFunction = function (it) {
683
- if (typeof it != 'function') throw TypeError(it + ' is not a function!');
684
- return it;
685
- };
686
-
687
- var _ctx = function (fn, that, length) {
688
- _aFunction(fn);
689
- if (that === undefined) return fn;
690
- switch (length) {
691
- case 1: return function (a) {
692
- return fn.call(that, a);
693
- };
694
- case 2: return function (a, b) {
695
- return fn.call(that, a, b);
696
- };
697
- case 3: return function (a, b, c) {
698
- return fn.call(that, a, b, c);
699
- };
700
- }
701
- return function () {
702
- return fn.apply(that, arguments);
703
- };
704
- };
705
-
706
- var _isObject = function (it) {
707
- return typeof it === 'object' ? it !== null : typeof it === 'function';
708
- };
709
-
710
- var _anObject = function (it) {
711
- if (!_isObject(it)) throw TypeError(it + ' is not an object!');
712
- return it;
713
- };
714
-
715
- var _fails = function (exec) {
716
- try {
717
- return !!exec();
718
- } catch (e) {
719
- return true;
720
- }
721
- };
722
-
723
- var _descriptors = !_fails(function () {
724
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
725
- });
726
-
727
- var document = _global.document;
728
- var is = _isObject(document) && _isObject(document.createElement);
729
- var _domCreate = function (it) {
730
- return is ? document.createElement(it) : {};
731
- };
732
-
733
- var _ie8DomDefine = !_descriptors && !_fails(function () {
734
- return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7;
735
- });
736
-
737
- var _toPrimitive = function (it, S) {
738
- if (!_isObject(it)) return it;
739
- var fn, val;
740
- if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
741
- if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;
742
- if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
743
- throw TypeError("Can't convert object to primitive value");
744
- };
745
-
746
- var dP = Object.defineProperty;
747
- var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
748
- _anObject(O);
749
- P = _toPrimitive(P, true);
750
- _anObject(Attributes);
751
- if (_ie8DomDefine) try {
752
- return dP(O, P, Attributes);
753
- } catch (e) { }
754
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
755
- if ('value' in Attributes) O[P] = Attributes.value;
756
- return O;
757
- };
758
- var _objectDp = {
759
- f: f
760
- };
761
-
762
- var _propertyDesc = function (bitmap, value) {
763
- return {
764
- enumerable: !(bitmap & 1),
765
- configurable: !(bitmap & 2),
766
- writable: !(bitmap & 4),
767
- value: value
768
- };
769
- };
770
-
771
- var _hide = _descriptors ? function (object, key, value) {
772
- return _objectDp.f(object, key, _propertyDesc(1, value));
773
- } : function (object, key, value) {
774
- object[key] = value;
775
- return object;
776
- };
777
-
778
- var PROTOTYPE = 'prototype';
779
- var $export = function (type, name, source) {
780
- var IS_FORCED = type & $export.F;
781
- var IS_GLOBAL = type & $export.G;
782
- var IS_STATIC = type & $export.S;
783
- var IS_PROTO = type & $export.P;
784
- var IS_BIND = type & $export.B;
785
- var IS_WRAP = type & $export.W;
786
- var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
787
- var expProto = exports[PROTOTYPE];
788
- var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE];
789
- var key, own, out;
790
- if (IS_GLOBAL) source = name;
791
- for (key in source) {
792
- own = !IS_FORCED && target && target[key] !== undefined;
793
- if (own && _has(exports, key)) continue;
794
- out = own ? target[key] : source[key];
795
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
796
- : IS_BIND && own ? _ctx(out, _global)
797
- : IS_WRAP && target[key] == out ? (function (C) {
798
- var F = function (a, b, c) {
799
- if (this instanceof C) {
800
- switch (arguments.length) {
801
- case 0: return new C();
802
- case 1: return new C(a);
803
- case 2: return new C(a, b);
804
- } return new C(a, b, c);
805
- } return C.apply(this, arguments);
806
- };
807
- F[PROTOTYPE] = C[PROTOTYPE];
808
- return F;
809
- })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out;
810
- if (IS_PROTO) {
811
- (exports.virtual || (exports.virtual = {}))[key] = out;
812
- if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out);
813
- }
814
- }
815
- };
816
- $export.F = 1;
817
- $export.G = 2;
818
- $export.S = 4;
819
- $export.P = 8;
820
- $export.B = 16;
821
- $export.W = 32;
822
- $export.U = 64;
823
- $export.R = 128;
824
- var _export = $export;
825
-
826
- var _objectSap = function (KEY, exec) {
827
- var fn = (_core.Object || {})[KEY] || Object[KEY];
828
- var exp = {};
829
- exp[KEY] = exec(fn);
830
- _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp);
831
- };
832
-
833
- _objectSap('keys', function () {
834
- return function keys(it) {
835
- return _objectKeys(_toObject(it));
836
- };
837
- });
838
-
839
- var keys = _core.Object.keys;
840
-
841
- var keys$1 = keys;
842
-
843
- var script = {
844
- name: 'bk-navigation-menu',
845
- provide: function provide() {
846
- return {
847
- rootMenu: this
848
- };
849
- },
850
- inject: {
851
- rootNavigation: {
852
- default: null
853
- }
854
- },
855
- props: {
856
- defaultActive: {
857
- type: [String, Number],
858
- default: ''
859
- },
860
- uniqueOpened: {
861
- type: Boolean,
862
- default: true
863
- },
864
- toggleActive: Boolean,
865
- itemHoverBgColor: {
866
- type: String,
867
- default: 'linear-gradient(90deg,rgba(37,48,71,1) 0%,rgba(32,42,60,1) 100%)'
868
- },
869
- itemHoverColor: {
870
- type: String,
871
- default: '#D3D9E4'
872
- },
873
- itemActiveBgColor: {
874
- type: String,
875
- default: 'linear-gradient(90deg,rgba(63,135,255,1) 0%,rgba(58,132,255,1) 100%)'
876
- },
877
- itemActiveColor: {
878
- type: String,
879
- default: '#FFFFFF'
880
- },
881
- itemDefaultBgColor: {
882
- type: String,
883
- default: '#182132'
884
- },
885
- itemDefaultColor: {
886
- type: String,
887
- default: '#ACB9D1'
888
- },
889
- itemDefaultIconColor: {
890
- type: String,
891
- default: '#63656E'
892
- },
893
- itemActiveIconColor: {
894
- type: String,
895
- default: '#FFFFFF'
896
- },
897
- itemHoverIconColor: {
898
- type: String,
899
- default: '#D3D9E4'
900
- },
901
- itemChildIconDefaultColor: {
902
- type: String,
903
- default: '#3E4655'
904
- },
905
- itemChildIconHoverColor: {
906
- type: String,
907
- default: '#D3D9E4'
908
- },
909
- itemChildIconActiveColor: {
910
- type: String,
911
- default: '#FFFFFF'
912
- },
913
- subMenuOpenBgColor: {
914
- type: String,
915
- default: '#151D2C'
916
- },
917
- beforeNavChange: {
918
- type: Function,
919
- default: function _default() {
920
- return function () {};
921
- }
922
- }
923
- },
924
- data: function data() {
925
- return {
926
- activeId: this.defaultActive,
927
- item: {},
928
- subItems: {}
929
- };
930
- },
931
- computed: {
932
- parentId: function parentId() {
933
- return this.item.parentMenu ? this.item.parentMenu.id : '';
934
- },
935
- navigationType: function navigationType() {
936
- if (this.rootNavigation && this.rootNavigation.navigationType) {
937
- return this.rootNavigation.navigationType;
938
- }
939
- return 'left-right';
940
- },
941
- defItemHoverBgColor: {
942
- get: function get() {
943
- var themeVals = ['linear-gradient(270deg,rgba(235,237,243,1) 0%,rgba(240,241,245,1) 100%)', 'linear-gradient(90deg,rgba(37,48,71,1) 0%,rgba(32,42,60,1) 100%)'];
944
- return !themeVals.includes(this.itemHoverBgColor) ? this.itemHoverBgColor : themeVals[+(this.navigationType === 'left-right')];
945
- }
946
- },
947
- defItemHoverColor: {
948
- get: function get() {
949
- var themeVals = ['#3A3C42', '#D3D9E4'];
950
- return !themeVals.includes(this.itemHoverColor) ? this.itemHoverColor : themeVals[+(this.navigationType === 'left-right')];
951
- }
952
- },
953
- defItemActiveBgColor: {
954
- get: function get() {
955
- var themeVals = ['linear-gradient(90deg,rgba(63,135,255,1) 0%,rgba(58,132,255,1) 100%)', 'linear-gradient(90deg,rgba(63,135,255,1) 0%,rgba(58,132,255,1) 100%)'];
956
- return !themeVals.includes(this.itemActiveBgColor) ? this.itemActiveBgColor : themeVals[+(this.navigationType === 'left-right')];
957
- }
958
- },
959
- defItemActiveColor: {
960
- get: function get() {
961
- var themeVals = ['#FFFFFF', '#FFFFFF'];
962
- return !themeVals.includes(this.itemActiveColor) ? this.itemActiveColor : themeVals[+(this.navigationType === 'left-right')];
963
- }
964
- },
965
- defItemDefaultBgColor: {
966
- get: function get() {
967
- var themeVals = ['#FFFFFF', '#182132'];
968
- return !themeVals.includes(this.itemDefaultBgColor) ? this.itemDefaultBgColor : themeVals[+(this.navigationType === 'left-right')];
969
- }
970
- },
971
- defItemDefaultColor: {
972
- get: function get() {
973
- var themeVals = ['#63656E', '#ACB9D1'];
974
- return !themeVals.includes(this.itemDefaultColor) ? this.itemDefaultColor : themeVals[+(this.navigationType === 'left-right')];
975
- }
976
- },
977
- defItemDefaultIconColor: {
978
- get: function get() {
979
- var themeVals = ['#63656E', '#B0BDD5'];
980
- return !themeVals.includes(this.itemDefaultIconColor) ? this.itemDefaultIconColor : themeVals[+(this.navigationType === 'left-right')];
981
- }
982
- },
983
- defItemHoverIconColor: {
984
- get: function get() {
985
- var themeVals = ['#3A3C42', '#D3D9E4'];
986
- return !themeVals.includes(this.itemHoverIconColor) ? this.itemHoverIconColor : themeVals[+(this.navigationType === 'left-right')];
987
- }
988
- },
989
- defItemActiveIconColor: {
990
- get: function get() {
991
- var themeVals = ['#FFFFFF', '#FFFFFF'];
992
- return !themeVals.includes(this.itemActiveIconColor) ? this.itemActiveIconColor : themeVals[+(this.navigationType === 'left-right')];
993
- }
994
- },
995
- defSubMenuOpenBgColor: {
996
- get: function get() {
997
- var themeVals = ['#F0F1F5', '#151D2C'];
998
- return !themeVals.includes(this.subMenuOpenBgColor) ? this.subMenuOpenBgColor : themeVals[+(this.navigationType === 'left-right')];
999
- }
1000
- },
1001
- defItemChildIconDefaultColor: {
1002
- get: function get() {
1003
- var themeVals = ['#979BA5', '#3E4655'];
1004
- return !themeVals.includes(this.itemChildIconDefaultColor) ? this.itemChildIconDefaultColor : themeVals[+(this.navigationType === 'left-right')];
1005
- }
1006
- },
1007
- defItemChildIconHoverColor: {
1008
- get: function get() {
1009
- var themeVals = ['#63656E', '#D3D9E4'];
1010
- return !themeVals.includes(this.itemChildIconHoverColor) ? this.itemChildIconHoverColor : themeVals[+(this.navigationType === 'left-right')];
1011
- }
1012
- },
1013
- defItemChildIconActiveColor: {
1014
- get: function get() {
1015
- var themeVals = ['#FFFFFF', '#FFFFFF'];
1016
- return !themeVals.includes(this.itemChildIconActiveColor) ? this.itemChildIconActiveColor : themeVals[+(this.navigationType === 'left-right')];
1017
- }
1018
- }
1019
- },
1020
- watch: {
1021
- defaultActive: function defaultActive(v) {
1022
- this.activeId = v;
1023
- if (this.item.id !== v) {
1024
- var item = this.getActiveItem(this.$children, v);
1025
- if (item) {
1026
- this.item = item;
1027
- }
1028
- }
1029
- },
1030
- toggleActive: function toggleActive(v) {
1031
- var _this = this;
1032
- if (this.uniqueOpened) {
1033
- keys$1(this.subItems).forEach(function (key) {
1034
- var subItem = _this.subItems[key];
1035
- subItem.menuActive = _this.toggleActive ? false : key === _this.parentId;
1036
- if (_this.parentId && _this.parentId !== subItem.id) {
1037
- var activeSubItem = _this.item.parentMenu;
1038
- activeSubItem.menuActive = !_this.toggleActive;
1039
- }
1040
- if (!v) {
1041
- subItem.markCollapse && subItem.handleClose();
1042
- } else {
1043
- subItem.markCollapse && subItem.handleOpen();
1044
- }
1045
- });
1046
- }
1047
- }
1048
- },
1049
- mounted: function mounted() {
1050
- this.$on('item-click', this.handleItemClick);
1051
- this.$on('sub-menu-click', this.handleSubMenuClick);
1052
- },
1053
- beforeDestroy: function beforeDestroy() {
1054
- this.$off('item-click', this.handleItemClick);
1055
- this.$off('sub-menu-click', this.handleSubMenuClick);
1056
- },
1057
- methods: {
1058
- handleItemClick: function handleItemClick(item) {
1059
- this.handleSetItem(item);
1060
- },
1061
- handleSubMenuClick: function handleSubMenuClick(item) {
1062
- this.handleSetSubMenu(item);
1063
- },
1064
- handleSetSubMenu: function handleSetSubMenu(item) {
1065
- var _this2 = this;
1066
- var id = item.id;
1067
- if (id) {
1068
- if (this.uniqueOpened) {
1069
- keys$1(this.subItems).forEach(function (key) {
1070
- if (key !== id) {
1071
- _this2.subItems[key].handleClose();
1072
- delete _this2.subItems[key];
1073
- }
1074
- });
1075
- item.markCollapse = item.collapse;
1076
- }
1077
- this.subItems[id] = item;
1078
- }
1079
- },
1080
- handleSetItem: function handleSetItem(item) {
1081
- var _this3 = this;
1082
- return _asyncToGenerator( regenerator.mark(function _callee() {
1083
- var canChange, id;
1084
- return regenerator.wrap(function _callee$(_context) {
1085
- while (1) {
1086
- switch (_context.prev = _context.next) {
1087
- case 0:
1088
- canChange = false;
1089
- _context.prev = 1;
1090
- _context.next = 4;
1091
- return _this3.beforeNavChange(item.id, _this3.activeId, _extends({}, item.$props, item.$attrs));
1092
- case 4:
1093
- canChange = _context.sent;
1094
- _context.next = 10;
1095
- break;
1096
- case 7:
1097
- _context.prev = 7;
1098
- _context.t0 = _context["catch"](1);
1099
- canChange = typeof _context.t0 === 'boolean' ? _context.t0 : false;
1100
- case 10:
1101
- if (canChange) {
1102
- id = item.id;
1103
- if (id) {
1104
- _this3.item = item;
1105
- _this3.activeId = id;
1106
- }
1107
- _this3.$emit('select', _this3.activeId, _extends({}, item.$props, item.$attrs));
1108
- } else if (_this3.activeId === item.id) {
1109
- _this3.item = item;
1110
- }
1111
- case 11:
1112
- case "end":
1113
- return _context.stop();
1114
- }
1115
- }
1116
- }, _callee, null, [[1, 7]]);
1117
- }))();
1118
- },
1119
- getActiveItem: function getActiveItem(list, id) {
1120
- for (var i = 0, j = list.length; i < j; i++) {
1121
- var item = list[i];
1122
- if (item.id === id) {
1123
- return item;
1124
- } else if (item.$children && item.$children.length) {
1125
- return this.getActiveItem(item.$children, id);
1126
- }
1127
- }
1128
- }
1129
- },
1130
- render: function render() {
1131
- var h = arguments[0];
1132
- var defItemDefaultBgColor = this.defItemDefaultBgColor,
1133
- navigationType = this.navigationType;
1134
- return h("div", {
1135
- "class": {
1136
- 'navigation-menu': true
1137
- },
1138
- "style": {
1139
- backgroundColor: defItemDefaultBgColor
1140
- },
1141
- "key": navigationType
1142
- }, [this.$slots.default]);
1143
- }
1144
- };
1145
-
1146
- function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
1147
- , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
1148
- if (typeof shadowMode !== 'boolean') {
1149
- createInjectorSSR = createInjector;
1150
- createInjector = shadowMode;
1151
- shadowMode = false;
1152
- }
1153
- var options = typeof script === 'function' ? script.options : script;
1154
- if (template && template.render) {
1155
- options.render = template.render;
1156
- options.staticRenderFns = template.staticRenderFns;
1157
- options._compiled = true;
1158
- if (isFunctionalTemplate) {
1159
- options.functional = true;
1160
- }
1161
- }
1162
- if (scopeId) {
1163
- options._scopeId = scopeId;
1164
- }
1165
- var hook;
1166
- if (moduleIdentifier) {
1167
- hook = function hook(context) {
1168
- context = context ||
1169
- this.$vnode && this.$vnode.ssrContext ||
1170
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
1171
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1172
- context = __VUE_SSR_CONTEXT__;
1173
- }
1174
- if (style) {
1175
- style.call(this, createInjectorSSR(context));
1176
- }
1177
- if (context && context._registeredComponents) {
1178
- context._registeredComponents.add(moduleIdentifier);
1179
- }
1180
- };
1181
- options._ssrRegister = hook;
1182
- } else if (style) {
1183
- hook = shadowMode ? function () {
1184
- style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
1185
- } : function (context) {
1186
- style.call(this, createInjector(context));
1187
- };
1188
- }
1189
- if (hook) {
1190
- if (options.functional) {
1191
- var originalRender = options.render;
1192
- options.render = function renderWithStyleInjection(h, context) {
1193
- hook.call(context);
1194
- return originalRender(h, context);
1195
- };
1196
- } else {
1197
- var existing = options.beforeCreate;
1198
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
1199
- }
1200
- }
1201
- return script;
1202
- }
1203
- var normalizeComponent_1 = normalizeComponent;
1204
-
1205
- /* script */
1206
- var __vue_script__ = script;
1207
- /* template */
1208
-
1209
- /* style */
1210
-
1211
- var __vue_inject_styles__ = undefined;
1212
- /* scoped */
1213
-
1214
- var __vue_scope_id__ = undefined;
1215
- /* module identifier */
1216
-
1217
- var __vue_module_identifier__ = undefined;
1218
- /* functional template */
1219
-
1220
- var __vue_is_functional_template__ = undefined;
1221
- /* style inject */
1222
-
1223
- /* style inject SSR */
1224
-
1225
- /* style inject shadow dom */
1226
-
1227
- var __vue_component__ = /*#__PURE__*/normalizeComponent_1({}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
1228
-
1229
- function setInstaller (component, afterInstall) {
1230
- component.install = function (Vue) {
1231
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1232
- var props = component.props || {};
1233
- keys$1(options).forEach(function (key) {
1234
- if (props.hasOwnProperty(key)) {
1235
- if (typeof props[key] === 'function' || props[key] instanceof Array) {
1236
- props[key] = {
1237
- type: props[key],
1238
- default: options[key]
1239
- };
1240
- } else {
1241
- props[key].default = options[key];
1242
- }
1243
- }
1244
- });
1245
- component.name = options.namespace ? component.name.replace('bk', options.namespace) : component.name;
1246
- Vue.component(component.name, component);
1247
- typeof afterInstall === 'function' && afterInstall(Vue, options);
1248
- };
1249
- }
1250
-
1251
- setInstaller(__vue_component__);
1252
-
1253
- exports.default = __vue_component__;
1254
-
1255
- 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
+ function _extends() {
344
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
345
+ for (var i = 1; i < arguments.length; i++) {
346
+ var source = arguments[i];
347
+ for (var key in source) {
348
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
349
+ target[key] = source[key];
350
+ }
351
+ }
352
+ }
353
+ return target;
354
+ };
355
+ return _extends.apply(this, arguments);
356
+ }
357
+
358
+ var _defined = function (it) {
359
+ if (it == undefined) throw TypeError("Can't call method on " + it);
360
+ return it;
361
+ };
362
+
363
+ var _toObject = function (it) {
364
+ return Object(_defined(it));
365
+ };
366
+
367
+ var hasOwnProperty = {}.hasOwnProperty;
368
+ var _has = function (it, key) {
369
+ return hasOwnProperty.call(it, key);
370
+ };
371
+
372
+ var toString = {}.toString;
373
+ var _cof = function (it) {
374
+ return toString.call(it).slice(8, -1);
375
+ };
376
+
377
+ var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
378
+ return _cof(it) == 'String' ? it.split('') : Object(it);
379
+ };
380
+
381
+ var _toIobject = function (it) {
382
+ return _iobject(_defined(it));
383
+ };
384
+
385
+ var ceil = Math.ceil;
386
+ var floor = Math.floor;
387
+ var _toInteger = function (it) {
388
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
389
+ };
390
+
391
+ var min = Math.min;
392
+ var _toLength = function (it) {
393
+ return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0;
394
+ };
395
+
396
+ var max = Math.max;
397
+ var min$1 = Math.min;
398
+ var _toAbsoluteIndex = function (index, length) {
399
+ index = _toInteger(index);
400
+ return index < 0 ? max(index + length, 0) : min$1(index, length);
401
+ };
402
+
403
+ var _arrayIncludes = function (IS_INCLUDES) {
404
+ return function ($this, el, fromIndex) {
405
+ var O = _toIobject($this);
406
+ var length = _toLength(O.length);
407
+ var index = _toAbsoluteIndex(fromIndex, length);
408
+ var value;
409
+ if (IS_INCLUDES && el != el) while (length > index) {
410
+ value = O[index++];
411
+ if (value != value) return true;
412
+ } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
413
+ if (O[index] === el) return IS_INCLUDES || index || 0;
414
+ } return !IS_INCLUDES && -1;
415
+ };
416
+ };
417
+
418
+ function createCommonjsModule(fn, module) {
419
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
420
+ }
421
+
422
+ var _core = createCommonjsModule(function (module) {
423
+ var core = module.exports = { version: '2.6.12' };
424
+ if (typeof __e == 'number') __e = core;
425
+ });
426
+ var _core_1 = _core.version;
427
+
428
+ var _global = createCommonjsModule(function (module) {
429
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
430
+ ? window : typeof self != 'undefined' && self.Math == Math ? self
431
+ : Function('return this')();
432
+ if (typeof __g == 'number') __g = global;
433
+ });
434
+
435
+ var _shared = createCommonjsModule(function (module) {
436
+ var SHARED = '__core-js_shared__';
437
+ var store = _global[SHARED] || (_global[SHARED] = {});
438
+ (module.exports = function (key, value) {
439
+ return store[key] || (store[key] = value !== undefined ? value : {});
440
+ })('versions', []).push({
441
+ version: _core.version,
442
+ mode: 'pure' ,
443
+ copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
444
+ });
445
+ });
446
+
447
+ var id = 0;
448
+ var px = Math.random();
449
+ var _uid = function (key) {
450
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
451
+ };
452
+
453
+ var shared = _shared('keys');
454
+ var _sharedKey = function (key) {
455
+ return shared[key] || (shared[key] = _uid(key));
456
+ };
457
+
458
+ var arrayIndexOf = _arrayIncludes(false);
459
+ var IE_PROTO = _sharedKey('IE_PROTO');
460
+ var _objectKeysInternal = function (object, names) {
461
+ var O = _toIobject(object);
462
+ var i = 0;
463
+ var result = [];
464
+ var key;
465
+ for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key);
466
+ while (names.length > i) if (_has(O, key = names[i++])) {
467
+ ~arrayIndexOf(result, key) || result.push(key);
468
+ }
469
+ return result;
470
+ };
471
+
472
+ var _enumBugKeys = (
473
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
474
+ ).split(',');
475
+
476
+ var _objectKeys = Object.keys || function keys(O) {
477
+ return _objectKeysInternal(O, _enumBugKeys);
478
+ };
479
+
480
+ var _aFunction = function (it) {
481
+ if (typeof it != 'function') throw TypeError(it + ' is not a function!');
482
+ return it;
483
+ };
484
+
485
+ var _ctx = function (fn, that, length) {
486
+ _aFunction(fn);
487
+ if (that === undefined) return fn;
488
+ switch (length) {
489
+ case 1: return function (a) {
490
+ return fn.call(that, a);
491
+ };
492
+ case 2: return function (a, b) {
493
+ return fn.call(that, a, b);
494
+ };
495
+ case 3: return function (a, b, c) {
496
+ return fn.call(that, a, b, c);
497
+ };
498
+ }
499
+ return function () {
500
+ return fn.apply(that, arguments);
501
+ };
502
+ };
503
+
504
+ var _isObject = function (it) {
505
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
506
+ };
507
+
508
+ var _anObject = function (it) {
509
+ if (!_isObject(it)) throw TypeError(it + ' is not an object!');
510
+ return it;
511
+ };
512
+
513
+ var _fails = function (exec) {
514
+ try {
515
+ return !!exec();
516
+ } catch (e) {
517
+ return true;
518
+ }
519
+ };
520
+
521
+ var _descriptors = !_fails(function () {
522
+ return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
523
+ });
524
+
525
+ var document = _global.document;
526
+ var is = _isObject(document) && _isObject(document.createElement);
527
+ var _domCreate = function (it) {
528
+ return is ? document.createElement(it) : {};
529
+ };
530
+
531
+ var _ie8DomDefine = !_descriptors && !_fails(function () {
532
+ return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7;
533
+ });
534
+
535
+ var _toPrimitive = function (it, S) {
536
+ if (!_isObject(it)) return it;
537
+ var fn, val;
538
+ if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
539
+ if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;
540
+ if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
541
+ throw TypeError("Can't convert object to primitive value");
542
+ };
543
+
544
+ var dP = Object.defineProperty;
545
+ var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
546
+ _anObject(O);
547
+ P = _toPrimitive(P, true);
548
+ _anObject(Attributes);
549
+ if (_ie8DomDefine) try {
550
+ return dP(O, P, Attributes);
551
+ } catch (e) { }
552
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
553
+ if ('value' in Attributes) O[P] = Attributes.value;
554
+ return O;
555
+ };
556
+ var _objectDp = {
557
+ f: f
558
+ };
559
+
560
+ var _propertyDesc = function (bitmap, value) {
561
+ return {
562
+ enumerable: !(bitmap & 1),
563
+ configurable: !(bitmap & 2),
564
+ writable: !(bitmap & 4),
565
+ value: value
566
+ };
567
+ };
568
+
569
+ var _hide = _descriptors ? function (object, key, value) {
570
+ return _objectDp.f(object, key, _propertyDesc(1, value));
571
+ } : function (object, key, value) {
572
+ object[key] = value;
573
+ return object;
574
+ };
575
+
576
+ var PROTOTYPE = 'prototype';
577
+ var $export = function (type, name, source) {
578
+ var IS_FORCED = type & $export.F;
579
+ var IS_GLOBAL = type & $export.G;
580
+ var IS_STATIC = type & $export.S;
581
+ var IS_PROTO = type & $export.P;
582
+ var IS_BIND = type & $export.B;
583
+ var IS_WRAP = type & $export.W;
584
+ var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
585
+ var expProto = exports[PROTOTYPE];
586
+ var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE];
587
+ var key, own, out;
588
+ if (IS_GLOBAL) source = name;
589
+ for (key in source) {
590
+ own = !IS_FORCED && target && target[key] !== undefined;
591
+ if (own && _has(exports, key)) continue;
592
+ out = own ? target[key] : source[key];
593
+ exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
594
+ : IS_BIND && own ? _ctx(out, _global)
595
+ : IS_WRAP && target[key] == out ? (function (C) {
596
+ var F = function (a, b, c) {
597
+ if (this instanceof C) {
598
+ switch (arguments.length) {
599
+ case 0: return new C();
600
+ case 1: return new C(a);
601
+ case 2: return new C(a, b);
602
+ } return new C(a, b, c);
603
+ } return C.apply(this, arguments);
604
+ };
605
+ F[PROTOTYPE] = C[PROTOTYPE];
606
+ return F;
607
+ })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out;
608
+ if (IS_PROTO) {
609
+ (exports.virtual || (exports.virtual = {}))[key] = out;
610
+ if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out);
611
+ }
612
+ }
613
+ };
614
+ $export.F = 1;
615
+ $export.G = 2;
616
+ $export.S = 4;
617
+ $export.P = 8;
618
+ $export.B = 16;
619
+ $export.W = 32;
620
+ $export.U = 64;
621
+ $export.R = 128;
622
+ var _export = $export;
623
+
624
+ var _objectSap = function (KEY, exec) {
625
+ var fn = (_core.Object || {})[KEY] || Object[KEY];
626
+ var exp = {};
627
+ exp[KEY] = exec(fn);
628
+ _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp);
629
+ };
630
+
631
+ _objectSap('keys', function () {
632
+ return function keys(it) {
633
+ return _objectKeys(_toObject(it));
634
+ };
635
+ });
636
+
637
+ var keys = _core.Object.keys;
638
+
639
+ var keys$1 = keys;
640
+
641
+ var script = {
642
+ name: 'bk-navigation-menu',
643
+ provide: function provide() {
644
+ return {
645
+ rootMenu: this
646
+ };
647
+ },
648
+ inject: {
649
+ rootNavigation: {
650
+ default: null
651
+ }
652
+ },
653
+ props: {
654
+ defaultActive: {
655
+ type: [String, Number],
656
+ default: ''
657
+ },
658
+ uniqueOpened: {
659
+ type: Boolean,
660
+ default: true
661
+ },
662
+ toggleActive: Boolean,
663
+ itemHoverBgColor: {
664
+ type: String,
665
+ default: 'linear-gradient(90deg,rgba(37,48,71,1) 0%,rgba(32,42,60,1) 100%)'
666
+ },
667
+ itemHoverColor: {
668
+ type: String,
669
+ default: '#D3D9E4'
670
+ },
671
+ itemActiveBgColor: {
672
+ type: String,
673
+ default: 'linear-gradient(90deg,rgba(63,135,255,1) 0%,rgba(58,132,255,1) 100%)'
674
+ },
675
+ itemActiveColor: {
676
+ type: String,
677
+ default: '#FFFFFF'
678
+ },
679
+ itemDefaultBgColor: {
680
+ type: String,
681
+ default: '#182132'
682
+ },
683
+ itemDefaultColor: {
684
+ type: String,
685
+ default: '#ACB9D1'
686
+ },
687
+ itemDefaultIconColor: {
688
+ type: String,
689
+ default: '#63656E'
690
+ },
691
+ itemActiveIconColor: {
692
+ type: String,
693
+ default: '#FFFFFF'
694
+ },
695
+ itemHoverIconColor: {
696
+ type: String,
697
+ default: '#D3D9E4'
698
+ },
699
+ itemChildIconDefaultColor: {
700
+ type: String,
701
+ default: '#3E4655'
702
+ },
703
+ itemChildIconHoverColor: {
704
+ type: String,
705
+ default: '#D3D9E4'
706
+ },
707
+ itemChildIconActiveColor: {
708
+ type: String,
709
+ default: '#FFFFFF'
710
+ },
711
+ subMenuOpenBgColor: {
712
+ type: String,
713
+ default: '#151D2C'
714
+ },
715
+ beforeNavChange: {
716
+ type: Function,
717
+ default: function _default() {
718
+ return function () {};
719
+ }
720
+ }
721
+ },
722
+ data: function data() {
723
+ return {
724
+ activeId: this.defaultActive,
725
+ item: {},
726
+ subItems: {}
727
+ };
728
+ },
729
+ computed: {
730
+ parentId: function parentId() {
731
+ return this.item.parentMenu ? this.item.parentMenu.id : '';
732
+ },
733
+ navigationType: function navigationType() {
734
+ if (this.rootNavigation && this.rootNavigation.navigationType) {
735
+ return this.rootNavigation.navigationType;
736
+ }
737
+ return 'left-right';
738
+ },
739
+ defItemHoverBgColor: {
740
+ get: function get() {
741
+ var themeVals = ['linear-gradient(270deg,rgba(235,237,243,1) 0%,rgba(240,241,245,1) 100%)', 'linear-gradient(90deg,rgba(37,48,71,1) 0%,rgba(32,42,60,1) 100%)'];
742
+ return !themeVals.includes(this.itemHoverBgColor) ? this.itemHoverBgColor : themeVals[+(this.navigationType === 'left-right')];
743
+ }
744
+ },
745
+ defItemHoverColor: {
746
+ get: function get() {
747
+ var themeVals = ['#3A3C42', '#D3D9E4'];
748
+ return !themeVals.includes(this.itemHoverColor) ? this.itemHoverColor : themeVals[+(this.navigationType === 'left-right')];
749
+ }
750
+ },
751
+ defItemActiveBgColor: {
752
+ get: function get() {
753
+ var themeVals = ['linear-gradient(90deg,rgba(63,135,255,1) 0%,rgba(58,132,255,1) 100%)', 'linear-gradient(90deg,rgba(63,135,255,1) 0%,rgba(58,132,255,1) 100%)'];
754
+ return !themeVals.includes(this.itemActiveBgColor) ? this.itemActiveBgColor : themeVals[+(this.navigationType === 'left-right')];
755
+ }
756
+ },
757
+ defItemActiveColor: {
758
+ get: function get() {
759
+ var themeVals = ['#FFFFFF', '#FFFFFF'];
760
+ return !themeVals.includes(this.itemActiveColor) ? this.itemActiveColor : themeVals[+(this.navigationType === 'left-right')];
761
+ }
762
+ },
763
+ defItemDefaultBgColor: {
764
+ get: function get() {
765
+ var themeVals = ['#FFFFFF', '#182132'];
766
+ return !themeVals.includes(this.itemDefaultBgColor) ? this.itemDefaultBgColor : themeVals[+(this.navigationType === 'left-right')];
767
+ }
768
+ },
769
+ defItemDefaultColor: {
770
+ get: function get() {
771
+ var themeVals = ['#63656E', '#ACB9D1'];
772
+ return !themeVals.includes(this.itemDefaultColor) ? this.itemDefaultColor : themeVals[+(this.navigationType === 'left-right')];
773
+ }
774
+ },
775
+ defItemDefaultIconColor: {
776
+ get: function get() {
777
+ var themeVals = ['#63656E', '#B0BDD5'];
778
+ return !themeVals.includes(this.itemDefaultIconColor) ? this.itemDefaultIconColor : themeVals[+(this.navigationType === 'left-right')];
779
+ }
780
+ },
781
+ defItemHoverIconColor: {
782
+ get: function get() {
783
+ var themeVals = ['#3A3C42', '#D3D9E4'];
784
+ return !themeVals.includes(this.itemHoverIconColor) ? this.itemHoverIconColor : themeVals[+(this.navigationType === 'left-right')];
785
+ }
786
+ },
787
+ defItemActiveIconColor: {
788
+ get: function get() {
789
+ var themeVals = ['#FFFFFF', '#FFFFFF'];
790
+ return !themeVals.includes(this.itemActiveIconColor) ? this.itemActiveIconColor : themeVals[+(this.navigationType === 'left-right')];
791
+ }
792
+ },
793
+ defSubMenuOpenBgColor: {
794
+ get: function get() {
795
+ var themeVals = ['#F0F1F5', '#151D2C'];
796
+ return !themeVals.includes(this.subMenuOpenBgColor) ? this.subMenuOpenBgColor : themeVals[+(this.navigationType === 'left-right')];
797
+ }
798
+ },
799
+ defItemChildIconDefaultColor: {
800
+ get: function get() {
801
+ var themeVals = ['#979BA5', '#3E4655'];
802
+ return !themeVals.includes(this.itemChildIconDefaultColor) ? this.itemChildIconDefaultColor : themeVals[+(this.navigationType === 'left-right')];
803
+ }
804
+ },
805
+ defItemChildIconHoverColor: {
806
+ get: function get() {
807
+ var themeVals = ['#63656E', '#D3D9E4'];
808
+ return !themeVals.includes(this.itemChildIconHoverColor) ? this.itemChildIconHoverColor : themeVals[+(this.navigationType === 'left-right')];
809
+ }
810
+ },
811
+ defItemChildIconActiveColor: {
812
+ get: function get() {
813
+ var themeVals = ['#FFFFFF', '#FFFFFF'];
814
+ return !themeVals.includes(this.itemChildIconActiveColor) ? this.itemChildIconActiveColor : themeVals[+(this.navigationType === 'left-right')];
815
+ }
816
+ }
817
+ },
818
+ watch: {
819
+ defaultActive: function defaultActive(v) {
820
+ this.activeId = v;
821
+ if (this.item.id !== v) {
822
+ var item = this.getActiveItem(this.$children, v);
823
+ if (item) {
824
+ this.item = item;
825
+ }
826
+ }
827
+ },
828
+ toggleActive: function toggleActive(v) {
829
+ var _this = this;
830
+ if (this.uniqueOpened) {
831
+ keys$1(this.subItems).forEach(function (key) {
832
+ var subItem = _this.subItems[key];
833
+ subItem.menuActive = _this.toggleActive ? false : key === _this.parentId;
834
+ if (_this.parentId && _this.parentId !== subItem.id) {
835
+ var activeSubItem = _this.item.parentMenu;
836
+ activeSubItem.menuActive = !_this.toggleActive;
837
+ }
838
+ if (!v) {
839
+ subItem.markCollapse && subItem.handleClose();
840
+ } else {
841
+ subItem.markCollapse && subItem.handleOpen();
842
+ }
843
+ });
844
+ }
845
+ }
846
+ },
847
+ mounted: function mounted() {
848
+ this.$on('item-click', this.handleItemClick);
849
+ this.$on('sub-menu-click', this.handleSubMenuClick);
850
+ },
851
+ beforeDestroy: function beforeDestroy() {
852
+ this.$off('item-click', this.handleItemClick);
853
+ this.$off('sub-menu-click', this.handleSubMenuClick);
854
+ },
855
+ methods: {
856
+ handleItemClick: function handleItemClick(item) {
857
+ this.handleSetItem(item);
858
+ },
859
+ handleSubMenuClick: function handleSubMenuClick(item) {
860
+ this.handleSetSubMenu(item);
861
+ },
862
+ handleSetSubMenu: function handleSetSubMenu(item) {
863
+ var _this2 = this;
864
+ var id = item.id;
865
+ if (id) {
866
+ if (this.uniqueOpened) {
867
+ keys$1(this.subItems).forEach(function (key) {
868
+ if (key !== id) {
869
+ _this2.subItems[key].handleClose();
870
+ delete _this2.subItems[key];
871
+ }
872
+ });
873
+ item.markCollapse = item.collapse;
874
+ }
875
+ this.subItems[id] = item;
876
+ }
877
+ },
878
+ handleSetItem: function handleSetItem(item) {
879
+ var _this3 = this;
880
+ return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
881
+ var canChange, id;
882
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
883
+ while (1) {
884
+ switch (_context.prev = _context.next) {
885
+ case 0:
886
+ canChange = false;
887
+ _context.prev = 1;
888
+ _context.next = 4;
889
+ return _this3.beforeNavChange(item.id, _this3.activeId, _extends({}, item.$props, item.$attrs));
890
+ case 4:
891
+ canChange = _context.sent;
892
+ _context.next = 10;
893
+ break;
894
+ case 7:
895
+ _context.prev = 7;
896
+ _context.t0 = _context["catch"](1);
897
+ canChange = typeof _context.t0 === 'boolean' ? _context.t0 : false;
898
+ case 10:
899
+ if (canChange) {
900
+ id = item.id;
901
+ if (id) {
902
+ _this3.item = item;
903
+ _this3.activeId = id;
904
+ }
905
+ _this3.$emit('select', _this3.activeId, _extends({}, item.$props, item.$attrs));
906
+ } else if (_this3.activeId === item.id) {
907
+ _this3.item = item;
908
+ }
909
+ case 11:
910
+ case "end":
911
+ return _context.stop();
912
+ }
913
+ }
914
+ }, _callee, null, [[1, 7]]);
915
+ }))();
916
+ },
917
+ getActiveItem: function getActiveItem(list, id) {
918
+ for (var i = 0, j = list.length; i < j; i++) {
919
+ var item = list[i];
920
+ if (item.id === id) {
921
+ return item;
922
+ } else if (item.$children && item.$children.length) {
923
+ return this.getActiveItem(item.$children, id);
924
+ }
925
+ }
926
+ }
927
+ },
928
+ render: function render() {
929
+ var h = arguments[0];
930
+ var defItemDefaultBgColor = this.defItemDefaultBgColor,
931
+ navigationType = this.navigationType;
932
+ return h("div", {
933
+ "class": {
934
+ 'navigation-menu': true
935
+ },
936
+ "style": {
937
+ backgroundColor: defItemDefaultBgColor
938
+ },
939
+ "key": navigationType
940
+ }, [this.$slots.default]);
941
+ }
942
+ };
943
+
944
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
945
+ , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
946
+ if (typeof shadowMode !== 'boolean') {
947
+ createInjectorSSR = createInjector;
948
+ createInjector = shadowMode;
949
+ shadowMode = false;
950
+ }
951
+ var options = typeof script === 'function' ? script.options : script;
952
+ if (template && template.render) {
953
+ options.render = template.render;
954
+ options.staticRenderFns = template.staticRenderFns;
955
+ options._compiled = true;
956
+ if (isFunctionalTemplate) {
957
+ options.functional = true;
958
+ }
959
+ }
960
+ if (scopeId) {
961
+ options._scopeId = scopeId;
962
+ }
963
+ var hook;
964
+ if (moduleIdentifier) {
965
+ hook = function hook(context) {
966
+ context = context ||
967
+ this.$vnode && this.$vnode.ssrContext ||
968
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
969
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
970
+ context = __VUE_SSR_CONTEXT__;
971
+ }
972
+ if (style) {
973
+ style.call(this, createInjectorSSR(context));
974
+ }
975
+ if (context && context._registeredComponents) {
976
+ context._registeredComponents.add(moduleIdentifier);
977
+ }
978
+ };
979
+ options._ssrRegister = hook;
980
+ } else if (style) {
981
+ hook = shadowMode ? function () {
982
+ style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
983
+ } : function (context) {
984
+ style.call(this, createInjector(context));
985
+ };
986
+ }
987
+ if (hook) {
988
+ if (options.functional) {
989
+ var originalRender = options.render;
990
+ options.render = function renderWithStyleInjection(h, context) {
991
+ hook.call(context);
992
+ return originalRender(h, context);
993
+ };
994
+ } else {
995
+ var existing = options.beforeCreate;
996
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
997
+ }
998
+ }
999
+ return script;
1000
+ }
1001
+ var normalizeComponent_1 = normalizeComponent;
1002
+
1003
+ /* script */
1004
+ var __vue_script__ = script;
1005
+ /* template */
1006
+
1007
+ /* style */
1008
+ var __vue_inject_styles__ = undefined;
1009
+ /* scoped */
1010
+ var __vue_scope_id__ = undefined;
1011
+ /* module identifier */
1012
+ var __vue_module_identifier__ = undefined;
1013
+ /* functional template */
1014
+ var __vue_is_functional_template__ = undefined;
1015
+ /* style inject */
1016
+
1017
+ /* style inject SSR */
1018
+
1019
+ /* style inject shadow dom */
1020
+
1021
+ var __vue_component__ = /*#__PURE__*/normalizeComponent_1({}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
1022
+
1023
+ function setInstaller (component, afterInstall) {
1024
+ component.install = function (Vue) {
1025
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1026
+ var props = component.props || {};
1027
+ keys$1(options).forEach(function (key) {
1028
+ if (props.hasOwnProperty(key)) {
1029
+ if (typeof props[key] === 'function' || props[key] instanceof Array) {
1030
+ props[key] = {
1031
+ type: props[key],
1032
+ default: options[key]
1033
+ };
1034
+ } else {
1035
+ props[key].default = options[key];
1036
+ }
1037
+ }
1038
+ });
1039
+ component.name = options.namespace ? component.name.replace('bk', options.namespace) : component.name;
1040
+ Vue.component(component.name, component);
1041
+ typeof afterInstall === 'function' && afterInstall(Vue, options);
1042
+ };
1043
+ }
1044
+
1045
+ setInstaller(__vue_component__);
1046
+
1047
+ exports.default = __vue_component__;
1048
+
1049
+ Object.defineProperty(exports, '__esModule', { value: true });
1256
1050
 
1257
1051
  }));