bkui-vue 0.0.2-beta.37 → 0.0.2-beta.38

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 (174) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/style.variable.css +1 -1
  3. package/lib/affix/index.js +1 -391
  4. package/lib/alert/index.js +1 -287
  5. package/lib/animate-number/index.js +1 -219
  6. package/lib/backtop/index.js +1 -264
  7. package/lib/badge/index.js +1 -304
  8. package/lib/breadcrumb/index.js +1 -379
  9. package/lib/button/index.js +1 -403
  10. package/lib/card/index.js +1 -369
  11. package/lib/cascader/index.js +2 -2095
  12. package/lib/cascader/index.js.LICENSE.txt +1 -0
  13. package/lib/checkbox/index.js +1 -602
  14. package/lib/code-diff/index.js +1 -5548
  15. package/lib/collapse/index.js +1 -605
  16. package/lib/collapse-transition/index.js +1 -237
  17. package/lib/color-picker/index.js +1 -2735
  18. package/lib/components.js +1 -770
  19. package/lib/config-provider/index.js +1 -377
  20. package/lib/container/index.js +1 -408
  21. package/lib/date-picker/index.js +1 -5576
  22. package/lib/dialog/index.js +2 -1324
  23. package/lib/dialog/index.js.LICENSE.txt +1 -0
  24. package/lib/directives/index.js +2 -1386
  25. package/lib/directives/index.js.LICENSE.txt +14 -0
  26. package/lib/dist.index.js +1 -179
  27. package/lib/divider/index.js +1 -237
  28. package/lib/dropdown/index.js +1 -455
  29. package/lib/exception/index.js +1 -435
  30. package/lib/fixed-navbar/index.js +1 -222
  31. package/lib/form/index.js +1 -1004
  32. package/lib/hooks.js +1 -133
  33. package/lib/icon/angle-double-down-line.js +1 -541
  34. package/lib/icon/angle-double-left-line.js +1 -541
  35. package/lib/icon/angle-double-left.js +1 -541
  36. package/lib/icon/angle-double-right-line.js +1 -541
  37. package/lib/icon/angle-double-right.js +1 -541
  38. package/lib/icon/angle-double-up-line.js +1 -541
  39. package/lib/icon/angle-down-fill.js +1 -541
  40. package/lib/icon/angle-down-line.js +1 -541
  41. package/lib/icon/angle-down.js +1 -541
  42. package/lib/icon/angle-left.js +1 -541
  43. package/lib/icon/angle-right.js +1 -541
  44. package/lib/icon/angle-up-fill.js +1 -541
  45. package/lib/icon/angle-up.js +1 -541
  46. package/lib/icon/archive-fill.js +1 -541
  47. package/lib/icon/arrows-left.js +1 -541
  48. package/lib/icon/arrows-right.js +1 -541
  49. package/lib/icon/assistant.js +1 -541
  50. package/lib/icon/audio-fill.js +1 -541
  51. package/lib/icon/bk.js +1 -541
  52. package/lib/icon/circle.js +1 -541
  53. package/lib/icon/close-line.js +1 -541
  54. package/lib/icon/close.js +1 -541
  55. package/lib/icon/code.js +1 -541
  56. package/lib/icon/cog-shape.js +1 -541
  57. package/lib/icon/collapse-left.js +1 -541
  58. package/lib/icon/copy-shape.js +1 -541
  59. package/lib/icon/copy.js +1 -541
  60. package/lib/icon/data-shape.js +1 -541
  61. package/lib/icon/del.js +1 -541
  62. package/lib/icon/doc-fill.js +1 -541
  63. package/lib/icon/done.js +1 -541
  64. package/lib/icon/down-shape.js +1 -541
  65. package/lib/icon/down-small.js +1 -541
  66. package/lib/icon/edit-line.js +1 -541
  67. package/lib/icon/ellipsis.js +1 -541
  68. package/lib/icon/enlarge-line.js +1 -541
  69. package/lib/icon/error.js +1 -541
  70. package/lib/icon/excel-fill.js +1 -541
  71. package/lib/icon/exclamation-circle-shape.js +1 -541
  72. package/lib/icon/eye.js +1 -541
  73. package/lib/icon/filliscreen-line.js +1 -541
  74. package/lib/icon/fix-line.js +1 -541
  75. package/lib/icon/fix-shape.js +1 -541
  76. package/lib/icon/folder-open.js +1 -541
  77. package/lib/icon/folder-shape-open.js +1 -541
  78. package/lib/icon/folder-shape.js +1 -541
  79. package/lib/icon/folder.js +1 -541
  80. package/lib/icon/funnel.js +1 -541
  81. package/lib/icon/help-document-fill.js +1 -541
  82. package/lib/icon/help-fill.js +1 -541
  83. package/lib/icon/help.js +1 -541
  84. package/lib/icon/image-fill.js +1 -563
  85. package/lib/icon/img-error.js +1 -563
  86. package/lib/icon/img-placehoulder.js +1 -563
  87. package/lib/icon/index.js +1 -2353
  88. package/lib/icon/info-line.js +1 -563
  89. package/lib/icon/info.js +1 -563
  90. package/lib/icon/left-shape.js +1 -563
  91. package/lib/icon/left-turn-line.js +1 -563
  92. package/lib/icon/narrow-line.js +1 -563
  93. package/lib/icon/original.js +1 -563
  94. package/lib/icon/pdf-fill.js +1 -563
  95. package/lib/icon/play-shape.js +1 -563
  96. package/lib/icon/plus.js +1 -563
  97. package/lib/icon/ppt-fill.js +1 -563
  98. package/lib/icon/qq.js +1 -563
  99. package/lib/icon/right-shape.js +1 -563
  100. package/lib/icon/right-turn-line.js +1 -563
  101. package/lib/icon/search.js +1 -563
  102. package/lib/icon/share.js +1 -563
  103. package/lib/icon/spinner.js +1 -563
  104. package/lib/icon/success.js +1 -563
  105. package/lib/icon/switcher-loading.js +1 -563
  106. package/lib/icon/text-file.js +1 -563
  107. package/lib/icon/text-fill.js +1 -563
  108. package/lib/icon/transfer.js +1 -563
  109. package/lib/icon/tree-application-shape.js +1 -563
  110. package/lib/icon/unfull-screen.js +1 -563
  111. package/lib/icon/unvisible.js +1 -563
  112. package/lib/icon/up-shape.js +1 -563
  113. package/lib/icon/upload.js +1 -563
  114. package/lib/icon/video-fill.js +1 -563
  115. package/lib/icon/warn.js +1 -563
  116. package/lib/icon/weixin-pro.js +1 -563
  117. package/lib/icon/weixin.js +1 -563
  118. package/lib/image/index.js +1 -681
  119. package/lib/index.js +1 -195
  120. package/lib/info-box/index.js +2 -1514
  121. package/lib/info-box/index.js.LICENSE.txt +1 -0
  122. package/lib/input/index.js +1 -1038
  123. package/lib/link/index.js +1 -232
  124. package/lib/loading/index.js +1 -443
  125. package/lib/locale/index.js +1 -489
  126. package/lib/menu/index.js +1 -793
  127. package/lib/message/index.js +2 -1842
  128. package/lib/message/index.js.LICENSE.txt +6 -0
  129. package/lib/modal/index.js +1 -407
  130. package/lib/navigation/index.js +1 -439
  131. package/lib/notify/index.js +1 -470
  132. package/lib/overflow-title/index.js +1 -547
  133. package/lib/pagination/index.js +1 -974
  134. package/lib/plugin-popover/index.js +1 -4121
  135. package/lib/plugins/index.js +1 -130
  136. package/lib/pop-confirm/index.js +1 -367
  137. package/lib/popover/index.js +1 -4127
  138. package/lib/popover2/index.js +1 -171
  139. package/lib/preset.js +1 -164
  140. package/lib/process/index.js +2 -1146
  141. package/lib/process/index.js.LICENSE.txt +1 -0
  142. package/lib/progress/index.js +1 -495
  143. package/lib/radio/index.js +1 -693
  144. package/lib/rate/index.js +1 -406
  145. package/lib/resize-layout/index.js +1 -499
  146. package/lib/search-select/index.js +2 -3024
  147. package/lib/search-select/index.js.LICENSE.txt +1 -0
  148. package/lib/select/index.js +2 -2599
  149. package/lib/select/index.js.LICENSE.txt +1 -0
  150. package/lib/select/select.css +9 -0
  151. package/lib/select/select.less +11 -0
  152. package/lib/select/select.variable.css +9 -0
  153. package/lib/shared/index.js +1 -2832
  154. package/lib/sideslider/index.js +2 -1056
  155. package/lib/sideslider/index.js.LICENSE.txt +1 -0
  156. package/lib/slider/index.js +2 -1683
  157. package/lib/slider/index.js.LICENSE.txt +1 -0
  158. package/lib/steps/index.js +2 -1215
  159. package/lib/steps/index.js.LICENSE.txt +1 -0
  160. package/lib/swiper/index.js +1 -404
  161. package/lib/switcher/index.js +1 -335
  162. package/lib/tab/index.js +1 -935
  163. package/lib/table/index.js +1 -6588
  164. package/lib/table-column/index.js +1 -768
  165. package/lib/tag/index.js +1 -309
  166. package/lib/tag-input/index.js +1 -1758
  167. package/lib/time-picker/index.js +1 -142
  168. package/lib/timeline/index.js +1 -310
  169. package/lib/transfer/index.js +1 -767
  170. package/lib/tree/index.js +1 -2664
  171. package/lib/upload/index.js +2 -3257
  172. package/lib/upload/index.js.LICENSE.txt +1 -0
  173. package/lib/virtual-render/index.js +1 -806
  174. package/package.json +1 -1
@@ -1,1324 +1,2 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("../shared"), require("vue"), require("../button"), require("../config-provider"), require("../icon"), require("../modal"));
4
- else if(typeof define === 'function' && define.amd)
5
- define(["../shared", "vue", "../button", "../config-provider", "../icon", "../modal"], factory);
6
- else {
7
- var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../button"), require("../config-provider"), require("../icon"), require("../modal")) : factory(root["../shared"], root["vue"], root["../button"], root["../config-provider"], root["../icon"], root["../modal"]);
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__4976__, __WEBPACK_EXTERNAL_MODULE__2717__, __WEBPACK_EXTERNAL_MODULE__6870__, __WEBPACK_EXTERNAL_MODULE__8014__) => {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ var __webpack_modules__ = ({
13
-
14
- /***/ 4976:
15
- /***/ ((module) => {
16
-
17
- "use strict";
18
- module.exports = __WEBPACK_EXTERNAL_MODULE__4976__;
19
-
20
- /***/ }),
21
-
22
- /***/ 2717:
23
- /***/ ((module) => {
24
-
25
- "use strict";
26
- module.exports = __WEBPACK_EXTERNAL_MODULE__2717__;
27
-
28
- /***/ }),
29
-
30
- /***/ 6870:
31
- /***/ ((module) => {
32
-
33
- "use strict";
34
- module.exports = __WEBPACK_EXTERNAL_MODULE__6870__;
35
-
36
- /***/ }),
37
-
38
- /***/ 8014:
39
- /***/ ((module) => {
40
-
41
- "use strict";
42
- module.exports = __WEBPACK_EXTERNAL_MODULE__8014__;
43
-
44
- /***/ }),
45
-
46
- /***/ 4212:
47
- /***/ ((module) => {
48
-
49
- "use strict";
50
- module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
51
-
52
- /***/ }),
53
-
54
- /***/ 748:
55
- /***/ ((module) => {
56
-
57
- "use strict";
58
- module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
59
-
60
- /***/ }),
61
-
62
- /***/ 7609:
63
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
64
-
65
- var _typeof = (__webpack_require__(7425)["default"]);
66
- function _regeneratorRuntime() {
67
- "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
68
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
69
- return exports;
70
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
71
- var exports = {},
72
- Op = Object.prototype,
73
- hasOwn = Op.hasOwnProperty,
74
- defineProperty = Object.defineProperty || function (obj, key, desc) {
75
- obj[key] = desc.value;
76
- },
77
- $Symbol = "function" == typeof Symbol ? Symbol : {},
78
- iteratorSymbol = $Symbol.iterator || "@@iterator",
79
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
80
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
81
- function define(obj, key, value) {
82
- return Object.defineProperty(obj, key, {
83
- value: value,
84
- enumerable: !0,
85
- configurable: !0,
86
- writable: !0
87
- }), obj[key];
88
- }
89
- try {
90
- define({}, "");
91
- } catch (err) {
92
- define = function define(obj, key, value) {
93
- return obj[key] = value;
94
- };
95
- }
96
- function wrap(innerFn, outerFn, self, tryLocsList) {
97
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
98
- generator = Object.create(protoGenerator.prototype),
99
- context = new Context(tryLocsList || []);
100
- return defineProperty(generator, "_invoke", {
101
- value: makeInvokeMethod(innerFn, self, context)
102
- }), generator;
103
- }
104
- function tryCatch(fn, obj, arg) {
105
- try {
106
- return {
107
- type: "normal",
108
- arg: fn.call(obj, arg)
109
- };
110
- } catch (err) {
111
- return {
112
- type: "throw",
113
- arg: err
114
- };
115
- }
116
- }
117
- exports.wrap = wrap;
118
- var ContinueSentinel = {};
119
- function Generator() {}
120
- function GeneratorFunction() {}
121
- function GeneratorFunctionPrototype() {}
122
- var IteratorPrototype = {};
123
- define(IteratorPrototype, iteratorSymbol, function () {
124
- return this;
125
- });
126
- var getProto = Object.getPrototypeOf,
127
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
128
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
129
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
130
- function defineIteratorMethods(prototype) {
131
- ["next", "throw", "return"].forEach(function (method) {
132
- define(prototype, method, function (arg) {
133
- return this._invoke(method, arg);
134
- });
135
- });
136
- }
137
- function AsyncIterator(generator, PromiseImpl) {
138
- function invoke(method, arg, resolve, reject) {
139
- var record = tryCatch(generator[method], generator, arg);
140
- if ("throw" !== record.type) {
141
- var result = record.arg,
142
- value = result.value;
143
- return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
144
- invoke("next", value, resolve, reject);
145
- }, function (err) {
146
- invoke("throw", err, resolve, reject);
147
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
148
- result.value = unwrapped, resolve(result);
149
- }, function (error) {
150
- return invoke("throw", error, resolve, reject);
151
- });
152
- }
153
- reject(record.arg);
154
- }
155
- var previousPromise;
156
- defineProperty(this, "_invoke", {
157
- value: function value(method, arg) {
158
- function callInvokeWithMethodAndArg() {
159
- return new PromiseImpl(function (resolve, reject) {
160
- invoke(method, arg, resolve, reject);
161
- });
162
- }
163
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
164
- }
165
- });
166
- }
167
- function makeInvokeMethod(innerFn, self, context) {
168
- var state = "suspendedStart";
169
- return function (method, arg) {
170
- if ("executing" === state) throw new Error("Generator is already running");
171
- if ("completed" === state) {
172
- if ("throw" === method) throw arg;
173
- return doneResult();
174
- }
175
- for (context.method = method, context.arg = arg;;) {
176
- var delegate = context.delegate;
177
- if (delegate) {
178
- var delegateResult = maybeInvokeDelegate(delegate, context);
179
- if (delegateResult) {
180
- if (delegateResult === ContinueSentinel) continue;
181
- return delegateResult;
182
- }
183
- }
184
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
185
- if ("suspendedStart" === state) throw state = "completed", context.arg;
186
- context.dispatchException(context.arg);
187
- } else "return" === context.method && context.abrupt("return", context.arg);
188
- state = "executing";
189
- var record = tryCatch(innerFn, self, context);
190
- if ("normal" === record.type) {
191
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
192
- return {
193
- value: record.arg,
194
- done: context.done
195
- };
196
- }
197
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
198
- }
199
- };
200
- }
201
- function maybeInvokeDelegate(delegate, context) {
202
- var methodName = context.method,
203
- method = delegate.iterator[methodName];
204
- 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;
205
- var record = tryCatch(method, delegate.iterator, context.arg);
206
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
207
- var info = record.arg;
208
- 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);
209
- }
210
- function pushTryEntry(locs) {
211
- var entry = {
212
- tryLoc: locs[0]
213
- };
214
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
215
- }
216
- function resetTryEntry(entry) {
217
- var record = entry.completion || {};
218
- record.type = "normal", delete record.arg, entry.completion = record;
219
- }
220
- function Context(tryLocsList) {
221
- this.tryEntries = [{
222
- tryLoc: "root"
223
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
224
- }
225
- function values(iterable) {
226
- if (iterable) {
227
- var iteratorMethod = iterable[iteratorSymbol];
228
- if (iteratorMethod) return iteratorMethod.call(iterable);
229
- if ("function" == typeof iterable.next) return iterable;
230
- if (!isNaN(iterable.length)) {
231
- var i = -1,
232
- next = function next() {
233
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
234
- return next.value = undefined, next.done = !0, next;
235
- };
236
- return next.next = next;
237
- }
238
- }
239
- return {
240
- next: doneResult
241
- };
242
- }
243
- function doneResult() {
244
- return {
245
- value: undefined,
246
- done: !0
247
- };
248
- }
249
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
250
- value: GeneratorFunctionPrototype,
251
- configurable: !0
252
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
253
- value: GeneratorFunction,
254
- configurable: !0
255
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
256
- var ctor = "function" == typeof genFun && genFun.constructor;
257
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
258
- }, exports.mark = function (genFun) {
259
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
260
- }, exports.awrap = function (arg) {
261
- return {
262
- __await: arg
263
- };
264
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
265
- return this;
266
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
267
- void 0 === PromiseImpl && (PromiseImpl = Promise);
268
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
269
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
270
- return result.done ? result.value : iter.next();
271
- });
272
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
273
- return this;
274
- }), define(Gp, "toString", function () {
275
- return "[object Generator]";
276
- }), exports.keys = function (val) {
277
- var object = Object(val),
278
- keys = [];
279
- for (var key in object) keys.push(key);
280
- return keys.reverse(), function next() {
281
- for (; keys.length;) {
282
- var key = keys.pop();
283
- if (key in object) return next.value = key, next.done = !1, next;
284
- }
285
- return next.done = !0, next;
286
- };
287
- }, exports.values = values, Context.prototype = {
288
- constructor: Context,
289
- reset: function reset(skipTempReset) {
290
- 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);
291
- },
292
- stop: function stop() {
293
- this.done = !0;
294
- var rootRecord = this.tryEntries[0].completion;
295
- if ("throw" === rootRecord.type) throw rootRecord.arg;
296
- return this.rval;
297
- },
298
- dispatchException: function dispatchException(exception) {
299
- if (this.done) throw exception;
300
- var context = this;
301
- function handle(loc, caught) {
302
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
303
- }
304
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
305
- var entry = this.tryEntries[i],
306
- record = entry.completion;
307
- if ("root" === entry.tryLoc) return handle("end");
308
- if (entry.tryLoc <= this.prev) {
309
- var hasCatch = hasOwn.call(entry, "catchLoc"),
310
- hasFinally = hasOwn.call(entry, "finallyLoc");
311
- if (hasCatch && hasFinally) {
312
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
313
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
314
- } else if (hasCatch) {
315
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
316
- } else {
317
- if (!hasFinally) throw new Error("try statement without catch or finally");
318
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
319
- }
320
- }
321
- }
322
- },
323
- abrupt: function abrupt(type, arg) {
324
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
325
- var entry = this.tryEntries[i];
326
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
327
- var finallyEntry = entry;
328
- break;
329
- }
330
- }
331
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
332
- var record = finallyEntry ? finallyEntry.completion : {};
333
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
334
- },
335
- complete: function complete(record, afterLoc) {
336
- if ("throw" === record.type) throw record.arg;
337
- 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;
338
- },
339
- finish: function finish(finallyLoc) {
340
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
341
- var entry = this.tryEntries[i];
342
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
343
- }
344
- },
345
- "catch": function _catch(tryLoc) {
346
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
347
- var entry = this.tryEntries[i];
348
- if (entry.tryLoc === tryLoc) {
349
- var record = entry.completion;
350
- if ("throw" === record.type) {
351
- var thrown = record.arg;
352
- resetTryEntry(entry);
353
- }
354
- return thrown;
355
- }
356
- }
357
- throw new Error("illegal catch attempt");
358
- },
359
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
360
- return this.delegate = {
361
- iterator: values(iterable),
362
- resultName: resultName,
363
- nextLoc: nextLoc
364
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
365
- }
366
- }, exports;
367
- }
368
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
369
-
370
- /***/ }),
371
-
372
- /***/ 7425:
373
- /***/ ((module) => {
374
-
375
- function _typeof(obj) {
376
- "@babel/helpers - typeof";
377
-
378
- return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
379
- return typeof obj;
380
- } : function (obj) {
381
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
382
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
383
- }
384
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
385
-
386
- /***/ }),
387
-
388
- /***/ 2841:
389
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
390
-
391
- // TODO(Babel 8): Remove this file.
392
-
393
- var runtime = __webpack_require__(7609)();
394
- module.exports = runtime;
395
-
396
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
397
- try {
398
- regeneratorRuntime = runtime;
399
- } catch (accidentalStrictMode) {
400
- if (typeof globalThis === "object") {
401
- globalThis.regeneratorRuntime = runtime;
402
- } else {
403
- Function("r", "regeneratorRuntime = r")(runtime);
404
- }
405
- }
406
-
407
-
408
- /***/ })
409
-
410
- /******/ });
411
- /************************************************************************/
412
- /******/ // The module cache
413
- /******/ var __webpack_module_cache__ = {};
414
- /******/
415
- /******/ // The require function
416
- /******/ function __webpack_require__(moduleId) {
417
- /******/ // Check if module is in cache
418
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
419
- /******/ if (cachedModule !== undefined) {
420
- /******/ return cachedModule.exports;
421
- /******/ }
422
- /******/ // Create a new module (and put it into the cache)
423
- /******/ var module = __webpack_module_cache__[moduleId] = {
424
- /******/ // no module.id needed
425
- /******/ // no module.loaded needed
426
- /******/ exports: {}
427
- /******/ };
428
- /******/
429
- /******/ // Execute the module function
430
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
431
- /******/
432
- /******/ // Return the exports of the module
433
- /******/ return module.exports;
434
- /******/ }
435
- /******/
436
- /************************************************************************/
437
- /******/ /* webpack/runtime/compat get default export */
438
- /******/ (() => {
439
- /******/ // getDefaultExport function for compatibility with non-harmony modules
440
- /******/ __webpack_require__.n = (module) => {
441
- /******/ var getter = module && module.__esModule ?
442
- /******/ () => (module['default']) :
443
- /******/ () => (module);
444
- /******/ __webpack_require__.d(getter, { a: getter });
445
- /******/ return getter;
446
- /******/ };
447
- /******/ })();
448
- /******/
449
- /******/ /* webpack/runtime/define property getters */
450
- /******/ (() => {
451
- /******/ // define getter functions for harmony exports
452
- /******/ __webpack_require__.d = (exports, definition) => {
453
- /******/ for(var key in definition) {
454
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
455
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
456
- /******/ }
457
- /******/ }
458
- /******/ };
459
- /******/ })();
460
- /******/
461
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
462
- /******/ (() => {
463
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
464
- /******/ })();
465
- /******/
466
- /******/ /* webpack/runtime/make namespace object */
467
- /******/ (() => {
468
- /******/ // define __esModule on exports
469
- /******/ __webpack_require__.r = (exports) => {
470
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
471
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
472
- /******/ }
473
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
474
- /******/ };
475
- /******/ })();
476
- /******/
477
- /************************************************************************/
478
- var __webpack_exports__ = {};
479
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
480
- (() => {
481
- "use strict";
482
- // ESM COMPAT FLAG
483
- __webpack_require__.r(__webpack_exports__);
484
-
485
- // EXPORTS
486
- __webpack_require__.d(__webpack_exports__, {
487
- "default": () => (/* binding */ src)
488
- });
489
-
490
- // EXTERNAL MODULE: external "../shared"
491
- var external_shared_ = __webpack_require__(4212);
492
- // EXTERNAL MODULE: external "vue"
493
- var external_vue_ = __webpack_require__(748);
494
- // EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
495
- var regenerator = __webpack_require__(2841);
496
- var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
497
- ;// CONCATENATED MODULE: ../../node_modules/tslib/tslib.es6.mjs
498
- /******************************************************************************
499
- Copyright (c) Microsoft Corporation.
500
-
501
- Permission to use, copy, modify, and/or distribute this software for any
502
- purpose with or without fee is hereby granted.
503
-
504
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
505
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
506
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
507
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
508
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
509
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
510
- PERFORMANCE OF THIS SOFTWARE.
511
- ***************************************************************************** */
512
- /* global Reflect, Promise, SuppressedError, Symbol */
513
-
514
- var extendStatics = function(d, b) {
515
- extendStatics = Object.setPrototypeOf ||
516
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
517
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
518
- return extendStatics(d, b);
519
- };
520
-
521
- function __extends(d, b) {
522
- if (typeof b !== "function" && b !== null)
523
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
524
- extendStatics(d, b);
525
- function __() { this.constructor = d; }
526
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
527
- }
528
-
529
- var __assign = function() {
530
- __assign = Object.assign || function __assign(t) {
531
- for (var s, i = 1, n = arguments.length; i < n; i++) {
532
- s = arguments[i];
533
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
534
- }
535
- return t;
536
- }
537
- return __assign.apply(this, arguments);
538
- }
539
-
540
- function __rest(s, e) {
541
- var t = {};
542
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
543
- t[p] = s[p];
544
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
545
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
546
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
547
- t[p[i]] = s[p[i]];
548
- }
549
- return t;
550
- }
551
-
552
- function __decorate(decorators, target, key, desc) {
553
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
554
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
555
- 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;
556
- return c > 3 && r && Object.defineProperty(target, key, r), r;
557
- }
558
-
559
- function __param(paramIndex, decorator) {
560
- return function (target, key) { decorator(target, key, paramIndex); }
561
- }
562
-
563
- function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
564
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
565
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
566
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
567
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
568
- var _, done = false;
569
- for (var i = decorators.length - 1; i >= 0; i--) {
570
- var context = {};
571
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
572
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
573
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
574
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
575
- if (kind === "accessor") {
576
- if (result === void 0) continue;
577
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
578
- if (_ = accept(result.get)) descriptor.get = _;
579
- if (_ = accept(result.set)) descriptor.set = _;
580
- if (_ = accept(result.init)) initializers.unshift(_);
581
- }
582
- else if (_ = accept(result)) {
583
- if (kind === "field") initializers.unshift(_);
584
- else descriptor[key] = _;
585
- }
586
- }
587
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
588
- done = true;
589
- };
590
-
591
- function __runInitializers(thisArg, initializers, value) {
592
- var useValue = arguments.length > 2;
593
- for (var i = 0; i < initializers.length; i++) {
594
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
595
- }
596
- return useValue ? value : void 0;
597
- };
598
-
599
- function __propKey(x) {
600
- return typeof x === "symbol" ? x : "".concat(x);
601
- };
602
-
603
- function __setFunctionName(f, name, prefix) {
604
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
605
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
606
- };
607
-
608
- function __metadata(metadataKey, metadataValue) {
609
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
610
- }
611
-
612
- function __awaiter(thisArg, _arguments, P, generator) {
613
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
614
- return new (P || (P = Promise))(function (resolve, reject) {
615
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
616
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
617
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
618
- step((generator = generator.apply(thisArg, _arguments || [])).next());
619
- });
620
- }
621
-
622
- function __generator(thisArg, body) {
623
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
624
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
625
- function verb(n) { return function (v) { return step([n, v]); }; }
626
- function step(op) {
627
- if (f) throw new TypeError("Generator is already executing.");
628
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
629
- 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;
630
- if (y = 0, t) op = [op[0] & 2, t.value];
631
- switch (op[0]) {
632
- case 0: case 1: t = op; break;
633
- case 4: _.label++; return { value: op[1], done: false };
634
- case 5: _.label++; y = op[1]; op = [0]; continue;
635
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
636
- default:
637
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
638
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
639
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
640
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
641
- if (t[2]) _.ops.pop();
642
- _.trys.pop(); continue;
643
- }
644
- op = body.call(thisArg, _);
645
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
646
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
647
- }
648
- }
649
-
650
- var __createBinding = Object.create ? (function(o, m, k, k2) {
651
- if (k2 === undefined) k2 = k;
652
- var desc = Object.getOwnPropertyDescriptor(m, k);
653
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
654
- desc = { enumerable: true, get: function() { return m[k]; } };
655
- }
656
- Object.defineProperty(o, k2, desc);
657
- }) : (function(o, m, k, k2) {
658
- if (k2 === undefined) k2 = k;
659
- o[k2] = m[k];
660
- });
661
-
662
- function __exportStar(m, o) {
663
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
664
- }
665
-
666
- function __values(o) {
667
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
668
- if (m) return m.call(o);
669
- if (o && typeof o.length === "number") return {
670
- next: function () {
671
- if (o && i >= o.length) o = void 0;
672
- return { value: o && o[i++], done: !o };
673
- }
674
- };
675
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
676
- }
677
-
678
- function __read(o, n) {
679
- var m = typeof Symbol === "function" && o[Symbol.iterator];
680
- if (!m) return o;
681
- var i = m.call(o), r, ar = [], e;
682
- try {
683
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
684
- }
685
- catch (error) { e = { error: error }; }
686
- finally {
687
- try {
688
- if (r && !r.done && (m = i["return"])) m.call(i);
689
- }
690
- finally { if (e) throw e.error; }
691
- }
692
- return ar;
693
- }
694
-
695
- /** @deprecated */
696
- function __spread() {
697
- for (var ar = [], i = 0; i < arguments.length; i++)
698
- ar = ar.concat(__read(arguments[i]));
699
- return ar;
700
- }
701
-
702
- /** @deprecated */
703
- function __spreadArrays() {
704
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
705
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
706
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
707
- r[k] = a[j];
708
- return r;
709
- }
710
-
711
- function __spreadArray(to, from, pack) {
712
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
713
- if (ar || !(i in from)) {
714
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
715
- ar[i] = from[i];
716
- }
717
- }
718
- return to.concat(ar || Array.prototype.slice.call(from));
719
- }
720
-
721
- function __await(v) {
722
- return this instanceof __await ? (this.v = v, this) : new __await(v);
723
- }
724
-
725
- function __asyncGenerator(thisArg, _arguments, generator) {
726
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
727
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
728
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
729
- 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); }); }; }
730
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
731
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
732
- function fulfill(value) { resume("next", value); }
733
- function reject(value) { resume("throw", value); }
734
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
735
- }
736
-
737
- function __asyncDelegator(o) {
738
- var i, p;
739
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
740
- 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; }
741
- }
742
-
743
- function __asyncValues(o) {
744
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
745
- var m = o[Symbol.asyncIterator], i;
746
- 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);
747
- 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); }); }; }
748
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
749
- }
750
-
751
- function __makeTemplateObject(cooked, raw) {
752
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
753
- return cooked;
754
- };
755
-
756
- var __setModuleDefault = Object.create ? (function(o, v) {
757
- Object.defineProperty(o, "default", { enumerable: true, value: v });
758
- }) : function(o, v) {
759
- o["default"] = v;
760
- };
761
-
762
- function __importStar(mod) {
763
- if (mod && mod.__esModule) return mod;
764
- var result = {};
765
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
766
- __setModuleDefault(result, mod);
767
- return result;
768
- }
769
-
770
- function __importDefault(mod) {
771
- return (mod && mod.__esModule) ? mod : { default: mod };
772
- }
773
-
774
- function __classPrivateFieldGet(receiver, state, kind, f) {
775
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
776
- 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");
777
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
778
- }
779
-
780
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
781
- if (kind === "m") throw new TypeError("Private method is not writable");
782
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
783
- 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");
784
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
785
- }
786
-
787
- function __classPrivateFieldIn(state, receiver) {
788
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
789
- return typeof state === "function" ? receiver === state : state.has(receiver);
790
- }
791
-
792
- function __addDisposableResource(env, value, async) {
793
- if (value !== null && value !== void 0) {
794
- if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
795
- var dispose;
796
- if (async) {
797
- if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
798
- dispose = value[Symbol.asyncDispose];
799
- }
800
- if (dispose === void 0) {
801
- if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
802
- dispose = value[Symbol.dispose];
803
- }
804
- if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
805
- env.stack.push({ value: value, dispose: dispose, async: async });
806
- }
807
- else if (async) {
808
- env.stack.push({ async: true });
809
- }
810
- return value;
811
- }
812
-
813
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
814
- var e = new Error(message);
815
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
816
- };
817
-
818
- function __disposeResources(env) {
819
- function fail(e) {
820
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
821
- env.hasError = true;
822
- }
823
- function next() {
824
- while (env.stack.length) {
825
- var rec = env.stack.pop();
826
- try {
827
- var result = rec.dispose && rec.dispose.call(rec.value);
828
- if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
829
- }
830
- catch (e) {
831
- fail(e);
832
- }
833
- }
834
- if (env.hasError) throw env.error;
835
- }
836
- return next();
837
- }
838
-
839
- /* harmony default export */ const tslib_es6 = ({
840
- __extends,
841
- __assign,
842
- __rest,
843
- __decorate,
844
- __param,
845
- __metadata,
846
- __awaiter,
847
- __generator,
848
- __createBinding,
849
- __exportStar,
850
- __values,
851
- __read,
852
- __spread,
853
- __spreadArrays,
854
- __spreadArray,
855
- __await,
856
- __asyncGenerator,
857
- __asyncDelegator,
858
- __asyncValues,
859
- __makeTemplateObject,
860
- __importStar,
861
- __importDefault,
862
- __classPrivateFieldGet,
863
- __classPrivateFieldSet,
864
- __classPrivateFieldIn,
865
- __addDisposableResource,
866
- __disposeResources,
867
- });
868
-
869
- // EXTERNAL MODULE: external "../button"
870
- var external_button_ = __webpack_require__(4976);
871
- var external_button_default = /*#__PURE__*/__webpack_require__.n(external_button_);
872
- // EXTERNAL MODULE: external "../config-provider"
873
- var external_config_provider_ = __webpack_require__(2717);
874
- // EXTERNAL MODULE: external "../icon"
875
- var external_icon_ = __webpack_require__(6870);
876
- // EXTERNAL MODULE: external "../modal"
877
- var external_modal_ = __webpack_require__(8014);
878
- var external_modal_default = /*#__PURE__*/__webpack_require__.n(external_modal_);
879
- ;// CONCATENATED MODULE: ../../packages/dialog/src/props.ts
880
- /*
881
- * Tencent is pleased to support the open source community by making
882
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
883
- *
884
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
885
- *
886
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
887
- *
888
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
889
- *
890
- * ---------------------------------------------------
891
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
892
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
893
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
894
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
895
- *
896
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
897
- * the Software.
898
- *
899
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
900
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
901
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
902
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
903
- * IN THE SOFTWARE.
904
- */
905
-
906
-
907
- var props = Object.assign(Object.assign({}, external_modal_.propsMixin), {
908
- width: external_shared_.PropTypes.oneOfType([String, Number]).def(''),
909
- height: external_shared_.PropTypes.oneOfType([String, Number]).def(''),
910
- // 确认按钮文字
911
- // confirmText: PropTypes.string.def('确定'),
912
- confirmText: external_shared_.PropTypes.string,
913
- // 取消按钮文字
914
- // cancelText: PropTypes.string.def('取消'),
915
- cancelText: external_shared_.PropTypes.string,
916
- // 步骤按钮文字
917
- // prevText: PropTypes.string.def('上一步'),
918
- prevText: external_shared_.PropTypes.string,
919
- // nextText: PropTypes.string.def('下一步'),
920
- nextText: external_shared_.PropTypes.string,
921
- // 当前步骤
922
- current: external_shared_.PropTypes.number.def(1),
923
- // 总步数
924
- totalStep: external_shared_.PropTypes.number,
925
- // 弹框的标题
926
- title: external_shared_.PropTypes.string.def('title'),
927
- // 显示 header 的位置
928
- headerAlign: (0,external_shared_.alignType)().def(external_shared_.AlignEnum.LEFT),
929
- // 显示 footer 的位置
930
- footerAlign: (0,external_shared_.alignType)().def(external_shared_.AlignEnum.RIGHT),
931
- // 颜色 按钮类型
932
- theme: external_shared_.PropTypes.theme().def(external_shared_.ThemeEnum.PRIMARY),
933
- // 对话框类型
934
- dialogType: (0,external_shared_.dialogTypeUnion)(),
935
- // 按钮loading
936
- isLoading: external_shared_.PropTypes.bool.def(false)
937
- });
938
- /* harmony default export */ const src_props = (props);
939
- ;// CONCATENATED MODULE: ../../packages/dialog/src/dialog.tsx
940
-
941
-
942
- /*
943
- * Tencent is pleased to support the open source community by making
944
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
945
- *
946
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
947
- *
948
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
949
- *
950
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
951
- *
952
- * ---------------------------------------------------
953
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
954
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
955
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
956
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
957
- *
958
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
959
- * the Software.
960
- *
961
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
962
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
963
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
964
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
965
- * IN THE SOFTWARE.
966
- */
967
-
968
-
969
-
970
-
971
-
972
-
973
-
974
- function _isSlot(s) {
975
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_.isVNode)(s);
976
- }
977
- /* harmony default export */ const dialog = ((0,external_vue_.defineComponent)({
978
- name: 'Dialog',
979
- components: {
980
- BkModal: (external_modal_default()),
981
- BkButton: (external_button_default())
982
- },
983
- props: src_props,
984
- emits: ['closed', 'update:isShow', 'confirm', 'prev', 'next', 'value-change'],
985
- setup: function setup(props, _ref) {
986
- var _this = this;
987
- var emit = _ref.emit;
988
- var t = (0,external_config_provider_.useLocale)('dialog');
989
- var localConfirmText = (0,external_vue_.computed)(function () {
990
- if (props.confirmText === undefined) {
991
- return t.value.ok;
992
- }
993
- return props.confirmText;
994
- });
995
- var localCancelText = (0,external_vue_.computed)(function () {
996
- if (props.cancelText === undefined) {
997
- return t.value.cancel;
998
- }
999
- return props.cancelText;
1000
- });
1001
- var localPrevText = (0,external_vue_.computed)(function () {
1002
- if (props.prevText === undefined) {
1003
- return t.value.prev;
1004
- }
1005
- return props.prevText;
1006
- });
1007
- var localNextText = (0,external_vue_.computed)(function () {
1008
- if (props.nextText === undefined) {
1009
- return t.value.next;
1010
- }
1011
- return props.nextText;
1012
- });
1013
- var data = (0,external_vue_.reactive)({
1014
- positionX: 0,
1015
- positionY: 0,
1016
- moveStyle: {
1017
- top: '',
1018
- left: ''
1019
- }
1020
- });
1021
- var isModalShow = (0,external_vue_.ref)(props.isShow);
1022
- (0,external_vue_.onMounted)(function () {
1023
- if (props.escClose) {
1024
- addEventListener('keydown', escCloseHandler);
1025
- }
1026
- });
1027
- (0,external_vue_.onBeforeUnmount)(function () {
1028
- if (props.escClose) {
1029
- removeEventListener('keydown', escCloseHandler);
1030
- }
1031
- });
1032
- (0,external_vue_.watch)(function () {
1033
- return props.isShow;
1034
- }, function (val) {
1035
- if (!val) {
1036
- setTimeout(function () {
1037
- data.moveStyle = {
1038
- top: '50%',
1039
- left: '50%'
1040
- };
1041
- data.positionX = 0;
1042
- data.positionY = 0;
1043
- isModalShow.value = false;
1044
- }, 250);
1045
- } else {
1046
- isModalShow.value = true;
1047
- }
1048
- emit('value-change', val);
1049
- });
1050
- // 关闭弹框
1051
- var handleClose = function handleClose() {
1052
- return __awaiter(_this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee() {
1053
- var shouldClose;
1054
- return regenerator_default().wrap(function _callee$(_context) {
1055
- while (1) switch (_context.prev = _context.next) {
1056
- case 0:
1057
- shouldClose = true;
1058
- if (!(typeof props.beforeClose === 'function')) {
1059
- _context.next = 5;
1060
- break;
1061
- }
1062
- _context.next = 4;
1063
- return props.beforeClose();
1064
- case 4:
1065
- shouldClose = _context.sent;
1066
- case 5:
1067
- if (shouldClose) {
1068
- emit('update:isShow', false);
1069
- emit('closed');
1070
- isModalShow.value = false;
1071
- }
1072
- case 6:
1073
- case "end":
1074
- return _context.stop();
1075
- }
1076
- }, _callee);
1077
- }));
1078
- };
1079
- var handleConfirm = function handleConfirm() {
1080
- emit('update:isShow', false);
1081
- emit('confirm');
1082
- // isModalShow.value = false; 影响异步关闭
1083
- };
1084
-
1085
- var hasFooter = (0,external_vue_.computed)(function () {
1086
- return ['process', 'operation', 'confirm'].includes(props.dialogType);
1087
- });
1088
- // 按 esc 关闭弹框
1089
- var escCloseHandler = function escCloseHandler(e) {
1090
- if (props.isShow && props.closeIcon) {
1091
- if (e.keyCode === 27) {
1092
- handleClose();
1093
- }
1094
- }
1095
- };
1096
- // 上一步
1097
- var handlePrevStep = function handlePrevStep() {
1098
- emit('prev');
1099
- };
1100
- // 下一步
1101
- var handleNextStep = function handleNextStep() {
1102
- emit('next');
1103
- };
1104
- // 拖拽事件
1105
- var moveHandler = function moveHandler(e) {
1106
- if (props.fullscreen) {
1107
- return false;
1108
- }
1109
- if (!props.draggable) {
1110
- return false;
1111
- }
1112
- var odiv = e.target;
1113
- var parentHeight = e.currentTarget.parentNode.parentNode.offsetHeight;
1114
- var parentWidth = e.currentTarget.parentNode.parentNode.offsetWidth;
1115
- var disX;
1116
- var disY;
1117
- if (data.positionX !== 0 && data.positionY !== 0) {
1118
- disX = e.clientX - data.positionX;
1119
- disY = e.clientY - data.positionY;
1120
- } else {
1121
- disX = e.clientX - odiv.offsetLeft;
1122
- disY = e.clientY - odiv.offsetTop;
1123
- }
1124
- document.onmousemove = function (e) {
1125
- var boxLeft = window.innerWidth - parentWidth;
1126
- var boxTop = window.innerHeight - parentHeight;
1127
- var left = e.clientX - disX;
1128
- var top = e.clientY - disY;
1129
- if (boxLeft / 2 - left <= 0) {
1130
- left = boxLeft / 2;
1131
- } else if (boxLeft / 2 + left <= 0) {
1132
- left = -boxLeft / 2;
1133
- }
1134
- if (boxTop / 2 - top <= 0) {
1135
- top = boxTop / 2;
1136
- } else if (boxTop / 2 + top <= 0) {
1137
- top = -boxTop / 2;
1138
- }
1139
- data.positionX = left;
1140
- data.positionY = top;
1141
- data.moveStyle.left = "calc(50% + ".concat(left, "px)");
1142
- data.moveStyle.top = "calc(50% + ".concat(top, "px)");
1143
- };
1144
- document.onmouseup = function () {
1145
- document.onmousemove = null;
1146
- document.onmouseup = null;
1147
- };
1148
- };
1149
- var _usePrefix = (0,external_config_provider_.usePrefix)(),
1150
- resolveClassName = _usePrefix.resolveClassName;
1151
- return {
1152
- data: data,
1153
- handleClose: handleClose,
1154
- handleConfirm: handleConfirm,
1155
- escCloseHandler: escCloseHandler,
1156
- moveHandler: moveHandler,
1157
- handlePrevStep: handlePrevStep,
1158
- handleNextStep: handleNextStep,
1159
- hasFooter: hasFooter,
1160
- isModalShow: isModalShow,
1161
- localConfirmText: localConfirmText,
1162
- localCancelText: localCancelText,
1163
- localPrevText: localPrevText,
1164
- localNextText: localNextText,
1165
- resolveClassName: resolveClassName
1166
- };
1167
- },
1168
- render: function render() {
1169
- var _this2 = this;
1170
- var renderIcon = function renderIcon() {
1171
- var iconMap = {
1172
- loading: (0,external_vue_.createVNode)(external_icon_.Spinner, {
1173
- "class": [_this2.resolveClassName('info-icon'), 'primary']
1174
- }, null),
1175
- warning: (0,external_vue_.createVNode)(external_icon_.Warn, {
1176
- "class": [_this2.resolveClassName('info-icon'), 'warning']
1177
- }, null),
1178
- success: (0,external_vue_.createVNode)(external_icon_.Success, {
1179
- "class": [_this2.resolveClassName('info-icon'), 'success']
1180
- }, null),
1181
- danger: (0,external_vue_.createVNode)(external_icon_.Close, {
1182
- "class": [_this2.resolveClassName('info-icon'), 'danger']
1183
- }, null)
1184
- };
1185
- return iconMap[_this2.infoType];
1186
- };
1187
- var dialogSlot = {
1188
- header: function header() {
1189
- var _a, _b, _c, _d, _e, _f;
1190
- return [(0,external_vue_.createVNode)("div", {
1191
- "class": [_this2.resolveClassName('dialog-tool'), _this2.fullscreen || !_this2.draggable ? '' : 'move', _this2.draggable ? 'content-dragging' : ''],
1192
- "onMousedown": _this2.moveHandler
1193
- }, [(_c = (_b = (_a = _this2.$slots).tools) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : '']), (0,external_vue_.createVNode)("div", {
1194
- "class": _this2.resolveClassName('dialog-header')
1195
- }, [(0,external_vue_.createVNode)("div", {
1196
- "class": _this2.resolveClassName('header-icon')
1197
- }, [_this2.infoType ? renderIcon() : (0,external_vue_.createVNode)("slot", {
1198
- "name": "info-icon"
1199
- }, null)]), (0,external_vue_.createVNode)("span", {
1200
- "class": _this2.resolveClassName('dialog-title'),
1201
- "style": "text-align: ".concat(_this2.headerAlign)
1202
- }, [(_f = (_e = (_d = _this2.$slots).header) === null || _e === void 0 ? void 0 : _e.call(_d)) !== null && _f !== void 0 ? _f : _this2.title])])];
1203
- },
1204
- "default": function _default() {
1205
- var _a, _b, _c;
1206
- return (_c = (_b = (_a = _this2.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : 'default';
1207
- },
1208
- footer: function footer() {
1209
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1210
- return (0,external_vue_.createVNode)("div", {
1211
- "class": _this2.resolveClassName('dialog-footer'),
1212
- "style": "text-align: ".concat(_this2.footerAlign)
1213
- }, [_this2.dialogType === 'process' ? (_c = (_b = (_a = _this2.$slots).footer) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : (0,external_vue_.createVNode)(external_vue_.Fragment, null, [_this2.current === 1 ? '' : (0,external_vue_.createVNode)((external_button_default()), {
1214
- "class": _this2.resolveClassName('dialog-perv'),
1215
- "onClick": _this2.handlePrevStep
1216
- }, {
1217
- "default": function _default() {
1218
- return [_this2.localPrevText];
1219
- }
1220
- }), _this2.current === _this2.totalStep ? '' : (0,external_vue_.createVNode)((external_button_default()), {
1221
- "class": _this2.resolveClassName('dialog-next'),
1222
- "onClick": _this2.handleNextStep
1223
- }, {
1224
- "default": function _default() {
1225
- return [_this2.localNextText];
1226
- }
1227
- }), _this2.current === _this2.totalStep ? (0,external_vue_.createVNode)((external_button_default()), {
1228
- "onClick": _this2.handleConfirm,
1229
- "theme": _this2.theme,
1230
- "loading": _this2.isLoading
1231
- }, {
1232
- "default": function _default() {
1233
- return [_this2.localConfirmText];
1234
- }
1235
- }) : '', (0,external_vue_.createVNode)((external_button_default()), {
1236
- "class": _this2.resolveClassName('dialog-cancel'),
1237
- "onClick": _this2.handleClose,
1238
- "disabled": _this2.isLoading
1239
- }, {
1240
- "default": function _default() {
1241
- return [_this2.localCancelText];
1242
- }
1243
- })]) : '', _this2.dialogType === 'operation' ? (_f = (_e = (_d = _this2.$slots).footer) === null || _e === void 0 ? void 0 : _e.call(_d)) !== null && _f !== void 0 ? _f : (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(0,external_vue_.createVNode)((external_button_default()), {
1244
- "onClick": _this2.handleConfirm,
1245
- "theme": _this2.theme,
1246
- "loading": _this2.isLoading
1247
- }, {
1248
- "default": function _default() {
1249
- return [_this2.localConfirmText];
1250
- }
1251
- }), (0,external_vue_.createVNode)((external_button_default()), {
1252
- "class": _this2.resolveClassName('dialog-cancel'),
1253
- "onClick": _this2.handleClose,
1254
- "disabled": _this2.isLoading
1255
- }, {
1256
- "default": function _default() {
1257
- return [_this2.localCancelText];
1258
- }
1259
- })]) : '', _this2.dialogType === 'confirm' ? (_j = (_h = (_g = _this2.$slots).footer) === null || _h === void 0 ? void 0 : _h.call(_g)) !== null && _j !== void 0 ? _j : (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(0,external_vue_.createVNode)((external_button_default()), {
1260
- "onClick": _this2.handleConfirm,
1261
- "theme": _this2.theme,
1262
- "loading": _this2.isLoading
1263
- }, {
1264
- "default": function _default() {
1265
- return [_this2.localConfirmText];
1266
- }
1267
- })]) : '']);
1268
- },
1269
- // eslint-disable-next-line @typescript-eslint/no-misused-promises
1270
- close: function close() {
1271
- return (0,external_vue_.createVNode)(external_icon_.Error, {
1272
- "onClick": _this2.handleClose
1273
- }, null);
1274
- }
1275
- };
1276
- var className = "".concat(this.resolveClassName('dialog-wrapper '), " ").concat(this.scrollable ? 'scroll-able' : '', " ").concat(this.multiInstance ? 'multi-instance' : '', " ").concat(this.hasFooter ? 'has-footer' : 'no-footer');
1277
- return (0,external_vue_.createVNode)((external_modal_default()), (0,external_vue_.mergeProps)(this.$props, {
1278
- "class": className,
1279
- "onClose": this.handleClose,
1280
- "isShow": this.isModalShow,
1281
- "style": this.data.moveStyle
1282
- }), _isSlot(dialogSlot) ? dialogSlot : {
1283
- "default": function _default() {
1284
- return [dialogSlot];
1285
- }
1286
- });
1287
- }
1288
- }));
1289
- ;// CONCATENATED MODULE: ../../packages/dialog/src/index.ts
1290
- /*
1291
- * Tencent is pleased to support the open source community by making
1292
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1293
- *
1294
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1295
- *
1296
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1297
- *
1298
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1299
- *
1300
- * ---------------------------------------------------
1301
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1302
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1303
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1304
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1305
- *
1306
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1307
- * the Software.
1308
- *
1309
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1310
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1311
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1312
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1313
- * IN THE SOFTWARE.
1314
- */
1315
-
1316
-
1317
- var BkDialog = (0,external_shared_.withInstall)(dialog);
1318
- /* harmony default export */ const src = (BkDialog);
1319
- })();
1320
-
1321
- /******/ return __webpack_exports__;
1322
- /******/ })()
1323
- ;
1324
- });
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("../button"),require("../config-provider"),require("../icon"),require("../modal"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../button","../config-provider","../icon","../modal"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue"),require("../button"),require("../config-provider"),require("../icon"),require("../modal")):t(e["../shared"],e.vue,e["../button"],e["../config-provider"],e["../icon"],e["../modal"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,((e,t,o,r,n,i)=>(()=>{var a={4976:e=>{"use strict";e.exports=o},2717:e=>{"use strict";e.exports=r},6870:e=>{"use strict";e.exports=n},8014:e=>{"use strict";e.exports=i},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},7609:(e,t,o)=>{var r=o(7425).default;function n(){"use strict";e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(e,t,o){e[t]=o.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",s=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function f(e,t,o){return Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,o){return e[t]=o}}function d(e,t,o,r){var n=t&&t.prototype instanceof v?t:v,i=Object.create(n.prototype),l=new P(r||[]);return a(i,"_invoke",{value:C(e,o,l)}),i}function p(e,t,o){try{return{type:"normal",arg:e.call(t,o)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h={};function v(){}function m(){}function y(){}var g={};f(g,c,(function(){return this}));var x=Object.getPrototypeOf,b=x&&x(x(j([])));b&&b!==o&&i.call(b,c)&&(g=b);var w=y.prototype=v.prototype=Object.create(g);function T(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function o(n,a,l,c){var s=p(e[n],e,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,c)}),(function(e){o("throw",e,l,c)})):t.resolve(f).then((function(e){u.value=e,l(u)}),(function(e){return o("throw",e,l,c)}))}c(s.arg)}var n;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,n){o(e,r,t,n)}))}return n=n?n.then(i,i):i()}})}function C(e,t,o){var r="suspendedStart";return function(n,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw i;return{value:void 0,done:!0}}for(o.method=n,o.arg=i;;){var a=o.delegate;if(a){var l=S(a,o);if(l){if(l===h)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===r)throw r="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r="executing";var c=p(e,t,o);if("normal"===c.type){if(r=o.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:o.done}}"throw"===c.type&&(r="completed",o.method="throw",o.arg=c.arg)}}}function S(e,t){var o=t.method,r=e.iterator[o];if(void 0===r)return t.delegate=null,"throw"===o&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==o&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+o+"' method")),h;var n=p(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,h;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function L(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function j(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:O}}function O(){return{value:void 0,done:!0}}return m.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:m,configurable:!0}),m.displayName=f(y,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,f(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},T(N.prototype),f(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,o,r,n,i){void 0===i&&(i=Promise);var a=new N(d(e,o,r,n),i);return t.isGeneratorFunction(o)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(w),f(w,u,"Generator"),f(w,c,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),o=[];for(var r in t)o.push(r);return o.reverse(),function e(){for(;o.length;){var r=o.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=j,P.prototype={constructor:P,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(E),!e)for(var t in this)"t"===t.charAt(0)&&i.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 o(o,r){return a.type="throw",a.arg=e,t.next=o,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],a=n.completion;if("root"===n.tryLoc)return o("end");if(n.tryLoc<=this.prev){var l=i.call(n,"catchLoc"),c=i.call(n,"finallyLoc");if(l&&c){if(this.prev<n.catchLoc)return o(n.catchLoc,!0);if(this.prev<n.finallyLoc)return o(n.finallyLoc)}else if(l){if(this.prev<n.catchLoc)return o(n.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return o(n.finallyLoc)}}}},abrupt:function(e,t){for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&i.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 a=n?n.completion:{};return a.type=e,a.arg=t,n?(this.method="next",this.next=n.finallyLoc,h):this.complete(a)},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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.finallyLoc===e)return this.complete(o.completion,o.afterLoc),E(o),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.tryLoc===e){var r=o.completion;if("throw"===r.type){var n=r.arg;E(o)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,o){return this.delegate={iterator:j(e),resultName:t,nextLoc:o},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(o){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(o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,o)=>{var r=o(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var o=l[e]={exports:{}};return a[e](o,o.exports,c),o.exports}c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{"use strict";c.r(s),c.d(s,{default:()=>h});var e=c(4212),t=c(748),o=c(2841),r=c.n(o);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var n=c(4976),i=c.n(n),a=c(2717),l=c(6870),u=c(8014),f=c.n(u);const d=Object.assign(Object.assign({},u.propsMixin),{width:e.PropTypes.oneOfType([String,Number]).def(""),height:e.PropTypes.oneOfType([String,Number]).def(""),confirmText:e.PropTypes.string,cancelText:e.PropTypes.string,prevText:e.PropTypes.string,nextText:e.PropTypes.string,current:e.PropTypes.number.def(1),totalStep:e.PropTypes.number,title:e.PropTypes.string.def("title"),headerAlign:(0,e.alignType)().def(e.AlignEnum.LEFT),footerAlign:(0,e.alignType)().def(e.AlignEnum.RIGHT),theme:e.PropTypes.theme().def(e.ThemeEnum.PRIMARY),dialogType:(0,e.dialogTypeUnion)(),isLoading:e.PropTypes.bool.def(!1)}),p=(0,t.defineComponent)({name:"Dialog",components:{BkModal:f(),BkButton:i()},props:d,emits:["closed","update:isShow","confirm","prev","next","value-change"],setup:function(e,o){var n=this,i=o.emit,l=(0,a.useLocale)("dialog"),c=(0,t.computed)((function(){return void 0===e.confirmText?l.value.ok:e.confirmText})),s=(0,t.computed)((function(){return void 0===e.cancelText?l.value.cancel:e.cancelText})),u=(0,t.computed)((function(){return void 0===e.prevText?l.value.prev:e.prevText})),f=(0,t.computed)((function(){return void 0===e.nextText?l.value.next:e.nextText})),d=(0,t.reactive)({positionX:0,positionY:0,moveStyle:{top:"",left:""}}),p=(0,t.ref)(e.isShow);(0,t.onMounted)((function(){e.escClose&&addEventListener("keydown",m)})),(0,t.onBeforeUnmount)((function(){e.escClose&&removeEventListener("keydown",m)})),(0,t.watch)((function(){return e.isShow}),(function(e){e?p.value=!0:setTimeout((function(){d.moveStyle={top:"50%",left:"50%"},d.positionX=0,d.positionY=0,p.value=!1}),250),i("value-change",e)}));var h=function(){return t=n,o=void 0,a=void 0,l=r().mark((function t(){var o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=!0,"function"!=typeof e.beforeClose){t.next=5;break}return t.next=4,e.beforeClose();case 4:o=t.sent;case 5:o&&(i("update:isShow",!1),i("closed"),p.value=!1);case 6:case"end":return t.stop()}}),t)})),new(a||(a=Promise))((function(e,r){function n(e){try{c(l.next(e))}catch(e){r(e)}}function i(e){try{c(l.throw(e))}catch(e){r(e)}}function c(t){var o;t.done?e(t.value):(o=t.value,o instanceof a?o:new a((function(e){e(o)}))).then(n,i)}c((l=l.apply(t,o||[])).next())}));var t,o,a,l},v=(0,t.computed)((function(){return["process","operation","confirm"].includes(e.dialogType)})),m=function(t){e.isShow&&e.closeIcon&&27===t.keyCode&&h()},y=(0,a.usePrefix)().resolveClassName;return{data:d,handleClose:h,handleConfirm:function(){i("update:isShow",!1),i("confirm")},escCloseHandler:m,moveHandler:function(t){if(e.fullscreen)return!1;if(!e.draggable)return!1;var o,r,n=t.target,i=t.currentTarget.parentNode.parentNode.offsetHeight,a=t.currentTarget.parentNode.parentNode.offsetWidth;0!==d.positionX&&0!==d.positionY?(o=t.clientX-d.positionX,r=t.clientY-d.positionY):(o=t.clientX-n.offsetLeft,r=t.clientY-n.offsetTop),document.onmousemove=function(e){var t=window.innerWidth-a,n=window.innerHeight-i,l=e.clientX-o,c=e.clientY-r;t/2-l<=0?l=t/2:t/2+l<=0&&(l=-t/2),n/2-c<=0?c=n/2:n/2+c<=0&&(c=-n/2),d.positionX=l,d.positionY=c,d.moveStyle.left="calc(50% + ".concat(l,"px)"),d.moveStyle.top="calc(50% + ".concat(c,"px)")},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}},handlePrevStep:function(){i("prev")},handleNextStep:function(){i("next")},hasFooter:v,isModalShow:p,localConfirmText:c,localCancelText:s,localPrevText:u,localNextText:f,resolveClassName:y}},render:function(){var e,o=this,r={header:function(){var e,r,n,i,a,c;return[(0,t.createVNode)("div",{class:[o.resolveClassName("dialog-tool"),o.fullscreen||!o.draggable?"":"move",o.draggable?"content-dragging":""],onMousedown:o.moveHandler},[null!==(n=null===(r=(e=o.$slots).tools)||void 0===r?void 0:r.call(e))&&void 0!==n?n:""]),(0,t.createVNode)("div",{class:o.resolveClassName("dialog-header")},[(0,t.createVNode)("div",{class:o.resolveClassName("header-icon")},[o.infoType?{loading:(0,t.createVNode)(l.Spinner,{class:[o.resolveClassName("info-icon"),"primary"]},null),warning:(0,t.createVNode)(l.Warn,{class:[o.resolveClassName("info-icon"),"warning"]},null),success:(0,t.createVNode)(l.Success,{class:[o.resolveClassName("info-icon"),"success"]},null),danger:(0,t.createVNode)(l.Close,{class:[o.resolveClassName("info-icon"),"danger"]},null)}[o.infoType]:(0,t.createVNode)("slot",{name:"info-icon"},null)]),(0,t.createVNode)("span",{class:o.resolveClassName("dialog-title"),style:"text-align: ".concat(o.headerAlign)},[null!==(c=null===(a=(i=o.$slots).header)||void 0===a?void 0:a.call(i))&&void 0!==c?c:o.title])])]},default:function(){var e,t,r;return null!==(r=null===(t=(e=o.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==r?r:"default"},footer:function(){var e,r,n,a,l,c,s,u,f;return(0,t.createVNode)("div",{class:o.resolveClassName("dialog-footer"),style:"text-align: ".concat(o.footerAlign)},["process"===o.dialogType?null!==(n=null===(r=(e=o.$slots).footer)||void 0===r?void 0:r.call(e))&&void 0!==n?n:(0,t.createVNode)(t.Fragment,null,[1===o.current?"":(0,t.createVNode)(i(),{class:o.resolveClassName("dialog-perv"),onClick:o.handlePrevStep},{default:function(){return[o.localPrevText]}}),o.current===o.totalStep?"":(0,t.createVNode)(i(),{class:o.resolveClassName("dialog-next"),onClick:o.handleNextStep},{default:function(){return[o.localNextText]}}),o.current===o.totalStep?(0,t.createVNode)(i(),{onClick:o.handleConfirm,theme:o.theme,loading:o.isLoading},{default:function(){return[o.localConfirmText]}}):"",(0,t.createVNode)(i(),{class:o.resolveClassName("dialog-cancel"),onClick:o.handleClose,disabled:o.isLoading},{default:function(){return[o.localCancelText]}})]):"","operation"===o.dialogType?null!==(c=null===(l=(a=o.$slots).footer)||void 0===l?void 0:l.call(a))&&void 0!==c?c:(0,t.createVNode)(t.Fragment,null,[(0,t.createVNode)(i(),{onClick:o.handleConfirm,theme:o.theme,loading:o.isLoading},{default:function(){return[o.localConfirmText]}}),(0,t.createVNode)(i(),{class:o.resolveClassName("dialog-cancel"),onClick:o.handleClose,disabled:o.isLoading},{default:function(){return[o.localCancelText]}})]):"","confirm"===o.dialogType?null!==(f=null===(u=(s=o.$slots).footer)||void 0===u?void 0:u.call(s))&&void 0!==f?f:(0,t.createVNode)(t.Fragment,null,[(0,t.createVNode)(i(),{onClick:o.handleConfirm,theme:o.theme,loading:o.isLoading},{default:function(){return[o.localConfirmText]}})]):""])},close:function(){return(0,t.createVNode)(l.Error,{onClick:o.handleClose},null)}},n="".concat(this.resolveClassName("dialog-wrapper ")," ").concat(this.scrollable?"scroll-able":""," ").concat(this.multiInstance?"multi-instance":""," ").concat(this.hasFooter?"has-footer":"no-footer");return(0,t.createVNode)(f(),(0,t.mergeProps)(this.$props,{class:n,onClose:this.handleClose,isShow:this.isModalShow,style:this.data.moveStyle}),"function"==typeof(e=r)||"[object Object]"===Object.prototype.toString.call(e)&&!(0,t.isVNode)(e)?r:{default:function(){return[r]}})}}),h=(0,e.withInstall)(p)})(),s})()));