@pubinfo-pr/devtools 0.204.5 → 0.220.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/dist/client/assets/{core-DZ0_U_pO.js → core-D6JqxgYq.js} +134 -133
- package/dist/client/assets/{engine-oniguruma-Cxk0otvy.js → engine-oniguruma-n-bafM3H.js} +8 -8
- package/dist/client/assets/{fetch-Df05JmPt.js → fetch-DxuBXEk3.js} +2 -3
- package/dist/client/assets/{index-Blntvu93.css → index-D7UL6pHD.css} +1 -1
- package/dist/client/assets/{index-Cn9-H915.js → index-DcEJJh1_.js} +1143 -1115
- package/dist/client/assets/{pages-BdQpgtx4.js → pages-CfWIiNIx.js} +2 -2
- package/dist/client/assets/{server-router-BHD-n_Wi.js → server-router-Bu5965f8.js} +14 -15
- package/dist/client/assets/vue-DZSPIjN6.js +27 -0
- package/dist/client/index.html +2 -2
- package/dist/constants.d.mts +1 -2
- package/dist/dirs.mjs +15 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.mjs +2 -2
- package/dist/panel/index.mjs +1 -3798
- package/package.json +20 -17
- package/dist/client/assets/vue-Be3tcD1h.js +0 -27
- package/dist/dirs2.mjs +0 -17
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./pages-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./pages-CfWIiNIx.js","./fetch-DxuBXEk3.js","./server-router-Bu5965f8.js","./server-router-8PynUpe5.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
(function polyfill() {
|
|
3
3
|
const relList = document.createElement("link").relList;
|
|
4
4
|
if (relList && relList.supports && relList.supports("modulepreload")) return;
|
|
@@ -29,7 +29,7 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./pages-BdQpgtx4.js","
|
|
|
29
29
|
}
|
|
30
30
|
})();
|
|
31
31
|
/**
|
|
32
|
-
* @vue/shared v3.5.
|
|
32
|
+
* @vue/shared v3.5.28
|
|
33
33
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
34
34
|
* @license MIT
|
|
35
35
|
**/
|
|
@@ -47,8 +47,8 @@ var isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && (k
|
|
|
47
47
|
var isModelListener = (key) => key.startsWith("onUpdate:");
|
|
48
48
|
var extend = Object.assign;
|
|
49
49
|
var remove = (arr, el) => {
|
|
50
|
-
const i
|
|
51
|
-
if (i
|
|
50
|
+
const i = arr.indexOf(el);
|
|
51
|
+
if (i > -1) arr.splice(i, 1);
|
|
52
52
|
};
|
|
53
53
|
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
54
54
|
var hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
|
|
@@ -80,7 +80,7 @@ var cacheStringFunction = (fn) => {
|
|
|
80
80
|
};
|
|
81
81
|
var camelizeRE = /-\w/g;
|
|
82
82
|
var camelize = cacheStringFunction((str) => {
|
|
83
|
-
return str.replace(camelizeRE, (c
|
|
83
|
+
return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
|
|
84
84
|
});
|
|
85
85
|
var hyphenateRE = /\B([A-Z])/g;
|
|
86
86
|
var hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
@@ -92,7 +92,7 @@ var toHandlerKey = cacheStringFunction((str) => {
|
|
|
92
92
|
});
|
|
93
93
|
var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
94
94
|
var invokeArrayFns = (fns, ...arg) => {
|
|
95
|
-
for (let i
|
|
95
|
+
for (let i = 0; i < fns.length; i++) fns[i](...arg);
|
|
96
96
|
};
|
|
97
97
|
var def = (obj, key, value, writable = false) => {
|
|
98
98
|
Object.defineProperty(obj, key, {
|
|
@@ -103,12 +103,12 @@ var def = (obj, key, value, writable = false) => {
|
|
|
103
103
|
});
|
|
104
104
|
};
|
|
105
105
|
var looseToNumber = (val) => {
|
|
106
|
-
const n
|
|
107
|
-
return isNaN(n
|
|
106
|
+
const n = parseFloat(val);
|
|
107
|
+
return isNaN(n) ? val : n;
|
|
108
108
|
};
|
|
109
109
|
var toNumber = (val) => {
|
|
110
|
-
const n
|
|
111
|
-
return isNaN(n
|
|
110
|
+
const n = isString(val) ? Number(val) : NaN;
|
|
111
|
+
return isNaN(n) ? val : n;
|
|
112
112
|
};
|
|
113
113
|
var _globalThis;
|
|
114
114
|
var getGlobalThis = () => {
|
|
@@ -117,8 +117,8 @@ var getGlobalThis = () => {
|
|
|
117
117
|
function normalizeStyle(value) {
|
|
118
118
|
if (isArray$1(value)) {
|
|
119
119
|
const res = {};
|
|
120
|
-
for (let i
|
|
121
|
-
const item = value[i
|
|
120
|
+
for (let i = 0; i < value.length; i++) {
|
|
121
|
+
const item = value[i];
|
|
122
122
|
const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
|
|
123
123
|
if (normalized) for (const key in normalized) res[key] = normalized[key];
|
|
124
124
|
}
|
|
@@ -141,8 +141,8 @@ function parseStringStyle(cssText) {
|
|
|
141
141
|
function normalizeClass(value) {
|
|
142
142
|
let res = "";
|
|
143
143
|
if (isString(value)) res = value;
|
|
144
|
-
else if (isArray$1(value)) for (let i
|
|
145
|
-
const normalized = normalizeClass(value[i
|
|
144
|
+
else if (isArray$1(value)) for (let i = 0; i < value.length; i++) {
|
|
145
|
+
const normalized = normalizeClass(value[i]);
|
|
146
146
|
if (normalized) res += normalized + " ";
|
|
147
147
|
}
|
|
148
148
|
else if (isObject(value)) {
|
|
@@ -163,35 +163,35 @@ specialBooleanAttrs + "";
|
|
|
163
163
|
function includeBooleanAttr(value) {
|
|
164
164
|
return !!value || value === "";
|
|
165
165
|
}
|
|
166
|
-
function looseCompareArrays(a
|
|
167
|
-
if (a
|
|
166
|
+
function looseCompareArrays(a, b) {
|
|
167
|
+
if (a.length !== b.length) return false;
|
|
168
168
|
let equal = true;
|
|
169
|
-
for (let i
|
|
169
|
+
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
|
|
170
170
|
return equal;
|
|
171
171
|
}
|
|
172
|
-
function looseEqual(a
|
|
173
|
-
if (a
|
|
174
|
-
let aValidType = isDate(a
|
|
175
|
-
let bValidType = isDate(b
|
|
176
|
-
if (aValidType || bValidType) return aValidType && bValidType ? a
|
|
177
|
-
aValidType = isSymbol(a
|
|
178
|
-
bValidType = isSymbol(b
|
|
179
|
-
if (aValidType || bValidType) return a
|
|
180
|
-
aValidType = isArray$1(a
|
|
181
|
-
bValidType = isArray$1(b
|
|
182
|
-
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareArrays(a
|
|
183
|
-
aValidType = isObject(a
|
|
184
|
-
bValidType = isObject(b
|
|
172
|
+
function looseEqual(a, b) {
|
|
173
|
+
if (a === b) return true;
|
|
174
|
+
let aValidType = isDate(a);
|
|
175
|
+
let bValidType = isDate(b);
|
|
176
|
+
if (aValidType || bValidType) return aValidType && bValidType ? a.getTime() === b.getTime() : false;
|
|
177
|
+
aValidType = isSymbol(a);
|
|
178
|
+
bValidType = isSymbol(b);
|
|
179
|
+
if (aValidType || bValidType) return a === b;
|
|
180
|
+
aValidType = isArray$1(a);
|
|
181
|
+
bValidType = isArray$1(b);
|
|
182
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareArrays(a, b) : false;
|
|
183
|
+
aValidType = isObject(a);
|
|
184
|
+
bValidType = isObject(b);
|
|
185
185
|
if (aValidType || bValidType) {
|
|
186
186
|
if (!aValidType || !bValidType) return false;
|
|
187
|
-
if (Object.keys(a
|
|
188
|
-
for (const key in a
|
|
189
|
-
const aHasKey = a
|
|
190
|
-
const bHasKey = b
|
|
191
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a
|
|
187
|
+
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
188
|
+
for (const key in a) {
|
|
189
|
+
const aHasKey = a.hasOwnProperty(key);
|
|
190
|
+
const bHasKey = b.hasOwnProperty(key);
|
|
191
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
return String(a
|
|
194
|
+
return String(a) === String(b);
|
|
195
195
|
}
|
|
196
196
|
function looseIndexOf(arr, val) {
|
|
197
197
|
return arr.findIndex((item) => looseEqual(item, val));
|
|
@@ -204,21 +204,21 @@ var toDisplayString = (val) => {
|
|
|
204
204
|
};
|
|
205
205
|
var replacer = (_key, val) => {
|
|
206
206
|
if (isRef$1(val)) return replacer(_key, val.value);
|
|
207
|
-
else if (isMap(val)) return { [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2], i
|
|
208
|
-
entries[stringifySymbol(key, i
|
|
207
|
+
else if (isMap(val)) return { [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2], i) => {
|
|
208
|
+
entries[stringifySymbol(key, i) + " =>"] = val2;
|
|
209
209
|
return entries;
|
|
210
210
|
}, {}) };
|
|
211
|
-
else if (isSet(val)) return { [`Set(${val.size})`]: [...val.values()].map((v
|
|
211
|
+
else if (isSet(val)) return { [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) };
|
|
212
212
|
else if (isSymbol(val)) return stringifySymbol(val);
|
|
213
213
|
else if (isObject(val) && !isArray$1(val) && !isPlainObject(val)) return String(val);
|
|
214
214
|
return val;
|
|
215
215
|
};
|
|
216
|
-
var stringifySymbol = (v
|
|
216
|
+
var stringifySymbol = (v, i = "") => {
|
|
217
217
|
var _a;
|
|
218
|
-
return isSymbol(v
|
|
218
|
+
return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
|
|
219
219
|
};
|
|
220
220
|
/**
|
|
221
|
-
* @vue/reactivity v3.5.
|
|
221
|
+
* @vue/reactivity v3.5.28
|
|
222
222
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
223
223
|
* @license MIT
|
|
224
224
|
**/
|
|
@@ -231,6 +231,7 @@ var EffectScope = class {
|
|
|
231
231
|
this.effects = [];
|
|
232
232
|
this.cleanups = [];
|
|
233
233
|
this._isPaused = false;
|
|
234
|
+
this.__v_skip = true;
|
|
234
235
|
this.parent = activeEffectScope;
|
|
235
236
|
if (!detached && activeEffectScope) this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
|
|
236
237
|
}
|
|
@@ -240,18 +241,18 @@ var EffectScope = class {
|
|
|
240
241
|
pause() {
|
|
241
242
|
if (this._active) {
|
|
242
243
|
this._isPaused = true;
|
|
243
|
-
let i
|
|
244
|
-
if (this.scopes) for (i
|
|
245
|
-
for (i
|
|
244
|
+
let i, l;
|
|
245
|
+
if (this.scopes) for (i = 0, l = this.scopes.length; i < l; i++) this.scopes[i].pause();
|
|
246
|
+
for (i = 0, l = this.effects.length; i < l; i++) this.effects[i].pause();
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
249
|
resume() {
|
|
249
250
|
if (this._active) {
|
|
250
251
|
if (this._isPaused) {
|
|
251
252
|
this._isPaused = false;
|
|
252
|
-
let i
|
|
253
|
-
if (this.scopes) for (i
|
|
254
|
-
for (i
|
|
253
|
+
let i, l;
|
|
254
|
+
if (this.scopes) for (i = 0, l = this.scopes.length; i < l; i++) this.scopes[i].resume();
|
|
255
|
+
for (i = 0, l = this.effects.length; i < l; i++) this.effects[i].resume();
|
|
255
256
|
}
|
|
256
257
|
}
|
|
257
258
|
}
|
|
@@ -281,13 +282,13 @@ var EffectScope = class {
|
|
|
281
282
|
stop(fromParent) {
|
|
282
283
|
if (this._active) {
|
|
283
284
|
this._active = false;
|
|
284
|
-
let i
|
|
285
|
-
for (i
|
|
285
|
+
let i, l;
|
|
286
|
+
for (i = 0, l = this.effects.length; i < l; i++) this.effects[i].stop();
|
|
286
287
|
this.effects.length = 0;
|
|
287
|
-
for (i
|
|
288
|
+
for (i = 0, l = this.cleanups.length; i < l; i++) this.cleanups[i]();
|
|
288
289
|
this.cleanups.length = 0;
|
|
289
290
|
if (this.scopes) {
|
|
290
|
-
for (i
|
|
291
|
+
for (i = 0, l = this.scopes.length; i < l; i++) this.scopes[i].stop(true);
|
|
291
292
|
this.scopes.length = 0;
|
|
292
293
|
}
|
|
293
294
|
if (!this.detached && this.parent && !fromParent) {
|
|
@@ -454,24 +455,24 @@ function isDirty(sub) {
|
|
|
454
455
|
if (sub._dirty) return true;
|
|
455
456
|
return false;
|
|
456
457
|
}
|
|
457
|
-
function refreshComputed(computed
|
|
458
|
-
if (computed
|
|
459
|
-
computed
|
|
460
|
-
if (computed
|
|
461
|
-
computed
|
|
462
|
-
if (!computed
|
|
463
|
-
computed
|
|
464
|
-
const dep = computed
|
|
458
|
+
function refreshComputed(computed) {
|
|
459
|
+
if (computed.flags & 4 && !(computed.flags & 16)) return;
|
|
460
|
+
computed.flags &= -17;
|
|
461
|
+
if (computed.globalVersion === globalVersion) return;
|
|
462
|
+
computed.globalVersion = globalVersion;
|
|
463
|
+
if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) return;
|
|
464
|
+
computed.flags |= 2;
|
|
465
|
+
const dep = computed.dep;
|
|
465
466
|
const prevSub = activeSub;
|
|
466
467
|
const prevShouldTrack = shouldTrack;
|
|
467
|
-
activeSub = computed
|
|
468
|
+
activeSub = computed;
|
|
468
469
|
shouldTrack = true;
|
|
469
470
|
try {
|
|
470
|
-
prepareDeps(computed
|
|
471
|
-
const value = computed
|
|
472
|
-
if (dep.version === 0 || hasChanged(value, computed
|
|
473
|
-
computed
|
|
474
|
-
computed
|
|
471
|
+
prepareDeps(computed);
|
|
472
|
+
const value = computed.fn(computed._value);
|
|
473
|
+
if (dep.version === 0 || hasChanged(value, computed._value)) {
|
|
474
|
+
computed.flags |= 128;
|
|
475
|
+
computed._value = value;
|
|
475
476
|
dep.version++;
|
|
476
477
|
}
|
|
477
478
|
} catch (err) {
|
|
@@ -480,8 +481,8 @@ function refreshComputed(computed$2) {
|
|
|
480
481
|
} finally {
|
|
481
482
|
activeSub = prevSub;
|
|
482
483
|
shouldTrack = prevShouldTrack;
|
|
483
|
-
cleanupDeps(computed
|
|
484
|
-
computed
|
|
484
|
+
cleanupDeps(computed);
|
|
485
|
+
computed.flags &= -3;
|
|
485
486
|
}
|
|
486
487
|
}
|
|
487
488
|
function removeSub(link, soft = false) {
|
|
@@ -498,7 +499,7 @@ function removeSub(link, soft = false) {
|
|
|
498
499
|
dep.subs = prevSub;
|
|
499
500
|
if (!prevSub && dep.computed) {
|
|
500
501
|
dep.computed.flags &= -5;
|
|
501
|
-
for (let l
|
|
502
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) removeSub(l, true);
|
|
502
503
|
}
|
|
503
504
|
}
|
|
504
505
|
if (!soft && !--dep.sc && dep.map) dep.map.delete(dep.key);
|
|
@@ -547,8 +548,8 @@ var Link = class {
|
|
|
547
548
|
}
|
|
548
549
|
};
|
|
549
550
|
var Dep = class {
|
|
550
|
-
constructor(computed
|
|
551
|
-
this.computed = computed
|
|
551
|
+
constructor(computed) {
|
|
552
|
+
this.computed = computed;
|
|
552
553
|
this.version = 0;
|
|
553
554
|
this.activeLink = void 0;
|
|
554
555
|
this.subs = void 0;
|
|
@@ -601,10 +602,10 @@ var Dep = class {
|
|
|
601
602
|
function addSub(link) {
|
|
602
603
|
link.dep.sc++;
|
|
603
604
|
if (link.sub.flags & 4) {
|
|
604
|
-
const computed
|
|
605
|
-
if (computed
|
|
606
|
-
computed
|
|
607
|
-
for (let l
|
|
605
|
+
const computed = link.dep.computed;
|
|
606
|
+
if (computed && !link.dep.subs) {
|
|
607
|
+
computed.flags |= 20;
|
|
608
|
+
for (let l = computed.deps; l; l = l.nextDep) addSub(l);
|
|
608
609
|
}
|
|
609
610
|
const currentTail = link.dep.subs;
|
|
610
611
|
if (currentTail !== link) {
|
|
@@ -679,17 +680,17 @@ function getDepFromReactive(object, key) {
|
|
|
679
680
|
return depMap && depMap.get(key);
|
|
680
681
|
}
|
|
681
682
|
function reactiveReadArray(array) {
|
|
682
|
-
const raw = toRaw(array);
|
|
683
|
+
const raw = /* @__PURE__ */ toRaw(array);
|
|
683
684
|
if (raw === array) return raw;
|
|
684
685
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
685
|
-
return isShallow(array) ? raw : raw.map(toReactive);
|
|
686
|
+
return /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);
|
|
686
687
|
}
|
|
687
688
|
function shallowReadArray(arr) {
|
|
688
|
-
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
689
|
+
track(arr = /* @__PURE__ */ toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
689
690
|
return arr;
|
|
690
691
|
}
|
|
691
692
|
function toWrapped(target, item) {
|
|
692
|
-
if (isReadonly(target)) return isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
|
|
693
|
+
if (/* @__PURE__ */ isReadonly(target)) return /* @__PURE__ */ isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
|
|
693
694
|
return toReactive(item);
|
|
694
695
|
}
|
|
695
696
|
var arrayInstrumentations = {
|
|
@@ -698,7 +699,7 @@ var arrayInstrumentations = {
|
|
|
698
699
|
return iterator(this, Symbol.iterator, (item) => toWrapped(this, item));
|
|
699
700
|
},
|
|
700
701
|
concat(...args) {
|
|
701
|
-
return reactiveReadArray(this).concat(...args.map((x
|
|
702
|
+
return reactiveReadArray(this).concat(...args.map((x) => isArray$1(x) ? reactiveReadArray(x) : x));
|
|
702
703
|
},
|
|
703
704
|
entries() {
|
|
704
705
|
return iterator(this, "entries", (value) => {
|
|
@@ -710,7 +711,7 @@ var arrayInstrumentations = {
|
|
|
710
711
|
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
711
712
|
},
|
|
712
713
|
filter(fn, thisArg) {
|
|
713
|
-
return apply(this, "filter", fn, thisArg, (v
|
|
714
|
+
return apply(this, "filter", fn, thisArg, (v) => v.map((item) => toWrapped(this, item)), arguments);
|
|
714
715
|
},
|
|
715
716
|
find(fn, thisArg) {
|
|
716
717
|
return apply(this, "find", fn, thisArg, (item) => toWrapped(this, item), arguments);
|
|
@@ -779,10 +780,10 @@ var arrayInstrumentations = {
|
|
|
779
780
|
return iterator(this, "values", (item) => toWrapped(this, item));
|
|
780
781
|
}
|
|
781
782
|
};
|
|
782
|
-
function iterator(self
|
|
783
|
-
const arr = shallowReadArray(self
|
|
783
|
+
function iterator(self, method, wrapValue) {
|
|
784
|
+
const arr = shallowReadArray(self);
|
|
784
785
|
const iter = arr[method]();
|
|
785
|
-
if (arr !== self
|
|
786
|
+
if (arr !== self && !/* @__PURE__ */ isShallow(self)) {
|
|
786
787
|
iter._next = iter.next;
|
|
787
788
|
iter.next = () => {
|
|
788
789
|
const result = iter._next();
|
|
@@ -793,53 +794,53 @@ function iterator(self$1, method, wrapValue) {
|
|
|
793
794
|
return iter;
|
|
794
795
|
}
|
|
795
796
|
var arrayProto = Array.prototype;
|
|
796
|
-
function apply(self
|
|
797
|
-
const arr = shallowReadArray(self
|
|
798
|
-
const needsWrap = arr !== self
|
|
797
|
+
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
798
|
+
const arr = shallowReadArray(self);
|
|
799
|
+
const needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);
|
|
799
800
|
const methodFn = arr[method];
|
|
800
801
|
if (methodFn !== arrayProto[method]) {
|
|
801
|
-
const result2 = methodFn.apply(self
|
|
802
|
+
const result2 = methodFn.apply(self, args);
|
|
802
803
|
return needsWrap ? toReactive(result2) : result2;
|
|
803
804
|
}
|
|
804
805
|
let wrappedFn = fn;
|
|
805
|
-
if (arr !== self
|
|
806
|
+
if (arr !== self) {
|
|
806
807
|
if (needsWrap) wrappedFn = function(item, index) {
|
|
807
|
-
return fn.call(this, toWrapped(self
|
|
808
|
+
return fn.call(this, toWrapped(self, item), index, self);
|
|
808
809
|
};
|
|
809
810
|
else if (fn.length > 2) wrappedFn = function(item, index) {
|
|
810
|
-
return fn.call(this, item, index, self
|
|
811
|
+
return fn.call(this, item, index, self);
|
|
811
812
|
};
|
|
812
813
|
}
|
|
813
814
|
const result = methodFn.call(arr, wrappedFn, thisArg);
|
|
814
815
|
return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
|
|
815
816
|
}
|
|
816
|
-
function reduce(self
|
|
817
|
-
const arr = shallowReadArray(self
|
|
817
|
+
function reduce(self, method, fn, args) {
|
|
818
|
+
const arr = shallowReadArray(self);
|
|
818
819
|
let wrappedFn = fn;
|
|
819
|
-
if (arr !== self
|
|
820
|
-
if (
|
|
821
|
-
return fn.call(this, acc, toWrapped(self
|
|
820
|
+
if (arr !== self) {
|
|
821
|
+
if (!/* @__PURE__ */ isShallow(self)) wrappedFn = function(acc, item, index) {
|
|
822
|
+
return fn.call(this, acc, toWrapped(self, item), index, self);
|
|
822
823
|
};
|
|
823
824
|
else if (fn.length > 3) wrappedFn = function(acc, item, index) {
|
|
824
|
-
return fn.call(this, acc, item, index, self
|
|
825
|
+
return fn.call(this, acc, item, index, self);
|
|
825
826
|
};
|
|
826
827
|
}
|
|
827
828
|
return arr[method](wrappedFn, ...args);
|
|
828
829
|
}
|
|
829
|
-
function searchProxy(self
|
|
830
|
-
const arr = toRaw(self
|
|
830
|
+
function searchProxy(self, method, args) {
|
|
831
|
+
const arr = /* @__PURE__ */ toRaw(self);
|
|
831
832
|
track(arr, "iterate", ARRAY_ITERATE_KEY);
|
|
832
833
|
const res = arr[method](...args);
|
|
833
|
-
if ((res === -1 || res === false) && isProxy(args[0])) {
|
|
834
|
-
args[0] = toRaw(args[0]);
|
|
834
|
+
if ((res === -1 || res === false) && /* @__PURE__ */ isProxy(args[0])) {
|
|
835
|
+
args[0] = /* @__PURE__ */ toRaw(args[0]);
|
|
835
836
|
return arr[method](...args);
|
|
836
837
|
}
|
|
837
838
|
return res;
|
|
838
839
|
}
|
|
839
|
-
function noTracking(self
|
|
840
|
+
function noTracking(self, method, args = []) {
|
|
840
841
|
pauseTracking();
|
|
841
842
|
startBatch();
|
|
842
|
-
const res = toRaw(self
|
|
843
|
+
const res = (/* @__PURE__ */ toRaw(self))[method].apply(self, args);
|
|
843
844
|
endBatch();
|
|
844
845
|
resetTracking();
|
|
845
846
|
return res;
|
|
@@ -848,7 +849,7 @@ var isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
|
848
849
|
var builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
849
850
|
function hasOwnProperty(key) {
|
|
850
851
|
if (!isSymbol(key)) key = String(key);
|
|
851
|
-
const obj = toRaw(this);
|
|
852
|
+
const obj = /* @__PURE__ */ toRaw(this);
|
|
852
853
|
track(obj, "has", key);
|
|
853
854
|
return obj.hasOwnProperty(key);
|
|
854
855
|
}
|
|
@@ -873,15 +874,15 @@ var BaseReactiveHandler = class {
|
|
|
873
874
|
if (targetIsArray && (fn = arrayInstrumentations[key])) return fn;
|
|
874
875
|
if (key === "hasOwnProperty") return hasOwnProperty;
|
|
875
876
|
}
|
|
876
|
-
const res = Reflect.get(target, key, isRef(target) ? target : receiver);
|
|
877
|
+
const res = Reflect.get(target, key, /* @__PURE__ */ isRef(target) ? target : receiver);
|
|
877
878
|
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) return res;
|
|
878
879
|
if (!isReadonly2) track(target, "get", key);
|
|
879
880
|
if (isShallow2) return res;
|
|
880
|
-
if (isRef(res)) {
|
|
881
|
+
if (/* @__PURE__ */ isRef(res)) {
|
|
881
882
|
const value = targetIsArray && isIntegerKey(key) ? res : res.value;
|
|
882
|
-
return isReadonly2 && isObject(value) ? readonly(value) : value;
|
|
883
|
+
return isReadonly2 && isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
883
884
|
}
|
|
884
|
-
if (isObject(res)) return isReadonly2 ? readonly(res) : reactive(res);
|
|
885
|
+
if (isObject(res)) return isReadonly2 ? /* @__PURE__ */ readonly(res) : /* @__PURE__ */ reactive(res);
|
|
885
886
|
return res;
|
|
886
887
|
}
|
|
887
888
|
};
|
|
@@ -893,20 +894,20 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
|
|
|
893
894
|
let oldValue = target[key];
|
|
894
895
|
const isArrayWithIntegerKey = isArray$1(target) && isIntegerKey(key);
|
|
895
896
|
if (!this._isShallow) {
|
|
896
|
-
const isOldValueReadonly = isReadonly(oldValue);
|
|
897
|
-
if (
|
|
898
|
-
oldValue = toRaw(oldValue);
|
|
899
|
-
value = toRaw(value);
|
|
897
|
+
const isOldValueReadonly = /* @__PURE__ */ isReadonly(oldValue);
|
|
898
|
+
if (!/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
|
|
899
|
+
oldValue = /* @__PURE__ */ toRaw(oldValue);
|
|
900
|
+
value = /* @__PURE__ */ toRaw(value);
|
|
900
901
|
}
|
|
901
|
-
if (!isArrayWithIntegerKey && isRef(oldValue) &&
|
|
902
|
+
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) if (isOldValueReadonly) return true;
|
|
902
903
|
else {
|
|
903
904
|
oldValue.value = value;
|
|
904
905
|
return true;
|
|
905
906
|
}
|
|
906
907
|
}
|
|
907
908
|
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
908
|
-
const result = Reflect.set(target, key, value, isRef(target) ? target : receiver);
|
|
909
|
-
if (target === toRaw(receiver)) {
|
|
909
|
+
const result = Reflect.set(target, key, value, /* @__PURE__ */ isRef(target) ? target : receiver);
|
|
910
|
+
if (target === /* @__PURE__ */ toRaw(receiver)) {
|
|
910
911
|
if (!hadKey) trigger(target, "add", key, value);
|
|
911
912
|
else if (hasChanged(value, oldValue)) trigger(target, "set", key, value, oldValue);
|
|
912
913
|
}
|
|
@@ -945,32 +946,27 @@ var readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
|
945
946
|
var shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
|
|
946
947
|
var shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
947
948
|
var toShallow = (value) => value;
|
|
948
|
-
var getProto = (v
|
|
949
|
+
var getProto = (v) => Reflect.getPrototypeOf(v);
|
|
949
950
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
950
951
|
return function(...args) {
|
|
951
952
|
const target = this["__v_raw"];
|
|
952
|
-
const rawTarget = toRaw(target);
|
|
953
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
953
954
|
const targetIsMap = isMap(rawTarget);
|
|
954
955
|
const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
|
|
955
956
|
const isKeyOnly = method === "keys" && targetIsMap;
|
|
956
957
|
const innerIterator = target[method](...args);
|
|
957
958
|
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
958
959
|
!isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
|
|
959
|
-
return {
|
|
960
|
-
next()
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
},
|
|
970
|
-
[Symbol.iterator]() {
|
|
971
|
-
return this;
|
|
972
|
-
}
|
|
973
|
-
};
|
|
960
|
+
return extend(Object.create(innerIterator), { next() {
|
|
961
|
+
const { value, done } = innerIterator.next();
|
|
962
|
+
return done ? {
|
|
963
|
+
value,
|
|
964
|
+
done
|
|
965
|
+
} : {
|
|
966
|
+
value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
|
|
967
|
+
done
|
|
968
|
+
};
|
|
969
|
+
} });
|
|
974
970
|
};
|
|
975
971
|
}
|
|
976
972
|
function createReadonlyMethod(type) {
|
|
@@ -978,32 +974,32 @@ function createReadonlyMethod(type) {
|
|
|
978
974
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
979
975
|
};
|
|
980
976
|
}
|
|
981
|
-
function createInstrumentations(readonly
|
|
977
|
+
function createInstrumentations(readonly, shallow) {
|
|
982
978
|
const instrumentations = {
|
|
983
979
|
get(key) {
|
|
984
980
|
const target = this["__v_raw"];
|
|
985
|
-
const rawTarget = toRaw(target);
|
|
986
|
-
const rawKey = toRaw(key);
|
|
987
|
-
if (!readonly
|
|
981
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
982
|
+
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
983
|
+
if (!readonly) {
|
|
988
984
|
if (hasChanged(key, rawKey)) track(rawTarget, "get", key);
|
|
989
985
|
track(rawTarget, "get", rawKey);
|
|
990
986
|
}
|
|
991
987
|
const { has } = getProto(rawTarget);
|
|
992
|
-
const wrap = shallow ? toShallow : readonly
|
|
988
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
993
989
|
if (has.call(rawTarget, key)) return wrap(target.get(key));
|
|
994
990
|
else if (has.call(rawTarget, rawKey)) return wrap(target.get(rawKey));
|
|
995
991
|
else if (target !== rawTarget) target.get(key);
|
|
996
992
|
},
|
|
997
993
|
get size() {
|
|
998
994
|
const target = this["__v_raw"];
|
|
999
|
-
!readonly
|
|
995
|
+
!readonly && track(/* @__PURE__ */ toRaw(target), "iterate", ITERATE_KEY);
|
|
1000
996
|
return target.size;
|
|
1001
997
|
},
|
|
1002
998
|
has(key) {
|
|
1003
999
|
const target = this["__v_raw"];
|
|
1004
|
-
const rawTarget = toRaw(target);
|
|
1005
|
-
const rawKey = toRaw(key);
|
|
1006
|
-
if (!readonly
|
|
1000
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1001
|
+
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1002
|
+
if (!readonly) {
|
|
1007
1003
|
if (hasChanged(key, rawKey)) track(rawTarget, "has", key);
|
|
1008
1004
|
track(rawTarget, "has", rawKey);
|
|
1009
1005
|
}
|
|
@@ -1012,23 +1008,23 @@ function createInstrumentations(readonly$1, shallow) {
|
|
|
1012
1008
|
forEach(callback, thisArg) {
|
|
1013
1009
|
const observed = this;
|
|
1014
1010
|
const target = observed["__v_raw"];
|
|
1015
|
-
const rawTarget = toRaw(target);
|
|
1016
|
-
const wrap = shallow ? toShallow : readonly
|
|
1017
|
-
!readonly
|
|
1011
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1012
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1013
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1018
1014
|
return target.forEach((value, key) => {
|
|
1019
1015
|
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1020
1016
|
});
|
|
1021
1017
|
}
|
|
1022
1018
|
};
|
|
1023
|
-
extend(instrumentations, readonly
|
|
1019
|
+
extend(instrumentations, readonly ? {
|
|
1024
1020
|
add: createReadonlyMethod("add"),
|
|
1025
1021
|
set: createReadonlyMethod("set"),
|
|
1026
1022
|
delete: createReadonlyMethod("delete"),
|
|
1027
1023
|
clear: createReadonlyMethod("clear")
|
|
1028
1024
|
} : {
|
|
1029
1025
|
add(value) {
|
|
1030
|
-
if (!shallow &&
|
|
1031
|
-
const target = toRaw(this);
|
|
1026
|
+
if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);
|
|
1027
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1032
1028
|
if (!getProto(target).has.call(target, value)) {
|
|
1033
1029
|
target.add(value);
|
|
1034
1030
|
trigger(target, "add", value, value);
|
|
@@ -1036,12 +1032,12 @@ function createInstrumentations(readonly$1, shallow) {
|
|
|
1036
1032
|
return this;
|
|
1037
1033
|
},
|
|
1038
1034
|
set(key, value) {
|
|
1039
|
-
if (!shallow &&
|
|
1040
|
-
const target = toRaw(this);
|
|
1035
|
+
if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);
|
|
1036
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1041
1037
|
const { has, get } = getProto(target);
|
|
1042
1038
|
let hadKey = has.call(target, key);
|
|
1043
1039
|
if (!hadKey) {
|
|
1044
|
-
key = toRaw(key);
|
|
1040
|
+
key = /* @__PURE__ */ toRaw(key);
|
|
1045
1041
|
hadKey = has.call(target, key);
|
|
1046
1042
|
}
|
|
1047
1043
|
const oldValue = get.call(target, key);
|
|
@@ -1051,11 +1047,11 @@ function createInstrumentations(readonly$1, shallow) {
|
|
|
1051
1047
|
return this;
|
|
1052
1048
|
},
|
|
1053
1049
|
delete(key) {
|
|
1054
|
-
const target = toRaw(this);
|
|
1050
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1055
1051
|
const { has, get } = getProto(target);
|
|
1056
1052
|
let hadKey = has.call(target, key);
|
|
1057
1053
|
if (!hadKey) {
|
|
1058
|
-
key = toRaw(key);
|
|
1054
|
+
key = /* @__PURE__ */ toRaw(key);
|
|
1059
1055
|
hadKey = has.call(target, key);
|
|
1060
1056
|
}
|
|
1061
1057
|
const oldValue = get ? get.call(target, key) : void 0;
|
|
@@ -1064,7 +1060,7 @@ function createInstrumentations(readonly$1, shallow) {
|
|
|
1064
1060
|
return result;
|
|
1065
1061
|
},
|
|
1066
1062
|
clear() {
|
|
1067
|
-
const target = toRaw(this);
|
|
1063
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1068
1064
|
const hadItems = target.size !== 0;
|
|
1069
1065
|
const oldTarget = void 0;
|
|
1070
1066
|
const result = target.clear();
|
|
@@ -1078,7 +1074,7 @@ function createInstrumentations(readonly$1, shallow) {
|
|
|
1078
1074
|
"entries",
|
|
1079
1075
|
Symbol.iterator
|
|
1080
1076
|
].forEach((method) => {
|
|
1081
|
-
instrumentations[method] = createIterableMethod(method, readonly
|
|
1077
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1082
1078
|
});
|
|
1083
1079
|
return instrumentations;
|
|
1084
1080
|
}
|
|
@@ -1113,16 +1109,20 @@ function targetTypeMap(rawType) {
|
|
|
1113
1109
|
function getTargetType(value) {
|
|
1114
1110
|
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
1115
1111
|
}
|
|
1112
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1116
1113
|
function reactive(target) {
|
|
1117
|
-
if (isReadonly(target)) return target;
|
|
1114
|
+
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
1118
1115
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
1119
1116
|
}
|
|
1117
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1120
1118
|
function shallowReactive(target) {
|
|
1121
1119
|
return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
|
|
1122
1120
|
}
|
|
1121
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1123
1122
|
function readonly(target) {
|
|
1124
1123
|
return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
|
|
1125
1124
|
}
|
|
1125
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1126
1126
|
function shallowReadonly(target) {
|
|
1127
1127
|
return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
|
|
1128
1128
|
}
|
|
@@ -1137,40 +1137,48 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
|
|
|
1137
1137
|
proxyMap.set(target, proxy);
|
|
1138
1138
|
return proxy;
|
|
1139
1139
|
}
|
|
1140
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1140
1141
|
function isReactive(value) {
|
|
1141
|
-
if (isReadonly(value)) return isReactive(value["__v_raw"]);
|
|
1142
|
+
if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1142
1143
|
return !!(value && value["__v_isReactive"]);
|
|
1143
1144
|
}
|
|
1145
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1144
1146
|
function isReadonly(value) {
|
|
1145
1147
|
return !!(value && value["__v_isReadonly"]);
|
|
1146
1148
|
}
|
|
1149
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1147
1150
|
function isShallow(value) {
|
|
1148
1151
|
return !!(value && value["__v_isShallow"]);
|
|
1149
1152
|
}
|
|
1153
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1150
1154
|
function isProxy(value) {
|
|
1151
1155
|
return value ? !!value["__v_raw"] : false;
|
|
1152
1156
|
}
|
|
1157
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1153
1158
|
function toRaw(observed) {
|
|
1154
1159
|
const raw = observed && observed["__v_raw"];
|
|
1155
|
-
return raw ? toRaw(raw) : observed;
|
|
1160
|
+
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
1156
1161
|
}
|
|
1157
1162
|
function markRaw(value) {
|
|
1158
1163
|
if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) def(value, "__v_skip", true);
|
|
1159
1164
|
return value;
|
|
1160
1165
|
}
|
|
1161
|
-
var toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
1162
|
-
var toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1163
|
-
|
|
1164
|
-
|
|
1166
|
+
var toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
|
|
1167
|
+
var toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1168
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1169
|
+
function isRef(r) {
|
|
1170
|
+
return r ? r["__v_isRef"] === true : false;
|
|
1165
1171
|
}
|
|
1172
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1166
1173
|
function ref(value) {
|
|
1167
1174
|
return createRef(value, false);
|
|
1168
1175
|
}
|
|
1176
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1169
1177
|
function shallowRef(value) {
|
|
1170
1178
|
return createRef(value, true);
|
|
1171
1179
|
}
|
|
1172
1180
|
function createRef(rawValue, shallow) {
|
|
1173
|
-
if (isRef(rawValue)) return rawValue;
|
|
1181
|
+
if (/* @__PURE__ */ isRef(rawValue)) return rawValue;
|
|
1174
1182
|
return new RefImpl(rawValue, shallow);
|
|
1175
1183
|
}
|
|
1176
1184
|
var RefImpl = class {
|
|
@@ -1178,7 +1186,7 @@ var RefImpl = class {
|
|
|
1178
1186
|
this.dep = new Dep();
|
|
1179
1187
|
this["__v_isRef"] = true;
|
|
1180
1188
|
this["__v_isShallow"] = false;
|
|
1181
|
-
this._rawValue = isShallow2 ? value : toRaw(value);
|
|
1189
|
+
this._rawValue = isShallow2 ? value : /* @__PURE__ */ toRaw(value);
|
|
1182
1190
|
this._value = isShallow2 ? value : toReactive(value);
|
|
1183
1191
|
this["__v_isShallow"] = isShallow2;
|
|
1184
1192
|
}
|
|
@@ -1188,8 +1196,8 @@ var RefImpl = class {
|
|
|
1188
1196
|
}
|
|
1189
1197
|
set value(newValue) {
|
|
1190
1198
|
const oldValue = this._rawValue;
|
|
1191
|
-
const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue);
|
|
1192
|
-
newValue = useDirectValue ? newValue : toRaw(newValue);
|
|
1199
|
+
const useDirectValue = this["__v_isShallow"] || /* @__PURE__ */ isShallow(newValue) || /* @__PURE__ */ isReadonly(newValue);
|
|
1200
|
+
newValue = useDirectValue ? newValue : /* @__PURE__ */ toRaw(newValue);
|
|
1193
1201
|
if (hasChanged(newValue, oldValue)) {
|
|
1194
1202
|
this._rawValue = newValue;
|
|
1195
1203
|
this._value = useDirectValue ? newValue : toReactive(newValue);
|
|
@@ -1198,7 +1206,7 @@ var RefImpl = class {
|
|
|
1198
1206
|
}
|
|
1199
1207
|
};
|
|
1200
1208
|
function unref(ref2) {
|
|
1201
|
-
return isRef(ref2) ? ref2.value : ref2;
|
|
1209
|
+
return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
|
|
1202
1210
|
}
|
|
1203
1211
|
function toValue(source) {
|
|
1204
1212
|
return isFunction(source) ? source() : unref(source);
|
|
@@ -1207,14 +1215,14 @@ var shallowUnwrapHandlers = {
|
|
|
1207
1215
|
get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
|
|
1208
1216
|
set: (target, key, value, receiver) => {
|
|
1209
1217
|
const oldValue = target[key];
|
|
1210
|
-
if (isRef(oldValue) &&
|
|
1218
|
+
if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
|
|
1211
1219
|
oldValue.value = value;
|
|
1212
1220
|
return true;
|
|
1213
1221
|
} else return Reflect.set(target, key, value, receiver);
|
|
1214
1222
|
}
|
|
1215
1223
|
};
|
|
1216
1224
|
function proxyRefs(objectWithRefs) {
|
|
1217
|
-
return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
|
|
1225
|
+
return /* @__PURE__ */ isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
|
|
1218
1226
|
}
|
|
1219
1227
|
var CustomRefImpl = class {
|
|
1220
1228
|
constructor(factory) {
|
|
@@ -1242,11 +1250,11 @@ var ObjectRefImpl = class {
|
|
|
1242
1250
|
this._defaultValue = _defaultValue;
|
|
1243
1251
|
this["__v_isRef"] = true;
|
|
1244
1252
|
this._value = void 0;
|
|
1245
|
-
this._raw = toRaw(_object);
|
|
1253
|
+
this._raw = /* @__PURE__ */ toRaw(_object);
|
|
1246
1254
|
let shallow = true;
|
|
1247
1255
|
let obj = _object;
|
|
1248
1256
|
if (!isArray$1(_object) || !isIntegerKey(String(_key))) do
|
|
1249
|
-
shallow =
|
|
1257
|
+
shallow = !/* @__PURE__ */ isProxy(obj) || /* @__PURE__ */ isShallow(obj);
|
|
1250
1258
|
while (shallow && (obj = obj["__v_raw"]));
|
|
1251
1259
|
this._shallow = shallow;
|
|
1252
1260
|
}
|
|
@@ -1256,9 +1264,9 @@ var ObjectRefImpl = class {
|
|
|
1256
1264
|
return this._value = val === void 0 ? this._defaultValue : val;
|
|
1257
1265
|
}
|
|
1258
1266
|
set value(newVal) {
|
|
1259
|
-
if (this._shallow && isRef(this._raw[this._key])) {
|
|
1267
|
+
if (this._shallow && /* @__PURE__ */ isRef(this._raw[this._key])) {
|
|
1260
1268
|
const nestedRef = this._object[this._key];
|
|
1261
|
-
if (isRef(nestedRef)) {
|
|
1269
|
+
if (/* @__PURE__ */ isRef(nestedRef)) {
|
|
1262
1270
|
nestedRef.value = newVal;
|
|
1263
1271
|
return;
|
|
1264
1272
|
}
|
|
@@ -1280,11 +1288,12 @@ var GetterRefImpl = class {
|
|
|
1280
1288
|
return this._value = this._getter();
|
|
1281
1289
|
}
|
|
1282
1290
|
};
|
|
1291
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1283
1292
|
function toRef(source, key, defaultValue) {
|
|
1284
|
-
if (isRef(source)) return source;
|
|
1293
|
+
if (/* @__PURE__ */ isRef(source)) return source;
|
|
1285
1294
|
else if (isFunction(source)) return new GetterRefImpl(source);
|
|
1286
1295
|
else if (isObject(source) && arguments.length > 1) return propertyToRef(source, key, defaultValue);
|
|
1287
|
-
else return ref(source);
|
|
1296
|
+
else return /* @__PURE__ */ ref(source);
|
|
1288
1297
|
}
|
|
1289
1298
|
function propertyToRef(source, key, defaultValue) {
|
|
1290
1299
|
return new ObjectRefImpl(source, key, defaultValue);
|
|
@@ -1322,6 +1331,7 @@ var ComputedRefImpl = class {
|
|
|
1322
1331
|
if (this.setter) this.setter(newValue);
|
|
1323
1332
|
}
|
|
1324
1333
|
};
|
|
1334
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1325
1335
|
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
1326
1336
|
let getter;
|
|
1327
1337
|
let setter;
|
|
@@ -1346,7 +1356,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
1346
1356
|
const { immediate, deep, once, scheduler, augmentJob, call } = options;
|
|
1347
1357
|
const reactiveGetter = (source2) => {
|
|
1348
1358
|
if (deep) return source2;
|
|
1349
|
-
if (isShallow(source2) || deep === false || deep === 0) return traverse(source2, 1);
|
|
1359
|
+
if (/* @__PURE__ */ isShallow(source2) || deep === false || deep === 0) return traverse(source2, 1);
|
|
1350
1360
|
return traverse(source2);
|
|
1351
1361
|
};
|
|
1352
1362
|
let effect;
|
|
@@ -1355,19 +1365,19 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
1355
1365
|
let boundCleanup;
|
|
1356
1366
|
let forceTrigger = false;
|
|
1357
1367
|
let isMultiSource = false;
|
|
1358
|
-
if (isRef(source)) {
|
|
1368
|
+
if (/* @__PURE__ */ isRef(source)) {
|
|
1359
1369
|
getter = () => source.value;
|
|
1360
|
-
forceTrigger = isShallow(source);
|
|
1361
|
-
} else if (isReactive(source)) {
|
|
1370
|
+
forceTrigger = /* @__PURE__ */ isShallow(source);
|
|
1371
|
+
} else if (/* @__PURE__ */ isReactive(source)) {
|
|
1362
1372
|
getter = () => reactiveGetter(source);
|
|
1363
1373
|
forceTrigger = true;
|
|
1364
1374
|
} else if (isArray$1(source)) {
|
|
1365
1375
|
isMultiSource = true;
|
|
1366
|
-
forceTrigger = source.some((s
|
|
1367
|
-
getter = () => source.map((s
|
|
1368
|
-
if (isRef(s
|
|
1369
|
-
else if (isReactive(s
|
|
1370
|
-
else if (isFunction(s
|
|
1376
|
+
forceTrigger = source.some((s) => /* @__PURE__ */ isReactive(s) || /* @__PURE__ */ isShallow(s));
|
|
1377
|
+
getter = () => source.map((s) => {
|
|
1378
|
+
if (/* @__PURE__ */ isRef(s)) return s.value;
|
|
1379
|
+
else if (/* @__PURE__ */ isReactive(s)) return reactiveGetter(s);
|
|
1380
|
+
else if (isFunction(s)) return call ? call(s, 2) : s();
|
|
1371
1381
|
});
|
|
1372
1382
|
} else if (isFunction(source)) if (cb) getter = call ? () => call(source, 2) : source;
|
|
1373
1383
|
else getter = () => {
|
|
@@ -1410,7 +1420,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
1410
1420
|
if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) return;
|
|
1411
1421
|
if (cb) {
|
|
1412
1422
|
const newValue = effect.run();
|
|
1413
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some((v
|
|
1423
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
1414
1424
|
if (cleanup) cleanup();
|
|
1415
1425
|
const currentWatcher = activeWatcher;
|
|
1416
1426
|
activeWatcher = effect;
|
|
@@ -1449,25 +1459,25 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
1449
1459
|
watchHandle.stop = watchHandle;
|
|
1450
1460
|
return watchHandle;
|
|
1451
1461
|
}
|
|
1452
|
-
function traverse(value, depth = Infinity, seen
|
|
1462
|
+
function traverse(value, depth = Infinity, seen) {
|
|
1453
1463
|
if (depth <= 0 || !isObject(value) || value["__v_skip"]) return value;
|
|
1454
|
-
seen
|
|
1455
|
-
if ((seen
|
|
1456
|
-
seen
|
|
1464
|
+
seen = seen || /* @__PURE__ */ new Map();
|
|
1465
|
+
if ((seen.get(value) || 0) >= depth) return value;
|
|
1466
|
+
seen.set(value, depth);
|
|
1457
1467
|
depth--;
|
|
1458
|
-
if (isRef(value)) traverse(value.value, depth, seen
|
|
1459
|
-
else if (isArray$1(value)) for (let i
|
|
1460
|
-
else if (isSet(value) || isMap(value)) value.forEach((v
|
|
1461
|
-
traverse(v
|
|
1468
|
+
if (/* @__PURE__ */ isRef(value)) traverse(value.value, depth, seen);
|
|
1469
|
+
else if (isArray$1(value)) for (let i = 0; i < value.length; i++) traverse(value[i], depth, seen);
|
|
1470
|
+
else if (isSet(value) || isMap(value)) value.forEach((v) => {
|
|
1471
|
+
traverse(v, depth, seen);
|
|
1462
1472
|
});
|
|
1463
1473
|
else if (isPlainObject(value)) {
|
|
1464
|
-
for (const key in value) traverse(value[key], depth, seen
|
|
1465
|
-
for (const key of Object.getOwnPropertySymbols(value)) if (Object.prototype.propertyIsEnumerable.call(value, key)) traverse(value[key], depth, seen
|
|
1474
|
+
for (const key in value) traverse(value[key], depth, seen);
|
|
1475
|
+
for (const key of Object.getOwnPropertySymbols(value)) if (Object.prototype.propertyIsEnumerable.call(value, key)) traverse(value[key], depth, seen);
|
|
1466
1476
|
}
|
|
1467
1477
|
return value;
|
|
1468
1478
|
}
|
|
1469
1479
|
/**
|
|
1470
|
-
* @vue/runtime-core v3.5.
|
|
1480
|
+
* @vue/runtime-core v3.5.28
|
|
1471
1481
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1472
1482
|
* @license MIT
|
|
1473
1483
|
**/
|
|
@@ -1488,7 +1498,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
1488
1498
|
}
|
|
1489
1499
|
if (isArray$1(fn)) {
|
|
1490
1500
|
const values = [];
|
|
1491
|
-
for (let i
|
|
1501
|
+
for (let i = 0; i < fn.length; i++) values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
1492
1502
|
return values;
|
|
1493
1503
|
}
|
|
1494
1504
|
}
|
|
@@ -1502,7 +1512,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
1502
1512
|
while (cur) {
|
|
1503
1513
|
const errorCapturedHooks = cur.ec;
|
|
1504
1514
|
if (errorCapturedHooks) {
|
|
1505
|
-
for (let i
|
|
1515
|
+
for (let i = 0; i < errorCapturedHooks.length; i++) if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) return;
|
|
1506
1516
|
}
|
|
1507
1517
|
cur = cur.parent;
|
|
1508
1518
|
}
|
|
@@ -1531,8 +1541,8 @@ var postFlushIndex = 0;
|
|
|
1531
1541
|
var resolvedPromise = /* @__PURE__ */ Promise.resolve();
|
|
1532
1542
|
var currentFlushPromise = null;
|
|
1533
1543
|
function nextTick(fn) {
|
|
1534
|
-
const p
|
|
1535
|
-
return fn ? p
|
|
1544
|
+
const p = currentFlushPromise || resolvedPromise;
|
|
1545
|
+
return fn ? p.then(this ? fn.bind(this) : fn) : p;
|
|
1536
1546
|
}
|
|
1537
1547
|
function findInsertionIndex$1(id) {
|
|
1538
1548
|
let start = flushIndex + 1;
|
|
@@ -1569,22 +1579,22 @@ function queuePostFlushCb(cb) {
|
|
|
1569
1579
|
} else pendingPostFlushCbs.push(...cb);
|
|
1570
1580
|
queueFlush();
|
|
1571
1581
|
}
|
|
1572
|
-
function flushPreFlushCbs(instance, seen
|
|
1573
|
-
for (; i
|
|
1574
|
-
const cb = queue[i
|
|
1582
|
+
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
1583
|
+
for (; i < queue.length; i++) {
|
|
1584
|
+
const cb = queue[i];
|
|
1575
1585
|
if (cb && cb.flags & 2) {
|
|
1576
1586
|
if (instance && cb.id !== instance.uid) continue;
|
|
1577
|
-
queue.splice(i
|
|
1578
|
-
i
|
|
1587
|
+
queue.splice(i, 1);
|
|
1588
|
+
i--;
|
|
1579
1589
|
if (cb.flags & 4) cb.flags &= -2;
|
|
1580
1590
|
cb();
|
|
1581
1591
|
if (!(cb.flags & 4)) cb.flags &= -2;
|
|
1582
1592
|
}
|
|
1583
1593
|
}
|
|
1584
1594
|
}
|
|
1585
|
-
function flushPostFlushCbs(seen
|
|
1595
|
+
function flushPostFlushCbs(seen) {
|
|
1586
1596
|
if (pendingPostFlushCbs.length) {
|
|
1587
|
-
const deduped = [...new Set(pendingPostFlushCbs)].sort((a
|
|
1597
|
+
const deduped = [...new Set(pendingPostFlushCbs)].sort((a, b) => getId(a) - getId(b));
|
|
1588
1598
|
pendingPostFlushCbs.length = 0;
|
|
1589
1599
|
if (activePostFlushCbs) {
|
|
1590
1600
|
activePostFlushCbs.push(...deduped);
|
|
@@ -1602,7 +1612,7 @@ function flushPostFlushCbs(seen$1) {
|
|
|
1602
1612
|
}
|
|
1603
1613
|
}
|
|
1604
1614
|
var getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
1605
|
-
function flushJobs(seen
|
|
1615
|
+
function flushJobs(seen) {
|
|
1606
1616
|
try {
|
|
1607
1617
|
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
1608
1618
|
const job = queue[flushIndex];
|
|
@@ -1619,9 +1629,9 @@ function flushJobs(seen$1) {
|
|
|
1619
1629
|
}
|
|
1620
1630
|
flushIndex = -1;
|
|
1621
1631
|
queue.length = 0;
|
|
1622
|
-
flushPostFlushCbs(seen
|
|
1632
|
+
flushPostFlushCbs(seen);
|
|
1623
1633
|
currentFlushPromise = null;
|
|
1624
|
-
if (queue.length || pendingPostFlushCbs.length) flushJobs(seen
|
|
1634
|
+
if (queue.length || pendingPostFlushCbs.length) flushJobs(seen);
|
|
1625
1635
|
}
|
|
1626
1636
|
}
|
|
1627
1637
|
var currentRenderingInstance = null;
|
|
@@ -1663,8 +1673,8 @@ function withDirectives(vnode, directives) {
|
|
|
1663
1673
|
if (currentRenderingInstance === null) return vnode;
|
|
1664
1674
|
const instance = getComponentPublicInstance(currentRenderingInstance);
|
|
1665
1675
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
1666
|
-
for (let i
|
|
1667
|
-
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i
|
|
1676
|
+
for (let i = 0; i < directives.length; i++) {
|
|
1677
|
+
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
1668
1678
|
if (dir) {
|
|
1669
1679
|
if (isFunction(dir)) dir = {
|
|
1670
1680
|
mounted: dir,
|
|
@@ -1686,9 +1696,9 @@ function withDirectives(vnode, directives) {
|
|
|
1686
1696
|
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
1687
1697
|
const bindings = vnode.dirs;
|
|
1688
1698
|
const oldBindings = prevVNode && prevVNode.dirs;
|
|
1689
|
-
for (let i
|
|
1690
|
-
const binding = bindings[i
|
|
1691
|
-
if (oldBindings) binding.oldValue = oldBindings[i
|
|
1699
|
+
for (let i = 0; i < bindings.length; i++) {
|
|
1700
|
+
const binding = bindings[i];
|
|
1701
|
+
if (oldBindings) binding.oldValue = oldBindings[i].value;
|
|
1692
1702
|
let hook = binding.dir[name];
|
|
1693
1703
|
if (hook) {
|
|
1694
1704
|
pauseTracking();
|
|
@@ -1800,7 +1810,7 @@ function createPathGetter(ctx, path) {
|
|
|
1800
1810
|
const segments = path.split(".");
|
|
1801
1811
|
return () => {
|
|
1802
1812
|
let cur = ctx;
|
|
1803
|
-
for (let i
|
|
1813
|
+
for (let i = 0; i < segments.length && cur; i++) cur = cur[segments[i]];
|
|
1804
1814
|
return cur;
|
|
1805
1815
|
};
|
|
1806
1816
|
}
|
|
@@ -1855,7 +1865,7 @@ var BaseTransitionImpl = {
|
|
|
1855
1865
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
1856
1866
|
if (!children || !children.length) return;
|
|
1857
1867
|
const child = findNonCommentChild(children);
|
|
1858
|
-
const rawProps = toRaw(props);
|
|
1868
|
+
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
1859
1869
|
const { mode } = rawProps;
|
|
1860
1870
|
if (state.isLeaving) return emptyPlaceholder(child);
|
|
1861
1871
|
const innerChild = getInnerChild$1(child);
|
|
@@ -1899,8 +1909,8 @@ var BaseTransitionImpl = {
|
|
|
1899
1909
|
function findNonCommentChild(children) {
|
|
1900
1910
|
let child = children[0];
|
|
1901
1911
|
if (children.length > 1) {
|
|
1902
|
-
for (const c
|
|
1903
|
-
child = c
|
|
1912
|
+
for (const c of children) if (c.type !== Comment) {
|
|
1913
|
+
child = c;
|
|
1904
1914
|
break;
|
|
1905
1915
|
}
|
|
1906
1916
|
}
|
|
@@ -1920,12 +1930,12 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
1920
1930
|
const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;
|
|
1921
1931
|
const key = String(vnode.key);
|
|
1922
1932
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
1923
|
-
const callHook
|
|
1933
|
+
const callHook = (hook, args) => {
|
|
1924
1934
|
hook && callWithAsyncErrorHandling(hook, instance, 9, args);
|
|
1925
1935
|
};
|
|
1926
1936
|
const callAsyncHook = (hook, args) => {
|
|
1927
1937
|
const done = args[1];
|
|
1928
|
-
callHook
|
|
1938
|
+
callHook(hook, args);
|
|
1929
1939
|
if (isArray$1(hook)) {
|
|
1930
1940
|
if (hook.every((hook2) => hook2.length <= 1)) done();
|
|
1931
1941
|
} else if (hook.length <= 1) done();
|
|
@@ -1940,7 +1950,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
1940
1950
|
if (el[leaveCbKey]) el[leaveCbKey](true);
|
|
1941
1951
|
const leavingVNode = leavingVNodesCache[key];
|
|
1942
1952
|
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) leavingVNode.el[leaveCbKey]();
|
|
1943
|
-
callHook
|
|
1953
|
+
callHook(hook, [el]);
|
|
1944
1954
|
},
|
|
1945
1955
|
enter(el) {
|
|
1946
1956
|
let hook = onEnter;
|
|
@@ -1952,32 +1962,34 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
1952
1962
|
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
1953
1963
|
} else return;
|
|
1954
1964
|
let called = false;
|
|
1955
|
-
|
|
1965
|
+
el[enterCbKey] = (cancelled) => {
|
|
1956
1966
|
if (called) return;
|
|
1957
1967
|
called = true;
|
|
1958
|
-
if (cancelled) callHook
|
|
1959
|
-
else callHook
|
|
1968
|
+
if (cancelled) callHook(cancelHook, [el]);
|
|
1969
|
+
else callHook(afterHook, [el]);
|
|
1960
1970
|
if (hooks.delayedLeave) hooks.delayedLeave();
|
|
1961
1971
|
el[enterCbKey] = void 0;
|
|
1962
1972
|
};
|
|
1973
|
+
const done = el[enterCbKey].bind(null, false);
|
|
1963
1974
|
if (hook) callAsyncHook(hook, [el, done]);
|
|
1964
1975
|
else done();
|
|
1965
1976
|
},
|
|
1966
|
-
leave(el, remove
|
|
1977
|
+
leave(el, remove) {
|
|
1967
1978
|
const key2 = String(vnode.key);
|
|
1968
1979
|
if (el[enterCbKey]) el[enterCbKey](true);
|
|
1969
|
-
if (state.isUnmounting) return remove
|
|
1970
|
-
callHook
|
|
1980
|
+
if (state.isUnmounting) return remove();
|
|
1981
|
+
callHook(onBeforeLeave, [el]);
|
|
1971
1982
|
let called = false;
|
|
1972
|
-
|
|
1983
|
+
el[leaveCbKey] = (cancelled) => {
|
|
1973
1984
|
if (called) return;
|
|
1974
1985
|
called = true;
|
|
1975
|
-
remove
|
|
1976
|
-
if (cancelled) callHook
|
|
1977
|
-
else callHook
|
|
1986
|
+
remove();
|
|
1987
|
+
if (cancelled) callHook(onLeaveCancelled, [el]);
|
|
1988
|
+
else callHook(onAfterLeave, [el]);
|
|
1978
1989
|
el[leaveCbKey] = void 0;
|
|
1979
1990
|
if (leavingVNodesCache[key2] === vnode) delete leavingVNodesCache[key2];
|
|
1980
1991
|
};
|
|
1992
|
+
const done = el[leaveCbKey].bind(null, false);
|
|
1981
1993
|
leavingVNodesCache[key2] = vnode;
|
|
1982
1994
|
if (onLeave) callAsyncHook(onLeave, [el, done]);
|
|
1983
1995
|
else done();
|
|
@@ -2021,20 +2033,20 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
2021
2033
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
2022
2034
|
let ret = [];
|
|
2023
2035
|
let keyedFragmentCount = 0;
|
|
2024
|
-
for (let i
|
|
2025
|
-
let child = children[i
|
|
2026
|
-
const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i
|
|
2036
|
+
for (let i = 0; i < children.length; i++) {
|
|
2037
|
+
let child = children[i];
|
|
2038
|
+
const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
|
|
2027
2039
|
if (child.type === Fragment) {
|
|
2028
2040
|
if (child.patchFlag & 128) keyedFragmentCount++;
|
|
2029
2041
|
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
2030
2042
|
} else if (keepComment || child.type !== Comment) ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
2031
2043
|
}
|
|
2032
|
-
if (keyedFragmentCount > 1) for (let i
|
|
2044
|
+
if (keyedFragmentCount > 1) for (let i = 0; i < ret.length; i++) ret[i].patchFlag = -2;
|
|
2033
2045
|
return ret;
|
|
2034
2046
|
}
|
|
2035
2047
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2036
2048
|
function defineComponent(options, extraOptions) {
|
|
2037
|
-
return isFunction(options) ?
|
|
2049
|
+
return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
|
|
2038
2050
|
}
|
|
2039
2051
|
function markAsyncBoundary(instance) {
|
|
2040
2052
|
instance.ids = [
|
|
@@ -2043,10 +2055,14 @@ function markAsyncBoundary(instance) {
|
|
|
2043
2055
|
0
|
|
2044
2056
|
];
|
|
2045
2057
|
}
|
|
2058
|
+
function isTemplateRefKey(refs, key) {
|
|
2059
|
+
let desc;
|
|
2060
|
+
return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);
|
|
2061
|
+
}
|
|
2046
2062
|
var pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
2047
2063
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
2048
2064
|
if (isArray$1(rawRef)) {
|
|
2049
|
-
rawRef.forEach((r
|
|
2065
|
+
rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray$1(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
|
|
2050
2066
|
return;
|
|
2051
2067
|
}
|
|
2052
2068
|
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
@@ -2055,51 +2071,53 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
2055
2071
|
}
|
|
2056
2072
|
const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
|
|
2057
2073
|
const value = isUnmount ? null : refValue;
|
|
2058
|
-
const { i: owner, r: ref
|
|
2074
|
+
const { i: owner, r: ref } = rawRef;
|
|
2059
2075
|
const oldRef = oldRawRef && oldRawRef.r;
|
|
2060
2076
|
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
2061
2077
|
const setupState = owner.setupState;
|
|
2062
|
-
const rawSetupState = toRaw(setupState);
|
|
2078
|
+
const rawSetupState = /* @__PURE__ */ toRaw(setupState);
|
|
2063
2079
|
const canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {
|
|
2080
|
+
if (isTemplateRefKey(refs, key)) return false;
|
|
2064
2081
|
return hasOwn(rawSetupState, key);
|
|
2065
2082
|
};
|
|
2066
|
-
const canSetRef = (ref2) => {
|
|
2083
|
+
const canSetRef = (ref2, key) => {
|
|
2084
|
+
if (key && isTemplateRefKey(refs, key)) return false;
|
|
2067
2085
|
return true;
|
|
2068
2086
|
};
|
|
2069
|
-
if (oldRef != null && oldRef !== ref
|
|
2087
|
+
if (oldRef != null && oldRef !== ref) {
|
|
2070
2088
|
invalidatePendingSetRef(oldRawRef);
|
|
2071
2089
|
if (isString(oldRef)) {
|
|
2072
2090
|
refs[oldRef] = null;
|
|
2073
2091
|
if (canSetSetupRef(oldRef)) setupState[oldRef] = null;
|
|
2074
|
-
} else if (isRef(oldRef)) {
|
|
2075
|
-
if (canSetRef(oldRef)) oldRef.value = null;
|
|
2092
|
+
} else if (/* @__PURE__ */ isRef(oldRef)) {
|
|
2076
2093
|
const oldRawRefAtom = oldRawRef;
|
|
2094
|
+
if (canSetRef(oldRef, oldRawRefAtom.k)) oldRef.value = null;
|
|
2077
2095
|
if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
|
|
2078
2096
|
}
|
|
2079
2097
|
}
|
|
2080
|
-
if (isFunction(ref
|
|
2098
|
+
if (isFunction(ref)) callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
2081
2099
|
else {
|
|
2082
|
-
const _isString = isString(ref
|
|
2083
|
-
const _isRef = isRef(ref
|
|
2100
|
+
const _isString = isString(ref);
|
|
2101
|
+
const _isRef = /* @__PURE__ */ isRef(ref);
|
|
2084
2102
|
if (_isString || _isRef) {
|
|
2085
2103
|
const doSet = () => {
|
|
2086
2104
|
if (rawRef.f) {
|
|
2087
|
-
const existing = _isString ? canSetSetupRef(ref
|
|
2105
|
+
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
2088
2106
|
if (isUnmount) isArray$1(existing) && remove(existing, refValue);
|
|
2089
2107
|
else if (!isArray$1(existing)) if (_isString) {
|
|
2090
|
-
refs[ref
|
|
2091
|
-
if (canSetSetupRef(ref
|
|
2108
|
+
refs[ref] = [refValue];
|
|
2109
|
+
if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
|
|
2092
2110
|
} else {
|
|
2093
2111
|
const newVal = [refValue];
|
|
2094
|
-
if (canSetRef(ref
|
|
2112
|
+
if (canSetRef(ref, rawRef.k)) ref.value = newVal;
|
|
2095
2113
|
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
2096
2114
|
}
|
|
2097
2115
|
else if (!existing.includes(refValue)) existing.push(refValue);
|
|
2098
2116
|
} else if (_isString) {
|
|
2099
|
-
refs[ref
|
|
2100
|
-
if (canSetSetupRef(ref
|
|
2117
|
+
refs[ref] = value;
|
|
2118
|
+
if (canSetSetupRef(ref)) setupState[ref] = value;
|
|
2101
2119
|
} else if (_isRef) {
|
|
2102
|
-
if (canSetRef(ref
|
|
2120
|
+
if (canSetRef(ref, rawRef.k)) ref.value = value;
|
|
2103
2121
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
2104
2122
|
}
|
|
2105
2123
|
};
|
|
@@ -2127,7 +2145,7 @@ function invalidatePendingSetRef(rawRef) {
|
|
|
2127
2145
|
}
|
|
2128
2146
|
getGlobalThis().requestIdleCallback;
|
|
2129
2147
|
getGlobalThis().cancelIdleCallback;
|
|
2130
|
-
var isAsyncWrapper = (i
|
|
2148
|
+
var isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
2131
2149
|
var isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
2132
2150
|
var KeepAlive = {
|
|
2133
2151
|
name: `KeepAlive`,
|
|
@@ -2246,7 +2264,7 @@ var KeepAlive = {
|
|
|
2246
2264
|
}
|
|
2247
2265
|
const comp = vnode.type;
|
|
2248
2266
|
const name = getComponentName(isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp);
|
|
2249
|
-
const { include, exclude, max
|
|
2267
|
+
const { include, exclude, max } = props;
|
|
2250
2268
|
if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
|
|
2251
2269
|
vnode.shapeFlag &= -257;
|
|
2252
2270
|
current = vnode;
|
|
@@ -2268,7 +2286,7 @@ var KeepAlive = {
|
|
|
2268
2286
|
keys.add(key);
|
|
2269
2287
|
} else {
|
|
2270
2288
|
keys.add(key);
|
|
2271
|
-
if (max
|
|
2289
|
+
if (max && keys.size > parseInt(max, 10)) pruneCacheEntry(keys.values().next().value);
|
|
2272
2290
|
}
|
|
2273
2291
|
vnode.shapeFlag |= 256;
|
|
2274
2292
|
current = vnode;
|
|
@@ -2277,7 +2295,7 @@ var KeepAlive = {
|
|
|
2277
2295
|
}
|
|
2278
2296
|
};
|
|
2279
2297
|
function matches(pattern, name) {
|
|
2280
|
-
if (isArray$1(pattern)) return pattern.some((p
|
|
2298
|
+
if (isArray$1(pattern)) return pattern.some((p) => matches(p, name));
|
|
2281
2299
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
2282
2300
|
else if (isRegExp(pattern)) {
|
|
2283
2301
|
pattern.lastIndex = 0;
|
|
@@ -2387,26 +2405,26 @@ function renderList(source, renderItem, cache, index) {
|
|
|
2387
2405
|
const cached = cache && cache[index];
|
|
2388
2406
|
const sourceIsArray = isArray$1(source);
|
|
2389
2407
|
if (sourceIsArray || isString(source)) {
|
|
2390
|
-
const sourceIsReactiveArray = sourceIsArray && isReactive(source);
|
|
2408
|
+
const sourceIsReactiveArray = sourceIsArray && /* @__PURE__ */ isReactive(source);
|
|
2391
2409
|
let needsWrap = false;
|
|
2392
2410
|
let isReadonlySource = false;
|
|
2393
2411
|
if (sourceIsReactiveArray) {
|
|
2394
|
-
needsWrap =
|
|
2395
|
-
isReadonlySource = isReadonly(source);
|
|
2412
|
+
needsWrap = !/* @__PURE__ */ isShallow(source);
|
|
2413
|
+
isReadonlySource = /* @__PURE__ */ isReadonly(source);
|
|
2396
2414
|
source = shallowReadArray(source);
|
|
2397
2415
|
}
|
|
2398
2416
|
ret = new Array(source.length);
|
|
2399
|
-
for (let i
|
|
2417
|
+
for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
|
|
2400
2418
|
} else if (typeof source === "number") {
|
|
2401
2419
|
ret = new Array(source);
|
|
2402
|
-
for (let i
|
|
2403
|
-
} else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i
|
|
2420
|
+
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
2421
|
+
} else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
2404
2422
|
else {
|
|
2405
2423
|
const keys = Object.keys(source);
|
|
2406
2424
|
ret = new Array(keys.length);
|
|
2407
|
-
for (let i
|
|
2408
|
-
const key = keys[i
|
|
2409
|
-
ret[i
|
|
2425
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
2426
|
+
const key = keys[i];
|
|
2427
|
+
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
2410
2428
|
}
|
|
2411
2429
|
}
|
|
2412
2430
|
else ret = [];
|
|
@@ -2437,29 +2455,29 @@ function ensureValidVNode(vnodes) {
|
|
|
2437
2455
|
return true;
|
|
2438
2456
|
}) ? vnodes : null;
|
|
2439
2457
|
}
|
|
2440
|
-
var getPublicInstance = (i
|
|
2441
|
-
if (!i
|
|
2442
|
-
if (isStatefulComponent(i
|
|
2443
|
-
return getPublicInstance(i
|
|
2458
|
+
var getPublicInstance = (i) => {
|
|
2459
|
+
if (!i) return null;
|
|
2460
|
+
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
2461
|
+
return getPublicInstance(i.parent);
|
|
2444
2462
|
};
|
|
2445
2463
|
var publicPropertiesMap = /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
|
|
2446
|
-
$: (i
|
|
2447
|
-
$el: (i
|
|
2448
|
-
$data: (i
|
|
2449
|
-
$props: (i
|
|
2450
|
-
$attrs: (i
|
|
2451
|
-
$slots: (i
|
|
2452
|
-
$refs: (i
|
|
2453
|
-
$parent: (i
|
|
2454
|
-
$root: (i
|
|
2455
|
-
$host: (i
|
|
2456
|
-
$emit: (i
|
|
2457
|
-
$options: (i
|
|
2458
|
-
$forceUpdate: (i
|
|
2459
|
-
queueJob(i
|
|
2464
|
+
$: (i) => i,
|
|
2465
|
+
$el: (i) => i.vnode.el,
|
|
2466
|
+
$data: (i) => i.data,
|
|
2467
|
+
$props: (i) => i.props,
|
|
2468
|
+
$attrs: (i) => i.attrs,
|
|
2469
|
+
$slots: (i) => i.slots,
|
|
2470
|
+
$refs: (i) => i.refs,
|
|
2471
|
+
$parent: (i) => getPublicInstance(i.parent),
|
|
2472
|
+
$root: (i) => getPublicInstance(i.root),
|
|
2473
|
+
$host: (i) => i.ce,
|
|
2474
|
+
$emit: (i) => i.emit,
|
|
2475
|
+
$options: (i) => resolveMergedOptions(i),
|
|
2476
|
+
$forceUpdate: (i) => i.f || (i.f = () => {
|
|
2477
|
+
queueJob(i.update);
|
|
2460
2478
|
}),
|
|
2461
|
-
$nextTick: (i
|
|
2462
|
-
$watch: (i
|
|
2479
|
+
$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
|
|
2480
|
+
$watch: (i) => instanceWatch.bind(i)
|
|
2463
2481
|
});
|
|
2464
2482
|
var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
2465
2483
|
var PublicInstanceProxyHandlers = {
|
|
@@ -2467,8 +2485,8 @@ var PublicInstanceProxyHandlers = {
|
|
|
2467
2485
|
if (key === "__v_skip") return true;
|
|
2468
2486
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
2469
2487
|
if (key[0] !== "$") {
|
|
2470
|
-
const n
|
|
2471
|
-
if (n
|
|
2488
|
+
const n = accessCache[key];
|
|
2489
|
+
if (n !== void 0) switch (n) {
|
|
2472
2490
|
case 1: return setupState[key];
|
|
2473
2491
|
case 2: return data[key];
|
|
2474
2492
|
case 4: return ctx[key];
|
|
@@ -2526,16 +2544,16 @@ function useSlots() {
|
|
|
2526
2544
|
return getContext("useSlots").slots;
|
|
2527
2545
|
}
|
|
2528
2546
|
function getContext(calledFunctionName) {
|
|
2529
|
-
const i
|
|
2530
|
-
return i
|
|
2547
|
+
const i = getCurrentInstance();
|
|
2548
|
+
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
2531
2549
|
}
|
|
2532
2550
|
function normalizePropsOrEmits(props) {
|
|
2533
|
-
return isArray$1(props) ? props.reduce((normalized, p
|
|
2551
|
+
return isArray$1(props) ? props.reduce((normalized, p) => (normalized[p] = null, normalized), {}) : props;
|
|
2534
2552
|
}
|
|
2535
|
-
function mergeModels(a
|
|
2536
|
-
if (!a
|
|
2537
|
-
if (isArray$1(a
|
|
2538
|
-
return extend({}, normalizePropsOrEmits(a
|
|
2553
|
+
function mergeModels(a, b) {
|
|
2554
|
+
if (!a || !b) return a || b;
|
|
2555
|
+
if (isArray$1(a) && isArray$1(b)) return a.concat(b);
|
|
2556
|
+
return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
|
|
2539
2557
|
}
|
|
2540
2558
|
var shouldCacheAccess = true;
|
|
2541
2559
|
function applyOptions(instance) {
|
|
@@ -2553,20 +2571,20 @@ function applyOptions(instance) {
|
|
|
2553
2571
|
}
|
|
2554
2572
|
if (dataOptions) {
|
|
2555
2573
|
const data = dataOptions.call(publicThis, publicThis);
|
|
2556
|
-
if (!isObject(data)) {} else instance.data = reactive(data);
|
|
2574
|
+
if (!isObject(data)) {} else instance.data = /* @__PURE__ */ reactive(data);
|
|
2557
2575
|
}
|
|
2558
2576
|
shouldCacheAccess = true;
|
|
2559
2577
|
if (computedOptions) for (const key in computedOptions) {
|
|
2560
2578
|
const opt = computedOptions[key];
|
|
2561
|
-
const c
|
|
2579
|
+
const c = computed({
|
|
2562
2580
|
get: isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP,
|
|
2563
2581
|
set: !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP
|
|
2564
2582
|
});
|
|
2565
2583
|
Object.defineProperty(ctx, key, {
|
|
2566
2584
|
enumerable: true,
|
|
2567
2585
|
configurable: true,
|
|
2568
|
-
get: () => c
|
|
2569
|
-
set: (v
|
|
2586
|
+
get: () => c.value,
|
|
2587
|
+
set: (v) => c.value = v
|
|
2570
2588
|
});
|
|
2571
2589
|
}
|
|
2572
2590
|
if (watchOptions) for (const key in watchOptions) createWatcher(watchOptions[key], ctx, publicThis, key);
|
|
@@ -2619,17 +2637,17 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
|
|
|
2619
2637
|
if (isObject(opt)) if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
|
|
2620
2638
|
else injected = inject(opt.from || key);
|
|
2621
2639
|
else injected = inject(opt);
|
|
2622
|
-
if (isRef(injected)) Object.defineProperty(ctx, key, {
|
|
2640
|
+
if (/* @__PURE__ */ isRef(injected)) Object.defineProperty(ctx, key, {
|
|
2623
2641
|
enumerable: true,
|
|
2624
2642
|
configurable: true,
|
|
2625
2643
|
get: () => injected.value,
|
|
2626
|
-
set: (v
|
|
2644
|
+
set: (v) => injected.value = v
|
|
2627
2645
|
});
|
|
2628
2646
|
else ctx[key] = injected;
|
|
2629
2647
|
}
|
|
2630
2648
|
}
|
|
2631
2649
|
function callHook$1(hook, instance, type) {
|
|
2632
|
-
callWithAsyncErrorHandling(isArray$1(hook) ? hook.map((h
|
|
2650
|
+
callWithAsyncErrorHandling(isArray$1(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type);
|
|
2633
2651
|
}
|
|
2634
2652
|
function createWatcher(raw, ctx, publicThis, key) {
|
|
2635
2653
|
let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
|
|
@@ -2637,7 +2655,7 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
2637
2655
|
const handler = ctx[raw];
|
|
2638
2656
|
if (isFunction(handler)) watch(getter, handler);
|
|
2639
2657
|
} else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
|
|
2640
|
-
else if (isObject(raw)) if (isArray$1(raw)) raw.forEach((r
|
|
2658
|
+
else if (isObject(raw)) if (isArray$1(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
2641
2659
|
else {
|
|
2642
2660
|
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
2643
2661
|
if (isFunction(handler)) watch(getter, handler, raw);
|
|
@@ -2653,7 +2671,7 @@ function resolveMergedOptions(instance) {
|
|
|
2653
2671
|
else if (!globalMixins.length && !mixins && !extendsOptions) resolved = base;
|
|
2654
2672
|
else {
|
|
2655
2673
|
resolved = {};
|
|
2656
|
-
if (globalMixins.length) globalMixins.forEach((m
|
|
2674
|
+
if (globalMixins.length) globalMixins.forEach((m) => mergeOptions$1(resolved, m, optionMergeStrategies, true));
|
|
2657
2675
|
mergeOptions$1(resolved, base, optionMergeStrategies);
|
|
2658
2676
|
}
|
|
2659
2677
|
if (isObject(base)) cache.set(base, resolved);
|
|
@@ -2662,7 +2680,7 @@ function resolveMergedOptions(instance) {
|
|
|
2662
2680
|
function mergeOptions$1(to, from, strats, asMixin = false) {
|
|
2663
2681
|
const { mixins, extends: extendsOptions } = from;
|
|
2664
2682
|
if (extendsOptions) mergeOptions$1(to, extendsOptions, strats, true);
|
|
2665
|
-
if (mixins) mixins.forEach((m
|
|
2683
|
+
if (mixins) mixins.forEach((m) => mergeOptions$1(to, m, strats, true));
|
|
2666
2684
|
for (const key in from) if (asMixin && key === "expose") {} else {
|
|
2667
2685
|
const strat = internalOptionMergeStrats[key] || strats && strats[key];
|
|
2668
2686
|
to[key] = strat ? strat(to[key], from[key]) : from[key];
|
|
@@ -2708,7 +2726,7 @@ function mergeInject(to, from) {
|
|
|
2708
2726
|
function normalizeInject(raw) {
|
|
2709
2727
|
if (isArray$1(raw)) {
|
|
2710
2728
|
const res = {};
|
|
2711
|
-
for (let i
|
|
2729
|
+
for (let i = 0; i < raw.length; i++) res[raw[i]] = raw[i];
|
|
2712
2730
|
return res;
|
|
2713
2731
|
}
|
|
2714
2732
|
return raw;
|
|
@@ -2755,14 +2773,14 @@ function createAppContext() {
|
|
|
2755
2773
|
}
|
|
2756
2774
|
var uid$1 = 0;
|
|
2757
2775
|
function createAppAPI(render, hydrate) {
|
|
2758
|
-
return function createApp
|
|
2776
|
+
return function createApp(rootComponent, rootProps = null) {
|
|
2759
2777
|
if (!isFunction(rootComponent)) rootComponent = extend({}, rootComponent);
|
|
2760
2778
|
if (rootProps != null && !isObject(rootProps)) rootProps = null;
|
|
2761
2779
|
const context = createAppContext();
|
|
2762
2780
|
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
2763
2781
|
const pluginCleanupFns = [];
|
|
2764
2782
|
let isMounted = false;
|
|
2765
|
-
const app
|
|
2783
|
+
const app = context.app = {
|
|
2766
2784
|
_uid: uid$1++,
|
|
2767
2785
|
_component: rootComponent,
|
|
2768
2786
|
_props: rootProps,
|
|
@@ -2773,42 +2791,42 @@ function createAppAPI(render, hydrate) {
|
|
|
2773
2791
|
get config() {
|
|
2774
2792
|
return context.config;
|
|
2775
2793
|
},
|
|
2776
|
-
set config(v
|
|
2794
|
+
set config(v) {},
|
|
2777
2795
|
use(plugin, ...options) {
|
|
2778
2796
|
if (installedPlugins.has(plugin)) {} else if (plugin && isFunction(plugin.install)) {
|
|
2779
2797
|
installedPlugins.add(plugin);
|
|
2780
|
-
plugin.install(app
|
|
2798
|
+
plugin.install(app, ...options);
|
|
2781
2799
|
} else if (isFunction(plugin)) {
|
|
2782
2800
|
installedPlugins.add(plugin);
|
|
2783
|
-
plugin(app
|
|
2801
|
+
plugin(app, ...options);
|
|
2784
2802
|
}
|
|
2785
|
-
return app
|
|
2803
|
+
return app;
|
|
2786
2804
|
},
|
|
2787
2805
|
mixin(mixin) {
|
|
2788
2806
|
if (!context.mixins.includes(mixin)) context.mixins.push(mixin);
|
|
2789
|
-
return app
|
|
2807
|
+
return app;
|
|
2790
2808
|
},
|
|
2791
2809
|
component(name, component) {
|
|
2792
2810
|
if (!component) return context.components[name];
|
|
2793
2811
|
context.components[name] = component;
|
|
2794
|
-
return app
|
|
2812
|
+
return app;
|
|
2795
2813
|
},
|
|
2796
2814
|
directive(name, directive) {
|
|
2797
2815
|
if (!directive) return context.directives[name];
|
|
2798
2816
|
context.directives[name] = directive;
|
|
2799
|
-
return app
|
|
2817
|
+
return app;
|
|
2800
2818
|
},
|
|
2801
2819
|
mount(rootContainer, isHydrate, namespace) {
|
|
2802
2820
|
if (!isMounted) {
|
|
2803
|
-
const vnode = app
|
|
2821
|
+
const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
|
|
2804
2822
|
vnode.appContext = context;
|
|
2805
2823
|
if (namespace === true) namespace = "svg";
|
|
2806
2824
|
else if (namespace === false) namespace = void 0;
|
|
2807
2825
|
if (isHydrate && hydrate) hydrate(vnode, rootContainer);
|
|
2808
2826
|
else render(vnode, rootContainer, namespace);
|
|
2809
2827
|
isMounted = true;
|
|
2810
|
-
app
|
|
2811
|
-
rootContainer.__vue_app__ = app
|
|
2828
|
+
app._container = rootContainer;
|
|
2829
|
+
rootContainer.__vue_app__ = app;
|
|
2812
2830
|
return getComponentPublicInstance(vnode.component);
|
|
2813
2831
|
}
|
|
2814
2832
|
},
|
|
@@ -2817,18 +2835,18 @@ function createAppAPI(render, hydrate) {
|
|
|
2817
2835
|
},
|
|
2818
2836
|
unmount() {
|
|
2819
2837
|
if (isMounted) {
|
|
2820
|
-
callWithAsyncErrorHandling(pluginCleanupFns, app
|
|
2821
|
-
render(null, app
|
|
2822
|
-
delete app
|
|
2838
|
+
callWithAsyncErrorHandling(pluginCleanupFns, app._instance, 16);
|
|
2839
|
+
render(null, app._container);
|
|
2840
|
+
delete app._container.__vue_app__;
|
|
2823
2841
|
}
|
|
2824
2842
|
},
|
|
2825
2843
|
provide(key, value) {
|
|
2826
2844
|
context.provides[key] = value;
|
|
2827
|
-
return app
|
|
2845
|
+
return app;
|
|
2828
2846
|
},
|
|
2829
2847
|
runWithContext(fn) {
|
|
2830
2848
|
const lastApp = currentApp;
|
|
2831
|
-
currentApp = app
|
|
2849
|
+
currentApp = app;
|
|
2832
2850
|
try {
|
|
2833
2851
|
return fn();
|
|
2834
2852
|
} finally {
|
|
@@ -2836,16 +2854,16 @@ function createAppAPI(render, hydrate) {
|
|
|
2836
2854
|
}
|
|
2837
2855
|
}
|
|
2838
2856
|
};
|
|
2839
|
-
return app
|
|
2857
|
+
return app;
|
|
2840
2858
|
};
|
|
2841
2859
|
}
|
|
2842
2860
|
var currentApp = null;
|
|
2843
2861
|
function useModel(props, name, options = EMPTY_OBJ) {
|
|
2844
|
-
const i
|
|
2862
|
+
const i = getCurrentInstance();
|
|
2845
2863
|
const camelizedName = camelize(name);
|
|
2846
2864
|
const hyphenatedName = hyphenate(name);
|
|
2847
2865
|
const modifiers = getModelModifiers(props, camelizedName);
|
|
2848
|
-
const res = customRef((track
|
|
2866
|
+
const res = customRef((track, trigger) => {
|
|
2849
2867
|
let localValue;
|
|
2850
2868
|
let prevSetValue = EMPTY_OBJ;
|
|
2851
2869
|
let prevEmittedValue;
|
|
@@ -2853,24 +2871,24 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
2853
2871
|
const propValue = props[camelizedName];
|
|
2854
2872
|
if (hasChanged(localValue, propValue)) {
|
|
2855
2873
|
localValue = propValue;
|
|
2856
|
-
trigger
|
|
2874
|
+
trigger();
|
|
2857
2875
|
}
|
|
2858
2876
|
});
|
|
2859
2877
|
return {
|
|
2860
2878
|
get() {
|
|
2861
|
-
track
|
|
2879
|
+
track();
|
|
2862
2880
|
return options.get ? options.get(localValue) : localValue;
|
|
2863
2881
|
},
|
|
2864
2882
|
set(value) {
|
|
2865
2883
|
const emittedValue = options.set ? options.set(value) : value;
|
|
2866
2884
|
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) return;
|
|
2867
|
-
const rawProps = i
|
|
2885
|
+
const rawProps = i.vnode.props;
|
|
2868
2886
|
if (!(rawProps && (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
|
|
2869
2887
|
localValue = value;
|
|
2870
|
-
trigger
|
|
2888
|
+
trigger();
|
|
2871
2889
|
}
|
|
2872
|
-
i
|
|
2873
|
-
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) trigger
|
|
2890
|
+
i.emit(`update:${name}`, emittedValue);
|
|
2891
|
+
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) trigger();
|
|
2874
2892
|
prevSetValue = value;
|
|
2875
2893
|
prevEmittedValue = emittedValue;
|
|
2876
2894
|
}
|
|
@@ -2895,15 +2913,15 @@ function emit(instance, event, ...rawArgs) {
|
|
|
2895
2913
|
if (instance.isUnmounted) return;
|
|
2896
2914
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
2897
2915
|
let args = rawArgs;
|
|
2898
|
-
const isModelListener
|
|
2899
|
-
const modifiers = isModelListener
|
|
2916
|
+
const isModelListener = event.startsWith("update:");
|
|
2917
|
+
const modifiers = isModelListener && getModelModifiers(props, event.slice(7));
|
|
2900
2918
|
if (modifiers) {
|
|
2901
|
-
if (modifiers.trim) args = rawArgs.map((a
|
|
2919
|
+
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
2902
2920
|
if (modifiers.number) args = rawArgs.map(looseToNumber);
|
|
2903
2921
|
}
|
|
2904
2922
|
let handlerName;
|
|
2905
2923
|
let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize(event))];
|
|
2906
|
-
if (!handler && isModelListener
|
|
2924
|
+
if (!handler && isModelListener) handler = props[handlerName = toHandlerKey(hyphenate(event))];
|
|
2907
2925
|
if (handler) callWithAsyncErrorHandling(handler, instance, 6, args);
|
|
2908
2926
|
const onceHandler = props[handlerName + `Once`];
|
|
2909
2927
|
if (onceHandler) {
|
|
@@ -2948,7 +2966,7 @@ function isEmitListener(options, key) {
|
|
|
2948
2966
|
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
2949
2967
|
}
|
|
2950
2968
|
function renderComponentRoot(instance) {
|
|
2951
|
-
const { type: Component, vnode, proxy, withProxy, propsOptions: [propsOptions], slots, attrs, emit
|
|
2969
|
+
const { type: Component, vnode, proxy, withProxy, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, props, data, setupState, ctx, inheritAttrs } = instance;
|
|
2952
2970
|
const prev = setCurrentRenderingInstance(instance);
|
|
2953
2971
|
let result;
|
|
2954
2972
|
let fallthroughAttrs;
|
|
@@ -2963,7 +2981,7 @@ function renderComponentRoot(instance) {
|
|
|
2963
2981
|
result = normalizeVNode(render2.length > 1 ? render2(props, {
|
|
2964
2982
|
attrs,
|
|
2965
2983
|
slots,
|
|
2966
|
-
emit
|
|
2984
|
+
emit
|
|
2967
2985
|
}) : render2(props, null));
|
|
2968
2986
|
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
2969
2987
|
}
|
|
@@ -2994,8 +3012,8 @@ function renderComponentRoot(instance) {
|
|
|
2994
3012
|
}
|
|
2995
3013
|
function filterSingleRoot(children, recurse = true) {
|
|
2996
3014
|
let singleRoot;
|
|
2997
|
-
for (let i
|
|
2998
|
-
const child = children[i
|
|
3015
|
+
for (let i = 0; i < children.length; i++) {
|
|
3016
|
+
const child = children[i];
|
|
2999
3017
|
if (isVNode(child)) {
|
|
3000
3018
|
if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
|
|
3001
3019
|
else singleRoot = child;
|
|
@@ -3025,9 +3043,9 @@ function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
|
3025
3043
|
return hasPropsChanged(prevProps, nextProps, emits);
|
|
3026
3044
|
} else if (patchFlag & 8) {
|
|
3027
3045
|
const dynamicProps = nextVNode.dynamicProps;
|
|
3028
|
-
for (let i
|
|
3029
|
-
const key = dynamicProps[i
|
|
3030
|
-
if (nextProps
|
|
3046
|
+
for (let i = 0; i < dynamicProps.length; i++) {
|
|
3047
|
+
const key = dynamicProps[i];
|
|
3048
|
+
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emits, key)) return true;
|
|
3031
3049
|
}
|
|
3032
3050
|
}
|
|
3033
3051
|
} else {
|
|
@@ -3044,12 +3062,18 @@ function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
|
3044
3062
|
function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
3045
3063
|
const nextKeys = Object.keys(nextProps);
|
|
3046
3064
|
if (nextKeys.length !== Object.keys(prevProps).length) return true;
|
|
3047
|
-
for (let i
|
|
3048
|
-
const key = nextKeys[i
|
|
3049
|
-
if (nextProps
|
|
3065
|
+
for (let i = 0; i < nextKeys.length; i++) {
|
|
3066
|
+
const key = nextKeys[i];
|
|
3067
|
+
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
3050
3068
|
}
|
|
3051
3069
|
return false;
|
|
3052
3070
|
}
|
|
3071
|
+
function hasPropValueChanged(nextProps, prevProps, key) {
|
|
3072
|
+
const nextProp = nextProps[key];
|
|
3073
|
+
const prevProp = prevProps[key];
|
|
3074
|
+
if (key === "style" && isObject(nextProp) && isObject(prevProp)) return !looseEqual(nextProp, prevProp);
|
|
3075
|
+
return nextProp !== prevProp;
|
|
3076
|
+
}
|
|
3053
3077
|
function updateHOCHostEl({ vnode, parent }, el) {
|
|
3054
3078
|
while (parent) {
|
|
3055
3079
|
const root = parent.subTree;
|
|
@@ -3069,21 +3093,21 @@ function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
|
3069
3093
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
3070
3094
|
setFullProps(instance, rawProps, props, attrs);
|
|
3071
3095
|
for (const key in instance.propsOptions[0]) if (!(key in props)) props[key] = void 0;
|
|
3072
|
-
if (isStateful) instance.props = isSSR ? props : shallowReactive(props);
|
|
3096
|
+
if (isStateful) instance.props = isSSR ? props : /* @__PURE__ */ shallowReactive(props);
|
|
3073
3097
|
else if (!instance.type.props) instance.props = attrs;
|
|
3074
3098
|
else instance.props = props;
|
|
3075
3099
|
instance.attrs = attrs;
|
|
3076
3100
|
}
|
|
3077
3101
|
function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
3078
3102
|
const { props, attrs, vnode: { patchFlag } } = instance;
|
|
3079
|
-
const rawCurrentProps = toRaw(props);
|
|
3103
|
+
const rawCurrentProps = /* @__PURE__ */ toRaw(props);
|
|
3080
3104
|
const [options] = instance.propsOptions;
|
|
3081
3105
|
let hasAttrsChanged = false;
|
|
3082
3106
|
if ((optimized || patchFlag > 0) && !(patchFlag & 16)) {
|
|
3083
3107
|
if (patchFlag & 8) {
|
|
3084
3108
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
3085
|
-
for (let i
|
|
3086
|
-
let key = propsToUpdate[i
|
|
3109
|
+
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
3110
|
+
let key = propsToUpdate[i];
|
|
3087
3111
|
if (isEmitListener(instance.emitsOptions, key)) continue;
|
|
3088
3112
|
const value = rawProps[key];
|
|
3089
3113
|
if (options) if (hasOwn(attrs, key)) {
|
|
@@ -3134,10 +3158,10 @@ function setFullProps(instance, rawProps, props, attrs) {
|
|
|
3134
3158
|
}
|
|
3135
3159
|
}
|
|
3136
3160
|
if (needCastKeys) {
|
|
3137
|
-
const rawCurrentProps = toRaw(props);
|
|
3161
|
+
const rawCurrentProps = /* @__PURE__ */ toRaw(props);
|
|
3138
3162
|
const castValues = rawCastValues || EMPTY_OBJ;
|
|
3139
|
-
for (let i
|
|
3140
|
-
const key = needCastKeys[i
|
|
3163
|
+
for (let i = 0; i < needCastKeys.length; i++) {
|
|
3164
|
+
const key = needCastKeys[i];
|
|
3141
3165
|
props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));
|
|
3142
3166
|
}
|
|
3143
3167
|
}
|
|
@@ -3191,8 +3215,8 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
3191
3215
|
if (isObject(comp)) cache.set(comp, EMPTY_ARR);
|
|
3192
3216
|
return EMPTY_ARR;
|
|
3193
3217
|
}
|
|
3194
|
-
if (isArray$1(raw)) for (let i
|
|
3195
|
-
const normalizedKey = camelize(raw[i
|
|
3218
|
+
if (isArray$1(raw)) for (let i = 0; i < raw.length; i++) {
|
|
3219
|
+
const normalizedKey = camelize(raw[i]);
|
|
3196
3220
|
if (validatePropName(normalizedKey)) normalized[normalizedKey] = EMPTY_OBJ;
|
|
3197
3221
|
}
|
|
3198
3222
|
else if (raw) for (const key in raw) {
|
|
@@ -3306,7 +3330,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3306
3330
|
optimized = false;
|
|
3307
3331
|
n2.dynamicChildren = null;
|
|
3308
3332
|
}
|
|
3309
|
-
const { type, ref
|
|
3333
|
+
const { type, ref, shapeFlag } = n2;
|
|
3310
3334
|
switch (type) {
|
|
3311
3335
|
case Text:
|
|
3312
3336
|
processText(n1, n2, container, anchor);
|
|
@@ -3325,8 +3349,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3325
3349
|
else if (shapeFlag & 64) type.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
|
|
3326
3350
|
else if (shapeFlag & 128) type.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
|
|
3327
3351
|
}
|
|
3328
|
-
if (ref
|
|
3329
|
-
else if (ref
|
|
3352
|
+
if (ref != null && parentComponent) setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
|
|
3353
|
+
else if (ref == null && n1 && n1.ref != null) setRef(n1.ref, null, parentSuspense, n1, true);
|
|
3330
3354
|
};
|
|
3331
3355
|
const processText = (n1, n2, container, anchor) => {
|
|
3332
3356
|
if (n1 == null) hostInsert(n2.el = hostCreateText(n2.children), container, anchor);
|
|
@@ -3365,7 +3389,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3365
3389
|
else if (n2.type === "math") namespace = "mathml";
|
|
3366
3390
|
if (n1 == null) mountElement(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3367
3391
|
else {
|
|
3368
|
-
const customElement =
|
|
3392
|
+
const customElement = n1.el && n1.el._isVueCE ? n1.el : null;
|
|
3369
3393
|
try {
|
|
3370
3394
|
if (customElement) customElement._beginPatch();
|
|
3371
3395
|
patchElement(n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -3400,7 +3424,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3400
3424
|
};
|
|
3401
3425
|
const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
|
|
3402
3426
|
if (scopeId) hostSetScopeId(el, scopeId);
|
|
3403
|
-
if (slotScopeIds) for (let i
|
|
3427
|
+
if (slotScopeIds) for (let i = 0; i < slotScopeIds.length; i++) hostSetScopeId(el, slotScopeIds[i]);
|
|
3404
3428
|
if (parentComponent) {
|
|
3405
3429
|
let subTree = parentComponent.subTree;
|
|
3406
3430
|
if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
|
|
@@ -3410,7 +3434,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3410
3434
|
}
|
|
3411
3435
|
};
|
|
3412
3436
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
3413
|
-
for (let i
|
|
3437
|
+
for (let i = start; i < children.length; i++) patch(null, children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3414
3438
|
};
|
|
3415
3439
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
3416
3440
|
const el = n2.el = n1.el;
|
|
@@ -3435,8 +3459,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3435
3459
|
if (patchFlag & 4) hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
|
|
3436
3460
|
if (patchFlag & 8) {
|
|
3437
3461
|
const propsToUpdate = n2.dynamicProps;
|
|
3438
|
-
for (let i
|
|
3439
|
-
const key = propsToUpdate[i
|
|
3462
|
+
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
3463
|
+
const key = propsToUpdate[i];
|
|
3440
3464
|
const prev = oldProps[key];
|
|
3441
3465
|
const next = newProps[key];
|
|
3442
3466
|
if (next !== prev || key === "value") hostPatchProp(el, key, prev, next, namespace, parentComponent);
|
|
@@ -3453,9 +3477,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3453
3477
|
}, parentSuspense);
|
|
3454
3478
|
};
|
|
3455
3479
|
const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
|
|
3456
|
-
for (let i
|
|
3457
|
-
const oldVNode = oldChildren[i
|
|
3458
|
-
const newVNode = newChildren[i
|
|
3480
|
+
for (let i = 0; i < newChildren.length; i++) {
|
|
3481
|
+
const oldVNode = oldChildren[i];
|
|
3482
|
+
const newVNode = newChildren[i];
|
|
3459
3483
|
patch(oldVNode, newVNode, oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
3460
3484
|
}
|
|
3461
3485
|
};
|
|
@@ -3525,7 +3549,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3525
3549
|
if (!instance.isMounted) {
|
|
3526
3550
|
let vnodeHook;
|
|
3527
3551
|
const { el, props } = initialVNode;
|
|
3528
|
-
const { bm, m
|
|
3552
|
+
const { bm, m, parent, root, type } = instance;
|
|
3529
3553
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
3530
3554
|
toggleRecurse(instance, false);
|
|
3531
3555
|
if (bm) invokeArrayFns(bm);
|
|
@@ -3539,12 +3563,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3539
3563
|
if (isAsyncWrapperVNode && type.__asyncHydrate) type.__asyncHydrate(el, instance, hydrateSubTree);
|
|
3540
3564
|
else hydrateSubTree();
|
|
3541
3565
|
} else {
|
|
3542
|
-
if (root.ce && root.ce.
|
|
3566
|
+
if (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type);
|
|
3543
3567
|
const subTree = instance.subTree = renderComponentRoot(instance);
|
|
3544
3568
|
patch(null, subTree, container, anchor, instance, parentSuspense, namespace);
|
|
3545
3569
|
initialVNode.el = subTree.el;
|
|
3546
3570
|
}
|
|
3547
|
-
if (m
|
|
3571
|
+
if (m) queuePostRenderEffect(m, parentSuspense);
|
|
3548
3572
|
if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
|
|
3549
3573
|
const scopedInitialVNode = initialVNode;
|
|
3550
3574
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
|
|
@@ -3553,7 +3577,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3553
3577
|
instance.isMounted = true;
|
|
3554
3578
|
initialVNode = container = anchor = null;
|
|
3555
3579
|
} else {
|
|
3556
|
-
let { next, bu, u
|
|
3580
|
+
let { next, bu, u, parent, vnode } = instance;
|
|
3557
3581
|
{
|
|
3558
3582
|
const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
|
|
3559
3583
|
if (nonHydratedAsyncRoot) {
|
|
@@ -3562,7 +3586,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3562
3586
|
updateComponentPreRender(instance, next, optimized);
|
|
3563
3587
|
}
|
|
3564
3588
|
nonHydratedAsyncRoot.asyncDep.then(() => {
|
|
3565
|
-
|
|
3589
|
+
queuePostRenderEffect(() => {
|
|
3590
|
+
if (!instance.isUnmounted) update();
|
|
3591
|
+
}, parentSuspense);
|
|
3566
3592
|
});
|
|
3567
3593
|
return;
|
|
3568
3594
|
}
|
|
@@ -3583,7 +3609,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3583
3609
|
patch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, namespace);
|
|
3584
3610
|
next.el = nextTree.el;
|
|
3585
3611
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
3586
|
-
if (u
|
|
3612
|
+
if (u) queuePostRenderEffect(u, parentSuspense);
|
|
3587
3613
|
if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
|
|
3588
3614
|
}
|
|
3589
3615
|
};
|
|
@@ -3639,27 +3665,27 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3639
3665
|
const oldLength = c1.length;
|
|
3640
3666
|
const newLength = c2.length;
|
|
3641
3667
|
const commonLength = Math.min(oldLength, newLength);
|
|
3642
|
-
let i
|
|
3643
|
-
for (i
|
|
3644
|
-
const nextChild = c2[i
|
|
3645
|
-
patch(c1[i
|
|
3668
|
+
let i;
|
|
3669
|
+
for (i = 0; i < commonLength; i++) {
|
|
3670
|
+
const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
3671
|
+
patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3646
3672
|
}
|
|
3647
3673
|
if (oldLength > newLength) unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength);
|
|
3648
3674
|
else mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, commonLength);
|
|
3649
3675
|
};
|
|
3650
3676
|
const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
3651
|
-
let i
|
|
3677
|
+
let i = 0;
|
|
3652
3678
|
const l2 = c2.length;
|
|
3653
3679
|
let e1 = c1.length - 1;
|
|
3654
3680
|
let e2 = l2 - 1;
|
|
3655
|
-
while (i
|
|
3656
|
-
const n1 = c1[i
|
|
3657
|
-
const n2 = c2[i
|
|
3681
|
+
while (i <= e1 && i <= e2) {
|
|
3682
|
+
const n1 = c1[i];
|
|
3683
|
+
const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
3658
3684
|
if (isSameVNodeType(n1, n2)) patch(n1, n2, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3659
3685
|
else break;
|
|
3660
|
-
i
|
|
3686
|
+
i++;
|
|
3661
3687
|
}
|
|
3662
|
-
while (i
|
|
3688
|
+
while (i <= e1 && i <= e2) {
|
|
3663
3689
|
const n1 = c1[e1];
|
|
3664
3690
|
const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
|
|
3665
3691
|
if (isSameVNodeType(n1, n2)) patch(n1, n2, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -3667,26 +3693,26 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3667
3693
|
e1--;
|
|
3668
3694
|
e2--;
|
|
3669
3695
|
}
|
|
3670
|
-
if (i
|
|
3671
|
-
if (i
|
|
3696
|
+
if (i > e1) {
|
|
3697
|
+
if (i <= e2) {
|
|
3672
3698
|
const nextPos = e2 + 1;
|
|
3673
3699
|
const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
|
|
3674
|
-
while (i
|
|
3675
|
-
patch(null, c2[i
|
|
3676
|
-
i
|
|
3700
|
+
while (i <= e2) {
|
|
3701
|
+
patch(null, c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3702
|
+
i++;
|
|
3677
3703
|
}
|
|
3678
3704
|
}
|
|
3679
|
-
} else if (i
|
|
3680
|
-
unmount(c1[i
|
|
3681
|
-
i
|
|
3705
|
+
} else if (i > e2) while (i <= e1) {
|
|
3706
|
+
unmount(c1[i], parentComponent, parentSuspense, true);
|
|
3707
|
+
i++;
|
|
3682
3708
|
}
|
|
3683
3709
|
else {
|
|
3684
|
-
const s1 = i
|
|
3685
|
-
const s2 = i
|
|
3710
|
+
const s1 = i;
|
|
3711
|
+
const s2 = i;
|
|
3686
3712
|
const keyToNewIndexMap = /* @__PURE__ */ new Map();
|
|
3687
|
-
for (i
|
|
3688
|
-
const nextChild = c2[i
|
|
3689
|
-
if (nextChild.key != null) keyToNewIndexMap.set(nextChild.key, i
|
|
3713
|
+
for (i = s2; i <= e2; i++) {
|
|
3714
|
+
const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
3715
|
+
if (nextChild.key != null) keyToNewIndexMap.set(nextChild.key, i);
|
|
3690
3716
|
}
|
|
3691
3717
|
let j;
|
|
3692
3718
|
let patched = 0;
|
|
@@ -3694,9 +3720,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3694
3720
|
let moved = false;
|
|
3695
3721
|
let maxNewIndexSoFar = 0;
|
|
3696
3722
|
const newIndexToOldIndexMap = new Array(toBePatched);
|
|
3697
|
-
for (i
|
|
3698
|
-
for (i
|
|
3699
|
-
const prevChild = c1[i
|
|
3723
|
+
for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
|
|
3724
|
+
for (i = s1; i <= e1; i++) {
|
|
3725
|
+
const prevChild = c1[i];
|
|
3700
3726
|
if (patched >= toBePatched) {
|
|
3701
3727
|
unmount(prevChild, parentComponent, parentSuspense, true);
|
|
3702
3728
|
continue;
|
|
@@ -3709,7 +3735,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3709
3735
|
}
|
|
3710
3736
|
if (newIndex === void 0) unmount(prevChild, parentComponent, parentSuspense, true);
|
|
3711
3737
|
else {
|
|
3712
|
-
newIndexToOldIndexMap[newIndex - s2] = i
|
|
3738
|
+
newIndexToOldIndexMap[newIndex - s2] = i + 1;
|
|
3713
3739
|
if (newIndex >= maxNewIndexSoFar) maxNewIndexSoFar = newIndex;
|
|
3714
3740
|
else moved = true;
|
|
3715
3741
|
patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -3718,13 +3744,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3718
3744
|
}
|
|
3719
3745
|
const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
|
|
3720
3746
|
j = increasingNewIndexSequence.length - 1;
|
|
3721
|
-
for (i
|
|
3722
|
-
const nextIndex = s2 + i
|
|
3747
|
+
for (i = toBePatched - 1; i >= 0; i--) {
|
|
3748
|
+
const nextIndex = s2 + i;
|
|
3723
3749
|
const nextChild = c2[nextIndex];
|
|
3724
3750
|
const anchorVNode = c2[nextIndex + 1];
|
|
3725
3751
|
const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
|
|
3726
|
-
if (newIndexToOldIndexMap[i
|
|
3727
|
-
else if (moved) if (j < 0 || i
|
|
3752
|
+
if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3753
|
+
else if (moved) if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2);
|
|
3728
3754
|
else j--;
|
|
3729
3755
|
}
|
|
3730
3756
|
}
|
|
@@ -3745,7 +3771,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3745
3771
|
}
|
|
3746
3772
|
if (type === Fragment) {
|
|
3747
3773
|
hostInsert(el, container, anchor);
|
|
3748
|
-
for (let i
|
|
3774
|
+
for (let i = 0; i < children.length; i++) move(children[i], container, anchor, moveType);
|
|
3749
3775
|
hostInsert(vnode.anchor, container, anchor);
|
|
3750
3776
|
return;
|
|
3751
3777
|
}
|
|
@@ -3776,11 +3802,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3776
3802
|
else hostInsert(el, container, anchor);
|
|
3777
3803
|
};
|
|
3778
3804
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
3779
|
-
const { type, props, ref
|
|
3805
|
+
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex } = vnode;
|
|
3780
3806
|
if (patchFlag === -2) optimized = false;
|
|
3781
|
-
if (ref
|
|
3807
|
+
if (ref != null) {
|
|
3782
3808
|
pauseTracking();
|
|
3783
|
-
setRef(ref
|
|
3809
|
+
setRef(ref, null, parentSuspense, vnode, true);
|
|
3784
3810
|
resetTracking();
|
|
3785
3811
|
}
|
|
3786
3812
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
@@ -3802,14 +3828,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3802
3828
|
if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
|
|
3803
3829
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
3804
3830
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
3805
|
-
if (doRemove) remove
|
|
3831
|
+
if (doRemove) remove(vnode);
|
|
3806
3832
|
}
|
|
3807
3833
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) queuePostRenderEffect(() => {
|
|
3808
3834
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
3809
3835
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
3810
3836
|
}, parentSuspense);
|
|
3811
3837
|
};
|
|
3812
|
-
const remove
|
|
3838
|
+
const remove = (vnode) => {
|
|
3813
3839
|
const { type, el, anchor, transition } = vnode;
|
|
3814
3840
|
if (type === Fragment) {
|
|
3815
3841
|
removeFragment(el, anchor);
|
|
@@ -3840,9 +3866,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3840
3866
|
hostRemove(end);
|
|
3841
3867
|
};
|
|
3842
3868
|
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
3843
|
-
const { bum, scope, job, subTree, um, m
|
|
3844
|
-
invalidateMount(m
|
|
3845
|
-
invalidateMount(a
|
|
3869
|
+
const { bum, scope, job, subTree, um, m, a } = instance;
|
|
3870
|
+
invalidateMount(m);
|
|
3871
|
+
invalidateMount(a);
|
|
3846
3872
|
if (bum) invokeArrayFns(bum);
|
|
3847
3873
|
scope.stop();
|
|
3848
3874
|
if (job) {
|
|
@@ -3855,7 +3881,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3855
3881
|
}, parentSuspense);
|
|
3856
3882
|
};
|
|
3857
3883
|
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
3858
|
-
for (let i
|
|
3884
|
+
for (let i = start; i < children.length; i++) unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
|
|
3859
3885
|
};
|
|
3860
3886
|
const getNextHostNode = (vnode) => {
|
|
3861
3887
|
if (vnode.shapeFlag & 6) return getNextHostNode(vnode.component.subTree);
|
|
@@ -3885,7 +3911,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3885
3911
|
p: patch,
|
|
3886
3912
|
um: unmount,
|
|
3887
3913
|
m: move,
|
|
3888
|
-
r: remove
|
|
3914
|
+
r: remove,
|
|
3889
3915
|
mt: mountComponent,
|
|
3890
3916
|
mc: mountChildren,
|
|
3891
3917
|
pc: patchChildren,
|
|
@@ -3920,53 +3946,55 @@ function needTransition(parentSuspense, transition) {
|
|
|
3920
3946
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
3921
3947
|
const ch1 = n1.children;
|
|
3922
3948
|
const ch2 = n2.children;
|
|
3923
|
-
if (isArray$1(ch1) && isArray$1(ch2)) for (let i
|
|
3924
|
-
const c1 = ch1[i
|
|
3925
|
-
let c2 = ch2[i
|
|
3949
|
+
if (isArray$1(ch1) && isArray$1(ch2)) for (let i = 0; i < ch1.length; i++) {
|
|
3950
|
+
const c1 = ch1[i];
|
|
3951
|
+
let c2 = ch2[i];
|
|
3926
3952
|
if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
|
|
3927
3953
|
if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
|
|
3928
|
-
c2 = ch2[i
|
|
3954
|
+
c2 = ch2[i] = cloneIfMounted(ch2[i]);
|
|
3929
3955
|
c2.el = c1.el;
|
|
3930
3956
|
}
|
|
3931
3957
|
if (!shallow && c2.patchFlag !== -2) traverseStaticChildren(c1, c2);
|
|
3932
3958
|
}
|
|
3933
|
-
if (c2.type === Text)
|
|
3934
|
-
|
|
3959
|
+
if (c2.type === Text) {
|
|
3960
|
+
if (c2.patchFlag === -1) c2 = ch2[i] = cloneIfMounted(c2);
|
|
3961
|
+
c2.el = c1.el;
|
|
3962
|
+
}
|
|
3935
3963
|
if (c2.type === Comment && !c2.el) c2.el = c1.el;
|
|
3936
3964
|
}
|
|
3937
3965
|
}
|
|
3938
3966
|
function getSequence(arr) {
|
|
3939
|
-
const p
|
|
3967
|
+
const p = arr.slice();
|
|
3940
3968
|
const result = [0];
|
|
3941
|
-
let i
|
|
3969
|
+
let i, j, u, v, c;
|
|
3942
3970
|
const len = arr.length;
|
|
3943
|
-
for (i
|
|
3944
|
-
const arrI = arr[i
|
|
3971
|
+
for (i = 0; i < len; i++) {
|
|
3972
|
+
const arrI = arr[i];
|
|
3945
3973
|
if (arrI !== 0) {
|
|
3946
3974
|
j = result[result.length - 1];
|
|
3947
3975
|
if (arr[j] < arrI) {
|
|
3948
|
-
p
|
|
3949
|
-
result.push(i
|
|
3976
|
+
p[i] = j;
|
|
3977
|
+
result.push(i);
|
|
3950
3978
|
continue;
|
|
3951
3979
|
}
|
|
3952
|
-
u
|
|
3953
|
-
v
|
|
3954
|
-
while (u
|
|
3955
|
-
c
|
|
3956
|
-
if (arr[result[c
|
|
3957
|
-
else v
|
|
3980
|
+
u = 0;
|
|
3981
|
+
v = result.length - 1;
|
|
3982
|
+
while (u < v) {
|
|
3983
|
+
c = u + v >> 1;
|
|
3984
|
+
if (arr[result[c]] < arrI) u = c + 1;
|
|
3985
|
+
else v = c;
|
|
3958
3986
|
}
|
|
3959
|
-
if (arrI < arr[result[u
|
|
3960
|
-
if (u
|
|
3961
|
-
result[u
|
|
3987
|
+
if (arrI < arr[result[u]]) {
|
|
3988
|
+
if (u > 0) p[i] = result[u - 1];
|
|
3989
|
+
result[u] = i;
|
|
3962
3990
|
}
|
|
3963
3991
|
}
|
|
3964
3992
|
}
|
|
3965
|
-
u
|
|
3966
|
-
v
|
|
3967
|
-
while (u
|
|
3968
|
-
result[u
|
|
3969
|
-
v
|
|
3993
|
+
u = result.length;
|
|
3994
|
+
v = result[u - 1];
|
|
3995
|
+
while (u-- > 0) {
|
|
3996
|
+
result[u] = v;
|
|
3997
|
+
v = p[v];
|
|
3970
3998
|
}
|
|
3971
3999
|
return result;
|
|
3972
4000
|
}
|
|
@@ -3976,7 +4004,7 @@ function locateNonHydratedAsyncRoot(instance) {
|
|
|
3976
4004
|
else return locateNonHydratedAsyncRoot(subComponent);
|
|
3977
4005
|
}
|
|
3978
4006
|
function invalidateMount(hooks) {
|
|
3979
|
-
if (hooks) for (let i
|
|
4007
|
+
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 8;
|
|
3980
4008
|
}
|
|
3981
4009
|
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
3982
4010
|
if (anchorVnode.placeholder) return anchorVnode.placeholder;
|
|
@@ -4082,7 +4110,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
4082
4110
|
}
|
|
4083
4111
|
}
|
|
4084
4112
|
function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
|
|
4085
|
-
const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove
|
|
4113
|
+
const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
|
|
4086
4114
|
let parentSuspenseId;
|
|
4087
4115
|
const isSuspensible = isVNodeSuspensible(vnode);
|
|
4088
4116
|
if (isSuspensible) {
|
|
@@ -4191,7 +4219,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
4191
4219
|
setupRenderEffect(instance, vnode2, parentNode(hydratedEl || instance.subTree.el), hydratedEl ? null : next(instance.subTree), suspense, namespace, optimized2);
|
|
4192
4220
|
if (placeholder) {
|
|
4193
4221
|
vnode2.placeholder = null;
|
|
4194
|
-
remove
|
|
4222
|
+
remove(placeholder);
|
|
4195
4223
|
}
|
|
4196
4224
|
updateHOCHostEl(instance, vnode2.el);
|
|
4197
4225
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
@@ -4217,25 +4245,25 @@ function normalizeSuspenseChildren(vnode) {
|
|
|
4217
4245
|
vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);
|
|
4218
4246
|
vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
|
|
4219
4247
|
}
|
|
4220
|
-
function normalizeSuspenseSlot(s
|
|
4248
|
+
function normalizeSuspenseSlot(s) {
|
|
4221
4249
|
let block;
|
|
4222
|
-
if (isFunction(s
|
|
4223
|
-
const trackBlock = isBlockTreeEnabled && s
|
|
4250
|
+
if (isFunction(s)) {
|
|
4251
|
+
const trackBlock = isBlockTreeEnabled && s._c;
|
|
4224
4252
|
if (trackBlock) {
|
|
4225
|
-
s
|
|
4253
|
+
s._d = false;
|
|
4226
4254
|
openBlock();
|
|
4227
4255
|
}
|
|
4228
|
-
s
|
|
4256
|
+
s = s();
|
|
4229
4257
|
if (trackBlock) {
|
|
4230
|
-
s
|
|
4258
|
+
s._d = true;
|
|
4231
4259
|
block = currentBlock;
|
|
4232
4260
|
closeBlock();
|
|
4233
4261
|
}
|
|
4234
4262
|
}
|
|
4235
|
-
if (isArray$1(s
|
|
4236
|
-
s
|
|
4237
|
-
if (block && !s
|
|
4238
|
-
return s
|
|
4263
|
+
if (isArray$1(s)) s = filterSingleRoot(s);
|
|
4264
|
+
s = normalizeVNode(s);
|
|
4265
|
+
if (block && !s.dynamicChildren) s.dynamicChildren = block.filter((c) => c !== s);
|
|
4266
|
+
return s;
|
|
4239
4267
|
}
|
|
4240
4268
|
function queueEffectWithSuspense(fn, suspense) {
|
|
4241
4269
|
if (suspense && suspense.pendingBranch) if (isArray$1(fn)) suspense.effects.push(...fn);
|
|
@@ -4297,14 +4325,14 @@ function isSameVNodeType(n1, n2) {
|
|
|
4297
4325
|
return n1.type === n2.type && n1.key === n2.key;
|
|
4298
4326
|
}
|
|
4299
4327
|
var normalizeKey = ({ key }) => key != null ? key : null;
|
|
4300
|
-
var normalizeRef = ({ ref
|
|
4301
|
-
if (typeof ref
|
|
4302
|
-
return ref
|
|
4328
|
+
var normalizeRef = ({ ref, ref_key, ref_for }) => {
|
|
4329
|
+
if (typeof ref === "number") ref = "" + ref;
|
|
4330
|
+
return ref != null ? isString(ref) || /* @__PURE__ */ isRef(ref) || isFunction(ref) ? {
|
|
4303
4331
|
i: currentRenderingInstance,
|
|
4304
|
-
r: ref
|
|
4332
|
+
r: ref,
|
|
4305
4333
|
k: ref_key,
|
|
4306
4334
|
f: !!ref_for
|
|
4307
|
-
} : ref
|
|
4335
|
+
} : ref : null;
|
|
4308
4336
|
};
|
|
4309
4337
|
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
4310
4338
|
const vnode = {
|
|
@@ -4360,7 +4388,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
4360
4388
|
let { class: klass, style } = props;
|
|
4361
4389
|
if (klass && !isString(klass)) props.class = normalizeClass(klass);
|
|
4362
4390
|
if (isObject(style)) {
|
|
4363
|
-
if (isProxy(style) && !isArray$1(style)) style = extend({}, style);
|
|
4391
|
+
if (/* @__PURE__ */ isProxy(style) && !isArray$1(style)) style = extend({}, style);
|
|
4364
4392
|
props.style = normalizeStyle(style);
|
|
4365
4393
|
}
|
|
4366
4394
|
}
|
|
@@ -4369,10 +4397,10 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
4369
4397
|
}
|
|
4370
4398
|
function guardReactiveProps(props) {
|
|
4371
4399
|
if (!props) return null;
|
|
4372
|
-
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
4400
|
+
return /* @__PURE__ */ isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
4373
4401
|
}
|
|
4374
4402
|
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
4375
|
-
const { props, ref
|
|
4403
|
+
const { props, ref, patchFlag, children, transition } = vnode;
|
|
4376
4404
|
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
|
|
4377
4405
|
const cloned = {
|
|
4378
4406
|
__v_isVNode: true,
|
|
@@ -4380,7 +4408,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
4380
4408
|
type: vnode.type,
|
|
4381
4409
|
props: mergedProps,
|
|
4382
4410
|
key: mergedProps && normalizeKey(mergedProps),
|
|
4383
|
-
ref: extraProps && extraProps.ref ? mergeRef && ref
|
|
4411
|
+
ref: extraProps && extraProps.ref ? mergeRef && ref ? isArray$1(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref,
|
|
4384
4412
|
scopeId: vnode.scopeId,
|
|
4385
4413
|
slotScopeIds: vnode.slotScopeIds,
|
|
4386
4414
|
children,
|
|
@@ -4464,8 +4492,8 @@ function normalizeChildren(vnode, children) {
|
|
|
4464
4492
|
}
|
|
4465
4493
|
function mergeProps(...args) {
|
|
4466
4494
|
const ret = {};
|
|
4467
|
-
for (let i
|
|
4468
|
-
const toMerge = args[i
|
|
4495
|
+
for (let i = 0; i < args.length; i++) {
|
|
4496
|
+
const toMerge = args[i];
|
|
4469
4497
|
for (const key in toMerge) if (key === "class") {
|
|
4470
4498
|
if (ret.class !== toMerge.class) ret.class = normalizeClass([ret.class, toMerge.class]);
|
|
4471
4499
|
} else if (key === "style") ret.style = normalizeStyle([ret.style, toMerge.style]);
|
|
@@ -4560,18 +4588,18 @@ var getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
|
4560
4588
|
var internalSetCurrentInstance;
|
|
4561
4589
|
var setInSSRSetupState;
|
|
4562
4590
|
{
|
|
4563
|
-
const g
|
|
4591
|
+
const g = getGlobalThis();
|
|
4564
4592
|
const registerGlobalSetter = (key, setter) => {
|
|
4565
4593
|
let setters;
|
|
4566
|
-
if (!(setters = g
|
|
4594
|
+
if (!(setters = g[key])) setters = g[key] = [];
|
|
4567
4595
|
setters.push(setter);
|
|
4568
|
-
return (v
|
|
4569
|
-
if (setters.length > 1) setters.forEach((set) => set(v
|
|
4570
|
-
else setters[0](v
|
|
4596
|
+
return (v) => {
|
|
4597
|
+
if (setters.length > 1) setters.forEach((set) => set(v));
|
|
4598
|
+
else setters[0](v);
|
|
4571
4599
|
};
|
|
4572
4600
|
};
|
|
4573
|
-
internalSetCurrentInstance = registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`, (v
|
|
4574
|
-
setInSSRSetupState = registerGlobalSetter(`__VUE_SSR_SETTERS__`, (v
|
|
4601
|
+
internalSetCurrentInstance = registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`, (v) => currentInstance = v);
|
|
4602
|
+
setInSSRSetupState = registerGlobalSetter(`__VUE_SSR_SETTERS__`, (v) => isInSSRComponentSetup = v);
|
|
4575
4603
|
}
|
|
4576
4604
|
var setCurrentInstance = (instance) => {
|
|
4577
4605
|
const prev = currentInstance;
|
|
@@ -4695,28 +4723,28 @@ function isClassComponent(value) {
|
|
|
4695
4723
|
return isFunction(value) && "__vccOpts" in value;
|
|
4696
4724
|
}
|
|
4697
4725
|
var computed = (getterOrOptions, debugOptions) => {
|
|
4698
|
-
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
4726
|
+
return /* @__PURE__ */ computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
4699
4727
|
};
|
|
4700
4728
|
function h$2(type, propsOrChildren, children) {
|
|
4701
4729
|
try {
|
|
4702
4730
|
setBlockTracking(-1);
|
|
4703
|
-
const l
|
|
4704
|
-
if (l
|
|
4731
|
+
const l = arguments.length;
|
|
4732
|
+
if (l === 2) if (isObject(propsOrChildren) && !isArray$1(propsOrChildren)) {
|
|
4705
4733
|
if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
|
|
4706
4734
|
return createVNode(type, propsOrChildren);
|
|
4707
4735
|
} else return createVNode(type, null, propsOrChildren);
|
|
4708
4736
|
else {
|
|
4709
|
-
if (l
|
|
4710
|
-
else if (l
|
|
4737
|
+
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
4738
|
+
else if (l === 3 && isVNode(children)) children = [children];
|
|
4711
4739
|
return createVNode(type, propsOrChildren, children);
|
|
4712
4740
|
}
|
|
4713
4741
|
} finally {
|
|
4714
4742
|
setBlockTracking(1);
|
|
4715
4743
|
}
|
|
4716
4744
|
}
|
|
4717
|
-
var version = "3.5.
|
|
4745
|
+
var version = "3.5.28";
|
|
4718
4746
|
/**
|
|
4719
|
-
* @vue/runtime-dom v3.5.
|
|
4747
|
+
* @vue/runtime-dom v3.5.28
|
|
4720
4748
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4721
4749
|
* @license MIT
|
|
4722
4750
|
**/
|
|
@@ -4840,12 +4868,12 @@ function resolveTransitionProps(rawProps) {
|
|
|
4840
4868
|
const makeEnterHook = (isAppear) => {
|
|
4841
4869
|
return (el, done) => {
|
|
4842
4870
|
const hook = isAppear ? onAppear : onEnter;
|
|
4843
|
-
const resolve
|
|
4844
|
-
callHook(hook, [el, resolve
|
|
4871
|
+
const resolve = () => finishEnter(el, isAppear, done);
|
|
4872
|
+
callHook(hook, [el, resolve]);
|
|
4845
4873
|
nextFrame(() => {
|
|
4846
4874
|
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
4847
4875
|
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
4848
|
-
if (!hasExplicitCallback(hook)) whenTransitionEnds(el, type, enterDuration, resolve
|
|
4876
|
+
if (!hasExplicitCallback(hook)) whenTransitionEnds(el, type, enterDuration, resolve);
|
|
4849
4877
|
});
|
|
4850
4878
|
};
|
|
4851
4879
|
};
|
|
@@ -4864,7 +4892,7 @@ function resolveTransitionProps(rawProps) {
|
|
|
4864
4892
|
onAppear: makeEnterHook(true),
|
|
4865
4893
|
onLeave(el, done) {
|
|
4866
4894
|
el._isLeaving = true;
|
|
4867
|
-
const resolve
|
|
4895
|
+
const resolve = () => finishLeave(el, done);
|
|
4868
4896
|
addTransitionClass(el, leaveFromClass);
|
|
4869
4897
|
if (!el._enterCancelled) {
|
|
4870
4898
|
forceReflow(el);
|
|
@@ -4877,9 +4905,9 @@ function resolveTransitionProps(rawProps) {
|
|
|
4877
4905
|
if (!el._isLeaving) return;
|
|
4878
4906
|
removeTransitionClass(el, leaveFromClass);
|
|
4879
4907
|
addTransitionClass(el, leaveToClass);
|
|
4880
|
-
if (!hasExplicitCallback(onLeave)) whenTransitionEnds(el, type, leaveDuration, resolve
|
|
4908
|
+
if (!hasExplicitCallback(onLeave)) whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
4881
4909
|
});
|
|
4882
|
-
callHook(onLeave, [el, resolve
|
|
4910
|
+
callHook(onLeave, [el, resolve]);
|
|
4883
4911
|
},
|
|
4884
4912
|
onEnterCancelled(el) {
|
|
4885
4913
|
finishEnter(el, false, void 0, true);
|
|
@@ -4899,19 +4927,19 @@ function normalizeDuration(duration) {
|
|
|
4899
4927
|
if (duration == null) return null;
|
|
4900
4928
|
else if (isObject(duration)) return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
4901
4929
|
else {
|
|
4902
|
-
const n
|
|
4903
|
-
return [n
|
|
4930
|
+
const n = NumberOf(duration);
|
|
4931
|
+
return [n, n];
|
|
4904
4932
|
}
|
|
4905
4933
|
}
|
|
4906
4934
|
function NumberOf(val) {
|
|
4907
4935
|
return toNumber(val);
|
|
4908
4936
|
}
|
|
4909
4937
|
function addTransitionClass(el, cls) {
|
|
4910
|
-
cls.split(/\s+/).forEach((c
|
|
4938
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
4911
4939
|
(el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
|
|
4912
4940
|
}
|
|
4913
4941
|
function removeTransitionClass(el, cls) {
|
|
4914
|
-
cls.split(/\s+/).forEach((c
|
|
4942
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
4915
4943
|
const _vtc = el[vtcKey];
|
|
4916
4944
|
if (_vtc) {
|
|
4917
4945
|
_vtc.delete(cls);
|
|
@@ -4924,14 +4952,14 @@ function nextFrame(cb) {
|
|
|
4924
4952
|
});
|
|
4925
4953
|
}
|
|
4926
4954
|
var endId = 0;
|
|
4927
|
-
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve
|
|
4955
|
+
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
4928
4956
|
const id = el._endId = ++endId;
|
|
4929
4957
|
const resolveIfNotStale = () => {
|
|
4930
|
-
if (id === el._endId) resolve
|
|
4958
|
+
if (id === el._endId) resolve();
|
|
4931
4959
|
};
|
|
4932
4960
|
if (explicitTimeout != null) return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
4933
4961
|
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
4934
|
-
if (!type) return resolve
|
|
4962
|
+
if (!type) return resolve();
|
|
4935
4963
|
const endEvent = type + "end";
|
|
4936
4964
|
let ended = 0;
|
|
4937
4965
|
const end = () => {
|
|
@@ -4985,11 +5013,11 @@ function getTransitionInfo(el, expectedType) {
|
|
|
4985
5013
|
}
|
|
4986
5014
|
function getTimeout(delays, durations) {
|
|
4987
5015
|
while (delays.length < durations.length) delays = delays.concat(delays);
|
|
4988
|
-
return Math.max(...durations.map((d
|
|
5016
|
+
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
4989
5017
|
}
|
|
4990
|
-
function toMs(s
|
|
4991
|
-
if (s
|
|
4992
|
-
return Number(s
|
|
5018
|
+
function toMs(s) {
|
|
5019
|
+
if (s === "auto") return 0;
|
|
5020
|
+
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
4993
5021
|
}
|
|
4994
5022
|
function forceReflow(el) {
|
|
4995
5023
|
return (el ? el.ownerDocument : document).body.offsetHeight;
|
|
@@ -5035,7 +5063,7 @@ function patchStyle(el, prev, next) {
|
|
|
5035
5063
|
}
|
|
5036
5064
|
var importantRE = /\s*!important$/;
|
|
5037
5065
|
function setStyle(style, name, val) {
|
|
5038
|
-
if (isArray$1(val)) val.forEach((v
|
|
5066
|
+
if (isArray$1(val)) val.forEach((v) => setStyle(style, name, v));
|
|
5039
5067
|
else {
|
|
5040
5068
|
if (val == null) val = "";
|
|
5041
5069
|
if (name.startsWith("--")) style.setProperty(name, val);
|
|
@@ -5058,8 +5086,8 @@ function autoPrefix(style, rawName) {
|
|
|
5058
5086
|
let name = camelize(rawName);
|
|
5059
5087
|
if (name !== "filter" && name in style) return prefixCache[rawName] = name;
|
|
5060
5088
|
name = capitalize(name);
|
|
5061
|
-
for (let i
|
|
5062
|
-
const prefixed = prefixes[i
|
|
5089
|
+
for (let i = 0; i < prefixes.length; i++) {
|
|
5090
|
+
const prefixed = prefixes[i] + name;
|
|
5063
5091
|
if (prefixed in style) return prefixCache[rawName] = prefixed;
|
|
5064
5092
|
}
|
|
5065
5093
|
return rawName;
|
|
@@ -5127,10 +5155,10 @@ function parseName(name) {
|
|
|
5127
5155
|
let options;
|
|
5128
5156
|
if (optionsModifierRE.test(name)) {
|
|
5129
5157
|
options = {};
|
|
5130
|
-
let m
|
|
5131
|
-
while (m
|
|
5132
|
-
name = name.slice(0, name.length - m
|
|
5133
|
-
options[m
|
|
5158
|
+
let m;
|
|
5159
|
+
while (m = name.match(optionsModifierRE)) {
|
|
5160
|
+
name = name.slice(0, name.length - m[0].length);
|
|
5161
|
+
options[m[0].toLowerCase()] = true;
|
|
5134
5162
|
}
|
|
5135
5163
|
}
|
|
5136
5164
|
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
@@ -5248,28 +5276,28 @@ var vModelText = {
|
|
|
5248
5276
|
};
|
|
5249
5277
|
var vModelCheckbox = {
|
|
5250
5278
|
deep: true,
|
|
5251
|
-
created(el, _
|
|
5279
|
+
created(el, _, vnode) {
|
|
5252
5280
|
el[assignKey] = getModelAssigner(vnode);
|
|
5253
5281
|
addEventListener(el, "change", () => {
|
|
5254
5282
|
const modelValue = el._modelValue;
|
|
5255
5283
|
const elementValue = getValue(el);
|
|
5256
5284
|
const checked = el.checked;
|
|
5257
|
-
const assign
|
|
5285
|
+
const assign = el[assignKey];
|
|
5258
5286
|
if (isArray$1(modelValue)) {
|
|
5259
5287
|
const index = looseIndexOf(modelValue, elementValue);
|
|
5260
5288
|
const found = index !== -1;
|
|
5261
|
-
if (checked && !found) assign
|
|
5289
|
+
if (checked && !found) assign(modelValue.concat(elementValue));
|
|
5262
5290
|
else if (!checked && found) {
|
|
5263
5291
|
const filtered = [...modelValue];
|
|
5264
5292
|
filtered.splice(index, 1);
|
|
5265
|
-
assign
|
|
5293
|
+
assign(filtered);
|
|
5266
5294
|
}
|
|
5267
5295
|
} else if (isSet(modelValue)) {
|
|
5268
5296
|
const cloned = new Set(modelValue);
|
|
5269
5297
|
if (checked) cloned.add(elementValue);
|
|
5270
5298
|
else cloned.delete(elementValue);
|
|
5271
|
-
assign
|
|
5272
|
-
} else assign
|
|
5299
|
+
assign(cloned);
|
|
5300
|
+
} else assign(getCheckboxValue(el, checked));
|
|
5273
5301
|
});
|
|
5274
5302
|
},
|
|
5275
5303
|
mounted: setChecked,
|
|
@@ -5307,7 +5335,7 @@ var vModelSelect = {
|
|
|
5307
5335
|
created(el, { value, modifiers: { number } }, vnode) {
|
|
5308
5336
|
const isSetModel = isSet(value);
|
|
5309
5337
|
addEventListener(el, "change", () => {
|
|
5310
|
-
const selectedVal = Array.prototype.filter.call(el.options, (o
|
|
5338
|
+
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
5311
5339
|
el[assignKey](el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]);
|
|
5312
5340
|
el._assigning = true;
|
|
5313
5341
|
nextTick(() => {
|
|
@@ -5330,16 +5358,16 @@ function setSelected(el, value) {
|
|
|
5330
5358
|
const isMultiple = el.multiple;
|
|
5331
5359
|
const isArrayValue = isArray$1(value);
|
|
5332
5360
|
if (isMultiple && !isArrayValue && !isSet(value)) return;
|
|
5333
|
-
for (let i
|
|
5334
|
-
const option = el.options[i
|
|
5361
|
+
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
5362
|
+
const option = el.options[i];
|
|
5335
5363
|
const optionValue = getValue(option);
|
|
5336
5364
|
if (isMultiple) if (isArrayValue) {
|
|
5337
5365
|
const optionType = typeof optionValue;
|
|
5338
|
-
if (optionType === "string" || optionType === "number") option.selected = value.some((v
|
|
5366
|
+
if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
|
|
5339
5367
|
else option.selected = looseIndexOf(value, optionValue) > -1;
|
|
5340
5368
|
} else option.selected = value.has(optionValue);
|
|
5341
5369
|
else if (looseEqual(getValue(option), value)) {
|
|
5342
|
-
if (el.selectedIndex !== i
|
|
5370
|
+
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
5343
5371
|
return;
|
|
5344
5372
|
}
|
|
5345
5373
|
}
|
|
@@ -5396,7 +5424,7 @@ var withKeys = (fn, modifiers) => {
|
|
|
5396
5424
|
return cache[cacheKey] || (cache[cacheKey] = ((event) => {
|
|
5397
5425
|
if (!("key" in event)) return;
|
|
5398
5426
|
const eventKey = hyphenate(event.key);
|
|
5399
|
-
if (modifiers.some((k
|
|
5427
|
+
if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) return fn(event);
|
|
5400
5428
|
}));
|
|
5401
5429
|
};
|
|
5402
5430
|
var rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -5405,12 +5433,12 @@ function ensureRenderer() {
|
|
|
5405
5433
|
return renderer || (renderer = createRenderer(rendererOptions));
|
|
5406
5434
|
}
|
|
5407
5435
|
var createApp = ((...args) => {
|
|
5408
|
-
const app
|
|
5409
|
-
const { mount } = app
|
|
5410
|
-
app
|
|
5436
|
+
const app = ensureRenderer().createApp(...args);
|
|
5437
|
+
const { mount } = app;
|
|
5438
|
+
app.mount = (containerOrSelector) => {
|
|
5411
5439
|
const container = normalizeContainer(containerOrSelector);
|
|
5412
5440
|
if (!container) return;
|
|
5413
|
-
const component = app
|
|
5441
|
+
const component = app._component;
|
|
5414
5442
|
if (!isFunction(component) && !component.render && !component.template) component.template = container.innerHTML;
|
|
5415
5443
|
if (container.nodeType === 1) container.textContent = "";
|
|
5416
5444
|
const proxy = mount(container, false, resolveRootNamespace(container));
|
|
@@ -5420,7 +5448,7 @@ var createApp = ((...args) => {
|
|
|
5420
5448
|
}
|
|
5421
5449
|
return proxy;
|
|
5422
5450
|
};
|
|
5423
|
-
return app
|
|
5451
|
+
return app;
|
|
5424
5452
|
});
|
|
5425
5453
|
function resolveRootNamespace(container) {
|
|
5426
5454
|
if (container instanceof SVGElement) return "svg";
|
|
@@ -5540,16 +5568,16 @@ function getPaddingObject(padding) {
|
|
|
5540
5568
|
};
|
|
5541
5569
|
}
|
|
5542
5570
|
function rectToClientRect(rect) {
|
|
5543
|
-
const { x
|
|
5571
|
+
const { x, y, width, height } = rect;
|
|
5544
5572
|
return {
|
|
5545
5573
|
width,
|
|
5546
5574
|
height,
|
|
5547
|
-
top: y
|
|
5548
|
-
left: x
|
|
5549
|
-
right: x
|
|
5550
|
-
bottom: y
|
|
5551
|
-
x
|
|
5552
|
-
y
|
|
5575
|
+
top: y,
|
|
5576
|
+
left: x,
|
|
5577
|
+
right: x + width,
|
|
5578
|
+
bottom: y + height,
|
|
5579
|
+
x,
|
|
5580
|
+
y
|
|
5553
5581
|
};
|
|
5554
5582
|
}
|
|
5555
5583
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
@@ -5612,15 +5640,15 @@ var computePosition = async (reference, floating, config) => {
|
|
|
5612
5640
|
floating,
|
|
5613
5641
|
strategy
|
|
5614
5642
|
});
|
|
5615
|
-
let { x
|
|
5643
|
+
let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
|
|
5616
5644
|
let statefulPlacement = placement;
|
|
5617
5645
|
let middlewareData = {};
|
|
5618
5646
|
let resetCount = 0;
|
|
5619
|
-
for (let i
|
|
5620
|
-
const { name, fn } = validMiddleware[i
|
|
5647
|
+
for (let i = 0; i < validMiddleware.length; i++) {
|
|
5648
|
+
const { name, fn } = validMiddleware[i];
|
|
5621
5649
|
const { x: nextX, y: nextY, data, reset } = await fn({
|
|
5622
|
-
x
|
|
5623
|
-
y
|
|
5650
|
+
x,
|
|
5651
|
+
y,
|
|
5624
5652
|
initialPlacement: placement,
|
|
5625
5653
|
placement: statefulPlacement,
|
|
5626
5654
|
strategy,
|
|
@@ -5632,8 +5660,8 @@ var computePosition = async (reference, floating, config) => {
|
|
|
5632
5660
|
floating
|
|
5633
5661
|
}
|
|
5634
5662
|
});
|
|
5635
|
-
x
|
|
5636
|
-
y
|
|
5663
|
+
x = nextX != null ? nextX : x;
|
|
5664
|
+
y = nextY != null ? nextY : y;
|
|
5637
5665
|
middlewareData = {
|
|
5638
5666
|
...middlewareData,
|
|
5639
5667
|
[name]: {
|
|
@@ -5650,14 +5678,14 @@ var computePosition = async (reference, floating, config) => {
|
|
|
5650
5678
|
floating,
|
|
5651
5679
|
strategy
|
|
5652
5680
|
}) : reset.rects;
|
|
5653
|
-
({x
|
|
5681
|
+
({x, y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
5654
5682
|
}
|
|
5655
|
-
i
|
|
5683
|
+
i = -1;
|
|
5656
5684
|
}
|
|
5657
5685
|
}
|
|
5658
5686
|
return {
|
|
5659
|
-
x
|
|
5660
|
-
y
|
|
5687
|
+
x,
|
|
5688
|
+
y,
|
|
5661
5689
|
placement: statefulPlacement,
|
|
5662
5690
|
strategy,
|
|
5663
5691
|
middlewareData
|
|
@@ -5666,7 +5694,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
5666
5694
|
async function detectOverflow(state, options) {
|
|
5667
5695
|
var _await$platform$isEle;
|
|
5668
5696
|
if (options === void 0) options = {};
|
|
5669
|
-
const { x
|
|
5697
|
+
const { x, y, platform, rects, elements, strategy } = state;
|
|
5670
5698
|
const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state);
|
|
5671
5699
|
const paddingObject = getPaddingObject(padding);
|
|
5672
5700
|
const element = elements[altBoundary ? elementContext === "floating" ? "reference" : "floating" : elementContext];
|
|
@@ -5677,8 +5705,8 @@ async function detectOverflow(state, options) {
|
|
|
5677
5705
|
strategy
|
|
5678
5706
|
}));
|
|
5679
5707
|
const rect = elementContext === "floating" ? {
|
|
5680
|
-
x
|
|
5681
|
-
y
|
|
5708
|
+
x,
|
|
5709
|
+
y,
|
|
5682
5710
|
width: rects.floating.width,
|
|
5683
5711
|
height: rects.floating.height
|
|
5684
5712
|
} : rects.reference;
|
|
@@ -5707,13 +5735,13 @@ var arrow = (options) => ({
|
|
|
5707
5735
|
name: "arrow",
|
|
5708
5736
|
options,
|
|
5709
5737
|
async fn(state) {
|
|
5710
|
-
const { x
|
|
5738
|
+
const { x, y, placement, rects, platform, elements, middlewareData } = state;
|
|
5711
5739
|
const { element, padding = 0 } = evaluate(options, state) || {};
|
|
5712
5740
|
if (element == null) return {};
|
|
5713
5741
|
const paddingObject = getPaddingObject(padding);
|
|
5714
5742
|
const coords = {
|
|
5715
|
-
x
|
|
5716
|
-
y
|
|
5743
|
+
x,
|
|
5744
|
+
y
|
|
5717
5745
|
};
|
|
5718
5746
|
const axis = getAlignmentAxis(placement);
|
|
5719
5747
|
const length = getAxisLength(axis);
|
|
@@ -5732,16 +5760,16 @@ var arrow = (options) => ({
|
|
|
5732
5760
|
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
5733
5761
|
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
5734
5762
|
const min$1 = minPadding;
|
|
5735
|
-
const max
|
|
5763
|
+
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
5736
5764
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
5737
|
-
const offset
|
|
5738
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset
|
|
5739
|
-
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max
|
|
5765
|
+
const offset = clamp(min$1, center, max);
|
|
5766
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
5767
|
+
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
|
|
5740
5768
|
return {
|
|
5741
5769
|
[axis]: coords[axis] + alignmentOffset,
|
|
5742
5770
|
data: {
|
|
5743
|
-
[axis]: offset
|
|
5744
|
-
centerOffset: center - offset
|
|
5771
|
+
[axis]: offset,
|
|
5772
|
+
centerOffset: center - offset - alignmentOffset,
|
|
5745
5773
|
...shouldAddOffset && { alignmentOffset }
|
|
5746
5774
|
},
|
|
5747
5775
|
reset: shouldAddOffset
|
|
@@ -5787,15 +5815,15 @@ var autoPlacement = function(options) {
|
|
|
5787
5815
|
},
|
|
5788
5816
|
reset: { placement: nextPlacement }
|
|
5789
5817
|
};
|
|
5790
|
-
const placementsSortedByMostSpace = allOverflows.map((d
|
|
5791
|
-
const alignment
|
|
5818
|
+
const placementsSortedByMostSpace = allOverflows.map((d) => {
|
|
5819
|
+
const alignment = getAlignment(d.placement);
|
|
5792
5820
|
return [
|
|
5793
|
-
d
|
|
5794
|
-
alignment
|
|
5795
|
-
d
|
|
5821
|
+
d.placement,
|
|
5822
|
+
alignment && crossAxis ? d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) : d.overflows[0],
|
|
5823
|
+
d.overflows
|
|
5796
5824
|
];
|
|
5797
|
-
}).sort((a
|
|
5798
|
-
const resetPlacement = ((_placementsThatFitOnE = placementsSortedByMostSpace.filter((d
|
|
5825
|
+
}).sort((a, b) => a[1] - b[1]);
|
|
5826
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsSortedByMostSpace.filter((d) => d[2].slice(0, getAlignment(d[0]) ? 2 : 3).every((v) => v <= 0))[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
5799
5827
|
if (resetPlacement !== placement) return {
|
|
5800
5828
|
data: {
|
|
5801
5829
|
index: currentIndex + 1,
|
|
@@ -5824,25 +5852,25 @@ var flip = function(options) {
|
|
|
5824
5852
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
5825
5853
|
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
|
|
5826
5854
|
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
5827
|
-
const placements
|
|
5855
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
|
5828
5856
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
5829
5857
|
const overflows = [];
|
|
5830
5858
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
5831
5859
|
if (checkMainAxis) overflows.push(overflow[side]);
|
|
5832
5860
|
if (checkCrossAxis) {
|
|
5833
|
-
const sides
|
|
5834
|
-
overflows.push(overflow[sides
|
|
5861
|
+
const sides = getAlignmentSides(placement, rects, rtl);
|
|
5862
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
5835
5863
|
}
|
|
5836
5864
|
overflowsData = [...overflowsData, {
|
|
5837
5865
|
placement,
|
|
5838
5866
|
overflows
|
|
5839
5867
|
}];
|
|
5840
|
-
if (!overflows.every((side
|
|
5868
|
+
if (!overflows.every((side) => side <= 0)) {
|
|
5841
5869
|
var _middlewareData$flip2, _overflowsData$filter;
|
|
5842
5870
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
5843
|
-
const nextPlacement = placements
|
|
5871
|
+
const nextPlacement = placements[nextIndex];
|
|
5844
5872
|
if (nextPlacement) {
|
|
5845
|
-
if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d
|
|
5873
|
+
if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d) => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) return {
|
|
5846
5874
|
data: {
|
|
5847
5875
|
index: nextIndex,
|
|
5848
5876
|
overflows: overflowsData
|
|
@@ -5850,18 +5878,18 @@ var flip = function(options) {
|
|
|
5850
5878
|
reset: { placement: nextPlacement }
|
|
5851
5879
|
};
|
|
5852
5880
|
}
|
|
5853
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d
|
|
5881
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
5854
5882
|
if (!resetPlacement) switch (fallbackStrategy) {
|
|
5855
5883
|
case "bestFit": {
|
|
5856
5884
|
var _overflowsData$filter2;
|
|
5857
|
-
const placement
|
|
5885
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter((d) => {
|
|
5858
5886
|
if (hasFallbackAxisSideDirection) {
|
|
5859
|
-
const currentSideAxis = getSideAxis(d
|
|
5887
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
5860
5888
|
return currentSideAxis === initialSideAxis || currentSideAxis === "y";
|
|
5861
5889
|
}
|
|
5862
5890
|
return true;
|
|
5863
|
-
}).map((d
|
|
5864
|
-
if (placement
|
|
5891
|
+
}).map((d) => [d.placement, d.overflows.filter((overflow) => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
5892
|
+
if (placement) resetPlacement = placement;
|
|
5865
5893
|
break;
|
|
5866
5894
|
}
|
|
5867
5895
|
case "initialPlacement":
|
|
@@ -5909,12 +5937,12 @@ var offset = function(options) {
|
|
|
5909
5937
|
options,
|
|
5910
5938
|
async fn(state) {
|
|
5911
5939
|
var _middlewareData$offse, _middlewareData$arrow;
|
|
5912
|
-
const { x
|
|
5940
|
+
const { x, y, placement, middlewareData } = state;
|
|
5913
5941
|
const diffCoords = await convertValueToCoords(state, options);
|
|
5914
5942
|
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
|
|
5915
5943
|
return {
|
|
5916
|
-
x: x
|
|
5917
|
-
y: y
|
|
5944
|
+
x: x + diffCoords.x,
|
|
5945
|
+
y: y + diffCoords.y,
|
|
5918
5946
|
data: {
|
|
5919
5947
|
...diffCoords,
|
|
5920
5948
|
placement
|
|
@@ -5929,17 +5957,17 @@ var shift = function(options) {
|
|
|
5929
5957
|
name: "shift",
|
|
5930
5958
|
options,
|
|
5931
5959
|
async fn(state) {
|
|
5932
|
-
const { x
|
|
5960
|
+
const { x, y, placement } = state;
|
|
5933
5961
|
const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => {
|
|
5934
|
-
let { x
|
|
5962
|
+
let { x, y } = _ref;
|
|
5935
5963
|
return {
|
|
5936
|
-
x
|
|
5937
|
-
y
|
|
5964
|
+
x,
|
|
5965
|
+
y
|
|
5938
5966
|
};
|
|
5939
5967
|
} }, ...detectOverflowOptions } = evaluate(options, state);
|
|
5940
5968
|
const coords = {
|
|
5941
|
-
x
|
|
5942
|
-
y
|
|
5969
|
+
x,
|
|
5970
|
+
y
|
|
5943
5971
|
};
|
|
5944
5972
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
5945
5973
|
const crossAxis = getSideAxis(getSide(placement));
|
|
@@ -5949,16 +5977,16 @@ var shift = function(options) {
|
|
|
5949
5977
|
if (checkMainAxis) {
|
|
5950
5978
|
const minSide = mainAxis === "y" ? "top" : "left";
|
|
5951
5979
|
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
5952
|
-
const min
|
|
5953
|
-
const max
|
|
5954
|
-
mainAxisCoord = clamp(min
|
|
5980
|
+
const min = mainAxisCoord + overflow[minSide];
|
|
5981
|
+
const max = mainAxisCoord - overflow[maxSide];
|
|
5982
|
+
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
5955
5983
|
}
|
|
5956
5984
|
if (checkCrossAxis) {
|
|
5957
5985
|
const minSide = crossAxis === "y" ? "top" : "left";
|
|
5958
5986
|
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
5959
|
-
const min
|
|
5960
|
-
const max
|
|
5961
|
-
crossAxisCoord = clamp(min
|
|
5987
|
+
const min = crossAxisCoord + overflow[minSide];
|
|
5988
|
+
const max = crossAxisCoord - overflow[maxSide];
|
|
5989
|
+
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
5962
5990
|
}
|
|
5963
5991
|
const limitedCoords = limiter.fn({
|
|
5964
5992
|
...state,
|
|
@@ -5968,8 +5996,8 @@ var shift = function(options) {
|
|
|
5968
5996
|
return {
|
|
5969
5997
|
...limitedCoords,
|
|
5970
5998
|
data: {
|
|
5971
|
-
x: limitedCoords.x - x
|
|
5972
|
-
y: limitedCoords.y - y
|
|
5999
|
+
x: limitedCoords.x - x,
|
|
6000
|
+
y: limitedCoords.y - y,
|
|
5973
6001
|
enabled: {
|
|
5974
6002
|
[mainAxis]: checkMainAxis,
|
|
5975
6003
|
[crossAxis]: checkCrossAxis
|
|
@@ -5987,7 +6015,7 @@ var size = function(options) {
|
|
|
5987
6015
|
async fn(state) {
|
|
5988
6016
|
var _state$middlewareData, _state$middlewareData2;
|
|
5989
6017
|
const { placement, rects, platform, elements } = state;
|
|
5990
|
-
const { apply
|
|
6018
|
+
const { apply = () => {}, ...detectOverflowOptions } = evaluate(options, state);
|
|
5991
6019
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
5992
6020
|
const side = getSide(placement);
|
|
5993
6021
|
const alignment = getAlignment(placement);
|
|
@@ -6019,7 +6047,7 @@ var size = function(options) {
|
|
|
6019
6047
|
if (isYAxis) availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
6020
6048
|
else availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
6021
6049
|
}
|
|
6022
|
-
await apply
|
|
6050
|
+
await apply({
|
|
6023
6051
|
...state,
|
|
6024
6052
|
availableWidth,
|
|
6025
6053
|
availableHeight
|
|
@@ -6040,12 +6068,12 @@ function o(t) {
|
|
|
6040
6068
|
var i = Math.min, r = Math.max, l = Math.round;
|
|
6041
6069
|
function c$1(t) {
|
|
6042
6070
|
const e = o(t);
|
|
6043
|
-
let n
|
|
6044
|
-
const r
|
|
6045
|
-
return s
|
|
6046
|
-
width: n
|
|
6047
|
-
height: i
|
|
6048
|
-
fallback: s
|
|
6071
|
+
let n = parseFloat(e.width), i = parseFloat(e.height);
|
|
6072
|
+
const r = t.offsetWidth, c = t.offsetHeight, s = l(n) !== r || l(i) !== c;
|
|
6073
|
+
return s && (n = r, i = c), {
|
|
6074
|
+
width: n,
|
|
6075
|
+
height: i,
|
|
6076
|
+
fallback: s
|
|
6049
6077
|
};
|
|
6050
6078
|
}
|
|
6051
6079
|
function s(t) {
|
|
@@ -6055,7 +6083,7 @@ var f;
|
|
|
6055
6083
|
function u() {
|
|
6056
6084
|
if (f) return f;
|
|
6057
6085
|
const t = navigator.userAgentData;
|
|
6058
|
-
return t && Array.isArray(t.brands) ? (f = t.brands.map(((t
|
|
6086
|
+
return t && Array.isArray(t.brands) ? (f = t.brands.map(((t) => t.brand + "/" + t.version)).join(" "), f) : navigator.userAgent;
|
|
6059
6087
|
}
|
|
6060
6088
|
function a(t) {
|
|
6061
6089
|
return t instanceof n$1(t).HTMLElement;
|
|
@@ -6071,8 +6099,8 @@ function p(t) {
|
|
|
6071
6099
|
return t instanceof n$1(t).ShadowRoot || t instanceof ShadowRoot;
|
|
6072
6100
|
}
|
|
6073
6101
|
function g$1(t) {
|
|
6074
|
-
const { overflow: e, overflowX: n
|
|
6075
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + i
|
|
6102
|
+
const { overflow: e, overflowX: n, overflowY: i, display: r } = o(t);
|
|
6103
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + i + n) && !["inline", "contents"].includes(r);
|
|
6076
6104
|
}
|
|
6077
6105
|
function m$1(t) {
|
|
6078
6106
|
return [
|
|
@@ -6082,15 +6110,15 @@ function m$1(t) {
|
|
|
6082
6110
|
].includes(s(t));
|
|
6083
6111
|
}
|
|
6084
6112
|
function y$1(t) {
|
|
6085
|
-
const e = /firefox/i.test(u()), n
|
|
6086
|
-
return "none" !== n
|
|
6113
|
+
const e = /firefox/i.test(u()), n = o(t), i = n.backdropFilter || n.WebkitBackdropFilter;
|
|
6114
|
+
return "none" !== n.transform || "none" !== n.perspective || !!i && "none" !== i || e && "filter" === n.willChange || e && !!n.filter && "none" !== n.filter || ["transform", "perspective"].some(((t) => n.willChange.includes(t))) || [
|
|
6087
6115
|
"paint",
|
|
6088
6116
|
"layout",
|
|
6089
6117
|
"strict",
|
|
6090
6118
|
"content"
|
|
6091
|
-
].some(((t
|
|
6092
|
-
const e
|
|
6093
|
-
return null != e
|
|
6119
|
+
].some(((t) => {
|
|
6120
|
+
const e = n.contain;
|
|
6121
|
+
return null != e && e.includes(t);
|
|
6094
6122
|
}));
|
|
6095
6123
|
}
|
|
6096
6124
|
function x$1() {
|
|
@@ -6113,38 +6141,38 @@ var b$1 = {
|
|
|
6113
6141
|
function L(t) {
|
|
6114
6142
|
const e = v(t);
|
|
6115
6143
|
if (!a(e)) return b$1;
|
|
6116
|
-
const n
|
|
6117
|
-
let s
|
|
6118
|
-
return s
|
|
6119
|
-
x: s
|
|
6120
|
-
y: f
|
|
6144
|
+
const n = e.getBoundingClientRect(), { width: o, height: i, fallback: r } = c$1(e);
|
|
6145
|
+
let s = (r ? l(n.width) : n.width) / o, f = (r ? l(n.height) : n.height) / i;
|
|
6146
|
+
return s && Number.isFinite(s) || (s = 1), f && Number.isFinite(f) || (f = 1), {
|
|
6147
|
+
x: s,
|
|
6148
|
+
y: f
|
|
6121
6149
|
};
|
|
6122
6150
|
}
|
|
6123
|
-
function E$1(t, e, o
|
|
6124
|
-
var r
|
|
6125
|
-
void 0 === e && (e = !1), void 0 === o
|
|
6126
|
-
const c
|
|
6127
|
-
let f
|
|
6128
|
-
e && (i
|
|
6129
|
-
const u
|
|
6130
|
-
let h
|
|
6131
|
-
if (s
|
|
6132
|
-
const t
|
|
6133
|
-
let o
|
|
6134
|
-
for (; o
|
|
6135
|
-
const t
|
|
6136
|
-
e
|
|
6151
|
+
function E$1(t, e, o, i) {
|
|
6152
|
+
var r, l;
|
|
6153
|
+
void 0 === e && (e = !1), void 0 === o && (o = !1);
|
|
6154
|
+
const c = t.getBoundingClientRect(), s = v(t);
|
|
6155
|
+
let f = b$1;
|
|
6156
|
+
e && (i ? d$1(i) && (f = L(i)) : f = L(t));
|
|
6157
|
+
const u = s ? n$1(s) : window, a = !x$1() && o;
|
|
6158
|
+
let h = (c.left + (a && (null == (r = u.visualViewport) ? void 0 : r.offsetLeft) || 0)) / f.x, p = (c.top + (a && (null == (l = u.visualViewport) ? void 0 : l.offsetTop) || 0)) / f.y, g = c.width / f.x, m = c.height / f.y;
|
|
6159
|
+
if (s) {
|
|
6160
|
+
const t = n$1(s), e = i && d$1(i) ? n$1(i) : i;
|
|
6161
|
+
let o = t.frameElement;
|
|
6162
|
+
for (; o && i && e !== t;) {
|
|
6163
|
+
const t = L(o), e = o.getBoundingClientRect(), i = getComputedStyle(o);
|
|
6164
|
+
e.x += (o.clientLeft + parseFloat(i.paddingLeft)) * t.x, e.y += (o.clientTop + parseFloat(i.paddingTop)) * t.y, h *= t.x, p *= t.y, g *= t.x, m *= t.y, h += e.x, p += e.y, o = n$1(o).frameElement;
|
|
6137
6165
|
}
|
|
6138
6166
|
}
|
|
6139
6167
|
return {
|
|
6140
|
-
width: g
|
|
6141
|
-
height: m
|
|
6142
|
-
top: p
|
|
6143
|
-
right: h
|
|
6144
|
-
bottom: p
|
|
6145
|
-
left: h
|
|
6146
|
-
x: h
|
|
6147
|
-
y: p
|
|
6168
|
+
width: g,
|
|
6169
|
+
height: m,
|
|
6170
|
+
top: p,
|
|
6171
|
+
right: h + g,
|
|
6172
|
+
bottom: p + m,
|
|
6173
|
+
left: h,
|
|
6174
|
+
x: h,
|
|
6175
|
+
y: p
|
|
6148
6176
|
};
|
|
6149
6177
|
}
|
|
6150
6178
|
function R(t) {
|
|
@@ -6172,46 +6200,46 @@ function W(t) {
|
|
|
6172
6200
|
return w(e) ? e.ownerDocument.body : a(e) && g$1(e) ? e : W(e);
|
|
6173
6201
|
}
|
|
6174
6202
|
function D(t, e) {
|
|
6175
|
-
var o
|
|
6203
|
+
var o;
|
|
6176
6204
|
void 0 === e && (e = []);
|
|
6177
|
-
const i
|
|
6178
|
-
return r
|
|
6179
|
-
}
|
|
6180
|
-
function S$1(e, i
|
|
6181
|
-
return "viewport" === i
|
|
6182
|
-
const o
|
|
6183
|
-
let l
|
|
6184
|
-
if (r
|
|
6185
|
-
l
|
|
6186
|
-
const t
|
|
6187
|
-
(t
|
|
6205
|
+
const i = W(t), r = i === (null == (o = t.ownerDocument) ? void 0 : o.body), l = n$1(i);
|
|
6206
|
+
return r ? e.concat(l, l.visualViewport || [], g$1(i) ? i : []) : e.concat(i, D(i));
|
|
6207
|
+
}
|
|
6208
|
+
function S$1(e, i, l) {
|
|
6209
|
+
return "viewport" === i ? rectToClientRect(function(t, e) {
|
|
6210
|
+
const o = n$1(t), i = R(t), r = o.visualViewport;
|
|
6211
|
+
let l = i.clientWidth, c = i.clientHeight, s = 0, f = 0;
|
|
6212
|
+
if (r) {
|
|
6213
|
+
l = r.width, c = r.height;
|
|
6214
|
+
const t = x$1();
|
|
6215
|
+
(t || !t && "fixed" === e) && (s = r.offsetLeft, f = r.offsetTop);
|
|
6188
6216
|
}
|
|
6189
6217
|
return {
|
|
6190
|
-
width: l
|
|
6191
|
-
height: c
|
|
6192
|
-
x: s
|
|
6193
|
-
y: f
|
|
6218
|
+
width: l,
|
|
6219
|
+
height: c,
|
|
6220
|
+
x: s,
|
|
6221
|
+
y: f
|
|
6194
6222
|
};
|
|
6195
|
-
}(e, l
|
|
6196
|
-
const n
|
|
6223
|
+
}(e, l)) : d$1(i) ? rectToClientRect(function(t, e) {
|
|
6224
|
+
const n = E$1(t, !0, "fixed" === e), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = a(t) ? L(t) : {
|
|
6197
6225
|
x: 1,
|
|
6198
6226
|
y: 1
|
|
6199
6227
|
};
|
|
6200
6228
|
return {
|
|
6201
|
-
width: t.clientWidth * r
|
|
6202
|
-
height: t.clientHeight * r
|
|
6203
|
-
x: i
|
|
6204
|
-
y: o
|
|
6229
|
+
width: t.clientWidth * r.x,
|
|
6230
|
+
height: t.clientHeight * r.y,
|
|
6231
|
+
x: i * r.x,
|
|
6232
|
+
y: o * r.y
|
|
6205
6233
|
};
|
|
6206
|
-
}(i
|
|
6207
|
-
const e
|
|
6208
|
-
let s
|
|
6209
|
-
const f
|
|
6210
|
-
return "rtl" === o(i
|
|
6211
|
-
width: l
|
|
6212
|
-
height: c
|
|
6213
|
-
x: s
|
|
6214
|
-
y: f
|
|
6234
|
+
}(i, l)) : rectToClientRect(function(t) {
|
|
6235
|
+
const e = R(t), n = T(t), i = t.ownerDocument.body, l = r(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), c = r(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
|
|
6236
|
+
let s = -n.scrollLeft + C$1(t);
|
|
6237
|
+
const f = -n.scrollTop;
|
|
6238
|
+
return "rtl" === o(i).direction && (s += r(e.clientWidth, i.clientWidth) - l), {
|
|
6239
|
+
width: l,
|
|
6240
|
+
height: c,
|
|
6241
|
+
x: s,
|
|
6242
|
+
y: f
|
|
6215
6243
|
};
|
|
6216
6244
|
}(R(e)));
|
|
6217
6245
|
}
|
|
@@ -6220,87 +6248,87 @@ function A(t) {
|
|
|
6220
6248
|
}
|
|
6221
6249
|
function H$1(t) {
|
|
6222
6250
|
const e = n$1(t);
|
|
6223
|
-
let i
|
|
6224
|
-
for (; i
|
|
6225
|
-
return i
|
|
6226
|
-
let e
|
|
6227
|
-
for (; a(e
|
|
6228
|
-
if (y$1(e
|
|
6229
|
-
e
|
|
6251
|
+
let i = A(t);
|
|
6252
|
+
for (; i && m$1(i) && "static" === o(i).position;) i = A(i);
|
|
6253
|
+
return i && ("html" === s(i) || "body" === s(i) && "static" === o(i).position && !y$1(i)) ? e : i || function(t) {
|
|
6254
|
+
let e = F(t);
|
|
6255
|
+
for (; a(e) && !w(e);) {
|
|
6256
|
+
if (y$1(e)) return e;
|
|
6257
|
+
e = F(e);
|
|
6230
6258
|
}
|
|
6231
6259
|
return null;
|
|
6232
6260
|
}(t) || e;
|
|
6233
6261
|
}
|
|
6234
|
-
function O(t, e, n
|
|
6235
|
-
const o
|
|
6236
|
-
let l
|
|
6262
|
+
function O(t, e, n) {
|
|
6263
|
+
const o = a(e), i = R(e), r = E$1(t, !0, "fixed" === n, e);
|
|
6264
|
+
let l = {
|
|
6237
6265
|
scrollLeft: 0,
|
|
6238
6266
|
scrollTop: 0
|
|
6239
6267
|
};
|
|
6240
|
-
const c
|
|
6268
|
+
const c = {
|
|
6241
6269
|
x: 0,
|
|
6242
6270
|
y: 0
|
|
6243
6271
|
};
|
|
6244
|
-
if (o
|
|
6245
|
-
const t
|
|
6246
|
-
c
|
|
6247
|
-
} else i
|
|
6272
|
+
if (o || !o && "fixed" !== n) if (("body" !== s(e) || g$1(i)) && (l = T(e)), a(e)) {
|
|
6273
|
+
const t = E$1(e, !0);
|
|
6274
|
+
c.x = t.x + e.clientLeft, c.y = t.y + e.clientTop;
|
|
6275
|
+
} else i && (c.x = C$1(i));
|
|
6248
6276
|
return {
|
|
6249
|
-
x: r
|
|
6250
|
-
y: r
|
|
6251
|
-
width: r
|
|
6252
|
-
height: r
|
|
6277
|
+
x: r.left + l.scrollLeft - c.x,
|
|
6278
|
+
y: r.top + l.scrollTop - c.y,
|
|
6279
|
+
width: r.width,
|
|
6280
|
+
height: r.height
|
|
6253
6281
|
};
|
|
6254
6282
|
}
|
|
6255
6283
|
var P = {
|
|
6256
6284
|
getClippingRect: function(t) {
|
|
6257
|
-
let { element: e, boundary: n
|
|
6258
|
-
const u
|
|
6259
|
-
const n
|
|
6260
|
-
if (n
|
|
6261
|
-
let i
|
|
6262
|
-
const l
|
|
6263
|
-
let c
|
|
6264
|
-
for (; d$1(c
|
|
6265
|
-
const t
|
|
6266
|
-
(l
|
|
6285
|
+
let { element: e, boundary: n, rootBoundary: l, strategy: c } = t;
|
|
6286
|
+
const u = [..."clippingAncestors" === n ? function(t, e) {
|
|
6287
|
+
const n = e.get(t);
|
|
6288
|
+
if (n) return n;
|
|
6289
|
+
let i = D(t).filter(((t) => d$1(t) && "body" !== s(t))), r = null;
|
|
6290
|
+
const l = "fixed" === o(t).position;
|
|
6291
|
+
let c = l ? F(t) : t;
|
|
6292
|
+
for (; d$1(c) && !w(c);) {
|
|
6293
|
+
const t = o(c), e = y$1(c);
|
|
6294
|
+
(l ? e || r : e || "static" !== t.position || !r || !["absolute", "fixed"].includes(r.position)) ? r = t : i = i.filter(((t) => t !== c)), c = F(c);
|
|
6267
6295
|
}
|
|
6268
|
-
return e
|
|
6269
|
-
}(e, this._c) : [].concat(n
|
|
6270
|
-
const o
|
|
6271
|
-
return t
|
|
6272
|
-
}), S$1(e, a
|
|
6296
|
+
return e.set(t, i), i;
|
|
6297
|
+
}(e, this._c) : [].concat(n), l], a = u[0], h = u.reduce(((t, n) => {
|
|
6298
|
+
const o = S$1(e, n, c);
|
|
6299
|
+
return t.top = r(o.top, t.top), t.right = i(o.right, t.right), t.bottom = i(o.bottom, t.bottom), t.left = r(o.left, t.left), t;
|
|
6300
|
+
}), S$1(e, a, c));
|
|
6273
6301
|
return {
|
|
6274
|
-
width: h
|
|
6275
|
-
height: h
|
|
6276
|
-
x: h
|
|
6277
|
-
y: h
|
|
6302
|
+
width: h.right - h.left,
|
|
6303
|
+
height: h.bottom - h.top,
|
|
6304
|
+
x: h.left,
|
|
6305
|
+
y: h.top
|
|
6278
6306
|
};
|
|
6279
6307
|
},
|
|
6280
6308
|
convertOffsetParentRelativeRectToViewportRelativeRect: function(t) {
|
|
6281
|
-
let { rect: e, offsetParent: n
|
|
6282
|
-
const i
|
|
6283
|
-
if (n
|
|
6284
|
-
let l
|
|
6309
|
+
let { rect: e, offsetParent: n, strategy: o } = t;
|
|
6310
|
+
const i = a(n), r = R(n);
|
|
6311
|
+
if (n === r) return e;
|
|
6312
|
+
let l = {
|
|
6285
6313
|
scrollLeft: 0,
|
|
6286
6314
|
scrollTop: 0
|
|
6287
|
-
}, c
|
|
6315
|
+
}, c = {
|
|
6288
6316
|
x: 1,
|
|
6289
6317
|
y: 1
|
|
6290
6318
|
};
|
|
6291
|
-
const f
|
|
6319
|
+
const f = {
|
|
6292
6320
|
x: 0,
|
|
6293
6321
|
y: 0
|
|
6294
6322
|
};
|
|
6295
|
-
if ((i
|
|
6296
|
-
const t
|
|
6297
|
-
c
|
|
6323
|
+
if ((i || !i && "fixed" !== o) && (("body" !== s(n) || g$1(r)) && (l = T(n)), a(n))) {
|
|
6324
|
+
const t = E$1(n);
|
|
6325
|
+
c = L(n), f.x = t.x + n.clientLeft, f.y = t.y + n.clientTop;
|
|
6298
6326
|
}
|
|
6299
6327
|
return {
|
|
6300
|
-
width: e.width * c
|
|
6301
|
-
height: e.height * c
|
|
6302
|
-
x: e.x * c
|
|
6303
|
-
y: e.y * c
|
|
6328
|
+
width: e.width * c.x,
|
|
6329
|
+
height: e.height * c.y,
|
|
6330
|
+
x: e.x * c.x - l.scrollLeft * c.x + f.x,
|
|
6331
|
+
y: e.y * c.y - l.scrollTop * c.y + f.y
|
|
6304
6332
|
};
|
|
6305
6333
|
},
|
|
6306
6334
|
isElement: d$1,
|
|
@@ -6311,35 +6339,35 @@ var P = {
|
|
|
6311
6339
|
getDocumentElement: R,
|
|
6312
6340
|
getScale: L,
|
|
6313
6341
|
async getElementRects(t) {
|
|
6314
|
-
let { reference: e, floating: n
|
|
6315
|
-
const i
|
|
6342
|
+
let { reference: e, floating: n, strategy: o } = t;
|
|
6343
|
+
const i = this.getOffsetParent || H$1, r = this.getDimensions;
|
|
6316
6344
|
return {
|
|
6317
|
-
reference: O(e, await i
|
|
6345
|
+
reference: O(e, await i(n), o),
|
|
6318
6346
|
floating: {
|
|
6319
6347
|
x: 0,
|
|
6320
6348
|
y: 0,
|
|
6321
|
-
...await r
|
|
6349
|
+
...await r(n)
|
|
6322
6350
|
}
|
|
6323
6351
|
};
|
|
6324
6352
|
},
|
|
6325
6353
|
getClientRects: (t) => Array.from(t.getClientRects()),
|
|
6326
6354
|
isRTL: (t) => "rtl" === o(t).direction
|
|
6327
6355
|
};
|
|
6328
|
-
var B$1 = (t, n
|
|
6329
|
-
const i
|
|
6356
|
+
var B$1 = (t, n, o) => {
|
|
6357
|
+
const i = /* @__PURE__ */ new Map(), r = {
|
|
6330
6358
|
platform: P,
|
|
6331
|
-
...o
|
|
6332
|
-
}, l
|
|
6333
|
-
...r
|
|
6334
|
-
_c: i
|
|
6359
|
+
...o
|
|
6360
|
+
}, l = {
|
|
6361
|
+
...r.platform,
|
|
6362
|
+
_c: i
|
|
6335
6363
|
};
|
|
6336
|
-
return computePosition(t, n
|
|
6337
|
-
...r
|
|
6338
|
-
platform: l
|
|
6364
|
+
return computePosition(t, n, {
|
|
6365
|
+
...r,
|
|
6366
|
+
platform: l
|
|
6339
6367
|
});
|
|
6340
6368
|
};
|
|
6341
6369
|
function ye(e, t) {
|
|
6342
|
-
for (const o
|
|
6370
|
+
for (const o in t) Object.prototype.hasOwnProperty.call(t, o) && (typeof t[o] == "object" && e[o] ? ye(e[o], t[o]) : e[o] = t[o]);
|
|
6343
6371
|
}
|
|
6344
6372
|
var h = {
|
|
6345
6373
|
disabled: !1,
|
|
@@ -6394,26 +6422,26 @@ var h = {
|
|
|
6394
6422
|
}
|
|
6395
6423
|
};
|
|
6396
6424
|
function S(e, t) {
|
|
6397
|
-
let o
|
|
6425
|
+
let o = h.themes[e] || {}, i;
|
|
6398
6426
|
do
|
|
6399
|
-
i
|
|
6400
|
-
while (o
|
|
6401
|
-
return i
|
|
6427
|
+
i = o[t], typeof i > "u" ? o.$extend ? o = h.themes[o.$extend] || {} : (o = null, i = h[t]) : o = null;
|
|
6428
|
+
while (o);
|
|
6429
|
+
return i;
|
|
6402
6430
|
}
|
|
6403
6431
|
function Ze(e) {
|
|
6404
6432
|
const t = [e];
|
|
6405
|
-
let o
|
|
6433
|
+
let o = h.themes[e] || {};
|
|
6406
6434
|
do
|
|
6407
|
-
o
|
|
6408
|
-
while (o
|
|
6409
|
-
return t.map((i
|
|
6435
|
+
o.$extend && !o.$resetCss ? (t.push(o.$extend), o = h.themes[o.$extend] || {}) : o = null;
|
|
6436
|
+
while (o);
|
|
6437
|
+
return t.map((i) => `v-popper--theme-${i}`);
|
|
6410
6438
|
}
|
|
6411
6439
|
function re(e) {
|
|
6412
6440
|
const t = [e];
|
|
6413
|
-
let o
|
|
6441
|
+
let o = h.themes[e] || {};
|
|
6414
6442
|
do
|
|
6415
|
-
o
|
|
6416
|
-
while (o
|
|
6443
|
+
o.$extend ? (t.push(o.$extend), o = h.themes[o.$extend] || {}) : o = null;
|
|
6444
|
+
while (o);
|
|
6417
6445
|
return t;
|
|
6418
6446
|
}
|
|
6419
6447
|
var $ = !1;
|
|
@@ -6452,8 +6480,8 @@ var Te = [
|
|
|
6452
6480
|
pointer: "pointerup"
|
|
6453
6481
|
};
|
|
6454
6482
|
function de(e, t) {
|
|
6455
|
-
const o
|
|
6456
|
-
o
|
|
6483
|
+
const o = e.indexOf(t);
|
|
6484
|
+
o !== -1 && e.splice(o, 1);
|
|
6457
6485
|
}
|
|
6458
6486
|
function G() {
|
|
6459
6487
|
return new Promise((e) => requestAnimationFrame(() => {
|
|
@@ -6779,14 +6807,14 @@ var q = "__floating-vue__popper", Q = () => /* @__PURE__ */ defineComponent({
|
|
|
6779
6807
|
this.dispose();
|
|
6780
6808
|
},
|
|
6781
6809
|
methods: {
|
|
6782
|
-
show({ event: e = null, skipDelay: t = !1, force: o
|
|
6783
|
-
var i
|
|
6784
|
-
(i
|
|
6810
|
+
show({ event: e = null, skipDelay: t = !1, force: o = !1 } = {}) {
|
|
6811
|
+
var i, s;
|
|
6812
|
+
(i = this.parentPopper) != null && i.lockedChild && this.parentPopper.lockedChild !== this || (this.pendingHide = !1, (o || !this.disabled) && (((s = this.parentPopper) == null ? void 0 : s.lockedChild) === this && (this.parentPopper.lockedChild = null), this.$_scheduleShow(e, t), this.$emit("show"), this.$_showFrameLocked = !0, requestAnimationFrame(() => {
|
|
6785
6813
|
this.$_showFrameLocked = !1;
|
|
6786
6814
|
})), this.$emit("update:shown", !0));
|
|
6787
6815
|
},
|
|
6788
6816
|
hide({ event: e = null, skipDelay: t = !1 } = {}) {
|
|
6789
|
-
var o
|
|
6817
|
+
var o;
|
|
6790
6818
|
if (!this.$_hideInProgress) {
|
|
6791
6819
|
if (this.shownChildren.size > 0) {
|
|
6792
6820
|
this.pendingHide = !0;
|
|
@@ -6798,7 +6826,7 @@ var q = "__floating-vue__popper", Q = () => /* @__PURE__ */ defineComponent({
|
|
|
6798
6826
|
}, 1e3));
|
|
6799
6827
|
return;
|
|
6800
6828
|
}
|
|
6801
|
-
((o
|
|
6829
|
+
((o = this.parentPopper) == null ? void 0 : o.lockedChild) === this && (this.parentPopper.lockedChild = null), this.pendingHide = !1, this.$_scheduleHide(e, t), this.$emit("hide"), this.$emit("update:shown", !1);
|
|
6802
6830
|
}
|
|
6803
6831
|
},
|
|
6804
6832
|
init() {
|
|
@@ -6834,20 +6862,20 @@ var q = "__floating-vue__popper", Q = () => /* @__PURE__ */ defineComponent({
|
|
|
6834
6862
|
padding: this.arrowPadding
|
|
6835
6863
|
})), this.arrowOverflow && e.middleware.push({
|
|
6836
6864
|
name: "arrowOverflow",
|
|
6837
|
-
fn: ({ placement: i
|
|
6838
|
-
let p
|
|
6839
|
-
const { centerOffset: a
|
|
6840
|
-
return i
|
|
6865
|
+
fn: ({ placement: i, rects: s, middlewareData: r }) => {
|
|
6866
|
+
let p;
|
|
6867
|
+
const { centerOffset: a } = r.arrow;
|
|
6868
|
+
return i.startsWith("top") || i.startsWith("bottom") ? p = Math.abs(a) > s.reference.width / 2 : p = Math.abs(a) > s.reference.height / 2, { data: { overflow: p } };
|
|
6841
6869
|
}
|
|
6842
6870
|
}), this.autoMinSize || this.autoSize) {
|
|
6843
|
-
const i
|
|
6871
|
+
const i = this.autoSize ? this.autoSize : this.autoMinSize ? "min" : null;
|
|
6844
6872
|
e.middleware.push({
|
|
6845
6873
|
name: "autoSize",
|
|
6846
|
-
fn: ({ rects: s
|
|
6847
|
-
var u
|
|
6848
|
-
if ((u
|
|
6849
|
-
let a
|
|
6850
|
-
return r
|
|
6874
|
+
fn: ({ rects: s, placement: r, middlewareData: p }) => {
|
|
6875
|
+
var u;
|
|
6876
|
+
if ((u = p.autoSize) != null && u.skip) return {};
|
|
6877
|
+
let a, l;
|
|
6878
|
+
return r.startsWith("top") || r.startsWith("bottom") ? a = s.reference.width : l = s.reference.height, this.$_innerNode.style[i === "min" ? "minWidth" : i === "max" ? "maxWidth" : "width"] = a != null ? `${a}px` : null, this.$_innerNode.style[i === "min" ? "minHeight" : i === "max" ? "maxHeight" : "height"] = l != null ? `${l}px` : null, {
|
|
6851
6879
|
data: { skip: !0 },
|
|
6852
6880
|
reset: { rects: !0 }
|
|
6853
6881
|
};
|
|
@@ -6857,19 +6885,19 @@ var q = "__floating-vue__popper", Q = () => /* @__PURE__ */ defineComponent({
|
|
|
6857
6885
|
(this.autoMaxSize || this.autoBoundaryMaxSize) && (this.$_innerNode.style.maxWidth = null, this.$_innerNode.style.maxHeight = null, e.middleware.push(size({
|
|
6858
6886
|
boundary: this.boundary,
|
|
6859
6887
|
padding: this.overflowPadding,
|
|
6860
|
-
apply: ({ availableWidth: i
|
|
6861
|
-
this.$_innerNode.style.maxWidth = i
|
|
6888
|
+
apply: ({ availableWidth: i, availableHeight: s }) => {
|
|
6889
|
+
this.$_innerNode.style.maxWidth = i != null ? `${i}px` : null, this.$_innerNode.style.maxHeight = s != null ? `${s}px` : null;
|
|
6862
6890
|
}
|
|
6863
6891
|
})));
|
|
6864
|
-
const o
|
|
6892
|
+
const o = await B$1(this.$_referenceNode, this.$_popperNode, e);
|
|
6865
6893
|
Object.assign(this.result, {
|
|
6866
|
-
x: o
|
|
6867
|
-
y: o
|
|
6868
|
-
placement: o
|
|
6869
|
-
strategy: o
|
|
6894
|
+
x: o.x,
|
|
6895
|
+
y: o.y,
|
|
6896
|
+
placement: o.placement,
|
|
6897
|
+
strategy: o.strategy,
|
|
6870
6898
|
arrow: {
|
|
6871
|
-
...o
|
|
6872
|
-
...o
|
|
6899
|
+
...o.middlewareData.arrow,
|
|
6900
|
+
...o.middlewareData.arrowOverflow
|
|
6873
6901
|
}
|
|
6874
6902
|
});
|
|
6875
6903
|
},
|
|
@@ -6899,8 +6927,8 @@ var q = "__floating-vue__popper", Q = () => /* @__PURE__ */ defineComponent({
|
|
|
6899
6927
|
async $_applyShowEffect() {
|
|
6900
6928
|
if (this.$_hideInProgress) return;
|
|
6901
6929
|
if (this.computeTransformOrigin) {
|
|
6902
|
-
const t = this.$_referenceNode.getBoundingClientRect(), o
|
|
6903
|
-
this.result.transformOrigin = `${s
|
|
6930
|
+
const t = this.$_referenceNode.getBoundingClientRect(), o = this.$_popperNode.querySelector(".v-popper__wrapper"), i = o.parentNode.getBoundingClientRect(), s = t.x + t.width / 2 - (i.left + o.offsetLeft), r = t.y + t.height / 2 - (i.top + o.offsetTop);
|
|
6931
|
+
this.result.transformOrigin = `${s}px ${r}px`;
|
|
6904
6932
|
}
|
|
6905
6933
|
this.isShown = !0, this.$_applyAttrsToTarget({
|
|
6906
6934
|
"aria-describedby": this.popperId,
|
|
@@ -6909,7 +6937,7 @@ var q = "__floating-vue__popper", Q = () => /* @__PURE__ */ defineComponent({
|
|
|
6909
6937
|
const e = this.showGroup;
|
|
6910
6938
|
if (e) {
|
|
6911
6939
|
let t;
|
|
6912
|
-
for (let o
|
|
6940
|
+
for (let o = 0; o < d.length; o++) t = d[o], t.showGroup !== e && (t.hide(), t.$emit("close-group"));
|
|
6913
6941
|
}
|
|
6914
6942
|
d.push(this), document.body.classList.add("v-popper--some-open");
|
|
6915
6943
|
for (const t of re(this.theme)) he(t).push(this), document.body.classList.add(`v-popper--some-open--${t}`);
|
|
@@ -6922,9 +6950,9 @@ var q = "__floating-vue__popper", Q = () => /* @__PURE__ */ defineComponent({
|
|
|
6922
6950
|
}
|
|
6923
6951
|
if (clearTimeout(this.$_scheduleTimer), !this.isShown) return;
|
|
6924
6952
|
this.skipTransition = e, de(d, this), d.length === 0 && document.body.classList.remove("v-popper--some-open");
|
|
6925
|
-
for (const o
|
|
6926
|
-
const i
|
|
6927
|
-
de(i
|
|
6953
|
+
for (const o of re(this.theme)) {
|
|
6954
|
+
const i = he(o);
|
|
6955
|
+
de(i, this), i.length === 0 && document.body.classList.remove(`v-popper--some-open--${o}`);
|
|
6928
6956
|
}
|
|
6929
6957
|
g === this && (g = null), this.isShown = !1, this.$_applyAttrsToTarget({
|
|
6930
6958
|
"aria-describedby": void 0,
|
|
@@ -6945,34 +6973,34 @@ var q = "__floating-vue__popper", Q = () => /* @__PURE__ */ defineComponent({
|
|
|
6945
6973
|
e.appendChild(this.$_popperNode), this.isMounted = !0;
|
|
6946
6974
|
},
|
|
6947
6975
|
$_addEventListeners() {
|
|
6948
|
-
const e = (o
|
|
6949
|
-
this.isShown && !this.$_hideInProgress || (o
|
|
6976
|
+
const e = (o) => {
|
|
6977
|
+
this.isShown && !this.$_hideInProgress || (o.usedByTooltip = !0, !this.$_preventShow && this.show({ event: o }));
|
|
6950
6978
|
};
|
|
6951
6979
|
this.$_registerTriggerListeners(this.$_targetNodes, pe, this.triggers, this.showTriggers, e), this.$_registerTriggerListeners([this.$_popperNode], pe, this.popperTriggers, this.popperShowTriggers, e);
|
|
6952
|
-
const t = (o
|
|
6953
|
-
o
|
|
6980
|
+
const t = (o) => {
|
|
6981
|
+
o.usedByTooltip || this.hide({ event: o });
|
|
6954
6982
|
};
|
|
6955
6983
|
this.$_registerTriggerListeners(this.$_targetNodes, ae, this.triggers, this.hideTriggers, t), this.$_registerTriggerListeners([this.$_popperNode], ae, this.popperTriggers, this.popperHideTriggers, t);
|
|
6956
6984
|
},
|
|
6957
|
-
$_registerEventListeners(e, t, o
|
|
6985
|
+
$_registerEventListeners(e, t, o) {
|
|
6958
6986
|
this.$_events.push({
|
|
6959
6987
|
targetNodes: e,
|
|
6960
6988
|
eventType: t,
|
|
6961
|
-
handler: o
|
|
6962
|
-
}), e.forEach((i
|
|
6963
|
-
},
|
|
6964
|
-
$_registerTriggerListeners(e, t, o
|
|
6965
|
-
let r
|
|
6966
|
-
i
|
|
6967
|
-
const a
|
|
6968
|
-
a
|
|
6989
|
+
handler: o
|
|
6990
|
+
}), e.forEach((i) => i.addEventListener(t, o, $ ? { passive: !0 } : void 0));
|
|
6991
|
+
},
|
|
6992
|
+
$_registerTriggerListeners(e, t, o, i, s) {
|
|
6993
|
+
let r = o;
|
|
6994
|
+
i != null && (r = typeof i == "function" ? i(r) : i), r.forEach((p) => {
|
|
6995
|
+
const a = t[p];
|
|
6996
|
+
a && this.$_registerEventListeners(e, a, s);
|
|
6969
6997
|
});
|
|
6970
6998
|
},
|
|
6971
6999
|
$_removeEventListeners(e) {
|
|
6972
7000
|
const t = [];
|
|
6973
|
-
this.$_events.forEach((o
|
|
6974
|
-
const { targetNodes: i
|
|
6975
|
-
!e || e === s
|
|
7001
|
+
this.$_events.forEach((o) => {
|
|
7002
|
+
const { targetNodes: i, eventType: s, handler: r } = o;
|
|
7003
|
+
!e || e === s ? i.forEach((p) => p.removeEventListener(s, r)) : t.push(o);
|
|
6976
7004
|
}), this.$_events = t;
|
|
6977
7005
|
},
|
|
6978
7006
|
$_refreshListeners() {
|
|
@@ -6987,15 +7015,15 @@ var q = "__floating-vue__popper", Q = () => /* @__PURE__ */ defineComponent({
|
|
|
6987
7015
|
this.$_popperNode.parentNode && this.$_popperNode.parentNode.removeChild(this.$_popperNode);
|
|
6988
7016
|
},
|
|
6989
7017
|
$_swapTargetAttrs(e, t) {
|
|
6990
|
-
for (const o
|
|
6991
|
-
const i
|
|
6992
|
-
i
|
|
7018
|
+
for (const o of this.$_targetNodes) {
|
|
7019
|
+
const i = o.getAttribute(e);
|
|
7020
|
+
i && (o.removeAttribute(e), o.setAttribute(t, i));
|
|
6993
7021
|
}
|
|
6994
7022
|
},
|
|
6995
7023
|
$_applyAttrsToTarget(e) {
|
|
6996
|
-
for (const t of this.$_targetNodes) for (const o
|
|
6997
|
-
const i
|
|
6998
|
-
i
|
|
7024
|
+
for (const t of this.$_targetNodes) for (const o in e) {
|
|
7025
|
+
const i = e[o];
|
|
7026
|
+
i == null ? t.removeAttribute(o) : t.setAttribute(o, i);
|
|
6999
7027
|
}
|
|
7000
7028
|
},
|
|
7001
7029
|
$_updateParentShownChildren(e) {
|
|
@@ -7005,8 +7033,8 @@ var q = "__floating-vue__popper", Q = () => /* @__PURE__ */ defineComponent({
|
|
|
7005
7033
|
$_isAimingPopper() {
|
|
7006
7034
|
const e = this.$_referenceNode.getBoundingClientRect();
|
|
7007
7035
|
if (y >= e.left && y <= e.right && _ >= e.top && _ <= e.bottom) {
|
|
7008
|
-
const t = this.$_popperNode.getBoundingClientRect(), o
|
|
7009
|
-
return C(c, m, p
|
|
7036
|
+
const t = this.$_popperNode.getBoundingClientRect(), o = y - c, i = _ - m, r = t.left + t.width / 2 - c + (t.top + t.height / 2) - m + t.width + t.height, p = c + o * r, a = m + i * r;
|
|
7037
|
+
return C(c, m, p, a, t.left, t.top, t.left, t.bottom) || C(c, m, p, a, t.left, t.top, t.right, t.top) || C(c, m, p, a, t.right, t.top, t.right, t.bottom) || C(c, m, p, a, t.left, t.bottom, t.right, t.bottom);
|
|
7010
7038
|
}
|
|
7011
7039
|
return !1;
|
|
7012
7040
|
}
|
|
@@ -7027,10 +7055,10 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
7027
7055
|
}
|
|
7028
7056
|
function ue(e, t) {
|
|
7029
7057
|
if (h.autoHideOnMousedown) Pe(e, t);
|
|
7030
|
-
else for (let o
|
|
7031
|
-
const i
|
|
7058
|
+
else for (let o = 0; o < d.length; o++) {
|
|
7059
|
+
const i = d[o];
|
|
7032
7060
|
try {
|
|
7033
|
-
i
|
|
7061
|
+
i.mouseDownContains = i.popperNode().contains(e.target);
|
|
7034
7062
|
} catch {}
|
|
7035
7063
|
}
|
|
7036
7064
|
}
|
|
@@ -7038,35 +7066,35 @@ function fe(e, t) {
|
|
|
7038
7066
|
h.autoHideOnMousedown || Pe(e, t);
|
|
7039
7067
|
}
|
|
7040
7068
|
function Pe(e, t) {
|
|
7041
|
-
const o
|
|
7042
|
-
for (let i
|
|
7043
|
-
const s
|
|
7069
|
+
const o = {};
|
|
7070
|
+
for (let i = d.length - 1; i >= 0; i--) {
|
|
7071
|
+
const s = d[i];
|
|
7044
7072
|
try {
|
|
7045
|
-
const r
|
|
7046
|
-
s
|
|
7047
|
-
if (s
|
|
7048
|
-
if (s
|
|
7049
|
-
let a
|
|
7050
|
-
for (; a
|
|
7073
|
+
const r = s.containsGlobalTarget = s.mouseDownContains || s.popperNode().contains(e.target);
|
|
7074
|
+
s.pendingHide = !1, requestAnimationFrame(() => {
|
|
7075
|
+
if (s.pendingHide = !1, !o[s.randomId] && ce(s, r, e)) {
|
|
7076
|
+
if (s.$_handleGlobalClose(e, t), !e.closeAllPopover && e.closePopover && r) {
|
|
7077
|
+
let a = s.parentPopper;
|
|
7078
|
+
for (; a;) o[a.randomId] = !0, a = a.parentPopper;
|
|
7051
7079
|
return;
|
|
7052
7080
|
}
|
|
7053
|
-
let p
|
|
7054
|
-
for (; p
|
|
7055
|
-
p
|
|
7056
|
-
p
|
|
7081
|
+
let p = s.parentPopper;
|
|
7082
|
+
for (; p && ce(p, p.containsGlobalTarget, e);) {
|
|
7083
|
+
p.$_handleGlobalClose(e, t);
|
|
7084
|
+
p = p.parentPopper;
|
|
7057
7085
|
}
|
|
7058
7086
|
}
|
|
7059
7087
|
});
|
|
7060
7088
|
} catch {}
|
|
7061
7089
|
}
|
|
7062
7090
|
}
|
|
7063
|
-
function ce(e, t, o
|
|
7064
|
-
return o
|
|
7091
|
+
function ce(e, t, o) {
|
|
7092
|
+
return o.closeAllPopover || o.closePopover && t || et(e, o) && !t;
|
|
7065
7093
|
}
|
|
7066
7094
|
function et(e, t) {
|
|
7067
7095
|
if (typeof e.autoHide == "function") {
|
|
7068
|
-
const o
|
|
7069
|
-
return e.lastAutoHide = o
|
|
7096
|
+
const o = e.autoHide(t);
|
|
7097
|
+
return e.lastAutoHide = o, o;
|
|
7070
7098
|
}
|
|
7071
7099
|
return e.autoHide;
|
|
7072
7100
|
}
|
|
@@ -7077,16 +7105,16 @@ var c = 0, m = 0, y = 0, _ = 0;
|
|
|
7077
7105
|
typeof window < "u" && window.addEventListener("mousemove", (e) => {
|
|
7078
7106
|
c = y, m = _, y = e.clientX, _ = e.clientY;
|
|
7079
7107
|
}, $ ? { passive: !0 } : void 0);
|
|
7080
|
-
function C(e, t, o
|
|
7081
|
-
const l
|
|
7082
|
-
return l
|
|
7108
|
+
function C(e, t, o, i, s, r, p, a) {
|
|
7109
|
+
const l = ((p - s) * (t - r) - (a - r) * (e - s)) / ((a - r) * (o - e) - (p - s) * (i - t)), u = ((o - e) * (t - r) - (i - t) * (e - s)) / ((a - r) * (o - e) - (p - s) * (i - t));
|
|
7110
|
+
return l >= 0 && l <= 1 && u >= 0 && u <= 1;
|
|
7083
7111
|
}
|
|
7084
7112
|
var ot = { extends: Q() }, B = (e, t) => {
|
|
7085
|
-
const o
|
|
7086
|
-
for (const [i
|
|
7087
|
-
return o
|
|
7113
|
+
const o = e.__vccOpts || e;
|
|
7114
|
+
for (const [i, s] of t) o[i] = s;
|
|
7115
|
+
return o;
|
|
7088
7116
|
};
|
|
7089
|
-
function it(e, t, o
|
|
7117
|
+
function it(e, t, o, i, s, r) {
|
|
7090
7118
|
return openBlock(), createElementBlock("div", {
|
|
7091
7119
|
ref: "reference",
|
|
7092
7120
|
class: normalizeClass(["v-popper", { "v-popper--shown": e.slotData.isShown }])
|
|
@@ -7097,11 +7125,11 @@ function nt() {
|
|
|
7097
7125
|
var e = window.navigator.userAgent, t = e.indexOf("MSIE ");
|
|
7098
7126
|
if (t > 0) return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10);
|
|
7099
7127
|
if (e.indexOf("Trident/") > 0) {
|
|
7100
|
-
var i
|
|
7101
|
-
return parseInt(e.substring(i
|
|
7128
|
+
var i = e.indexOf("rv:");
|
|
7129
|
+
return parseInt(e.substring(i + 3, e.indexOf(".", i)), 10);
|
|
7102
7130
|
}
|
|
7103
|
-
var s
|
|
7104
|
-
return s
|
|
7131
|
+
var s = e.indexOf("Edge/");
|
|
7132
|
+
return s > 0 ? parseInt(e.substring(s + 5, e.indexOf(".", s)), 10) : -1;
|
|
7105
7133
|
}
|
|
7106
7134
|
var z;
|
|
7107
7135
|
function X() {
|
|
@@ -7159,7 +7187,7 @@ var pt = {
|
|
|
7159
7187
|
tabindex: "-1"
|
|
7160
7188
|
};
|
|
7161
7189
|
popScopeId();
|
|
7162
|
-
E.render = /* @__PURE__ */ rt((e, t, o
|
|
7190
|
+
E.render = /* @__PURE__ */ rt((e, t, o, i, s, r) => (openBlock(), createBlock("div", pt)));
|
|
7163
7191
|
E.__scopeId = "data-v-b329ee4c";
|
|
7164
7192
|
E.__file = "src/components/ResizeObserver.vue";
|
|
7165
7193
|
var Z = (e = "theme") => ({ computed: { themeClass() {
|
|
@@ -7192,8 +7220,8 @@ var Z = (e = "theme") => ({ computed: { themeClass() {
|
|
|
7192
7220
|
ref: "inner",
|
|
7193
7221
|
class: "v-popper__inner"
|
|
7194
7222
|
}, ct = [/* @__PURE__ */ createBaseVNode("div", { class: "v-popper__arrow-outer" }, null, -1), /* @__PURE__ */ createBaseVNode("div", { class: "v-popper__arrow-inner" }, null, -1)];
|
|
7195
|
-
function mt(e, t, o
|
|
7196
|
-
const p
|
|
7223
|
+
function mt(e, t, o, i, s, r) {
|
|
7224
|
+
const p = resolveComponent("ResizeObserver");
|
|
7197
7225
|
return openBlock(), createElementBlock("div", {
|
|
7198
7226
|
id: e.popperId,
|
|
7199
7227
|
ref: "popover",
|
|
@@ -7219,16 +7247,16 @@ function mt(e, t, o$1, i$1, s$1, r$1) {
|
|
|
7219
7247
|
"aria-hidden": e.shown ? "false" : "true",
|
|
7220
7248
|
tabindex: e.autoHide ? 0 : void 0,
|
|
7221
7249
|
"data-popper-placement": e.result ? e.result.placement : void 0,
|
|
7222
|
-
onKeyup: t[2] || (t[2] = withKeys((a
|
|
7250
|
+
onKeyup: t[2] || (t[2] = withKeys((a) => e.autoHide && e.$emit("hide"), ["esc"]))
|
|
7223
7251
|
}, [createBaseVNode("div", {
|
|
7224
7252
|
class: "v-popper__backdrop",
|
|
7225
|
-
onClick: t[0] || (t[0] = (a
|
|
7253
|
+
onClick: t[0] || (t[0] = (a) => e.autoHide && e.$emit("hide"))
|
|
7226
7254
|
}), createBaseVNode("div", {
|
|
7227
7255
|
class: "v-popper__wrapper",
|
|
7228
7256
|
style: normalizeStyle(e.result ? { transformOrigin: e.result.transformOrigin } : void 0)
|
|
7229
|
-
}, [createBaseVNode("div", ht, [e.mounted ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createBaseVNode("div", null, [renderSlot(e.$slots, "default")]), e.handleResize ? (openBlock(), createBlock(p
|
|
7257
|
+
}, [createBaseVNode("div", ht, [e.mounted ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createBaseVNode("div", null, [renderSlot(e.$slots, "default")]), e.handleResize ? (openBlock(), createBlock(p, {
|
|
7230
7258
|
key: 0,
|
|
7231
|
-
onNotify: t[1] || (t[1] = (a
|
|
7259
|
+
onNotify: t[1] || (t[1] = (a) => e.$emit("resize", a))
|
|
7232
7260
|
})) : createCommentVNode("", !0)], 64)) : createCommentVNode("", !0)], 512), createBaseVNode("div", {
|
|
7233
7261
|
ref: "arrow",
|
|
7234
7262
|
class: "v-popper__arrow-container",
|
|
@@ -7447,16 +7475,16 @@ var gt = /* @__PURE__ */ defineComponent({
|
|
|
7447
7475
|
return Array.from(this.$el.children).filter((e) => e !== this.$refs.popperContent.$el);
|
|
7448
7476
|
} }
|
|
7449
7477
|
});
|
|
7450
|
-
function wt(e, t, o
|
|
7451
|
-
const p
|
|
7452
|
-
return openBlock(), createBlock(a
|
|
7478
|
+
function wt(e, t, o, i, s, r) {
|
|
7479
|
+
const p = resolveComponent("PopperContent"), a = resolveComponent("Popper");
|
|
7480
|
+
return openBlock(), createBlock(a, mergeProps({ ref: "popper" }, e.$props, {
|
|
7453
7481
|
theme: e.finalTheme,
|
|
7454
7482
|
"target-nodes": e.getTargetNodes,
|
|
7455
7483
|
"popper-node": () => e.$refs.popperContent.$el,
|
|
7456
7484
|
class: [e.themeClass],
|
|
7457
7485
|
onShow: t[0] || (t[0] = () => e.$emit("show")),
|
|
7458
7486
|
onHide: t[1] || (t[1] = () => e.$emit("hide")),
|
|
7459
|
-
"onUpdate:shown": t[2] || (t[2] = (l
|
|
7487
|
+
"onUpdate:shown": t[2] || (t[2] = (l) => e.$emit("update:shown", l)),
|
|
7460
7488
|
onApplyShow: t[3] || (t[3] = () => e.$emit("apply-show")),
|
|
7461
7489
|
onApplyHide: t[4] || (t[4] = () => e.$emit("apply-hide")),
|
|
7462
7490
|
onCloseGroup: t[5] || (t[5] = () => e.$emit("close-group")),
|
|
@@ -7464,27 +7492,27 @@ function wt(e, t, o$1, i$1, s$1, r$1) {
|
|
|
7464
7492
|
onAutoHide: t[7] || (t[7] = () => e.$emit("auto-hide")),
|
|
7465
7493
|
onResize: t[8] || (t[8] = () => e.$emit("resize"))
|
|
7466
7494
|
}), {
|
|
7467
|
-
default: withCtx(({ popperId: l
|
|
7468
|
-
shown: u
|
|
7469
|
-
show: F
|
|
7470
|
-
hide: v
|
|
7471
|
-
}), createVNode(p
|
|
7495
|
+
default: withCtx(({ popperId: l, isShown: u, shouldMountContent: L, skipTransition: D, autoHide: I, show: F, hide: v, handleResize: R, onResize: j, classes: V, result: Ee }) => [renderSlot(e.$slots, "default", {
|
|
7496
|
+
shown: u,
|
|
7497
|
+
show: F,
|
|
7498
|
+
hide: v
|
|
7499
|
+
}), createVNode(p, {
|
|
7472
7500
|
ref: "popperContent",
|
|
7473
|
-
"popper-id": l
|
|
7501
|
+
"popper-id": l,
|
|
7474
7502
|
theme: e.finalTheme,
|
|
7475
|
-
shown: u
|
|
7476
|
-
mounted: L
|
|
7477
|
-
"skip-transition": D
|
|
7503
|
+
shown: u,
|
|
7504
|
+
mounted: L,
|
|
7505
|
+
"skip-transition": D,
|
|
7478
7506
|
"auto-hide": I,
|
|
7479
|
-
"handle-resize": R
|
|
7507
|
+
"handle-resize": R,
|
|
7480
7508
|
classes: V,
|
|
7481
7509
|
result: Ee,
|
|
7482
|
-
onHide: v
|
|
7510
|
+
onHide: v,
|
|
7483
7511
|
onResize: j
|
|
7484
7512
|
}, {
|
|
7485
7513
|
default: withCtx(() => [renderSlot(e.$slots, "popper", {
|
|
7486
|
-
shown: u
|
|
7487
|
-
hide: v
|
|
7514
|
+
shown: u,
|
|
7515
|
+
hide: v
|
|
7488
7516
|
})]),
|
|
7489
7517
|
_: 2
|
|
7490
7518
|
}, 1032, [
|
|
@@ -7586,8 +7614,8 @@ var k = /* @__PURE__ */ B(gt, [["render", wt]]), Se = {
|
|
|
7586
7614
|
fetchContent(e) {
|
|
7587
7615
|
if (typeof this.content == "function" && this.$_isShown && (e || !this.$_loading && this.asyncContent == null)) {
|
|
7588
7616
|
this.asyncContent = null, this.$_loading = !0;
|
|
7589
|
-
const t = ++this.$_fetchId, o
|
|
7590
|
-
o
|
|
7617
|
+
const t = ++this.$_fetchId, o = this.content(this);
|
|
7618
|
+
o.then ? o.then((i) => this.onResult(t, i)) : this.onResult(t, o);
|
|
7591
7619
|
}
|
|
7592
7620
|
},
|
|
7593
7621
|
onResult(e, t) {
|
|
@@ -7601,29 +7629,29 @@ var k = /* @__PURE__ */ B(gt, [["render", wt]]), Se = {
|
|
|
7601
7629
|
}
|
|
7602
7630
|
}
|
|
7603
7631
|
}), vt = ["innerHTML"], yt = ["textContent"];
|
|
7604
|
-
function _t(e, t, o
|
|
7605
|
-
const p
|
|
7606
|
-
return openBlock(), createBlock(a
|
|
7632
|
+
function _t(e, t, o, i, s, r) {
|
|
7633
|
+
const p = resolveComponent("PopperContent"), a = resolveComponent("Popper");
|
|
7634
|
+
return openBlock(), createBlock(a, mergeProps({ ref: "popper" }, e.$attrs, {
|
|
7607
7635
|
theme: e.theme,
|
|
7608
7636
|
"target-nodes": e.targetNodes,
|
|
7609
7637
|
"popper-node": () => e.$refs.popperContent.$el,
|
|
7610
7638
|
onApplyShow: e.onShow,
|
|
7611
7639
|
onApplyHide: e.onHide
|
|
7612
7640
|
}), {
|
|
7613
|
-
default: withCtx(({ popperId: l
|
|
7641
|
+
default: withCtx(({ popperId: l, isShown: u, shouldMountContent: L, skipTransition: D, autoHide: I, hide: F, handleResize: v, onResize: R, classes: j, result: V }) => [createVNode(p, {
|
|
7614
7642
|
ref: "popperContent",
|
|
7615
7643
|
class: normalizeClass({ "v-popper--tooltip-loading": e.loading }),
|
|
7616
|
-
"popper-id": l
|
|
7644
|
+
"popper-id": l,
|
|
7617
7645
|
theme: e.theme,
|
|
7618
|
-
shown: u
|
|
7619
|
-
mounted: L
|
|
7620
|
-
"skip-transition": D
|
|
7646
|
+
shown: u,
|
|
7647
|
+
mounted: L,
|
|
7648
|
+
"skip-transition": D,
|
|
7621
7649
|
"auto-hide": I,
|
|
7622
|
-
"handle-resize": v
|
|
7650
|
+
"handle-resize": v,
|
|
7623
7651
|
classes: j,
|
|
7624
7652
|
result: V,
|
|
7625
|
-
onHide: F
|
|
7626
|
-
onResize: R
|
|
7653
|
+
onHide: F,
|
|
7654
|
+
onResize: R
|
|
7627
7655
|
}, {
|
|
7628
7656
|
default: withCtx(() => [e.html ? (openBlock(), createElementBlock("div", {
|
|
7629
7657
|
key: 0,
|
|
@@ -7658,19 +7686,19 @@ function _t(e, t, o$1, i$1, s$1, r$1) {
|
|
|
7658
7686
|
}
|
|
7659
7687
|
var ze = /* @__PURE__ */ B($t, [["render", _t]]), Ae = "v-popper--has-tooltip";
|
|
7660
7688
|
function Tt(e, t) {
|
|
7661
|
-
let o
|
|
7662
|
-
if (!o
|
|
7663
|
-
return o
|
|
7689
|
+
let o = e.placement;
|
|
7690
|
+
if (!o && t) for (const i of Te) t[i] && (o = i);
|
|
7691
|
+
return o || (o = S(e.theme || "tooltip", "placement")), o;
|
|
7664
7692
|
}
|
|
7665
|
-
function Ne(e, t, o
|
|
7666
|
-
let i
|
|
7667
|
-
const s
|
|
7668
|
-
return s
|
|
7693
|
+
function Ne(e, t, o) {
|
|
7694
|
+
let i;
|
|
7695
|
+
const s = typeof t;
|
|
7696
|
+
return s === "string" ? i = { content: t } : t && s === "object" ? i = t : i = { content: !1 }, i.placement = Tt(i, o), i.targetNodes = () => [e], i.referenceNode = () => e, i;
|
|
7669
7697
|
}
|
|
7670
7698
|
var x, b, Pt = 0;
|
|
7671
7699
|
function St() {
|
|
7672
7700
|
if (x) return;
|
|
7673
|
-
b = ref([]), x = createApp({
|
|
7701
|
+
b = /* @__PURE__ */ ref([]), x = createApp({
|
|
7674
7702
|
name: "VTooltipDirectiveApp",
|
|
7675
7703
|
setup() {
|
|
7676
7704
|
return { directives: b };
|
|
@@ -7687,21 +7715,21 @@ function St() {
|
|
|
7687
7715
|
const e = document.createElement("div");
|
|
7688
7716
|
document.body.appendChild(e), x.mount(e);
|
|
7689
7717
|
}
|
|
7690
|
-
function bt(e, t, o
|
|
7718
|
+
function bt(e, t, o) {
|
|
7691
7719
|
St();
|
|
7692
|
-
const i
|
|
7720
|
+
const i = /* @__PURE__ */ ref(Ne(e, t, o)), s = /* @__PURE__ */ ref(!1), r = {
|
|
7693
7721
|
id: Pt++,
|
|
7694
|
-
options: i
|
|
7695
|
-
shown: s
|
|
7722
|
+
options: i,
|
|
7723
|
+
shown: s
|
|
7696
7724
|
};
|
|
7697
|
-
return b.value.push(r
|
|
7698
|
-
options: i
|
|
7699
|
-
item: r
|
|
7725
|
+
return b.value.push(r), e.classList && e.classList.add(Ae), e.$_popper = {
|
|
7726
|
+
options: i,
|
|
7727
|
+
item: r,
|
|
7700
7728
|
show() {
|
|
7701
|
-
s
|
|
7729
|
+
s.value = !0;
|
|
7702
7730
|
},
|
|
7703
7731
|
hide() {
|
|
7704
|
-
s
|
|
7732
|
+
s.value = !1;
|
|
7705
7733
|
}
|
|
7706
7734
|
};
|
|
7707
7735
|
}
|
|
@@ -7712,12 +7740,12 @@ function He(e) {
|
|
|
7712
7740
|
}
|
|
7713
7741
|
e.classList && e.classList.remove(Ae);
|
|
7714
7742
|
}
|
|
7715
|
-
function me(e, { value: t, modifiers: o
|
|
7716
|
-
const i
|
|
7717
|
-
if (!i
|
|
7743
|
+
function me(e, { value: t, modifiers: o }) {
|
|
7744
|
+
const i = Ne(e, t, o);
|
|
7745
|
+
if (!i.content || S(i.theme || "tooltip", "disabled")) He(e);
|
|
7718
7746
|
else {
|
|
7719
|
-
let s
|
|
7720
|
-
e.$_popper ? (s
|
|
7747
|
+
let s;
|
|
7748
|
+
e.$_popper ? (s = e.$_popper, s.options.value = i) : s = bt(e, t, o), typeof t.shown < "u" && t.shown !== e.$_popperOldShown && (e.$_popperOldShown = t.shown, t.shown ? s.show() : s.hide());
|
|
7721
7749
|
}
|
|
7722
7750
|
}
|
|
7723
7751
|
var oe = {
|
|
@@ -7747,8 +7775,8 @@ function Oe(e) {
|
|
|
7747
7775
|
function Me(e) {
|
|
7748
7776
|
const t = e.currentTarget;
|
|
7749
7777
|
if (t.$_vclosepopover_touch = !1, e.changedTouches.length === 1) {
|
|
7750
|
-
const o
|
|
7751
|
-
e.closePopover = Math.abs(o
|
|
7778
|
+
const o = e.changedTouches[0], i = t.$_vclosepopover_touchPoint;
|
|
7779
|
+
e.closePopover = Math.abs(o.screenY - i.screenY) < 20 && Math.abs(o.screenX - i.screenX) < 20, e.closeAllPopover = t.$_closePopoverModifiers && !!t.$_closePopoverModifiers.all;
|
|
7752
7780
|
}
|
|
7753
7781
|
}
|
|
7754
7782
|
function Be(e) {
|
|
@@ -7756,11 +7784,11 @@ function Be(e) {
|
|
|
7756
7784
|
t.$_vclosepopover_touch = !1;
|
|
7757
7785
|
}
|
|
7758
7786
|
var ie = {
|
|
7759
|
-
beforeMount(e, { value: t, modifiers: o
|
|
7760
|
-
e.$_closePopoverModifiers = o
|
|
7787
|
+
beforeMount(e, { value: t, modifiers: o }) {
|
|
7788
|
+
e.$_closePopoverModifiers = o, (typeof t > "u" || t) && ge(e);
|
|
7761
7789
|
},
|
|
7762
|
-
updated(e, { value: t, oldValue: o
|
|
7763
|
-
e.$_closePopoverModifiers = i
|
|
7790
|
+
updated(e, { value: t, oldValue: o, modifiers: i }) {
|
|
7791
|
+
e.$_closePopoverModifiers = i, t !== o && (typeof t > "u" || t ? ge(e) : we(e));
|
|
7764
7792
|
},
|
|
7765
7793
|
beforeUnmount(e) {
|
|
7766
7794
|
we(e);
|
|
@@ -7797,6 +7825,30 @@ function mergeOptions(defaults, partialOptions) {
|
|
|
7797
7825
|
for (const key in defaults) options[key] = key in partialOptions ? partialOptions[key] : defaults[key];
|
|
7798
7826
|
return options;
|
|
7799
7827
|
}
|
|
7828
|
+
var ErrorTypes = /* @__PURE__ */ function(ErrorTypes) {
|
|
7829
|
+
ErrorTypes[ErrorTypes["MATCHER_NOT_FOUND"] = 1] = "MATCHER_NOT_FOUND";
|
|
7830
|
+
ErrorTypes[ErrorTypes["NAVIGATION_GUARD_REDIRECT"] = 2] = "NAVIGATION_GUARD_REDIRECT";
|
|
7831
|
+
ErrorTypes[ErrorTypes["NAVIGATION_ABORTED"] = 4] = "NAVIGATION_ABORTED";
|
|
7832
|
+
ErrorTypes[ErrorTypes["NAVIGATION_CANCELLED"] = 8] = "NAVIGATION_CANCELLED";
|
|
7833
|
+
ErrorTypes[ErrorTypes["NAVIGATION_DUPLICATED"] = 16] = "NAVIGATION_DUPLICATED";
|
|
7834
|
+
return ErrorTypes;
|
|
7835
|
+
}({});
|
|
7836
|
+
var NavigationFailureSymbol = Symbol("");
|
|
7837
|
+
ErrorTypes.MATCHER_NOT_FOUND, ErrorTypes.NAVIGATION_GUARD_REDIRECT, ErrorTypes.NAVIGATION_ABORTED, ErrorTypes.NAVIGATION_CANCELLED, ErrorTypes.NAVIGATION_DUPLICATED;
|
|
7838
|
+
function createRouterError(type, params) {
|
|
7839
|
+
return assign(/* @__PURE__ */ new Error(), {
|
|
7840
|
+
type,
|
|
7841
|
+
[NavigationFailureSymbol]: true
|
|
7842
|
+
}, params);
|
|
7843
|
+
}
|
|
7844
|
+
function isNavigationFailure(error, type) {
|
|
7845
|
+
return error instanceof Error && NavigationFailureSymbol in error && (type == null || !!(error.type & type));
|
|
7846
|
+
}
|
|
7847
|
+
var matchedRouteKey = Symbol("");
|
|
7848
|
+
var viewDepthKey = Symbol("");
|
|
7849
|
+
var routerKey = Symbol("");
|
|
7850
|
+
var routeLocationKey = Symbol("");
|
|
7851
|
+
var routerViewLocationKey = Symbol("");
|
|
7800
7852
|
var HASH_RE = /#/g;
|
|
7801
7853
|
var AMPERSAND_RE = /&/g;
|
|
7802
7854
|
var SLASH_RE = /\//g;
|
|
@@ -7838,21 +7890,21 @@ function decode(text) {
|
|
|
7838
7890
|
}
|
|
7839
7891
|
var TRAILING_SLASH_RE = /\/$/;
|
|
7840
7892
|
var removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, "");
|
|
7841
|
-
function parseURL(parseQuery
|
|
7893
|
+
function parseURL(parseQuery, location, currentLocation = "/") {
|
|
7842
7894
|
let path, query = {}, searchString = "", hash = "";
|
|
7843
|
-
const hashPos = location
|
|
7844
|
-
let searchPos = location
|
|
7895
|
+
const hashPos = location.indexOf("#");
|
|
7896
|
+
let searchPos = location.indexOf("?");
|
|
7845
7897
|
searchPos = hashPos >= 0 && searchPos > hashPos ? -1 : searchPos;
|
|
7846
7898
|
if (searchPos >= 0) {
|
|
7847
|
-
path = location
|
|
7848
|
-
searchString = location
|
|
7849
|
-
query = parseQuery
|
|
7899
|
+
path = location.slice(0, searchPos);
|
|
7900
|
+
searchString = location.slice(searchPos, hashPos > 0 ? hashPos : location.length);
|
|
7901
|
+
query = parseQuery(searchString.slice(1));
|
|
7850
7902
|
}
|
|
7851
7903
|
if (hashPos >= 0) {
|
|
7852
|
-
path = path || location
|
|
7853
|
-
hash = location
|
|
7904
|
+
path = path || location.slice(0, hashPos);
|
|
7905
|
+
hash = location.slice(hashPos, location.length);
|
|
7854
7906
|
}
|
|
7855
|
-
path = resolveRelativePath(path != null ? path : location
|
|
7907
|
+
path = resolveRelativePath(path != null ? path : location, currentLocation);
|
|
7856
7908
|
return {
|
|
7857
7909
|
fullPath: path + searchString + hash,
|
|
7858
7910
|
path,
|
|
@@ -7860,32 +7912,32 @@ function parseURL(parseQuery$1, location$1, currentLocation = "/") {
|
|
|
7860
7912
|
hash: decode(hash)
|
|
7861
7913
|
};
|
|
7862
7914
|
}
|
|
7863
|
-
function stringifyURL(stringifyQuery
|
|
7864
|
-
const query = location
|
|
7865
|
-
return location
|
|
7915
|
+
function stringifyURL(stringifyQuery, location) {
|
|
7916
|
+
const query = location.query ? stringifyQuery(location.query) : "";
|
|
7917
|
+
return location.path + (query && "?") + query + (location.hash || "");
|
|
7866
7918
|
}
|
|
7867
7919
|
function stripBase(pathname, base) {
|
|
7868
7920
|
if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase())) return pathname;
|
|
7869
7921
|
return pathname.slice(base.length) || "/";
|
|
7870
7922
|
}
|
|
7871
|
-
function isSameRouteLocation(stringifyQuery
|
|
7872
|
-
const aLastIndex = a
|
|
7873
|
-
const bLastIndex = b
|
|
7874
|
-
return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a
|
|
7923
|
+
function isSameRouteLocation(stringifyQuery, a, b) {
|
|
7924
|
+
const aLastIndex = a.matched.length - 1;
|
|
7925
|
+
const bLastIndex = b.matched.length - 1;
|
|
7926
|
+
return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery(a.query) === stringifyQuery(b.query) && a.hash === b.hash;
|
|
7875
7927
|
}
|
|
7876
|
-
function isSameRouteRecord(a
|
|
7877
|
-
return (a
|
|
7928
|
+
function isSameRouteRecord(a, b) {
|
|
7929
|
+
return (a.aliasOf || a) === (b.aliasOf || b);
|
|
7878
7930
|
}
|
|
7879
|
-
function isSameRouteLocationParams(a
|
|
7880
|
-
if (Object.keys(a
|
|
7881
|
-
for (var key in a
|
|
7931
|
+
function isSameRouteLocationParams(a, b) {
|
|
7932
|
+
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
7933
|
+
for (var key in a) if (!isSameRouteLocationParamsValue(a[key], b[key])) return false;
|
|
7882
7934
|
return true;
|
|
7883
7935
|
}
|
|
7884
|
-
function isSameRouteLocationParamsValue(a
|
|
7885
|
-
return isArray(a
|
|
7936
|
+
function isSameRouteLocationParamsValue(a, b) {
|
|
7937
|
+
return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : (a && a.valueOf()) === (b && b.valueOf());
|
|
7886
7938
|
}
|
|
7887
|
-
function isEquivalentArray(a
|
|
7888
|
-
return isArray(b
|
|
7939
|
+
function isEquivalentArray(a, b) {
|
|
7940
|
+
return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;
|
|
7889
7941
|
}
|
|
7890
7942
|
function resolveRelativePath(to, from) {
|
|
7891
7943
|
if (to.startsWith("/")) return to;
|
|
@@ -7917,16 +7969,16 @@ var START_LOCATION_NORMALIZED = {
|
|
|
7917
7969
|
meta: {},
|
|
7918
7970
|
redirectedFrom: void 0
|
|
7919
7971
|
};
|
|
7920
|
-
var NavigationType = /* @__PURE__ */ function(NavigationType
|
|
7921
|
-
NavigationType
|
|
7922
|
-
NavigationType
|
|
7923
|
-
return NavigationType
|
|
7972
|
+
var NavigationType = /* @__PURE__ */ function(NavigationType) {
|
|
7973
|
+
NavigationType["pop"] = "pop";
|
|
7974
|
+
NavigationType["push"] = "push";
|
|
7975
|
+
return NavigationType;
|
|
7924
7976
|
}({});
|
|
7925
|
-
var NavigationDirection = /* @__PURE__ */ function(NavigationDirection
|
|
7926
|
-
NavigationDirection
|
|
7927
|
-
NavigationDirection
|
|
7928
|
-
NavigationDirection
|
|
7929
|
-
return NavigationDirection
|
|
7977
|
+
var NavigationDirection = /* @__PURE__ */ function(NavigationDirection) {
|
|
7978
|
+
NavigationDirection["back"] = "back";
|
|
7979
|
+
NavigationDirection["forward"] = "forward";
|
|
7980
|
+
NavigationDirection["unknown"] = "";
|
|
7981
|
+
return NavigationDirection;
|
|
7930
7982
|
}({});
|
|
7931
7983
|
function normalizeBase(base) {
|
|
7932
7984
|
if (!base) if (isBrowser) {
|
|
@@ -7938,16 +7990,16 @@ function normalizeBase(base) {
|
|
|
7938
7990
|
return removeTrailingSlash(base);
|
|
7939
7991
|
}
|
|
7940
7992
|
var BEFORE_HASH_RE = /^[^#]+#/;
|
|
7941
|
-
function createHref(base, location
|
|
7942
|
-
return base.replace(BEFORE_HASH_RE, "#") + location
|
|
7993
|
+
function createHref(base, location) {
|
|
7994
|
+
return base.replace(BEFORE_HASH_RE, "#") + location;
|
|
7943
7995
|
}
|
|
7944
|
-
function getElementPosition(el, offset
|
|
7996
|
+
function getElementPosition(el, offset) {
|
|
7945
7997
|
const docRect = document.documentElement.getBoundingClientRect();
|
|
7946
7998
|
const elRect = el.getBoundingClientRect();
|
|
7947
7999
|
return {
|
|
7948
|
-
behavior: offset
|
|
7949
|
-
left: elRect.left - docRect.left - (offset
|
|
7950
|
-
top: elRect.top - docRect.top - (offset
|
|
8000
|
+
behavior: offset.behavior,
|
|
8001
|
+
left: elRect.left - docRect.left - (offset.left || 0),
|
|
8002
|
+
top: elRect.top - docRect.top - (offset.top || 0)
|
|
7951
8003
|
};
|
|
7952
8004
|
}
|
|
7953
8005
|
var computeScrollPosition = () => ({
|
|
@@ -7984,31 +8036,12 @@ function isRouteLocation(route) {
|
|
|
7984
8036
|
function isRouteName(name) {
|
|
7985
8037
|
return typeof name === "string" || typeof name === "symbol";
|
|
7986
8038
|
}
|
|
7987
|
-
var ErrorTypes = /* @__PURE__ */ function(ErrorTypes$1) {
|
|
7988
|
-
ErrorTypes$1[ErrorTypes$1["MATCHER_NOT_FOUND"] = 1] = "MATCHER_NOT_FOUND";
|
|
7989
|
-
ErrorTypes$1[ErrorTypes$1["NAVIGATION_GUARD_REDIRECT"] = 2] = "NAVIGATION_GUARD_REDIRECT";
|
|
7990
|
-
ErrorTypes$1[ErrorTypes$1["NAVIGATION_ABORTED"] = 4] = "NAVIGATION_ABORTED";
|
|
7991
|
-
ErrorTypes$1[ErrorTypes$1["NAVIGATION_CANCELLED"] = 8] = "NAVIGATION_CANCELLED";
|
|
7992
|
-
ErrorTypes$1[ErrorTypes$1["NAVIGATION_DUPLICATED"] = 16] = "NAVIGATION_DUPLICATED";
|
|
7993
|
-
return ErrorTypes$1;
|
|
7994
|
-
}({});
|
|
7995
|
-
var NavigationFailureSymbol = Symbol("");
|
|
7996
|
-
ErrorTypes.MATCHER_NOT_FOUND, ErrorTypes.NAVIGATION_GUARD_REDIRECT, ErrorTypes.NAVIGATION_ABORTED, ErrorTypes.NAVIGATION_CANCELLED, ErrorTypes.NAVIGATION_DUPLICATED;
|
|
7997
|
-
function createRouterError(type, params) {
|
|
7998
|
-
return assign(/* @__PURE__ */ new Error(), {
|
|
7999
|
-
type,
|
|
8000
|
-
[NavigationFailureSymbol]: true
|
|
8001
|
-
}, params);
|
|
8002
|
-
}
|
|
8003
|
-
function isNavigationFailure(error, type) {
|
|
8004
|
-
return error instanceof Error && NavigationFailureSymbol in error && (type == null || !!(error.type & type));
|
|
8005
|
-
}
|
|
8006
8039
|
function parseQuery(search) {
|
|
8007
8040
|
const query = {};
|
|
8008
8041
|
if (search === "" || search === "?") return query;
|
|
8009
8042
|
const searchParams = (search[0] === "?" ? search.slice(1) : search).split("&");
|
|
8010
|
-
for (let i
|
|
8011
|
-
const searchParam = searchParams[i
|
|
8043
|
+
for (let i = 0; i < searchParams.length; ++i) {
|
|
8044
|
+
const searchParam = searchParams[i].replace(PLUS_RE, " ");
|
|
8012
8045
|
const eqPos = searchParam.indexOf("=");
|
|
8013
8046
|
const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));
|
|
8014
8047
|
const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));
|
|
@@ -8029,10 +8062,10 @@ function stringifyQuery(query) {
|
|
|
8029
8062
|
if (value !== void 0) search += (search.length ? "&" : "") + key;
|
|
8030
8063
|
continue;
|
|
8031
8064
|
}
|
|
8032
|
-
(isArray(value) ? value.map((v
|
|
8033
|
-
if (value
|
|
8065
|
+
(isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)]).forEach((value) => {
|
|
8066
|
+
if (value !== void 0) {
|
|
8034
8067
|
search += (search.length ? "&" : "") + key;
|
|
8035
|
-
if (value
|
|
8068
|
+
if (value != null) search += "=" + value;
|
|
8036
8069
|
}
|
|
8037
8070
|
});
|
|
8038
8071
|
}
|
|
@@ -8042,22 +8075,17 @@ function normalizeQuery(query) {
|
|
|
8042
8075
|
const normalizedQuery = {};
|
|
8043
8076
|
for (const key in query) {
|
|
8044
8077
|
const value = query[key];
|
|
8045
|
-
if (value !== void 0) normalizedQuery[key] = isArray(value) ? value.map((v
|
|
8078
|
+
if (value !== void 0) normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : "" + v) : value == null ? value : "" + value;
|
|
8046
8079
|
}
|
|
8047
8080
|
return normalizedQuery;
|
|
8048
8081
|
}
|
|
8049
|
-
var matchedRouteKey = Symbol("");
|
|
8050
|
-
var viewDepthKey = Symbol("");
|
|
8051
|
-
var routerKey = Symbol("");
|
|
8052
|
-
var routeLocationKey = Symbol("");
|
|
8053
|
-
var routerViewLocationKey = Symbol("");
|
|
8054
8082
|
function useCallbacks() {
|
|
8055
8083
|
let handlers = [];
|
|
8056
8084
|
function add(handler) {
|
|
8057
8085
|
handlers.push(handler);
|
|
8058
8086
|
return () => {
|
|
8059
|
-
const i
|
|
8060
|
-
if (i
|
|
8087
|
+
const i = handlers.indexOf(handler);
|
|
8088
|
+
if (i > -1) handlers.splice(i, 1);
|
|
8061
8089
|
};
|
|
8062
8090
|
}
|
|
8063
8091
|
function reset() {
|
|
@@ -8071,7 +8099,7 @@ function useCallbacks() {
|
|
|
8071
8099
|
}
|
|
8072
8100
|
function guardToPromiseFn(guard, to, from, record, name, runWithContext = (fn) => fn()) {
|
|
8073
8101
|
const enterCallbackArray = record && (record.enterCallbacks[name] = record.enterCallbacks[name] || []);
|
|
8074
|
-
return () => new Promise((resolve
|
|
8102
|
+
return () => new Promise((resolve, reject) => {
|
|
8075
8103
|
const next = (valid) => {
|
|
8076
8104
|
if (valid === false) reject(createRouterError(ErrorTypes.NAVIGATION_ABORTED, {
|
|
8077
8105
|
from,
|
|
@@ -8084,7 +8112,7 @@ function guardToPromiseFn(guard, to, from, record, name, runWithContext = (fn) =
|
|
|
8084
8112
|
}));
|
|
8085
8113
|
else {
|
|
8086
8114
|
if (enterCallbackArray && record.enterCallbacks[name] === enterCallbackArray && typeof valid === "function") enterCallbackArray.push(valid);
|
|
8087
|
-
resolve
|
|
8115
|
+
resolve();
|
|
8088
8116
|
}
|
|
8089
8117
|
};
|
|
8090
8118
|
const guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, next));
|
|
@@ -8120,11 +8148,11 @@ function extractChangingRecords(to, from) {
|
|
|
8120
8148
|
const updatingRecords = [];
|
|
8121
8149
|
const enteringRecords = [];
|
|
8122
8150
|
const len = Math.max(from.matched.length, to.matched.length);
|
|
8123
|
-
for (let i
|
|
8124
|
-
const recordFrom = from.matched[i
|
|
8151
|
+
for (let i = 0; i < len; i++) {
|
|
8152
|
+
const recordFrom = from.matched[i];
|
|
8125
8153
|
if (recordFrom) if (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) updatingRecords.push(recordFrom);
|
|
8126
8154
|
else leavingRecords.push(recordFrom);
|
|
8127
|
-
const recordTo = to.matched[i
|
|
8155
|
+
const recordTo = to.matched[i];
|
|
8128
8156
|
if (recordTo) {
|
|
8129
8157
|
if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) enteringRecords.push(recordTo);
|
|
8130
8158
|
}
|
|
@@ -8136,8 +8164,8 @@ function extractChangingRecords(to, from) {
|
|
|
8136
8164
|
];
|
|
8137
8165
|
}
|
|
8138
8166
|
var createBaseLocation = () => location.protocol + "//" + location.host;
|
|
8139
|
-
function createCurrentLocation(base, location
|
|
8140
|
-
const { pathname, search, hash } = location
|
|
8167
|
+
function createCurrentLocation(base, location) {
|
|
8168
|
+
const { pathname, search, hash } = location;
|
|
8141
8169
|
const hashPos = base.indexOf("#");
|
|
8142
8170
|
if (hashPos > -1) {
|
|
8143
8171
|
let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;
|
|
@@ -8187,9 +8215,9 @@ function useHistoryListeners(base, historyState, currentLocation, replace) {
|
|
|
8187
8215
|
}
|
|
8188
8216
|
function beforeUnloadListener() {
|
|
8189
8217
|
if (document.visibilityState === "hidden") {
|
|
8190
|
-
const { history
|
|
8191
|
-
if (!history
|
|
8192
|
-
history
|
|
8218
|
+
const { history } = window;
|
|
8219
|
+
if (!history.state) return;
|
|
8220
|
+
history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), "");
|
|
8193
8221
|
}
|
|
8194
8222
|
}
|
|
8195
8223
|
function destroy() {
|
|
@@ -8219,34 +8247,34 @@ function buildState(back, current, forward, replaced = false, computeScroll = fa
|
|
|
8219
8247
|
};
|
|
8220
8248
|
}
|
|
8221
8249
|
function useHistoryStateNavigation(base) {
|
|
8222
|
-
const { history
|
|
8223
|
-
const currentLocation = { value: createCurrentLocation(base, location
|
|
8224
|
-
const historyState = { value: history
|
|
8250
|
+
const { history, location } = window;
|
|
8251
|
+
const currentLocation = { value: createCurrentLocation(base, location) };
|
|
8252
|
+
const historyState = { value: history.state };
|
|
8225
8253
|
if (!historyState.value) changeLocation(currentLocation.value, {
|
|
8226
8254
|
back: null,
|
|
8227
8255
|
current: currentLocation.value,
|
|
8228
8256
|
forward: null,
|
|
8229
|
-
position: history
|
|
8257
|
+
position: history.length - 1,
|
|
8230
8258
|
replaced: true,
|
|
8231
8259
|
scroll: null
|
|
8232
8260
|
}, true);
|
|
8233
|
-
function changeLocation(to, state, replace
|
|
8261
|
+
function changeLocation(to, state, replace) {
|
|
8234
8262
|
const hashIndex = base.indexOf("#");
|
|
8235
|
-
const url = hashIndex > -1 ? (location
|
|
8263
|
+
const url = hashIndex > -1 ? (location.host && document.querySelector("base") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;
|
|
8236
8264
|
try {
|
|
8237
|
-
history
|
|
8265
|
+
history[replace ? "replaceState" : "pushState"](state, "", url);
|
|
8238
8266
|
historyState.value = state;
|
|
8239
8267
|
} catch (err) {
|
|
8240
8268
|
console.error(err);
|
|
8241
|
-
location
|
|
8269
|
+
location[replace ? "replace" : "assign"](url);
|
|
8242
8270
|
}
|
|
8243
8271
|
}
|
|
8244
8272
|
function replace(to, data) {
|
|
8245
|
-
changeLocation(to, assign({}, history
|
|
8273
|
+
changeLocation(to, assign({}, history.state, buildState(historyState.value.back, to, historyState.value.forward, true), data, { position: historyState.value.position }), true);
|
|
8246
8274
|
currentLocation.value = to;
|
|
8247
8275
|
}
|
|
8248
8276
|
function push(to, data) {
|
|
8249
|
-
const currentState = assign({}, historyState.value, history
|
|
8277
|
+
const currentState = assign({}, historyState.value, history.state, {
|
|
8250
8278
|
forward: to,
|
|
8251
8279
|
scroll: computeScrollPosition()
|
|
8252
8280
|
});
|
|
@@ -8290,19 +8318,19 @@ function createWebHashHistory(base) {
|
|
|
8290
8318
|
if (!base.includes("#")) base += "#";
|
|
8291
8319
|
return createWebHistory(base);
|
|
8292
8320
|
}
|
|
8293
|
-
var TokenType = /* @__PURE__ */ function(TokenType
|
|
8294
|
-
TokenType
|
|
8295
|
-
TokenType
|
|
8296
|
-
TokenType
|
|
8297
|
-
return TokenType
|
|
8321
|
+
var TokenType = /* @__PURE__ */ function(TokenType) {
|
|
8322
|
+
TokenType[TokenType["Static"] = 0] = "Static";
|
|
8323
|
+
TokenType[TokenType["Param"] = 1] = "Param";
|
|
8324
|
+
TokenType[TokenType["Group"] = 2] = "Group";
|
|
8325
|
+
return TokenType;
|
|
8298
8326
|
}({});
|
|
8299
|
-
var TokenizerState = /* @__PURE__ */ function(TokenizerState
|
|
8300
|
-
TokenizerState
|
|
8301
|
-
TokenizerState
|
|
8302
|
-
TokenizerState
|
|
8303
|
-
TokenizerState
|
|
8304
|
-
TokenizerState
|
|
8305
|
-
return TokenizerState
|
|
8327
|
+
var TokenizerState = /* @__PURE__ */ function(TokenizerState) {
|
|
8328
|
+
TokenizerState[TokenizerState["Static"] = 0] = "Static";
|
|
8329
|
+
TokenizerState[TokenizerState["Param"] = 1] = "Param";
|
|
8330
|
+
TokenizerState[TokenizerState["ParamRegExp"] = 2] = "ParamRegExp";
|
|
8331
|
+
TokenizerState[TokenizerState["ParamRegExpEnd"] = 3] = "ParamRegExpEnd";
|
|
8332
|
+
TokenizerState[TokenizerState["EscapeNext"] = 4] = "EscapeNext";
|
|
8333
|
+
return TokenizerState;
|
|
8306
8334
|
}(TokenizerState || {});
|
|
8307
8335
|
var ROOT_TOKEN = {
|
|
8308
8336
|
type: TokenType.Static,
|
|
@@ -8324,7 +8352,7 @@ function tokenizePath(path) {
|
|
|
8324
8352
|
if (segment) tokens.push(segment);
|
|
8325
8353
|
segment = [];
|
|
8326
8354
|
}
|
|
8327
|
-
let i
|
|
8355
|
+
let i = 0;
|
|
8328
8356
|
let char;
|
|
8329
8357
|
let buffer = "";
|
|
8330
8358
|
let customRe = "";
|
|
@@ -8349,8 +8377,8 @@ function tokenizePath(path) {
|
|
|
8349
8377
|
function addCharToBuffer() {
|
|
8350
8378
|
buffer += char;
|
|
8351
8379
|
}
|
|
8352
|
-
while (i
|
|
8353
|
-
char = path[i
|
|
8380
|
+
while (i < path.length) {
|
|
8381
|
+
char = path[i++];
|
|
8354
8382
|
if (char === "\\" && state !== TokenizerState.ParamRegExp) {
|
|
8355
8383
|
previousState = state;
|
|
8356
8384
|
state = TokenizerState.EscapeNext;
|
|
@@ -8376,7 +8404,7 @@ function tokenizePath(path) {
|
|
|
8376
8404
|
else {
|
|
8377
8405
|
consumeBuffer();
|
|
8378
8406
|
state = TokenizerState.Static;
|
|
8379
|
-
if (char !== "*" && char !== "?" && char !== "+") i
|
|
8407
|
+
if (char !== "*" && char !== "?" && char !== "+") i--;
|
|
8380
8408
|
}
|
|
8381
8409
|
break;
|
|
8382
8410
|
case TokenizerState.ParamRegExp:
|
|
@@ -8387,7 +8415,7 @@ function tokenizePath(path) {
|
|
|
8387
8415
|
case TokenizerState.ParamRegExpEnd:
|
|
8388
8416
|
consumeBuffer();
|
|
8389
8417
|
state = TokenizerState.Static;
|
|
8390
|
-
if (char !== "*" && char !== "?" && char !== "+") i
|
|
8418
|
+
if (char !== "*" && char !== "?" && char !== "+") i--;
|
|
8391
8419
|
customRe = "";
|
|
8392
8420
|
break;
|
|
8393
8421
|
default:
|
|
@@ -8407,20 +8435,20 @@ var BASE_PATH_PARSER_OPTIONS = {
|
|
|
8407
8435
|
start: true,
|
|
8408
8436
|
end: true
|
|
8409
8437
|
};
|
|
8410
|
-
var PathScore = /* @__PURE__ */ function(PathScore
|
|
8411
|
-
PathScore
|
|
8412
|
-
PathScore
|
|
8413
|
-
PathScore
|
|
8414
|
-
PathScore
|
|
8415
|
-
PathScore
|
|
8416
|
-
PathScore
|
|
8417
|
-
PathScore
|
|
8418
|
-
PathScore
|
|
8419
|
-
PathScore
|
|
8420
|
-
PathScore
|
|
8421
|
-
PathScore
|
|
8422
|
-
PathScore
|
|
8423
|
-
return PathScore
|
|
8438
|
+
var PathScore = /* @__PURE__ */ function(PathScore) {
|
|
8439
|
+
PathScore[PathScore["_multiplier"] = 10] = "_multiplier";
|
|
8440
|
+
PathScore[PathScore["Root"] = 90] = "Root";
|
|
8441
|
+
PathScore[PathScore["Segment"] = 40] = "Segment";
|
|
8442
|
+
PathScore[PathScore["SubSegment"] = 30] = "SubSegment";
|
|
8443
|
+
PathScore[PathScore["Static"] = 40] = "Static";
|
|
8444
|
+
PathScore[PathScore["Dynamic"] = 20] = "Dynamic";
|
|
8445
|
+
PathScore[PathScore["BonusCustomRegExp"] = 10] = "BonusCustomRegExp";
|
|
8446
|
+
PathScore[PathScore["BonusWildcard"] = -50] = "BonusWildcard";
|
|
8447
|
+
PathScore[PathScore["BonusRepeatable"] = -20] = "BonusRepeatable";
|
|
8448
|
+
PathScore[PathScore["BonusOptional"] = -8] = "BonusOptional";
|
|
8449
|
+
PathScore[PathScore["BonusStrict"] = .7000000000000001] = "BonusStrict";
|
|
8450
|
+
PathScore[PathScore["BonusCaseSensitive"] = .25] = "BonusCaseSensitive";
|
|
8451
|
+
return PathScore;
|
|
8424
8452
|
}(PathScore || {});
|
|
8425
8453
|
var REGEX_CHARS_RE = /[.+*?^${}()[\]/\\]/g;
|
|
8426
8454
|
function tokensToParser(segments, extraOptions) {
|
|
@@ -8445,43 +8473,43 @@ function tokensToParser(segments, extraOptions) {
|
|
|
8445
8473
|
repeatable,
|
|
8446
8474
|
optional
|
|
8447
8475
|
});
|
|
8448
|
-
const re
|
|
8449
|
-
if (re
|
|
8476
|
+
const re = regexp ? regexp : BASE_PARAM_PATTERN;
|
|
8477
|
+
if (re !== BASE_PARAM_PATTERN) {
|
|
8450
8478
|
subSegmentScore += PathScore.BonusCustomRegExp;
|
|
8451
8479
|
try {
|
|
8452
|
-
|
|
8480
|
+
new RegExp(`(${re})`);
|
|
8453
8481
|
} catch (err) {
|
|
8454
|
-
throw new Error(`Invalid custom RegExp for param "${value}" (${re
|
|
8482
|
+
throw new Error(`Invalid custom RegExp for param "${value}" (${re}): ` + err.message);
|
|
8455
8483
|
}
|
|
8456
8484
|
}
|
|
8457
|
-
let subPattern = repeatable ? `((?:${re
|
|
8485
|
+
let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;
|
|
8458
8486
|
if (!tokenIndex) subPattern = optional && segment.length < 2 ? `(?:/${subPattern})` : "/" + subPattern;
|
|
8459
8487
|
if (optional) subPattern += "?";
|
|
8460
8488
|
pattern += subPattern;
|
|
8461
8489
|
subSegmentScore += PathScore.Dynamic;
|
|
8462
8490
|
if (optional) subSegmentScore += PathScore.BonusOptional;
|
|
8463
8491
|
if (repeatable) subSegmentScore += PathScore.BonusRepeatable;
|
|
8464
|
-
if (re
|
|
8492
|
+
if (re === ".*") subSegmentScore += PathScore.BonusWildcard;
|
|
8465
8493
|
}
|
|
8466
8494
|
segmentScores.push(subSegmentScore);
|
|
8467
8495
|
}
|
|
8468
8496
|
score.push(segmentScores);
|
|
8469
8497
|
}
|
|
8470
8498
|
if (options.strict && options.end) {
|
|
8471
|
-
const i
|
|
8472
|
-
score[i
|
|
8499
|
+
const i = score.length - 1;
|
|
8500
|
+
score[i][score[i].length - 1] += PathScore.BonusStrict;
|
|
8473
8501
|
}
|
|
8474
8502
|
if (!options.strict) pattern += "/?";
|
|
8475
8503
|
if (options.end) pattern += "$";
|
|
8476
8504
|
else if (options.strict && !pattern.endsWith("/")) pattern += "(?:/|$)";
|
|
8477
|
-
const re
|
|
8505
|
+
const re = new RegExp(pattern, options.sensitive ? "" : "i");
|
|
8478
8506
|
function parse(path) {
|
|
8479
|
-
const match = path.match(re
|
|
8507
|
+
const match = path.match(re);
|
|
8480
8508
|
const params = {};
|
|
8481
8509
|
if (!match) return null;
|
|
8482
|
-
for (let i
|
|
8483
|
-
const value = match[i
|
|
8484
|
-
const key = keys[i
|
|
8510
|
+
for (let i = 1; i < match.length; i++) {
|
|
8511
|
+
const value = match[i] || "";
|
|
8512
|
+
const key = keys[i - 1];
|
|
8485
8513
|
params[key.name] = value && key.repeatable ? value.split("/") : value;
|
|
8486
8514
|
}
|
|
8487
8515
|
return params;
|
|
@@ -8508,32 +8536,32 @@ function tokensToParser(segments, extraOptions) {
|
|
|
8508
8536
|
return path || "/";
|
|
8509
8537
|
}
|
|
8510
8538
|
return {
|
|
8511
|
-
re
|
|
8539
|
+
re,
|
|
8512
8540
|
score,
|
|
8513
8541
|
keys,
|
|
8514
8542
|
parse,
|
|
8515
8543
|
stringify
|
|
8516
8544
|
};
|
|
8517
8545
|
}
|
|
8518
|
-
function compareScoreArray(a
|
|
8519
|
-
let i
|
|
8520
|
-
while (i
|
|
8521
|
-
const diff = b
|
|
8546
|
+
function compareScoreArray(a, b) {
|
|
8547
|
+
let i = 0;
|
|
8548
|
+
while (i < a.length && i < b.length) {
|
|
8549
|
+
const diff = b[i] - a[i];
|
|
8522
8550
|
if (diff) return diff;
|
|
8523
|
-
i
|
|
8551
|
+
i++;
|
|
8524
8552
|
}
|
|
8525
|
-
if (a
|
|
8526
|
-
else if (a
|
|
8553
|
+
if (a.length < b.length) return a.length === 1 && a[0] === PathScore.Static + PathScore.Segment ? -1 : 1;
|
|
8554
|
+
else if (a.length > b.length) return b.length === 1 && b[0] === PathScore.Static + PathScore.Segment ? 1 : -1;
|
|
8527
8555
|
return 0;
|
|
8528
8556
|
}
|
|
8529
|
-
function comparePathParserScore(a
|
|
8530
|
-
let i
|
|
8531
|
-
const aScore = a
|
|
8532
|
-
const bScore = b
|
|
8533
|
-
while (i
|
|
8534
|
-
const comp = compareScoreArray(aScore[i
|
|
8557
|
+
function comparePathParserScore(a, b) {
|
|
8558
|
+
let i = 0;
|
|
8559
|
+
const aScore = a.score;
|
|
8560
|
+
const bScore = b.score;
|
|
8561
|
+
while (i < aScore.length && i < bScore.length) {
|
|
8562
|
+
const comp = compareScoreArray(aScore[i], bScore[i]);
|
|
8535
8563
|
if (comp) return comp;
|
|
8536
|
-
i
|
|
8564
|
+
i++;
|
|
8537
8565
|
}
|
|
8538
8566
|
if (Math.abs(bScore.length - aScore.length) === 1) {
|
|
8539
8567
|
if (isLastScoreNegative(aScore)) return 1;
|
|
@@ -8562,7 +8590,7 @@ function createRouteRecordMatcher(record, parent, options) {
|
|
|
8562
8590
|
}
|
|
8563
8591
|
return matcher;
|
|
8564
8592
|
}
|
|
8565
|
-
function createRouterMatcher(routes
|
|
8593
|
+
function createRouterMatcher(routes, globalOptions) {
|
|
8566
8594
|
const matchers = [];
|
|
8567
8595
|
const matcherMap = /* @__PURE__ */ new Map();
|
|
8568
8596
|
globalOptions = mergeOptions(PATH_PARSER_OPTIONS_DEFAULTS, globalOptions);
|
|
@@ -8602,7 +8630,7 @@ function createRouterMatcher(routes$1, globalOptions) {
|
|
|
8602
8630
|
if (isMatchable(matcher)) insertMatcher(matcher);
|
|
8603
8631
|
if (mainNormalizedRecord.children) {
|
|
8604
8632
|
const children = mainNormalizedRecord.children;
|
|
8605
|
-
for (let i
|
|
8633
|
+
for (let i = 0; i < children.length; i++) addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);
|
|
8606
8634
|
}
|
|
8607
8635
|
originalRecord = originalRecord || matcher;
|
|
8608
8636
|
}
|
|
@@ -8637,32 +8665,32 @@ function createRouterMatcher(routes$1, globalOptions) {
|
|
|
8637
8665
|
matchers.splice(index, 0, matcher);
|
|
8638
8666
|
if (matcher.record.name && !isAliasRecord(matcher)) matcherMap.set(matcher.record.name, matcher);
|
|
8639
8667
|
}
|
|
8640
|
-
function resolve
|
|
8668
|
+
function resolve(location, currentLocation) {
|
|
8641
8669
|
let matcher;
|
|
8642
8670
|
let params = {};
|
|
8643
8671
|
let path;
|
|
8644
8672
|
let name;
|
|
8645
|
-
if ("name" in location
|
|
8646
|
-
matcher = matcherMap.get(location
|
|
8647
|
-
if (!matcher) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, { location
|
|
8673
|
+
if ("name" in location && location.name) {
|
|
8674
|
+
matcher = matcherMap.get(location.name);
|
|
8675
|
+
if (!matcher) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, { location });
|
|
8648
8676
|
name = matcher.record.name;
|
|
8649
|
-
params = assign(pickParams(currentLocation.params, matcher.keys.filter((k
|
|
8677
|
+
params = assign(pickParams(currentLocation.params, matcher.keys.filter((k) => !k.optional).concat(matcher.parent ? matcher.parent.keys.filter((k) => k.optional) : []).map((k) => k.name)), location.params && pickParams(location.params, matcher.keys.map((k) => k.name)));
|
|
8650
8678
|
path = matcher.stringify(params);
|
|
8651
|
-
} else if (location
|
|
8652
|
-
path = location
|
|
8653
|
-
matcher = matchers.find((m
|
|
8679
|
+
} else if (location.path != null) {
|
|
8680
|
+
path = location.path;
|
|
8681
|
+
matcher = matchers.find((m) => m.re.test(path));
|
|
8654
8682
|
if (matcher) {
|
|
8655
8683
|
params = matcher.parse(path);
|
|
8656
8684
|
name = matcher.record.name;
|
|
8657
8685
|
}
|
|
8658
8686
|
} else {
|
|
8659
|
-
matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m
|
|
8687
|
+
matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path));
|
|
8660
8688
|
if (!matcher) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, {
|
|
8661
|
-
location
|
|
8689
|
+
location,
|
|
8662
8690
|
currentLocation
|
|
8663
8691
|
});
|
|
8664
8692
|
name = matcher.record.name;
|
|
8665
|
-
params = assign({}, currentLocation.params, location
|
|
8693
|
+
params = assign({}, currentLocation.params, location.params);
|
|
8666
8694
|
path = matcher.stringify(params);
|
|
8667
8695
|
}
|
|
8668
8696
|
const matched = [];
|
|
@@ -8679,14 +8707,14 @@ function createRouterMatcher(routes$1, globalOptions) {
|
|
|
8679
8707
|
meta: mergeMetaFields(matched)
|
|
8680
8708
|
};
|
|
8681
8709
|
}
|
|
8682
|
-
routes
|
|
8710
|
+
routes.forEach((route) => addRoute(route));
|
|
8683
8711
|
function clearRoutes() {
|
|
8684
8712
|
matchers.length = 0;
|
|
8685
8713
|
matcherMap.clear();
|
|
8686
8714
|
}
|
|
8687
8715
|
return {
|
|
8688
8716
|
addRoute,
|
|
8689
|
-
resolve
|
|
8717
|
+
resolve,
|
|
8690
8718
|
removeRoute,
|
|
8691
8719
|
clearRoutes,
|
|
8692
8720
|
getRoutes,
|
|
@@ -8754,11 +8782,11 @@ function isMatchable({ record }) {
|
|
|
8754
8782
|
return !!(record.name || record.components && Object.keys(record.components).length || record.redirect);
|
|
8755
8783
|
}
|
|
8756
8784
|
function useLink(props) {
|
|
8757
|
-
const router
|
|
8785
|
+
const router = inject(routerKey);
|
|
8758
8786
|
const currentRoute = inject(routeLocationKey);
|
|
8759
8787
|
const route = computed(() => {
|
|
8760
8788
|
const to = unref(props.to);
|
|
8761
|
-
return router
|
|
8789
|
+
return router.resolve(to);
|
|
8762
8790
|
});
|
|
8763
8791
|
const activeRecordIndex = computed(() => {
|
|
8764
8792
|
const { matched } = route.value;
|
|
@@ -8775,9 +8803,9 @@ function useLink(props) {
|
|
|
8775
8803
|
const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));
|
|
8776
8804
|
function navigate(e = {}) {
|
|
8777
8805
|
if (guardEvent(e)) {
|
|
8778
|
-
const p
|
|
8779
|
-
if (props.viewTransition && typeof document !== "undefined" && "startViewTransition" in document) document.startViewTransition(() => p
|
|
8780
|
-
return p
|
|
8806
|
+
const p = router[unref(props.replace) ? "replace" : "push"](unref(props.to)).catch(noop);
|
|
8807
|
+
if (props.viewTransition && typeof document !== "undefined" && "startViewTransition" in document) document.startViewTransition(() => p);
|
|
8808
|
+
return p;
|
|
8781
8809
|
}
|
|
8782
8810
|
return Promise.resolve();
|
|
8783
8811
|
}
|
|
@@ -8812,7 +8840,7 @@ var RouterLink = /* @__PURE__ */ defineComponent({
|
|
|
8812
8840
|
},
|
|
8813
8841
|
useLink,
|
|
8814
8842
|
setup(props, { slots }) {
|
|
8815
|
-
const link = reactive(useLink(props));
|
|
8843
|
+
const link = /* @__PURE__ */ reactive(useLink(props));
|
|
8816
8844
|
const { options } = inject(routerKey);
|
|
8817
8845
|
const elClass = computed(() => ({
|
|
8818
8846
|
[getLinkClass(props.activeClass, options.linkActiveClass, "router-link-active")]: link.isActive,
|
|
@@ -8846,7 +8874,7 @@ function includesParams(outer, inner) {
|
|
|
8846
8874
|
const outerValue = outer[key];
|
|
8847
8875
|
if (typeof innerValue === "string") {
|
|
8848
8876
|
if (innerValue !== outerValue) return false;
|
|
8849
|
-
} else if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i
|
|
8877
|
+
} else if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false;
|
|
8850
8878
|
}
|
|
8851
8879
|
return true;
|
|
8852
8880
|
}
|
|
@@ -8880,7 +8908,7 @@ var RouterViewImpl = /* @__PURE__ */ defineComponent({
|
|
|
8880
8908
|
provide(viewDepthKey, computed(() => depth.value + 1));
|
|
8881
8909
|
provide(matchedRouteKey, matchedRouteRef);
|
|
8882
8910
|
provide(routerViewLocationKey, routeToDisplay);
|
|
8883
|
-
const viewRef = ref();
|
|
8911
|
+
const viewRef = /* @__PURE__ */ ref();
|
|
8884
8912
|
watch(() => [
|
|
8885
8913
|
viewRef.value,
|
|
8886
8914
|
matchedRouteRef.value,
|
|
@@ -8934,7 +8962,7 @@ function createRouter(options) {
|
|
|
8934
8962
|
const beforeGuards = useCallbacks();
|
|
8935
8963
|
const beforeResolveGuards = useCallbacks();
|
|
8936
8964
|
const afterGuards = useCallbacks();
|
|
8937
|
-
const currentRoute = shallowRef(START_LOCATION_NORMALIZED);
|
|
8965
|
+
const currentRoute = /* @__PURE__ */ shallowRef(START_LOCATION_NORMALIZED);
|
|
8938
8966
|
let pendingLocation = START_LOCATION_NORMALIZED;
|
|
8939
8967
|
if (isBrowser && options.scrollBehavior && "scrollRestoration" in history) history.scrollRestoration = "manual";
|
|
8940
8968
|
const normalizeParams = applyToParams.bind(null, (paramValue) => "" + paramValue);
|
|
@@ -8959,17 +8987,17 @@ function createRouter(options) {
|
|
|
8959
8987
|
function hasRoute(name) {
|
|
8960
8988
|
return !!matcher.getRecordMatcher(name);
|
|
8961
8989
|
}
|
|
8962
|
-
function resolve
|
|
8990
|
+
function resolve(rawLocation, currentLocation) {
|
|
8963
8991
|
currentLocation = assign({}, currentLocation || currentRoute.value);
|
|
8964
8992
|
if (typeof rawLocation === "string") {
|
|
8965
8993
|
const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);
|
|
8966
|
-
const matchedRoute
|
|
8967
|
-
const href
|
|
8968
|
-
return assign(locationNormalized, matchedRoute
|
|
8969
|
-
params: decodeParams(matchedRoute
|
|
8994
|
+
const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);
|
|
8995
|
+
const href = routerHistory.createHref(locationNormalized.fullPath);
|
|
8996
|
+
return assign(locationNormalized, matchedRoute, {
|
|
8997
|
+
params: decodeParams(matchedRoute.params),
|
|
8970
8998
|
hash: decode(locationNormalized.hash),
|
|
8971
8999
|
redirectedFrom: void 0,
|
|
8972
|
-
href
|
|
9000
|
+
href
|
|
8973
9001
|
});
|
|
8974
9002
|
}
|
|
8975
9003
|
let matcherLocation;
|
|
@@ -9029,16 +9057,16 @@ function createRouter(options) {
|
|
|
9029
9057
|
}
|
|
9030
9058
|
}
|
|
9031
9059
|
function pushWithRedirect(to, redirectedFrom) {
|
|
9032
|
-
const targetLocation = pendingLocation = resolve
|
|
9060
|
+
const targetLocation = pendingLocation = resolve(to);
|
|
9033
9061
|
const from = currentRoute.value;
|
|
9034
9062
|
const data = to.state;
|
|
9035
9063
|
const force = to.force;
|
|
9036
|
-
const replace
|
|
9064
|
+
const replace = to.replace === true;
|
|
9037
9065
|
const shouldRedirect = handleRedirectRecord(targetLocation, from);
|
|
9038
9066
|
if (shouldRedirect) return pushWithRedirect(assign(locationAsObject(shouldRedirect), {
|
|
9039
9067
|
state: typeof shouldRedirect === "object" ? assign({}, data, shouldRedirect.state) : data,
|
|
9040
9068
|
force,
|
|
9041
|
-
replace
|
|
9069
|
+
replace
|
|
9042
9070
|
}), redirectedFrom || targetLocation);
|
|
9043
9071
|
const toLocation = targetLocation;
|
|
9044
9072
|
toLocation.redirectedFrom = redirectedFrom;
|
|
@@ -9050,15 +9078,15 @@ function createRouter(options) {
|
|
|
9050
9078
|
});
|
|
9051
9079
|
handleScroll(from, from, true, false);
|
|
9052
9080
|
}
|
|
9053
|
-
return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT) ? error : markAsReady(error) : triggerError(error, toLocation, from)).then((failure
|
|
9054
|
-
if (failure
|
|
9055
|
-
if (isNavigationFailure(failure
|
|
9056
|
-
state: typeof failure
|
|
9081
|
+
return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT) ? error : markAsReady(error) : triggerError(error, toLocation, from)).then((failure) => {
|
|
9082
|
+
if (failure) {
|
|
9083
|
+
if (isNavigationFailure(failure, ErrorTypes.NAVIGATION_GUARD_REDIRECT)) return pushWithRedirect(assign({ replace }, locationAsObject(failure.to), {
|
|
9084
|
+
state: typeof failure.to === "object" ? assign({}, data, failure.to.state) : data,
|
|
9057
9085
|
force
|
|
9058
9086
|
}), redirectedFrom || toLocation);
|
|
9059
|
-
} else failure
|
|
9060
|
-
triggerAfterEach(toLocation, from, failure
|
|
9061
|
-
return failure
|
|
9087
|
+
} else failure = finalizeNavigation(toLocation, from, true, replace, data);
|
|
9088
|
+
triggerAfterEach(toLocation, from, failure);
|
|
9089
|
+
return failure;
|
|
9062
9090
|
});
|
|
9063
9091
|
}
|
|
9064
9092
|
function checkCanceledNavigationAndReject(to, from) {
|
|
@@ -9066,8 +9094,8 @@ function createRouter(options) {
|
|
|
9066
9094
|
return error ? Promise.reject(error) : Promise.resolve();
|
|
9067
9095
|
}
|
|
9068
9096
|
function runWithContext(fn) {
|
|
9069
|
-
const app
|
|
9070
|
-
return app
|
|
9097
|
+
const app = installedApps.values().next().value;
|
|
9098
|
+
return app && typeof app.runWithContext === "function" ? app.runWithContext(fn) : fn();
|
|
9071
9099
|
}
|
|
9072
9100
|
function navigate(to, from) {
|
|
9073
9101
|
let guards;
|
|
@@ -9111,12 +9139,12 @@ function createRouter(options) {
|
|
|
9111
9139
|
function triggerAfterEach(to, from, failure) {
|
|
9112
9140
|
afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));
|
|
9113
9141
|
}
|
|
9114
|
-
function finalizeNavigation(toLocation, from, isPush, replace
|
|
9142
|
+
function finalizeNavigation(toLocation, from, isPush, replace, data) {
|
|
9115
9143
|
const error = checkCanceledNavigation(toLocation, from);
|
|
9116
9144
|
if (error) return error;
|
|
9117
9145
|
const isFirstNavigation = from === START_LOCATION_NORMALIZED;
|
|
9118
9146
|
const state = !isBrowser ? {} : history.state;
|
|
9119
|
-
if (isPush) if (replace
|
|
9147
|
+
if (isPush) if (replace || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));
|
|
9120
9148
|
else routerHistory.push(toLocation.fullPath, data);
|
|
9121
9149
|
currentRoute.value = toLocation;
|
|
9122
9150
|
handleScroll(toLocation, from, isPush, isFirstNavigation);
|
|
@@ -9126,9 +9154,9 @@ function createRouter(options) {
|
|
|
9126
9154
|
function setupListeners() {
|
|
9127
9155
|
if (removeHistoryListener) return;
|
|
9128
9156
|
removeHistoryListener = routerHistory.listen((to, _from, info) => {
|
|
9129
|
-
if (!router
|
|
9130
|
-
const toLocation = resolve
|
|
9131
|
-
const shouldRedirect = handleRedirectRecord(toLocation, router
|
|
9157
|
+
if (!router.listening) return;
|
|
9158
|
+
const toLocation = resolve(to);
|
|
9159
|
+
const shouldRedirect = handleRedirectRecord(toLocation, router.currentRoute.value);
|
|
9132
9160
|
if (shouldRedirect) {
|
|
9133
9161
|
pushWithRedirect(assign(shouldRedirect, {
|
|
9134
9162
|
replace: true,
|
|
@@ -9171,15 +9199,15 @@ function createRouter(options) {
|
|
|
9171
9199
|
}
|
|
9172
9200
|
function isReady() {
|
|
9173
9201
|
if (ready && currentRoute.value !== START_LOCATION_NORMALIZED) return Promise.resolve();
|
|
9174
|
-
return new Promise((resolve
|
|
9175
|
-
readyHandlers.add([resolve
|
|
9202
|
+
return new Promise((resolve, reject) => {
|
|
9203
|
+
readyHandlers.add([resolve, reject]);
|
|
9176
9204
|
});
|
|
9177
9205
|
}
|
|
9178
9206
|
function markAsReady(err) {
|
|
9179
9207
|
if (!ready) {
|
|
9180
9208
|
ready = !err;
|
|
9181
9209
|
setupListeners();
|
|
9182
|
-
readyHandlers.list().forEach(([resolve
|
|
9210
|
+
readyHandlers.list().forEach(([resolve, reject]) => err ? reject(err) : resolve());
|
|
9183
9211
|
readyHandlers.reset();
|
|
9184
9212
|
}
|
|
9185
9213
|
return err;
|
|
@@ -9193,7 +9221,7 @@ function createRouter(options) {
|
|
|
9193
9221
|
const go = (delta) => routerHistory.go(delta);
|
|
9194
9222
|
let started;
|
|
9195
9223
|
const installedApps = /* @__PURE__ */ new Set();
|
|
9196
|
-
const router
|
|
9224
|
+
const router = {
|
|
9197
9225
|
currentRoute,
|
|
9198
9226
|
listening: true,
|
|
9199
9227
|
addRoute,
|
|
@@ -9201,7 +9229,7 @@ function createRouter(options) {
|
|
|
9201
9229
|
clearRoutes: matcher.clearRoutes,
|
|
9202
9230
|
hasRoute,
|
|
9203
9231
|
getRoutes,
|
|
9204
|
-
resolve
|
|
9232
|
+
resolve,
|
|
9205
9233
|
options,
|
|
9206
9234
|
push,
|
|
9207
9235
|
replace,
|
|
@@ -9213,11 +9241,11 @@ function createRouter(options) {
|
|
|
9213
9241
|
afterEach: afterGuards.add,
|
|
9214
9242
|
onError: errorListeners.add,
|
|
9215
9243
|
isReady,
|
|
9216
|
-
install(app
|
|
9217
|
-
app
|
|
9218
|
-
app
|
|
9219
|
-
app
|
|
9220
|
-
Object.defineProperty(app
|
|
9244
|
+
install(app) {
|
|
9245
|
+
app.component("RouterLink", RouterLink);
|
|
9246
|
+
app.component("RouterView", RouterView);
|
|
9247
|
+
app.config.globalProperties.$router = router;
|
|
9248
|
+
Object.defineProperty(app.config.globalProperties, "$route", {
|
|
9221
9249
|
enumerable: true,
|
|
9222
9250
|
get: () => unref(currentRoute)
|
|
9223
9251
|
});
|
|
@@ -9230,13 +9258,13 @@ function createRouter(options) {
|
|
|
9230
9258
|
get: () => currentRoute.value[key],
|
|
9231
9259
|
enumerable: true
|
|
9232
9260
|
});
|
|
9233
|
-
app
|
|
9234
|
-
app
|
|
9235
|
-
app
|
|
9236
|
-
const unmountApp = app
|
|
9237
|
-
installedApps.add(app
|
|
9238
|
-
app
|
|
9239
|
-
installedApps.delete(app
|
|
9261
|
+
app.provide(routerKey, router);
|
|
9262
|
+
app.provide(routeLocationKey, /* @__PURE__ */ shallowReactive(reactiveRoute));
|
|
9263
|
+
app.provide(routerViewLocationKey, currentRoute);
|
|
9264
|
+
const unmountApp = app.unmount;
|
|
9265
|
+
installedApps.add(app);
|
|
9266
|
+
app.unmount = function() {
|
|
9267
|
+
installedApps.delete(app);
|
|
9240
9268
|
if (installedApps.size < 1) {
|
|
9241
9269
|
pendingLocation = START_LOCATION_NORMALIZED;
|
|
9242
9270
|
removeHistoryListener && removeHistoryListener();
|
|
@@ -9252,7 +9280,7 @@ function createRouter(options) {
|
|
|
9252
9280
|
function runGuardQueue(guards) {
|
|
9253
9281
|
return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());
|
|
9254
9282
|
}
|
|
9255
|
-
return router
|
|
9283
|
+
return router;
|
|
9256
9284
|
}
|
|
9257
9285
|
var scriptRel = "modulepreload";
|
|
9258
9286
|
var assetsURL = function(dep, importerUrl) {
|
|
@@ -9265,10 +9293,10 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
|
9265
9293
|
const links = document.getElementsByTagName("link");
|
|
9266
9294
|
const cspNonceMeta = document.querySelector("meta[property=csp-nonce]");
|
|
9267
9295
|
const cspNonce = cspNonceMeta?.nonce || cspNonceMeta?.getAttribute("nonce");
|
|
9268
|
-
function allSettled(promises
|
|
9269
|
-
return Promise.all(promises
|
|
9296
|
+
function allSettled(promises) {
|
|
9297
|
+
return Promise.all(promises.map((p) => Promise.resolve(p).then((value) => ({
|
|
9270
9298
|
status: "fulfilled",
|
|
9271
|
-
value
|
|
9299
|
+
value
|
|
9272
9300
|
}), (reason) => ({
|
|
9273
9301
|
status: "rejected",
|
|
9274
9302
|
reason
|
|
@@ -9280,9 +9308,9 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
|
9280
9308
|
seen[dep] = true;
|
|
9281
9309
|
const isCss = dep.endsWith(".css");
|
|
9282
9310
|
const cssSelector = isCss ? "[rel=\"stylesheet\"]" : "";
|
|
9283
|
-
if (!!importerUrl) for (let i
|
|
9284
|
-
const link
|
|
9285
|
-
if (link
|
|
9311
|
+
if (!!importerUrl) for (let i = links.length - 1; i >= 0; i--) {
|
|
9312
|
+
const link = links[i];
|
|
9313
|
+
if (link.href === dep && (!isCss || link.rel === "stylesheet")) return;
|
|
9286
9314
|
}
|
|
9287
9315
|
else if (document.querySelector(`link[href="${dep}"]${cssSelector}`)) return;
|
|
9288
9316
|
const link = document.createElement("link");
|
|
@@ -9298,11 +9326,11 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
|
9298
9326
|
});
|
|
9299
9327
|
}));
|
|
9300
9328
|
}
|
|
9301
|
-
function handlePreloadError(err
|
|
9302
|
-
const e
|
|
9303
|
-
e
|
|
9304
|
-
window.dispatchEvent(e
|
|
9305
|
-
if (!e
|
|
9329
|
+
function handlePreloadError(err) {
|
|
9330
|
+
const e = new Event("vite:preloadError", { cancelable: true });
|
|
9331
|
+
e.payload = err;
|
|
9332
|
+
window.dispatchEvent(e);
|
|
9333
|
+
if (!e.defaultPrevented) throw err;
|
|
9306
9334
|
}
|
|
9307
9335
|
return promise.then((res) => {
|
|
9308
9336
|
for (const item of res || []) {
|
|
@@ -9315,11 +9343,11 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
|
9315
9343
|
const routes = [{
|
|
9316
9344
|
path: "/",
|
|
9317
9345
|
name: "/",
|
|
9318
|
-
component: () => __vitePreload(() => import("./pages-
|
|
9346
|
+
component: () => __vitePreload(() => import("./pages-CfWIiNIx.js"), __vite__mapDeps([0,1]), import.meta.url)
|
|
9319
9347
|
}, {
|
|
9320
9348
|
path: "/server-router",
|
|
9321
9349
|
name: "/server-router",
|
|
9322
|
-
component: () => __vitePreload(() => import("./server-router-
|
|
9350
|
+
component: () => __vitePreload(() => import("./server-router-Bu5965f8.js"), __vite__mapDeps([2,1,3]), import.meta.url)
|
|
9323
9351
|
}];
|
|
9324
9352
|
var _hoisted_1$1 = { class: "w-full h-full of-auto!" };
|
|
9325
9353
|
var Layout_default = /* @__PURE__ */ defineComponent({
|