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