vant 3.3.1 → 3.3.2
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.
- package/es/calendar/Calendar.js +8 -14
- package/es/calendar/CalendarMonth.js +11 -10
- package/es/calendar/types.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/swipe/Swipe.js +8 -2
- package/es/tab/Tab.js +1 -1
- package/es/tabbar-item/TabbarItem.js +5 -3
- package/lib/calendar/Calendar.js +8 -14
- package/lib/calendar/CalendarMonth.js +11 -10
- package/lib/calendar/types.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/swipe/Swipe.js +8 -2
- package/lib/tab/Tab.js +1 -1
- package/lib/tabbar-item/TabbarItem.js +5 -3
- package/lib/vant.cjs.js +14407 -0
- package/lib/vant.cjs.min.js +1 -0
- package/lib/vant.es.js +162 -1240
- package/lib/vant.es.min.js +162 -1240
- package/lib/vant.js +27 -24
- package/lib/vant.min.js +1 -1
- package/package.json +18 -7
- package/vetur/attributes.json +80 -80
- package/vetur/tags.json +24 -24
- package/vetur/web-types.json +236 -236
package/lib/vant.es.min.js
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, useToggle, raf, useScrollParent, usePageVisibility, doubleRaf, cancelRaf, useCountDown, useClickAway, inBrowser as inBrowser$1 } from "@vant/use";
|
2
|
+
import { unref, ref, reactive, defineComponent, createVNode, getCurrentInstance, computed, provide, inject, onDeactivated, onBeforeUnmount, watch, Transition, withDirectives, vShow, onMounted, onActivated, Teleport, Fragment, mergeProps, nextTick, createTextVNode, createApp, onUnmounted, onBeforeUpdate, resolveDirective, h, onUpdated, watchEffect } from "vue";
|
3
|
+
import { createPopper, offsetModifier } from "@vant/popperjs";
|
2
4
|
function noop() {
|
3
5
|
}
|
4
6
|
var extend = Object.assign;
|
5
|
-
var inBrowser
|
7
|
+
var inBrowser = typeof window !== "undefined";
|
6
8
|
function get(object, path) {
|
7
9
|
var keys = path.split(".");
|
8
10
|
var result = object;
|
@@ -46,358 +48,6 @@ var makeStringProp = (defaultVal) => ({
|
|
46
48
|
type: String,
|
47
49
|
default: defaultVal
|
48
50
|
});
|
49
|
-
const inBrowser = typeof window !== "undefined";
|
50
|
-
function raf(fn2) {
|
51
|
-
return inBrowser ? requestAnimationFrame(fn2) : -1;
|
52
|
-
}
|
53
|
-
function cancelRaf(id) {
|
54
|
-
if (inBrowser) {
|
55
|
-
cancelAnimationFrame(id);
|
56
|
-
}
|
57
|
-
}
|
58
|
-
function doubleRaf(fn2) {
|
59
|
-
raf(() => raf(fn2));
|
60
|
-
}
|
61
|
-
const isWindow = (val) => val === window;
|
62
|
-
const makeDOMRect = (width2, height2) => ({
|
63
|
-
top: 0,
|
64
|
-
left: 0,
|
65
|
-
right: width2,
|
66
|
-
bottom: height2,
|
67
|
-
width: width2,
|
68
|
-
height: height2
|
69
|
-
});
|
70
|
-
const useRect = (elementOrRef) => {
|
71
|
-
const element = unref(elementOrRef);
|
72
|
-
if (isWindow(element)) {
|
73
|
-
const width2 = element.innerWidth;
|
74
|
-
const height2 = element.innerHeight;
|
75
|
-
return makeDOMRect(width2, height2);
|
76
|
-
}
|
77
|
-
if (element == null ? void 0 : element.getBoundingClientRect) {
|
78
|
-
return element.getBoundingClientRect();
|
79
|
-
}
|
80
|
-
return makeDOMRect(0, 0);
|
81
|
-
};
|
82
|
-
function useToggle(defaultValue = false) {
|
83
|
-
const state = ref(defaultValue);
|
84
|
-
const toggle = (value = !state.value) => {
|
85
|
-
state.value = value;
|
86
|
-
};
|
87
|
-
return [state, toggle];
|
88
|
-
}
|
89
|
-
function useParent(key) {
|
90
|
-
const parent = inject(key, null);
|
91
|
-
if (parent) {
|
92
|
-
const instance2 = getCurrentInstance();
|
93
|
-
const { link, unlink, internalChildren } = parent;
|
94
|
-
link(instance2);
|
95
|
-
onUnmounted(() => unlink(instance2));
|
96
|
-
const index2 = computed(() => internalChildren.indexOf(instance2));
|
97
|
-
return {
|
98
|
-
parent,
|
99
|
-
index: index2
|
100
|
-
};
|
101
|
-
}
|
102
|
-
return {
|
103
|
-
parent: null,
|
104
|
-
index: ref(-1)
|
105
|
-
};
|
106
|
-
}
|
107
|
-
function flattenVNodes(children) {
|
108
|
-
const result = [];
|
109
|
-
const traverse = (children2) => {
|
110
|
-
if (Array.isArray(children2)) {
|
111
|
-
children2.forEach((child) => {
|
112
|
-
var _a;
|
113
|
-
if (isVNode(child)) {
|
114
|
-
result.push(child);
|
115
|
-
if ((_a = child.component) == null ? void 0 : _a.subTree) {
|
116
|
-
traverse(child.component.subTree.children);
|
117
|
-
}
|
118
|
-
if (child.children) {
|
119
|
-
traverse(child.children);
|
120
|
-
}
|
121
|
-
}
|
122
|
-
});
|
123
|
-
}
|
124
|
-
};
|
125
|
-
traverse(children);
|
126
|
-
return result;
|
127
|
-
}
|
128
|
-
function sortChildren(parent, publicChildren, internalChildren) {
|
129
|
-
const vnodes = flattenVNodes(parent.subTree.children);
|
130
|
-
internalChildren.sort((a, b) => vnodes.indexOf(a.vnode) - vnodes.indexOf(b.vnode));
|
131
|
-
const orderedPublicChildren = internalChildren.map((item) => item.proxy);
|
132
|
-
publicChildren.sort((a, b) => {
|
133
|
-
const indexA = orderedPublicChildren.indexOf(a);
|
134
|
-
const indexB = orderedPublicChildren.indexOf(b);
|
135
|
-
return indexA - indexB;
|
136
|
-
});
|
137
|
-
}
|
138
|
-
function useChildren(key) {
|
139
|
-
const publicChildren = reactive([]);
|
140
|
-
const internalChildren = reactive([]);
|
141
|
-
const parent = getCurrentInstance();
|
142
|
-
const linkChildren = (value) => {
|
143
|
-
const link = (child) => {
|
144
|
-
if (child.proxy) {
|
145
|
-
internalChildren.push(child);
|
146
|
-
publicChildren.push(child.proxy);
|
147
|
-
sortChildren(parent, publicChildren, internalChildren);
|
148
|
-
}
|
149
|
-
};
|
150
|
-
const unlink = (child) => {
|
151
|
-
const index2 = internalChildren.indexOf(child);
|
152
|
-
publicChildren.splice(index2, 1);
|
153
|
-
internalChildren.splice(index2, 1);
|
154
|
-
};
|
155
|
-
provide(key, Object.assign({
|
156
|
-
link,
|
157
|
-
unlink,
|
158
|
-
children: publicChildren,
|
159
|
-
internalChildren
|
160
|
-
}, value));
|
161
|
-
};
|
162
|
-
return {
|
163
|
-
children: publicChildren,
|
164
|
-
linkChildren
|
165
|
-
};
|
166
|
-
}
|
167
|
-
const SECOND = 1e3;
|
168
|
-
const MINUTE = 60 * SECOND;
|
169
|
-
const HOUR = 60 * MINUTE;
|
170
|
-
const DAY = 24 * HOUR;
|
171
|
-
function parseTime(time) {
|
172
|
-
const days = Math.floor(time / DAY);
|
173
|
-
const hours = Math.floor(time % DAY / HOUR);
|
174
|
-
const minutes = Math.floor(time % HOUR / MINUTE);
|
175
|
-
const seconds = Math.floor(time % MINUTE / SECOND);
|
176
|
-
const milliseconds = Math.floor(time % SECOND);
|
177
|
-
return {
|
178
|
-
total: time,
|
179
|
-
days,
|
180
|
-
hours,
|
181
|
-
minutes,
|
182
|
-
seconds,
|
183
|
-
milliseconds
|
184
|
-
};
|
185
|
-
}
|
186
|
-
function isSameSecond(time1, time2) {
|
187
|
-
return Math.floor(time1 / 1e3) === Math.floor(time2 / 1e3);
|
188
|
-
}
|
189
|
-
function useCountDown(options) {
|
190
|
-
let rafId;
|
191
|
-
let endTime;
|
192
|
-
let counting;
|
193
|
-
let deactivated;
|
194
|
-
const remain = ref(options.time);
|
195
|
-
const current2 = computed(() => parseTime(remain.value));
|
196
|
-
const pause = () => {
|
197
|
-
counting = false;
|
198
|
-
cancelRaf(rafId);
|
199
|
-
};
|
200
|
-
const getCurrentRemain = () => Math.max(endTime - Date.now(), 0);
|
201
|
-
const setRemain = (value) => {
|
202
|
-
var _a, _b;
|
203
|
-
remain.value = value;
|
204
|
-
(_a = options.onChange) == null ? void 0 : _a.call(options, current2.value);
|
205
|
-
if (value === 0) {
|
206
|
-
pause();
|
207
|
-
(_b = options.onFinish) == null ? void 0 : _b.call(options);
|
208
|
-
}
|
209
|
-
};
|
210
|
-
const microTick = () => {
|
211
|
-
rafId = raf(() => {
|
212
|
-
if (counting) {
|
213
|
-
setRemain(getCurrentRemain());
|
214
|
-
if (remain.value > 0) {
|
215
|
-
microTick();
|
216
|
-
}
|
217
|
-
}
|
218
|
-
});
|
219
|
-
};
|
220
|
-
const macroTick = () => {
|
221
|
-
rafId = raf(() => {
|
222
|
-
if (counting) {
|
223
|
-
const remainRemain = getCurrentRemain();
|
224
|
-
if (!isSameSecond(remainRemain, remain.value) || remainRemain === 0) {
|
225
|
-
setRemain(remainRemain);
|
226
|
-
}
|
227
|
-
if (remain.value > 0) {
|
228
|
-
macroTick();
|
229
|
-
}
|
230
|
-
}
|
231
|
-
});
|
232
|
-
};
|
233
|
-
const tick = () => {
|
234
|
-
if (!inBrowser) {
|
235
|
-
return;
|
236
|
-
}
|
237
|
-
if (options.millisecond) {
|
238
|
-
microTick();
|
239
|
-
} else {
|
240
|
-
macroTick();
|
241
|
-
}
|
242
|
-
};
|
243
|
-
const start2 = () => {
|
244
|
-
if (!counting) {
|
245
|
-
endTime = Date.now() + remain.value;
|
246
|
-
counting = true;
|
247
|
-
tick();
|
248
|
-
}
|
249
|
-
};
|
250
|
-
const reset = (totalTime = options.time) => {
|
251
|
-
pause();
|
252
|
-
remain.value = totalTime;
|
253
|
-
};
|
254
|
-
onBeforeUnmount(pause);
|
255
|
-
onActivated(() => {
|
256
|
-
if (deactivated) {
|
257
|
-
counting = true;
|
258
|
-
deactivated = false;
|
259
|
-
tick();
|
260
|
-
}
|
261
|
-
});
|
262
|
-
onDeactivated(() => {
|
263
|
-
if (counting) {
|
264
|
-
pause();
|
265
|
-
deactivated = true;
|
266
|
-
}
|
267
|
-
});
|
268
|
-
return {
|
269
|
-
start: start2,
|
270
|
-
pause,
|
271
|
-
reset,
|
272
|
-
current: current2
|
273
|
-
};
|
274
|
-
}
|
275
|
-
function onMountedOrActivated(hook) {
|
276
|
-
let mounted;
|
277
|
-
onMounted(() => {
|
278
|
-
hook();
|
279
|
-
nextTick(() => {
|
280
|
-
mounted = true;
|
281
|
-
});
|
282
|
-
});
|
283
|
-
onActivated(() => {
|
284
|
-
if (mounted) {
|
285
|
-
hook();
|
286
|
-
}
|
287
|
-
});
|
288
|
-
}
|
289
|
-
function useEventListener(type, listener, options = {}) {
|
290
|
-
if (!inBrowser) {
|
291
|
-
return;
|
292
|
-
}
|
293
|
-
const { target = window, passive: passive2 = false, capture = false } = options;
|
294
|
-
let attached;
|
295
|
-
const add = (target2) => {
|
296
|
-
const element = unref(target2);
|
297
|
-
if (element && !attached) {
|
298
|
-
element.addEventListener(type, listener, { capture, passive: passive2 });
|
299
|
-
attached = true;
|
300
|
-
}
|
301
|
-
};
|
302
|
-
const remove2 = (target2) => {
|
303
|
-
const element = unref(target2);
|
304
|
-
if (element && attached) {
|
305
|
-
element.removeEventListener(type, listener, capture);
|
306
|
-
attached = false;
|
307
|
-
}
|
308
|
-
};
|
309
|
-
onUnmounted(() => remove2(target));
|
310
|
-
onDeactivated(() => remove2(target));
|
311
|
-
onMountedOrActivated(() => add(target));
|
312
|
-
if (isRef(target)) {
|
313
|
-
watch(target, (val, oldVal) => {
|
314
|
-
remove2(oldVal);
|
315
|
-
add(val);
|
316
|
-
});
|
317
|
-
}
|
318
|
-
}
|
319
|
-
function useClickAway(target, listener, options = {}) {
|
320
|
-
if (!inBrowser) {
|
321
|
-
return;
|
322
|
-
}
|
323
|
-
const { eventName = "click" } = options;
|
324
|
-
const onClick = (event) => {
|
325
|
-
const element = unref(target);
|
326
|
-
if (element && !element.contains(event.target)) {
|
327
|
-
listener(event);
|
328
|
-
}
|
329
|
-
};
|
330
|
-
useEventListener(eventName, onClick, { target: document });
|
331
|
-
}
|
332
|
-
let width;
|
333
|
-
let height;
|
334
|
-
function useWindowSize() {
|
335
|
-
if (!width) {
|
336
|
-
width = ref(0);
|
337
|
-
height = ref(0);
|
338
|
-
if (inBrowser) {
|
339
|
-
const update = () => {
|
340
|
-
width.value = window.innerWidth;
|
341
|
-
height.value = window.innerHeight;
|
342
|
-
};
|
343
|
-
update();
|
344
|
-
window.addEventListener("resize", update, { passive: true });
|
345
|
-
window.addEventListener("orientationchange", update, { passive: true });
|
346
|
-
}
|
347
|
-
}
|
348
|
-
return { width, height };
|
349
|
-
}
|
350
|
-
const overflowScrollReg = /scroll|auto/i;
|
351
|
-
const defaultRoot = inBrowser ? window : void 0;
|
352
|
-
function isElement$1(node) {
|
353
|
-
const ELEMENT_NODE_TYPE = 1;
|
354
|
-
return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
|
355
|
-
}
|
356
|
-
function getScrollParent$1(el, root = defaultRoot) {
|
357
|
-
let node = el;
|
358
|
-
while (node && node !== root && isElement$1(node)) {
|
359
|
-
const { overflowY } = window.getComputedStyle(node);
|
360
|
-
if (overflowScrollReg.test(overflowY)) {
|
361
|
-
return node;
|
362
|
-
}
|
363
|
-
node = node.parentNode;
|
364
|
-
}
|
365
|
-
return root;
|
366
|
-
}
|
367
|
-
function useScrollParent(el, root = defaultRoot) {
|
368
|
-
const scrollParent = ref();
|
369
|
-
onMounted(() => {
|
370
|
-
if (el.value) {
|
371
|
-
scrollParent.value = getScrollParent$1(el.value, root);
|
372
|
-
}
|
373
|
-
});
|
374
|
-
return scrollParent;
|
375
|
-
}
|
376
|
-
let visibility;
|
377
|
-
function usePageVisibility() {
|
378
|
-
if (!visibility) {
|
379
|
-
visibility = ref("visible");
|
380
|
-
if (inBrowser) {
|
381
|
-
const update = () => {
|
382
|
-
visibility.value = document.hidden ? "hidden" : "visible";
|
383
|
-
};
|
384
|
-
update();
|
385
|
-
window.addEventListener("visibilitychange", update);
|
386
|
-
}
|
387
|
-
}
|
388
|
-
return visibility;
|
389
|
-
}
|
390
|
-
const CUSTOM_FIELD_INJECTION_KEY = Symbol("van-field");
|
391
|
-
function useCustomFieldValue(customValue) {
|
392
|
-
const field = inject(CUSTOM_FIELD_INJECTION_KEY, null);
|
393
|
-
if (field && !field.customValue.value) {
|
394
|
-
field.customValue.value = customValue;
|
395
|
-
watch(customValue, () => {
|
396
|
-
field.resetValidation();
|
397
|
-
field.validateWithTrigger("onChange");
|
398
|
-
});
|
399
|
-
}
|
400
|
-
}
|
401
51
|
var isDef = (val) => val !== void 0 && val !== null;
|
402
52
|
var isFunction = (val) => typeof val === "function";
|
403
53
|
var isObject = (val) => val !== null && typeof val === "object";
|
@@ -408,10 +58,10 @@ function isMobile(value) {
|
|
408
58
|
return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
|
409
59
|
}
|
410
60
|
var isNumeric = (val) => typeof val === "number" || /^\d+(\.\d+)?$/.test(val);
|
411
|
-
var isIOS$1 = () => inBrowser
|
61
|
+
var isIOS$1 = () => inBrowser ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
|
412
62
|
function getScrollTop(el) {
|
413
|
-
var
|
414
|
-
return Math.max(
|
63
|
+
var top = "scrollTop" in el ? el.scrollTop : el.pageYOffset;
|
64
|
+
return Math.max(top, 0);
|
415
65
|
}
|
416
66
|
function setScrollTop(el, value) {
|
417
67
|
if ("scrollTop" in el) {
|
@@ -510,7 +160,7 @@ function unitToPx(value) {
|
|
510
160
|
if (typeof value === "number") {
|
511
161
|
return value;
|
512
162
|
}
|
513
|
-
if (inBrowser
|
163
|
+
if (inBrowser) {
|
514
164
|
if (value.includes("rem")) {
|
515
165
|
return convertRem(value);
|
516
166
|
}
|
@@ -1158,7 +808,7 @@ var _Button = defineComponent({
|
|
1158
808
|
type,
|
1159
809
|
size,
|
1160
810
|
block,
|
1161
|
-
round
|
811
|
+
round,
|
1162
812
|
plain,
|
1163
813
|
square,
|
1164
814
|
loading,
|
@@ -1170,7 +820,7 @@ var _Button = defineComponent({
|
|
1170
820
|
var classes = [bem$1l([type, size, {
|
1171
821
|
plain,
|
1172
822
|
block,
|
1173
|
-
round
|
823
|
+
round,
|
1174
824
|
square,
|
1175
825
|
loading,
|
1176
826
|
disabled,
|
@@ -1355,7 +1005,7 @@ function useTouch() {
|
|
1355
1005
|
offsetY.value = 0;
|
1356
1006
|
direction.value = "";
|
1357
1007
|
};
|
1358
|
-
var
|
1008
|
+
var start = (event) => {
|
1359
1009
|
reset();
|
1360
1010
|
startX.value = event.touches[0].clientX;
|
1361
1011
|
startY.value = event.touches[0].clientY;
|
@@ -1372,7 +1022,7 @@ function useTouch() {
|
|
1372
1022
|
};
|
1373
1023
|
return {
|
1374
1024
|
move,
|
1375
|
-
start
|
1025
|
+
start,
|
1376
1026
|
reset,
|
1377
1027
|
startX,
|
1378
1028
|
startY,
|
@@ -1392,7 +1042,7 @@ function useLockScroll(rootRef, shouldLock) {
|
|
1392
1042
|
var onTouchMove = (event) => {
|
1393
1043
|
touch.move(event);
|
1394
1044
|
var direction = touch.deltaY.value > 0 ? "10" : "01";
|
1395
|
-
var el = getScrollParent
|
1045
|
+
var el = getScrollParent(event.target, rootRef.value);
|
1396
1046
|
var {
|
1397
1047
|
scrollHeight,
|
1398
1048
|
offsetHeight,
|
@@ -1599,7 +1249,7 @@ var _Popup = defineComponent({
|
|
1599
1249
|
var onClosed = () => emit("closed");
|
1600
1250
|
var renderPopup = lazyRender(() => {
|
1601
1251
|
var {
|
1602
|
-
round
|
1252
|
+
round,
|
1603
1253
|
position,
|
1604
1254
|
safeAreaInsetBottom
|
1605
1255
|
} = props;
|
@@ -1607,7 +1257,7 @@ var _Popup = defineComponent({
|
|
1607
1257
|
"ref": popupRef,
|
1608
1258
|
"style": style.value,
|
1609
1259
|
"class": [bem$1h({
|
1610
|
-
round
|
1260
|
+
round,
|
1611
1261
|
[position]: position
|
1612
1262
|
}), {
|
1613
1263
|
"van-safe-area-bottom": safeAreaInsetBottom
|
@@ -1866,7 +1516,7 @@ var Column = defineComponent({
|
|
1866
1516
|
};
|
1867
1517
|
var setIndex = (index2, emitChange) => {
|
1868
1518
|
index2 = adjustIndex(index2) || 0;
|
1869
|
-
var
|
1519
|
+
var offset = -index2 * props.itemHeight;
|
1870
1520
|
var trigger = () => {
|
1871
1521
|
if (index2 !== state.index) {
|
1872
1522
|
state.index = index2;
|
@@ -1875,12 +1525,12 @@ var Column = defineComponent({
|
|
1875
1525
|
}
|
1876
1526
|
}
|
1877
1527
|
};
|
1878
|
-
if (moving &&
|
1528
|
+
if (moving && offset !== state.offset) {
|
1879
1529
|
transitionEndTrigger = trigger;
|
1880
1530
|
} else {
|
1881
1531
|
trigger();
|
1882
1532
|
}
|
1883
|
-
state.offset =
|
1533
|
+
state.offset = offset;
|
1884
1534
|
};
|
1885
1535
|
var setOptions = (options) => {
|
1886
1536
|
if (JSON.stringify(options) !== JSON.stringify(state.options)) {
|
@@ -1902,7 +1552,7 @@ var Column = defineComponent({
|
|
1902
1552
|
}
|
1903
1553
|
return option;
|
1904
1554
|
};
|
1905
|
-
var getIndexByOffset = (
|
1555
|
+
var getIndexByOffset = (offset) => clamp(Math.round(-offset / props.itemHeight), 0, count() - 1);
|
1906
1556
|
var momentum = (distance, duration) => {
|
1907
1557
|
var speed = Math.abs(distance / duration);
|
1908
1558
|
distance = state.offset + speed / 3e-3 * (distance < 0 ? -1 : 1);
|
@@ -2868,21 +2518,21 @@ function endComposing(_ref2) {
|
|
2868
2518
|
function resizeTextarea(input, autosize) {
|
2869
2519
|
var scrollTop = getRootScrollTop();
|
2870
2520
|
input.style.height = "auto";
|
2871
|
-
var
|
2521
|
+
var height = input.scrollHeight;
|
2872
2522
|
if (isObject(autosize)) {
|
2873
2523
|
var {
|
2874
2524
|
maxHeight,
|
2875
2525
|
minHeight
|
2876
2526
|
} = autosize;
|
2877
2527
|
if (maxHeight !== void 0) {
|
2878
|
-
|
2528
|
+
height = Math.min(height, maxHeight);
|
2879
2529
|
}
|
2880
2530
|
if (minHeight !== void 0) {
|
2881
|
-
|
2531
|
+
height = Math.max(height, minHeight);
|
2882
2532
|
}
|
2883
2533
|
}
|
2884
|
-
if (
|
2885
|
-
input.style.height =
|
2534
|
+
if (height) {
|
2535
|
+
input.style.height = height + "px";
|
2886
2536
|
setRootScrollTop(scrollTop);
|
2887
2537
|
}
|
2888
2538
|
}
|
@@ -3588,7 +3238,7 @@ function Toast(options) {
|
|
3588
3238
|
if (options === void 0) {
|
3589
3239
|
options = {};
|
3590
3240
|
}
|
3591
|
-
if (!inBrowser
|
3241
|
+
if (!inBrowser) {
|
3592
3242
|
return {};
|
3593
3243
|
}
|
3594
3244
|
var toast = getInstance();
|
@@ -4167,14 +3817,14 @@ var _Tag = defineComponent({
|
|
4167
3817
|
type,
|
4168
3818
|
mark,
|
4169
3819
|
plain,
|
4170
|
-
round
|
3820
|
+
round,
|
4171
3821
|
size,
|
4172
3822
|
closeable
|
4173
3823
|
} = props;
|
4174
3824
|
var classes = {
|
4175
3825
|
mark,
|
4176
3826
|
plain,
|
4177
|
-
round
|
3827
|
+
round
|
4178
3828
|
};
|
4179
3829
|
if (size) {
|
4180
3830
|
classes[size] = size;
|
@@ -4514,9 +4164,9 @@ function compareDay(day1, day2) {
|
|
4514
4164
|
}
|
4515
4165
|
var cloneDate = (date) => new Date(date);
|
4516
4166
|
var cloneDates = (dates) => Array.isArray(dates) ? dates.map(cloneDate) : cloneDate(dates);
|
4517
|
-
function getDayByOffset(date,
|
4167
|
+
function getDayByOffset(date, offset) {
|
4518
4168
|
var cloned = cloneDate(date);
|
4519
|
-
cloned.setDate(cloned.getDate() +
|
4169
|
+
cloned.setDate(cloned.getDate() + offset);
|
4520
4170
|
return cloned;
|
4521
4171
|
}
|
4522
4172
|
var getPrevDay = (date) => getDayByOffset(date, -1);
|
@@ -4573,11 +4223,11 @@ function getTrueValue(value) {
|
|
4573
4223
|
}
|
4574
4224
|
var getMonthEndDay = (year, month) => 32 - new Date(year, month - 1, 32).getDate();
|
4575
4225
|
var useHeight = (element) => {
|
4576
|
-
var
|
4226
|
+
var height = ref();
|
4577
4227
|
onMounted(() => nextTick(() => {
|
4578
|
-
|
4228
|
+
height.value = useRect(element).height;
|
4579
4229
|
}));
|
4580
|
-
return
|
4230
|
+
return height;
|
4581
4231
|
};
|
4582
4232
|
var [name$13] = createNamespace("calendar-day");
|
4583
4233
|
var CalendarDay = defineComponent({
|
@@ -4600,7 +4250,7 @@ var CalendarDay = defineComponent({
|
|
4600
4250
|
item,
|
4601
4251
|
index: index2,
|
4602
4252
|
color,
|
4603
|
-
offset
|
4253
|
+
offset,
|
4604
4254
|
rowHeight
|
4605
4255
|
} = props;
|
4606
4256
|
var style2 = {
|
@@ -4611,7 +4261,7 @@ var CalendarDay = defineComponent({
|
|
4611
4261
|
return style2;
|
4612
4262
|
}
|
4613
4263
|
if (index2 === 0) {
|
4614
|
-
style2.marginLeft = 100 *
|
4264
|
+
style2.marginLeft = 100 * offset / 7 + "%";
|
4615
4265
|
}
|
4616
4266
|
if (color) {
|
4617
4267
|
switch (item.type) {
|
@@ -4727,10 +4377,10 @@ var CalendarMonth = defineComponent({
|
|
4727
4377
|
var [visible, setVisible] = useToggle();
|
4728
4378
|
var daysRef = ref();
|
4729
4379
|
var monthRef = ref();
|
4730
|
-
var
|
4380
|
+
var height = useHeight(monthRef);
|
4731
4381
|
var title = computed(() => formatMonthTitle(props.date));
|
4732
4382
|
var rowHeight = computed(() => addUnit(props.rowHeight));
|
4733
|
-
var
|
4383
|
+
var offset = computed(() => {
|
4734
4384
|
var realDay = props.date.getDay();
|
4735
4385
|
if (props.firstDayOfWeek) {
|
4736
4386
|
return (realDay + 7 - props.firstDayOfWeek) % 7;
|
@@ -4740,13 +4390,6 @@ var CalendarMonth = defineComponent({
|
|
4740
4390
|
var totalDay = computed(() => getMonthEndDay(props.date.getFullYear(), props.date.getMonth() + 1));
|
4741
4391
|
var shouldRender = computed(() => visible.value || !props.lazyRender);
|
4742
4392
|
var getTitle = () => title.value;
|
4743
|
-
var scrollIntoView = (body) => {
|
4744
|
-
var el = props.showSubtitle ? daysRef.value : monthRef.value;
|
4745
|
-
if (el) {
|
4746
|
-
var scrollTop = useRect(el).top - useRect(body).top + body.scrollTop;
|
4747
|
-
setScrollTop(body, scrollTop);
|
4748
|
-
}
|
4749
|
-
};
|
4750
4393
|
var getMultipleDayType = (day) => {
|
4751
4394
|
var isSelected = (date) => props.currentDate.some((item) => compareDay(item, date) === 0);
|
4752
4395
|
if (isSelected(day)) {
|
@@ -4841,7 +4484,7 @@ var CalendarMonth = defineComponent({
|
|
4841
4484
|
}
|
4842
4485
|
};
|
4843
4486
|
var placeholders = computed(() => {
|
4844
|
-
var count = Math.ceil((totalDay.value +
|
4487
|
+
var count = Math.ceil((totalDay.value + offset.value) / 7);
|
4845
4488
|
return Array(count).fill({
|
4846
4489
|
type: "placeholder"
|
4847
4490
|
});
|
@@ -4867,11 +4510,20 @@ var CalendarMonth = defineComponent({
|
|
4867
4510
|
return days2;
|
4868
4511
|
});
|
4869
4512
|
var disabledDays = computed(() => days.value.filter((day) => day.type === "disabled"));
|
4513
|
+
var scrollToDate = (body, targetDate) => {
|
4514
|
+
if (daysRef.value) {
|
4515
|
+
var daysRect = useRect(daysRef.value);
|
4516
|
+
var totalRows = placeholders.value.length;
|
4517
|
+
var currentRow = Math.ceil((targetDate.getDate() + offset.value) / 7);
|
4518
|
+
var rowOffset = (currentRow - 1) * daysRect.height / totalRows;
|
4519
|
+
setScrollTop(body, daysRect.top + rowOffset + body.scrollTop - useRect(body).top);
|
4520
|
+
}
|
4521
|
+
};
|
4870
4522
|
var renderDay = (item, index2) => createVNode(CalendarDay, {
|
4871
4523
|
"item": item,
|
4872
4524
|
"index": index2,
|
4873
4525
|
"color": props.color,
|
4874
|
-
"offset":
|
4526
|
+
"offset": offset.value,
|
4875
4527
|
"rowHeight": rowHeight.value,
|
4876
4528
|
"onClick": (item2) => emit("click", item2)
|
4877
4529
|
}, pick(slots, ["top-info", "bottom-info"]));
|
@@ -4882,9 +4534,9 @@ var CalendarMonth = defineComponent({
|
|
4882
4534
|
}, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
|
4883
4535
|
useExpose({
|
4884
4536
|
getTitle,
|
4885
|
-
getHeight: () =>
|
4537
|
+
getHeight: () => height.value,
|
4886
4538
|
setVisible,
|
4887
|
-
|
4539
|
+
scrollToDate,
|
4888
4540
|
disabledDays
|
4889
4541
|
});
|
4890
4542
|
return () => createVNode("div", {
|
@@ -5032,9 +4684,9 @@ var _Calendar = defineComponent({
|
|
5032
4684
|
if (!Array.isArray(defaultDate)) {
|
5033
4685
|
defaultDate = [];
|
5034
4686
|
}
|
5035
|
-
var
|
5036
|
-
var
|
5037
|
-
return [
|
4687
|
+
var start = limitDateRange(defaultDate[0] || now, minDate, getPrevDay(maxDate));
|
4688
|
+
var end = limitDateRange(defaultDate[1] || now, getNextDay(minDate));
|
4689
|
+
return [start, end];
|
5038
4690
|
}
|
5039
4691
|
if (type === "multiple") {
|
5040
4692
|
if (Array.isArray(defaultDate)) {
|
@@ -5075,19 +4727,19 @@ var _Calendar = defineComponent({
|
|
5075
4727
|
return !currentDate.value;
|
5076
4728
|
});
|
5077
4729
|
var onScroll = () => {
|
5078
|
-
var
|
5079
|
-
var
|
4730
|
+
var top = getScrollTop(bodyRef.value);
|
4731
|
+
var bottom = top + bodyHeight;
|
5080
4732
|
var heights = months.value.map((item, index2) => monthRefs.value[index2].getHeight());
|
5081
4733
|
var heightSum = heights.reduce((a, b) => a + b, 0);
|
5082
|
-
if (
|
4734
|
+
if (bottom > heightSum && top > 0) {
|
5083
4735
|
return;
|
5084
4736
|
}
|
5085
|
-
var
|
4737
|
+
var height = 0;
|
5086
4738
|
var currentMonth;
|
5087
4739
|
var visibleRange = [-1, -1];
|
5088
4740
|
for (var i = 0; i < months.value.length; i++) {
|
5089
4741
|
var month = monthRefs.value[i];
|
5090
|
-
var visible =
|
4742
|
+
var visible = height <= bottom && height + heights[i] >= top;
|
5091
4743
|
if (visible) {
|
5092
4744
|
visibleRange[1] = i;
|
5093
4745
|
if (!currentMonth) {
|
@@ -5102,7 +4754,7 @@ var _Calendar = defineComponent({
|
|
5102
4754
|
});
|
5103
4755
|
}
|
5104
4756
|
}
|
5105
|
-
|
4757
|
+
height += heights[i];
|
5106
4758
|
}
|
5107
4759
|
months.value.forEach((month2, index2) => {
|
5108
4760
|
var visible2 = index2 >= visibleRange[0] - 1 && index2 <= visibleRange[1] + 1;
|
@@ -5117,7 +4769,7 @@ var _Calendar = defineComponent({
|
|
5117
4769
|
months.value.some((month, index2) => {
|
5118
4770
|
if (compareMonth(month, targetDate) === 0) {
|
5119
4771
|
if (bodyRef.value) {
|
5120
|
-
monthRefs.value[index2].
|
4772
|
+
monthRefs.value[index2].scrollToDate(bodyRef.value, targetDate);
|
5121
4773
|
}
|
5122
4774
|
return true;
|
5123
4775
|
}
|
@@ -5126,7 +4778,7 @@ var _Calendar = defineComponent({
|
|
5126
4778
|
onScroll();
|
5127
4779
|
});
|
5128
4780
|
};
|
5129
|
-
var
|
4781
|
+
var scrollToCurrentDate = () => {
|
5130
4782
|
if (props.poppable && !props.show) {
|
5131
4783
|
return;
|
5132
4784
|
}
|
@@ -5143,7 +4795,7 @@ var _Calendar = defineComponent({
|
|
5143
4795
|
}
|
5144
4796
|
raf(() => {
|
5145
4797
|
bodyHeight = Math.floor(useRect(bodyRef).height);
|
5146
|
-
|
4798
|
+
scrollToCurrentDate();
|
5147
4799
|
});
|
5148
4800
|
};
|
5149
4801
|
var reset = function(date) {
|
@@ -5151,7 +4803,7 @@ var _Calendar = defineComponent({
|
|
5151
4803
|
date = getInitialDate();
|
5152
4804
|
}
|
5153
4805
|
currentDate.value = date;
|
5154
|
-
|
4806
|
+
scrollToCurrentDate();
|
5155
4807
|
};
|
5156
4808
|
var checkRange = (date) => {
|
5157
4809
|
var {
|
@@ -5180,11 +4832,7 @@ var _Calendar = defineComponent({
|
|
5180
4832
|
if (complete && props.type === "range") {
|
5181
4833
|
var valid = checkRange(date);
|
5182
4834
|
if (!valid) {
|
5183
|
-
|
5184
|
-
setCurrentDate([date[0], getDayByOffset(date[0], +props.maxRange - 1)]);
|
5185
|
-
} else {
|
5186
|
-
setCurrentDate(date);
|
5187
|
-
}
|
4835
|
+
setCurrentDate([date[0], getDayByOffset(date[0], +props.maxRange - 1)]);
|
5188
4836
|
return;
|
5189
4837
|
}
|
5190
4838
|
}
|
@@ -5317,7 +4965,7 @@ var _Calendar = defineComponent({
|
|
5317
4965
|
value = null;
|
5318
4966
|
}
|
5319
4967
|
currentDate.value = value;
|
5320
|
-
|
4968
|
+
scrollToCurrentDate();
|
5321
4969
|
});
|
5322
4970
|
useExpose({
|
5323
4971
|
reset,
|
@@ -5462,7 +5110,7 @@ var _Image = defineComponent({
|
|
5462
5110
|
onError();
|
5463
5111
|
}
|
5464
5112
|
};
|
5465
|
-
if ($Lazyload && inBrowser
|
5113
|
+
if ($Lazyload && inBrowser) {
|
5466
5114
|
$Lazyload.$on("loaded", onLazyLoaded);
|
5467
5115
|
$Lazyload.$on("error", onLazyLoadError);
|
5468
5116
|
onBeforeUnmount(() => {
|
@@ -5631,7 +5279,7 @@ function scrollTopTo(scroller, to, duration, callback) {
|
|
5631
5279
|
animate();
|
5632
5280
|
}
|
5633
5281
|
function useVisibilityChange(target, onChange) {
|
5634
|
-
if (!inBrowser
|
5282
|
+
if (!inBrowser || !window.IntersectionObserver) {
|
5635
5283
|
return;
|
5636
5284
|
}
|
5637
5285
|
var observer = new IntersectionObserver((entries) => {
|
@@ -5678,17 +5326,17 @@ var _Sticky = defineComponent({
|
|
5678
5326
|
height: 0,
|
5679
5327
|
transform: 0
|
5680
5328
|
});
|
5681
|
-
var
|
5329
|
+
var offset = computed(() => unitToPx(props.position === "top" ? props.offsetTop : props.offsetBottom));
|
5682
5330
|
var rootStyle = computed(() => {
|
5683
5331
|
var {
|
5684
5332
|
fixed,
|
5685
|
-
height
|
5686
|
-
width
|
5333
|
+
height,
|
5334
|
+
width
|
5687
5335
|
} = state;
|
5688
5336
|
if (fixed) {
|
5689
5337
|
return {
|
5690
|
-
width:
|
5691
|
-
height:
|
5338
|
+
width: width + "px",
|
5339
|
+
height: height + "px"
|
5692
5340
|
};
|
5693
5341
|
}
|
5694
5342
|
});
|
@@ -5699,7 +5347,7 @@ var _Sticky = defineComponent({
|
|
5699
5347
|
var style = extend(getZIndexStyle(props.zIndex), {
|
5700
5348
|
width: state.width + "px",
|
5701
5349
|
height: state.height + "px",
|
5702
|
-
[props.position]:
|
5350
|
+
[props.position]: offset.value + "px"
|
5703
5351
|
});
|
5704
5352
|
if (state.transform) {
|
5705
5353
|
style.transform = "translate3d(0, " + state.transform + "px, 0)";
|
@@ -5725,11 +5373,11 @@ var _Sticky = defineComponent({
|
|
5725
5373
|
if (position === "top") {
|
5726
5374
|
if (container) {
|
5727
5375
|
var containerRect = useRect(container);
|
5728
|
-
var difference = containerRect.bottom -
|
5729
|
-
state.fixed =
|
5376
|
+
var difference = containerRect.bottom - offset.value - state.height;
|
5377
|
+
state.fixed = offset.value > rootRect.top && containerRect.bottom > 0;
|
5730
5378
|
state.transform = difference < 0 ? difference : 0;
|
5731
5379
|
} else {
|
5732
|
-
state.fixed =
|
5380
|
+
state.fixed = offset.value > rootRect.top;
|
5733
5381
|
}
|
5734
5382
|
} else {
|
5735
5383
|
var {
|
@@ -5737,11 +5385,11 @@ var _Sticky = defineComponent({
|
|
5737
5385
|
} = document.documentElement;
|
5738
5386
|
if (container) {
|
5739
5387
|
var _containerRect = useRect(container);
|
5740
|
-
var _difference = clientHeight - _containerRect.top -
|
5741
|
-
state.fixed = clientHeight -
|
5388
|
+
var _difference = clientHeight - _containerRect.top - offset.value - state.height;
|
5389
|
+
state.fixed = clientHeight - offset.value < rootRect.bottom && clientHeight > _containerRect.top;
|
5742
5390
|
state.transform = _difference < 0 ? -_difference : 0;
|
5743
5391
|
} else {
|
5744
|
-
state.fixed = clientHeight -
|
5392
|
+
state.fixed = clientHeight - offset.value < rootRect.bottom;
|
5745
5393
|
}
|
5746
5394
|
}
|
5747
5395
|
emitScroll(scrollTop);
|
@@ -5923,15 +5571,15 @@ var _Swipe = defineComponent({
|
|
5923
5571
|
}
|
5924
5572
|
return active;
|
5925
5573
|
};
|
5926
|
-
var getTargetOffset = function(targetActive,
|
5927
|
-
if (
|
5928
|
-
|
5574
|
+
var getTargetOffset = function(targetActive, offset) {
|
5575
|
+
if (offset === void 0) {
|
5576
|
+
offset = 0;
|
5929
5577
|
}
|
5930
5578
|
var currentPosition = targetActive * size.value;
|
5931
5579
|
if (!props.loop) {
|
5932
5580
|
currentPosition = Math.min(currentPosition, -minOffset.value);
|
5933
5581
|
}
|
5934
|
-
var targetOffset =
|
5582
|
+
var targetOffset = offset - currentPosition;
|
5935
5583
|
if (!props.loop) {
|
5936
5584
|
targetOffset = clamp(targetOffset, minOffset.value, 0);
|
5937
5585
|
}
|
@@ -5940,7 +5588,7 @@ var _Swipe = defineComponent({
|
|
5940
5588
|
var move = (_ref2) => {
|
5941
5589
|
var {
|
5942
5590
|
pace = 0,
|
5943
|
-
offset
|
5591
|
+
offset = 0,
|
5944
5592
|
emitChange
|
5945
5593
|
} = _ref2;
|
5946
5594
|
if (count.value <= 1) {
|
@@ -5950,7 +5598,7 @@ var _Swipe = defineComponent({
|
|
5950
5598
|
active
|
5951
5599
|
} = state;
|
5952
5600
|
var targetActive = getTargetActive(pace);
|
5953
|
-
var targetOffset = getTargetOffset(targetActive,
|
5601
|
+
var targetOffset = getTargetOffset(targetActive, offset);
|
5954
5602
|
if (props.loop) {
|
5955
5603
|
if (children[0] && targetOffset !== minOffset.value) {
|
5956
5604
|
var outRightBound = targetOffset < minOffset.value;
|
@@ -6053,8 +5701,11 @@ var _Swipe = defineComponent({
|
|
6053
5701
|
var onTouchMove = (event) => {
|
6054
5702
|
if (props.touchable && state.swiping) {
|
6055
5703
|
touch.move(event);
|
6056
|
-
|
5704
|
+
var shouldPrevent = isCorrectDirection.value || touch.offsetY.value > touch.offsetX.value === props.vertical;
|
5705
|
+
if (shouldPrevent) {
|
6057
5706
|
preventDefault(event, props.stopPropagation);
|
5707
|
+
}
|
5708
|
+
if (isCorrectDirection.value) {
|
6058
5709
|
move({
|
6059
5710
|
offset: delta.value
|
6060
5711
|
});
|
@@ -6069,10 +5720,10 @@ var _Swipe = defineComponent({
|
|
6069
5720
|
var speed = delta.value / duration;
|
6070
5721
|
var shouldSwipe = Math.abs(speed) > 0.25 || Math.abs(delta.value) > size.value / 2;
|
6071
5722
|
if (shouldSwipe && isCorrectDirection.value) {
|
6072
|
-
var
|
5723
|
+
var offset = props.vertical ? touch.offsetY.value : touch.offsetX.value;
|
6073
5724
|
var pace = 0;
|
6074
5725
|
if (props.loop) {
|
6075
|
-
pace =
|
5726
|
+
pace = offset > 0 ? delta.value > 0 ? -1 : 1 : 0;
|
6076
5727
|
} else {
|
6077
5728
|
pace = -Math[delta.value > 0 ? "ceil" : "floor"](delta.value / size.value);
|
6078
5729
|
}
|
@@ -6337,19 +5988,19 @@ var _Tabs = defineComponent({
|
|
6337
5988
|
lineWidth,
|
6338
5989
|
lineHeight
|
6339
5990
|
} = props;
|
6340
|
-
var
|
5991
|
+
var left = title.offsetLeft + title.offsetWidth / 2;
|
6341
5992
|
var lineStyle = {
|
6342
5993
|
width: addUnit(lineWidth),
|
6343
5994
|
backgroundColor: props.color,
|
6344
|
-
transform: "translateX(" +
|
5995
|
+
transform: "translateX(" + left + "px) translateX(-50%)"
|
6345
5996
|
};
|
6346
5997
|
if (shouldAnimate) {
|
6347
5998
|
lineStyle.transitionDuration = props.duration + "s";
|
6348
5999
|
}
|
6349
6000
|
if (isDef(lineHeight)) {
|
6350
|
-
var
|
6351
|
-
lineStyle.height =
|
6352
|
-
lineStyle.borderRadius =
|
6001
|
+
var height = addUnit(lineHeight);
|
6002
|
+
lineStyle.height = height;
|
6003
|
+
lineStyle.borderRadius = height;
|
6353
6004
|
}
|
6354
6005
|
state.lineStyle = lineStyle;
|
6355
6006
|
});
|
@@ -6438,9 +6089,9 @@ var _Tabs = defineComponent({
|
|
6438
6089
|
var getCurrentIndexOnScroll = () => {
|
6439
6090
|
for (var index2 = 0; index2 < children.length; index2++) {
|
6440
6091
|
var {
|
6441
|
-
top
|
6092
|
+
top
|
6442
6093
|
} = useRect(children[index2].$el);
|
6443
|
-
if (
|
6094
|
+
if (top > scrollOffset.value) {
|
6444
6095
|
return index2 === 0 ? 0 : index2 - 1;
|
6445
6096
|
}
|
6446
6097
|
}
|
@@ -6623,8 +6274,8 @@ var _SwipeItem = defineComponent({
|
|
6623
6274
|
rendered = index2.value === active || index2.value === prevActive || index2.value === nextActive;
|
6624
6275
|
return rendered;
|
6625
6276
|
});
|
6626
|
-
var setOffset = (
|
6627
|
-
state.offset =
|
6277
|
+
var setOffset = (offset) => {
|
6278
|
+
state.offset = offset;
|
6628
6279
|
};
|
6629
6280
|
onMounted(() => {
|
6630
6281
|
nextTick(() => {
|
@@ -6708,7 +6359,7 @@ var _Tab = defineComponent({
|
|
6708
6359
|
return createVNode(SwipeItem, {
|
6709
6360
|
"id": id,
|
6710
6361
|
"role": "tabpanel",
|
6711
|
-
"class": bem$T("
|
6362
|
+
"class": bem$T("panel-wrapper", {
|
6712
6363
|
inactive: !active.value
|
6713
6364
|
}),
|
6714
6365
|
"tabindex": active.value ? 0 : -1,
|
@@ -7213,13 +6864,13 @@ var _Circle = defineComponent({
|
|
7213
6864
|
currentRate,
|
7214
6865
|
strokeLinecap
|
7215
6866
|
} = props;
|
7216
|
-
var
|
6867
|
+
var offset = PERIMETER * currentRate / 100;
|
7217
6868
|
var color = isObject(props.color) ? "url(#" + id + ")" : props.color;
|
7218
6869
|
var style = {
|
7219
6870
|
stroke: color,
|
7220
6871
|
strokeWidth: +strokeWidth + 1 + "px",
|
7221
6872
|
strokeLinecap,
|
7222
|
-
strokeDasharray:
|
6873
|
+
strokeDasharray: offset + "px " + PERIMETER + "px"
|
7223
6874
|
};
|
7224
6875
|
return createVNode("path", {
|
7225
6876
|
"d": path.value,
|
@@ -7328,11 +6979,11 @@ var _Row = defineComponent({
|
|
7328
6979
|
right: averagePadding
|
7329
6980
|
});
|
7330
6981
|
} else {
|
7331
|
-
var
|
7332
|
-
var
|
6982
|
+
var left = gutter - spaces2[item - 1].right;
|
6983
|
+
var right = averagePadding - left;
|
7333
6984
|
spaces2.push({
|
7334
|
-
left
|
7335
|
-
right
|
6985
|
+
left,
|
6986
|
+
right
|
7336
6987
|
});
|
7337
6988
|
}
|
7338
6989
|
});
|
@@ -7387,12 +7038,12 @@ var _Col = defineComponent({
|
|
7387
7038
|
} = parent;
|
7388
7039
|
if (spaces && spaces.value && spaces.value[index2.value]) {
|
7389
7040
|
var {
|
7390
|
-
left
|
7391
|
-
right
|
7041
|
+
left,
|
7042
|
+
right
|
7392
7043
|
} = spaces.value[index2.value];
|
7393
7044
|
return {
|
7394
|
-
paddingLeft:
|
7395
|
-
paddingRight:
|
7045
|
+
paddingLeft: left ? left + "px" : null,
|
7046
|
+
paddingRight: right ? right + "px" : null
|
7396
7047
|
};
|
7397
7048
|
}
|
7398
7049
|
});
|
@@ -7400,13 +7051,13 @@ var _Col = defineComponent({
|
|
7400
7051
|
var {
|
7401
7052
|
tag,
|
7402
7053
|
span,
|
7403
|
-
offset
|
7054
|
+
offset
|
7404
7055
|
} = props;
|
7405
7056
|
return createVNode(tag, {
|
7406
7057
|
"style": style.value,
|
7407
7058
|
"class": bem$M({
|
7408
7059
|
[span]: span,
|
7409
|
-
["offset-" +
|
7060
|
+
["offset-" + offset]: offset
|
7410
7061
|
})
|
7411
7062
|
}, {
|
7412
7063
|
default: () => [slots.default == null ? void 0 : slots.default()]
|
@@ -7877,7 +7528,7 @@ var _CountDown = defineComponent({
|
|
7877
7528
|
slots
|
7878
7529
|
} = _ref;
|
7879
7530
|
var {
|
7880
|
-
start
|
7531
|
+
start,
|
7881
7532
|
pause,
|
7882
7533
|
reset,
|
7883
7534
|
current: current2
|
@@ -7891,14 +7542,14 @@ var _CountDown = defineComponent({
|
|
7891
7542
|
var resetTime = () => {
|
7892
7543
|
reset(+props.time);
|
7893
7544
|
if (props.autoStart) {
|
7894
|
-
|
7545
|
+
start();
|
7895
7546
|
}
|
7896
7547
|
};
|
7897
7548
|
watch(() => props.time, resetTime, {
|
7898
7549
|
immediate: true
|
7899
7550
|
});
|
7900
7551
|
useExpose({
|
7901
|
-
start
|
7552
|
+
start,
|
7902
7553
|
pause,
|
7903
7554
|
reset: resetTime
|
7904
7555
|
});
|
@@ -8756,7 +8407,7 @@ var VanDialog = defineComponent({
|
|
8756
8407
|
};
|
8757
8408
|
return () => {
|
8758
8409
|
var {
|
8759
|
-
width
|
8410
|
+
width,
|
8760
8411
|
title,
|
8761
8412
|
theme,
|
8762
8413
|
message,
|
@@ -8766,7 +8417,7 @@ var VanDialog = defineComponent({
|
|
8766
8417
|
"role": "dialog",
|
8767
8418
|
"class": [bem$B([theme]), className],
|
8768
8419
|
"style": {
|
8769
|
-
width: addUnit(
|
8420
|
+
width: addUnit(width)
|
8770
8421
|
},
|
8771
8422
|
"aria-labelledby": title || message,
|
8772
8423
|
"onUpdate:show": updateShow
|
@@ -8794,7 +8445,7 @@ function initInstance$2() {
|
|
8794
8445
|
} = mountComponent(Wrapper));
|
8795
8446
|
}
|
8796
8447
|
function Dialog(options) {
|
8797
|
-
if (!inBrowser
|
8448
|
+
if (!inBrowser) {
|
8798
8449
|
return Promise.resolve();
|
8799
8450
|
}
|
8800
8451
|
return new Promise((resolve, reject) => {
|
@@ -8899,7 +8550,7 @@ var _DropdownMenu = defineComponent({
|
|
8899
8550
|
var id = useId();
|
8900
8551
|
var root = ref();
|
8901
8552
|
var barRef = ref();
|
8902
|
-
var
|
8553
|
+
var offset = ref(0);
|
8903
8554
|
var {
|
8904
8555
|
children,
|
8905
8556
|
linkChildren
|
@@ -8924,9 +8575,9 @@ var _DropdownMenu = defineComponent({
|
|
8924
8575
|
if (barRef.value) {
|
8925
8576
|
var rect = useRect(barRef);
|
8926
8577
|
if (props.direction === "down") {
|
8927
|
-
|
8578
|
+
offset.value = rect.bottom;
|
8928
8579
|
} else {
|
8929
|
-
|
8580
|
+
offset.value = windowHeight.value - rect.top;
|
8930
8581
|
}
|
8931
8582
|
}
|
8932
8583
|
};
|
@@ -8984,7 +8635,7 @@ var _DropdownMenu = defineComponent({
|
|
8984
8635
|
linkChildren({
|
8985
8636
|
id,
|
8986
8637
|
props,
|
8987
|
-
offset
|
8638
|
+
offset
|
8988
8639
|
});
|
8989
8640
|
useClickAway(root, onClickAway);
|
8990
8641
|
useEventListener("scroll", onScroll, {
|
@@ -9113,7 +8764,7 @@ var _DropdownItem = defineComponent({
|
|
9113
8764
|
};
|
9114
8765
|
var renderContent = () => {
|
9115
8766
|
var {
|
9116
|
-
offset
|
8767
|
+
offset
|
9117
8768
|
} = parent;
|
9118
8769
|
var {
|
9119
8770
|
zIndex,
|
@@ -9124,9 +8775,9 @@ var _DropdownItem = defineComponent({
|
|
9124
8775
|
} = parent.props;
|
9125
8776
|
var style = getZIndexStyle(zIndex);
|
9126
8777
|
if (direction === "down") {
|
9127
|
-
style.top =
|
8778
|
+
style.top = offset.value + "px";
|
9128
8779
|
} else {
|
9129
|
-
style.bottom =
|
8780
|
+
style.bottom = offset.value + "px";
|
9130
8781
|
}
|
9131
8782
|
return withDirectives(createVNode("div", {
|
9132
8783
|
"style": style,
|
@@ -9174,9 +8825,9 @@ var _DropdownItem = defineComponent({
|
|
9174
8825
|
var DropdownItem = withInstall(_DropdownItem);
|
9175
8826
|
var DropdownMenu = withInstall(_DropdownMenu);
|
9176
8827
|
var prefix = "van-empty-network-";
|
9177
|
-
var renderStop = (color,
|
8828
|
+
var renderStop = (color, offset, opacity) => createVNode("stop", {
|
9178
8829
|
"stop-color": color,
|
9179
|
-
"offset":
|
8830
|
+
"offset": offset + "%",
|
9180
8831
|
"stop-opacity": opacity
|
9181
8832
|
}, null);
|
9182
8833
|
var Network = createVNode("svg", {
|
@@ -9907,7 +9558,7 @@ var ImagePreview = function(options, startPosition) {
|
|
9907
9558
|
if (startPosition === void 0) {
|
9908
9559
|
startPosition = 0;
|
9909
9560
|
}
|
9910
|
-
if (!inBrowser
|
9561
|
+
if (!inBrowser) {
|
9911
9562
|
return;
|
9912
9563
|
}
|
9913
9564
|
if (!instance$1) {
|
@@ -10187,7 +9838,7 @@ var _IndexAnchor = defineComponent({
|
|
10187
9838
|
});
|
10188
9839
|
var IndexAnchor = withInstall(_IndexAnchor);
|
10189
9840
|
var IndexBar = withInstall(_IndexBar);
|
10190
|
-
var hasIntersectionObserver = inBrowser && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype;
|
9841
|
+
var hasIntersectionObserver = inBrowser$1 && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype;
|
10191
9842
|
var modeType = {
|
10192
9843
|
event: "event",
|
10193
9844
|
observer: "observer"
|
@@ -10258,10 +9909,10 @@ var getDPR = function(scale) {
|
|
10258
9909
|
if (scale === void 0) {
|
10259
9910
|
scale = 1;
|
10260
9911
|
}
|
10261
|
-
return inBrowser ? window.devicePixelRatio || scale : scale;
|
9912
|
+
return inBrowser$1 ? window.devicePixelRatio || scale : scale;
|
10262
9913
|
};
|
10263
9914
|
function supportWebp() {
|
10264
|
-
if (!inBrowser)
|
9915
|
+
if (!inBrowser$1)
|
10265
9916
|
return false;
|
10266
9917
|
var support = true;
|
10267
9918
|
try {
|
@@ -10570,7 +10221,7 @@ function Lazy() {
|
|
10570
10221
|
}
|
10571
10222
|
addLazyBox(vm) {
|
10572
10223
|
this.listeners.push(vm);
|
10573
|
-
if (inBrowser) {
|
10224
|
+
if (inBrowser$1) {
|
10574
10225
|
this.addListenerTarget(window);
|
10575
10226
|
this.observer && this.observer.observe(vm.el);
|
10576
10227
|
if (vm.$el && vm.$el.parentNode) {
|
@@ -10597,7 +10248,7 @@ function Lazy() {
|
|
10597
10248
|
$parent = $parent ? $parent.$el || $parent : document.getElementById(container);
|
10598
10249
|
}
|
10599
10250
|
if (!$parent) {
|
10600
|
-
$parent = getScrollParent
|
10251
|
+
$parent = getScrollParent(el);
|
10601
10252
|
}
|
10602
10253
|
var newListener = new ReactiveListener({
|
10603
10254
|
bindType: binding.arg,
|
@@ -10612,7 +10263,7 @@ function Lazy() {
|
|
10612
10263
|
imageCache: this.imageCache
|
10613
10264
|
});
|
10614
10265
|
this.listeners.push(newListener);
|
10615
|
-
if (inBrowser) {
|
10266
|
+
if (inBrowser$1) {
|
10616
10267
|
this.addListenerTarget(window);
|
10617
10268
|
this.addListenerTarget($parent);
|
10618
10269
|
}
|
@@ -10717,8 +10368,8 @@ function Lazy() {
|
|
10717
10368
|
}
|
10718
10369
|
});
|
10719
10370
|
}
|
10720
|
-
initListen(el,
|
10721
|
-
this.options.ListenEvents.forEach((evt) => (
|
10371
|
+
initListen(el, start) {
|
10372
|
+
this.options.ListenEvents.forEach((evt) => (start ? on : off)(el, evt, this.lazyLoadHandler));
|
10722
10373
|
}
|
10723
10374
|
initEvent() {
|
10724
10375
|
var _this = this;
|
@@ -10887,7 +10538,7 @@ var LazyComponent = (lazy) => ({
|
|
10887
10538
|
methods: {
|
10888
10539
|
checkInView() {
|
10889
10540
|
var rect = useRect(this.$el);
|
10890
|
-
return inBrowser && rect.top < window.innerHeight * lazy.options.preLoad && rect.bottom > 0 && rect.left < window.innerWidth * lazy.options.preLoad && rect.right > 0;
|
10541
|
+
return inBrowser$1 && rect.top < window.innerHeight * lazy.options.preLoad && rect.bottom > 0 && rect.left < window.innerWidth * lazy.options.preLoad && rect.right > 0;
|
10891
10542
|
},
|
10892
10543
|
load() {
|
10893
10544
|
this.show = true;
|
@@ -11141,7 +10792,7 @@ var _List = defineComponent({
|
|
11141
10792
|
return;
|
11142
10793
|
}
|
11143
10794
|
var {
|
11144
|
-
offset
|
10795
|
+
offset,
|
11145
10796
|
direction
|
11146
10797
|
} = props;
|
11147
10798
|
var scrollParentRect = useRect(scrollParent);
|
@@ -11151,9 +10802,9 @@ var _List = defineComponent({
|
|
11151
10802
|
var isReachEdge = false;
|
11152
10803
|
var placeholderRect = useRect(placeholder);
|
11153
10804
|
if (direction === "up") {
|
11154
|
-
isReachEdge = scrollParentRect.top - placeholderRect.top <=
|
10805
|
+
isReachEdge = scrollParentRect.top - placeholderRect.top <= offset;
|
11155
10806
|
} else {
|
11156
|
-
isReachEdge = placeholderRect.bottom - scrollParentRect.bottom <=
|
10807
|
+
isReachEdge = placeholderRect.bottom - scrollParentRect.bottom <= offset;
|
11157
10808
|
}
|
11158
10809
|
if (isReachEdge) {
|
11159
10810
|
loading.value = true;
|
@@ -11239,11 +10890,11 @@ var _List = defineComponent({
|
|
11239
10890
|
});
|
11240
10891
|
var List = withInstall(_List);
|
11241
10892
|
function usePlaceholder(contentRef, bem2) {
|
11242
|
-
var
|
10893
|
+
var height = useHeight(contentRef);
|
11243
10894
|
return (renderContent) => createVNode("div", {
|
11244
10895
|
"class": bem2("placeholder"),
|
11245
10896
|
"style": {
|
11246
|
-
height:
|
10897
|
+
height: height.value ? height.value + "px" : void 0
|
11247
10898
|
}
|
11248
10899
|
}, [renderContent()]);
|
11249
10900
|
}
|
@@ -11545,7 +11196,7 @@ function initInstance() {
|
|
11545
11196
|
}));
|
11546
11197
|
}
|
11547
11198
|
function Notify(options) {
|
11548
|
-
if (!inBrowser
|
11199
|
+
if (!inBrowser) {
|
11549
11200
|
return;
|
11550
11201
|
}
|
11551
11202
|
if (!instance) {
|
@@ -12103,737 +11754,6 @@ var _PasswordInput = defineComponent({
|
|
12103
11754
|
}
|
12104
11755
|
});
|
12105
11756
|
var PasswordInput = withInstall(_PasswordInput);
|
12106
|
-
function getBoundingClientRect(element, includeScale) {
|
12107
|
-
var rect = element.getBoundingClientRect();
|
12108
|
-
var scaleX = 1;
|
12109
|
-
var scaleY = 1;
|
12110
|
-
return {
|
12111
|
-
width: rect.width / scaleX,
|
12112
|
-
height: rect.height / scaleY,
|
12113
|
-
top: rect.top / scaleY,
|
12114
|
-
right: rect.right / scaleX,
|
12115
|
-
bottom: rect.bottom / scaleY,
|
12116
|
-
left: rect.left / scaleX,
|
12117
|
-
x: rect.left / scaleX,
|
12118
|
-
y: rect.top / scaleY
|
12119
|
-
};
|
12120
|
-
}
|
12121
|
-
function getWindow(node) {
|
12122
|
-
if (node == null) {
|
12123
|
-
return window;
|
12124
|
-
}
|
12125
|
-
if (node.toString() !== "[object Window]") {
|
12126
|
-
var ownerDocument = node.ownerDocument;
|
12127
|
-
return ownerDocument ? ownerDocument.defaultView || window : window;
|
12128
|
-
}
|
12129
|
-
return node;
|
12130
|
-
}
|
12131
|
-
function getWindowScroll(node) {
|
12132
|
-
var win = getWindow(node);
|
12133
|
-
var scrollLeft = win.pageXOffset;
|
12134
|
-
var scrollTop = win.pageYOffset;
|
12135
|
-
return {
|
12136
|
-
scrollLeft,
|
12137
|
-
scrollTop
|
12138
|
-
};
|
12139
|
-
}
|
12140
|
-
function isElement(node) {
|
12141
|
-
var OwnElement = getWindow(node).Element;
|
12142
|
-
return node instanceof OwnElement || node instanceof Element;
|
12143
|
-
}
|
12144
|
-
function isHTMLElement(node) {
|
12145
|
-
var OwnElement = getWindow(node).HTMLElement;
|
12146
|
-
return node instanceof OwnElement || node instanceof HTMLElement;
|
12147
|
-
}
|
12148
|
-
function isShadowRoot(node) {
|
12149
|
-
if (typeof ShadowRoot === "undefined") {
|
12150
|
-
return false;
|
12151
|
-
}
|
12152
|
-
var OwnElement = getWindow(node).ShadowRoot;
|
12153
|
-
return node instanceof OwnElement || node instanceof ShadowRoot;
|
12154
|
-
}
|
12155
|
-
function getHTMLElementScroll(element) {
|
12156
|
-
return {
|
12157
|
-
scrollLeft: element.scrollLeft,
|
12158
|
-
scrollTop: element.scrollTop
|
12159
|
-
};
|
12160
|
-
}
|
12161
|
-
function getNodeScroll(node) {
|
12162
|
-
if (node === getWindow(node) || !isHTMLElement(node)) {
|
12163
|
-
return getWindowScroll(node);
|
12164
|
-
} else {
|
12165
|
-
return getHTMLElementScroll(node);
|
12166
|
-
}
|
12167
|
-
}
|
12168
|
-
function getNodeName(element) {
|
12169
|
-
return element ? (element.nodeName || "").toLowerCase() : null;
|
12170
|
-
}
|
12171
|
-
function getDocumentElement(element) {
|
12172
|
-
return ((isElement(element) ? element.ownerDocument : element.document) || window.document).documentElement;
|
12173
|
-
}
|
12174
|
-
function getWindowScrollBarX(element) {
|
12175
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
|
12176
|
-
}
|
12177
|
-
function getComputedStyle(element) {
|
12178
|
-
return getWindow(element).getComputedStyle(element);
|
12179
|
-
}
|
12180
|
-
function isScrollParent(element) {
|
12181
|
-
var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
|
12182
|
-
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
12183
|
-
}
|
12184
|
-
function isElementScaled(element) {
|
12185
|
-
var rect = element.getBoundingClientRect();
|
12186
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
12187
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
12188
|
-
return scaleX !== 1 || scaleY !== 1;
|
12189
|
-
}
|
12190
|
-
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
12191
|
-
if (isFixed === void 0) {
|
12192
|
-
isFixed = false;
|
12193
|
-
}
|
12194
|
-
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
12195
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
12196
|
-
var documentElement = getDocumentElement(offsetParent);
|
12197
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
12198
|
-
var scroll = {
|
12199
|
-
scrollLeft: 0,
|
12200
|
-
scrollTop: 0
|
12201
|
-
};
|
12202
|
-
var offsets = {
|
12203
|
-
x: 0,
|
12204
|
-
y: 0
|
12205
|
-
};
|
12206
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
12207
|
-
if (getNodeName(offsetParent) !== "body" || isScrollParent(documentElement)) {
|
12208
|
-
scroll = getNodeScroll(offsetParent);
|
12209
|
-
}
|
12210
|
-
if (isHTMLElement(offsetParent)) {
|
12211
|
-
offsets = getBoundingClientRect(offsetParent);
|
12212
|
-
offsets.x += offsetParent.clientLeft;
|
12213
|
-
offsets.y += offsetParent.clientTop;
|
12214
|
-
} else if (documentElement) {
|
12215
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
12216
|
-
}
|
12217
|
-
}
|
12218
|
-
return {
|
12219
|
-
x: rect.left + scroll.scrollLeft - offsets.x,
|
12220
|
-
y: rect.top + scroll.scrollTop - offsets.y,
|
12221
|
-
width: rect.width,
|
12222
|
-
height: rect.height
|
12223
|
-
};
|
12224
|
-
}
|
12225
|
-
function getLayoutRect(element) {
|
12226
|
-
var clientRect = getBoundingClientRect(element);
|
12227
|
-
var width2 = element.offsetWidth;
|
12228
|
-
var height2 = element.offsetHeight;
|
12229
|
-
if (Math.abs(clientRect.width - width2) <= 1) {
|
12230
|
-
width2 = clientRect.width;
|
12231
|
-
}
|
12232
|
-
if (Math.abs(clientRect.height - height2) <= 1) {
|
12233
|
-
height2 = clientRect.height;
|
12234
|
-
}
|
12235
|
-
return {
|
12236
|
-
x: element.offsetLeft,
|
12237
|
-
y: element.offsetTop,
|
12238
|
-
width: width2,
|
12239
|
-
height: height2
|
12240
|
-
};
|
12241
|
-
}
|
12242
|
-
function getParentNode(element) {
|
12243
|
-
if (getNodeName(element) === "html") {
|
12244
|
-
return element;
|
12245
|
-
}
|
12246
|
-
return element.assignedSlot || element.parentNode || (isShadowRoot(element) ? element.host : null) || getDocumentElement(element);
|
12247
|
-
}
|
12248
|
-
function getScrollParent(node) {
|
12249
|
-
if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) {
|
12250
|
-
return node.ownerDocument.body;
|
12251
|
-
}
|
12252
|
-
if (isHTMLElement(node) && isScrollParent(node)) {
|
12253
|
-
return node;
|
12254
|
-
}
|
12255
|
-
return getScrollParent(getParentNode(node));
|
12256
|
-
}
|
12257
|
-
function listScrollParents(element, list) {
|
12258
|
-
var _element$ownerDocumen;
|
12259
|
-
if (list === void 0) {
|
12260
|
-
list = [];
|
12261
|
-
}
|
12262
|
-
var scrollParent = getScrollParent(element);
|
12263
|
-
var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
|
12264
|
-
var win = getWindow(scrollParent);
|
12265
|
-
var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
|
12266
|
-
var updatedList = list.concat(target);
|
12267
|
-
return isBody ? updatedList : updatedList.concat(listScrollParents(getParentNode(target)));
|
12268
|
-
}
|
12269
|
-
function isTableElement(element) {
|
12270
|
-
return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0;
|
12271
|
-
}
|
12272
|
-
function getTrueOffsetParent(element) {
|
12273
|
-
if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
|
12274
|
-
return null;
|
12275
|
-
}
|
12276
|
-
return element.offsetParent;
|
12277
|
-
}
|
12278
|
-
function getContainingBlock(element) {
|
12279
|
-
var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1;
|
12280
|
-
var isIE = navigator.userAgent.indexOf("Trident") !== -1;
|
12281
|
-
if (isIE && isHTMLElement(element)) {
|
12282
|
-
var elementCss = getComputedStyle(element);
|
12283
|
-
if (elementCss.position === "fixed") {
|
12284
|
-
return null;
|
12285
|
-
}
|
12286
|
-
}
|
12287
|
-
var currentNode = getParentNode(element);
|
12288
|
-
while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) {
|
12289
|
-
var css = getComputedStyle(currentNode);
|
12290
|
-
if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") {
|
12291
|
-
return currentNode;
|
12292
|
-
} else {
|
12293
|
-
currentNode = currentNode.parentNode;
|
12294
|
-
}
|
12295
|
-
}
|
12296
|
-
return null;
|
12297
|
-
}
|
12298
|
-
function getOffsetParent(element) {
|
12299
|
-
var window2 = getWindow(element);
|
12300
|
-
var offsetParent = getTrueOffsetParent(element);
|
12301
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
|
12302
|
-
offsetParent = getTrueOffsetParent(offsetParent);
|
12303
|
-
}
|
12304
|
-
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static")) {
|
12305
|
-
return window2;
|
12306
|
-
}
|
12307
|
-
return offsetParent || getContainingBlock(element) || window2;
|
12308
|
-
}
|
12309
|
-
var top = "top";
|
12310
|
-
var bottom = "bottom";
|
12311
|
-
var right = "right";
|
12312
|
-
var left = "left";
|
12313
|
-
var auto = "auto";
|
12314
|
-
var basePlacements = [top, bottom, right, left];
|
12315
|
-
var start = "start";
|
12316
|
-
var end = "end";
|
12317
|
-
var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) {
|
12318
|
-
return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
|
12319
|
-
}, []);
|
12320
|
-
var beforeRead = "beforeRead";
|
12321
|
-
var read = "read";
|
12322
|
-
var afterRead = "afterRead";
|
12323
|
-
var beforeMain = "beforeMain";
|
12324
|
-
var main = "main";
|
12325
|
-
var afterMain = "afterMain";
|
12326
|
-
var beforeWrite = "beforeWrite";
|
12327
|
-
var write = "write";
|
12328
|
-
var afterWrite = "afterWrite";
|
12329
|
-
var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
|
12330
|
-
function order(modifiers) {
|
12331
|
-
var map = new Map();
|
12332
|
-
var visited = new Set();
|
12333
|
-
var result = [];
|
12334
|
-
modifiers.forEach(function(modifier) {
|
12335
|
-
map.set(modifier.name, modifier);
|
12336
|
-
});
|
12337
|
-
function sort(modifier) {
|
12338
|
-
visited.add(modifier.name);
|
12339
|
-
var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
|
12340
|
-
requires.forEach(function(dep) {
|
12341
|
-
if (!visited.has(dep)) {
|
12342
|
-
var depModifier = map.get(dep);
|
12343
|
-
if (depModifier) {
|
12344
|
-
sort(depModifier);
|
12345
|
-
}
|
12346
|
-
}
|
12347
|
-
});
|
12348
|
-
result.push(modifier);
|
12349
|
-
}
|
12350
|
-
modifiers.forEach(function(modifier) {
|
12351
|
-
if (!visited.has(modifier.name)) {
|
12352
|
-
sort(modifier);
|
12353
|
-
}
|
12354
|
-
});
|
12355
|
-
return result;
|
12356
|
-
}
|
12357
|
-
function orderModifiers(modifiers) {
|
12358
|
-
var orderedModifiers = order(modifiers);
|
12359
|
-
return modifierPhases.reduce(function(acc, phase) {
|
12360
|
-
return acc.concat(orderedModifiers.filter(function(modifier) {
|
12361
|
-
return modifier.phase === phase;
|
12362
|
-
}));
|
12363
|
-
}, []);
|
12364
|
-
}
|
12365
|
-
function debounce(fn2) {
|
12366
|
-
var pending;
|
12367
|
-
return function() {
|
12368
|
-
if (!pending) {
|
12369
|
-
pending = new Promise(function(resolve) {
|
12370
|
-
Promise.resolve().then(function() {
|
12371
|
-
pending = void 0;
|
12372
|
-
resolve(fn2());
|
12373
|
-
});
|
12374
|
-
});
|
12375
|
-
}
|
12376
|
-
return pending;
|
12377
|
-
};
|
12378
|
-
}
|
12379
|
-
function getBasePlacement(placement) {
|
12380
|
-
return placement.split("-")[0];
|
12381
|
-
}
|
12382
|
-
function mergeByName(modifiers) {
|
12383
|
-
var merged = modifiers.reduce(function(merged2, current2) {
|
12384
|
-
var existing = merged2[current2.name];
|
12385
|
-
merged2[current2.name] = existing ? Object.assign({}, existing, current2, {
|
12386
|
-
options: Object.assign({}, existing.options, current2.options),
|
12387
|
-
data: Object.assign({}, existing.data, current2.data)
|
12388
|
-
}) : current2;
|
12389
|
-
return merged2;
|
12390
|
-
}, {});
|
12391
|
-
return Object.keys(merged).map(function(key) {
|
12392
|
-
return merged[key];
|
12393
|
-
});
|
12394
|
-
}
|
12395
|
-
var round = Math.round;
|
12396
|
-
function getVariation(placement) {
|
12397
|
-
return placement.split("-")[1];
|
12398
|
-
}
|
12399
|
-
function getMainAxisFromPlacement(placement) {
|
12400
|
-
return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
|
12401
|
-
}
|
12402
|
-
function computeOffsets(_ref) {
|
12403
|
-
var reference = _ref.reference, element = _ref.element, placement = _ref.placement;
|
12404
|
-
var basePlacement = placement ? getBasePlacement(placement) : null;
|
12405
|
-
var variation = placement ? getVariation(placement) : null;
|
12406
|
-
var commonX = reference.x + reference.width / 2 - element.width / 2;
|
12407
|
-
var commonY = reference.y + reference.height / 2 - element.height / 2;
|
12408
|
-
var offsets;
|
12409
|
-
switch (basePlacement) {
|
12410
|
-
case top:
|
12411
|
-
offsets = {
|
12412
|
-
x: commonX,
|
12413
|
-
y: reference.y - element.height
|
12414
|
-
};
|
12415
|
-
break;
|
12416
|
-
case bottom:
|
12417
|
-
offsets = {
|
12418
|
-
x: commonX,
|
12419
|
-
y: reference.y + reference.height
|
12420
|
-
};
|
12421
|
-
break;
|
12422
|
-
case right:
|
12423
|
-
offsets = {
|
12424
|
-
x: reference.x + reference.width,
|
12425
|
-
y: commonY
|
12426
|
-
};
|
12427
|
-
break;
|
12428
|
-
case left:
|
12429
|
-
offsets = {
|
12430
|
-
x: reference.x - element.width,
|
12431
|
-
y: commonY
|
12432
|
-
};
|
12433
|
-
break;
|
12434
|
-
default:
|
12435
|
-
offsets = {
|
12436
|
-
x: reference.x,
|
12437
|
-
y: reference.y
|
12438
|
-
};
|
12439
|
-
}
|
12440
|
-
var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
|
12441
|
-
if (mainAxis != null) {
|
12442
|
-
var len = mainAxis === "y" ? "height" : "width";
|
12443
|
-
switch (variation) {
|
12444
|
-
case start:
|
12445
|
-
offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
|
12446
|
-
break;
|
12447
|
-
case end:
|
12448
|
-
offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
|
12449
|
-
break;
|
12450
|
-
}
|
12451
|
-
}
|
12452
|
-
return offsets;
|
12453
|
-
}
|
12454
|
-
var DEFAULT_OPTIONS = {
|
12455
|
-
placement: "bottom",
|
12456
|
-
modifiers: [],
|
12457
|
-
strategy: "absolute"
|
12458
|
-
};
|
12459
|
-
function areValidElements() {
|
12460
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
12461
|
-
args[_key] = arguments[_key];
|
12462
|
-
}
|
12463
|
-
return !args.some(function(element) {
|
12464
|
-
return !(element && typeof element.getBoundingClientRect === "function");
|
12465
|
-
});
|
12466
|
-
}
|
12467
|
-
function popperGenerator(generatorOptions) {
|
12468
|
-
if (generatorOptions === void 0) {
|
12469
|
-
generatorOptions = {};
|
12470
|
-
}
|
12471
|
-
var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions2 = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
|
12472
|
-
return function createPopper2(reference, popper, options) {
|
12473
|
-
if (options === void 0) {
|
12474
|
-
options = defaultOptions2;
|
12475
|
-
}
|
12476
|
-
var state = {
|
12477
|
-
placement: "bottom",
|
12478
|
-
orderedModifiers: [],
|
12479
|
-
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions2),
|
12480
|
-
modifiersData: {},
|
12481
|
-
elements: {
|
12482
|
-
reference,
|
12483
|
-
popper
|
12484
|
-
},
|
12485
|
-
attributes: {},
|
12486
|
-
styles: {}
|
12487
|
-
};
|
12488
|
-
var effectCleanupFns = [];
|
12489
|
-
var isDestroyed = false;
|
12490
|
-
var instance2 = {
|
12491
|
-
state,
|
12492
|
-
setOptions: function setOptions(setOptionsAction) {
|
12493
|
-
var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
|
12494
|
-
cleanupModifierEffects();
|
12495
|
-
state.options = Object.assign({}, defaultOptions2, state.options, options2);
|
12496
|
-
state.scrollParents = {
|
12497
|
-
reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
|
12498
|
-
popper: listScrollParents(popper)
|
12499
|
-
};
|
12500
|
-
var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers)));
|
12501
|
-
state.orderedModifiers = orderedModifiers.filter(function(m) {
|
12502
|
-
return m.enabled;
|
12503
|
-
});
|
12504
|
-
runModifierEffects();
|
12505
|
-
return instance2.update();
|
12506
|
-
},
|
12507
|
-
forceUpdate: function forceUpdate() {
|
12508
|
-
if (isDestroyed) {
|
12509
|
-
return;
|
12510
|
-
}
|
12511
|
-
var _state$elements = state.elements, reference2 = _state$elements.reference, popper2 = _state$elements.popper;
|
12512
|
-
if (!areValidElements(reference2, popper2)) {
|
12513
|
-
return;
|
12514
|
-
}
|
12515
|
-
state.rects = {
|
12516
|
-
reference: getCompositeRect(reference2, getOffsetParent(popper2), state.options.strategy === "fixed"),
|
12517
|
-
popper: getLayoutRect(popper2)
|
12518
|
-
};
|
12519
|
-
state.reset = false;
|
12520
|
-
state.placement = state.options.placement;
|
12521
|
-
state.orderedModifiers.forEach(function(modifier) {
|
12522
|
-
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
|
12523
|
-
});
|
12524
|
-
for (var index2 = 0; index2 < state.orderedModifiers.length; index2++) {
|
12525
|
-
if (state.reset === true) {
|
12526
|
-
state.reset = false;
|
12527
|
-
index2 = -1;
|
12528
|
-
continue;
|
12529
|
-
}
|
12530
|
-
var _state$orderedModifie = state.orderedModifiers[index2], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name2 = _state$orderedModifie.name;
|
12531
|
-
if (typeof fn2 === "function") {
|
12532
|
-
state = fn2({
|
12533
|
-
state,
|
12534
|
-
options: _options,
|
12535
|
-
name: name2,
|
12536
|
-
instance: instance2
|
12537
|
-
}) || state;
|
12538
|
-
}
|
12539
|
-
}
|
12540
|
-
},
|
12541
|
-
update: debounce(function() {
|
12542
|
-
return new Promise(function(resolve) {
|
12543
|
-
instance2.forceUpdate();
|
12544
|
-
resolve(state);
|
12545
|
-
});
|
12546
|
-
}),
|
12547
|
-
destroy: function destroy() {
|
12548
|
-
cleanupModifierEffects();
|
12549
|
-
isDestroyed = true;
|
12550
|
-
}
|
12551
|
-
};
|
12552
|
-
if (!areValidElements(reference, popper)) {
|
12553
|
-
return instance2;
|
12554
|
-
}
|
12555
|
-
instance2.setOptions(options).then(function(state2) {
|
12556
|
-
if (!isDestroyed && options.onFirstUpdate) {
|
12557
|
-
options.onFirstUpdate(state2);
|
12558
|
-
}
|
12559
|
-
});
|
12560
|
-
function runModifierEffects() {
|
12561
|
-
state.orderedModifiers.forEach(function(_ref3) {
|
12562
|
-
var name2 = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect2 = _ref3.effect;
|
12563
|
-
if (typeof effect2 === "function") {
|
12564
|
-
var cleanupFn = effect2({
|
12565
|
-
state,
|
12566
|
-
name: name2,
|
12567
|
-
instance: instance2,
|
12568
|
-
options: options2
|
12569
|
-
});
|
12570
|
-
var noopFn = function noopFn2() {
|
12571
|
-
};
|
12572
|
-
effectCleanupFns.push(cleanupFn || noopFn);
|
12573
|
-
}
|
12574
|
-
});
|
12575
|
-
}
|
12576
|
-
function cleanupModifierEffects() {
|
12577
|
-
effectCleanupFns.forEach(function(fn2) {
|
12578
|
-
return fn2();
|
12579
|
-
});
|
12580
|
-
effectCleanupFns = [];
|
12581
|
-
}
|
12582
|
-
return instance2;
|
12583
|
-
};
|
12584
|
-
}
|
12585
|
-
var passive = {
|
12586
|
-
passive: true
|
12587
|
-
};
|
12588
|
-
function effect$1(_ref) {
|
12589
|
-
var state = _ref.state, instance2 = _ref.instance, options = _ref.options;
|
12590
|
-
var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize;
|
12591
|
-
var window2 = getWindow(state.elements.popper);
|
12592
|
-
var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
|
12593
|
-
if (scroll) {
|
12594
|
-
scrollParents.forEach(function(scrollParent) {
|
12595
|
-
scrollParent.addEventListener("scroll", instance2.update, passive);
|
12596
|
-
});
|
12597
|
-
}
|
12598
|
-
if (resize) {
|
12599
|
-
window2.addEventListener("resize", instance2.update, passive);
|
12600
|
-
}
|
12601
|
-
return function() {
|
12602
|
-
if (scroll) {
|
12603
|
-
scrollParents.forEach(function(scrollParent) {
|
12604
|
-
scrollParent.removeEventListener("scroll", instance2.update, passive);
|
12605
|
-
});
|
12606
|
-
}
|
12607
|
-
if (resize) {
|
12608
|
-
window2.removeEventListener("resize", instance2.update, passive);
|
12609
|
-
}
|
12610
|
-
};
|
12611
|
-
}
|
12612
|
-
var eventListeners = {
|
12613
|
-
name: "eventListeners",
|
12614
|
-
enabled: true,
|
12615
|
-
phase: "write",
|
12616
|
-
fn: function fn() {
|
12617
|
-
},
|
12618
|
-
effect: effect$1,
|
12619
|
-
data: {}
|
12620
|
-
};
|
12621
|
-
function popperOffsets(_ref) {
|
12622
|
-
var state = _ref.state, name2 = _ref.name;
|
12623
|
-
state.modifiersData[name2] = computeOffsets({
|
12624
|
-
reference: state.rects.reference,
|
12625
|
-
element: state.rects.popper,
|
12626
|
-
strategy: "absolute",
|
12627
|
-
placement: state.placement
|
12628
|
-
});
|
12629
|
-
}
|
12630
|
-
var popperOffsets$1 = {
|
12631
|
-
name: "popperOffsets",
|
12632
|
-
enabled: true,
|
12633
|
-
phase: "read",
|
12634
|
-
fn: popperOffsets,
|
12635
|
-
data: {}
|
12636
|
-
};
|
12637
|
-
var unsetSides = {
|
12638
|
-
top: "auto",
|
12639
|
-
right: "auto",
|
12640
|
-
bottom: "auto",
|
12641
|
-
left: "auto"
|
12642
|
-
};
|
12643
|
-
function roundOffsetsByDPR(_ref) {
|
12644
|
-
var x = _ref.x, y = _ref.y;
|
12645
|
-
var win = window;
|
12646
|
-
var dpr = win.devicePixelRatio || 1;
|
12647
|
-
return {
|
12648
|
-
x: round(round(x * dpr) / dpr) || 0,
|
12649
|
-
y: round(round(y * dpr) / dpr) || 0
|
12650
|
-
};
|
12651
|
-
}
|
12652
|
-
function mapToStyles(_ref2) {
|
12653
|
-
var _Object$assign2;
|
12654
|
-
var popper = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets;
|
12655
|
-
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === "function" ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y;
|
12656
|
-
var hasX = offsets.hasOwnProperty("x");
|
12657
|
-
var hasY = offsets.hasOwnProperty("y");
|
12658
|
-
var sideX = left;
|
12659
|
-
var sideY = top;
|
12660
|
-
var win = window;
|
12661
|
-
if (adaptive) {
|
12662
|
-
var offsetParent = getOffsetParent(popper);
|
12663
|
-
var heightProp = "clientHeight";
|
12664
|
-
var widthProp = "clientWidth";
|
12665
|
-
if (offsetParent === getWindow(popper)) {
|
12666
|
-
offsetParent = getDocumentElement(popper);
|
12667
|
-
if (getComputedStyle(offsetParent).position !== "static" && position === "absolute") {
|
12668
|
-
heightProp = "scrollHeight";
|
12669
|
-
widthProp = "scrollWidth";
|
12670
|
-
}
|
12671
|
-
}
|
12672
|
-
offsetParent = offsetParent;
|
12673
|
-
if (placement === top || (placement === left || placement === right) && variation === end) {
|
12674
|
-
sideY = bottom;
|
12675
|
-
y -= offsetParent[heightProp] - popperRect.height;
|
12676
|
-
y *= gpuAcceleration ? 1 : -1;
|
12677
|
-
}
|
12678
|
-
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
12679
|
-
sideX = right;
|
12680
|
-
x -= offsetParent[widthProp] - popperRect.width;
|
12681
|
-
x *= gpuAcceleration ? 1 : -1;
|
12682
|
-
}
|
12683
|
-
}
|
12684
|
-
var commonStyles = Object.assign({
|
12685
|
-
position
|
12686
|
-
}, adaptive && unsetSides);
|
12687
|
-
if (gpuAcceleration) {
|
12688
|
-
var _Object$assign;
|
12689
|
-
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
|
12690
|
-
}
|
12691
|
-
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
|
12692
|
-
}
|
12693
|
-
function computeStyles(_ref4) {
|
12694
|
-
var state = _ref4.state, options = _ref4.options;
|
12695
|
-
var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
|
12696
|
-
var commonStyles = {
|
12697
|
-
placement: getBasePlacement(state.placement),
|
12698
|
-
variation: getVariation(state.placement),
|
12699
|
-
popper: state.elements.popper,
|
12700
|
-
popperRect: state.rects.popper,
|
12701
|
-
gpuAcceleration
|
12702
|
-
};
|
12703
|
-
if (state.modifiersData.popperOffsets != null) {
|
12704
|
-
state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
|
12705
|
-
offsets: state.modifiersData.popperOffsets,
|
12706
|
-
position: state.options.strategy,
|
12707
|
-
adaptive,
|
12708
|
-
roundOffsets
|
12709
|
-
})));
|
12710
|
-
}
|
12711
|
-
if (state.modifiersData.arrow != null) {
|
12712
|
-
state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
|
12713
|
-
offsets: state.modifiersData.arrow,
|
12714
|
-
position: "absolute",
|
12715
|
-
adaptive: false,
|
12716
|
-
roundOffsets
|
12717
|
-
})));
|
12718
|
-
}
|
12719
|
-
state.attributes.popper = Object.assign({}, state.attributes.popper, {
|
12720
|
-
"data-popper-placement": state.placement
|
12721
|
-
});
|
12722
|
-
}
|
12723
|
-
var computeStyles$1 = {
|
12724
|
-
name: "computeStyles",
|
12725
|
-
enabled: true,
|
12726
|
-
phase: "beforeWrite",
|
12727
|
-
fn: computeStyles,
|
12728
|
-
data: {}
|
12729
|
-
};
|
12730
|
-
function applyStyles(_ref) {
|
12731
|
-
var state = _ref.state;
|
12732
|
-
Object.keys(state.elements).forEach(function(name2) {
|
12733
|
-
var style = state.styles[name2] || {};
|
12734
|
-
var attributes = state.attributes[name2] || {};
|
12735
|
-
var element = state.elements[name2];
|
12736
|
-
if (!isHTMLElement(element) || !getNodeName(element)) {
|
12737
|
-
return;
|
12738
|
-
}
|
12739
|
-
Object.assign(element.style, style);
|
12740
|
-
Object.keys(attributes).forEach(function(name3) {
|
12741
|
-
var value = attributes[name3];
|
12742
|
-
if (value === false) {
|
12743
|
-
element.removeAttribute(name3);
|
12744
|
-
} else {
|
12745
|
-
element.setAttribute(name3, value === true ? "" : value);
|
12746
|
-
}
|
12747
|
-
});
|
12748
|
-
});
|
12749
|
-
}
|
12750
|
-
function effect(_ref2) {
|
12751
|
-
var state = _ref2.state;
|
12752
|
-
var initialStyles = {
|
12753
|
-
popper: {
|
12754
|
-
position: state.options.strategy,
|
12755
|
-
left: "0",
|
12756
|
-
top: "0",
|
12757
|
-
margin: "0"
|
12758
|
-
},
|
12759
|
-
arrow: {
|
12760
|
-
position: "absolute"
|
12761
|
-
},
|
12762
|
-
reference: {}
|
12763
|
-
};
|
12764
|
-
Object.assign(state.elements.popper.style, initialStyles.popper);
|
12765
|
-
state.styles = initialStyles;
|
12766
|
-
if (state.elements.arrow) {
|
12767
|
-
Object.assign(state.elements.arrow.style, initialStyles.arrow);
|
12768
|
-
}
|
12769
|
-
return function() {
|
12770
|
-
Object.keys(state.elements).forEach(function(name2) {
|
12771
|
-
var element = state.elements[name2];
|
12772
|
-
var attributes = state.attributes[name2] || {};
|
12773
|
-
var styleProperties = Object.keys(state.styles.hasOwnProperty(name2) ? state.styles[name2] : initialStyles[name2]);
|
12774
|
-
var style = styleProperties.reduce(function(style2, property) {
|
12775
|
-
style2[property] = "";
|
12776
|
-
return style2;
|
12777
|
-
}, {});
|
12778
|
-
if (!isHTMLElement(element) || !getNodeName(element)) {
|
12779
|
-
return;
|
12780
|
-
}
|
12781
|
-
Object.assign(element.style, style);
|
12782
|
-
Object.keys(attributes).forEach(function(attribute) {
|
12783
|
-
element.removeAttribute(attribute);
|
12784
|
-
});
|
12785
|
-
});
|
12786
|
-
};
|
12787
|
-
}
|
12788
|
-
var applyStyles$1 = {
|
12789
|
-
name: "applyStyles",
|
12790
|
-
enabled: true,
|
12791
|
-
phase: "write",
|
12792
|
-
fn: applyStyles,
|
12793
|
-
effect,
|
12794
|
-
requires: ["computeStyles"]
|
12795
|
-
};
|
12796
|
-
var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];
|
12797
|
-
var createPopper = /* @__PURE__ */ popperGenerator({
|
12798
|
-
defaultModifiers
|
12799
|
-
});
|
12800
|
-
function distanceAndSkiddingToXY(placement, rects, offset2) {
|
12801
|
-
var basePlacement = getBasePlacement(placement);
|
12802
|
-
var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
|
12803
|
-
var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, {
|
12804
|
-
placement
|
12805
|
-
})) : offset2, skidding = _ref[0], distance = _ref[1];
|
12806
|
-
skidding = skidding || 0;
|
12807
|
-
distance = (distance || 0) * invertDistance;
|
12808
|
-
return [left, right].indexOf(basePlacement) >= 0 ? {
|
12809
|
-
x: distance,
|
12810
|
-
y: skidding
|
12811
|
-
} : {
|
12812
|
-
x: skidding,
|
12813
|
-
y: distance
|
12814
|
-
};
|
12815
|
-
}
|
12816
|
-
function offset(_ref2) {
|
12817
|
-
var state = _ref2.state, options = _ref2.options, name2 = _ref2.name;
|
12818
|
-
var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset;
|
12819
|
-
var data = placements.reduce(function(acc, placement) {
|
12820
|
-
acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2);
|
12821
|
-
return acc;
|
12822
|
-
}, {});
|
12823
|
-
var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y;
|
12824
|
-
if (state.modifiersData.popperOffsets != null) {
|
12825
|
-
state.modifiersData.popperOffsets.x += x;
|
12826
|
-
state.modifiersData.popperOffsets.y += y;
|
12827
|
-
}
|
12828
|
-
state.modifiersData[name2] = data;
|
12829
|
-
}
|
12830
|
-
var offset$1 = {
|
12831
|
-
name: "offset",
|
12832
|
-
enabled: true,
|
12833
|
-
phase: "main",
|
12834
|
-
requires: ["popperOffsets"],
|
12835
|
-
fn: offset
|
12836
|
-
};
|
12837
11757
|
var [name$i, bem$i] = createNamespace("popover");
|
12838
11758
|
var popupProps = ["show", "overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
|
12839
11759
|
var popoverProps = {
|
@@ -12883,7 +11803,7 @@ var _Popover = defineComponent({
|
|
12883
11803
|
adaptive: false,
|
12884
11804
|
gpuAcceleration: false
|
12885
11805
|
}
|
12886
|
-
}, extend({},
|
11806
|
+
}, extend({}, offsetModifier, {
|
12887
11807
|
options: {
|
12888
11808
|
offset: props.offset
|
12889
11809
|
}
|
@@ -13889,11 +12809,11 @@ var _Slider = defineComponent({
|
|
13889
12809
|
var isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
13890
12810
|
var handleRangeValue = (value) => {
|
13891
12811
|
var _value$, _value$2;
|
13892
|
-
var
|
13893
|
-
var
|
13894
|
-
return
|
12812
|
+
var left = (_value$ = value[0]) != null ? _value$ : Number(props.min);
|
12813
|
+
var right = (_value$2 = value[1]) != null ? _value$2 : Number(props.max);
|
12814
|
+
return left > right ? [right, left] : [left, right];
|
13895
12815
|
};
|
13896
|
-
var updateValue = (value,
|
12816
|
+
var updateValue = (value, end) => {
|
13897
12817
|
if (isRange(value)) {
|
13898
12818
|
value = handleRangeValue(value).map(format2);
|
13899
12819
|
} else {
|
@@ -13902,7 +12822,7 @@ var _Slider = defineComponent({
|
|
13902
12822
|
if (!isSameValue(value, props.modelValue)) {
|
13903
12823
|
emit("update:modelValue", value);
|
13904
12824
|
}
|
13905
|
-
if (
|
12825
|
+
if (end && !isSameValue(value, startValue)) {
|
13906
12826
|
emit("change", value);
|
13907
12827
|
}
|
13908
12828
|
};
|
@@ -13933,12 +12853,12 @@ var _Slider = defineComponent({
|
|
13933
12853
|
var total = vertical ? rect.height : rect.width;
|
13934
12854
|
var value = Number(min) + getDelta() / total * scope.value;
|
13935
12855
|
if (isRange(modelValue)) {
|
13936
|
-
var [
|
13937
|
-
var middle = (
|
12856
|
+
var [left, right] = modelValue;
|
12857
|
+
var middle = (left + right) / 2;
|
13938
12858
|
if (value <= middle) {
|
13939
|
-
updateValue([value,
|
12859
|
+
updateValue([value, right], true);
|
13940
12860
|
} else {
|
13941
|
-
updateValue([
|
12861
|
+
updateValue([left, value], true);
|
13942
12862
|
}
|
13943
12863
|
} else {
|
13944
12864
|
updateValue(value, true);
|
@@ -14590,11 +13510,11 @@ var _SwipeCell = defineComponent({
|
|
14590
13510
|
}
|
14591
13511
|
};
|
14592
13512
|
var toggle = (side) => {
|
14593
|
-
var
|
13513
|
+
var offset = Math.abs(state.offset);
|
14594
13514
|
var THRESHOLD = 0.15;
|
14595
13515
|
var threshold = opened ? 1 - THRESHOLD : THRESHOLD;
|
14596
|
-
var
|
14597
|
-
if (
|
13516
|
+
var width = side === "left" ? leftWidth.value : rightWidth.value;
|
13517
|
+
if (width && offset > width * threshold) {
|
14598
13518
|
open(side);
|
14599
13519
|
} else {
|
14600
13520
|
close(side);
|
@@ -14810,9 +13730,11 @@ var _TabbarItem = defineComponent({
|
|
14810
13730
|
var config = isObject(to) ? to : {
|
14811
13731
|
path: to
|
14812
13732
|
};
|
14813
|
-
|
14814
|
-
|
14815
|
-
|
13733
|
+
return !!$route.matched.find((val) => {
|
13734
|
+
var pathMatched = "path" in config && config.path === val.path;
|
13735
|
+
var nameMatched = "name" in config && config.name === val.name;
|
13736
|
+
return pathMatched || nameMatched;
|
13737
|
+
});
|
14816
13738
|
}
|
14817
13739
|
return ((_props$name = props.name) != null ? _props$name : index2.value) === modelValue;
|
14818
13740
|
});
|
@@ -15376,7 +14298,7 @@ var _Uploader = defineComponent({
|
|
15376
14298
|
}
|
15377
14299
|
});
|
15378
14300
|
var Uploader = withInstall(_Uploader);
|
15379
|
-
var version = "3.3.
|
14301
|
+
var version = "3.3.2";
|
15380
14302
|
function install(app) {
|
15381
14303
|
var components = [ActionBar, ActionBarButton, ActionBarIcon, ActionSheet, AddressEdit, AddressList, Area, Badge, Button, Calendar, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, ConfigProvider, ContactCard, ContactEdit, ContactList, CountDown, Coupon, CouponCell, CouponList, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, Form, Grid, GridItem, Icon, Image$1, ImagePreview, IndexAnchor, IndexBar, List, Loading, Locale, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rate, Row, Search, ShareSheet, Sidebar, SidebarItem, Skeleton, Slider, Step, Stepper, Steps, Sticky, SubmitBar, Swipe, SwipeCell, SwipeItem, Switch, Tab, Tabbar, TabbarItem, Tabs, Tag, Toast, TreeSelect, Uploader];
|
15382
14304
|
components.forEach((item) => {
|