cy-element-ui 1.0.72 → 1.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/lib/alert.js +4 -4
  2. package/lib/aside.js +77 -77
  3. package/lib/autocomplete.js +3940 -159
  4. package/lib/avatar.js +108 -108
  5. package/lib/backtop.js +110 -110
  6. package/lib/badge.js +108 -108
  7. package/lib/breadcrumb-item.js +4 -4
  8. package/lib/breadcrumb.js +4 -4
  9. package/lib/button-group.js +4 -4
  10. package/lib/button.js +4 -4
  11. package/lib/calendar.js +1545 -46
  12. package/lib/card.js +96 -96
  13. package/lib/carousel-item.js +452 -108
  14. package/lib/carousel.js +185 -116
  15. package/lib/cascader-panel.js +2270 -187
  16. package/lib/cascader.js +6452 -275
  17. package/lib/checkbox-button.js +43 -11
  18. package/lib/checkbox-group.js +47 -15
  19. package/lib/checkbox.js +47 -15
  20. package/lib/col.js +2 -2
  21. package/lib/collapse-item.js +815 -110
  22. package/lib/collapse.js +108 -108
  23. package/lib/color-picker.js +3953 -153
  24. package/lib/container.js +88 -88
  25. package/lib/date-picker.js +5231 -420
  26. package/lib/descriptions-item.js +2 -2
  27. package/lib/descriptions.js +63 -8
  28. package/lib/dialog.js +1200 -22
  29. package/lib/directives/repeat-click.js +2 -2
  30. package/lib/divider.js +104 -104
  31. package/lib/drawer.js +875 -105
  32. package/lib/dropdown-item.js +43 -11
  33. package/lib/dropdown-menu.js +2274 -72
  34. package/lib/dropdown.js +1072 -136
  35. package/lib/element-ui.common.js +26229 -13291
  36. package/lib/empty.js +603 -7
  37. package/lib/fileUpload.js +2478 -110
  38. package/lib/footer.js +77 -77
  39. package/lib/form-item.js +418 -28
  40. package/lib/form.js +29 -15
  41. package/lib/header.js +77 -77
  42. package/lib/icon.js +4 -4
  43. package/lib/image.js +1376 -49
  44. package/lib/index.js +1 -1
  45. package/lib/infinite-scroll.js +311 -21
  46. package/lib/input-number.js +1423 -34
  47. package/lib/input.js +507 -37
  48. package/lib/link.js +4 -4
  49. package/lib/loading.js +804 -67
  50. package/lib/locale/format.js +1 -1
  51. package/lib/locale/index.js +1 -1
  52. package/lib/main.js +64 -64
  53. package/lib/menu-item-group.js +4 -4
  54. package/lib/menu-item.js +2925 -41
  55. package/lib/menu.js +745 -54
  56. package/lib/message-box.js +2536 -79
  57. package/lib/message.js +1102 -24
  58. package/lib/mixins/locale.js +1 -1
  59. package/lib/mixins/migrating.js +1 -1
  60. package/lib/notification.js +1102 -25
  61. package/lib/option-group.js +43 -11
  62. package/lib/option.js +394 -18
  63. package/lib/page-header.js +683 -87
  64. package/lib/pagination.js +6078 -139
  65. package/lib/popconfirm.js +3508 -219
  66. package/lib/popover.js +2604 -79
  67. package/lib/progress.js +4 -4
  68. package/lib/radio-button.js +43 -11
  69. package/lib/radio-group.js +43 -11
  70. package/lib/radio.js +47 -15
  71. package/lib/rate.js +756 -113
  72. package/lib/result.js +4 -4
  73. package/lib/row.js +2 -2
  74. package/lib/scrollbar.js +735 -50
  75. package/lib/select.js +4352 -209
  76. package/lib/selectDisplayInput.js +108 -108
  77. package/lib/skeleton-item.js +2 -2
  78. package/lib/skeleton.js +108 -108
  79. package/lib/slider.js +4266 -120
  80. package/lib/spinner.js +4 -4
  81. package/lib/statistic.js +9605 -117
  82. package/lib/step.js +108 -108
  83. package/lib/steps.js +514 -99
  84. package/lib/subTitle.js +91 -91
  85. package/lib/submenu.js +2444 -123
  86. package/lib/switch.js +476 -21
  87. package/lib/tab-pane.js +4 -4
  88. package/lib/tabDialog.js +1544 -18
  89. package/lib/table-column.js +881 -33
  90. package/lib/table.js +4469 -426
  91. package/lib/tabs.js +425 -12
  92. package/lib/tag.js +4 -4
  93. package/lib/time-picker.js +5013 -285
  94. package/lib/time-select.js +4945 -177
  95. package/lib/timeline-item.js +108 -108
  96. package/lib/timeline.js +82 -82
  97. package/lib/tooltip.js +2566 -41
  98. package/lib/transfer.js +2135 -141
  99. package/lib/transitions/collapse-transition.js +1 -1
  100. package/lib/tree.js +1372 -55
  101. package/lib/treeSelect.js +3420 -105
  102. package/lib/upload.js +1047 -28
  103. package/lib/utils/clickoutside.js +1 -1
  104. package/lib/utils/date-util.js +2 -2
  105. package/lib/utils/popup/index.js +2 -2
  106. package/lib/utils/popup/popup-manager.js +1 -1
  107. package/lib/utils/util.js +1 -1
  108. package/lib/utils/vdom.js +1 -1
  109. package/lib/utils/vue-popper.js +1 -1
  110. package/package.json +1 -1
  111. package/src/index.js +1 -1
package/lib/select.js CHANGED
@@ -82,180 +82,4199 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 65);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 52);
86
86
  /******/ })
87
87
  /************************************************************************/
88
- /******/ ({
88
+ /******/ ([
89
+ /* 0 */
90
+ /***/ (function(module, exports) {
91
+
92
+ module.exports = require("vue");
93
+
94
+ /***/ }),
95
+ /* 1 */
96
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
97
+
98
+ "use strict";
99
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
105
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
106
+ /* unused harmony export setStyle */
107
+ /* unused harmony export isScroll */
108
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
109
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
110
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
111
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
112
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
113
+
114
+ /* istanbul ignore next */
115
+
116
+
117
+
118
+ var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
119
+ var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
120
+ var MOZ_HACK_REGEXP = /^moz([A-Z])/;
121
+ var ieVersion = isServer ? 0 : Number(document.documentMode);
122
+
123
+ /* istanbul ignore next */
124
+ var trim = function trim(string) {
125
+ return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
126
+ };
127
+ /* istanbul ignore next */
128
+ var camelCase = function camelCase(name) {
129
+ return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
130
+ return offset ? letter.toUpperCase() : letter;
131
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
132
+ };
133
+
134
+ /* istanbul ignore next */
135
+ var on = function () {
136
+ if (!isServer && document.addEventListener) {
137
+ return function (element, event, handler) {
138
+ if (element && event && handler) {
139
+ element.addEventListener(event, handler, false);
140
+ }
141
+ };
142
+ } else {
143
+ return function (element, event, handler) {
144
+ if (element && event && handler) {
145
+ element.attachEvent('on' + event, handler);
146
+ }
147
+ };
148
+ }
149
+ }();
150
+
151
+ /* istanbul ignore next */
152
+ var off = function () {
153
+ if (!isServer && document.removeEventListener) {
154
+ return function (element, event, handler) {
155
+ if (element && event) {
156
+ element.removeEventListener(event, handler, false);
157
+ }
158
+ };
159
+ } else {
160
+ return function (element, event, handler) {
161
+ if (element && event) {
162
+ element.detachEvent('on' + event, handler);
163
+ }
164
+ };
165
+ }
166
+ }();
167
+
168
+ /* istanbul ignore next */
169
+ var once = function once(el, event, fn) {
170
+ var listener = function listener() {
171
+ if (fn) {
172
+ fn.apply(this, arguments);
173
+ }
174
+ off(el, event, listener);
175
+ };
176
+ on(el, event, listener);
177
+ };
178
+
179
+ /* istanbul ignore next */
180
+ function hasClass(el, cls) {
181
+ if (!el || !cls) return false;
182
+ if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
183
+ if (el.classList) {
184
+ return el.classList.contains(cls);
185
+ } else {
186
+ return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
187
+ }
188
+ };
189
+
190
+ /* istanbul ignore next */
191
+ function addClass(el, cls) {
192
+ if (!el) return;
193
+ var curClass = el.className;
194
+ var classes = (cls || '').split(' ');
195
+
196
+ for (var i = 0, j = classes.length; i < j; i++) {
197
+ var clsName = classes[i];
198
+ if (!clsName) continue;
199
+
200
+ if (el.classList) {
201
+ el.classList.add(clsName);
202
+ } else if (!hasClass(el, clsName)) {
203
+ curClass += ' ' + clsName;
204
+ }
205
+ }
206
+ if (!el.classList) {
207
+ el.setAttribute('class', curClass);
208
+ }
209
+ };
210
+
211
+ /* istanbul ignore next */
212
+ function removeClass(el, cls) {
213
+ if (!el || !cls) return;
214
+ var classes = cls.split(' ');
215
+ var curClass = ' ' + el.className + ' ';
216
+
217
+ for (var i = 0, j = classes.length; i < j; i++) {
218
+ var clsName = classes[i];
219
+ if (!clsName) continue;
220
+
221
+ if (el.classList) {
222
+ el.classList.remove(clsName);
223
+ } else if (hasClass(el, clsName)) {
224
+ curClass = curClass.replace(' ' + clsName + ' ', ' ');
225
+ }
226
+ }
227
+ if (!el.classList) {
228
+ el.setAttribute('class', trim(curClass));
229
+ }
230
+ };
231
+
232
+ /* istanbul ignore next */
233
+ var getStyle = ieVersion < 9 ? function (element, styleName) {
234
+ if (isServer) return;
235
+ if (!element || !styleName) return null;
236
+ styleName = camelCase(styleName);
237
+ if (styleName === 'float') {
238
+ styleName = 'styleFloat';
239
+ }
240
+ try {
241
+ switch (styleName) {
242
+ case 'opacity':
243
+ try {
244
+ return element.filters.item('alpha').opacity / 100;
245
+ } catch (e) {
246
+ return 1.0;
247
+ }
248
+ default:
249
+ return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
250
+ }
251
+ } catch (e) {
252
+ return element.style[styleName];
253
+ }
254
+ } : function (element, styleName) {
255
+ if (isServer) return;
256
+ if (!element || !styleName) return null;
257
+ styleName = camelCase(styleName);
258
+ if (styleName === 'float') {
259
+ styleName = 'cssFloat';
260
+ }
261
+ try {
262
+ var computed = document.defaultView.getComputedStyle(element, '');
263
+ return element.style[styleName] || computed ? computed[styleName] : null;
264
+ } catch (e) {
265
+ return element.style[styleName];
266
+ }
267
+ };
268
+
269
+ /* istanbul ignore next */
270
+ function setStyle(element, styleName, value) {
271
+ if (!element || !styleName) return;
272
+
273
+ if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
274
+ for (var prop in styleName) {
275
+ if (styleName.hasOwnProperty(prop)) {
276
+ setStyle(element, prop, styleName[prop]);
277
+ }
278
+ }
279
+ } else {
280
+ styleName = camelCase(styleName);
281
+ if (styleName === 'opacity' && ieVersion < 9) {
282
+ element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
283
+ } else {
284
+ element.style[styleName] = value;
285
+ }
286
+ }
287
+ };
288
+
289
+ var isScroll = function isScroll(el, vertical) {
290
+ if (isServer) return;
291
+
292
+ var determinedDirection = vertical !== null && vertical !== undefined;
293
+ var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
294
+
295
+ return overflow.match(/(scroll|auto|overlay)/);
296
+ };
297
+
298
+ var getScrollContainer = function getScrollContainer(el, vertical) {
299
+ if (isServer) return;
300
+
301
+ var parent = el;
302
+ while (parent) {
303
+ if ([window, document, document.documentElement].includes(parent)) {
304
+ return window;
305
+ }
306
+ if (isScroll(parent, vertical)) {
307
+ return parent;
308
+ }
309
+ parent = parent.parentNode;
310
+ }
311
+
312
+ return parent;
313
+ };
314
+
315
+ var isInContainer = function isInContainer(el, container) {
316
+ if (isServer || !el || !container) return false;
317
+
318
+ var elRect = el.getBoundingClientRect();
319
+ var containerRect = void 0;
320
+
321
+ if ([window, document, document.documentElement, null, undefined].includes(container)) {
322
+ containerRect = {
323
+ top: 0,
324
+ right: window.innerWidth,
325
+ bottom: window.innerHeight,
326
+ left: 0
327
+ };
328
+ } else {
329
+ containerRect = container.getBoundingClientRect();
330
+ }
331
+
332
+ return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
333
+ };
334
+
335
+ /***/ }),
336
+ /* 2 */
337
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
338
+
339
+ "use strict";
340
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
341
+ /* globals __VUE_SSR_CONTEXT__ */
342
+
343
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
344
+ // This module is a runtime utility for cleaner component module output and will
345
+ // be included in the final webpack user bundle.
346
+
347
+ function normalizeComponent(
348
+ scriptExports,
349
+ render,
350
+ staticRenderFns,
351
+ functionalTemplate,
352
+ injectStyles,
353
+ scopeId,
354
+ moduleIdentifier /* server only */,
355
+ shadowMode /* vue-cli only */
356
+ ) {
357
+ // Vue.extend constructor export interop
358
+ var options =
359
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
360
+
361
+ // render functions
362
+ if (render) {
363
+ options.render = render
364
+ options.staticRenderFns = staticRenderFns
365
+ options._compiled = true
366
+ }
367
+
368
+ // functional template
369
+ if (functionalTemplate) {
370
+ options.functional = true
371
+ }
372
+
373
+ // scopedId
374
+ if (scopeId) {
375
+ options._scopeId = 'data-v-' + scopeId
376
+ }
377
+
378
+ var hook
379
+ if (moduleIdentifier) {
380
+ // server build
381
+ hook = function (context) {
382
+ // 2.3 injection
383
+ context =
384
+ context || // cached call
385
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
386
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
387
+ // 2.2 with runInNewContext: true
388
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
389
+ context = __VUE_SSR_CONTEXT__
390
+ }
391
+ // inject component styles
392
+ if (injectStyles) {
393
+ injectStyles.call(this, context)
394
+ }
395
+ // register component module identifier for async chunk inferrence
396
+ if (context && context._registeredComponents) {
397
+ context._registeredComponents.add(moduleIdentifier)
398
+ }
399
+ }
400
+ // used by ssr in case component is cached and beforeCreate
401
+ // never gets called
402
+ options._ssrRegister = hook
403
+ } else if (injectStyles) {
404
+ hook = shadowMode
405
+ ? function () {
406
+ injectStyles.call(
407
+ this,
408
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
409
+ )
410
+ }
411
+ : injectStyles
412
+ }
413
+
414
+ if (hook) {
415
+ if (options.functional) {
416
+ // for template-only hot-reload because in that case the render fn doesn't
417
+ // go through the normalizer
418
+ options._injectStyles = hook
419
+ // register for functional component in vue file
420
+ var originalRender = options.render
421
+ options.render = function renderWithStyleInjection(h, context) {
422
+ hook.call(context)
423
+ return originalRender(h, context)
424
+ }
425
+ } else {
426
+ // inject component registration as beforeCreate hook
427
+ var existing = options.beforeCreate
428
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
429
+ }
430
+ }
431
+
432
+ return {
433
+ exports: scriptExports,
434
+ options: options
435
+ }
436
+ }
437
+
438
+
439
+ /***/ }),
440
+ /* 3 */
441
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
442
+
443
+ "use strict";
444
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
445
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
446
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
447
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
448
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
449
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
450
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
451
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
452
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
453
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
454
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
455
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
456
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
457
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
458
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
459
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
460
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
461
+ /* unused harmony export looseEqual */
462
+ /* unused harmony export arrayEquals */
463
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
464
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
465
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
466
+ /* unused harmony export objToArray */
467
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
468
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
469
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
470
+ /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
471
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
472
+
473
+
474
+
475
+
476
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
477
+
478
+ function noop() {};
479
+
480
+ function hasOwn(obj, key) {
481
+ return hasOwnProperty.call(obj, key);
482
+ };
483
+
484
+ function extend(to, _from) {
485
+ for (var key in _from) {
486
+ to[key] = _from[key];
487
+ }
488
+ return to;
489
+ };
490
+
491
+ function toObject(arr) {
492
+ var res = {};
493
+ for (var i = 0; i < arr.length; i++) {
494
+ if (arr[i]) {
495
+ extend(res, arr[i]);
496
+ }
497
+ }
498
+ return res;
499
+ };
500
+
501
+ var getValueByPath = function getValueByPath(object, prop) {
502
+ prop = prop || '';
503
+ var paths = prop.split('.');
504
+ var current = object;
505
+ var result = null;
506
+ for (var i = 0, j = paths.length; i < j; i++) {
507
+ var path = paths[i];
508
+ if (!current) break;
509
+
510
+ if (i === j - 1) {
511
+ result = current[path];
512
+ break;
513
+ }
514
+ current = current[path];
515
+ }
516
+ return result;
517
+ };
518
+
519
+ function getPropByPath(obj, path, strict) {
520
+ var tempObj = obj;
521
+ path = path.replace(/\[(\w+)\]/g, '.$1');
522
+ path = path.replace(/^\./, '');
523
+
524
+ var keyArr = path.split('.');
525
+ var i = 0;
526
+ for (var len = keyArr.length; i < len - 1; ++i) {
527
+ if (!tempObj && !strict) break;
528
+ var key = keyArr[i];
529
+ if (key in tempObj) {
530
+ tempObj = tempObj[key];
531
+ } else {
532
+ if (strict) {
533
+ throw new Error('please transfer a valid prop path to form item!');
534
+ }
535
+ break;
536
+ }
537
+ }
538
+ return {
539
+ o: tempObj,
540
+ k: keyArr[i],
541
+ v: tempObj ? tempObj[keyArr[i]] : null
542
+ };
543
+ };
544
+
545
+ var generateId = function generateId() {
546
+ return Math.floor(Math.random() * 10000);
547
+ };
548
+
549
+ var valueEquals = function valueEquals(a, b) {
550
+ // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
551
+ if (a === b) return true;
552
+ if (!(a instanceof Array)) return false;
553
+ if (!(b instanceof Array)) return false;
554
+ if (a.length !== b.length) return false;
555
+ for (var i = 0; i !== a.length; ++i) {
556
+ if (a[i] !== b[i]) return false;
557
+ }
558
+ return true;
559
+ };
560
+
561
+ var escapeRegexpString = function escapeRegexpString() {
562
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
563
+ return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
564
+ };
565
+
566
+ // TODO: use native Array.find, Array.findIndex when IE support is dropped
567
+ var arrayFindIndex = function arrayFindIndex(arr, pred) {
568
+ for (var i = 0; i !== arr.length; ++i) {
569
+ if (pred(arr[i])) {
570
+ return i;
571
+ }
572
+ }
573
+ return -1;
574
+ };
575
+
576
+ var arrayFind = function arrayFind(arr, pred) {
577
+ var idx = arrayFindIndex(arr, pred);
578
+ return idx !== -1 ? arr[idx] : undefined;
579
+ };
580
+
581
+ // coerce truthy value to array
582
+ var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
583
+ if (Array.isArray(val)) {
584
+ return val;
585
+ } else if (val) {
586
+ return [val];
587
+ } else {
588
+ return [];
589
+ }
590
+ };
591
+
592
+ var isIE = function isIE() {
593
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
594
+ };
595
+
596
+ var isEdge = function isEdge() {
597
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
598
+ };
599
+
600
+ var isFirefox = function isFirefox() {
601
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
602
+ };
603
+
604
+ var autoprefixer = function autoprefixer(style) {
605
+ if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
606
+ var rules = ['transform', 'transition', 'animation'];
607
+ var prefixes = ['ms-', 'webkit-'];
608
+ rules.forEach(function (rule) {
609
+ var value = style[rule];
610
+ if (rule && value) {
611
+ prefixes.forEach(function (prefix) {
612
+ style[prefix + rule] = value;
613
+ });
614
+ }
615
+ });
616
+ return style;
617
+ };
618
+
619
+ var kebabCase = function kebabCase(str) {
620
+ var hyphenateRE = /([^-])([A-Z])/g;
621
+ return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
622
+ };
623
+
624
+ var capitalize = function capitalize(str) {
625
+ if (!Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
626
+ return str.charAt(0).toUpperCase() + str.slice(1);
627
+ };
628
+
629
+ var looseEqual = function looseEqual(a, b) {
630
+ var isObjectA = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
631
+ var isObjectB = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
632
+ if (isObjectA && isObjectB) {
633
+ return JSON.stringify(a) === JSON.stringify(b);
634
+ } else if (!isObjectA && !isObjectB) {
635
+ return String(a) === String(b);
636
+ } else {
637
+ return false;
638
+ }
639
+ };
640
+
641
+ var arrayEquals = function arrayEquals(arrayA, arrayB) {
642
+ arrayA = arrayA || [];
643
+ arrayB = arrayB || [];
644
+
645
+ if (arrayA.length !== arrayB.length) {
646
+ return false;
647
+ }
648
+
649
+ for (var i = 0; i < arrayA.length; i++) {
650
+ if (!looseEqual(arrayA[i], arrayB[i])) {
651
+ return false;
652
+ }
653
+ }
654
+
655
+ return true;
656
+ };
657
+
658
+ var isEqual = function isEqual(value1, value2) {
659
+ if (Array.isArray(value1) && Array.isArray(value2)) {
660
+ return arrayEquals(value1, value2);
661
+ }
662
+ return looseEqual(value1, value2);
663
+ };
664
+
665
+ var isEmpty = function isEmpty(val) {
666
+ // null or undefined
667
+ if (val == null) return true;
668
+
669
+ if (typeof val === 'boolean') return false;
670
+
671
+ if (typeof val === 'number') return !val;
672
+
673
+ if (val instanceof Error) return val.message === '';
674
+
675
+ switch (Object.prototype.toString.call(val)) {
676
+ // String or Array
677
+ case '[object String]':
678
+ case '[object Array]':
679
+ return !val.length;
680
+
681
+ // Map or Set or File
682
+ case '[object File]':
683
+ case '[object Map]':
684
+ case '[object Set]':
685
+ {
686
+ return !val.size;
687
+ }
688
+ // Plain Object
689
+ case '[object Object]':
690
+ {
691
+ return !Object.keys(val).length;
692
+ }
693
+ }
694
+
695
+ return false;
696
+ };
697
+
698
+ function rafThrottle(fn) {
699
+ var locked = false;
700
+ return function () {
701
+ var _this = this;
702
+
703
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
704
+ args[_key] = arguments[_key];
705
+ }
706
+
707
+ if (locked) return;
708
+ locked = true;
709
+ window.requestAnimationFrame(function (_) {
710
+ fn.apply(_this, args);
711
+ locked = false;
712
+ });
713
+ };
714
+ }
715
+
716
+ function objToArray(obj) {
717
+ if (Array.isArray(obj)) {
718
+ return obj;
719
+ }
720
+ return isEmpty(obj) ? [] : [obj];
721
+ }
722
+
723
+ var isMac = function isMac() {
724
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
725
+ };
726
+
727
+ /***/ }),
728
+ /* 4 */
729
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
730
+
731
+ "use strict";
732
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
733
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
734
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
735
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
736
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
737
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
738
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
739
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
740
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
741
+
742
+
743
+
744
+ function isString(obj) {
745
+ return Object.prototype.toString.call(obj) === '[object String]';
746
+ }
747
+
748
+ function isObject(obj) {
749
+ return Object.prototype.toString.call(obj) === '[object Object]';
750
+ }
751
+
752
+ function isHtmlElement(node) {
753
+ return node && node.nodeType === Node.ELEMENT_NODE;
754
+ }
755
+
756
+ /**
757
+ * - Inspired:
758
+ * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
759
+ */
760
+ var isFunction = function isFunction(functionToCheck) {
761
+ var getType = {};
762
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
763
+ };
764
+
765
+ if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
766
+ isFunction = function isFunction(obj) {
767
+ return typeof obj === 'function' || false;
768
+ };
769
+ }
770
+
771
+
772
+
773
+ var isUndefined = function isUndefined(val) {
774
+ return val === void 0;
775
+ };
776
+
777
+ var isDefined = function isDefined(val) {
778
+ return val !== undefined && val !== null;
779
+ };
780
+
781
+ /***/ }),
782
+ /* 5 */,
783
+ /* 6 */
784
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
785
+
786
+ "use strict";
787
+ function _broadcast(componentName, eventName, params) {
788
+ this.$children.forEach(function (child) {
789
+ var name = child.$options.componentName;
790
+
791
+ if (name === componentName) {
792
+ child.$emit.apply(child, [eventName].concat(params));
793
+ } else {
794
+ _broadcast.apply(child, [componentName, eventName].concat([params]));
795
+ }
796
+ });
797
+ }
798
+ /* harmony default export */ __webpack_exports__["a"] = ({
799
+ methods: {
800
+ dispatch: function dispatch(componentName, eventName, params) {
801
+ var parent = this.$parent || this.$root;
802
+ var name = parent.$options.componentName;
803
+
804
+ while (parent && (!name || name !== componentName)) {
805
+ parent = parent.$parent;
806
+
807
+ if (parent) {
808
+ name = parent.$options.componentName;
809
+ }
810
+ }
811
+ if (parent) {
812
+ parent.$emit.apply(parent, [eventName].concat(params));
813
+ }
814
+ },
815
+ broadcast: function broadcast(componentName, eventName, params) {
816
+ _broadcast.call(this, componentName, eventName, params);
817
+ }
818
+ }
819
+ });
820
+
821
+ /***/ }),
822
+ /* 7 */
823
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
824
+
825
+ "use strict";
826
+ /* harmony default export */ __webpack_exports__["a"] = (function (target) {
827
+ for (var i = 1, j = arguments.length; i < j; i++) {
828
+ var source = arguments[i] || {};
829
+ for (var prop in source) {
830
+ if (source.hasOwnProperty(prop)) {
831
+ var value = source[prop];
832
+ if (value !== undefined) {
833
+ target[prop] = value;
834
+ }
835
+ }
836
+ }
837
+ }
838
+
839
+ return target;
840
+ });;
841
+
842
+ /***/ }),
843
+ /* 8 */
844
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
845
+
846
+ "use strict";
847
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
848
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
849
+
850
+
851
+ var scrollBarWidth = void 0;
852
+
853
+ /* harmony default export */ __webpack_exports__["a"] = (function () {
854
+ if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
855
+ if (scrollBarWidth !== undefined) return scrollBarWidth;
856
+
857
+ var outer = document.createElement('div');
858
+ outer.className = 'el-scrollbar__wrap';
859
+ outer.style.visibility = 'hidden';
860
+ outer.style.width = '100px';
861
+ outer.style.position = 'absolute';
862
+ outer.style.top = '-9999px';
863
+ document.body.appendChild(outer);
864
+
865
+ var widthNoScroll = outer.offsetWidth;
866
+ outer.style.overflow = 'scroll';
867
+
868
+ var inner = document.createElement('div');
869
+ inner.style.width = '100%';
870
+ outer.appendChild(inner);
871
+
872
+ var widthWithScroll = inner.offsetWidth;
873
+ outer.parentNode.removeChild(outer);
874
+ scrollBarWidth = widthNoScroll - widthWithScroll;
875
+
876
+ return scrollBarWidth;
877
+ });;
878
+
879
+ /***/ }),
880
+ /* 9 */
881
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
882
+
883
+ "use strict";
884
+
885
+ // EXPORTS
886
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
887
+
888
+ // EXTERNAL MODULE: external "vue"
889
+ var external_vue_ = __webpack_require__(0);
890
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
891
+
892
+ // EXTERNAL MODULE: ./src/utils/merge.js
893
+ var merge = __webpack_require__(7);
894
+
895
+ // EXTERNAL MODULE: ./src/utils/dom.js
896
+ var utils_dom = __webpack_require__(1);
897
+
898
+ // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
899
+
900
+
901
+
902
+ var hasModal = false;
903
+ var hasInitZIndex = false;
904
+ var popup_manager_zIndex = void 0;
905
+
906
+ var popup_manager_getModal = function getModal() {
907
+ if (external_vue_default.a.prototype.$isServer) return;
908
+ var modalDom = PopupManager.modalDom;
909
+ if (modalDom) {
910
+ hasModal = true;
911
+ } else {
912
+ hasModal = false;
913
+ modalDom = document.createElement('div');
914
+ PopupManager.modalDom = modalDom;
915
+
916
+ modalDom.addEventListener('touchmove', function (event) {
917
+ event.preventDefault();
918
+ event.stopPropagation();
919
+ });
920
+
921
+ modalDom.addEventListener('click', function () {
922
+ PopupManager.doOnModalClick && PopupManager.doOnModalClick();
923
+ });
924
+ }
925
+
926
+ return modalDom;
927
+ };
928
+
929
+ var instances = {};
930
+
931
+ var PopupManager = {
932
+ modalFade: true,
933
+
934
+ getInstance: function getInstance(id) {
935
+ return instances[id];
936
+ },
937
+
938
+ register: function register(id, instance) {
939
+ if (id && instance) {
940
+ instances[id] = instance;
941
+ }
942
+ },
943
+
944
+ deregister: function deregister(id) {
945
+ if (id) {
946
+ instances[id] = null;
947
+ delete instances[id];
948
+ }
949
+ },
950
+
951
+ nextZIndex: function nextZIndex() {
952
+ return PopupManager.zIndex++;
953
+ },
954
+
955
+ modalStack: [],
956
+
957
+ doOnModalClick: function doOnModalClick() {
958
+ var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
959
+ if (!topItem) return;
960
+
961
+ var instance = PopupManager.getInstance(topItem.id);
962
+ if (instance && instance.closeOnClickModal) {
963
+ instance.close();
964
+ }
965
+ },
966
+
967
+ openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
968
+ if (external_vue_default.a.prototype.$isServer) return;
969
+ if (!id || zIndex === undefined) return;
970
+ this.modalFade = modalFade;
971
+
972
+ var modalStack = this.modalStack;
973
+
974
+ for (var i = 0, j = modalStack.length; i < j; i++) {
975
+ var item = modalStack[i];
976
+ if (item.id === id) {
977
+ return;
978
+ }
979
+ }
980
+
981
+ var modalDom = popup_manager_getModal();
982
+
983
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
984
+ if (this.modalFade && !hasModal) {
985
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
986
+ }
987
+ if (modalClass) {
988
+ var classArr = modalClass.trim().split(/\s+/);
989
+ classArr.forEach(function (item) {
990
+ return Object(utils_dom["a" /* addClass */])(modalDom, item);
991
+ });
992
+ }
993
+ setTimeout(function () {
994
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
995
+ }, 200);
996
+
997
+ if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
998
+ dom.parentNode.appendChild(modalDom);
999
+ } else {
1000
+ document.body.appendChild(modalDom);
1001
+ }
1002
+
1003
+ if (zIndex) {
1004
+ modalDom.style.zIndex = zIndex;
1005
+ }
1006
+ modalDom.tabIndex = 0;
1007
+ modalDom.style.display = '';
1008
+
1009
+ this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
1010
+ },
1011
+
1012
+ closeModal: function closeModal(id) {
1013
+ var modalStack = this.modalStack;
1014
+ var modalDom = popup_manager_getModal();
1015
+
1016
+ if (modalStack.length > 0) {
1017
+ var topItem = modalStack[modalStack.length - 1];
1018
+ if (topItem.id === id) {
1019
+ if (topItem.modalClass) {
1020
+ var classArr = topItem.modalClass.trim().split(/\s+/);
1021
+ classArr.forEach(function (item) {
1022
+ return Object(utils_dom["i" /* removeClass */])(modalDom, item);
1023
+ });
1024
+ }
1025
+
1026
+ modalStack.pop();
1027
+ if (modalStack.length > 0) {
1028
+ modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
1029
+ }
1030
+ } else {
1031
+ for (var i = modalStack.length - 1; i >= 0; i--) {
1032
+ if (modalStack[i].id === id) {
1033
+ modalStack.splice(i, 1);
1034
+ break;
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+
1040
+ if (modalStack.length === 0) {
1041
+ if (this.modalFade) {
1042
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
1043
+ }
1044
+ setTimeout(function () {
1045
+ if (modalStack.length === 0) {
1046
+ if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
1047
+ modalDom.style.display = 'none';
1048
+ PopupManager.modalDom = undefined;
1049
+ }
1050
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
1051
+ }, 200);
1052
+ }
1053
+ }
1054
+ };
1055
+
1056
+ Object.defineProperty(PopupManager, 'zIndex', {
1057
+ configurable: true,
1058
+ get: function get() {
1059
+ if (!hasInitZIndex) {
1060
+ popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
1061
+ hasInitZIndex = true;
1062
+ }
1063
+ return popup_manager_zIndex;
1064
+ },
1065
+ set: function set(value) {
1066
+ popup_manager_zIndex = value;
1067
+ }
1068
+ });
1069
+
1070
+ var popup_manager_getTopPopup = function getTopPopup() {
1071
+ if (external_vue_default.a.prototype.$isServer) return;
1072
+ if (PopupManager.modalStack.length > 0) {
1073
+ var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1074
+ if (!topPopup) return;
1075
+ var instance = PopupManager.getInstance(topPopup.id);
1076
+
1077
+ return instance;
1078
+ }
1079
+ };
1080
+
1081
+ if (!external_vue_default.a.prototype.$isServer) {
1082
+ // handle `esc` key when the popup is shown
1083
+ window.addEventListener('keydown', function (event) {
1084
+ if (event.keyCode === 27) {
1085
+ var topPopup = popup_manager_getTopPopup();
1086
+
1087
+ if (topPopup && topPopup.closeOnPressEscape) {
1088
+ topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
1089
+ }
1090
+ }
1091
+ });
1092
+ }
1093
+
1094
+ /* harmony default export */ var popup_manager = (PopupManager);
1095
+ // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
1096
+ var scrollbar_width = __webpack_require__(8);
1097
+
1098
+ // CONCATENATED MODULE: ./src/utils/popup/index.js
1099
+
1100
+
1101
+
1102
+
1103
+
1104
+
1105
+ var idSeed = 1;
1106
+
1107
+ var scrollBarWidth = void 0;
1108
+
1109
+ /* harmony default export */ var popup = __webpack_exports__["b"] = ({
1110
+ props: {
1111
+ visible: {
1112
+ type: Boolean,
1113
+ default: false
1114
+ },
1115
+ openDelay: {},
1116
+ closeDelay: {},
1117
+ zIndex: {},
1118
+ modal: {
1119
+ type: Boolean,
1120
+ default: false
1121
+ },
1122
+ modalFade: {
1123
+ type: Boolean,
1124
+ default: true
1125
+ },
1126
+ modalClass: {},
1127
+ modalAppendToBody: {
1128
+ type: Boolean,
1129
+ default: false
1130
+ },
1131
+ lockScroll: {
1132
+ type: Boolean,
1133
+ default: true
1134
+ },
1135
+ closeOnPressEscape: {
1136
+ type: Boolean,
1137
+ default: false
1138
+ },
1139
+ closeOnClickModal: {
1140
+ type: Boolean,
1141
+ default: false
1142
+ }
1143
+ },
1144
+
1145
+ beforeMount: function beforeMount() {
1146
+ this._popupId = 'popup-' + idSeed++;
1147
+ popup_manager.register(this._popupId, this);
1148
+ },
1149
+ beforeDestroy: function beforeDestroy() {
1150
+ popup_manager.deregister(this._popupId);
1151
+ popup_manager.closeModal(this._popupId);
1152
+
1153
+ this.restoreBodyStyle();
1154
+ },
1155
+ data: function data() {
1156
+ return {
1157
+ opened: false,
1158
+ bodyPaddingRight: null,
1159
+ computedBodyPaddingRight: 0,
1160
+ withoutHiddenClass: true,
1161
+ rendered: false
1162
+ };
1163
+ },
1164
+
1165
+
1166
+ watch: {
1167
+ visible: function visible(val) {
1168
+ var _this = this;
1169
+
1170
+ if (val) {
1171
+ if (this._opening) return;
1172
+ if (!this.rendered) {
1173
+ this.rendered = true;
1174
+ external_vue_default.a.nextTick(function () {
1175
+ _this.open();
1176
+ });
1177
+ } else {
1178
+ this.open();
1179
+ }
1180
+ } else {
1181
+ this.close();
1182
+ }
1183
+ }
1184
+ },
1185
+
1186
+ methods: {
1187
+ open: function open(options) {
1188
+ var _this2 = this;
1189
+
1190
+ if (!this.rendered) {
1191
+ this.rendered = true;
1192
+ }
1193
+
1194
+ var props = Object(merge["a" /* default */])({}, this.$props || this, options);
1195
+
1196
+ if (this._closeTimer) {
1197
+ clearTimeout(this._closeTimer);
1198
+ this._closeTimer = null;
1199
+ }
1200
+ clearTimeout(this._openTimer);
1201
+
1202
+ var openDelay = Number(props.openDelay);
1203
+ if (openDelay > 0) {
1204
+ this._openTimer = setTimeout(function () {
1205
+ _this2._openTimer = null;
1206
+ _this2.doOpen(props);
1207
+ }, openDelay);
1208
+ } else {
1209
+ this.doOpen(props);
1210
+ }
1211
+ },
1212
+ doOpen: function doOpen(props) {
1213
+ if (this.$isServer) return;
1214
+ if (this.willOpen && !this.willOpen()) return;
1215
+ if (this.opened) return;
1216
+
1217
+ this._opening = true;
1218
+
1219
+ var dom = this.$el;
1220
+
1221
+ var modal = props.modal;
1222
+
1223
+ var zIndex = props.zIndex;
1224
+ if (zIndex) {
1225
+ popup_manager.zIndex = zIndex;
1226
+ }
1227
+
1228
+ if (modal) {
1229
+ if (this._closing) {
1230
+ popup_manager.closeModal(this._popupId);
1231
+ this._closing = false;
1232
+ }
1233
+ popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
1234
+ if (props.lockScroll) {
1235
+ this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
1236
+ if (this.withoutHiddenClass) {
1237
+ this.bodyPaddingRight = document.body.style.paddingRight;
1238
+ this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
1239
+ }
1240
+ scrollBarWidth = Object(scrollbar_width["a" /* default */])();
1241
+ var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
1242
+ var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
1243
+ if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
1244
+ document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
1245
+ }
1246
+ Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
1247
+ }
1248
+ }
1249
+
1250
+ if (getComputedStyle(dom).position === 'static') {
1251
+ dom.style.position = 'absolute';
1252
+ }
1253
+
1254
+ dom.style.zIndex = popup_manager.nextZIndex();
1255
+ this.opened = true;
1256
+
1257
+ this.onOpen && this.onOpen();
1258
+
1259
+ this.doAfterOpen();
1260
+ },
1261
+ doAfterOpen: function doAfterOpen() {
1262
+ this._opening = false;
1263
+ },
1264
+ close: function close() {
1265
+ var _this3 = this;
1266
+
1267
+ if (this.willClose && !this.willClose()) return;
1268
+
1269
+ if (this._openTimer !== null) {
1270
+ clearTimeout(this._openTimer);
1271
+ this._openTimer = null;
1272
+ }
1273
+ clearTimeout(this._closeTimer);
1274
+
1275
+ var closeDelay = Number(this.closeDelay);
1276
+
1277
+ if (closeDelay > 0) {
1278
+ this._closeTimer = setTimeout(function () {
1279
+ _this3._closeTimer = null;
1280
+ _this3.doClose();
1281
+ }, closeDelay);
1282
+ } else {
1283
+ this.doClose();
1284
+ }
1285
+ },
1286
+ doClose: function doClose() {
1287
+ this._closing = true;
1288
+
1289
+ this.onClose && this.onClose();
1290
+
1291
+ if (this.lockScroll) {
1292
+ setTimeout(this.restoreBodyStyle, 200);
1293
+ }
1294
+
1295
+ this.opened = false;
1296
+
1297
+ this.doAfterClose();
1298
+ },
1299
+ doAfterClose: function doAfterClose() {
1300
+ popup_manager.closeModal(this._popupId);
1301
+ this._closing = false;
1302
+ },
1303
+ restoreBodyStyle: function restoreBodyStyle() {
1304
+ if (this.modal && this.withoutHiddenClass) {
1305
+ document.body.style.paddingRight = this.bodyPaddingRight;
1306
+ Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
1307
+ }
1308
+ this.withoutHiddenClass = true;
1309
+ }
1310
+ }
1311
+ });
1312
+
1313
+
1314
+
1315
+ /***/ }),
1316
+ /* 10 */
1317
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1318
+
1319
+ "use strict";
1320
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1321
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1322
+ /* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
1323
+
1324
+
1325
+
1326
+ var PopperJS = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer ? function () {} : __webpack_require__(23);
1327
+ var stop = function stop(e) {
1328
+ return e.stopPropagation();
1329
+ };
1330
+
1331
+ /**
1332
+ * @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
1333
+ * @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
1334
+ * @param {String} [placement=button] - Placement of the popper accepted values: top(-start, -end), right(-start, -end), bottom(-start, -end), left(-start, -end)
1335
+ * @param {Number} [offset=0] - Amount of pixels the popper will be shifted (can be negative).
1336
+ * @param {Boolean} [visible=false] Visibility of the popup element.
1337
+ * @param {Boolean} [visible-arrow=false] Visibility of the arrow, no style.
1338
+ */
1339
+ /* harmony default export */ __webpack_exports__["a"] = ({
1340
+ props: {
1341
+ transformOrigin: {
1342
+ type: [Boolean, String],
1343
+ default: true
1344
+ },
1345
+ placement: {
1346
+ type: String,
1347
+ default: 'bottom'
1348
+ },
1349
+ boundariesPadding: {
1350
+ type: Number,
1351
+ default: 5
1352
+ },
1353
+ reference: {},
1354
+ popper: {},
1355
+ offset: {
1356
+ default: 0
1357
+ },
1358
+ value: Boolean,
1359
+ visibleArrow: Boolean,
1360
+ arrowOffset: {
1361
+ type: Number,
1362
+ default: 35
1363
+ },
1364
+ appendToBody: {
1365
+ type: Boolean,
1366
+ default: true
1367
+ },
1368
+ popperOptions: {
1369
+ type: Object,
1370
+ default: function _default() {
1371
+ return {
1372
+ gpuAcceleration: false
1373
+ };
1374
+ }
1375
+ }
1376
+ },
1377
+
1378
+ data: function data() {
1379
+ return {
1380
+ showPopper: false,
1381
+ currentPlacement: ''
1382
+ };
1383
+ },
1384
+
1385
+
1386
+ watch: {
1387
+ value: {
1388
+ immediate: true,
1389
+ handler: function handler(val) {
1390
+ this.showPopper = val;
1391
+ this.$emit('input', val);
1392
+ }
1393
+ },
1394
+
1395
+ showPopper: function showPopper(val) {
1396
+ if (this.disabled) return;
1397
+ val ? this.updatePopper() : this.destroyPopper();
1398
+ this.$emit('input', val);
1399
+ }
1400
+ },
1401
+
1402
+ methods: {
1403
+ createPopper: function createPopper() {
1404
+ var _this = this;
1405
+
1406
+ if (this.$isServer) return;
1407
+ this.currentPlacement = this.currentPlacement || this.placement;
1408
+ if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
1409
+ return;
1410
+ }
1411
+
1412
+ var options = this.popperOptions;
1413
+ var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
1414
+ var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
1415
+
1416
+ if (!reference && this.$slots.reference && this.$slots.reference[0]) {
1417
+ reference = this.referenceElm = this.$slots.reference[0].elm;
1418
+ }
1419
+
1420
+ if (!popper || !reference) return;
1421
+ if (this.visibleArrow) this.appendArrow(popper);
1422
+ if (this.appendToBody) document.body.appendChild(this.popperElm);
1423
+ if (this.popperJS && this.popperJS.destroy) {
1424
+ this.popperJS.destroy();
1425
+ }
1426
+
1427
+ options.placement = this.currentPlacement;
1428
+ options.offset = this.offset;
1429
+ options.arrowOffset = this.arrowOffset;
1430
+ this.popperJS = new PopperJS(reference, popper, options);
1431
+ this.popperJS.onCreate(function (_) {
1432
+ _this.$emit('created', _this);
1433
+ _this.resetTransformOrigin();
1434
+ _this.$nextTick(_this.updatePopper);
1435
+ });
1436
+ if (typeof options.onUpdate === 'function') {
1437
+ this.popperJS.onUpdate(options.onUpdate);
1438
+ }
1439
+ this.popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].nextZIndex();
1440
+ this.popperElm.addEventListener('click', stop);
1441
+ },
1442
+ updatePopper: function updatePopper() {
1443
+ var popperJS = this.popperJS;
1444
+ if (popperJS) {
1445
+ popperJS.update();
1446
+ if (popperJS._popper) {
1447
+ popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].nextZIndex();
1448
+ }
1449
+ } else {
1450
+ this.createPopper();
1451
+ }
1452
+ },
1453
+ doDestroy: function doDestroy(forceDestroy) {
1454
+ /* istanbul ignore if */
1455
+ if (!this.popperJS || this.showPopper && !forceDestroy) return;
1456
+ this.popperJS.destroy();
1457
+ this.popperJS = null;
1458
+ },
1459
+ destroyPopper: function destroyPopper() {
1460
+ if (this.popperJS) {
1461
+ this.resetTransformOrigin();
1462
+ }
1463
+ },
1464
+ resetTransformOrigin: function resetTransformOrigin() {
1465
+ if (!this.transformOrigin) return;
1466
+ var placementMap = {
1467
+ top: 'bottom',
1468
+ bottom: 'top',
1469
+ left: 'right',
1470
+ right: 'left'
1471
+ };
1472
+ var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];
1473
+ var origin = placementMap[placement];
1474
+ this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? 'center ' + origin : origin + ' center';
1475
+ },
1476
+ appendArrow: function appendArrow(element) {
1477
+ var hash = void 0;
1478
+ if (this.appended) {
1479
+ return;
1480
+ }
1481
+
1482
+ this.appended = true;
1483
+
1484
+ for (var item in element.attributes) {
1485
+ if (/^_v-/.test(element.attributes[item].name)) {
1486
+ hash = element.attributes[item].name;
1487
+ break;
1488
+ }
1489
+ }
1490
+
1491
+ var arrow = document.createElement('div');
1492
+
1493
+ if (hash) {
1494
+ arrow.setAttribute(hash, '');
1495
+ }
1496
+ arrow.setAttribute('x-arrow', '');
1497
+ arrow.className = 'popper__arrow';
1498
+ element.appendChild(arrow);
1499
+ }
1500
+ },
1501
+
1502
+ beforeDestroy: function beforeDestroy() {
1503
+ this.doDestroy(true);
1504
+ if (this.popperElm && this.popperElm.parentNode === document.body) {
1505
+ this.popperElm.removeEventListener('click', stop);
1506
+ document.body.removeChild(this.popperElm);
1507
+ }
1508
+ },
1509
+
1510
+
1511
+ // call destroy in keep-alive mode
1512
+ deactivated: function deactivated() {
1513
+ this.$options.beforeDestroy[0].call(this);
1514
+ }
1515
+ });
1516
+
1517
+ /***/ }),
1518
+ /* 11 */
1519
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1520
+
1521
+ "use strict";
1522
+
1523
+ // EXPORTS
1524
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ t; });
1525
+
1526
+ // UNUSED EXPORTS: use, i18n
1527
+
1528
+ // CONCATENATED MODULE: ./src/locale/lang/zh-CN.js
1529
+ /* harmony default export */ var zh_CN = ({
1530
+ el: {
1531
+ colorpicker: {
1532
+ confirm: '确定',
1533
+ clear: '清空'
1534
+ },
1535
+ datepicker: {
1536
+ now: '此刻',
1537
+ today: '今天',
1538
+ cancel: '取消',
1539
+ clear: '清空',
1540
+ confirm: '确定',
1541
+ selectDate: '选择日期',
1542
+ selectTime: '选择时间',
1543
+ startDate: '开始日期',
1544
+ startTime: '开始时间',
1545
+ endDate: '结束日期',
1546
+ endTime: '结束时间',
1547
+ prevYear: '前一年',
1548
+ nextYear: '后一年',
1549
+ prevMonth: '上个月',
1550
+ nextMonth: '下个月',
1551
+ year: '年',
1552
+ month1: '1 月',
1553
+ month2: '2 月',
1554
+ month3: '3 月',
1555
+ month4: '4 月',
1556
+ month5: '5 月',
1557
+ month6: '6 月',
1558
+ month7: '7 月',
1559
+ month8: '8 月',
1560
+ month9: '9 月',
1561
+ month10: '10 月',
1562
+ month11: '11 月',
1563
+ month12: '12 月',
1564
+ // week: '周次',
1565
+ weeks: {
1566
+ sun: '日',
1567
+ mon: '一',
1568
+ tue: '二',
1569
+ wed: '三',
1570
+ thu: '四',
1571
+ fri: '五',
1572
+ sat: '六'
1573
+ },
1574
+ months: {
1575
+ jan: '一月',
1576
+ feb: '二月',
1577
+ mar: '三月',
1578
+ apr: '四月',
1579
+ may: '五月',
1580
+ jun: '六月',
1581
+ jul: '七月',
1582
+ aug: '八月',
1583
+ sep: '九月',
1584
+ oct: '十月',
1585
+ nov: '十一月',
1586
+ dec: '十二月'
1587
+ }
1588
+ },
1589
+ select: {
1590
+ loading: '加载中',
1591
+ noMatch: '无匹配数据',
1592
+ noData: '无数据',
1593
+ placeholder: '请选择'
1594
+ },
1595
+ cascader: {
1596
+ noMatch: '无匹配数据',
1597
+ loading: '加载中',
1598
+ placeholder: '请选择',
1599
+ noData: '暂无数据'
1600
+ },
1601
+ pagination: {
1602
+ goto: '前往',
1603
+ pagesize: '条/页',
1604
+ total: '共 {total} 条',
1605
+ pageClassifier: '页'
1606
+ },
1607
+ messagebox: {
1608
+ title: '提示',
1609
+ confirm: '确定',
1610
+ cancel: '取消',
1611
+ error: '输入的数据不合法!'
1612
+ },
1613
+ upload: {
1614
+ deleteTip: '按 delete 键可删除',
1615
+ delete: '删除',
1616
+ preview: '查看图片',
1617
+ continue: '继续上传'
1618
+ },
1619
+ table: {
1620
+ emptyText: '暂无数据',
1621
+ confirmFilter: '筛选',
1622
+ resetFilter: '重置',
1623
+ clearFilter: '全部',
1624
+ sumText: '合计'
1625
+ },
1626
+ tree: {
1627
+ emptyText: '暂无数据'
1628
+ },
1629
+ transfer: {
1630
+ noMatch: '无匹配数据',
1631
+ noData: '无数据',
1632
+ titles: ['列表 1', '列表 2'],
1633
+ filterPlaceholder: '请输入搜索内容',
1634
+ noCheckedFormat: '共 {total} 项',
1635
+ hasCheckedFormat: '已选 {checked}/{total} 项'
1636
+ },
1637
+ image: {
1638
+ error: '加载失败'
1639
+ },
1640
+ pageHeader: {
1641
+ title: '返回'
1642
+ },
1643
+ popconfirm: {
1644
+ confirmButtonText: '确定',
1645
+ cancelButtonText: '取消'
1646
+ },
1647
+ empty: {
1648
+ description: '暂无数据'
1649
+ }
1650
+ }
1651
+ });
1652
+ // EXTERNAL MODULE: external "vue"
1653
+ var external_vue_ = __webpack_require__(0);
1654
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
1655
+
1656
+ // EXTERNAL MODULE: external "deepmerge"
1657
+ var external_deepmerge_ = __webpack_require__(15);
1658
+ var external_deepmerge_default = /*#__PURE__*/__webpack_require__.n(external_deepmerge_);
1659
+
1660
+ // EXTERNAL MODULE: ./src/utils/util.js
1661
+ var util = __webpack_require__(3);
1662
+
1663
+ // CONCATENATED MODULE: ./src/locale/format.js
1664
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1665
+
1666
+
1667
+
1668
+ var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
1669
+ /**
1670
+ * String format template
1671
+ * - Inspired:
1672
+ * https://github.com/Matt-Esch/string-template/index.js
1673
+ */
1674
+ /* harmony default export */ var format = (function (Vue) {
1675
+ /**
1676
+ * template
1677
+ *
1678
+ * @param {String} string
1679
+ * @param {Array} ...args
1680
+ * @return {String}
1681
+ */
1682
+
1683
+ function template(string) {
1684
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1685
+ args[_key - 1] = arguments[_key];
1686
+ }
1687
+
1688
+ if (args.length === 1 && _typeof(args[0]) === 'object') {
1689
+ args = args[0];
1690
+ }
1691
+
1692
+ if (!args || !args.hasOwnProperty) {
1693
+ args = {};
1694
+ }
1695
+
1696
+ return string.replace(RE_NARGS, function (match, prefix, i, index) {
1697
+ var result = void 0;
1698
+
1699
+ if (string[index - 1] === '{' && string[index + match.length] === '}') {
1700
+ return i;
1701
+ } else {
1702
+ result = Object(util["j" /* hasOwn */])(args, i) ? args[i] : null;
1703
+ if (result === null || result === undefined) {
1704
+ return '';
1705
+ }
1706
+
1707
+ return result;
1708
+ }
1709
+ });
1710
+ }
1711
+
1712
+ return template;
1713
+ });
1714
+ // CONCATENATED MODULE: ./src/locale/index.js
1715
+
1716
+
1717
+
1718
+
1719
+
1720
+ var locale_format = format(external_vue_default.a);
1721
+ var lang = zh_CN;
1722
+ var merged = false;
1723
+ var locale_i18nHandler = function i18nHandler() {
1724
+ var vuei18n = Object.getPrototypeOf(this || external_vue_default.a).$t;
1725
+ if (typeof vuei18n === 'function' && !!external_vue_default.a.locale) {
1726
+ if (!merged) {
1727
+ merged = true;
1728
+ external_vue_default.a.locale(external_vue_default.a.config.lang, external_deepmerge_default()(lang, external_vue_default.a.locale(external_vue_default.a.config.lang) || {}, { clone: true }));
1729
+ }
1730
+ return vuei18n.apply(this, arguments);
1731
+ }
1732
+ };
1733
+
1734
+ var t = function t(path, options) {
1735
+ var value = locale_i18nHandler.apply(this, arguments);
1736
+ if (value !== null && value !== undefined) return value;
1737
+
1738
+ var array = path.split('.');
1739
+ var current = lang;
1740
+
1741
+ for (var i = 0, j = array.length; i < j; i++) {
1742
+ var property = array[i];
1743
+ value = current[property];
1744
+ if (i === j - 1) return locale_format(value, options);
1745
+ if (!value) return '';
1746
+ current = value;
1747
+ }
1748
+ return '';
1749
+ };
1750
+
1751
+ var use = function use(l) {
1752
+ lang = l || lang;
1753
+ };
1754
+
1755
+ var i18n = function i18n(fn) {
1756
+ locale_i18nHandler = fn || locale_i18nHandler;
1757
+ };
1758
+
1759
+ /* harmony default export */ var locale = ({ use: use, t: t, i18n: i18n });
1760
+
1761
+ /***/ }),
1762
+ /* 12 */
1763
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1764
+
1765
+ "use strict";
1766
+ /* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
1767
+
1768
+ /**
1769
+ * Show migrating guide in browser console.
1770
+ *
1771
+ * Usage:
1772
+ * import Migrating from 'element-ui/src/mixins/migrating';
1773
+ *
1774
+ * mixins: [Migrating]
1775
+ *
1776
+ * add getMigratingConfig method for your component.
1777
+ * getMigratingConfig() {
1778
+ * return {
1779
+ * props: {
1780
+ * 'allow-no-selection': 'allow-no-selection is removed.',
1781
+ * 'selection-mode': 'selection-mode is removed.'
1782
+ * },
1783
+ * events: {
1784
+ * selectionchange: 'selectionchange is renamed to selection-change.'
1785
+ * }
1786
+ * };
1787
+ * },
1788
+ */
1789
+ /* harmony default export */ __webpack_exports__["a"] = ({
1790
+ mounted: function mounted() {
1791
+ if (true) return;
1792
+ if (!this.$vnode) return;
1793
+
1794
+ var _getMigratingConfig = this.getMigratingConfig(),
1795
+ _getMigratingConfig$p = _getMigratingConfig.props,
1796
+ props = _getMigratingConfig$p === undefined ? {} : _getMigratingConfig$p,
1797
+ _getMigratingConfig$e = _getMigratingConfig.events,
1798
+ events = _getMigratingConfig$e === undefined ? {} : _getMigratingConfig$e;
1799
+
1800
+ var _$vnode = this.$vnode,
1801
+ data = _$vnode.data,
1802
+ componentOptions = _$vnode.componentOptions;
1803
+
1804
+ var definedProps = data.attrs || {};
1805
+ var definedEvents = componentOptions.listeners || {};
1806
+
1807
+ for (var propName in definedProps) {
1808
+ propName = Object(_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(propName); // compatible with camel case
1809
+ if (props[propName]) {
1810
+ console.warn('[Element Migrating][' + this.$options.name + '][Attribute]: ' + props[propName]);
1811
+ }
1812
+ }
1813
+
1814
+ for (var eventName in definedEvents) {
1815
+ eventName = Object(_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(eventName); // compatible with camel case
1816
+ if (events[eventName]) {
1817
+ console.warn('[Element Migrating][' + this.$options.name + '][Event]: ' + events[eventName]);
1818
+ }
1819
+ }
1820
+ },
1821
+
1822
+ methods: {
1823
+ getMigratingConfig: function getMigratingConfig() {
1824
+ return {
1825
+ props: {},
1826
+ events: {}
1827
+ };
1828
+ }
1829
+ }
1830
+ });
1831
+
1832
+ /***/ }),
1833
+ /* 13 */
1834
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1835
+
1836
+ "use strict";
1837
+ /* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
1838
+
1839
+
1840
+ /* harmony default export */ __webpack_exports__["a"] = ({
1841
+ methods: {
1842
+ t: function t() {
1843
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1844
+ args[_key] = arguments[_key];
1845
+ }
1846
+
1847
+ return _locale__WEBPACK_IMPORTED_MODULE_0__[/* t */ "a"].apply(this, args);
1848
+ }
1849
+ }
1850
+ });
1851
+
1852
+ /***/ }),
1853
+ /* 14 */
1854
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1855
+
1856
+ "use strict";
1857
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addResizeListener; });
1858
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return removeResizeListener; });
1859
+ /* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
1860
+ /* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0__);
1861
+ /* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19);
1862
+ /* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(throttle_debounce__WEBPACK_IMPORTED_MODULE_1__);
1863
+
1864
+
1865
+
1866
+ var isServer = typeof window === 'undefined';
1867
+
1868
+ /* istanbul ignore next */
1869
+ var resizeHandler = function resizeHandler(entries) {
1870
+ for (var _iterator = entries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
1871
+ var _ref;
1872
+
1873
+ if (_isArray) {
1874
+ if (_i >= _iterator.length) break;
1875
+ _ref = _iterator[_i++];
1876
+ } else {
1877
+ _i = _iterator.next();
1878
+ if (_i.done) break;
1879
+ _ref = _i.value;
1880
+ }
1881
+
1882
+ var entry = _ref;
1883
+
1884
+ var listeners = entry.target.__resizeListeners__ || [];
1885
+ if (listeners.length) {
1886
+ listeners.forEach(function (fn) {
1887
+ fn();
1888
+ });
1889
+ }
1890
+ }
1891
+ };
1892
+
1893
+ /* istanbul ignore next */
1894
+ var addResizeListener = function addResizeListener(element, fn) {
1895
+ if (isServer) return;
1896
+ if (!element.__resizeListeners__) {
1897
+ element.__resizeListeners__ = [];
1898
+ element.__ro__ = new resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0___default.a(Object(throttle_debounce__WEBPACK_IMPORTED_MODULE_1__["debounce"])(16, resizeHandler));
1899
+ element.__ro__.observe(element);
1900
+ }
1901
+ element.__resizeListeners__.push(fn);
1902
+ };
1903
+
1904
+ /* istanbul ignore next */
1905
+ var removeResizeListener = function removeResizeListener(element, fn) {
1906
+ if (!element || !element.__resizeListeners__) return;
1907
+ element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
1908
+ if (!element.__resizeListeners__.length) {
1909
+ element.__ro__.disconnect();
1910
+ }
1911
+ };
1912
+
1913
+ /***/ }),
1914
+ /* 15 */
1915
+ /***/ (function(module, exports) {
1916
+
1917
+ module.exports = require("deepmerge");
1918
+
1919
+ /***/ }),
1920
+ /* 16 */
1921
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1922
+
1923
+ "use strict";
1924
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDef; });
1925
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isKorean; });
1926
+ function isDef(val) {
1927
+ return val !== undefined && val !== null;
1928
+ }
1929
+ function isKorean(text) {
1930
+ var reg = /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi;
1931
+ return reg.test(text);
1932
+ }
1933
+
1934
+ /***/ }),
1935
+ /* 17 */,
1936
+ /* 18 */
1937
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1938
+
1939
+ "use strict";
1940
+ // ESM COMPAT FLAG
1941
+ __webpack_require__.r(__webpack_exports__);
1942
+
1943
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=af7512c8
1944
+ var render = function render() {
1945
+ var _vm = this,
1946
+ _c = _vm._self._c
1947
+ return _c(
1948
+ "div",
1949
+ {
1950
+ class: [
1951
+ _vm.type === "textarea" ? "el-textarea" : "el-input",
1952
+ _vm.inputSize ? "el-input--" + _vm.inputSize : "",
1953
+ {
1954
+ "is-disabled": _vm.inputDisabled,
1955
+ "is-exceed": _vm.inputExceed,
1956
+ "el-input-group": _vm.$slots.prepend || _vm.$slots.append,
1957
+ "el-input-group--append": _vm.$slots.append,
1958
+ "el-input-group--prepend": _vm.$slots.prepend,
1959
+ "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
1960
+ "el-input--suffix":
1961
+ _vm.$slots.suffix ||
1962
+ _vm.suffixIcon ||
1963
+ _vm.clearable ||
1964
+ _vm.showPassword,
1965
+ },
1966
+ ],
1967
+ on: {
1968
+ mouseenter: function ($event) {
1969
+ _vm.hovering = true
1970
+ },
1971
+ mouseleave: function ($event) {
1972
+ _vm.hovering = false
1973
+ },
1974
+ },
1975
+ },
1976
+ [
1977
+ _vm.type !== "textarea"
1978
+ ? [
1979
+ _vm.$slots.prepend
1980
+ ? _c(
1981
+ "div",
1982
+ { staticClass: "el-input-group__prepend" },
1983
+ [_vm._t("prepend")],
1984
+ 2
1985
+ )
1986
+ : _vm._e(),
1987
+ _vm.type !== "textarea"
1988
+ ? _c(
1989
+ "input",
1990
+ _vm._b(
1991
+ {
1992
+ ref: "input",
1993
+ staticClass: "el-input__inner",
1994
+ attrs: {
1995
+ tabindex: _vm.tabindex,
1996
+ type: _vm.showPassword
1997
+ ? _vm.passwordVisible
1998
+ ? "text"
1999
+ : "password"
2000
+ : _vm.type,
2001
+ disabled: _vm.inputDisabled,
2002
+ readonly: _vm.readonly,
2003
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
2004
+ "aria-label": _vm.label,
2005
+ },
2006
+ on: {
2007
+ compositionstart: _vm.handleCompositionStart,
2008
+ compositionupdate: _vm.handleCompositionUpdate,
2009
+ compositionend: _vm.handleCompositionEnd,
2010
+ input: _vm.handleInput,
2011
+ focus: _vm.handleFocus,
2012
+ blur: _vm.handleBlur,
2013
+ change: _vm.handleChange,
2014
+ },
2015
+ },
2016
+ "input",
2017
+ _vm.$attrs,
2018
+ false
2019
+ )
2020
+ )
2021
+ : _vm._e(),
2022
+ _vm.$slots.prefix || _vm.prefixIcon
2023
+ ? _c(
2024
+ "span",
2025
+ { staticClass: "el-input__prefix" },
2026
+ [
2027
+ _vm._t("prefix"),
2028
+ _vm.prefixIcon
2029
+ ? _c("i", {
2030
+ staticClass: "el-input__icon",
2031
+ class: _vm.prefixIcon,
2032
+ })
2033
+ : _vm._e(),
2034
+ ],
2035
+ 2
2036
+ )
2037
+ : _vm._e(),
2038
+ _vm.getSuffixVisible()
2039
+ ? _c("span", { staticClass: "el-input__suffix" }, [
2040
+ _c(
2041
+ "span",
2042
+ { staticClass: "el-input__suffix-inner" },
2043
+ [
2044
+ !_vm.showClear ||
2045
+ !_vm.showPwdVisible ||
2046
+ !_vm.isWordLimitVisible
2047
+ ? [
2048
+ _vm._t("suffix"),
2049
+ _vm.suffixIcon
2050
+ ? _c("i", {
2051
+ staticClass: "el-input__icon",
2052
+ class: _vm.suffixIcon,
2053
+ })
2054
+ : _vm._e(),
2055
+ ]
2056
+ : _vm._e(),
2057
+ _vm.showClear
2058
+ ? _c("i", {
2059
+ staticClass:
2060
+ "el-input__icon el-icon-circle-close el-input__clear",
2061
+ on: {
2062
+ mousedown: function ($event) {
2063
+ $event.preventDefault()
2064
+ },
2065
+ click: _vm.clear,
2066
+ },
2067
+ })
2068
+ : _vm._e(),
2069
+ _vm.showPwdVisible
2070
+ ? _c("i", {
2071
+ staticClass:
2072
+ "el-input__icon el-icon-view el-input__clear",
2073
+ on: { click: _vm.handlePasswordVisible },
2074
+ })
2075
+ : _vm._e(),
2076
+ _vm.isWordLimitVisible
2077
+ ? _c("span", { staticClass: "el-input__count" }, [
2078
+ _c(
2079
+ "span",
2080
+ { staticClass: "el-input__count-inner" },
2081
+ [
2082
+ _vm._v(
2083
+ "\n\t\t\t\t\t\t" +
2084
+ _vm._s(_vm.textLength) +
2085
+ "/" +
2086
+ _vm._s(_vm.upperLimit) +
2087
+ "\n\t\t\t\t\t"
2088
+ ),
2089
+ ]
2090
+ ),
2091
+ ])
2092
+ : _vm._e(),
2093
+ ],
2094
+ 2
2095
+ ),
2096
+ _vm.validateState
2097
+ ? _c("i", {
2098
+ staticClass: "el-input__icon",
2099
+ class: ["el-input__validateIcon", _vm.validateIcon],
2100
+ })
2101
+ : _vm._e(),
2102
+ ])
2103
+ : _vm._e(),
2104
+ _vm.$slots.append
2105
+ ? _c(
2106
+ "div",
2107
+ { staticClass: "el-input-group__append" },
2108
+ [_vm._t("append")],
2109
+ 2
2110
+ )
2111
+ : _vm._e(),
2112
+ ]
2113
+ : _c(
2114
+ "textarea",
2115
+ _vm._b(
2116
+ {
2117
+ ref: "textarea",
2118
+ staticClass: "el-textarea__inner",
2119
+ style: _vm.textareaStyle,
2120
+ attrs: {
2121
+ tabindex: _vm.tabindex,
2122
+ disabled: _vm.inputDisabled,
2123
+ readonly: _vm.readonly,
2124
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
2125
+ "aria-label": _vm.label,
2126
+ },
2127
+ on: {
2128
+ compositionstart: _vm.handleCompositionStart,
2129
+ compositionupdate: _vm.handleCompositionUpdate,
2130
+ compositionend: _vm.handleCompositionEnd,
2131
+ input: _vm.handleInput,
2132
+ focus: _vm.handleFocus,
2133
+ blur: _vm.handleBlur,
2134
+ change: _vm.handleChange,
2135
+ },
2136
+ },
2137
+ "textarea",
2138
+ _vm.$attrs,
2139
+ false
2140
+ )
2141
+ ),
2142
+ _vm.isWordLimitVisible && _vm.type === "textarea"
2143
+ ? _c("span", { staticClass: "el-input__count" }, [
2144
+ _vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit)),
2145
+ ])
2146
+ : _vm._e(),
2147
+ ],
2148
+ 2
2149
+ )
2150
+ }
2151
+ var staticRenderFns = []
2152
+ render._withStripped = true
2153
+
2154
+
2155
+ // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=af7512c8
2156
+
2157
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
2158
+ var emitter = __webpack_require__(6);
2159
+
2160
+ // EXTERNAL MODULE: ./src/mixins/migrating.js
2161
+ var migrating = __webpack_require__(12);
2162
+
2163
+ // CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
2164
+ var hiddenTextarea = void 0;
2165
+
2166
+ var HIDDEN_STYLE = '\n\theight:0 !important;\n\tvisibility:hidden !important;\n\toverflow:hidden !important;\n\tposition:absolute !important;\n\tz-index:-1000 !important;\n\ttop:0 !important;\n\tright:0 !important\n';
2167
+
2168
+ var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
2169
+
2170
+ function calculateNodeStyling(targetElement) {
2171
+ var style = window.getComputedStyle(targetElement);
2172
+
2173
+ var boxSizing = style.getPropertyValue('box-sizing');
2174
+
2175
+ var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
2176
+
2177
+ var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
2178
+
2179
+ var contextStyle = CONTEXT_STYLE.map(function (name) {
2180
+ return name + ':' + style.getPropertyValue(name);
2181
+ }).join(';');
2182
+
2183
+ return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
2184
+ }
2185
+
2186
+ function calcTextareaHeight(targetElement) {
2187
+ var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
2188
+ var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
2189
+
2190
+ if (!hiddenTextarea) {
2191
+ hiddenTextarea = document.createElement('textarea');
2192
+ document.body.appendChild(hiddenTextarea);
2193
+ }
2194
+
2195
+ var _calculateNodeStyling = calculateNodeStyling(targetElement),
2196
+ paddingSize = _calculateNodeStyling.paddingSize,
2197
+ borderSize = _calculateNodeStyling.borderSize,
2198
+ boxSizing = _calculateNodeStyling.boxSizing,
2199
+ contextStyle = _calculateNodeStyling.contextStyle;
2200
+
2201
+ hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
2202
+ hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
2203
+
2204
+ var height = hiddenTextarea.scrollHeight;
2205
+ var result = {};
2206
+
2207
+ if (boxSizing === 'border-box') {
2208
+ height = height + borderSize;
2209
+ } else if (boxSizing === 'content-box') {
2210
+ height = height - paddingSize;
2211
+ }
2212
+
2213
+ hiddenTextarea.value = '';
2214
+ var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
2215
+
2216
+ if (minRows !== null) {
2217
+ var minHeight = singleRowHeight * minRows;
2218
+ if (boxSizing === 'border-box') {
2219
+ minHeight = minHeight + paddingSize + borderSize;
2220
+ }
2221
+ height = Math.max(minHeight, height);
2222
+ result.minHeight = minHeight + 'px';
2223
+ }
2224
+ if (maxRows !== null) {
2225
+ var maxHeight = singleRowHeight * maxRows;
2226
+ if (boxSizing === 'border-box') {
2227
+ maxHeight = maxHeight + paddingSize + borderSize;
2228
+ }
2229
+ height = Math.min(maxHeight, height);
2230
+ }
2231
+ result.height = height + 'px';
2232
+ hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
2233
+ hiddenTextarea = null;
2234
+ return result;
2235
+ };
2236
+ // EXTERNAL MODULE: ./src/utils/merge.js
2237
+ var merge = __webpack_require__(7);
2238
+
2239
+ // EXTERNAL MODULE: ./src/utils/shared.js
2240
+ var shared = __webpack_require__(16);
2241
+
2242
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js
2243
+
2244
+
2245
+
2246
+
2247
+
2248
+
2249
+
2250
+ /* harmony default export */ var inputvue_type_script_lang_js = ({
2251
+ name: 'ElInput',
2252
+
2253
+ componentName: 'ElInput',
2254
+
2255
+ mixins: [emitter["a" /* default */], migrating["a" /* default */]],
2256
+
2257
+ inheritAttrs: false,
2258
+
2259
+ inject: {
2260
+ elForm: {
2261
+ default: ''
2262
+ },
2263
+ elFormItem: {
2264
+ default: ''
2265
+ }
2266
+ },
2267
+
2268
+ data: function data() {
2269
+ return {
2270
+ textareaCalcStyle: {},
2271
+ hovering: false,
2272
+ focused: false,
2273
+ isComposing: false,
2274
+ passwordVisible: false
2275
+ };
2276
+ },
2277
+
2278
+
2279
+ props: {
2280
+ value: [String, Number],
2281
+ size: String,
2282
+ resize: String,
2283
+ form: String,
2284
+ disabled: Boolean,
2285
+ readonly: Boolean,
2286
+ type: {
2287
+ type: String,
2288
+ default: 'text'
2289
+ },
2290
+ autosize: {
2291
+ type: [Boolean, Object],
2292
+ default: false
2293
+ },
2294
+ autocomplete: {
2295
+ type: String,
2296
+ default: 'off'
2297
+ },
2298
+ /** @Deprecated in next major version */
2299
+ autoComplete: {
2300
+ type: String,
2301
+ validator: function validator(val) {
2302
+ false && false;
2303
+ return true;
2304
+ }
2305
+ },
2306
+ validateEvent: {
2307
+ type: Boolean,
2308
+ default: true
2309
+ },
2310
+ suffixIcon: String,
2311
+ prefixIcon: String,
2312
+ label: String,
2313
+ clearable: {
2314
+ type: Boolean,
2315
+ default: false
2316
+ },
2317
+ showPassword: {
2318
+ type: Boolean,
2319
+ default: false
2320
+ },
2321
+ showWordLimit: {
2322
+ type: Boolean,
2323
+ default: false
2324
+ },
2325
+ tabindex: String
2326
+ },
2327
+
2328
+ computed: {
2329
+ _elFormItemSize: function _elFormItemSize() {
2330
+ return (this.elFormItem || {}).elFormItemSize;
2331
+ },
2332
+ validateState: function validateState() {
2333
+ return this.elFormItem ? this.elFormItem.validateState : '';
2334
+ },
2335
+ needStatusIcon: function needStatusIcon() {
2336
+ return this.elForm ? this.elForm.statusIcon : false;
2337
+ },
2338
+ validateIcon: function validateIcon() {
2339
+ return {
2340
+ validating: 'el-icon-loading',
2341
+ success: 'el-icon-circle-check',
2342
+ error: 'el-icon-circle-close'
2343
+ }[this.validateState];
2344
+ },
2345
+ textareaStyle: function textareaStyle() {
2346
+ return Object(merge["a" /* default */])({}, this.textareaCalcStyle, { resize: this.resize });
2347
+ },
2348
+ inputSize: function inputSize() {
2349
+ return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
2350
+ },
2351
+ inputDisabled: function inputDisabled() {
2352
+ return this.disabled || (this.elForm || {}).disabled;
2353
+ },
2354
+ nativeInputValue: function nativeInputValue() {
2355
+ return this.value === null || this.value === undefined ? '' : String(this.value);
2356
+ },
2357
+ showClear: function showClear() {
2358
+ return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
2359
+ },
2360
+ showPwdVisible: function showPwdVisible() {
2361
+ return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
2362
+ },
2363
+ isWordLimitVisible: function isWordLimitVisible() {
2364
+ return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
2365
+ },
2366
+ upperLimit: function upperLimit() {
2367
+ return this.$attrs.maxlength;
2368
+ },
2369
+ textLength: function textLength() {
2370
+ if (typeof this.value === 'number') {
2371
+ return String(this.value).length;
2372
+ }
2373
+
2374
+ return (this.value || '').length;
2375
+ },
2376
+ inputExceed: function inputExceed() {
2377
+ // show exceed style if length of initial value greater then maxlength
2378
+ return this.isWordLimitVisible && this.textLength > this.upperLimit;
2379
+ }
2380
+ },
2381
+
2382
+ watch: {
2383
+ value: function value(val) {
2384
+ this.$nextTick(this.resizeTextarea);
2385
+ if (this.validateEvent) {
2386
+ this.dispatch('ElFormItem', 'el.form.change', [val]);
2387
+ }
2388
+ },
2389
+
2390
+ // native input value is set explicitly
2391
+ // do not use v-model / :value in template
2392
+ // see: https://github.com/ElemeFE/element/issues/14521
2393
+ nativeInputValue: function nativeInputValue() {
2394
+ this.setNativeInputValue();
2395
+ },
2396
+
2397
+ // when change between <input> and <textarea>,
2398
+ // update DOM dependent value and styles
2399
+ // https://github.com/ElemeFE/element/issues/14857
2400
+ type: function type() {
2401
+ var _this = this;
2402
+
2403
+ this.$nextTick(function () {
2404
+ _this.setNativeInputValue();
2405
+ _this.resizeTextarea();
2406
+ _this.updateIconOffset();
2407
+ });
2408
+ }
2409
+ },
2410
+
2411
+ methods: {
2412
+ focus: function focus() {
2413
+ this.getInput().focus();
2414
+ },
2415
+ blur: function blur() {
2416
+ this.getInput().blur();
2417
+ },
2418
+ getMigratingConfig: function getMigratingConfig() {
2419
+ return {
2420
+ props: {
2421
+ 'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
2422
+ 'on-icon-click': 'on-icon-click is removed.'
2423
+ },
2424
+ events: {
2425
+ 'click': 'click is removed.'
2426
+ }
2427
+ };
2428
+ },
2429
+ handleBlur: function handleBlur(event) {
2430
+ this.focused = false;
2431
+ this.$emit('blur', event);
2432
+ if (this.validateEvent) {
2433
+ this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
2434
+ }
2435
+ },
2436
+ select: function select() {
2437
+ this.getInput().select();
2438
+ },
2439
+ resizeTextarea: function resizeTextarea() {
2440
+ if (this.$isServer) return;
2441
+ var autosize = this.autosize,
2442
+ type = this.type;
2443
+
2444
+ if (type !== 'textarea') return;
2445
+ if (!autosize) {
2446
+ this.textareaCalcStyle = {
2447
+ minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
2448
+ };
2449
+ return;
2450
+ }
2451
+ var minRows = autosize.minRows;
2452
+ var maxRows = autosize.maxRows;
2453
+
2454
+ this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
2455
+ },
2456
+ setNativeInputValue: function setNativeInputValue() {
2457
+ var input = this.getInput();
2458
+ if (!input) return;
2459
+ if (input.value === this.nativeInputValue) return;
2460
+ input.value = this.nativeInputValue;
2461
+ },
2462
+ handleFocus: function handleFocus(event) {
2463
+ this.focused = true;
2464
+ this.$emit('focus', event);
2465
+ },
2466
+ handleCompositionStart: function handleCompositionStart(event) {
2467
+ this.$emit('compositionstart', event);
2468
+ this.isComposing = true;
2469
+ },
2470
+ handleCompositionUpdate: function handleCompositionUpdate(event) {
2471
+ this.$emit('compositionupdate', event);
2472
+ var text = event.target.value;
2473
+ var lastCharacter = text[text.length - 1] || '';
2474
+ this.isComposing = !Object(shared["b" /* isKorean */])(lastCharacter);
2475
+ },
2476
+ handleCompositionEnd: function handleCompositionEnd(event) {
2477
+ this.$emit('compositionend', event);
2478
+ if (this.isComposing) {
2479
+ this.isComposing = false;
2480
+ this.handleInput(event);
2481
+ }
2482
+ },
2483
+ handleInput: function handleInput(event) {
2484
+ // should not emit input during composition
2485
+ // see: https://github.com/ElemeFE/element/issues/10516
2486
+ if (this.isComposing) return;
2487
+
2488
+ // hack for https://github.com/ElemeFE/element/issues/8548
2489
+ // should remove the following line when we don't support IE
2490
+ if (event.target.value === this.nativeInputValue) return;
2491
+
2492
+ this.$emit('input', event.target.value);
2493
+
2494
+ // ensure native input value is controlled
2495
+ // see: https://github.com/ElemeFE/element/issues/12850
2496
+ this.$nextTick(this.setNativeInputValue);
2497
+ },
2498
+ handleChange: function handleChange(event) {
2499
+ this.$emit('change', event.target.value);
2500
+ },
2501
+ calcIconOffset: function calcIconOffset(place) {
2502
+ var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
2503
+ if (!elList.length) return;
2504
+ var el = null;
2505
+ for (var i = 0; i < elList.length; i++) {
2506
+ if (elList[i].parentNode === this.$el) {
2507
+ el = elList[i];
2508
+ break;
2509
+ }
2510
+ }
2511
+ if (!el) return;
2512
+ var pendantMap = {
2513
+ suffix: 'append',
2514
+ prefix: 'prepend'
2515
+ };
2516
+
2517
+ var pendant = pendantMap[place];
2518
+ if (this.$slots[pendant]) {
2519
+ el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
2520
+ } else {
2521
+ el.removeAttribute('style');
2522
+ }
2523
+ },
2524
+ updateIconOffset: function updateIconOffset() {
2525
+ this.calcIconOffset('prefix');
2526
+ this.calcIconOffset('suffix');
2527
+ },
2528
+ clear: function clear() {
2529
+ this.$emit('input', '');
2530
+ this.$emit('change', '');
2531
+ this.$emit('clear');
2532
+ },
2533
+ handlePasswordVisible: function handlePasswordVisible() {
2534
+ var _this2 = this;
2535
+
2536
+ this.passwordVisible = !this.passwordVisible;
2537
+ this.$nextTick(function () {
2538
+ _this2.focus();
2539
+ });
2540
+ },
2541
+ getInput: function getInput() {
2542
+ return this.$refs.input || this.$refs.textarea;
2543
+ },
2544
+ getSuffixVisible: function getSuffixVisible() {
2545
+ return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
2546
+ }
2547
+ },
2548
+
2549
+ created: function created() {
2550
+ this.$on('inputSelect', this.select);
2551
+ },
2552
+ mounted: function mounted() {
2553
+ this.setNativeInputValue();
2554
+ this.resizeTextarea();
2555
+ this.updateIconOffset();
2556
+ },
2557
+ updated: function updated() {
2558
+ this.$nextTick(this.updateIconOffset);
2559
+ }
2560
+ });
2561
+ // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js
2562
+ /* harmony default export */ var src_inputvue_type_script_lang_js = (inputvue_type_script_lang_js);
2563
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2564
+ var componentNormalizer = __webpack_require__(2);
2565
+
2566
+ // CONCATENATED MODULE: ./packages/input/src/input.vue
2567
+
2568
+
2569
+
2570
+
2571
+
2572
+ /* normalize component */
2573
+
2574
+ var component = Object(componentNormalizer["a" /* default */])(
2575
+ src_inputvue_type_script_lang_js,
2576
+ render,
2577
+ staticRenderFns,
2578
+ false,
2579
+ null,
2580
+ null,
2581
+ null
2582
+
2583
+ )
2584
+
2585
+ /* harmony default export */ var input = (component.exports);
2586
+ // CONCATENATED MODULE: ./packages/input/index.js
2587
+
2588
+
2589
+ /* istanbul ignore next */
2590
+ input.install = function (Vue) {
2591
+ Vue.component(input.name, input);
2592
+ };
2593
+
2594
+ /* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
2595
+
2596
+ /***/ }),
2597
+ /* 19 */
2598
+ /***/ (function(module, exports) {
2599
+
2600
+ module.exports = require("throttle-debounce");
2601
+
2602
+ /***/ }),
2603
+ /* 20 */
2604
+ /***/ (function(module, exports) {
2605
+
2606
+ module.exports = require("resize-observer-polyfill");
2607
+
2608
+ /***/ }),
2609
+ /* 21 */
2610
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2611
+
2612
+ "use strict";
2613
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
2614
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
2615
+ /* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
2616
+
2617
+
2618
+
2619
+ var nodeList = [];
2620
+ var ctx = '@@clickoutsideContext';
2621
+
2622
+ var startClick = void 0;
2623
+ var seed = 0;
2624
+
2625
+ !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && Object(_dom__WEBPACK_IMPORTED_MODULE_1__[/* on */ "g"])(document, 'mousedown', function (e) {
2626
+ return startClick = e;
2627
+ });
2628
+
2629
+ !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && Object(_dom__WEBPACK_IMPORTED_MODULE_1__[/* on */ "g"])(document, 'mouseup', function (e) {
2630
+ nodeList.forEach(function (node) {
2631
+ return node[ctx].documentHandler(e, startClick);
2632
+ });
2633
+ });
2634
+
2635
+ function createDocumentHandler(el, binding, vnode) {
2636
+ return function () {
2637
+ var mouseup = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2638
+ var mousedown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2639
+
2640
+ if (!vnode || !vnode.context || !mouseup.target || !mousedown.target || el.contains(mouseup.target) || el.contains(mousedown.target) || el === mouseup.target || vnode.context.popperElm && (vnode.context.popperElm.contains(mouseup.target) || vnode.context.popperElm.contains(mousedown.target))) return;
2641
+
2642
+ if (binding.expression && el[ctx].methodName && vnode.context[el[ctx].methodName]) {
2643
+ vnode.context[el[ctx].methodName]();
2644
+ } else {
2645
+ el[ctx].bindingFn && el[ctx].bindingFn();
2646
+ }
2647
+ };
2648
+ }
2649
+
2650
+ /**
2651
+ * v-clickoutside
2652
+ * @desc 点击元素外面才会触发的事件
2653
+ * @example
2654
+ * ```vue
2655
+ * <div v-element-clickoutside="handleClose">
2656
+ * ```
2657
+ */
2658
+ /* harmony default export */ __webpack_exports__["a"] = ({
2659
+ bind: function bind(el, binding, vnode) {
2660
+ nodeList.push(el);
2661
+ var id = seed++;
2662
+ el[ctx] = {
2663
+ id: id,
2664
+ documentHandler: createDocumentHandler(el, binding, vnode),
2665
+ methodName: binding.expression,
2666
+ bindingFn: binding.value
2667
+ };
2668
+ },
2669
+ update: function update(el, binding, vnode) {
2670
+ el[ctx].documentHandler = createDocumentHandler(el, binding, vnode);
2671
+ el[ctx].methodName = binding.expression;
2672
+ el[ctx].bindingFn = binding.value;
2673
+ },
2674
+ unbind: function unbind(el) {
2675
+ var len = nodeList.length;
2676
+
2677
+ for (var i = 0; i < len; i++) {
2678
+ if (nodeList[i][ctx].id === el[ctx].id) {
2679
+ nodeList.splice(i, 1);
2680
+ break;
2681
+ }
2682
+ }
2683
+ delete el[ctx];
2684
+ }
2685
+ });
2686
+
2687
+ /***/ }),
2688
+ /* 22 */
2689
+ /***/ (function(module, exports) {
2690
+
2691
+ module.exports = require("throttle-debounce/debounce");
2692
+
2693
+ /***/ }),
2694
+ /* 23 */
2695
+ /***/ (function(module, exports, __webpack_require__) {
2696
+
2697
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2698
+
2699
+ /**
2700
+ * @fileOverview Kickass library to create and place poppers near their reference elements.
2701
+ * @version {{version}}
2702
+ * @license
2703
+ * Copyright (c) 2016 Federico Zivolo and contributors
2704
+ *
2705
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
2706
+ * of this software and associated documentation files (the "Software"), to deal
2707
+ * in the Software without restriction, including without limitation the rights
2708
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2709
+ * copies of the Software, and to permit persons to whom the Software is
2710
+ * furnished to do so, subject to the following conditions:
2711
+ *
2712
+ * The above copyright notice and this permission notice shall be included in all
2713
+ * copies or substantial portions of the Software.
2714
+ *
2715
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2716
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2717
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2718
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2719
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2720
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2721
+ * SOFTWARE.
2722
+ */
2723
+
2724
+ //
2725
+ // Cross module loader
2726
+ // Supported: Node, AMD, Browser globals
2727
+ //
2728
+ ;(function (root, factory) {
2729
+ if (true) {
2730
+ // AMD. Register as an anonymous module.
2731
+ !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
2732
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2733
+ (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
2734
+ __WEBPACK_AMD_DEFINE_FACTORY__),
2735
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2736
+ } else {}
2737
+ })(this, function () {
2738
+
2739
+ 'use strict';
2740
+
2741
+ var root = window;
2742
+
2743
+ // default options
2744
+ var DEFAULTS = {
2745
+ // placement of the popper
2746
+ placement: 'bottom',
2747
+
2748
+ gpuAcceleration: true,
2749
+
2750
+ // shift popper from its origin by the given amount of pixels (can be negative)
2751
+ offset: 0,
2752
+
2753
+ // the element which will act as boundary of the popper
2754
+ boundariesElement: 'viewport',
2755
+
2756
+ // amount of pixel used to define a minimum distance between the boundaries and the popper
2757
+ boundariesPadding: 5,
2758
+
2759
+ // popper will try to prevent overflow following this order,
2760
+ // by default, then, it could overflow on the left and on top of the boundariesElement
2761
+ preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
2762
+
2763
+ // the behavior used by flip to change the placement of the popper
2764
+ flipBehavior: 'flip',
2765
+
2766
+ arrowElement: '[x-arrow]',
2767
+
2768
+ arrowOffset: 0,
2769
+
2770
+ // list of functions used to modify the offsets before they are applied to the popper
2771
+ modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
2772
+
2773
+ modifiersIgnored: [],
2774
+
2775
+ forceAbsolute: false
2776
+ };
2777
+
2778
+ /**
2779
+ * Create a new Popper.js instance
2780
+ * @constructor Popper
2781
+ * @param {HTMLElement} reference - The reference element used to position the popper
2782
+ * @param {HTMLElement|Object} popper
2783
+ * The HTML element used as popper, or a configuration used to generate the popper.
2784
+ * @param {String} [popper.tagName='div'] The tag name of the generated popper.
2785
+ * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
2786
+ * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
2787
+ * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
2788
+ * @param {String} [popper.content=''] The content of the popper, it can be text, html, or node; if it is not text, set `contentType` to `html` or `node`.
2789
+ * @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
2790
+ * @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
2791
+ * @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
2792
+ * @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
2793
+ * @param {Object} options
2794
+ * @param {String} [options.placement=bottom]
2795
+ * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
2796
+ * left(-start, -end)`
2797
+ *
2798
+ * @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
2799
+ * The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
2800
+ * its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
2801
+ * reference element.
2802
+ * By default, it will look for a child node of the popper with the `x-arrow` attribute.
2803
+ *
2804
+ * @param {Boolean} [options.gpuAcceleration=true]
2805
+ * When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
2806
+ * browser to use the GPU to accelerate the rendering.
2807
+ * If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
2808
+ *
2809
+ * @param {Number} [options.offset=0]
2810
+ * Amount of pixels the popper will be shifted (can be negative).
2811
+ *
2812
+ * @param {String|Element} [options.boundariesElement='viewport']
2813
+ * The element which will define the boundaries of the popper position, the popper will never be placed outside
2814
+ * of the defined boundaries (except if `keepTogether` is enabled)
2815
+ *
2816
+ * @param {Number} [options.boundariesPadding=5]
2817
+ * Additional padding for the boundaries
2818
+ *
2819
+ * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
2820
+ * Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
2821
+ * this means that the last ones will never overflow
2822
+ *
2823
+ * @param {String|Array} [options.flipBehavior='flip']
2824
+ * The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
2825
+ * overlap its reference element. Defining `flip` as value, the placement will be flipped on
2826
+ * its axis (`right - left`, `top - bottom`).
2827
+ * You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
2828
+ * how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
2829
+ * then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
2830
+ *
2831
+ * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
2832
+ * List of functions used to modify the data before they are applied to the popper, add your custom functions
2833
+ * to this array to edit the offsets and placement.
2834
+ * The function should reflect the @params and @returns of preventOverflow
2835
+ *
2836
+ * @param {Array} [options.modifiersIgnored=[]]
2837
+ * Put here any built-in modifier name you want to exclude from the modifiers list
2838
+ * The function should reflect the @params and @returns of preventOverflow
2839
+ *
2840
+ * @param {Boolean} [options.removeOnDestroy=false]
2841
+ * Set to true if you want to automatically remove the popper when you call the `destroy` method.
2842
+ */
2843
+ function Popper(reference, popper, options) {
2844
+ this._reference = reference.jquery ? reference[0] : reference;
2845
+ this.state = {};
2846
+
2847
+ // if the popper variable is a configuration object, parse it to generate an HTMLElement
2848
+ // generate a default popper if is not defined
2849
+ var isNotDefined = typeof popper === 'undefined' || popper === null;
2850
+ var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
2851
+ if (isNotDefined || isConfig) {
2852
+ this._popper = this.parse(isConfig ? popper : {});
2853
+ }
2854
+ // otherwise, use the given HTMLElement as popper
2855
+ else {
2856
+ this._popper = popper.jquery ? popper[0] : popper;
2857
+ }
2858
+
2859
+ // with {} we create a new object with the options inside it
2860
+ this._options = Object.assign({}, DEFAULTS, options);
2861
+
2862
+ // refactoring modifiers' list
2863
+ this._options.modifiers = this._options.modifiers.map(function (modifier) {
2864
+ // remove ignored modifiers
2865
+ if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
2866
+
2867
+ // set the x-placement attribute before everything else because it could be used to add margins to the popper
2868
+ // margins needs to be calculated to get the correct popper offsets
2869
+ if (modifier === 'applyStyle') {
2870
+ this._popper.setAttribute('x-placement', this._options.placement);
2871
+ }
2872
+
2873
+ // return predefined modifier identified by string or keep the custom one
2874
+ return this.modifiers[modifier] || modifier;
2875
+ }.bind(this));
2876
+
2877
+ // make sure to apply the popper position before any computation
2878
+ this.state.position = this._getPosition(this._popper, this._reference);
2879
+ setStyle(this._popper, { position: this.state.position, top: 0 });
2880
+
2881
+ // fire the first update to position the popper in the right place
2882
+ this.update();
2883
+
2884
+ // setup event listeners, they will take care of update the position in specific situations
2885
+ this._setupEventListeners();
2886
+ return this;
2887
+ }
2888
+
2889
+ //
2890
+ // Methods
2891
+ //
2892
+ /**
2893
+ * Destroy the popper
2894
+ * @method
2895
+ * @memberof Popper
2896
+ */
2897
+ Popper.prototype.destroy = function () {
2898
+ this._popper.removeAttribute('x-placement');
2899
+ this._popper.style.left = '';
2900
+ this._popper.style.position = '';
2901
+ this._popper.style.top = '';
2902
+ this._popper.style[getSupportedPropertyName('transform')] = '';
2903
+ this._removeEventListeners();
2904
+
2905
+ // remove the popper if user explicity asked for the deletion on destroy
2906
+ if (this._options.removeOnDestroy) {
2907
+ this._popper.remove();
2908
+ }
2909
+ return this;
2910
+ };
2911
+
2912
+ /**
2913
+ * Updates the position of the popper, computing the new offsets and applying the new style
2914
+ * @method
2915
+ * @memberof Popper
2916
+ */
2917
+ Popper.prototype.update = function () {
2918
+ var data = { instance: this, styles: {} };
2919
+
2920
+ // store placement inside the data object, modifiers will be able to edit `placement` if needed
2921
+ // and refer to _originalPlacement to know the original value
2922
+ data.placement = this._options.placement;
2923
+ data._originalPlacement = this._options.placement;
2924
+
2925
+ // compute the popper and reference offsets and put them inside data.offsets
2926
+ data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
2927
+
2928
+ // get boundaries
2929
+ data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
2930
+
2931
+ data = this.runModifiers(data, this._options.modifiers);
2932
+
2933
+ if (typeof this.state.updateCallback === 'function') {
2934
+ this.state.updateCallback(data);
2935
+ }
2936
+ };
2937
+
2938
+ /**
2939
+ * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
2940
+ * @method
2941
+ * @memberof Popper
2942
+ * @param {Function} callback
2943
+ */
2944
+ Popper.prototype.onCreate = function (callback) {
2945
+ // the createCallbacks return as first argument the popper instance
2946
+ callback(this);
2947
+ return this;
2948
+ };
2949
+
2950
+ /**
2951
+ * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
2952
+ * used to style popper and its arrow.
2953
+ * NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
2954
+ * @method
2955
+ * @memberof Popper
2956
+ * @param {Function} callback
2957
+ */
2958
+ Popper.prototype.onUpdate = function (callback) {
2959
+ this.state.updateCallback = callback;
2960
+ return this;
2961
+ };
2962
+
2963
+ /**
2964
+ * Helper used to generate poppers from a configuration file
2965
+ * @method
2966
+ * @memberof Popper
2967
+ * @param config {Object} configuration
2968
+ * @returns {HTMLElement} popper
2969
+ */
2970
+ Popper.prototype.parse = function (config) {
2971
+ var defaultConfig = {
2972
+ tagName: 'div',
2973
+ classNames: ['popper'],
2974
+ attributes: [],
2975
+ parent: root.document.body,
2976
+ content: '',
2977
+ contentType: 'text',
2978
+ arrowTagName: 'div',
2979
+ arrowClassNames: ['popper__arrow'],
2980
+ arrowAttributes: ['x-arrow']
2981
+ };
2982
+ config = Object.assign({}, defaultConfig, config);
2983
+
2984
+ var d = root.document;
2985
+
2986
+ var popper = d.createElement(config.tagName);
2987
+ addClassNames(popper, config.classNames);
2988
+ addAttributes(popper, config.attributes);
2989
+ if (config.contentType === 'node') {
2990
+ popper.appendChild(config.content.jquery ? config.content[0] : config.content);
2991
+ } else if (config.contentType === 'html') {
2992
+ popper.innerHTML = config.content;
2993
+ } else {
2994
+ popper.textContent = config.content;
2995
+ }
2996
+
2997
+ if (config.arrowTagName) {
2998
+ var arrow = d.createElement(config.arrowTagName);
2999
+ addClassNames(arrow, config.arrowClassNames);
3000
+ addAttributes(arrow, config.arrowAttributes);
3001
+ popper.appendChild(arrow);
3002
+ }
3003
+
3004
+ var parent = config.parent.jquery ? config.parent[0] : config.parent;
3005
+
3006
+ // if the given parent is a string, use it to match an element
3007
+ // if more than one element is matched, the first one will be used as parent
3008
+ // if no elements are matched, the script will throw an error
3009
+ if (typeof parent === 'string') {
3010
+ parent = d.querySelectorAll(config.parent);
3011
+ if (parent.length > 1) {
3012
+ console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
3013
+ }
3014
+ if (parent.length === 0) {
3015
+ throw 'ERROR: the given `parent` doesn\'t exists!';
3016
+ }
3017
+ parent = parent[0];
3018
+ }
3019
+ // if the given parent is a DOM nodes list or an array of nodes with more than one element,
3020
+ // the first one will be used as parent
3021
+ if (parent.length > 1 && parent instanceof Element === false) {
3022
+ console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
3023
+ parent = parent[0];
3024
+ }
3025
+
3026
+ // append the generated popper to its parent
3027
+ parent.appendChild(popper);
3028
+
3029
+ return popper;
3030
+
3031
+ /**
3032
+ * Adds class names to the given element
3033
+ * @function
3034
+ * @ignore
3035
+ * @param {HTMLElement} target
3036
+ * @param {Array} classes
3037
+ */
3038
+ function addClassNames(element, classNames) {
3039
+ classNames.forEach(function (className) {
3040
+ element.classList.add(className);
3041
+ });
3042
+ }
3043
+
3044
+ /**
3045
+ * Adds attributes to the given element
3046
+ * @function
3047
+ * @ignore
3048
+ * @param {HTMLElement} target
3049
+ * @param {Array} attributes
3050
+ * @example
3051
+ * addAttributes(element, [ 'data-info:foobar' ]);
3052
+ */
3053
+ function addAttributes(element, attributes) {
3054
+ attributes.forEach(function (attribute) {
3055
+ element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
3056
+ });
3057
+ }
3058
+ };
3059
+
3060
+ /**
3061
+ * Helper used to get the position which will be applied to the popper
3062
+ * @method
3063
+ * @memberof Popper
3064
+ * @param config {HTMLElement} popper element
3065
+ * @param reference {HTMLElement} reference element
3066
+ * @returns {String} position
3067
+ */
3068
+ Popper.prototype._getPosition = function (popper, reference) {
3069
+ var container = getOffsetParent(reference);
3070
+
3071
+ if (this._options.forceAbsolute) {
3072
+ return 'absolute';
3073
+ }
3074
+
3075
+ // Decide if the popper will be fixed
3076
+ // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
3077
+ var isParentFixed = isFixed(reference, container);
3078
+ return isParentFixed ? 'fixed' : 'absolute';
3079
+ };
3080
+
3081
+ /**
3082
+ * Get offsets to the popper
3083
+ * @method
3084
+ * @memberof Popper
3085
+ * @access private
3086
+ * @param {Element} popper - the popper element
3087
+ * @param {Element} reference - the reference element (the popper will be relative to this)
3088
+ * @returns {Object} An object containing the offsets which will be applied to the popper
3089
+ */
3090
+ Popper.prototype._getOffsets = function (popper, reference, placement) {
3091
+ placement = placement.split('-')[0];
3092
+ var popperOffsets = {};
3093
+
3094
+ popperOffsets.position = this.state.position;
3095
+ var isParentFixed = popperOffsets.position === 'fixed';
3096
+
3097
+ //
3098
+ // Get reference element position
3099
+ //
3100
+ var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
3101
+
3102
+ //
3103
+ // Get popper sizes
3104
+ //
3105
+ var popperRect = getOuterSizes(popper);
3106
+
3107
+ //
3108
+ // Compute offsets of popper
3109
+ //
3110
+
3111
+ // depending by the popper placement we have to compute its offsets slightly differently
3112
+ if (['right', 'left'].indexOf(placement) !== -1) {
3113
+ popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
3114
+ if (placement === 'left') {
3115
+ popperOffsets.left = referenceOffsets.left - popperRect.width;
3116
+ } else {
3117
+ popperOffsets.left = referenceOffsets.right;
3118
+ }
3119
+ } else {
3120
+ popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
3121
+ if (placement === 'top') {
3122
+ popperOffsets.top = referenceOffsets.top - popperRect.height;
3123
+ } else {
3124
+ popperOffsets.top = referenceOffsets.bottom;
3125
+ }
3126
+ }
3127
+
3128
+ // Add width and height to our offsets object
3129
+ popperOffsets.width = popperRect.width;
3130
+ popperOffsets.height = popperRect.height;
3131
+
3132
+ return {
3133
+ popper: popperOffsets,
3134
+ reference: referenceOffsets
3135
+ };
3136
+ };
3137
+
3138
+ /**
3139
+ * Setup needed event listeners used to update the popper position
3140
+ * @method
3141
+ * @memberof Popper
3142
+ * @access private
3143
+ */
3144
+ Popper.prototype._setupEventListeners = function () {
3145
+ // NOTE: 1 DOM access here
3146
+ this.state.updateBound = this.update.bind(this);
3147
+ root.addEventListener('resize', this.state.updateBound);
3148
+ // if the boundariesElement is window we don't need to listen for the scroll event
3149
+ if (this._options.boundariesElement !== 'window') {
3150
+ var target = getScrollParent(this._reference);
3151
+ // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
3152
+ if (target === root.document.body || target === root.document.documentElement) {
3153
+ target = root;
3154
+ }
3155
+ target.addEventListener('scroll', this.state.updateBound);
3156
+ this.state.scrollTarget = target;
3157
+ }
3158
+ };
3159
+
3160
+ /**
3161
+ * Remove event listeners used to update the popper position
3162
+ * @method
3163
+ * @memberof Popper
3164
+ * @access private
3165
+ */
3166
+ Popper.prototype._removeEventListeners = function () {
3167
+ // NOTE: 1 DOM access here
3168
+ root.removeEventListener('resize', this.state.updateBound);
3169
+ if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
3170
+ this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
3171
+ this.state.scrollTarget = null;
3172
+ }
3173
+ this.state.updateBound = null;
3174
+ };
3175
+
3176
+ /**
3177
+ * Computed the boundaries limits and return them
3178
+ * @method
3179
+ * @memberof Popper
3180
+ * @access private
3181
+ * @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
3182
+ * @param {Number} padding - Boundaries padding
3183
+ * @param {Element} boundariesElement - Element used to define the boundaries
3184
+ * @returns {Object} Coordinates of the boundaries
3185
+ */
3186
+ Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
3187
+ // NOTE: 1 DOM access here
3188
+ var boundaries = {};
3189
+ var width, height;
3190
+ if (boundariesElement === 'window') {
3191
+ var body = root.document.body,
3192
+ html = root.document.documentElement;
3193
+
3194
+ height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
3195
+ width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
3196
+
3197
+ boundaries = {
3198
+ top: 0,
3199
+ right: width,
3200
+ bottom: height,
3201
+ left: 0
3202
+ };
3203
+ } else if (boundariesElement === 'viewport') {
3204
+ var offsetParent = getOffsetParent(this._popper);
3205
+ var scrollParent = getScrollParent(this._popper);
3206
+ var offsetParentRect = getOffsetRect(offsetParent);
3207
+
3208
+ // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
3209
+ var getScrollTopValue = function getScrollTopValue(element) {
3210
+ return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
3211
+ };
3212
+ var getScrollLeftValue = function getScrollLeftValue(element) {
3213
+ return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
3214
+ };
3215
+
3216
+ // if the popper is fixed we don't have to substract scrolling from the boundaries
3217
+ var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
3218
+ var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
3219
+
3220
+ boundaries = {
3221
+ top: 0 - (offsetParentRect.top - scrollTop),
3222
+ right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
3223
+ bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
3224
+ left: 0 - (offsetParentRect.left - scrollLeft)
3225
+ };
3226
+ } else {
3227
+ if (getOffsetParent(this._popper) === boundariesElement) {
3228
+ boundaries = {
3229
+ top: 0,
3230
+ left: 0,
3231
+ right: boundariesElement.clientWidth,
3232
+ bottom: boundariesElement.clientHeight
3233
+ };
3234
+ } else {
3235
+ boundaries = getOffsetRect(boundariesElement);
3236
+ }
3237
+ }
3238
+ boundaries.left += padding;
3239
+ boundaries.right -= padding;
3240
+ boundaries.top = boundaries.top + padding;
3241
+ boundaries.bottom = boundaries.bottom - padding;
3242
+ return boundaries;
3243
+ };
3244
+
3245
+ /**
3246
+ * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
3247
+ * @method
3248
+ * @memberof Popper
3249
+ * @access public
3250
+ * @param {Object} data
3251
+ * @param {Array} modifiers
3252
+ * @param {Function} ends
3253
+ */
3254
+ Popper.prototype.runModifiers = function (data, modifiers, ends) {
3255
+ var modifiersToRun = modifiers.slice();
3256
+ if (ends !== undefined) {
3257
+ modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
3258
+ }
3259
+
3260
+ modifiersToRun.forEach(function (modifier) {
3261
+ if (isFunction(modifier)) {
3262
+ data = modifier.call(this, data);
3263
+ }
3264
+ }.bind(this));
3265
+
3266
+ return data;
3267
+ };
3268
+
3269
+ /**
3270
+ * Helper used to know if the given modifier depends from another one.
3271
+ * @method
3272
+ * @memberof Popper
3273
+ * @param {String} requesting - name of requesting modifier
3274
+ * @param {String} requested - name of requested modifier
3275
+ * @returns {Boolean}
3276
+ */
3277
+ Popper.prototype.isModifierRequired = function (requesting, requested) {
3278
+ var index = getArrayKeyIndex(this._options.modifiers, requesting);
3279
+ return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
3280
+ return modifier === requested;
3281
+ }).length;
3282
+ };
3283
+
3284
+ //
3285
+ // Modifiers
3286
+ //
3287
+
3288
+ /**
3289
+ * Modifiers list
3290
+ * @namespace Popper.modifiers
3291
+ * @memberof Popper
3292
+ * @type {Object}
3293
+ */
3294
+ Popper.prototype.modifiers = {};
3295
+
3296
+ /**
3297
+ * Apply the computed styles to the popper element
3298
+ * @method
3299
+ * @memberof Popper.modifiers
3300
+ * @argument {Object} data - The data object generated by `update` method
3301
+ * @returns {Object} The same data object
3302
+ */
3303
+ Popper.prototype.modifiers.applyStyle = function (data) {
3304
+ // apply the final offsets to the popper
3305
+ // NOTE: 1 DOM access here
3306
+ var styles = {
3307
+ position: data.offsets.popper.position
3308
+ };
3309
+
3310
+ // round top and left to avoid blurry text
3311
+ var left = Math.round(data.offsets.popper.left);
3312
+ var top = Math.round(data.offsets.popper.top);
3313
+
3314
+ // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
3315
+ // we automatically use the supported prefixed version if needed
3316
+ var prefixedProperty;
3317
+ if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
3318
+ styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
3319
+ styles.top = 0;
3320
+ styles.left = 0;
3321
+ }
3322
+ // othwerise, we use the standard `left` and `top` properties
3323
+ else {
3324
+ styles.left = left;
3325
+ styles.top = top;
3326
+ }
3327
+
3328
+ // any property present in `data.styles` will be applied to the popper,
3329
+ // in this way we can make the 3rd party modifiers add custom styles to it
3330
+ // Be aware, modifiers could override the properties defined in the previous
3331
+ // lines of this modifier!
3332
+ Object.assign(styles, data.styles);
3333
+
3334
+ setStyle(this._popper, styles);
3335
+
3336
+ // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
3337
+ // NOTE: 1 DOM access here
3338
+ this._popper.setAttribute('x-placement', data.placement);
3339
+
3340
+ // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
3341
+ if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
3342
+ setStyle(data.arrowElement, data.offsets.arrow);
3343
+ }
3344
+
3345
+ return data;
3346
+ };
3347
+
3348
+ /**
3349
+ * Modifier used to shift the popper on the start or end of its reference element side
3350
+ * @method
3351
+ * @memberof Popper.modifiers
3352
+ * @argument {Object} data - The data object generated by `update` method
3353
+ * @returns {Object} The data object, properly modified
3354
+ */
3355
+ Popper.prototype.modifiers.shift = function (data) {
3356
+ var placement = data.placement;
3357
+ var basePlacement = placement.split('-')[0];
3358
+ var shiftVariation = placement.split('-')[1];
3359
+
3360
+ // if shift shiftVariation is specified, run the modifier
3361
+ if (shiftVariation) {
3362
+ var reference = data.offsets.reference;
3363
+ var popper = getPopperClientRect(data.offsets.popper);
3364
+
3365
+ var shiftOffsets = {
3366
+ y: {
3367
+ start: { top: reference.top },
3368
+ end: { top: reference.top + reference.height - popper.height }
3369
+ },
3370
+ x: {
3371
+ start: { left: reference.left },
3372
+ end: { left: reference.left + reference.width - popper.width }
3373
+ }
3374
+ };
3375
+
3376
+ var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
3377
+
3378
+ data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
3379
+ }
3380
+
3381
+ return data;
3382
+ };
3383
+
3384
+ /**
3385
+ * Modifier used to make sure the popper does not overflows from it's boundaries
3386
+ * @method
3387
+ * @memberof Popper.modifiers
3388
+ * @argument {Object} data - The data object generated by `update` method
3389
+ * @returns {Object} The data object, properly modified
3390
+ */
3391
+ Popper.prototype.modifiers.preventOverflow = function (data) {
3392
+ var order = this._options.preventOverflowOrder;
3393
+ var popper = getPopperClientRect(data.offsets.popper);
3394
+
3395
+ var check = {
3396
+ left: function left() {
3397
+ var left = popper.left;
3398
+ if (popper.left < data.boundaries.left) {
3399
+ left = Math.max(popper.left, data.boundaries.left);
3400
+ }
3401
+ return { left: left };
3402
+ },
3403
+ right: function right() {
3404
+ var left = popper.left;
3405
+ if (popper.right > data.boundaries.right) {
3406
+ left = Math.min(popper.left, data.boundaries.right - popper.width);
3407
+ }
3408
+ return { left: left };
3409
+ },
3410
+ top: function top() {
3411
+ var top = popper.top;
3412
+ if (popper.top < data.boundaries.top) {
3413
+ top = Math.max(popper.top, data.boundaries.top);
3414
+ }
3415
+ return { top: top };
3416
+ },
3417
+ bottom: function bottom() {
3418
+ var top = popper.top;
3419
+ if (popper.bottom > data.boundaries.bottom) {
3420
+ top = Math.min(popper.top, data.boundaries.bottom - popper.height);
3421
+ }
3422
+ return { top: top };
3423
+ }
3424
+ };
3425
+
3426
+ order.forEach(function (direction) {
3427
+ data.offsets.popper = Object.assign(popper, check[direction]());
3428
+ });
3429
+
3430
+ return data;
3431
+ };
3432
+
3433
+ /**
3434
+ * Modifier used to make sure the popper is always near its reference
3435
+ * @method
3436
+ * @memberof Popper.modifiers
3437
+ * @argument {Object} data - The data object generated by _update method
3438
+ * @returns {Object} The data object, properly modified
3439
+ */
3440
+ Popper.prototype.modifiers.keepTogether = function (data) {
3441
+ var popper = getPopperClientRect(data.offsets.popper);
3442
+ var reference = data.offsets.reference;
3443
+ var f = Math.floor;
3444
+
3445
+ if (popper.right < f(reference.left)) {
3446
+ data.offsets.popper.left = f(reference.left) - popper.width;
3447
+ }
3448
+ if (popper.left > f(reference.right)) {
3449
+ data.offsets.popper.left = f(reference.right);
3450
+ }
3451
+ if (popper.bottom < f(reference.top)) {
3452
+ data.offsets.popper.top = f(reference.top) - popper.height;
3453
+ }
3454
+ if (popper.top > f(reference.bottom)) {
3455
+ data.offsets.popper.top = f(reference.bottom);
3456
+ }
3457
+
3458
+ return data;
3459
+ };
3460
+
3461
+ /**
3462
+ * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
3463
+ * Requires the `preventOverflow` modifier before it in order to work.
3464
+ * **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
3465
+ * @method
3466
+ * @memberof Popper.modifiers
3467
+ * @argument {Object} data - The data object generated by _update method
3468
+ * @returns {Object} The data object, properly modified
3469
+ */
3470
+ Popper.prototype.modifiers.flip = function (data) {
3471
+ // check if preventOverflow is in the list of modifiers before the flip modifier.
3472
+ // otherwise flip would not work as expected.
3473
+ if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
3474
+ console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
3475
+ return data;
3476
+ }
3477
+
3478
+ if (data.flipped && data.placement === data._originalPlacement) {
3479
+ // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
3480
+ return data;
3481
+ }
3482
+
3483
+ var placement = data.placement.split('-')[0];
3484
+ var placementOpposite = getOppositePlacement(placement);
3485
+ var variation = data.placement.split('-')[1] || '';
3486
+
3487
+ var flipOrder = [];
3488
+ if (this._options.flipBehavior === 'flip') {
3489
+ flipOrder = [placement, placementOpposite];
3490
+ } else {
3491
+ flipOrder = this._options.flipBehavior;
3492
+ }
3493
+
3494
+ flipOrder.forEach(function (step, index) {
3495
+ if (placement !== step || flipOrder.length === index + 1) {
3496
+ return;
3497
+ }
3498
+
3499
+ placement = data.placement.split('-')[0];
3500
+ placementOpposite = getOppositePlacement(placement);
3501
+
3502
+ var popperOffsets = getPopperClientRect(data.offsets.popper);
3503
+
3504
+ // this boolean is used to distinguish right and bottom from top and left
3505
+ // they need different computations to get flipped
3506
+ var a = ['right', 'bottom'].indexOf(placement) !== -1;
3507
+
3508
+ // using Math.floor because the reference offsets may contain decimals we are not going to consider here
3509
+ if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
3510
+ // we'll use this boolean to detect any flip loop
3511
+ data.flipped = true;
3512
+ data.placement = flipOrder[index + 1];
3513
+ if (variation) {
3514
+ data.placement += '-' + variation;
3515
+ }
3516
+ data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
3517
+
3518
+ data = this.runModifiers(data, this._options.modifiers, this._flip);
3519
+ }
3520
+ }.bind(this));
3521
+ return data;
3522
+ };
3523
+
3524
+ /**
3525
+ * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
3526
+ * The offsets will shift the popper on the side of its reference element.
3527
+ * @method
3528
+ * @memberof Popper.modifiers
3529
+ * @argument {Object} data - The data object generated by _update method
3530
+ * @returns {Object} The data object, properly modified
3531
+ */
3532
+ Popper.prototype.modifiers.offset = function (data) {
3533
+ var offset = this._options.offset;
3534
+ var popper = data.offsets.popper;
3535
+
3536
+ if (data.placement.indexOf('left') !== -1) {
3537
+ popper.top -= offset;
3538
+ } else if (data.placement.indexOf('right') !== -1) {
3539
+ popper.top += offset;
3540
+ } else if (data.placement.indexOf('top') !== -1) {
3541
+ popper.left -= offset;
3542
+ } else if (data.placement.indexOf('bottom') !== -1) {
3543
+ popper.left += offset;
3544
+ }
3545
+ return data;
3546
+ };
3547
+
3548
+ /**
3549
+ * Modifier used to move the arrows on the edge of the popper to make sure them are always between the popper and the reference element
3550
+ * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
3551
+ * @method
3552
+ * @memberof Popper.modifiers
3553
+ * @argument {Object} data - The data object generated by _update method
3554
+ * @returns {Object} The data object, properly modified
3555
+ */
3556
+ Popper.prototype.modifiers.arrow = function (data) {
3557
+ var arrow = this._options.arrowElement;
3558
+ var arrowOffset = this._options.arrowOffset;
3559
+
3560
+ // if the arrowElement is a string, suppose it's a CSS selector
3561
+ if (typeof arrow === 'string') {
3562
+ arrow = this._popper.querySelector(arrow);
3563
+ }
3564
+
3565
+ // if arrow element is not found, don't run the modifier
3566
+ if (!arrow) {
3567
+ return data;
3568
+ }
3569
+
3570
+ // the arrow element must be child of its popper
3571
+ if (!this._popper.contains(arrow)) {
3572
+ console.warn('WARNING: `arrowElement` must be child of its popper element!');
3573
+ return data;
3574
+ }
3575
+
3576
+ // arrow depends on keepTogether in order to work
3577
+ if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
3578
+ console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
3579
+ return data;
3580
+ }
3581
+
3582
+ var arrowStyle = {};
3583
+ var placement = data.placement.split('-')[0];
3584
+ var popper = getPopperClientRect(data.offsets.popper);
3585
+ var reference = data.offsets.reference;
3586
+ var isVertical = ['left', 'right'].indexOf(placement) !== -1;
3587
+
3588
+ var len = isVertical ? 'height' : 'width';
3589
+ var side = isVertical ? 'top' : 'left';
3590
+ var translate = isVertical ? 'translateY' : 'translateX';
3591
+ var altSide = isVertical ? 'left' : 'top';
3592
+ var opSide = isVertical ? 'bottom' : 'right';
3593
+ var arrowSize = getOuterSizes(arrow)[len];
3594
+
3595
+ //
3596
+ // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
3597
+ //
3598
+
3599
+ // top/left side
3600
+ if (reference[opSide] - arrowSize < popper[side]) {
3601
+ data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
3602
+ }
3603
+ // bottom/right side
3604
+ if (reference[side] + arrowSize > popper[opSide]) {
3605
+ data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
3606
+ }
3607
+
3608
+ // compute center of the popper
3609
+ var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
3610
+
3611
+ var sideValue = center - popper[side];
3612
+
3613
+ // prevent arrow from being placed not contiguously to its popper
3614
+ sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
3615
+ arrowStyle[side] = sideValue;
3616
+ arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
3617
+
3618
+ data.offsets.arrow = arrowStyle;
3619
+ data.arrowElement = arrow;
3620
+
3621
+ return data;
3622
+ };
3623
+
3624
+ //
3625
+ // Helpers
3626
+ //
3627
+
3628
+ /**
3629
+ * Get the outer sizes of the given element (offset size + margins)
3630
+ * @function
3631
+ * @ignore
3632
+ * @argument {Element} element
3633
+ * @returns {Object} object containing width and height properties
3634
+ */
3635
+ function getOuterSizes(element) {
3636
+ // NOTE: 1 DOM access here
3637
+ var _display = element.style.display,
3638
+ _visibility = element.style.visibility;
3639
+ element.style.display = 'block';element.style.visibility = 'hidden';
3640
+ var calcWidthToForceRepaint = element.offsetWidth;
3641
+
3642
+ // original method
3643
+ var styles = root.getComputedStyle(element);
3644
+ var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
3645
+ var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
3646
+ var result = { width: element.offsetWidth + y, height: element.offsetHeight + x };
3647
+
3648
+ // reset element styles
3649
+ element.style.display = _display;element.style.visibility = _visibility;
3650
+ return result;
3651
+ }
3652
+
3653
+ /**
3654
+ * Get the opposite placement of the given one/
3655
+ * @function
3656
+ * @ignore
3657
+ * @argument {String} placement
3658
+ * @returns {String} flipped placement
3659
+ */
3660
+ function getOppositePlacement(placement) {
3661
+ var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
3662
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
3663
+ return hash[matched];
3664
+ });
3665
+ }
3666
+
3667
+ /**
3668
+ * Given the popper offsets, generate an output similar to getBoundingClientRect
3669
+ * @function
3670
+ * @ignore
3671
+ * @argument {Object} popperOffsets
3672
+ * @returns {Object} ClientRect like output
3673
+ */
3674
+ function getPopperClientRect(popperOffsets) {
3675
+ var offsets = Object.assign({}, popperOffsets);
3676
+ offsets.right = offsets.left + offsets.width;
3677
+ offsets.bottom = offsets.top + offsets.height;
3678
+ return offsets;
3679
+ }
3680
+
3681
+ /**
3682
+ * Given an array and the key to find, returns its index
3683
+ * @function
3684
+ * @ignore
3685
+ * @argument {Array} arr
3686
+ * @argument keyToFind
3687
+ * @returns index or null
3688
+ */
3689
+ function getArrayKeyIndex(arr, keyToFind) {
3690
+ var i = 0,
3691
+ key;
3692
+ for (key in arr) {
3693
+ if (arr[key] === keyToFind) {
3694
+ return i;
3695
+ }
3696
+ i++;
3697
+ }
3698
+ return null;
3699
+ }
3700
+
3701
+ /**
3702
+ * Get CSS computed property of the given element
3703
+ * @function
3704
+ * @ignore
3705
+ * @argument {Eement} element
3706
+ * @argument {String} property
3707
+ */
3708
+ function getStyleComputedProperty(element, property) {
3709
+ // NOTE: 1 DOM access here
3710
+ var css = root.getComputedStyle(element, null);
3711
+ return css[property];
3712
+ }
3713
+
3714
+ /**
3715
+ * Returns the offset parent of the given element
3716
+ * @function
3717
+ * @ignore
3718
+ * @argument {Element} element
3719
+ * @returns {Element} offset parent
3720
+ */
3721
+ function getOffsetParent(element) {
3722
+ // NOTE: 1 DOM access here
3723
+ var offsetParent = element.offsetParent;
3724
+ return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
3725
+ }
3726
+
3727
+ /**
3728
+ * Returns the scrolling parent of the given element
3729
+ * @function
3730
+ * @ignore
3731
+ * @argument {Element} element
3732
+ * @returns {Element} offset parent
3733
+ */
3734
+ function getScrollParent(element) {
3735
+ var parent = element.parentNode;
3736
+
3737
+ if (!parent) {
3738
+ return element;
3739
+ }
3740
+
3741
+ if (parent === root.document) {
3742
+ // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
3743
+ // greater than 0 and return the proper element
3744
+ if (root.document.body.scrollTop || root.document.body.scrollLeft) {
3745
+ return root.document.body;
3746
+ } else {
3747
+ return root.document.documentElement;
3748
+ }
3749
+ }
3750
+
3751
+ // Firefox want us to check `-x` and `-y` variations as well
3752
+ if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
3753
+ // If the detected scrollParent is body, we perform an additional check on its parentNode
3754
+ // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
3755
+ // fixes issue #65
3756
+ return parent;
3757
+ }
3758
+ return getScrollParent(element.parentNode);
3759
+ }
3760
+
3761
+ /**
3762
+ * Check if the given element is fixed or is inside a fixed parent
3763
+ * @function
3764
+ * @ignore
3765
+ * @argument {Element} element
3766
+ * @argument {Element} customContainer
3767
+ * @returns {Boolean} answer to "isFixed?"
3768
+ */
3769
+ function isFixed(element) {
3770
+ if (element === root.document.body) {
3771
+ return false;
3772
+ }
3773
+ if (getStyleComputedProperty(element, 'position') === 'fixed') {
3774
+ return true;
3775
+ }
3776
+ return element.parentNode ? isFixed(element.parentNode) : element;
3777
+ }
3778
+
3779
+ /**
3780
+ * Set the style to the given popper
3781
+ * @function
3782
+ * @ignore
3783
+ * @argument {Element} element - Element to apply the style to
3784
+ * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
3785
+ */
3786
+ function setStyle(element, styles) {
3787
+ function is_numeric(n) {
3788
+ return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
3789
+ }
3790
+ Object.keys(styles).forEach(function (prop) {
3791
+ var unit = '';
3792
+ // add unit if the value is numeric and is one of the following
3793
+ if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
3794
+ unit = 'px';
3795
+ }
3796
+ element.style[prop] = styles[prop] + unit;
3797
+ });
3798
+ }
3799
+
3800
+ /**
3801
+ * Check if the given variable is a function
3802
+ * @function
3803
+ * @ignore
3804
+ * @argument {*} functionToCheck - variable to check
3805
+ * @returns {Boolean} answer to: is a function?
3806
+ */
3807
+ function isFunction(functionToCheck) {
3808
+ var getType = {};
3809
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
3810
+ }
3811
+
3812
+ /**
3813
+ * Get the position of the given element, relative to its offset parent
3814
+ * @function
3815
+ * @ignore
3816
+ * @param {Element} element
3817
+ * @return {Object} position - Coordinates of the element and its `scrollTop`
3818
+ */
3819
+ function getOffsetRect(element) {
3820
+ var elementRect = {
3821
+ width: element.offsetWidth,
3822
+ height: element.offsetHeight,
3823
+ left: element.offsetLeft,
3824
+ top: element.offsetTop
3825
+ };
3826
+
3827
+ elementRect.right = elementRect.left + elementRect.width;
3828
+ elementRect.bottom = elementRect.top + elementRect.height;
3829
+
3830
+ // position
3831
+ return elementRect;
3832
+ }
3833
+
3834
+ /**
3835
+ * Get bounding client rect of given element
3836
+ * @function
3837
+ * @ignore
3838
+ * @param {HTMLElement} element
3839
+ * @return {Object} client rect
3840
+ */
3841
+ function getBoundingClientRect(element) {
3842
+ var rect = element.getBoundingClientRect();
3843
+
3844
+ // whether the IE version is lower than 11
3845
+ var isIE = navigator.userAgent.indexOf("MSIE") != -1;
3846
+
3847
+ // fix ie document bounding top always 0 bug
3848
+ var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
3849
+
3850
+ return {
3851
+ left: rect.left,
3852
+ top: rectTop,
3853
+ right: rect.right,
3854
+ bottom: rect.bottom,
3855
+ width: rect.right - rect.left,
3856
+ height: rect.bottom - rectTop
3857
+ };
3858
+ }
3859
+
3860
+ /**
3861
+ * Given an element and one of its parents, return the offset
3862
+ * @function
3863
+ * @ignore
3864
+ * @param {HTMLElement} element
3865
+ * @param {HTMLElement} parent
3866
+ * @return {Object} rect
3867
+ */
3868
+ function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
3869
+ var elementRect = getBoundingClientRect(element);
3870
+ var parentRect = getBoundingClientRect(parent);
3871
+
3872
+ if (fixed) {
3873
+ var scrollParent = getScrollParent(parent);
3874
+ parentRect.top += scrollParent.scrollTop;
3875
+ parentRect.bottom += scrollParent.scrollTop;
3876
+ parentRect.left += scrollParent.scrollLeft;
3877
+ parentRect.right += scrollParent.scrollLeft;
3878
+ }
3879
+
3880
+ var rect = {
3881
+ top: elementRect.top - parentRect.top,
3882
+ left: elementRect.left - parentRect.left,
3883
+ bottom: elementRect.top - parentRect.top + elementRect.height,
3884
+ right: elementRect.left - parentRect.left + elementRect.width,
3885
+ width: elementRect.width,
3886
+ height: elementRect.height
3887
+ };
3888
+ return rect;
3889
+ }
3890
+
3891
+ /**
3892
+ * Get the prefixed supported property name
3893
+ * @function
3894
+ * @ignore
3895
+ * @argument {String} property (camelCase)
3896
+ * @returns {String} prefixed property (camelCase)
3897
+ */
3898
+ function getSupportedPropertyName(property) {
3899
+ var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
3900
+
3901
+ for (var i = 0; i < prefixes.length; i++) {
3902
+ var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
3903
+ if (typeof root.document.body.style[toCheck] !== 'undefined') {
3904
+ return toCheck;
3905
+ }
3906
+ }
3907
+ return null;
3908
+ }
3909
+
3910
+ /**
3911
+ * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
3912
+ * objects to a target object. It will return the target object.
3913
+ * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
3914
+ * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
3915
+ * @function
3916
+ * @ignore
3917
+ */
3918
+ if (!Object.assign) {
3919
+ Object.defineProperty(Object, 'assign', {
3920
+ enumerable: false,
3921
+ configurable: true,
3922
+ writable: true,
3923
+ value: function value(target) {
3924
+ if (target === undefined || target === null) {
3925
+ throw new TypeError('Cannot convert first argument to object');
3926
+ }
3927
+
3928
+ var to = Object(target);
3929
+ for (var i = 1; i < arguments.length; i++) {
3930
+ var nextSource = arguments[i];
3931
+ if (nextSource === undefined || nextSource === null) {
3932
+ continue;
3933
+ }
3934
+ nextSource = Object(nextSource);
3935
+
3936
+ var keysArray = Object.keys(nextSource);
3937
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
3938
+ var nextKey = keysArray[nextIndex];
3939
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
3940
+ if (desc !== undefined && desc.enumerable) {
3941
+ to[nextKey] = nextSource[nextKey];
3942
+ }
3943
+ }
3944
+ }
3945
+ return to;
3946
+ }
3947
+ });
3948
+ }
89
3949
 
90
- /***/ 0:
3950
+ return Popper;
3951
+ });
3952
+
3953
+ /***/ }),
3954
+ /* 24 */,
3955
+ /* 25 */
91
3956
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
3957
 
93
3958
  "use strict";
94
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
- /* globals __VUE_SSR_CONTEXT__ */
3959
+ // ESM COMPAT FLAG
3960
+ __webpack_require__.r(__webpack_exports__);
96
3961
 
97
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
98
- // This module is a runtime utility for cleaner component module output and will
99
- // be included in the final webpack user bundle.
3962
+ // EXTERNAL MODULE: ./src/utils/resize-event.js
3963
+ var resize_event = __webpack_require__(14);
3964
+
3965
+ // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
3966
+ var scrollbar_width = __webpack_require__(8);
3967
+
3968
+ // EXTERNAL MODULE: ./src/utils/util.js
3969
+ var util = __webpack_require__(3);
3970
+
3971
+ // EXTERNAL MODULE: ./src/utils/dom.js
3972
+ var dom = __webpack_require__(1);
3973
+
3974
+ // CONCATENATED MODULE: ./packages/scrollbar/src/util.js
3975
+ var BAR_MAP = {
3976
+ vertical: {
3977
+ offset: 'offsetHeight',
3978
+ scroll: 'scrollTop',
3979
+ scrollSize: 'scrollHeight',
3980
+ size: 'height',
3981
+ key: 'vertical',
3982
+ axis: 'Y',
3983
+ client: 'clientY',
3984
+ direction: 'top'
3985
+ },
3986
+ horizontal: {
3987
+ offset: 'offsetWidth',
3988
+ scroll: 'scrollLeft',
3989
+ scrollSize: 'scrollWidth',
3990
+ size: 'width',
3991
+ key: 'horizontal',
3992
+ axis: 'X',
3993
+ client: 'clientX',
3994
+ direction: 'left'
3995
+ }
3996
+ };
100
3997
 
101
- function normalizeComponent(
102
- scriptExports,
103
- render,
104
- staticRenderFns,
105
- functionalTemplate,
106
- injectStyles,
107
- scopeId,
108
- moduleIdentifier /* server only */,
109
- shadowMode /* vue-cli only */
110
- ) {
111
- // Vue.extend constructor export interop
112
- var options =
113
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
3998
+ function renderThumbStyle(_ref) {
3999
+ var move = _ref.move,
4000
+ size = _ref.size,
4001
+ bar = _ref.bar;
114
4002
 
115
- // render functions
116
- if (render) {
117
- options.render = render
118
- options.staticRenderFns = staticRenderFns
119
- options._compiled = true
120
- }
4003
+ var style = {};
4004
+ var translate = 'translate' + bar.axis + '(' + move + '%)';
121
4005
 
122
- // functional template
123
- if (functionalTemplate) {
124
- options.functional = true
125
- }
4006
+ style[bar.size] = size;
4007
+ style.transform = translate;
4008
+ style.msTransform = translate;
4009
+ style.webkitTransform = translate;
126
4010
 
127
- // scopedId
128
- if (scopeId) {
129
- options._scopeId = 'data-v-' + scopeId
130
- }
4011
+ return style;
4012
+ };
4013
+ // CONCATENATED MODULE: ./packages/scrollbar/src/bar.js
131
4014
 
132
- var hook
133
- if (moduleIdentifier) {
134
- // server build
135
- hook = function (context) {
136
- // 2.3 injection
137
- context =
138
- context || // cached call
139
- (this.$vnode && this.$vnode.ssrContext) || // stateful
140
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
141
- // 2.2 with runInNewContext: true
142
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
143
- context = __VUE_SSR_CONTEXT__
144
- }
145
- // inject component styles
146
- if (injectStyles) {
147
- injectStyles.call(this, context)
148
- }
149
- // register component module identifier for async chunk inferrence
150
- if (context && context._registeredComponents) {
151
- context._registeredComponents.add(moduleIdentifier)
152
- }
153
- }
154
- // used by ssr in case component is cached and beforeCreate
155
- // never gets called
156
- options._ssrRegister = hook
157
- } else if (injectStyles) {
158
- hook = shadowMode
159
- ? function () {
160
- injectStyles.call(
161
- this,
162
- (options.functional ? this.parent : this).$root.$options.shadowRoot
163
- )
164
- }
165
- : injectStyles
166
- }
167
4015
 
168
- if (hook) {
169
- if (options.functional) {
170
- // for template-only hot-reload because in that case the render fn doesn't
171
- // go through the normalizer
172
- options._injectStyles = hook
173
- // register for functional component in vue file
174
- var originalRender = options.render
175
- options.render = function renderWithStyleInjection(h, context) {
176
- hook.call(context)
177
- return originalRender(h, context)
178
- }
179
- } else {
180
- // inject component registration as beforeCreate hook
181
- var existing = options.beforeCreate
182
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
183
- }
184
- }
185
4016
 
186
- return {
187
- exports: scriptExports,
188
- options: options
189
- }
190
- }
4017
+ /* istanbul ignore next */
4018
+ /* harmony default export */ var src_bar = ({
4019
+ name: 'Bar',
191
4020
 
4021
+ props: {
4022
+ vertical: Boolean,
4023
+ size: String,
4024
+ move: Number
4025
+ },
192
4026
 
193
- /***/ }),
4027
+ computed: {
4028
+ bar: function bar() {
4029
+ return BAR_MAP[this.vertical ? 'vertical' : 'horizontal'];
4030
+ },
4031
+ wrap: function wrap() {
4032
+ return this.$parent.wrap;
4033
+ }
4034
+ },
194
4035
 
195
- /***/ 10:
196
- /***/ (function(module, exports) {
4036
+ render: function render(h) {
4037
+ var size = this.size,
4038
+ move = this.move,
4039
+ bar = this.bar;
197
4040
 
198
- module.exports = require("cy-element-ui/lib/input");
199
4041
 
200
- /***/ }),
4042
+ return h(
4043
+ 'div',
4044
+ {
4045
+ 'class': ['el-scrollbar__bar', 'is-' + bar.key],
4046
+ on: {
4047
+ 'mousedown': this.clickTrackHandler
4048
+ }
4049
+ },
4050
+ [h('div', {
4051
+ ref: 'thumb',
4052
+ 'class': 'el-scrollbar__thumb',
4053
+ on: {
4054
+ 'mousedown': this.clickThumbHandler
4055
+ },
4056
+
4057
+ style: renderThumbStyle({ size: size, move: move, bar: bar }) })]
4058
+ );
4059
+ },
201
4060
 
202
- /***/ 12:
203
- /***/ (function(module, exports) {
204
4061
 
205
- module.exports = require("cy-element-ui/lib/utils/clickoutside");
4062
+ methods: {
4063
+ clickThumbHandler: function clickThumbHandler(e) {
4064
+ // prevent click event of right button
4065
+ if (e.ctrlKey || e.button === 2) {
4066
+ return;
4067
+ }
4068
+ this.startDrag(e);
4069
+ this[this.bar.axis] = e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction]);
4070
+ },
4071
+ clickTrackHandler: function clickTrackHandler(e) {
4072
+ var offset = Math.abs(e.target.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]);
4073
+ var thumbHalf = this.$refs.thumb[this.bar.offset] / 2;
4074
+ var thumbPositionPercentage = (offset - thumbHalf) * 100 / this.$el[this.bar.offset];
206
4075
 
207
- /***/ }),
4076
+ this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
4077
+ },
4078
+ startDrag: function startDrag(e) {
4079
+ e.stopImmediatePropagation();
4080
+ this.cursorDown = true;
208
4081
 
209
- /***/ 16:
210
- /***/ (function(module, exports) {
4082
+ Object(dom["g" /* on */])(document, 'mousemove', this.mouseMoveDocumentHandler);
4083
+ Object(dom["g" /* on */])(document, 'mouseup', this.mouseUpDocumentHandler);
4084
+ document.onselectstart = function () {
4085
+ return false;
4086
+ };
4087
+ },
4088
+ mouseMoveDocumentHandler: function mouseMoveDocumentHandler(e) {
4089
+ if (this.cursorDown === false) return;
4090
+ var prevPage = this[this.bar.axis];
211
4091
 
212
- module.exports = require("cy-element-ui/lib/scrollbar");
4092
+ if (!prevPage) return;
213
4093
 
214
- /***/ }),
4094
+ var offset = (this.$el.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]) * -1;
4095
+ var thumbClickPosition = this.$refs.thumb[this.bar.offset] - prevPage;
4096
+ var thumbPositionPercentage = (offset - thumbClickPosition) * 100 / this.$el[this.bar.offset];
215
4097
 
216
- /***/ 17:
217
- /***/ (function(module, exports) {
4098
+ this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
4099
+ },
4100
+ mouseUpDocumentHandler: function mouseUpDocumentHandler(e) {
4101
+ this.cursorDown = false;
4102
+ this[this.bar.axis] = 0;
4103
+ Object(dom["f" /* off */])(document, 'mousemove', this.mouseMoveDocumentHandler);
4104
+ document.onselectstart = null;
4105
+ }
4106
+ },
4107
+
4108
+ destroyed: function destroyed() {
4109
+ Object(dom["f" /* off */])(document, 'mouseup', this.mouseUpDocumentHandler);
4110
+ }
4111
+ });
4112
+ // CONCATENATED MODULE: ./packages/scrollbar/src/main.js
4113
+ // reference https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js
218
4114
 
219
- module.exports = require("cy-element-ui/lib/utils/resize-event");
220
4115
 
221
- /***/ }),
222
4116
 
223
- /***/ 19:
224
- /***/ (function(module, exports) {
225
4117
 
226
- module.exports = require("throttle-debounce/debounce");
227
4118
 
228
- /***/ }),
229
4119
 
230
- /***/ 21:
231
- /***/ (function(module, exports) {
4120
+ /* istanbul ignore next */
4121
+ /* harmony default export */ var main = ({
4122
+ name: 'ElScrollbar',
232
4123
 
233
- module.exports = require("cy-element-ui/lib/utils/shared");
4124
+ components: { Bar: src_bar },
234
4125
 
235
- /***/ }),
4126
+ props: {
4127
+ native: Boolean,
4128
+ wrapStyle: {},
4129
+ wrapClass: {},
4130
+ viewClass: {},
4131
+ viewStyle: {},
4132
+ noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能
4133
+ tag: {
4134
+ type: String,
4135
+ default: 'div'
4136
+ }
4137
+ },
236
4138
 
237
- /***/ 22:
238
- /***/ (function(module, exports) {
4139
+ data: function data() {
4140
+ return {
4141
+ sizeWidth: '0',
4142
+ sizeHeight: '0',
4143
+ moveX: 0,
4144
+ moveY: 0
4145
+ };
4146
+ },
239
4147
 
240
- module.exports = require("cy-element-ui/lib/mixins/focus");
241
4148
 
242
- /***/ }),
4149
+ computed: {
4150
+ wrap: function wrap() {
4151
+ return this.$refs.wrap;
4152
+ }
4153
+ },
243
4154
 
244
- /***/ 3:
245
- /***/ (function(module, exports) {
4155
+ render: function render(h) {
4156
+ var gutter = Object(scrollbar_width["a" /* default */])();
4157
+ var style = this.wrapStyle;
246
4158
 
247
- module.exports = require("cy-element-ui/lib/utils/util");
4159
+ if (gutter) {
4160
+ var gutterWith = '-' + gutter + 'px';
4161
+ var gutterStyle = 'margin-bottom: ' + gutterWith + '; margin-right: ' + gutterWith + ';';
248
4162
 
249
- /***/ }),
4163
+ if (Array.isArray(this.wrapStyle)) {
4164
+ style = Object(util["t" /* toObject */])(this.wrapStyle);
4165
+ style.marginRight = style.marginBottom = gutterWith;
4166
+ } else if (typeof this.wrapStyle === 'string') {
4167
+ style += gutterStyle;
4168
+ } else {
4169
+ style = gutterStyle;
4170
+ }
4171
+ }
4172
+ var view = h(this.tag, {
4173
+ class: ['el-scrollbar__view', this.viewClass],
4174
+ style: this.viewStyle,
4175
+ ref: 'resize'
4176
+ }, this.$slots.default);
4177
+ var wrap = h(
4178
+ 'div',
4179
+ {
4180
+ ref: 'wrap',
4181
+ style: style,
4182
+ on: {
4183
+ 'scroll': this.handleScroll
4184
+ },
4185
+
4186
+ 'class': [this.wrapClass, 'el-scrollbar__wrap', gutter ? '' : 'el-scrollbar__wrap--hidden-default'] },
4187
+ [[view]]
4188
+ );
4189
+ var nodes = void 0;
4190
+
4191
+ if (!this.native) {
4192
+ nodes = [wrap, h(src_bar, {
4193
+ attrs: {
4194
+ move: this.moveX,
4195
+ size: this.sizeWidth }
4196
+ }), h(src_bar, {
4197
+ attrs: {
4198
+ vertical: true,
4199
+ move: this.moveY,
4200
+ size: this.sizeHeight }
4201
+ })];
4202
+ } else {
4203
+ nodes = [h(
4204
+ 'div',
4205
+ {
4206
+ ref: 'wrap',
4207
+ 'class': [this.wrapClass, 'el-scrollbar__wrap'],
4208
+ style: style },
4209
+ [[view]]
4210
+ )];
4211
+ }
4212
+ return h('div', { class: 'el-scrollbar' }, nodes);
4213
+ },
250
4214
 
251
- /***/ 31:
252
- /***/ (function(module, exports) {
253
4215
 
254
- module.exports = require("cy-element-ui/lib/utils/scroll-into-view");
4216
+ methods: {
4217
+ handleScroll: function handleScroll() {
4218
+ var wrap = this.wrap;
4219
+
4220
+ this.moveY = wrap.scrollTop * 100 / wrap.clientHeight;
4221
+ this.moveX = wrap.scrollLeft * 100 / wrap.clientWidth;
4222
+ },
4223
+ update: function update() {
4224
+ var heightPercentage = void 0,
4225
+ widthPercentage = void 0;
4226
+ var wrap = this.wrap;
4227
+ if (!wrap) return;
4228
+
4229
+ heightPercentage = wrap.clientHeight * 100 / wrap.scrollHeight;
4230
+ widthPercentage = wrap.clientWidth * 100 / wrap.scrollWidth;
4231
+
4232
+ this.sizeHeight = heightPercentage < 100 ? heightPercentage + '%' : '';
4233
+ this.sizeWidth = widthPercentage < 100 ? widthPercentage + '%' : '';
4234
+ }
4235
+ },
4236
+
4237
+ mounted: function mounted() {
4238
+ if (this.native) return;
4239
+ this.$nextTick(this.update);
4240
+ !this.noresize && Object(resize_event["a" /* addResizeListener */])(this.$refs.resize, this.update);
4241
+ },
4242
+ beforeDestroy: function beforeDestroy() {
4243
+ if (this.native) return;
4244
+ !this.noresize && Object(resize_event["b" /* removeResizeListener */])(this.$refs.resize, this.update);
4245
+ }
4246
+ });
4247
+ // CONCATENATED MODULE: ./packages/scrollbar/index.js
4248
+
4249
+
4250
+ /* istanbul ignore next */
4251
+ main.install = function (Vue) {
4252
+ Vue.component(main.name, main);
4253
+ };
4254
+
4255
+ /* harmony default export */ var scrollbar = __webpack_exports__["default"] = (main);
255
4256
 
256
4257
  /***/ }),
4258
+ /* 26 */,
4259
+ /* 27 */,
4260
+ /* 28 */,
4261
+ /* 29 */,
4262
+ /* 30 */
4263
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4264
+
4265
+ "use strict";
4266
+ /* harmony default export */ __webpack_exports__["a"] = (function (ref) {
4267
+ return {
4268
+ methods: {
4269
+ focus: function focus() {
4270
+ this.$refs[ref].focus();
4271
+ }
4272
+ }
4273
+ };
4274
+ });;
257
4275
 
258
- /***/ 33:
4276
+ /***/ }),
4277
+ /* 31 */
259
4278
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
260
4279
 
261
4280
  "use strict";
@@ -303,12 +4322,11 @@ render._withStripped = true
303
4322
 
304
4323
  // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=template&id=f9fadb56
305
4324
 
306
- // EXTERNAL MODULE: external "cy-element-ui/lib/mixins/emitter"
307
- var emitter_ = __webpack_require__(4);
308
- var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
4325
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
4326
+ var emitter = __webpack_require__(6);
309
4327
 
310
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/util"
311
- var util_ = __webpack_require__(3);
4328
+ // EXTERNAL MODULE: ./src/utils/util.js
4329
+ var util = __webpack_require__(3);
312
4330
 
313
4331
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=script&lang=js
314
4332
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
@@ -317,7 +4335,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
317
4335
 
318
4336
 
319
4337
  /* harmony default export */ var optionvue_type_script_lang_js = ({
320
- mixins: [emitter_default.a],
4338
+ mixins: [emitter["a" /* default */]],
321
4339
 
322
4340
  name: 'ElOption',
323
4341
 
@@ -398,7 +4416,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
398
4416
  return a === b;
399
4417
  } else {
400
4418
  var valueKey = this.select.valueKey;
401
- return Object(util_["getValueByPath"])(a, valueKey) === Object(util_["getValueByPath"])(b, valueKey);
4419
+ return Object(util["i" /* getValueByPath */])(a, valueKey) === Object(util["i" /* getValueByPath */])(b, valueKey);
402
4420
  }
403
4421
  },
404
4422
  contains: function contains() {
@@ -410,7 +4428,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
410
4428
  } else {
411
4429
  var valueKey = this.select.valueKey;
412
4430
  return arr && arr.some(function (item) {
413
- return Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(target, valueKey);
4431
+ return Object(util["i" /* getValueByPath */])(item, valueKey) === Object(util["i" /* getValueByPath */])(target, valueKey);
414
4432
  });
415
4433
  }
416
4434
  },
@@ -428,7 +4446,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
428
4446
  }
429
4447
  },
430
4448
  queryChange: function queryChange(query) {
431
- this.visible = new RegExp(Object(util_["escapeRegexpString"])(query), 'i').test(this.currentLabel) || this.created;
4449
+ this.visible = new RegExp(Object(util["f" /* escapeRegexpString */])(query), 'i').test(this.currentLabel) || this.created;
432
4450
  if (!this.visible) {
433
4451
  this.select.filteredOptionsCount--;
434
4452
  }
@@ -463,7 +4481,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
463
4481
  // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=script&lang=js
464
4482
  /* harmony default export */ var src_optionvue_type_script_lang_js = (optionvue_type_script_lang_js);
465
4483
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
466
- var componentNormalizer = __webpack_require__(0);
4484
+ var componentNormalizer = __webpack_require__(2);
467
4485
 
468
4486
  // CONCATENATED MODULE: ./packages/select/src/option.vue
469
4487
 
@@ -487,36 +4505,171 @@ var component = Object(componentNormalizer["a" /* default */])(
487
4505
  /* harmony default export */ var src_option = __webpack_exports__["a"] = (component.exports);
488
4506
 
489
4507
  /***/ }),
4508
+ /* 32 */
4509
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
490
4510
 
491
- /***/ 38:
492
- /***/ (function(module, exports) {
4511
+ "use strict";
4512
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scrollIntoView; });
4513
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
4514
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
493
4515
 
494
- module.exports = require("cy-element-ui/lib/tag");
495
4516
 
496
- /***/ }),
4517
+ function scrollIntoView(container, selected) {
4518
+ if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return;
497
4519
 
498
- /***/ 4:
499
- /***/ (function(module, exports) {
4520
+ if (!selected) {
4521
+ container.scrollTop = 0;
4522
+ return;
4523
+ }
500
4524
 
501
- module.exports = require("cy-element-ui/lib/mixins/emitter");
4525
+ var offsetParents = [];
4526
+ var pointer = selected.offsetParent;
4527
+ while (pointer && container !== pointer && container.contains(pointer)) {
4528
+ offsetParents.push(pointer);
4529
+ pointer = pointer.offsetParent;
4530
+ }
4531
+ var top = selected.offsetTop + offsetParents.reduce(function (prev, curr) {
4532
+ return prev + curr.offsetTop;
4533
+ }, 0);
4534
+ var bottom = top + selected.offsetHeight;
4535
+ var viewRectTop = container.scrollTop;
4536
+ var viewRectBottom = viewRectTop + container.clientHeight;
4537
+
4538
+ if (top < viewRectTop) {
4539
+ container.scrollTop = top;
4540
+ } else if (bottom > viewRectBottom) {
4541
+ container.scrollTop = bottom - container.clientHeight;
4542
+ }
4543
+ }
502
4544
 
503
4545
  /***/ }),
4546
+ /* 33 */,
4547
+ /* 34 */,
4548
+ /* 35 */,
4549
+ /* 36 */
4550
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
504
4551
 
505
- /***/ 5:
506
- /***/ (function(module, exports) {
4552
+ "use strict";
4553
+ // ESM COMPAT FLAG
4554
+ __webpack_require__.r(__webpack_exports__);
507
4555
 
508
- module.exports = require("cy-element-ui/lib/utils/vue-popper");
4556
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tag/src/tag.vue?vue&type=script&lang=js
509
4557
 
510
- /***/ }),
4558
+ /* harmony default export */ var tagvue_type_script_lang_js = ({
4559
+ name: 'ElTag',
4560
+ props: {
4561
+ text: String,
4562
+ closable: Boolean,
4563
+ type: String,
4564
+ hit: Boolean,
4565
+ disableTransitions: Boolean,
4566
+ color: String,
4567
+ size: String,
4568
+ effect: {
4569
+ type: String,
4570
+ default: 'light',
4571
+ validator: function validator(val) {
4572
+ return ['dark', 'light', 'plain'].indexOf(val) !== -1;
4573
+ }
4574
+ }
4575
+ },
4576
+ methods: {
4577
+ handleClose: function handleClose(event) {
4578
+ event.stopPropagation();
4579
+ this.$emit('close', event);
4580
+ },
4581
+ handleClick: function handleClick(event) {
4582
+ this.$emit('click', event);
4583
+ }
4584
+ },
4585
+ computed: {
4586
+ tagSize: function tagSize() {
4587
+ return this.size || (this.$ELEMENT || {}).size;
4588
+ }
4589
+ },
4590
+ render: function render(h) {
4591
+ var type = this.type,
4592
+ tagSize = this.tagSize,
4593
+ hit = this.hit,
4594
+ effect = this.effect;
4595
+
4596
+ var classes = ['el-tag', type ? 'el-tag--' + type : '', tagSize ? 'el-tag--' + tagSize : '', effect ? 'el-tag--' + effect : '', hit && 'is-hit'];
4597
+ var tagEl = h(
4598
+ 'span',
4599
+ {
4600
+ 'class': classes,
4601
+ style: { backgroundColor: this.color },
4602
+ on: {
4603
+ 'click': this.handleClick
4604
+ }
4605
+ },
4606
+ [this.$slots.default, this.closable && h('i', { 'class': 'el-tag__close el-icon-close', on: {
4607
+ 'click': this.handleClose
4608
+ }
4609
+ })]
4610
+ );
4611
+
4612
+ return this.disableTransitions ? tagEl : h(
4613
+ 'transition',
4614
+ {
4615
+ attrs: { name: 'el-zoom-in-center' }
4616
+ },
4617
+ [tagEl]
4618
+ );
4619
+ }
4620
+ });
4621
+ // CONCATENATED MODULE: ./packages/tag/src/tag.vue?vue&type=script&lang=js
4622
+ /* harmony default export */ var src_tagvue_type_script_lang_js = (tagvue_type_script_lang_js);
4623
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
4624
+ var componentNormalizer = __webpack_require__(2);
511
4625
 
512
- /***/ 6:
513
- /***/ (function(module, exports) {
4626
+ // CONCATENATED MODULE: ./packages/tag/src/tag.vue
4627
+ var render, staticRenderFns
514
4628
 
515
- module.exports = require("cy-element-ui/lib/mixins/locale");
516
4629
 
517
- /***/ }),
518
4630
 
519
- /***/ 65:
4631
+
4632
+ /* normalize component */
4633
+
4634
+ var component = Object(componentNormalizer["a" /* default */])(
4635
+ src_tagvue_type_script_lang_js,
4636
+ render,
4637
+ staticRenderFns,
4638
+ false,
4639
+ null,
4640
+ null,
4641
+ null
4642
+
4643
+ )
4644
+
4645
+ /* harmony default export */ var tag = (component.exports);
4646
+ // CONCATENATED MODULE: ./packages/tag/index.js
4647
+
4648
+
4649
+ /* istanbul ignore next */
4650
+ tag.install = function (Vue) {
4651
+ Vue.component(tag.name, tag);
4652
+ };
4653
+
4654
+ /* harmony default export */ var packages_tag = __webpack_exports__["default"] = (tag);
4655
+
4656
+ /***/ }),
4657
+ /* 37 */,
4658
+ /* 38 */,
4659
+ /* 39 */,
4660
+ /* 40 */,
4661
+ /* 41 */,
4662
+ /* 42 */,
4663
+ /* 43 */,
4664
+ /* 44 */,
4665
+ /* 45 */,
4666
+ /* 46 */,
4667
+ /* 47 */,
4668
+ /* 48 */,
4669
+ /* 49 */,
4670
+ /* 50 */,
4671
+ /* 51 */,
4672
+ /* 52 */
520
4673
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
521
4674
 
522
4675
  "use strict";
@@ -984,21 +5137,17 @@ render._withStripped = true
984
5137
 
985
5138
  // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=142af01b
986
5139
 
987
- // EXTERNAL MODULE: external "cy-element-ui/lib/mixins/emitter"
988
- var emitter_ = __webpack_require__(4);
989
- var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
5140
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
5141
+ var emitter = __webpack_require__(6);
990
5142
 
991
- // EXTERNAL MODULE: external "cy-element-ui/lib/mixins/focus"
992
- var focus_ = __webpack_require__(22);
993
- var focus_default = /*#__PURE__*/__webpack_require__.n(focus_);
5143
+ // EXTERNAL MODULE: ./src/mixins/focus.js
5144
+ var mixins_focus = __webpack_require__(30);
994
5145
 
995
- // EXTERNAL MODULE: external "cy-element-ui/lib/mixins/locale"
996
- var locale_ = __webpack_require__(6);
997
- var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
5146
+ // EXTERNAL MODULE: ./src/mixins/locale.js
5147
+ var locale = __webpack_require__(13);
998
5148
 
999
- // EXTERNAL MODULE: external "cy-element-ui/lib/input"
1000
- var input_ = __webpack_require__(10);
1001
- var input_default = /*#__PURE__*/__webpack_require__.n(input_);
5149
+ // EXTERNAL MODULE: ./packages/input/index.js + 6 modules
5150
+ var packages_input = __webpack_require__(18);
1002
5151
 
1003
5152
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=template&id=be02efd8
1004
5153
  var select_dropdownvue_type_template_id_be02efd8_render = function render() {
@@ -1021,9 +5170,8 @@ select_dropdownvue_type_template_id_be02efd8_render._withStripped = true
1021
5170
 
1022
5171
  // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=template&id=be02efd8
1023
5172
 
1024
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/vue-popper"
1025
- var vue_popper_ = __webpack_require__(5);
1026
- var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
5173
+ // EXTERNAL MODULE: ./src/utils/vue-popper.js
5174
+ var vue_popper = __webpack_require__(10);
1027
5175
 
1028
5176
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=script&lang=js
1029
5177
 
@@ -1034,7 +5182,7 @@ var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
1034
5182
 
1035
5183
  componentName: 'ElSelectDropdown',
1036
5184
 
1037
- mixins: [vue_popper_default.a],
5185
+ mixins: [vue_popper["a" /* default */]],
1038
5186
 
1039
5187
  props: {
1040
5188
  placement: {
@@ -1096,7 +5244,7 @@ var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
1096
5244
  // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=script&lang=js
1097
5245
  /* harmony default export */ var src_select_dropdownvue_type_script_lang_js = (select_dropdownvue_type_script_lang_js);
1098
5246
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1099
- var componentNormalizer = __webpack_require__(0);
5247
+ var componentNormalizer = __webpack_require__(2);
1100
5248
 
1101
5249
  // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue
1102
5250
 
@@ -1119,33 +5267,29 @@ var component = Object(componentNormalizer["a" /* default */])(
1119
5267
 
1120
5268
  /* harmony default export */ var select_dropdown = (component.exports);
1121
5269
  // EXTERNAL MODULE: ./packages/select/src/option.vue + 4 modules
1122
- var src_option = __webpack_require__(33);
5270
+ var src_option = __webpack_require__(31);
1123
5271
 
1124
- // EXTERNAL MODULE: external "cy-element-ui/lib/tag"
1125
- var tag_ = __webpack_require__(38);
1126
- var tag_default = /*#__PURE__*/__webpack_require__.n(tag_);
5272
+ // EXTERNAL MODULE: ./packages/tag/index.js + 3 modules
5273
+ var tag = __webpack_require__(36);
1127
5274
 
1128
- // EXTERNAL MODULE: external "cy-element-ui/lib/scrollbar"
1129
- var scrollbar_ = __webpack_require__(16);
1130
- var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
5275
+ // EXTERNAL MODULE: ./packages/scrollbar/index.js + 3 modules
5276
+ var scrollbar = __webpack_require__(25);
1131
5277
 
1132
5278
  // EXTERNAL MODULE: external "throttle-debounce/debounce"
1133
- var debounce_ = __webpack_require__(19);
5279
+ var debounce_ = __webpack_require__(22);
1134
5280
  var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
1135
5281
 
1136
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/clickoutside"
1137
- var clickoutside_ = __webpack_require__(12);
1138
- var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
5282
+ // EXTERNAL MODULE: ./src/utils/clickoutside.js
5283
+ var clickoutside = __webpack_require__(21);
1139
5284
 
1140
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/resize-event"
1141
- var resize_event_ = __webpack_require__(17);
5285
+ // EXTERNAL MODULE: ./src/utils/resize-event.js
5286
+ var resize_event = __webpack_require__(14);
1142
5287
 
1143
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/scroll-into-view"
1144
- var scroll_into_view_ = __webpack_require__(31);
1145
- var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);
5288
+ // EXTERNAL MODULE: ./src/utils/scroll-into-view.js
5289
+ var scroll_into_view = __webpack_require__(32);
1146
5290
 
1147
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/util"
1148
- var util_ = __webpack_require__(3);
5291
+ // EXTERNAL MODULE: ./src/utils/util.js
5292
+ var util = __webpack_require__(3);
1149
5293
 
1150
5294
  // CONCATENATED MODULE: ./packages/select/src/navigation-mixin.js
1151
5295
  /* harmony default export */ var navigation_mixin = ({
@@ -1211,8 +5355,8 @@ var util_ = __webpack_require__(3);
1211
5355
  }
1212
5356
  }
1213
5357
  });
1214
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/shared"
1215
- var shared_ = __webpack_require__(21);
5358
+ // EXTERNAL MODULE: ./src/utils/shared.js
5359
+ var shared = __webpack_require__(16);
1216
5360
 
1217
5361
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=script&lang=js
1218
5362
 
@@ -1233,7 +5377,7 @@ var shared_ = __webpack_require__(21);
1233
5377
 
1234
5378
 
1235
5379
  /* harmony default export */ var selectvue_type_script_lang_js = ({
1236
- mixins: [emitter_default.a, locale_default.a, focus_default()('reference'), navigation_mixin],
5380
+ mixins: [emitter["a" /* default */], locale["a" /* default */], Object(mixins_focus["a" /* default */])('reference'), navigation_mixin],
1237
5381
 
1238
5382
  name: 'ElSelect',
1239
5383
 
@@ -1261,7 +5405,7 @@ var shared_ = __webpack_require__(21);
1261
5405
  return (this.elFormItem || {}).elFormItemSize;
1262
5406
  },
1263
5407
  readonly: function readonly() {
1264
- return !this.filterable || this.multiple || !Object(util_["isIE"])() && !Object(util_["isEdge"])() && !this.visible;
5408
+ return !this.filterable || this.multiple || !Object(util["o" /* isIE */])() && !Object(util["k" /* isEdge */])() && !this.visible;
1265
5409
  },
1266
5410
  showClose: function showClose() {
1267
5411
  var hasValue = this.multiple ? Array.isArray(this.value) && this.value.length > 0 : this.value !== undefined && this.value !== null && this.value !== '';
@@ -1313,14 +5457,14 @@ var shared_ = __webpack_require__(21);
1313
5457
  },
1314
5458
 
1315
5459
  components: {
1316
- ElInput: input_default.a,
5460
+ ElInput: packages_input["default"],
1317
5461
  ElSelectMenu: select_dropdown,
1318
5462
  ElOption: src_option["a" /* default */],
1319
- ElTag: tag_default.a,
1320
- ElScrollbar: scrollbar_default.a
5463
+ ElTag: tag["default"],
5464
+ ElScrollbar: scrollbar["default"]
1321
5465
  },
1322
5466
 
1323
- directives: { Clickoutside: clickoutside_default.a },
5467
+ directives: { Clickoutside: clickoutside["a" /* default */] },
1324
5468
 
1325
5469
  props: {
1326
5470
  name: String,
@@ -1432,7 +5576,7 @@ var shared_ = __webpack_require__(21);
1432
5576
  if (this.filterable && !this.multiple) {
1433
5577
  this.inputLength = 20;
1434
5578
  }
1435
- if (!Object(util_["valueEquals"])(val, oldVal)) {
5579
+ if (!Object(util["u" /* valueEquals */])(val, oldVal)) {
1436
5580
  this.dispatch('ElFormItem', 'el.form.change', val);
1437
5581
  }
1438
5582
  },
@@ -1528,7 +5672,7 @@ var shared_ = __webpack_require__(21);
1528
5672
  });
1529
5673
  } else {
1530
5674
  var lastCharacter = text[text.length - 1] || '';
1531
- this.isOnComposition = !Object(shared_["isKorean"])(lastCharacter);
5675
+ this.isOnComposition = !Object(shared["b" /* isKorean */])(lastCharacter);
1532
5676
  }
1533
5677
  },
1534
5678
  handleQueryChange: function handleQueryChange(val) {
@@ -1571,7 +5715,7 @@ var shared_ = __webpack_require__(21);
1571
5715
  var target = Array.isArray(option) && option[0] ? option[0].$el : option.$el;
1572
5716
  if (this.$refs.popper && target) {
1573
5717
  var menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
1574
- scroll_into_view_default()(menu, target);
5718
+ Object(scroll_into_view["a" /* default */])(menu, target);
1575
5719
  }
1576
5720
  this.$refs.scrollbar && this.$refs.scrollbar.handleScroll();
1577
5721
  },
@@ -1583,7 +5727,7 @@ var shared_ = __webpack_require__(21);
1583
5727
  });
1584
5728
  },
1585
5729
  emitChange: function emitChange(val) {
1586
- if (!Object(util_["valueEquals"])(this.value, val)) {
5730
+ if (!Object(util["u" /* valueEquals */])(this.value, val)) {
1587
5731
  this.$emit('change', val);
1588
5732
  }
1589
5733
  },
@@ -1595,7 +5739,7 @@ var shared_ = __webpack_require__(21);
1595
5739
 
1596
5740
  for (var i = this.cachedOptions.length - 1; i >= 0; i--) {
1597
5741
  var cachedOption = this.cachedOptions[i];
1598
- var isEqual = isObject ? Object(util_["getValueByPath"])(cachedOption.value, this.valueKey) === Object(util_["getValueByPath"])(value, this.valueKey) : cachedOption.value === value;
5742
+ var isEqual = isObject ? Object(util["i" /* getValueByPath */])(cachedOption.value, this.valueKey) === Object(util["i" /* getValueByPath */])(value, this.valueKey) : cachedOption.value === value;
1599
5743
  if (isEqual) {
1600
5744
  option = cachedOption;
1601
5745
  break;
@@ -1793,7 +5937,7 @@ var shared_ = __webpack_require__(21);
1793
5937
  var valueKey = this.valueKey;
1794
5938
  var index = -1;
1795
5939
  arr.some(function (item, i) {
1796
- if (Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(value, valueKey)) {
5940
+ if (Object(util["i" /* getValueByPath */])(item, valueKey) === Object(util["i" /* getValueByPath */])(value, valueKey)) {
1797
5941
  index = i;
1798
5942
  return true;
1799
5943
  }
@@ -1895,7 +6039,7 @@ var shared_ = __webpack_require__(21);
1895
6039
  if (Object.prototype.toString.call(item.value).toLowerCase() !== '[object object]') {
1896
6040
  return item.value;
1897
6041
  } else {
1898
- return Object(util_["getValueByPath"])(item.value, this.valueKey);
6042
+ return Object(util["i" /* getValueByPath */])(item.value, this.valueKey);
1899
6043
  }
1900
6044
  }
1901
6045
  },
@@ -1928,7 +6072,7 @@ var shared_ = __webpack_require__(21);
1928
6072
  if (this.multiple && Array.isArray(this.value) && this.value.length > 0) {
1929
6073
  this.currentPlaceholder = '';
1930
6074
  }
1931
- Object(resize_event_["addResizeListener"])(this.$el, this.handleResize);
6075
+ Object(resize_event["a" /* addResizeListener */])(this.$el, this.handleResize);
1932
6076
 
1933
6077
  var reference = this.$refs.reference;
1934
6078
  if (reference && reference.$el) {
@@ -1951,7 +6095,7 @@ var shared_ = __webpack_require__(21);
1951
6095
  this.setSelected();
1952
6096
  },
1953
6097
  beforeDestroy: function beforeDestroy() {
1954
- if (this.$el && this.handleResize) Object(resize_event_["removeResizeListener"])(this.$el, this.handleResize);
6098
+ if (this.$el && this.handleResize) Object(resize_event["b" /* removeResizeListener */])(this.$el, this.handleResize);
1955
6099
  }
1956
6100
  });
1957
6101
  // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=script&lang=js
@@ -1987,5 +6131,4 @@ src_select.install = function (Vue) {
1987
6131
  /* harmony default export */ var packages_select = __webpack_exports__["default"] = (src_select);
1988
6132
 
1989
6133
  /***/ })
1990
-
1991
- /******/ });
6134
+ /******/ ]);