bkui-vue 0.0.1-beta.468 → 0.0.1-beta.469

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 (168) hide show
  1. package/lib/affix/index.js +1 -335
  2. package/lib/alert/index.js +1 -276
  3. package/lib/animate-number/index.js +1 -219
  4. package/lib/backtop/index.js +1 -252
  5. package/lib/badge/index.js +1 -293
  6. package/lib/breadcrumb/index.js +1 -311
  7. package/lib/button/index.js +1 -388
  8. package/lib/card/index.js +1 -356
  9. package/lib/cascader/index.js +2 -2075
  10. package/lib/cascader/index.js.LICENSE.txt +1 -0
  11. package/lib/checkbox/index.js +1 -536
  12. package/lib/code-diff/index.js +1 -5535
  13. package/lib/collapse/index.js +1 -589
  14. package/lib/collapse-transition/index.js +1 -234
  15. package/lib/color-picker/index.js +1 -2701
  16. package/lib/components.js +1 -781
  17. package/lib/config-provider/index.js +1 -377
  18. package/lib/container/index.js +1 -390
  19. package/lib/date-picker/index.js +1 -5537
  20. package/lib/dialog/index.js +2 -1322
  21. package/lib/dialog/index.js.LICENSE.txt +1 -0
  22. package/lib/directives/index.js +2 -1357
  23. package/lib/directives/index.js.LICENSE.txt +14 -0
  24. package/lib/dist.index.js +1 -179
  25. package/lib/divider/index.js +1 -226
  26. package/lib/dropdown/index.js +1 -392
  27. package/lib/exception/index.js +1 -423
  28. package/lib/fixed-navbar/index.js +1 -210
  29. package/lib/form/index.js +1 -995
  30. package/lib/hooks.js +1 -133
  31. package/lib/icon/angle-double-down-line.js +1 -541
  32. package/lib/icon/angle-double-left-line.js +1 -541
  33. package/lib/icon/angle-double-left.js +1 -541
  34. package/lib/icon/angle-double-right-line.js +1 -541
  35. package/lib/icon/angle-double-right.js +1 -541
  36. package/lib/icon/angle-double-up-line.js +1 -541
  37. package/lib/icon/angle-down-fill.js +1 -541
  38. package/lib/icon/angle-down-line.js +1 -541
  39. package/lib/icon/angle-down.js +1 -541
  40. package/lib/icon/angle-left.js +1 -541
  41. package/lib/icon/angle-right.js +1 -541
  42. package/lib/icon/angle-up-fill.js +1 -541
  43. package/lib/icon/angle-up.js +1 -541
  44. package/lib/icon/archive-fill.js +1 -541
  45. package/lib/icon/arrows-left.js +1 -541
  46. package/lib/icon/arrows-right.js +1 -541
  47. package/lib/icon/audio-fill.js +1 -541
  48. package/lib/icon/bk.js +1 -541
  49. package/lib/icon/circle.js +1 -541
  50. package/lib/icon/close-line.js +1 -541
  51. package/lib/icon/close.js +1 -541
  52. package/lib/icon/code.js +1 -541
  53. package/lib/icon/cog-shape.js +1 -541
  54. package/lib/icon/collapse-left.js +1 -541
  55. package/lib/icon/copy-shape.js +1 -541
  56. package/lib/icon/copy.js +1 -541
  57. package/lib/icon/data-shape.js +1 -541
  58. package/lib/icon/del.js +1 -541
  59. package/lib/icon/doc-fill.js +1 -541
  60. package/lib/icon/done.js +1 -541
  61. package/lib/icon/down-shape.js +1 -541
  62. package/lib/icon/down-small.js +1 -541
  63. package/lib/icon/edit-line.js +1 -541
  64. package/lib/icon/ellipsis.js +1 -541
  65. package/lib/icon/enlarge-line.js +1 -541
  66. package/lib/icon/error.js +1 -541
  67. package/lib/icon/excel-fill.js +1 -541
  68. package/lib/icon/exclamation-circle-shape.js +1 -541
  69. package/lib/icon/eye.js +1 -541
  70. package/lib/icon/filliscreen-line.js +1 -541
  71. package/lib/icon/fix-line.js +1 -541
  72. package/lib/icon/fix-shape.js +1 -541
  73. package/lib/icon/folder-open.js +1 -541
  74. package/lib/icon/folder-shape-open.js +1 -541
  75. package/lib/icon/folder-shape.js +1 -541
  76. package/lib/icon/folder.js +1 -541
  77. package/lib/icon/funnel.js +1 -541
  78. package/lib/icon/help-document-fill.js +1 -541
  79. package/lib/icon/help-fill.js +1 -541
  80. package/lib/icon/help.js +1 -541
  81. package/lib/icon/image-fill.js +1 -563
  82. package/lib/icon/img-error.js +1 -563
  83. package/lib/icon/img-placehoulder.js +1 -563
  84. package/lib/icon/index.js +1 -2337
  85. package/lib/icon/info-line.js +1 -563
  86. package/lib/icon/info.js +1 -563
  87. package/lib/icon/left-shape.js +1 -563
  88. package/lib/icon/left-turn-line.js +1 -563
  89. package/lib/icon/narrow-line.js +1 -563
  90. package/lib/icon/original.js +1 -563
  91. package/lib/icon/pdf-fill.js +1 -563
  92. package/lib/icon/play-shape.js +1 -563
  93. package/lib/icon/plus.js +1 -563
  94. package/lib/icon/ppt-fill.js +1 -563
  95. package/lib/icon/qq.js +1 -563
  96. package/lib/icon/right-shape.js +1 -563
  97. package/lib/icon/right-turn-line.js +1 -563
  98. package/lib/icon/search.js +1 -563
  99. package/lib/icon/share.js +1 -563
  100. package/lib/icon/spinner.js +1 -563
  101. package/lib/icon/success.js +1 -563
  102. package/lib/icon/switcher-loading.js +1 -563
  103. package/lib/icon/text-file.js +1 -563
  104. package/lib/icon/text-fill.js +1 -563
  105. package/lib/icon/transfer.js +1 -563
  106. package/lib/icon/tree-application-shape.js +1 -563
  107. package/lib/icon/unfull-screen.js +1 -563
  108. package/lib/icon/unvisible.js +1 -563
  109. package/lib/icon/up-shape.js +1 -563
  110. package/lib/icon/upload.js +1 -563
  111. package/lib/icon/video-fill.js +1 -563
  112. package/lib/icon/warn.js +1 -563
  113. package/lib/icon/weixin-pro.js +1 -563
  114. package/lib/icon/weixin.js +1 -563
  115. package/lib/image/index.js +1 -944
  116. package/lib/index.js +1 -195
  117. package/lib/info-box/index.js +2 -1508
  118. package/lib/info-box/index.js.LICENSE.txt +1 -0
  119. package/lib/input/index.js +1 -963
  120. package/lib/link/index.js +1 -219
  121. package/lib/loading/index.js +1 -434
  122. package/lib/locale/index.js +1 -489
  123. package/lib/menu/index.js +1 -776
  124. package/lib/message/index.js +2 -1744
  125. package/lib/message/index.js.LICENSE.txt +6 -0
  126. package/lib/modal/index.js +1 -397
  127. package/lib/navigation/index.js +1 -423
  128. package/lib/notify/index.js +1 -437
  129. package/lib/overflow-title/index.js +1 -547
  130. package/lib/pagination/index.js +1 -987
  131. package/lib/plugin-popover/index.js +1 -4022
  132. package/lib/plugins/index.js +1 -130
  133. package/lib/pop-confirm/index.js +1 -365
  134. package/lib/popover/index.js +1 -4028
  135. package/lib/popover2/index.js +1 -171
  136. package/lib/preset.js +1 -164
  137. package/lib/process/index.js +2 -1143
  138. package/lib/process/index.js.LICENSE.txt +1 -0
  139. package/lib/progress/index.js +1 -476
  140. package/lib/radio/index.js +1 -611
  141. package/lib/rate/index.js +1 -348
  142. package/lib/resize-layout/index.js +1 -482
  143. package/lib/search-select/index.js +2 -2999
  144. package/lib/search-select/index.js.LICENSE.txt +1 -0
  145. package/lib/select/index.js +2 -2531
  146. package/lib/select/index.js.LICENSE.txt +1 -0
  147. package/lib/shared/index.js +1 -2713
  148. package/lib/sideslider/index.js +2 -1043
  149. package/lib/sideslider/index.js.LICENSE.txt +1 -0
  150. package/lib/slider/index.js +2 -1667
  151. package/lib/slider/index.js.LICENSE.txt +1 -0
  152. package/lib/steps/index.js +2 -1212
  153. package/lib/steps/index.js.LICENSE.txt +1 -0
  154. package/lib/swiper/index.js +1 -350
  155. package/lib/switcher/index.js +1 -323
  156. package/lib/tab/index.js +1 -918
  157. package/lib/table/index.js +1 -6388
  158. package/lib/table-column/index.js +1 -801
  159. package/lib/tag/index.js +1 -300
  160. package/lib/tag-input/index.js +1 -1757
  161. package/lib/time-picker/index.js +1 -142
  162. package/lib/timeline/index.js +1 -297
  163. package/lib/transfer/index.js +1 -764
  164. package/lib/tree/index.js +1 -2608
  165. package/lib/upload/index.js +2 -3257
  166. package/lib/upload/index.js.LICENSE.txt +1 -0
  167. package/lib/virtual-render/index.js +1 -790
  168. package/package.json +1 -1
@@ -1,1667 +1,2 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("../shared"), require("vue"), require("../input"), require("../popover"));
4
- else if(typeof define === 'function' && define.amd)
5
- define(["../shared", "vue", "../input", "../popover"], factory);
6
- else {
7
- var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../input"), require("../popover")) : factory(root["../shared"], root["vue"], root["../input"], root["../popover"]);
8
- for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
- }
10
- })(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__8133__, __WEBPACK_EXTERNAL_MODULE__5537__) => {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ var __webpack_modules__ = ({
13
-
14
- /***/ 8133:
15
- /***/ ((module) => {
16
-
17
- "use strict";
18
- module.exports = __WEBPACK_EXTERNAL_MODULE__8133__;
19
-
20
- /***/ }),
21
-
22
- /***/ 5537:
23
- /***/ ((module) => {
24
-
25
- "use strict";
26
- module.exports = __WEBPACK_EXTERNAL_MODULE__5537__;
27
-
28
- /***/ }),
29
-
30
- /***/ 4212:
31
- /***/ ((module) => {
32
-
33
- "use strict";
34
- module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
35
-
36
- /***/ }),
37
-
38
- /***/ 748:
39
- /***/ ((module) => {
40
-
41
- "use strict";
42
- module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
43
-
44
- /***/ }),
45
-
46
- /***/ 7609:
47
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
48
-
49
- var _typeof = (__webpack_require__(7425)["default"]);
50
- function _regeneratorRuntime() {
51
- "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
52
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
53
- return exports;
54
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
55
- var exports = {},
56
- Op = Object.prototype,
57
- hasOwn = Op.hasOwnProperty,
58
- defineProperty = Object.defineProperty || function (obj, key, desc) {
59
- obj[key] = desc.value;
60
- },
61
- $Symbol = "function" == typeof Symbol ? Symbol : {},
62
- iteratorSymbol = $Symbol.iterator || "@@iterator",
63
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
64
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
65
- function define(obj, key, value) {
66
- return Object.defineProperty(obj, key, {
67
- value: value,
68
- enumerable: !0,
69
- configurable: !0,
70
- writable: !0
71
- }), obj[key];
72
- }
73
- try {
74
- define({}, "");
75
- } catch (err) {
76
- define = function define(obj, key, value) {
77
- return obj[key] = value;
78
- };
79
- }
80
- function wrap(innerFn, outerFn, self, tryLocsList) {
81
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
82
- generator = Object.create(protoGenerator.prototype),
83
- context = new Context(tryLocsList || []);
84
- return defineProperty(generator, "_invoke", {
85
- value: makeInvokeMethod(innerFn, self, context)
86
- }), generator;
87
- }
88
- function tryCatch(fn, obj, arg) {
89
- try {
90
- return {
91
- type: "normal",
92
- arg: fn.call(obj, arg)
93
- };
94
- } catch (err) {
95
- return {
96
- type: "throw",
97
- arg: err
98
- };
99
- }
100
- }
101
- exports.wrap = wrap;
102
- var ContinueSentinel = {};
103
- function Generator() {}
104
- function GeneratorFunction() {}
105
- function GeneratorFunctionPrototype() {}
106
- var IteratorPrototype = {};
107
- define(IteratorPrototype, iteratorSymbol, function () {
108
- return this;
109
- });
110
- var getProto = Object.getPrototypeOf,
111
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
112
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
113
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
114
- function defineIteratorMethods(prototype) {
115
- ["next", "throw", "return"].forEach(function (method) {
116
- define(prototype, method, function (arg) {
117
- return this._invoke(method, arg);
118
- });
119
- });
120
- }
121
- function AsyncIterator(generator, PromiseImpl) {
122
- function invoke(method, arg, resolve, reject) {
123
- var record = tryCatch(generator[method], generator, arg);
124
- if ("throw" !== record.type) {
125
- var result = record.arg,
126
- value = result.value;
127
- return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
128
- invoke("next", value, resolve, reject);
129
- }, function (err) {
130
- invoke("throw", err, resolve, reject);
131
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
132
- result.value = unwrapped, resolve(result);
133
- }, function (error) {
134
- return invoke("throw", error, resolve, reject);
135
- });
136
- }
137
- reject(record.arg);
138
- }
139
- var previousPromise;
140
- defineProperty(this, "_invoke", {
141
- value: function value(method, arg) {
142
- function callInvokeWithMethodAndArg() {
143
- return new PromiseImpl(function (resolve, reject) {
144
- invoke(method, arg, resolve, reject);
145
- });
146
- }
147
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
148
- }
149
- });
150
- }
151
- function makeInvokeMethod(innerFn, self, context) {
152
- var state = "suspendedStart";
153
- return function (method, arg) {
154
- if ("executing" === state) throw new Error("Generator is already running");
155
- if ("completed" === state) {
156
- if ("throw" === method) throw arg;
157
- return doneResult();
158
- }
159
- for (context.method = method, context.arg = arg;;) {
160
- var delegate = context.delegate;
161
- if (delegate) {
162
- var delegateResult = maybeInvokeDelegate(delegate, context);
163
- if (delegateResult) {
164
- if (delegateResult === ContinueSentinel) continue;
165
- return delegateResult;
166
- }
167
- }
168
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
169
- if ("suspendedStart" === state) throw state = "completed", context.arg;
170
- context.dispatchException(context.arg);
171
- } else "return" === context.method && context.abrupt("return", context.arg);
172
- state = "executing";
173
- var record = tryCatch(innerFn, self, context);
174
- if ("normal" === record.type) {
175
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
176
- return {
177
- value: record.arg,
178
- done: context.done
179
- };
180
- }
181
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
182
- }
183
- };
184
- }
185
- function maybeInvokeDelegate(delegate, context) {
186
- var methodName = context.method,
187
- method = delegate.iterator[methodName];
188
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
189
- var record = tryCatch(method, delegate.iterator, context.arg);
190
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
191
- var info = record.arg;
192
- 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);
193
- }
194
- function pushTryEntry(locs) {
195
- var entry = {
196
- tryLoc: locs[0]
197
- };
198
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
199
- }
200
- function resetTryEntry(entry) {
201
- var record = entry.completion || {};
202
- record.type = "normal", delete record.arg, entry.completion = record;
203
- }
204
- function Context(tryLocsList) {
205
- this.tryEntries = [{
206
- tryLoc: "root"
207
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
208
- }
209
- function values(iterable) {
210
- if (iterable) {
211
- var iteratorMethod = iterable[iteratorSymbol];
212
- if (iteratorMethod) return iteratorMethod.call(iterable);
213
- if ("function" == typeof iterable.next) return iterable;
214
- if (!isNaN(iterable.length)) {
215
- var i = -1,
216
- next = function next() {
217
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
218
- return next.value = undefined, next.done = !0, next;
219
- };
220
- return next.next = next;
221
- }
222
- }
223
- return {
224
- next: doneResult
225
- };
226
- }
227
- function doneResult() {
228
- return {
229
- value: undefined,
230
- done: !0
231
- };
232
- }
233
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
234
- value: GeneratorFunctionPrototype,
235
- configurable: !0
236
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
237
- value: GeneratorFunction,
238
- configurable: !0
239
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
240
- var ctor = "function" == typeof genFun && genFun.constructor;
241
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
242
- }, exports.mark = function (genFun) {
243
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
244
- }, exports.awrap = function (arg) {
245
- return {
246
- __await: arg
247
- };
248
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
249
- return this;
250
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
251
- void 0 === PromiseImpl && (PromiseImpl = Promise);
252
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
253
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
254
- return result.done ? result.value : iter.next();
255
- });
256
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
257
- return this;
258
- }), define(Gp, "toString", function () {
259
- return "[object Generator]";
260
- }), exports.keys = function (val) {
261
- var object = Object(val),
262
- keys = [];
263
- for (var key in object) keys.push(key);
264
- return keys.reverse(), function next() {
265
- for (; keys.length;) {
266
- var key = keys.pop();
267
- if (key in object) return next.value = key, next.done = !1, next;
268
- }
269
- return next.done = !0, next;
270
- };
271
- }, exports.values = values, Context.prototype = {
272
- constructor: Context,
273
- reset: function reset(skipTempReset) {
274
- 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);
275
- },
276
- stop: function stop() {
277
- this.done = !0;
278
- var rootRecord = this.tryEntries[0].completion;
279
- if ("throw" === rootRecord.type) throw rootRecord.arg;
280
- return this.rval;
281
- },
282
- dispatchException: function dispatchException(exception) {
283
- if (this.done) throw exception;
284
- var context = this;
285
- function handle(loc, caught) {
286
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
287
- }
288
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
289
- var entry = this.tryEntries[i],
290
- record = entry.completion;
291
- if ("root" === entry.tryLoc) return handle("end");
292
- if (entry.tryLoc <= this.prev) {
293
- var hasCatch = hasOwn.call(entry, "catchLoc"),
294
- hasFinally = hasOwn.call(entry, "finallyLoc");
295
- if (hasCatch && hasFinally) {
296
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
297
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
298
- } else if (hasCatch) {
299
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
300
- } else {
301
- if (!hasFinally) throw new Error("try statement without catch or finally");
302
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
303
- }
304
- }
305
- }
306
- },
307
- abrupt: function abrupt(type, arg) {
308
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
309
- var entry = this.tryEntries[i];
310
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
311
- var finallyEntry = entry;
312
- break;
313
- }
314
- }
315
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
316
- var record = finallyEntry ? finallyEntry.completion : {};
317
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
318
- },
319
- complete: function complete(record, afterLoc) {
320
- if ("throw" === record.type) throw record.arg;
321
- 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;
322
- },
323
- finish: function finish(finallyLoc) {
324
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
325
- var entry = this.tryEntries[i];
326
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
327
- }
328
- },
329
- "catch": function _catch(tryLoc) {
330
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
331
- var entry = this.tryEntries[i];
332
- if (entry.tryLoc === tryLoc) {
333
- var record = entry.completion;
334
- if ("throw" === record.type) {
335
- var thrown = record.arg;
336
- resetTryEntry(entry);
337
- }
338
- return thrown;
339
- }
340
- }
341
- throw new Error("illegal catch attempt");
342
- },
343
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
344
- return this.delegate = {
345
- iterator: values(iterable),
346
- resultName: resultName,
347
- nextLoc: nextLoc
348
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
349
- }
350
- }, exports;
351
- }
352
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
353
-
354
- /***/ }),
355
-
356
- /***/ 7425:
357
- /***/ ((module) => {
358
-
359
- function _typeof(obj) {
360
- "@babel/helpers - typeof";
361
-
362
- return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
363
- return typeof obj;
364
- } : function (obj) {
365
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
366
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
367
- }
368
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
369
-
370
- /***/ }),
371
-
372
- /***/ 2841:
373
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
374
-
375
- // TODO(Babel 8): Remove this file.
376
-
377
- var runtime = __webpack_require__(7609)();
378
- module.exports = runtime;
379
-
380
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
381
- try {
382
- regeneratorRuntime = runtime;
383
- } catch (accidentalStrictMode) {
384
- if (typeof globalThis === "object") {
385
- globalThis.regeneratorRuntime = runtime;
386
- } else {
387
- Function("r", "regeneratorRuntime = r")(runtime);
388
- }
389
- }
390
-
391
-
392
- /***/ })
393
-
394
- /******/ });
395
- /************************************************************************/
396
- /******/ // The module cache
397
- /******/ var __webpack_module_cache__ = {};
398
- /******/
399
- /******/ // The require function
400
- /******/ function __webpack_require__(moduleId) {
401
- /******/ // Check if module is in cache
402
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
403
- /******/ if (cachedModule !== undefined) {
404
- /******/ return cachedModule.exports;
405
- /******/ }
406
- /******/ // Create a new module (and put it into the cache)
407
- /******/ var module = __webpack_module_cache__[moduleId] = {
408
- /******/ // no module.id needed
409
- /******/ // no module.loaded needed
410
- /******/ exports: {}
411
- /******/ };
412
- /******/
413
- /******/ // Execute the module function
414
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
415
- /******/
416
- /******/ // Return the exports of the module
417
- /******/ return module.exports;
418
- /******/ }
419
- /******/
420
- /************************************************************************/
421
- /******/ /* webpack/runtime/compat get default export */
422
- /******/ (() => {
423
- /******/ // getDefaultExport function for compatibility with non-harmony modules
424
- /******/ __webpack_require__.n = (module) => {
425
- /******/ var getter = module && module.__esModule ?
426
- /******/ () => (module['default']) :
427
- /******/ () => (module);
428
- /******/ __webpack_require__.d(getter, { a: getter });
429
- /******/ return getter;
430
- /******/ };
431
- /******/ })();
432
- /******/
433
- /******/ /* webpack/runtime/define property getters */
434
- /******/ (() => {
435
- /******/ // define getter functions for harmony exports
436
- /******/ __webpack_require__.d = (exports, definition) => {
437
- /******/ for(var key in definition) {
438
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
439
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
440
- /******/ }
441
- /******/ }
442
- /******/ };
443
- /******/ })();
444
- /******/
445
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
446
- /******/ (() => {
447
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
448
- /******/ })();
449
- /******/
450
- /******/ /* webpack/runtime/make namespace object */
451
- /******/ (() => {
452
- /******/ // define __esModule on exports
453
- /******/ __webpack_require__.r = (exports) => {
454
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
455
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
456
- /******/ }
457
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
458
- /******/ };
459
- /******/ })();
460
- /******/
461
- /************************************************************************/
462
- var __webpack_exports__ = {};
463
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
464
- (() => {
465
- "use strict";
466
- // ESM COMPAT FLAG
467
- __webpack_require__.r(__webpack_exports__);
468
-
469
- // EXPORTS
470
- __webpack_require__.d(__webpack_exports__, {
471
- "default": () => (/* binding */ src)
472
- });
473
-
474
- // EXTERNAL MODULE: external "../shared"
475
- var external_shared_ = __webpack_require__(4212);
476
- // EXTERNAL MODULE: external "vue"
477
- var external_vue_ = __webpack_require__(748);
478
- // EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
479
- var regenerator = __webpack_require__(2841);
480
- var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
481
- ;// CONCATENATED MODULE: ../../node_modules/tslib/tslib.es6.mjs
482
- /******************************************************************************
483
- Copyright (c) Microsoft Corporation.
484
-
485
- Permission to use, copy, modify, and/or distribute this software for any
486
- purpose with or without fee is hereby granted.
487
-
488
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
489
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
490
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
491
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
492
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
493
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
494
- PERFORMANCE OF THIS SOFTWARE.
495
- ***************************************************************************** */
496
- /* global Reflect, Promise, SuppressedError, Symbol */
497
-
498
- var extendStatics = function(d, b) {
499
- extendStatics = Object.setPrototypeOf ||
500
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
501
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
502
- return extendStatics(d, b);
503
- };
504
-
505
- function __extends(d, b) {
506
- if (typeof b !== "function" && b !== null)
507
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
508
- extendStatics(d, b);
509
- function __() { this.constructor = d; }
510
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
511
- }
512
-
513
- var __assign = function() {
514
- __assign = Object.assign || function __assign(t) {
515
- for (var s, i = 1, n = arguments.length; i < n; i++) {
516
- s = arguments[i];
517
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
518
- }
519
- return t;
520
- }
521
- return __assign.apply(this, arguments);
522
- }
523
-
524
- function __rest(s, e) {
525
- var t = {};
526
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
527
- t[p] = s[p];
528
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
529
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
530
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
531
- t[p[i]] = s[p[i]];
532
- }
533
- return t;
534
- }
535
-
536
- function __decorate(decorators, target, key, desc) {
537
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
538
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
539
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
540
- return c > 3 && r && Object.defineProperty(target, key, r), r;
541
- }
542
-
543
- function __param(paramIndex, decorator) {
544
- return function (target, key) { decorator(target, key, paramIndex); }
545
- }
546
-
547
- function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
548
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
549
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
550
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
551
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
552
- var _, done = false;
553
- for (var i = decorators.length - 1; i >= 0; i--) {
554
- var context = {};
555
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
556
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
557
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
558
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
559
- if (kind === "accessor") {
560
- if (result === void 0) continue;
561
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
562
- if (_ = accept(result.get)) descriptor.get = _;
563
- if (_ = accept(result.set)) descriptor.set = _;
564
- if (_ = accept(result.init)) initializers.unshift(_);
565
- }
566
- else if (_ = accept(result)) {
567
- if (kind === "field") initializers.unshift(_);
568
- else descriptor[key] = _;
569
- }
570
- }
571
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
572
- done = true;
573
- };
574
-
575
- function __runInitializers(thisArg, initializers, value) {
576
- var useValue = arguments.length > 2;
577
- for (var i = 0; i < initializers.length; i++) {
578
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
579
- }
580
- return useValue ? value : void 0;
581
- };
582
-
583
- function __propKey(x) {
584
- return typeof x === "symbol" ? x : "".concat(x);
585
- };
586
-
587
- function __setFunctionName(f, name, prefix) {
588
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
589
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
590
- };
591
-
592
- function __metadata(metadataKey, metadataValue) {
593
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
594
- }
595
-
596
- function __awaiter(thisArg, _arguments, P, generator) {
597
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
598
- return new (P || (P = Promise))(function (resolve, reject) {
599
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
600
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
601
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
602
- step((generator = generator.apply(thisArg, _arguments || [])).next());
603
- });
604
- }
605
-
606
- function __generator(thisArg, body) {
607
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
608
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
609
- function verb(n) { return function (v) { return step([n, v]); }; }
610
- function step(op) {
611
- if (f) throw new TypeError("Generator is already executing.");
612
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
613
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
614
- if (y = 0, t) op = [op[0] & 2, t.value];
615
- switch (op[0]) {
616
- case 0: case 1: t = op; break;
617
- case 4: _.label++; return { value: op[1], done: false };
618
- case 5: _.label++; y = op[1]; op = [0]; continue;
619
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
620
- default:
621
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
622
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
623
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
624
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
625
- if (t[2]) _.ops.pop();
626
- _.trys.pop(); continue;
627
- }
628
- op = body.call(thisArg, _);
629
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
630
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
631
- }
632
- }
633
-
634
- var __createBinding = Object.create ? (function(o, m, k, k2) {
635
- if (k2 === undefined) k2 = k;
636
- var desc = Object.getOwnPropertyDescriptor(m, k);
637
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
638
- desc = { enumerable: true, get: function() { return m[k]; } };
639
- }
640
- Object.defineProperty(o, k2, desc);
641
- }) : (function(o, m, k, k2) {
642
- if (k2 === undefined) k2 = k;
643
- o[k2] = m[k];
644
- });
645
-
646
- function __exportStar(m, o) {
647
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
648
- }
649
-
650
- function __values(o) {
651
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
652
- if (m) return m.call(o);
653
- if (o && typeof o.length === "number") return {
654
- next: function () {
655
- if (o && i >= o.length) o = void 0;
656
- return { value: o && o[i++], done: !o };
657
- }
658
- };
659
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
660
- }
661
-
662
- function __read(o, n) {
663
- var m = typeof Symbol === "function" && o[Symbol.iterator];
664
- if (!m) return o;
665
- var i = m.call(o), r, ar = [], e;
666
- try {
667
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
668
- }
669
- catch (error) { e = { error: error }; }
670
- finally {
671
- try {
672
- if (r && !r.done && (m = i["return"])) m.call(i);
673
- }
674
- finally { if (e) throw e.error; }
675
- }
676
- return ar;
677
- }
678
-
679
- /** @deprecated */
680
- function __spread() {
681
- for (var ar = [], i = 0; i < arguments.length; i++)
682
- ar = ar.concat(__read(arguments[i]));
683
- return ar;
684
- }
685
-
686
- /** @deprecated */
687
- function __spreadArrays() {
688
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
689
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
690
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
691
- r[k] = a[j];
692
- return r;
693
- }
694
-
695
- function __spreadArray(to, from, pack) {
696
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
697
- if (ar || !(i in from)) {
698
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
699
- ar[i] = from[i];
700
- }
701
- }
702
- return to.concat(ar || Array.prototype.slice.call(from));
703
- }
704
-
705
- function __await(v) {
706
- return this instanceof __await ? (this.v = v, this) : new __await(v);
707
- }
708
-
709
- function __asyncGenerator(thisArg, _arguments, generator) {
710
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
711
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
712
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
713
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
714
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
715
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
716
- function fulfill(value) { resume("next", value); }
717
- function reject(value) { resume("throw", value); }
718
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
719
- }
720
-
721
- function __asyncDelegator(o) {
722
- var i, p;
723
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
724
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
725
- }
726
-
727
- function __asyncValues(o) {
728
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
729
- var m = o[Symbol.asyncIterator], i;
730
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
731
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
732
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
733
- }
734
-
735
- function __makeTemplateObject(cooked, raw) {
736
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
737
- return cooked;
738
- };
739
-
740
- var __setModuleDefault = Object.create ? (function(o, v) {
741
- Object.defineProperty(o, "default", { enumerable: true, value: v });
742
- }) : function(o, v) {
743
- o["default"] = v;
744
- };
745
-
746
- function __importStar(mod) {
747
- if (mod && mod.__esModule) return mod;
748
- var result = {};
749
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
750
- __setModuleDefault(result, mod);
751
- return result;
752
- }
753
-
754
- function __importDefault(mod) {
755
- return (mod && mod.__esModule) ? mod : { default: mod };
756
- }
757
-
758
- function __classPrivateFieldGet(receiver, state, kind, f) {
759
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
760
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
761
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
762
- }
763
-
764
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
765
- if (kind === "m") throw new TypeError("Private method is not writable");
766
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
767
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
768
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
769
- }
770
-
771
- function __classPrivateFieldIn(state, receiver) {
772
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
773
- return typeof state === "function" ? receiver === state : state.has(receiver);
774
- }
775
-
776
- function __addDisposableResource(env, value, async) {
777
- if (value !== null && value !== void 0) {
778
- if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
779
- var dispose;
780
- if (async) {
781
- if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
782
- dispose = value[Symbol.asyncDispose];
783
- }
784
- if (dispose === void 0) {
785
- if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
786
- dispose = value[Symbol.dispose];
787
- }
788
- if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
789
- env.stack.push({ value: value, dispose: dispose, async: async });
790
- }
791
- else if (async) {
792
- env.stack.push({ async: true });
793
- }
794
- return value;
795
- }
796
-
797
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
798
- var e = new Error(message);
799
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
800
- };
801
-
802
- function __disposeResources(env) {
803
- function fail(e) {
804
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
805
- env.hasError = true;
806
- }
807
- function next() {
808
- while (env.stack.length) {
809
- var rec = env.stack.pop();
810
- try {
811
- var result = rec.dispose && rec.dispose.call(rec.value);
812
- if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
813
- }
814
- catch (e) {
815
- fail(e);
816
- }
817
- }
818
- if (env.hasError) throw env.error;
819
- }
820
- return next();
821
- }
822
-
823
- /* harmony default export */ const tslib_es6 = ({
824
- __extends,
825
- __assign,
826
- __rest,
827
- __decorate,
828
- __param,
829
- __metadata,
830
- __awaiter,
831
- __generator,
832
- __createBinding,
833
- __exportStar,
834
- __values,
835
- __read,
836
- __spread,
837
- __spreadArrays,
838
- __spreadArray,
839
- __await,
840
- __asyncGenerator,
841
- __asyncDelegator,
842
- __asyncValues,
843
- __makeTemplateObject,
844
- __importStar,
845
- __importDefault,
846
- __classPrivateFieldGet,
847
- __classPrivateFieldSet,
848
- __classPrivateFieldIn,
849
- __addDisposableResource,
850
- __disposeResources,
851
- });
852
-
853
- // EXTERNAL MODULE: external "../input"
854
- var external_input_ = __webpack_require__(8133);
855
- var external_input_default = /*#__PURE__*/__webpack_require__.n(external_input_);
856
- // EXTERNAL MODULE: external "../popover"
857
- var external_popover_ = __webpack_require__(5537);
858
- var external_popover_default = /*#__PURE__*/__webpack_require__.n(external_popover_);
859
- ;// CONCATENATED MODULE: ../../packages/slider/src/slider-button.tsx
860
-
861
- /**
862
- * Tencent is pleased to support the open source community by making
863
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
864
- *
865
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
866
- *
867
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
868
- *
869
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
870
- *
871
- * ---------------------------------------------------
872
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
873
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
874
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
875
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
876
- *
877
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
878
- * the Software.
879
- *
880
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
881
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
882
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
883
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
884
- * IN THE SOFTWARE.
885
- */
886
-
887
-
888
-
889
-
890
- /* harmony default export */ const slider_button = ((0,external_vue_.defineComponent)({
891
- name: 'SliderButton',
892
- props: {
893
- modelValue: {
894
- type: Number,
895
- "default": 0
896
- },
897
- params: {
898
- type: Object,
899
- "default": function _default() {
900
- return {};
901
- }
902
- }
903
- },
904
- emits: ['emitChange', 'resetSize', 'update:modelValue'],
905
- setup: function setup(props, _ref) {
906
- var emit = _ref.emit;
907
- var dragging = (0,external_vue_.ref)(false);
908
- var isClick = (0,external_vue_.ref)(false);
909
- var startY = (0,external_vue_.ref)(0);
910
- var startX = (0,external_vue_.ref)(0);
911
- var startPosition = (0,external_vue_.ref)(0);
912
- var newPosition = (0,external_vue_.ref)(null);
913
- var oldValue = (0,external_vue_.ref)(props.modelValue);
914
- var currentY = (0,external_vue_.ref)(0);
915
- var currentX = (0,external_vue_.ref)(0);
916
- var isMove = (0,external_vue_.ref)(false);
917
- var button = (0,external_vue_.ref)(null);
918
- var tip = (0,external_vue_.computed)(function () {
919
- var _a, _b;
920
- var tip = '';
921
- if ((_a = props.params.customContent) === null || _a === void 0 ? void 0 : _a[props.modelValue]) {
922
- var customContent = props.params.customContent[props.modelValue];
923
- tip = customContent.tip || customContent.label || '';
924
- }
925
- var placement = props.params.vertical ? external_shared_.PlacementEnum.RIGHT : external_shared_.PlacementEnum.TOP;
926
- if ((_b = props.params) === null || _b === void 0 ? void 0 : _b.showTip) {
927
- return {
928
- content: props.params.formatterTipLabel("".concat(tip || (props === null || props === void 0 ? void 0 : props.modelValue) || '0')),
929
- placement: placement
930
- };
931
- }
932
- return {
933
- content: '',
934
- placement: placement
935
- };
936
- });
937
- var currentPosition = (0,external_vue_.computed)(function () {
938
- return "".concat((props.modelValue - props.params.minValue) / (props.params.maxValue - props.params.minValue) * 100, "%");
939
- });
940
- var wrapperStyle = (0,external_vue_.computed)(function () {
941
- return props.params.vertical ? {
942
- bottom: currentPosition.value
943
- } : {
944
- left: currentPosition.value
945
- };
946
- });
947
- var buttonLabel = (0,external_vue_.computed)(function () {
948
- return props.params.formatterButtonLabel(props.modelValue);
949
- });
950
- var onButtonDown = function onButtonDown(event) {
951
- if (props.params.disable) return;
952
- event.preventDefault();
953
- onDragStart(event);
954
- on(window, 'mousemove', onDragging);
955
- on(window, 'touchmove', onDragging);
956
- on(window, 'mouseup', onDragEnd);
957
- on(window, 'touchend', onDragEnd);
958
- };
959
- var onDragStart = function onDragStart(event) {
960
- dragging.value = true;
961
- isClick.value = true;
962
- if (props.params.vertical) {
963
- startY.value = event.clientY;
964
- } else {
965
- startX.value = event.clientX;
966
- }
967
- startPosition.value = parseFloat(currentPosition.value);
968
- newPosition.value = startPosition.value;
969
- };
970
- var onDragging = function onDragging(event) {
971
- if (dragging.value) {
972
- isClick.value = false;
973
- emit('resetSize');
974
- var diff = 0;
975
- if (props.params.vertical) {
976
- currentY.value = event.clientY;
977
- diff = (startY.value - currentY.value) / props.params.sliderSize * 100;
978
- } else {
979
- currentX.value = event.clientX;
980
- diff = (currentX.value - startX.value) / props.params.sliderSize * 100;
981
- }
982
- newPosition.value = startPosition.value + diff;
983
- setPosition(newPosition.value);
984
- }
985
- };
986
- var onDragEnd = function onDragEnd() {
987
- isMove.value = false;
988
- if (dragging.value) {
989
- setTimeout(function () {
990
- dragging.value = false;
991
- if (!isClick.value) {
992
- setPosition(newPosition.value);
993
- emit('emitChange');
994
- }
995
- }, 0);
996
- off(window, 'mousemove', onDragging);
997
- off(window, 'touchmove', onDragging);
998
- off(window, 'mouseup', onDragEnd);
999
- off(window, 'touchend', onDragEnd);
1000
- }
1001
- };
1002
- var setPosition = function setPosition(position) {
1003
- if (position === null || isNaN(position)) return;
1004
- if (position < 0) {
1005
- newPosition.value = 0;
1006
- } else if (position > 100) {
1007
- newPosition.value = 100;
1008
- }
1009
- var lengthPerStep = 100 / ((props.params.maxValue - props.params.minValue) / props.params.step);
1010
- var steps = Math.round(position / lengthPerStep);
1011
- var value = steps * lengthPerStep * (props.params.maxValue - props.params.minValue) * 0.01 + props.params.minValue;
1012
- value = parseFloat(value.toFixed(props.params.precision));
1013
- emit('update:modelValue', value);
1014
- if (!dragging.value && props.modelValue !== oldValue.value) {
1015
- oldValue.value = props.modelValue;
1016
- }
1017
- };
1018
- var renderDom = function renderDom() {
1019
- return (0,external_vue_.createVNode)("div", {
1020
- "class": ['bk-slider-button', props.params.vertical ? 'vertical' : 'horizontal', {
1021
- grabbing: dragging.value
1022
- }],
1023
- "ref": button,
1024
- "tabindex": "0",
1025
- "style": wrapperStyle.value,
1026
- "onClick": function onClick(event) {
1027
- return event.stopPropagation();
1028
- },
1029
- "onMousedown": onButtonDown
1030
- }, [Boolean(tip.value.content) ? (0,external_vue_.createVNode)((external_popover_default()), {
1031
- "content": tip.value.content,
1032
- "theme": 'dark',
1033
- "placement": tip.value.placement,
1034
- "boundary": document.body
1035
- }, {
1036
- "default": function _default() {
1037
- return [(0,external_vue_.createVNode)("div", {
1038
- "class": ['slider-button', {
1039
- 'slider-button-disable': props.params.disable
1040
- }]
1041
- }, null)];
1042
- }
1043
- }) : (0,external_vue_.createVNode)("div", {
1044
- "class": ['slider-button', {
1045
- 'slider-button-disable': props.params.disable
1046
- }]
1047
- }, null), props.params.showButtonLabel && !props.params.showIntervalLabel ? (0,external_vue_.createVNode)("div", {
1048
- "class": ['slider-button-label', props.params.vertical ? 'vertical' : 'horizontal']
1049
- }, [buttonLabel.value]) : undefined]);
1050
- };
1051
- return {
1052
- renderDom: renderDom,
1053
- setPosition: setPosition,
1054
- tip: tip
1055
- };
1056
- },
1057
- render: function render() {
1058
- return this.renderDom();
1059
- }
1060
- }));
1061
- ;// CONCATENATED MODULE: ../../packages/slider/src/slider.tsx
1062
-
1063
-
1064
- /**
1065
- * Tencent is pleased to support the open source community by making
1066
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1067
- *
1068
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1069
- *
1070
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1071
- *
1072
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1073
- *
1074
- * ---------------------------------------------------
1075
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1076
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1077
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1078
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1079
- *
1080
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1081
- * the Software.
1082
- *
1083
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1084
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1085
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1086
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1087
- * IN THE SOFTWARE.
1088
- */
1089
-
1090
-
1091
-
1092
-
1093
-
1094
- var on = function on(element, event, handler) {
1095
- if (element && event && handler) {
1096
- element.addEventListener(event, handler, false);
1097
- }
1098
- };
1099
- var off = function off(element, event, handler) {
1100
- if (element && event && handler) {
1101
- element.removeEventListener(event, handler, false);
1102
- }
1103
- };
1104
- /* harmony default export */ const slider = ((0,external_vue_.defineComponent)({
1105
- name: 'Slider',
1106
- props: {
1107
- modelValue: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.number), external_shared_.PropTypes.number]),
1108
- extCls: {
1109
- type: String,
1110
- "default": ''
1111
- },
1112
- vertical: {
1113
- type: Boolean,
1114
- "default": false
1115
- },
1116
- height: {
1117
- type: String,
1118
- "default": '200px'
1119
- },
1120
- disable: {
1121
- type: Boolean,
1122
- "default": false
1123
- },
1124
- showTip: {
1125
- type: Boolean,
1126
- "default": false
1127
- },
1128
- maxValue: {
1129
- type: [Number],
1130
- "default": 100
1131
- },
1132
- minValue: {
1133
- type: [Number],
1134
- "default": 0
1135
- },
1136
- step: {
1137
- type: [Number],
1138
- "default": 1
1139
- },
1140
- range: {
1141
- type: Boolean,
1142
- "default": false
1143
- },
1144
- showInterval: {
1145
- type: Boolean,
1146
- "default": false
1147
- },
1148
- showIntervalLabel: {
1149
- type: Boolean,
1150
- "default": false
1151
- },
1152
- showButtonLabel: {
1153
- type: Boolean,
1154
- "default": false
1155
- },
1156
- showBetweenLabel: {
1157
- type: Boolean,
1158
- "default": false
1159
- },
1160
- showInput: {
1161
- type: Boolean,
1162
- "default": false
1163
- },
1164
- customContent: {
1165
- type: Object,
1166
- "default": null
1167
- },
1168
- formatterLabel: {
1169
- type: Function,
1170
- "default": function _default(value) {
1171
- return value;
1172
- }
1173
- },
1174
- formatterButtonLabel: {
1175
- type: Function,
1176
- "default": function _default(value) {
1177
- return value;
1178
- }
1179
- },
1180
- formatterTipLabel: {
1181
- type: Function,
1182
- "default": function _default(value) {
1183
- return value;
1184
- }
1185
- } // 自定义tip格式
1186
- },
1187
-
1188
- emits: ['update:modelValue', 'change'],
1189
- setup: function setup(props, _ref) {
1190
- var _this = this;
1191
- var slots = _ref.slots,
1192
- emit = _ref.emit;
1193
- /* 滑动选择器长度 */
1194
- var sliderSize = (0,external_vue_.ref)(1);
1195
- /* 第一个滑块与第二个滑块的值 */
1196
- var firstValue = (0,external_vue_.ref)(null);
1197
- var secondValue = (0,external_vue_.ref)(null);
1198
- var oldValue = (0,external_vue_.ref)(null);
1199
- /* 第一个输入框与第二个输入框的值 */
1200
- var firstInput = (0,external_vue_.ref)(0);
1201
- var secondInput = (0,external_vue_.ref)(0);
1202
- /* 以下为refDom */
1203
- var slider = (0,external_vue_.ref)(null);
1204
- var firstbutton = (0,external_vue_.ref)(null);
1205
- var secondbutton = (0,external_vue_.ref)(null);
1206
- var curButtonRef = (0,external_vue_.ref)(null);
1207
- // 小数点后最大位数
1208
- var precision = (0,external_vue_.computed)(function () {
1209
- var precisions = [props.minValue, props.maxValue, props.step].map(function (item) {
1210
- var decimal = "".concat(item).split('.')[1];
1211
- return decimal ? decimal.length : 0;
1212
- });
1213
- return Math.max.apply(null, precisions);
1214
- });
1215
- /* 当前滑块的最小值与最大值 */
1216
- var rangeMinValue = (0,external_vue_.computed)(function () {
1217
- return Math.min(firstValue.value, secondValue.value);
1218
- });
1219
- var rangeMaxValue = (0,external_vue_.computed)(function () {
1220
- return Math.max(firstValue.value, secondValue.value);
1221
- });
1222
- var barSize = (0,external_vue_.computed)(function () {
1223
- return props.range ? "".concat(100 * (rangeMaxValue.value - rangeMinValue.value) / (props.maxValue - props.minValue), "%") : "".concat(100 * (firstValue.value - props.minValue) / (props.maxValue - props.minValue), "%");
1224
- });
1225
- var barStart = (0,external_vue_.computed)(function () {
1226
- return props.range ? "".concat(100 * (rangeMinValue.value - props.minValue) / (props.maxValue - props.minValue), "%") : '0%';
1227
- });
1228
- /* 当前滑动区域的位置与长度 */
1229
- var barStyle = (0,external_vue_.computed)(function () {
1230
- return props.vertical ? {
1231
- height: barSize.value,
1232
- bottom: barStart.value
1233
- } : {
1234
- width: barSize.value,
1235
- left: barStart.value
1236
- };
1237
- });
1238
- /* 断点 */
1239
- var intervals = (0,external_vue_.computed)(function () {
1240
- if (!props.showInterval || props.minValue > props.maxValue) return [];
1241
- if (props.step === 0) {
1242
- console.warn('WARNNING:step should not be 0');
1243
- return [];
1244
- }
1245
- var stopCount = (props.maxValue - props.minValue) / props.step;
1246
- var stepWidth = 100 * props.step / (props.maxValue - props.minValue);
1247
- var result = [];
1248
- for (var i = 1; i < stopCount; i++) {
1249
- result.push(i * stepWidth);
1250
- }
1251
- if (props.range) {
1252
- // eslint-disable-next-line max-len
1253
- return result.filter(function (step) {
1254
- return step < 100 * (rangeMinValue.value - props.minValue) / (props.maxValue - props.minValue) || step > 100 * (rangeMaxValue.value - props.minValue) / (props.maxValue - props.minValue);
1255
- });
1256
- }
1257
- // eslint-disable-next-line max-len
1258
- return result.filter(function (step) {
1259
- return step > 100 * (firstValue.value - props.minValue) / (props.maxValue - props.minValue);
1260
- });
1261
- });
1262
- /* 可滑动区域的样式 */
1263
- var runwayStyle = (0,external_vue_.computed)(function () {
1264
- return props.vertical ? {
1265
- height: props.height,
1266
- width: '4px'
1267
- } : {};
1268
- });
1269
- /* 断点下方的文案 */
1270
- var intervalLabels = (0,external_vue_.computed)(function () {
1271
- if (!props.showIntervalLabel) return [];
1272
- if (props.step === 0) {
1273
- console.warn('WARNNING:step should not be 0');
1274
- return [];
1275
- }
1276
- var stepWidth = 100 * props.step / (props.maxValue - props.minValue);
1277
- var result = [];
1278
- for (var i = props.minValue, j = 0; i <= props.maxValue; i += props.step, j++) {
1279
- var item = {
1280
- stepWidth: j * stepWidth,
1281
- stepLabel: props.formatterLabel(i)
1282
- };
1283
- result.push(item);
1284
- }
1285
- return result;
1286
- });
1287
- /* 是否显示第二个输入框 */
1288
- var showSecondInput = (0,external_vue_.computed)(function () {
1289
- return Array.isArray(props.modelValue);
1290
- });
1291
- /* 自定义断点 */
1292
- var customList = (0,external_vue_.computed)(function () {
1293
- if (!props.customContent) {
1294
- return [];
1295
- }
1296
- return Object.keys(props.customContent).sort(function (a, b) {
1297
- return Number(a) - Number(b);
1298
- }).filter(function (value) {
1299
- return Number(value) >= props.minValue && Number(value) <= props.maxValue;
1300
- }).map(function (item) {
1301
- var tip = props.customContent[item].tip;
1302
- var label = props.customContent[item].label;
1303
- return {
1304
- tip: tip || label || '',
1305
- label: label || '',
1306
- percent: (Number(item) - props.minValue) / (props.maxValue - props.minValue) * 100
1307
- };
1308
- });
1309
- });
1310
- /* 传入到滑块的参数 */
1311
- var buttonParms = (0,external_vue_.computed)(function () {
1312
- return {
1313
- vertical: props.vertical,
1314
- showTip: props.showTip,
1315
- disable: props.disable,
1316
- maxValue: props.maxValue,
1317
- minValue: props.minValue,
1318
- step: props.step,
1319
- precision: precision.value,
1320
- showButtonLabel: props.showButtonLabel,
1321
- formatterButtonLabel: props.formatterButtonLabel,
1322
- showIntervalLabel: props.showIntervalLabel,
1323
- customContent: props.customContent,
1324
- sliderSize: sliderSize.value,
1325
- formatterTipLabel: props.formatterTipLabel
1326
- };
1327
- });
1328
- // 监听
1329
- (0,external_vue_.watch)(function () {
1330
- return props.modelValue;
1331
- }, function () {
1332
- setValues();
1333
- });
1334
- (0,external_vue_.watch)(function () {
1335
- return firstValue.value;
1336
- }, function (val) {
1337
- if (props.range) {
1338
- emit('update:modelValue', [rangeMinValue.value, rangeMaxValue.value]);
1339
- } else {
1340
- emit('update:modelValue', val);
1341
- }
1342
- firstInput.value = val;
1343
- });
1344
- (0,external_vue_.watch)(function () {
1345
- return secondValue.value;
1346
- }, function (val) {
1347
- emit('update:modelValue', [rangeMinValue.value, rangeMaxValue.value]);
1348
- secondInput.value = val;
1349
- });
1350
- /* 初始化 */
1351
- (0,external_vue_.onMounted)(function () {
1352
- if (props.range) {
1353
- if (Array.isArray(props.modelValue)) {
1354
- firstValue.value = Math.max(props.minValue, Number(props.modelValue[0]));
1355
- secondValue.value = Math.min(props.maxValue, Number(props.modelValue[1]));
1356
- } else {
1357
- firstValue.value = props.minValue;
1358
- secondValue.value = props.maxValue;
1359
- }
1360
- oldValue.value = [firstValue.value, secondValue.value];
1361
- } else {
1362
- if (typeof props.modelValue !== 'number' || isNaN(props.modelValue)) {
1363
- firstValue.value = props.minValue;
1364
- } else {
1365
- firstValue.value = Math.min(props.maxValue, Math.max(props.minValue, props.modelValue));
1366
- }
1367
- oldValue.value = firstValue.value;
1368
- }
1369
- resetSize();
1370
- on(window, 'resize', resetSize());
1371
- });
1372
- var resetSize = function resetSize() {
1373
- if (slider.value) {
1374
- sliderSize.value = slider.value["client".concat(props.vertical ? 'Height' : 'Width')];
1375
- }
1376
- };
1377
- /* 点击容器时设置滑块位置 */
1378
- var setButtonPos = function setButtonPos(event) {
1379
- var _a, _b;
1380
- event.stopPropagation();
1381
- if (props.disable) return;
1382
- resetSize();
1383
- if (props.vertical) {
1384
- var offsetBottom = (_a = slider.value) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().bottom;
1385
- setPosition((offsetBottom - event.clientY) / sliderSize.value * 100);
1386
- } else {
1387
- var offsetLeft = (_b = slider.value) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().left;
1388
- setPosition((event.clientX - offsetLeft) / sliderSize.value * 100);
1389
- }
1390
- emitChange();
1391
- };
1392
- /* 是否更改了值 */
1393
- var valueChanged = function valueChanged() {
1394
- if (props.range) {
1395
- return ![rangeMinValue.value, rangeMaxValue.value].every(function (item, index) {
1396
- return item === oldValue.value[index];
1397
- });
1398
- }
1399
- return props.modelValue !== oldValue.value;
1400
- };
1401
- /* emit */
1402
- var setValues = function setValues() {
1403
- if (props.minValue > props.maxValue) {
1404
- console.error('min should not be greater than max.');
1405
- return;
1406
- }
1407
- var val = props.modelValue;
1408
- if (props.range && Array.isArray(val)) {
1409
- if (val[1] < props.minValue) {
1410
- emit('update:modelValue', [props.minValue, props.minValue]);
1411
- } else if (val[0] > props.maxValue) {
1412
- emit('update:modelValue', [props.maxValue, props.maxValue]);
1413
- } else if (val[0] < props.minValue) {
1414
- emit('update:modelValue', [props.minValue, val[1]]);
1415
- } else if (val[1] > props.maxValue) {
1416
- emit('update:modelValue', [val[0], props.maxValue]);
1417
- } else {
1418
- firstValue.value = Number(val[0]);
1419
- secondValue.value = Number(val[1]);
1420
- if (valueChanged()) {
1421
- oldValue.value = val.slice();
1422
- }
1423
- }
1424
- } else if (!props.range && typeof val === 'number' && !isNaN(val)) {
1425
- if (val < props.minValue) {
1426
- emit('update:modelValue', props.minValue);
1427
- } else if (val > props.maxValue) {
1428
- emit('update:modelValue', props.maxValue);
1429
- } else {
1430
- firstValue.value = val;
1431
- if (valueChanged()) {
1432
- oldValue.value = val;
1433
- }
1434
- }
1435
- }
1436
- };
1437
- /* 派出事件 */
1438
- var emitChange = function emitChange() {
1439
- return __awaiter(_this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee() {
1440
- return regenerator_default().wrap(function _callee$(_context) {
1441
- while (1) switch (_context.prev = _context.next) {
1442
- case 0:
1443
- _context.next = 2;
1444
- return (0,external_vue_.nextTick)();
1445
- case 2:
1446
- emit('change', props.range ? [rangeMinValue.value, rangeMaxValue.value] : props.modelValue);
1447
- case 3:
1448
- case "end":
1449
- return _context.stop();
1450
- }
1451
- }, _callee);
1452
- }));
1453
- };
1454
- /* 断点样式 */
1455
- var getIntervalStyle = function getIntervalStyle(position) {
1456
- return props.vertical ? {
1457
- bottom: "".concat(position, "%")
1458
- } : {
1459
- left: "".concat(position, "%")
1460
- };
1461
- };
1462
- /* 设置滑块位置 */
1463
- var setPosition = function setPosition(percent) {
1464
- if (!props.range) {
1465
- firstbutton.value.setPosition(percent);
1466
- return;
1467
- }
1468
- var targetValue = props.minValue + percent * (props.maxValue - props.minValue) / 100;
1469
- // 绝对值
1470
- if (Math.abs(rangeMinValue.value - targetValue) < Math.abs(rangeMaxValue.value - targetValue)) {
1471
- curButtonRef.value = firstValue.value < secondValue.value ? firstbutton.value : secondbutton.value;
1472
- } else {
1473
- curButtonRef.value = firstValue.value > secondValue.value ? firstbutton.value : secondbutton.value;
1474
- }
1475
- curButtonRef.value.setPosition(percent);
1476
- };
1477
- var firstInputChange = function firstInputChange(v) {
1478
- if (v === '') {
1479
- return;
1480
- }
1481
- var val = parseFloat(v);
1482
- if (val < props.minValue) {
1483
- firstInput.value = props.minValue;
1484
- firstValue.value = props.minValue;
1485
- } else if (val > props.maxValue) {
1486
- firstInput.value = props.maxValue;
1487
- firstValue.value = props.maxValue;
1488
- } else {
1489
- firstValue.value = val;
1490
- }
1491
- };
1492
- var secondInputChange = function secondInputChange(v) {
1493
- if (v === '') {
1494
- return;
1495
- }
1496
- var val = parseFloat(v.toString());
1497
- if (val < props.minValue) {
1498
- secondInput.value = props.minValue;
1499
- secondValue.value = props.minValue;
1500
- } else if (val > props.maxValue) {
1501
- secondInput.value = props.maxValue;
1502
- secondValue.value = props.maxValue;
1503
- } else {
1504
- secondValue.value = val;
1505
- }
1506
- };
1507
- var betweenLabelStyle = function betweenLabelStyle(postion) {
1508
- var value = 0;
1509
- if (postion === 'start') {
1510
- value = props.vertical ? props.maxValue : props.minValue;
1511
- } else {
1512
- value = props.vertical ? props.minValue : props.maxValue;
1513
- }
1514
- if (props.showButtonLabel && [firstValue.value, secondValue.value].includes(value)) {
1515
- return '0';
1516
- }
1517
- return '1';
1518
- };
1519
- var renderDom = function renderDom() {
1520
- var _a, _b;
1521
- return (0,external_vue_.createVNode)("div", {
1522
- "class": ['bk-slider', props.extCls]
1523
- }, [(_a = slots.start) === null || _a === void 0 ? void 0 : _a.call(slots), (0,external_vue_.createVNode)("div", {
1524
- "class": "bk-slider-runway",
1525
- "ref": slider,
1526
- "style": runwayStyle.value,
1527
- "onClick": setButtonPos
1528
- }, [(0,external_vue_.createVNode)("div", {
1529
- "class": ['bk-slider-bar', props.vertical ? 'vertical' : 'horizontal', {
1530
- disable: props.disable
1531
- }],
1532
- "style": barStyle.value
1533
- }, null), props.showInterval ? intervals.value.map(function (interval, index) {
1534
- return (0,external_vue_.createVNode)("div", {
1535
- "key": index,
1536
- "class": ['bk-slider-interval', {
1537
- vertical: props.vertical
1538
- }],
1539
- "style": getIntervalStyle(interval)
1540
- }, null);
1541
- }) : undefined, props.customContent ? customList.value.map(function (custom, index) {
1542
- return (0,external_vue_.createVNode)("div", {
1543
- "key": index,
1544
- "class": ['bk-slider-interval', {
1545
- vertical: props.vertical
1546
- }],
1547
- "style": getIntervalStyle(custom.percent)
1548
- }, null);
1549
- }) : undefined, props.showBetweenLabel || props.showIntervalLabel || props.customContent ? (0,external_vue_.createVNode)("div", {
1550
- "class": ['bk-slider-labels', props.vertical ? 'vertical' : 'horizontal']
1551
- }, [function () {
1552
- if (props.showBetweenLabel) {
1553
- return [(0,external_vue_.createVNode)("div", {
1554
- "class": "label-start",
1555
- "style": [{
1556
- opacity: betweenLabelStyle('start')
1557
- }]
1558
- }, [props.formatterLabel(props.minValue)]), (0,external_vue_.createVNode)("div", {
1559
- "class": "label-end",
1560
- "style": [{
1561
- opacity: betweenLabelStyle('end')
1562
- }]
1563
- }, [props.formatterLabel(props.maxValue)])];
1564
- }
1565
- if (props.showIntervalLabel) {
1566
- return intervalLabels.value.map(function (intervalLabel, index) {
1567
- return (0,external_vue_.createVNode)("div", {
1568
- "class": ['bk-slider-label', props.vertical ? 'vertical' : 'horizontal'],
1569
- "key": index,
1570
- "style": getIntervalStyle(intervalLabel.stepWidth)
1571
- }, [intervalLabel.stepLabel]);
1572
- });
1573
- }
1574
- if (props.customContent) {
1575
- return customList.value.map(function (item, index) {
1576
- return (0,external_vue_.createVNode)("div", {
1577
- "class": ['bk-slider-label', props.vertical ? 'vertical' : 'horizontal'],
1578
- "key": index,
1579
- "style": getIntervalStyle(item.percent)
1580
- }, [item.label]);
1581
- });
1582
- }
1583
- return undefined;
1584
- }()]) : undefined, (0,external_vue_.createVNode)(slider_button, {
1585
- "modelValue": firstValue.value,
1586
- "onUpdate:modelValue": function onUpdateModelValue($event) {
1587
- return firstValue.value = $event;
1588
- },
1589
- "ref": firstbutton,
1590
- "params": buttonParms.value,
1591
- "onEmitChange": emitChange,
1592
- "onResetSize": resetSize
1593
- }, null), props.range ? (0,external_vue_.createVNode)(slider_button, {
1594
- "modelValue": secondValue.value,
1595
- "onUpdate:modelValue": function onUpdateModelValue($event) {
1596
- return secondValue.value = $event;
1597
- },
1598
- "ref": secondbutton,
1599
- "params": buttonParms.value,
1600
- "onEmitChange": emitChange,
1601
- "onResetSize": resetSize
1602
- }, null) : undefined]), props.showInput && !props.vertical ? (0,external_vue_.createVNode)("div", {
1603
- "class": "bk-slider-input"
1604
- }, [(0,external_vue_.createVNode)("div", {
1605
- "class": "input-item"
1606
- }, [(0,external_vue_.createVNode)((external_input_default()), {
1607
- "type": "number",
1608
- "modelValue": firstInput.value,
1609
- "max": props.maxValue,
1610
- "min": props.minValue,
1611
- "onChange": firstInputChange
1612
- }, null)]), showSecondInput.value && secondValue.value ? [(0,external_vue_.createVNode)("div", {
1613
- "class": "input-center"
1614
- }, [(0,external_vue_.createTextVNode)("\uFF5E")]), (0,external_vue_.createVNode)("div", {
1615
- "class": "input-item"
1616
- }, [(0,external_vue_.createVNode)((external_input_default()), {
1617
- "type": "number",
1618
- "modelValue": secondInput.value,
1619
- "max": props.maxValue,
1620
- "min": props.minValue,
1621
- "onChange": secondInputChange
1622
- }, null)])] : undefined]) : undefined, (_b = slots.end) === null || _b === void 0 ? void 0 : _b.call(slots)]);
1623
- };
1624
- return {
1625
- renderDom: renderDom
1626
- };
1627
- },
1628
- render: function render() {
1629
- return this.renderDom();
1630
- }
1631
- }));
1632
- ;// CONCATENATED MODULE: ../../packages/slider/src/index.ts
1633
- /**
1634
- * Tencent is pleased to support the open source community by making
1635
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1636
- *
1637
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1638
- *
1639
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1640
- *
1641
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1642
- *
1643
- * ---------------------------------------------------
1644
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1645
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1646
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1647
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1648
- *
1649
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1650
- * the Software.
1651
- *
1652
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1653
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1654
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1655
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1656
- * IN THE SOFTWARE.
1657
- */
1658
-
1659
-
1660
- var Slider = (0,external_shared_.withInstall)(slider);
1661
- /* harmony default export */ const src = (Slider);
1662
- })();
1663
-
1664
- /******/ return __webpack_exports__;
1665
- /******/ })()
1666
- ;
1667
- });
1
+ /*! For license information please see index.js.LICENSE.txt */
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../input"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../input","../popover"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../input"),require("../popover")):t(e["../shared"],e.vue,e["../input"],e["../popover"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r)=>(()=>{var n={8133:e=>{"use strict";e.exports=a},5537:e=>{"use strict";e.exports=r},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},7609:(e,t,a)=>{var r=a(7425).default;function n(){"use strict";e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},a=Object.prototype,o=a.hasOwnProperty,u=Object.defineProperty||function(e,t,a){e[t]=a.value},l="function"==typeof Symbol?Symbol:{},i=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function v(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch(e){v=function(e,t,a){return e[t]=a}}function m(e,t,a,r){var n=t&&t.prototype instanceof p?t:p,o=Object.create(n.prototype),l=new j(r||[]);return u(o,"_invoke",{value:N(e,a,l)}),o}function d(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var f={};function p(){}function h(){}function y(){}var V={};v(V,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(O([])));x&&x!==a&&o.call(x,i)&&(V=x);var g=y.prototype=p.prototype=Object.create(V);function w(e){["next","throw","return"].forEach((function(t){v(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function a(n,u,l,i){var c=d(e[n],e,u);if("throw"!==c.type){var s=c.arg,v=s.value;return v&&"object"==r(v)&&o.call(v,"__await")?t.resolve(v.__await).then((function(e){a("next",e,l,i)}),(function(e){a("throw",e,l,i)})):t.resolve(v).then((function(e){s.value=e,l(s)}),(function(e){return a("throw",e,l,i)}))}i(c.arg)}var n;u(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return n=n?n.then(o,o):o()}})}function N(e,t,a){var r="suspendedStart";return function(n,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw o;return{value:void 0,done:!0}}for(a.method=n,a.arg=o;;){var u=a.delegate;if(u){var l=S(u,a);if(l){if(l===f)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var i=d(e,t,a);if("normal"===i.type){if(r=a.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r="completed",a.method="throw",a.arg=i.arg)}}}function S(e,t){var a=t.method,r=e.iterator[a];if(void 0===r)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),f;var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return h.prototype=y,u(g,"constructor",{value:y,configurable:!0}),u(y,"constructor",{value:h,configurable:!0}),h.displayName=v(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,v(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},w(L.prototype),v(L.prototype,c,(function(){return this})),t.AsyncIterator=L,t.async=function(e,a,r,n,o){void 0===o&&(o=Promise);var u=new L(m(e,a,r,n),o);return t.isGeneratorFunction(a)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},w(g),v(g,s,"Generator"),v(g,i,(function(){return this})),v(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,r){return u.type="throw",u.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],u=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var l=o.call(n,"catchLoc"),i=o.call(n,"finallyLoc");if(l&&i){if(this.prev<n.catchLoc)return a(n.catchLoc,!0);if(this.prev<n.finallyLoc)return a(n.finallyLoc)}else if(l){if(this.prev<n.catchLoc)return a(n.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return a(n.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var u=n?n.completion:{};return u.type=e,u.arg=t,n?(this.method="next",this.next=n.finallyLoc,f):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),k(a),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;k(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:O(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(a){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,a)=>{var r=a(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},o={};function u(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return n[e](a,a.exports,u),a.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";u.r(l),u.d(l,{default:()=>f});var e=u(4212),t=u(748),a=u(2841),r=u.n(a);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var n=u(8133),o=u.n(n),i=u(5537),c=u.n(i);const s=(0,t.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(a,r){var n=r.emit,o=(0,t.ref)(!1),u=(0,t.ref)(!1),l=(0,t.ref)(0),i=(0,t.ref)(0),s=(0,t.ref)(0),d=(0,t.ref)(null),f=(0,t.ref)(a.modelValue),p=(0,t.ref)(0),h=(0,t.ref)(0),y=(0,t.ref)(!1),V=(0,t.ref)(null),b=(0,t.computed)((function(){var t,r,n="";if(null===(t=a.params.customContent)||void 0===t?void 0:t[a.modelValue]){var o=a.params.customContent[a.modelValue];n=o.tip||o.label||""}var u=a.params.vertical?e.PlacementEnum.RIGHT:e.PlacementEnum.TOP;return(null===(r=a.params)||void 0===r?void 0:r.showTip)?{content:a.params.formatterTipLabel("".concat(n||(null==a?void 0:a.modelValue)||"0")),placement:u}:{content:"",placement:u}})),x=(0,t.computed)((function(){return"".concat((a.modelValue-a.params.minValue)/(a.params.maxValue-a.params.minValue)*100,"%")})),g=(0,t.computed)((function(){return a.params.vertical?{bottom:x.value}:{left:x.value}})),w=(0,t.computed)((function(){return a.params.formatterButtonLabel(a.modelValue)})),L=function(e){a.params.disable||(e.preventDefault(),N(e),v(window,"mousemove",S),v(window,"touchmove",S),v(window,"mouseup",E),v(window,"touchend",E))},N=function(e){o.value=!0,u.value=!0,a.params.vertical?l.value=e.clientY:i.value=e.clientX,s.value=parseFloat(x.value),d.value=s.value},S=function(e){if(o.value){u.value=!1,n("resetSize");var t=0;a.params.vertical?(p.value=e.clientY,t=(l.value-p.value)/a.params.sliderSize*100):(h.value=e.clientX,t=(h.value-i.value)/a.params.sliderSize*100),d.value=s.value+t,k(d.value)}},E=function e(){y.value=!1,o.value&&(setTimeout((function(){o.value=!1,u.value||(k(d.value),n("emitChange"))}),0),m(window,"mousemove",S),m(window,"touchmove",S),m(window,"mouseup",e),m(window,"touchend",e))},k=function(e){if(null!==e&&!isNaN(e)){e<0?d.value=0:e>100&&(d.value=100);var t=100/((a.params.maxValue-a.params.minValue)/a.params.step),r=Math.round(e/t)*t*(a.params.maxValue-a.params.minValue)*.01+a.params.minValue;r=parseFloat(r.toFixed(a.params.precision)),n("update:modelValue",r),o.value||a.modelValue===f.value||(f.value=a.modelValue)}};return{renderDom:function(){return(0,t.createVNode)("div",{class:["bk-slider-button",a.params.vertical?"vertical":"horizontal",{grabbing:o.value}],ref:V,tabindex:"0",style:g.value,onClick:function(e){return e.stopPropagation()},onMousedown:L},[Boolean(b.value.content)?(0,t.createVNode)(c(),{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:function(){return[(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null)]}}):(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null),a.params.showButtonLabel&&!a.params.showIntervalLabel?(0,t.createVNode)("div",{class:["slider-button-label",a.params.vertical?"vertical":"horizontal"]},[w.value]):void 0])},setPosition:k,tip:b}},render:function(){return this.renderDom()}});var v=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},m=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const d=(0,t.defineComponent)({name:"Slider",props:{modelValue:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.number),e.PropTypes.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:function(e){return e}},formatterButtonLabel:{type:Function,default:function(e){return e}},formatterTipLabel:{type:Function,default:function(e){return e}}},emits:["update:modelValue","change"],setup:function(e,a){var n=this,u=a.slots,l=a.emit,i=(0,t.ref)(1),c=(0,t.ref)(null),m=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(0),p=(0,t.ref)(0),h=(0,t.ref)(null),y=(0,t.ref)(null),V=(0,t.ref)(null),b=(0,t.ref)(null),x=(0,t.computed)((function(){var t=[e.minValue,e.maxValue,e.step].map((function(e){var t="".concat(e).split(".")[1];return t?t.length:0}));return Math.max.apply(null,t)})),g=(0,t.computed)((function(){return Math.min(c.value,m.value)})),w=(0,t.computed)((function(){return Math.max(c.value,m.value)})),L=(0,t.computed)((function(){return e.range?"".concat(100*(w.value-g.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(c.value-e.minValue)/(e.maxValue-e.minValue),"%")})),N=(0,t.computed)((function(){return e.range?"".concat(100*(g.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),S=(0,t.computed)((function(){return e.vertical?{height:L.value,bottom:N.value}:{width:L.value,left:N.value}})),E=(0,t.computed)((function(){if(!e.showInterval||e.minValue>e.maxValue)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=(e.maxValue-e.minValue)/e.step,a=100*e.step/(e.maxValue-e.minValue),r=[],n=1;n<t;n++)r.push(n*a);return e.range?r.filter((function(t){return t<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||t>100*(w.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(c.value-e.minValue)/(e.maxValue-e.minValue)}))})),k=(0,t.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),j=(0,t.computed)((function(){if(!e.showIntervalLabel)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=100*e.step/(e.maxValue-e.minValue),a=[],r=e.minValue,n=0;r<=e.maxValue;r+=e.step,n++){var o={stepWidth:n*t,stepLabel:e.formatterLabel(r)};a.push(o)}return a})),O=(0,t.computed)((function(){return Array.isArray(e.modelValue)})),T=(0,t.computed)((function(){return e.customContent?Object.keys(e.customContent).sort((function(e,t){return Number(e)-Number(t)})).filter((function(t){return Number(t)>=e.minValue&&Number(t)<=e.maxValue})).map((function(t){var a=e.customContent[t].tip,r=e.customContent[t].label;return{tip:a||r||"",label:r||"",percent:(Number(t)-e.minValue)/(e.maxValue-e.minValue)*100}})):[]})),_=(0,t.computed)((function(){return{vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:x.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}}));(0,t.watch)((function(){return e.modelValue}),(function(){I()})),(0,t.watch)((function(){return c.value}),(function(t){e.range?l("update:modelValue",[g.value,w.value]):l("update:modelValue",t),f.value=t})),(0,t.watch)((function(){return m.value}),(function(e){l("update:modelValue",[g.value,w.value]),p.value=e})),(0,t.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(c.value=Math.max(e.minValue,Number(e.modelValue[0])),m.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(c.value=e.minValue,m.value=e.maxValue),d.value=[c.value,m.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?c.value=e.minValue:c.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),d.value=c.value),C(),v(window,"resize",C())}));var C=function(){h.value&&(i.value=h.value["client".concat(e.vertical?"Height":"Width")])},B=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(C(),e.vertical){var n=null===(a=h.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;F((n-t.clientY)/i.value*100)}else{var o=null===(r=h.value)||void 0===r?void 0:r.getBoundingClientRect().left;F((t.clientX-o)/i.value*100)}M()}},P=function(){return e.range?![g.value,w.value].every((function(e,t){return e===d.value[t]})):e.modelValue!==d.value},I=function(){if(e.minValue>e.maxValue)console.error("min should not be greater than max.");else{var t=e.modelValue;e.range&&Array.isArray(t)?t[1]<e.minValue?l("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?l("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?l("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?l("update:modelValue",[t[0],e.maxValue]):(c.value=Number(t[0]),m.value=Number(t[1]),P()&&(d.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?l("update:modelValue",e.minValue):t>e.maxValue?l("update:modelValue",e.maxValue):(c.value=t,P()&&(d.value=t)))}},M=function(){return a=n,o=void 0,u=void 0,i=r().mark((function a(){return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,t.nextTick)();case 2:l("change",e.range?[g.value,w.value]:e.modelValue);case 3:case"end":return a.stop()}}),a)})),new(u||(u=Promise))((function(e,t){function r(e){try{l(i.next(e))}catch(e){t(e)}}function n(e){try{l(i.throw(e))}catch(e){t(e)}}function l(t){var a;t.done?e(t.value):(a=t.value,a instanceof u?a:new u((function(e){e(a)}))).then(r,n)}l((i=i.apply(a,o||[])).next())}));var a,o,u,i},z=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},F=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(g.value-a)<Math.abs(w.value-a)?b.value=c.value<m.value?y.value:V.value:b.value=c.value>m.value?y.value:V.value,b.value.setPosition(t)}else y.value.setPosition(t)},G=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(f.value=e.minValue,c.value=e.minValue):a>e.maxValue?(f.value=e.maxValue,c.value=e.maxValue):c.value=a}},A=function(t){if(""!==t){var a=parseFloat(t.toString());a<e.minValue?(p.value=e.minValue,m.value=e.minValue):a>e.maxValue?(p.value=e.maxValue,m.value=e.maxValue):m.value=a}},R=function(t){var a;return a="start"===t?e.vertical?e.maxValue:e.minValue:e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[c.value,m.value].includes(a)?"0":"1"};return{renderDom:function(){var a,r;return(0,t.createVNode)("div",{class:["bk-slider",e.extCls]},[null===(a=u.start)||void 0===a?void 0:a.call(u),(0,t.createVNode)("div",{class:"bk-slider-runway",ref:h,style:k.value,onClick:B},[(0,t.createVNode)("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:S.value},null),e.showInterval?E.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a)},null)})):void 0,e.customContent?T.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,t.createVNode)("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[e.showBetweenLabel?[(0,t.createVNode)("div",{class:"label-start",style:[{opacity:R("start")}]},[e.formatterLabel(e.minValue)]),(0,t.createVNode)("div",{class:"label-end",style:[{opacity:R("end")}]},[e.formatterLabel(e.maxValue)])]:e.showIntervalLabel?j.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.stepWidth)},[a.stepLabel])})):e.customContent?T.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.percent)},[a.label])})):void 0]):void 0,(0,t.createVNode)(s,{modelValue:c.value,"onUpdate:modelValue":function(e){return c.value=e},ref:y,params:_.value,onEmitChange:M,onResetSize:C},null),e.range?(0,t.createVNode)(s,{modelValue:m.value,"onUpdate:modelValue":function(e){return m.value=e},ref:V,params:_.value,onEmitChange:M,onResetSize:C},null):void 0]),e.showInput&&!e.vertical?(0,t.createVNode)("div",{class:"bk-slider-input"},[(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:G},null)]),O.value&&m.value?[(0,t.createVNode)("div",{class:"input-center"},[(0,t.createTextVNode)("~")]),(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:p.value,max:e.maxValue,min:e.minValue,onChange:A},null)])]:void 0]):void 0,null===(r=u.end)||void 0===r?void 0:r.call(u)])}}},render:function(){return this.renderDom()}}),f=(0,e.withInstall)(d)})(),l})()));