cleek 1.1.8 → 1.2.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/LICENSE +21 -0
- package/README.md +65 -11
- package/dist/cleek.es.js +6 -4741
- package/dist/cleek.umd.js +6 -1
- package/dist/style.css +1 -1
- package/package.json +50 -25
- package/dist/favicon.ico +0 -0
package/dist/cleek.es.js
CHANGED
|
@@ -1,4741 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const classList = [];
|
|
7
|
-
if (group)
|
|
8
|
-
classList.push(`ck-component__group--${group}`);
|
|
9
|
-
if (groupVertical)
|
|
10
|
-
classList.push(`ck-component__group-vertical--${groupVertical}`);
|
|
11
|
-
return classList;
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
function makeMap(str, expectsLowerCase) {
|
|
15
|
-
const map = Object.create(null);
|
|
16
|
-
const list = str.split(",");
|
|
17
|
-
for (let i = 0; i < list.length; i++) {
|
|
18
|
-
map[list[i]] = true;
|
|
19
|
-
}
|
|
20
|
-
return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
|
|
21
|
-
}
|
|
22
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
23
|
-
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
24
|
-
function includeBooleanAttr(value) {
|
|
25
|
-
return !!value || value === "";
|
|
26
|
-
}
|
|
27
|
-
function normalizeStyle(value) {
|
|
28
|
-
if (isArray(value)) {
|
|
29
|
-
const res = {};
|
|
30
|
-
for (let i = 0; i < value.length; i++) {
|
|
31
|
-
const item = value[i];
|
|
32
|
-
const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
|
|
33
|
-
if (normalized) {
|
|
34
|
-
for (const key in normalized) {
|
|
35
|
-
res[key] = normalized[key];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return res;
|
|
40
|
-
} else if (isString(value)) {
|
|
41
|
-
return value;
|
|
42
|
-
} else if (isObject(value)) {
|
|
43
|
-
return value;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
47
|
-
const propertyDelimiterRE = /:(.+)/;
|
|
48
|
-
function parseStringStyle(cssText) {
|
|
49
|
-
const ret = {};
|
|
50
|
-
cssText.split(listDelimiterRE).forEach((item) => {
|
|
51
|
-
if (item) {
|
|
52
|
-
const tmp = item.split(propertyDelimiterRE);
|
|
53
|
-
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
return ret;
|
|
57
|
-
}
|
|
58
|
-
function normalizeClass(value) {
|
|
59
|
-
let res = "";
|
|
60
|
-
if (isString(value)) {
|
|
61
|
-
res = value;
|
|
62
|
-
} else if (isArray(value)) {
|
|
63
|
-
for (let i = 0; i < value.length; i++) {
|
|
64
|
-
const normalized = normalizeClass(value[i]);
|
|
65
|
-
if (normalized) {
|
|
66
|
-
res += normalized + " ";
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
} else if (isObject(value)) {
|
|
70
|
-
for (const name in value) {
|
|
71
|
-
if (value[name]) {
|
|
72
|
-
res += name + " ";
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return res.trim();
|
|
77
|
-
}
|
|
78
|
-
const toDisplayString = (val) => {
|
|
79
|
-
return val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
|
|
80
|
-
};
|
|
81
|
-
const replacer = (_key, val) => {
|
|
82
|
-
if (val && val.__v_isRef) {
|
|
83
|
-
return replacer(_key, val.value);
|
|
84
|
-
} else if (isMap(val)) {
|
|
85
|
-
return {
|
|
86
|
-
[`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
|
|
87
|
-
entries[`${key} =>`] = val2;
|
|
88
|
-
return entries;
|
|
89
|
-
}, {})
|
|
90
|
-
};
|
|
91
|
-
} else if (isSet(val)) {
|
|
92
|
-
return {
|
|
93
|
-
[`Set(${val.size})`]: [...val.values()]
|
|
94
|
-
};
|
|
95
|
-
} else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
|
|
96
|
-
return String(val);
|
|
97
|
-
}
|
|
98
|
-
return val;
|
|
99
|
-
};
|
|
100
|
-
const EMPTY_OBJ = {};
|
|
101
|
-
const EMPTY_ARR = [];
|
|
102
|
-
const NOOP = () => {
|
|
103
|
-
};
|
|
104
|
-
const NO = () => false;
|
|
105
|
-
const onRE = /^on[^a-z]/;
|
|
106
|
-
const isOn = (key) => onRE.test(key);
|
|
107
|
-
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
108
|
-
const extend = Object.assign;
|
|
109
|
-
const remove = (arr, el) => {
|
|
110
|
-
const i = arr.indexOf(el);
|
|
111
|
-
if (i > -1) {
|
|
112
|
-
arr.splice(i, 1);
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
116
|
-
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
117
|
-
const isArray = Array.isArray;
|
|
118
|
-
const isMap = (val) => toTypeString(val) === "[object Map]";
|
|
119
|
-
const isSet = (val) => toTypeString(val) === "[object Set]";
|
|
120
|
-
const isFunction = (val) => typeof val === "function";
|
|
121
|
-
const isString = (val) => typeof val === "string";
|
|
122
|
-
const isSymbol = (val) => typeof val === "symbol";
|
|
123
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
|
124
|
-
const isPromise = (val) => {
|
|
125
|
-
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
126
|
-
};
|
|
127
|
-
const objectToString = Object.prototype.toString;
|
|
128
|
-
const toTypeString = (value) => objectToString.call(value);
|
|
129
|
-
const toRawType = (value) => {
|
|
130
|
-
return toTypeString(value).slice(8, -1);
|
|
131
|
-
};
|
|
132
|
-
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
133
|
-
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
134
|
-
const isReservedProp = /* @__PURE__ */ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
135
|
-
const cacheStringFunction = (fn) => {
|
|
136
|
-
const cache = Object.create(null);
|
|
137
|
-
return (str) => {
|
|
138
|
-
const hit = cache[str];
|
|
139
|
-
return hit || (cache[str] = fn(str));
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
const camelizeRE = /-(\w)/g;
|
|
143
|
-
const camelize = cacheStringFunction((str) => {
|
|
144
|
-
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
145
|
-
});
|
|
146
|
-
const hyphenateRE = /\B([A-Z])/g;
|
|
147
|
-
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
148
|
-
const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));
|
|
149
|
-
const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);
|
|
150
|
-
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
151
|
-
const invokeArrayFns = (fns, arg) => {
|
|
152
|
-
for (let i = 0; i < fns.length; i++) {
|
|
153
|
-
fns[i](arg);
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
const def = (obj, key, value) => {
|
|
157
|
-
Object.defineProperty(obj, key, {
|
|
158
|
-
configurable: true,
|
|
159
|
-
enumerable: false,
|
|
160
|
-
value
|
|
161
|
-
});
|
|
162
|
-
};
|
|
163
|
-
const toNumber = (val) => {
|
|
164
|
-
const n = parseFloat(val);
|
|
165
|
-
return isNaN(n) ? val : n;
|
|
166
|
-
};
|
|
167
|
-
let _globalThis;
|
|
168
|
-
const getGlobalThis = () => {
|
|
169
|
-
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
170
|
-
};
|
|
171
|
-
let activeEffectScope;
|
|
172
|
-
const effectScopeStack = [];
|
|
173
|
-
class EffectScope {
|
|
174
|
-
constructor(detached = false) {
|
|
175
|
-
this.active = true;
|
|
176
|
-
this.effects = [];
|
|
177
|
-
this.cleanups = [];
|
|
178
|
-
if (!detached && activeEffectScope) {
|
|
179
|
-
this.parent = activeEffectScope;
|
|
180
|
-
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
run(fn) {
|
|
184
|
-
if (this.active) {
|
|
185
|
-
try {
|
|
186
|
-
this.on();
|
|
187
|
-
return fn();
|
|
188
|
-
} finally {
|
|
189
|
-
this.off();
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
on() {
|
|
194
|
-
if (this.active) {
|
|
195
|
-
effectScopeStack.push(this);
|
|
196
|
-
activeEffectScope = this;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
off() {
|
|
200
|
-
if (this.active) {
|
|
201
|
-
effectScopeStack.pop();
|
|
202
|
-
activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
stop(fromParent) {
|
|
206
|
-
if (this.active) {
|
|
207
|
-
this.effects.forEach((e) => e.stop());
|
|
208
|
-
this.cleanups.forEach((cleanup) => cleanup());
|
|
209
|
-
if (this.scopes) {
|
|
210
|
-
this.scopes.forEach((e) => e.stop(true));
|
|
211
|
-
}
|
|
212
|
-
if (this.parent && !fromParent) {
|
|
213
|
-
const last = this.parent.scopes.pop();
|
|
214
|
-
if (last && last !== this) {
|
|
215
|
-
this.parent.scopes[this.index] = last;
|
|
216
|
-
last.index = this.index;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
this.active = false;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
function recordEffectScope(effect, scope) {
|
|
224
|
-
scope = scope || activeEffectScope;
|
|
225
|
-
if (scope && scope.active) {
|
|
226
|
-
scope.effects.push(effect);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
const createDep = (effects) => {
|
|
230
|
-
const dep = new Set(effects);
|
|
231
|
-
dep.w = 0;
|
|
232
|
-
dep.n = 0;
|
|
233
|
-
return dep;
|
|
234
|
-
};
|
|
235
|
-
const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
|
|
236
|
-
const newTracked = (dep) => (dep.n & trackOpBit) > 0;
|
|
237
|
-
const initDepMarkers = ({ deps }) => {
|
|
238
|
-
if (deps.length) {
|
|
239
|
-
for (let i = 0; i < deps.length; i++) {
|
|
240
|
-
deps[i].w |= trackOpBit;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
const finalizeDepMarkers = (effect) => {
|
|
245
|
-
const { deps } = effect;
|
|
246
|
-
if (deps.length) {
|
|
247
|
-
let ptr = 0;
|
|
248
|
-
for (let i = 0; i < deps.length; i++) {
|
|
249
|
-
const dep = deps[i];
|
|
250
|
-
if (wasTracked(dep) && !newTracked(dep)) {
|
|
251
|
-
dep.delete(effect);
|
|
252
|
-
} else {
|
|
253
|
-
deps[ptr++] = dep;
|
|
254
|
-
}
|
|
255
|
-
dep.w &= ~trackOpBit;
|
|
256
|
-
dep.n &= ~trackOpBit;
|
|
257
|
-
}
|
|
258
|
-
deps.length = ptr;
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
const targetMap = new WeakMap();
|
|
262
|
-
let effectTrackDepth = 0;
|
|
263
|
-
let trackOpBit = 1;
|
|
264
|
-
const maxMarkerBits = 30;
|
|
265
|
-
const effectStack = [];
|
|
266
|
-
let activeEffect;
|
|
267
|
-
const ITERATE_KEY = Symbol("");
|
|
268
|
-
const MAP_KEY_ITERATE_KEY = Symbol("");
|
|
269
|
-
class ReactiveEffect {
|
|
270
|
-
constructor(fn, scheduler = null, scope) {
|
|
271
|
-
this.fn = fn;
|
|
272
|
-
this.scheduler = scheduler;
|
|
273
|
-
this.active = true;
|
|
274
|
-
this.deps = [];
|
|
275
|
-
recordEffectScope(this, scope);
|
|
276
|
-
}
|
|
277
|
-
run() {
|
|
278
|
-
if (!this.active) {
|
|
279
|
-
return this.fn();
|
|
280
|
-
}
|
|
281
|
-
if (!effectStack.includes(this)) {
|
|
282
|
-
try {
|
|
283
|
-
effectStack.push(activeEffect = this);
|
|
284
|
-
enableTracking();
|
|
285
|
-
trackOpBit = 1 << ++effectTrackDepth;
|
|
286
|
-
if (effectTrackDepth <= maxMarkerBits) {
|
|
287
|
-
initDepMarkers(this);
|
|
288
|
-
} else {
|
|
289
|
-
cleanupEffect(this);
|
|
290
|
-
}
|
|
291
|
-
return this.fn();
|
|
292
|
-
} finally {
|
|
293
|
-
if (effectTrackDepth <= maxMarkerBits) {
|
|
294
|
-
finalizeDepMarkers(this);
|
|
295
|
-
}
|
|
296
|
-
trackOpBit = 1 << --effectTrackDepth;
|
|
297
|
-
resetTracking();
|
|
298
|
-
effectStack.pop();
|
|
299
|
-
const n = effectStack.length;
|
|
300
|
-
activeEffect = n > 0 ? effectStack[n - 1] : void 0;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
stop() {
|
|
305
|
-
if (this.active) {
|
|
306
|
-
cleanupEffect(this);
|
|
307
|
-
if (this.onStop) {
|
|
308
|
-
this.onStop();
|
|
309
|
-
}
|
|
310
|
-
this.active = false;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
function cleanupEffect(effect) {
|
|
315
|
-
const { deps } = effect;
|
|
316
|
-
if (deps.length) {
|
|
317
|
-
for (let i = 0; i < deps.length; i++) {
|
|
318
|
-
deps[i].delete(effect);
|
|
319
|
-
}
|
|
320
|
-
deps.length = 0;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
let shouldTrack = true;
|
|
324
|
-
const trackStack = [];
|
|
325
|
-
function pauseTracking() {
|
|
326
|
-
trackStack.push(shouldTrack);
|
|
327
|
-
shouldTrack = false;
|
|
328
|
-
}
|
|
329
|
-
function enableTracking() {
|
|
330
|
-
trackStack.push(shouldTrack);
|
|
331
|
-
shouldTrack = true;
|
|
332
|
-
}
|
|
333
|
-
function resetTracking() {
|
|
334
|
-
const last = trackStack.pop();
|
|
335
|
-
shouldTrack = last === void 0 ? true : last;
|
|
336
|
-
}
|
|
337
|
-
function track(target, type, key) {
|
|
338
|
-
if (!isTracking()) {
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
let depsMap = targetMap.get(target);
|
|
342
|
-
if (!depsMap) {
|
|
343
|
-
targetMap.set(target, depsMap = new Map());
|
|
344
|
-
}
|
|
345
|
-
let dep = depsMap.get(key);
|
|
346
|
-
if (!dep) {
|
|
347
|
-
depsMap.set(key, dep = createDep());
|
|
348
|
-
}
|
|
349
|
-
trackEffects(dep);
|
|
350
|
-
}
|
|
351
|
-
function isTracking() {
|
|
352
|
-
return shouldTrack && activeEffect !== void 0;
|
|
353
|
-
}
|
|
354
|
-
function trackEffects(dep, debuggerEventExtraInfo) {
|
|
355
|
-
let shouldTrack2 = false;
|
|
356
|
-
if (effectTrackDepth <= maxMarkerBits) {
|
|
357
|
-
if (!newTracked(dep)) {
|
|
358
|
-
dep.n |= trackOpBit;
|
|
359
|
-
shouldTrack2 = !wasTracked(dep);
|
|
360
|
-
}
|
|
361
|
-
} else {
|
|
362
|
-
shouldTrack2 = !dep.has(activeEffect);
|
|
363
|
-
}
|
|
364
|
-
if (shouldTrack2) {
|
|
365
|
-
dep.add(activeEffect);
|
|
366
|
-
activeEffect.deps.push(dep);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
370
|
-
const depsMap = targetMap.get(target);
|
|
371
|
-
if (!depsMap) {
|
|
372
|
-
return;
|
|
373
|
-
}
|
|
374
|
-
let deps = [];
|
|
375
|
-
if (type === "clear") {
|
|
376
|
-
deps = [...depsMap.values()];
|
|
377
|
-
} else if (key === "length" && isArray(target)) {
|
|
378
|
-
depsMap.forEach((dep, key2) => {
|
|
379
|
-
if (key2 === "length" || key2 >= newValue) {
|
|
380
|
-
deps.push(dep);
|
|
381
|
-
}
|
|
382
|
-
});
|
|
383
|
-
} else {
|
|
384
|
-
if (key !== void 0) {
|
|
385
|
-
deps.push(depsMap.get(key));
|
|
386
|
-
}
|
|
387
|
-
switch (type) {
|
|
388
|
-
case "add":
|
|
389
|
-
if (!isArray(target)) {
|
|
390
|
-
deps.push(depsMap.get(ITERATE_KEY));
|
|
391
|
-
if (isMap(target)) {
|
|
392
|
-
deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
393
|
-
}
|
|
394
|
-
} else if (isIntegerKey(key)) {
|
|
395
|
-
deps.push(depsMap.get("length"));
|
|
396
|
-
}
|
|
397
|
-
break;
|
|
398
|
-
case "delete":
|
|
399
|
-
if (!isArray(target)) {
|
|
400
|
-
deps.push(depsMap.get(ITERATE_KEY));
|
|
401
|
-
if (isMap(target)) {
|
|
402
|
-
deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
break;
|
|
406
|
-
case "set":
|
|
407
|
-
if (isMap(target)) {
|
|
408
|
-
deps.push(depsMap.get(ITERATE_KEY));
|
|
409
|
-
}
|
|
410
|
-
break;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
if (deps.length === 1) {
|
|
414
|
-
if (deps[0]) {
|
|
415
|
-
{
|
|
416
|
-
triggerEffects(deps[0]);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
} else {
|
|
420
|
-
const effects = [];
|
|
421
|
-
for (const dep of deps) {
|
|
422
|
-
if (dep) {
|
|
423
|
-
effects.push(...dep);
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
{
|
|
427
|
-
triggerEffects(createDep(effects));
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
function triggerEffects(dep, debuggerEventExtraInfo) {
|
|
432
|
-
for (const effect of isArray(dep) ? dep : [...dep]) {
|
|
433
|
-
if (effect !== activeEffect || effect.allowRecurse) {
|
|
434
|
-
if (effect.scheduler) {
|
|
435
|
-
effect.scheduler();
|
|
436
|
-
} else {
|
|
437
|
-
effect.run();
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
443
|
-
const builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(isSymbol));
|
|
444
|
-
const get = /* @__PURE__ */ createGetter();
|
|
445
|
-
const shallowGet = /* @__PURE__ */ createGetter(false, true);
|
|
446
|
-
const readonlyGet = /* @__PURE__ */ createGetter(true);
|
|
447
|
-
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
|
|
448
|
-
function createArrayInstrumentations() {
|
|
449
|
-
const instrumentations = {};
|
|
450
|
-
["includes", "indexOf", "lastIndexOf"].forEach((key) => {
|
|
451
|
-
instrumentations[key] = function(...args) {
|
|
452
|
-
const arr = toRaw(this);
|
|
453
|
-
for (let i = 0, l = this.length; i < l; i++) {
|
|
454
|
-
track(arr, "get", i + "");
|
|
455
|
-
}
|
|
456
|
-
const res = arr[key](...args);
|
|
457
|
-
if (res === -1 || res === false) {
|
|
458
|
-
return arr[key](...args.map(toRaw));
|
|
459
|
-
} else {
|
|
460
|
-
return res;
|
|
461
|
-
}
|
|
462
|
-
};
|
|
463
|
-
});
|
|
464
|
-
["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
|
|
465
|
-
instrumentations[key] = function(...args) {
|
|
466
|
-
pauseTracking();
|
|
467
|
-
const res = toRaw(this)[key].apply(this, args);
|
|
468
|
-
resetTracking();
|
|
469
|
-
return res;
|
|
470
|
-
};
|
|
471
|
-
});
|
|
472
|
-
return instrumentations;
|
|
473
|
-
}
|
|
474
|
-
function createGetter(isReadonly2 = false, shallow = false) {
|
|
475
|
-
return function get2(target, key, receiver) {
|
|
476
|
-
if (key === "__v_isReactive") {
|
|
477
|
-
return !isReadonly2;
|
|
478
|
-
} else if (key === "__v_isReadonly") {
|
|
479
|
-
return isReadonly2;
|
|
480
|
-
} else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
|
|
481
|
-
return target;
|
|
482
|
-
}
|
|
483
|
-
const targetIsArray = isArray(target);
|
|
484
|
-
if (!isReadonly2 && targetIsArray && hasOwn(arrayInstrumentations, key)) {
|
|
485
|
-
return Reflect.get(arrayInstrumentations, key, receiver);
|
|
486
|
-
}
|
|
487
|
-
const res = Reflect.get(target, key, receiver);
|
|
488
|
-
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
|
|
489
|
-
return res;
|
|
490
|
-
}
|
|
491
|
-
if (!isReadonly2) {
|
|
492
|
-
track(target, "get", key);
|
|
493
|
-
}
|
|
494
|
-
if (shallow) {
|
|
495
|
-
return res;
|
|
496
|
-
}
|
|
497
|
-
if (isRef(res)) {
|
|
498
|
-
const shouldUnwrap = !targetIsArray || !isIntegerKey(key);
|
|
499
|
-
return shouldUnwrap ? res.value : res;
|
|
500
|
-
}
|
|
501
|
-
if (isObject(res)) {
|
|
502
|
-
return isReadonly2 ? readonly(res) : reactive(res);
|
|
503
|
-
}
|
|
504
|
-
return res;
|
|
505
|
-
};
|
|
506
|
-
}
|
|
507
|
-
const set = /* @__PURE__ */ createSetter();
|
|
508
|
-
const shallowSet = /* @__PURE__ */ createSetter(true);
|
|
509
|
-
function createSetter(shallow = false) {
|
|
510
|
-
return function set2(target, key, value, receiver) {
|
|
511
|
-
let oldValue = target[key];
|
|
512
|
-
if (!shallow && !isReadonly(value)) {
|
|
513
|
-
value = toRaw(value);
|
|
514
|
-
oldValue = toRaw(oldValue);
|
|
515
|
-
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
516
|
-
oldValue.value = value;
|
|
517
|
-
return true;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
|
|
521
|
-
const result = Reflect.set(target, key, value, receiver);
|
|
522
|
-
if (target === toRaw(receiver)) {
|
|
523
|
-
if (!hadKey) {
|
|
524
|
-
trigger(target, "add", key, value);
|
|
525
|
-
} else if (hasChanged(value, oldValue)) {
|
|
526
|
-
trigger(target, "set", key, value);
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
return result;
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
function deleteProperty(target, key) {
|
|
533
|
-
const hadKey = hasOwn(target, key);
|
|
534
|
-
target[key];
|
|
535
|
-
const result = Reflect.deleteProperty(target, key);
|
|
536
|
-
if (result && hadKey) {
|
|
537
|
-
trigger(target, "delete", key, void 0);
|
|
538
|
-
}
|
|
539
|
-
return result;
|
|
540
|
-
}
|
|
541
|
-
function has(target, key) {
|
|
542
|
-
const result = Reflect.has(target, key);
|
|
543
|
-
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
544
|
-
track(target, "has", key);
|
|
545
|
-
}
|
|
546
|
-
return result;
|
|
547
|
-
}
|
|
548
|
-
function ownKeys(target) {
|
|
549
|
-
track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
|
|
550
|
-
return Reflect.ownKeys(target);
|
|
551
|
-
}
|
|
552
|
-
const mutableHandlers = {
|
|
553
|
-
get,
|
|
554
|
-
set,
|
|
555
|
-
deleteProperty,
|
|
556
|
-
has,
|
|
557
|
-
ownKeys
|
|
558
|
-
};
|
|
559
|
-
const readonlyHandlers = {
|
|
560
|
-
get: readonlyGet,
|
|
561
|
-
set(target, key) {
|
|
562
|
-
return true;
|
|
563
|
-
},
|
|
564
|
-
deleteProperty(target, key) {
|
|
565
|
-
return true;
|
|
566
|
-
}
|
|
567
|
-
};
|
|
568
|
-
const shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, {
|
|
569
|
-
get: shallowGet,
|
|
570
|
-
set: shallowSet
|
|
571
|
-
});
|
|
572
|
-
const toShallow = (value) => value;
|
|
573
|
-
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
574
|
-
function get$1(target, key, isReadonly2 = false, isShallow = false) {
|
|
575
|
-
target = target["__v_raw"];
|
|
576
|
-
const rawTarget = toRaw(target);
|
|
577
|
-
const rawKey = toRaw(key);
|
|
578
|
-
if (key !== rawKey) {
|
|
579
|
-
!isReadonly2 && track(rawTarget, "get", key);
|
|
580
|
-
}
|
|
581
|
-
!isReadonly2 && track(rawTarget, "get", rawKey);
|
|
582
|
-
const { has: has2 } = getProto(rawTarget);
|
|
583
|
-
const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
584
|
-
if (has2.call(rawTarget, key)) {
|
|
585
|
-
return wrap(target.get(key));
|
|
586
|
-
} else if (has2.call(rawTarget, rawKey)) {
|
|
587
|
-
return wrap(target.get(rawKey));
|
|
588
|
-
} else if (target !== rawTarget) {
|
|
589
|
-
target.get(key);
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
function has$1(key, isReadonly2 = false) {
|
|
593
|
-
const target = this["__v_raw"];
|
|
594
|
-
const rawTarget = toRaw(target);
|
|
595
|
-
const rawKey = toRaw(key);
|
|
596
|
-
if (key !== rawKey) {
|
|
597
|
-
!isReadonly2 && track(rawTarget, "has", key);
|
|
598
|
-
}
|
|
599
|
-
!isReadonly2 && track(rawTarget, "has", rawKey);
|
|
600
|
-
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
601
|
-
}
|
|
602
|
-
function size(target, isReadonly2 = false) {
|
|
603
|
-
target = target["__v_raw"];
|
|
604
|
-
!isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
605
|
-
return Reflect.get(target, "size", target);
|
|
606
|
-
}
|
|
607
|
-
function add(value) {
|
|
608
|
-
value = toRaw(value);
|
|
609
|
-
const target = toRaw(this);
|
|
610
|
-
const proto = getProto(target);
|
|
611
|
-
const hadKey = proto.has.call(target, value);
|
|
612
|
-
if (!hadKey) {
|
|
613
|
-
target.add(value);
|
|
614
|
-
trigger(target, "add", value, value);
|
|
615
|
-
}
|
|
616
|
-
return this;
|
|
617
|
-
}
|
|
618
|
-
function set$1(key, value) {
|
|
619
|
-
value = toRaw(value);
|
|
620
|
-
const target = toRaw(this);
|
|
621
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
622
|
-
let hadKey = has2.call(target, key);
|
|
623
|
-
if (!hadKey) {
|
|
624
|
-
key = toRaw(key);
|
|
625
|
-
hadKey = has2.call(target, key);
|
|
626
|
-
}
|
|
627
|
-
const oldValue = get2.call(target, key);
|
|
628
|
-
target.set(key, value);
|
|
629
|
-
if (!hadKey) {
|
|
630
|
-
trigger(target, "add", key, value);
|
|
631
|
-
} else if (hasChanged(value, oldValue)) {
|
|
632
|
-
trigger(target, "set", key, value);
|
|
633
|
-
}
|
|
634
|
-
return this;
|
|
635
|
-
}
|
|
636
|
-
function deleteEntry(key) {
|
|
637
|
-
const target = toRaw(this);
|
|
638
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
639
|
-
let hadKey = has2.call(target, key);
|
|
640
|
-
if (!hadKey) {
|
|
641
|
-
key = toRaw(key);
|
|
642
|
-
hadKey = has2.call(target, key);
|
|
643
|
-
}
|
|
644
|
-
get2 ? get2.call(target, key) : void 0;
|
|
645
|
-
const result = target.delete(key);
|
|
646
|
-
if (hadKey) {
|
|
647
|
-
trigger(target, "delete", key, void 0);
|
|
648
|
-
}
|
|
649
|
-
return result;
|
|
650
|
-
}
|
|
651
|
-
function clear() {
|
|
652
|
-
const target = toRaw(this);
|
|
653
|
-
const hadItems = target.size !== 0;
|
|
654
|
-
const result = target.clear();
|
|
655
|
-
if (hadItems) {
|
|
656
|
-
trigger(target, "clear", void 0, void 0);
|
|
657
|
-
}
|
|
658
|
-
return result;
|
|
659
|
-
}
|
|
660
|
-
function createForEach(isReadonly2, isShallow) {
|
|
661
|
-
return function forEach(callback, thisArg) {
|
|
662
|
-
const observed = this;
|
|
663
|
-
const target = observed["__v_raw"];
|
|
664
|
-
const rawTarget = toRaw(target);
|
|
665
|
-
const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
666
|
-
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
667
|
-
return target.forEach((value, key) => {
|
|
668
|
-
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
669
|
-
});
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
function createIterableMethod(method, isReadonly2, isShallow) {
|
|
673
|
-
return function(...args) {
|
|
674
|
-
const target = this["__v_raw"];
|
|
675
|
-
const rawTarget = toRaw(target);
|
|
676
|
-
const targetIsMap = isMap(rawTarget);
|
|
677
|
-
const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
|
|
678
|
-
const isKeyOnly = method === "keys" && targetIsMap;
|
|
679
|
-
const innerIterator = target[method](...args);
|
|
680
|
-
const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
681
|
-
!isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
|
|
682
|
-
return {
|
|
683
|
-
next() {
|
|
684
|
-
const { value, done } = innerIterator.next();
|
|
685
|
-
return done ? { value, done } : {
|
|
686
|
-
value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
|
|
687
|
-
done
|
|
688
|
-
};
|
|
689
|
-
},
|
|
690
|
-
[Symbol.iterator]() {
|
|
691
|
-
return this;
|
|
692
|
-
}
|
|
693
|
-
};
|
|
694
|
-
};
|
|
695
|
-
}
|
|
696
|
-
function createReadonlyMethod(type) {
|
|
697
|
-
return function(...args) {
|
|
698
|
-
return type === "delete" ? false : this;
|
|
699
|
-
};
|
|
700
|
-
}
|
|
701
|
-
function createInstrumentations() {
|
|
702
|
-
const mutableInstrumentations2 = {
|
|
703
|
-
get(key) {
|
|
704
|
-
return get$1(this, key);
|
|
705
|
-
},
|
|
706
|
-
get size() {
|
|
707
|
-
return size(this);
|
|
708
|
-
},
|
|
709
|
-
has: has$1,
|
|
710
|
-
add,
|
|
711
|
-
set: set$1,
|
|
712
|
-
delete: deleteEntry,
|
|
713
|
-
clear,
|
|
714
|
-
forEach: createForEach(false, false)
|
|
715
|
-
};
|
|
716
|
-
const shallowInstrumentations2 = {
|
|
717
|
-
get(key) {
|
|
718
|
-
return get$1(this, key, false, true);
|
|
719
|
-
},
|
|
720
|
-
get size() {
|
|
721
|
-
return size(this);
|
|
722
|
-
},
|
|
723
|
-
has: has$1,
|
|
724
|
-
add,
|
|
725
|
-
set: set$1,
|
|
726
|
-
delete: deleteEntry,
|
|
727
|
-
clear,
|
|
728
|
-
forEach: createForEach(false, true)
|
|
729
|
-
};
|
|
730
|
-
const readonlyInstrumentations2 = {
|
|
731
|
-
get(key) {
|
|
732
|
-
return get$1(this, key, true);
|
|
733
|
-
},
|
|
734
|
-
get size() {
|
|
735
|
-
return size(this, true);
|
|
736
|
-
},
|
|
737
|
-
has(key) {
|
|
738
|
-
return has$1.call(this, key, true);
|
|
739
|
-
},
|
|
740
|
-
add: createReadonlyMethod("add"),
|
|
741
|
-
set: createReadonlyMethod("set"),
|
|
742
|
-
delete: createReadonlyMethod("delete"),
|
|
743
|
-
clear: createReadonlyMethod("clear"),
|
|
744
|
-
forEach: createForEach(true, false)
|
|
745
|
-
};
|
|
746
|
-
const shallowReadonlyInstrumentations2 = {
|
|
747
|
-
get(key) {
|
|
748
|
-
return get$1(this, key, true, true);
|
|
749
|
-
},
|
|
750
|
-
get size() {
|
|
751
|
-
return size(this, true);
|
|
752
|
-
},
|
|
753
|
-
has(key) {
|
|
754
|
-
return has$1.call(this, key, true);
|
|
755
|
-
},
|
|
756
|
-
add: createReadonlyMethod("add"),
|
|
757
|
-
set: createReadonlyMethod("set"),
|
|
758
|
-
delete: createReadonlyMethod("delete"),
|
|
759
|
-
clear: createReadonlyMethod("clear"),
|
|
760
|
-
forEach: createForEach(true, true)
|
|
761
|
-
};
|
|
762
|
-
const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
|
|
763
|
-
iteratorMethods.forEach((method) => {
|
|
764
|
-
mutableInstrumentations2[method] = createIterableMethod(method, false, false);
|
|
765
|
-
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
766
|
-
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
767
|
-
shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true);
|
|
768
|
-
});
|
|
769
|
-
return [
|
|
770
|
-
mutableInstrumentations2,
|
|
771
|
-
readonlyInstrumentations2,
|
|
772
|
-
shallowInstrumentations2,
|
|
773
|
-
shallowReadonlyInstrumentations2
|
|
774
|
-
];
|
|
775
|
-
}
|
|
776
|
-
const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations();
|
|
777
|
-
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
778
|
-
const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
|
|
779
|
-
return (target, key, receiver) => {
|
|
780
|
-
if (key === "__v_isReactive") {
|
|
781
|
-
return !isReadonly2;
|
|
782
|
-
} else if (key === "__v_isReadonly") {
|
|
783
|
-
return isReadonly2;
|
|
784
|
-
} else if (key === "__v_raw") {
|
|
785
|
-
return target;
|
|
786
|
-
}
|
|
787
|
-
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
788
|
-
};
|
|
789
|
-
}
|
|
790
|
-
const mutableCollectionHandlers = {
|
|
791
|
-
get: /* @__PURE__ */ createInstrumentationGetter(false, false)
|
|
792
|
-
};
|
|
793
|
-
const shallowCollectionHandlers = {
|
|
794
|
-
get: /* @__PURE__ */ createInstrumentationGetter(false, true)
|
|
795
|
-
};
|
|
796
|
-
const readonlyCollectionHandlers = {
|
|
797
|
-
get: /* @__PURE__ */ createInstrumentationGetter(true, false)
|
|
798
|
-
};
|
|
799
|
-
const reactiveMap = new WeakMap();
|
|
800
|
-
const shallowReactiveMap = new WeakMap();
|
|
801
|
-
const readonlyMap = new WeakMap();
|
|
802
|
-
const shallowReadonlyMap = new WeakMap();
|
|
803
|
-
function targetTypeMap(rawType) {
|
|
804
|
-
switch (rawType) {
|
|
805
|
-
case "Object":
|
|
806
|
-
case "Array":
|
|
807
|
-
return 1;
|
|
808
|
-
case "Map":
|
|
809
|
-
case "Set":
|
|
810
|
-
case "WeakMap":
|
|
811
|
-
case "WeakSet":
|
|
812
|
-
return 2;
|
|
813
|
-
default:
|
|
814
|
-
return 0;
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
function getTargetType(value) {
|
|
818
|
-
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
819
|
-
}
|
|
820
|
-
function reactive(target) {
|
|
821
|
-
if (target && target["__v_isReadonly"]) {
|
|
822
|
-
return target;
|
|
823
|
-
}
|
|
824
|
-
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
825
|
-
}
|
|
826
|
-
function shallowReactive(target) {
|
|
827
|
-
return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
|
|
828
|
-
}
|
|
829
|
-
function readonly(target) {
|
|
830
|
-
return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
|
|
831
|
-
}
|
|
832
|
-
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
|
|
833
|
-
if (!isObject(target)) {
|
|
834
|
-
return target;
|
|
835
|
-
}
|
|
836
|
-
if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
|
|
837
|
-
return target;
|
|
838
|
-
}
|
|
839
|
-
const existingProxy = proxyMap.get(target);
|
|
840
|
-
if (existingProxy) {
|
|
841
|
-
return existingProxy;
|
|
842
|
-
}
|
|
843
|
-
const targetType = getTargetType(target);
|
|
844
|
-
if (targetType === 0) {
|
|
845
|
-
return target;
|
|
846
|
-
}
|
|
847
|
-
const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
|
|
848
|
-
proxyMap.set(target, proxy);
|
|
849
|
-
return proxy;
|
|
850
|
-
}
|
|
851
|
-
function isReactive(value) {
|
|
852
|
-
if (isReadonly(value)) {
|
|
853
|
-
return isReactive(value["__v_raw"]);
|
|
854
|
-
}
|
|
855
|
-
return !!(value && value["__v_isReactive"]);
|
|
856
|
-
}
|
|
857
|
-
function isReadonly(value) {
|
|
858
|
-
return !!(value && value["__v_isReadonly"]);
|
|
859
|
-
}
|
|
860
|
-
function isProxy(value) {
|
|
861
|
-
return isReactive(value) || isReadonly(value);
|
|
862
|
-
}
|
|
863
|
-
function toRaw(observed) {
|
|
864
|
-
const raw = observed && observed["__v_raw"];
|
|
865
|
-
return raw ? toRaw(raw) : observed;
|
|
866
|
-
}
|
|
867
|
-
function markRaw(value) {
|
|
868
|
-
def(value, "__v_skip", true);
|
|
869
|
-
return value;
|
|
870
|
-
}
|
|
871
|
-
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
872
|
-
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
873
|
-
function trackRefValue(ref2) {
|
|
874
|
-
if (isTracking()) {
|
|
875
|
-
ref2 = toRaw(ref2);
|
|
876
|
-
if (!ref2.dep) {
|
|
877
|
-
ref2.dep = createDep();
|
|
878
|
-
}
|
|
879
|
-
{
|
|
880
|
-
trackEffects(ref2.dep);
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
function triggerRefValue(ref2, newVal) {
|
|
885
|
-
ref2 = toRaw(ref2);
|
|
886
|
-
if (ref2.dep) {
|
|
887
|
-
{
|
|
888
|
-
triggerEffects(ref2.dep);
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
function isRef(r) {
|
|
893
|
-
return Boolean(r && r.__v_isRef === true);
|
|
894
|
-
}
|
|
895
|
-
function ref(value) {
|
|
896
|
-
return createRef(value, false);
|
|
897
|
-
}
|
|
898
|
-
function createRef(rawValue, shallow) {
|
|
899
|
-
if (isRef(rawValue)) {
|
|
900
|
-
return rawValue;
|
|
901
|
-
}
|
|
902
|
-
return new RefImpl(rawValue, shallow);
|
|
903
|
-
}
|
|
904
|
-
class RefImpl {
|
|
905
|
-
constructor(value, _shallow) {
|
|
906
|
-
this._shallow = _shallow;
|
|
907
|
-
this.dep = void 0;
|
|
908
|
-
this.__v_isRef = true;
|
|
909
|
-
this._rawValue = _shallow ? value : toRaw(value);
|
|
910
|
-
this._value = _shallow ? value : toReactive(value);
|
|
911
|
-
}
|
|
912
|
-
get value() {
|
|
913
|
-
trackRefValue(this);
|
|
914
|
-
return this._value;
|
|
915
|
-
}
|
|
916
|
-
set value(newVal) {
|
|
917
|
-
newVal = this._shallow ? newVal : toRaw(newVal);
|
|
918
|
-
if (hasChanged(newVal, this._rawValue)) {
|
|
919
|
-
this._rawValue = newVal;
|
|
920
|
-
this._value = this._shallow ? newVal : toReactive(newVal);
|
|
921
|
-
triggerRefValue(this);
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
function unref(ref2) {
|
|
926
|
-
return isRef(ref2) ? ref2.value : ref2;
|
|
927
|
-
}
|
|
928
|
-
const shallowUnwrapHandlers = {
|
|
929
|
-
get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
|
|
930
|
-
set: (target, key, value, receiver) => {
|
|
931
|
-
const oldValue = target[key];
|
|
932
|
-
if (isRef(oldValue) && !isRef(value)) {
|
|
933
|
-
oldValue.value = value;
|
|
934
|
-
return true;
|
|
935
|
-
} else {
|
|
936
|
-
return Reflect.set(target, key, value, receiver);
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
};
|
|
940
|
-
function proxyRefs(objectWithRefs) {
|
|
941
|
-
return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
|
|
942
|
-
}
|
|
943
|
-
class ComputedRefImpl {
|
|
944
|
-
constructor(getter, _setter, isReadonly2) {
|
|
945
|
-
this._setter = _setter;
|
|
946
|
-
this.dep = void 0;
|
|
947
|
-
this._dirty = true;
|
|
948
|
-
this.__v_isRef = true;
|
|
949
|
-
this.effect = new ReactiveEffect(getter, () => {
|
|
950
|
-
if (!this._dirty) {
|
|
951
|
-
this._dirty = true;
|
|
952
|
-
triggerRefValue(this);
|
|
953
|
-
}
|
|
954
|
-
});
|
|
955
|
-
this["__v_isReadonly"] = isReadonly2;
|
|
956
|
-
}
|
|
957
|
-
get value() {
|
|
958
|
-
const self2 = toRaw(this);
|
|
959
|
-
trackRefValue(self2);
|
|
960
|
-
if (self2._dirty) {
|
|
961
|
-
self2._dirty = false;
|
|
962
|
-
self2._value = self2.effect.run();
|
|
963
|
-
}
|
|
964
|
-
return self2._value;
|
|
965
|
-
}
|
|
966
|
-
set value(newValue) {
|
|
967
|
-
this._setter(newValue);
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
function computed(getterOrOptions, debugOptions) {
|
|
971
|
-
let getter;
|
|
972
|
-
let setter;
|
|
973
|
-
const onlyGetter = isFunction(getterOrOptions);
|
|
974
|
-
if (onlyGetter) {
|
|
975
|
-
getter = getterOrOptions;
|
|
976
|
-
setter = NOOP;
|
|
977
|
-
} else {
|
|
978
|
-
getter = getterOrOptions.get;
|
|
979
|
-
setter = getterOrOptions.set;
|
|
980
|
-
}
|
|
981
|
-
const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter);
|
|
982
|
-
return cRef;
|
|
983
|
-
}
|
|
984
|
-
Promise.resolve();
|
|
985
|
-
function emit$1(instance, event, ...rawArgs) {
|
|
986
|
-
const props = instance.vnode.props || EMPTY_OBJ;
|
|
987
|
-
let args = rawArgs;
|
|
988
|
-
const isModelListener2 = event.startsWith("update:");
|
|
989
|
-
const modelArg = isModelListener2 && event.slice(7);
|
|
990
|
-
if (modelArg && modelArg in props) {
|
|
991
|
-
const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
|
|
992
|
-
const { number, trim } = props[modifiersKey] || EMPTY_OBJ;
|
|
993
|
-
if (trim) {
|
|
994
|
-
args = rawArgs.map((a) => a.trim());
|
|
995
|
-
} else if (number) {
|
|
996
|
-
args = rawArgs.map(toNumber);
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
let handlerName;
|
|
1000
|
-
let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize(event))];
|
|
1001
|
-
if (!handler && isModelListener2) {
|
|
1002
|
-
handler = props[handlerName = toHandlerKey(hyphenate(event))];
|
|
1003
|
-
}
|
|
1004
|
-
if (handler) {
|
|
1005
|
-
callWithAsyncErrorHandling(handler, instance, 6, args);
|
|
1006
|
-
}
|
|
1007
|
-
const onceHandler = props[handlerName + `Once`];
|
|
1008
|
-
if (onceHandler) {
|
|
1009
|
-
if (!instance.emitted) {
|
|
1010
|
-
instance.emitted = {};
|
|
1011
|
-
} else if (instance.emitted[handlerName]) {
|
|
1012
|
-
return;
|
|
1013
|
-
}
|
|
1014
|
-
instance.emitted[handlerName] = true;
|
|
1015
|
-
callWithAsyncErrorHandling(onceHandler, instance, 6, args);
|
|
1016
|
-
}
|
|
1017
|
-
}
|
|
1018
|
-
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
1019
|
-
const cache = appContext.emitsCache;
|
|
1020
|
-
const cached = cache.get(comp);
|
|
1021
|
-
if (cached !== void 0) {
|
|
1022
|
-
return cached;
|
|
1023
|
-
}
|
|
1024
|
-
const raw = comp.emits;
|
|
1025
|
-
let normalized = {};
|
|
1026
|
-
let hasExtends = false;
|
|
1027
|
-
if (!isFunction(comp)) {
|
|
1028
|
-
const extendEmits = (raw2) => {
|
|
1029
|
-
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
|
|
1030
|
-
if (normalizedFromExtend) {
|
|
1031
|
-
hasExtends = true;
|
|
1032
|
-
extend(normalized, normalizedFromExtend);
|
|
1033
|
-
}
|
|
1034
|
-
};
|
|
1035
|
-
if (!asMixin && appContext.mixins.length) {
|
|
1036
|
-
appContext.mixins.forEach(extendEmits);
|
|
1037
|
-
}
|
|
1038
|
-
if (comp.extends) {
|
|
1039
|
-
extendEmits(comp.extends);
|
|
1040
|
-
}
|
|
1041
|
-
if (comp.mixins) {
|
|
1042
|
-
comp.mixins.forEach(extendEmits);
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
if (!raw && !hasExtends) {
|
|
1046
|
-
cache.set(comp, null);
|
|
1047
|
-
return null;
|
|
1048
|
-
}
|
|
1049
|
-
if (isArray(raw)) {
|
|
1050
|
-
raw.forEach((key) => normalized[key] = null);
|
|
1051
|
-
} else {
|
|
1052
|
-
extend(normalized, raw);
|
|
1053
|
-
}
|
|
1054
|
-
cache.set(comp, normalized);
|
|
1055
|
-
return normalized;
|
|
1056
|
-
}
|
|
1057
|
-
function isEmitListener(options, key) {
|
|
1058
|
-
if (!options || !isOn(key)) {
|
|
1059
|
-
return false;
|
|
1060
|
-
}
|
|
1061
|
-
key = key.slice(2).replace(/Once$/, "");
|
|
1062
|
-
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
1063
|
-
}
|
|
1064
|
-
let currentRenderingInstance = null;
|
|
1065
|
-
let currentScopeId = null;
|
|
1066
|
-
function setCurrentRenderingInstance(instance) {
|
|
1067
|
-
const prev = currentRenderingInstance;
|
|
1068
|
-
currentRenderingInstance = instance;
|
|
1069
|
-
currentScopeId = instance && instance.type.__scopeId || null;
|
|
1070
|
-
return prev;
|
|
1071
|
-
}
|
|
1072
|
-
function pushScopeId(id) {
|
|
1073
|
-
currentScopeId = id;
|
|
1074
|
-
}
|
|
1075
|
-
function popScopeId() {
|
|
1076
|
-
currentScopeId = null;
|
|
1077
|
-
}
|
|
1078
|
-
function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
|
|
1079
|
-
if (!ctx)
|
|
1080
|
-
return fn;
|
|
1081
|
-
if (fn._n) {
|
|
1082
|
-
return fn;
|
|
1083
|
-
}
|
|
1084
|
-
const renderFnWithContext = (...args) => {
|
|
1085
|
-
if (renderFnWithContext._d) {
|
|
1086
|
-
setBlockTracking(-1);
|
|
1087
|
-
}
|
|
1088
|
-
const prevInstance = setCurrentRenderingInstance(ctx);
|
|
1089
|
-
const res = fn(...args);
|
|
1090
|
-
setCurrentRenderingInstance(prevInstance);
|
|
1091
|
-
if (renderFnWithContext._d) {
|
|
1092
|
-
setBlockTracking(1);
|
|
1093
|
-
}
|
|
1094
|
-
return res;
|
|
1095
|
-
};
|
|
1096
|
-
renderFnWithContext._n = true;
|
|
1097
|
-
renderFnWithContext._c = true;
|
|
1098
|
-
renderFnWithContext._d = true;
|
|
1099
|
-
return renderFnWithContext;
|
|
1100
|
-
}
|
|
1101
|
-
function markAttrsAccessed() {
|
|
1102
|
-
}
|
|
1103
|
-
function renderComponentRoot(instance) {
|
|
1104
|
-
const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render: render2, renderCache, data, setupState, ctx, inheritAttrs } = instance;
|
|
1105
|
-
let result;
|
|
1106
|
-
let fallthroughAttrs;
|
|
1107
|
-
const prev = setCurrentRenderingInstance(instance);
|
|
1108
|
-
try {
|
|
1109
|
-
if (vnode.shapeFlag & 4) {
|
|
1110
|
-
const proxyToUse = withProxy || proxy;
|
|
1111
|
-
result = normalizeVNode(render2.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx));
|
|
1112
|
-
fallthroughAttrs = attrs;
|
|
1113
|
-
} else {
|
|
1114
|
-
const render3 = Component;
|
|
1115
|
-
if (false)
|
|
1116
|
-
;
|
|
1117
|
-
result = normalizeVNode(render3.length > 1 ? render3(props, false ? {
|
|
1118
|
-
get attrs() {
|
|
1119
|
-
markAttrsAccessed();
|
|
1120
|
-
return attrs;
|
|
1121
|
-
},
|
|
1122
|
-
slots,
|
|
1123
|
-
emit
|
|
1124
|
-
} : { attrs, slots, emit }) : render3(props, null));
|
|
1125
|
-
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
1126
|
-
}
|
|
1127
|
-
} catch (err) {
|
|
1128
|
-
blockStack.length = 0;
|
|
1129
|
-
handleError(err, instance, 1);
|
|
1130
|
-
result = createVNode(Comment);
|
|
1131
|
-
}
|
|
1132
|
-
let root = result;
|
|
1133
|
-
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
1134
|
-
const keys = Object.keys(fallthroughAttrs);
|
|
1135
|
-
const { shapeFlag } = root;
|
|
1136
|
-
if (keys.length) {
|
|
1137
|
-
if (shapeFlag & (1 | 6)) {
|
|
1138
|
-
if (propsOptions && keys.some(isModelListener)) {
|
|
1139
|
-
fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
|
|
1140
|
-
}
|
|
1141
|
-
root = cloneVNode(root, fallthroughAttrs);
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
if (vnode.dirs) {
|
|
1146
|
-
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
1147
|
-
}
|
|
1148
|
-
if (vnode.transition) {
|
|
1149
|
-
root.transition = vnode.transition;
|
|
1150
|
-
}
|
|
1151
|
-
{
|
|
1152
|
-
result = root;
|
|
1153
|
-
}
|
|
1154
|
-
setCurrentRenderingInstance(prev);
|
|
1155
|
-
return result;
|
|
1156
|
-
}
|
|
1157
|
-
const getFunctionalFallthrough = (attrs) => {
|
|
1158
|
-
let res;
|
|
1159
|
-
for (const key in attrs) {
|
|
1160
|
-
if (key === "class" || key === "style" || isOn(key)) {
|
|
1161
|
-
(res || (res = {}))[key] = attrs[key];
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
return res;
|
|
1165
|
-
};
|
|
1166
|
-
const filterModelListeners = (attrs, props) => {
|
|
1167
|
-
const res = {};
|
|
1168
|
-
for (const key in attrs) {
|
|
1169
|
-
if (!isModelListener(key) || !(key.slice(9) in props)) {
|
|
1170
|
-
res[key] = attrs[key];
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
return res;
|
|
1174
|
-
};
|
|
1175
|
-
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
1176
|
-
const { props: prevProps, children: prevChildren, component } = prevVNode;
|
|
1177
|
-
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
|
|
1178
|
-
const emits = component.emitsOptions;
|
|
1179
|
-
if (nextVNode.dirs || nextVNode.transition) {
|
|
1180
|
-
return true;
|
|
1181
|
-
}
|
|
1182
|
-
if (optimized && patchFlag >= 0) {
|
|
1183
|
-
if (patchFlag & 1024) {
|
|
1184
|
-
return true;
|
|
1185
|
-
}
|
|
1186
|
-
if (patchFlag & 16) {
|
|
1187
|
-
if (!prevProps) {
|
|
1188
|
-
return !!nextProps;
|
|
1189
|
-
}
|
|
1190
|
-
return hasPropsChanged(prevProps, nextProps, emits);
|
|
1191
|
-
} else if (patchFlag & 8) {
|
|
1192
|
-
const dynamicProps = nextVNode.dynamicProps;
|
|
1193
|
-
for (let i = 0; i < dynamicProps.length; i++) {
|
|
1194
|
-
const key = dynamicProps[i];
|
|
1195
|
-
if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
|
|
1196
|
-
return true;
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
} else {
|
|
1201
|
-
if (prevChildren || nextChildren) {
|
|
1202
|
-
if (!nextChildren || !nextChildren.$stable) {
|
|
1203
|
-
return true;
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
if (prevProps === nextProps) {
|
|
1207
|
-
return false;
|
|
1208
|
-
}
|
|
1209
|
-
if (!prevProps) {
|
|
1210
|
-
return !!nextProps;
|
|
1211
|
-
}
|
|
1212
|
-
if (!nextProps) {
|
|
1213
|
-
return true;
|
|
1214
|
-
}
|
|
1215
|
-
return hasPropsChanged(prevProps, nextProps, emits);
|
|
1216
|
-
}
|
|
1217
|
-
return false;
|
|
1218
|
-
}
|
|
1219
|
-
function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
1220
|
-
const nextKeys = Object.keys(nextProps);
|
|
1221
|
-
if (nextKeys.length !== Object.keys(prevProps).length) {
|
|
1222
|
-
return true;
|
|
1223
|
-
}
|
|
1224
|
-
for (let i = 0; i < nextKeys.length; i++) {
|
|
1225
|
-
const key = nextKeys[i];
|
|
1226
|
-
if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
|
|
1227
|
-
return true;
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
return false;
|
|
1231
|
-
}
|
|
1232
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
1233
|
-
while (parent && parent.subTree === vnode) {
|
|
1234
|
-
(vnode = parent.vnode).el = el;
|
|
1235
|
-
parent = parent.parent;
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
const isSuspense = (type) => type.__isSuspense;
|
|
1239
|
-
function queueEffectWithSuspense(fn, suspense) {
|
|
1240
|
-
if (suspense && suspense.pendingBranch) {
|
|
1241
|
-
if (isArray(fn)) {
|
|
1242
|
-
suspense.effects.push(...fn);
|
|
1243
|
-
} else {
|
|
1244
|
-
suspense.effects.push(fn);
|
|
1245
|
-
}
|
|
1246
|
-
} else {
|
|
1247
|
-
queuePostFlushCb(fn);
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
function provide(key, value) {
|
|
1251
|
-
if (!currentInstance)
|
|
1252
|
-
;
|
|
1253
|
-
else {
|
|
1254
|
-
let provides = currentInstance.provides;
|
|
1255
|
-
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
|
|
1256
|
-
if (parentProvides === provides) {
|
|
1257
|
-
provides = currentInstance.provides = Object.create(parentProvides);
|
|
1258
|
-
}
|
|
1259
|
-
provides[key] = value;
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
1263
|
-
const instance = currentInstance || currentRenderingInstance;
|
|
1264
|
-
if (instance) {
|
|
1265
|
-
const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides;
|
|
1266
|
-
if (provides && key in provides) {
|
|
1267
|
-
return provides[key];
|
|
1268
|
-
} else if (arguments.length > 1) {
|
|
1269
|
-
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance.proxy) : defaultValue;
|
|
1270
|
-
} else
|
|
1271
|
-
;
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
function useTransitionState() {
|
|
1275
|
-
const state = {
|
|
1276
|
-
isMounted: false,
|
|
1277
|
-
isLeaving: false,
|
|
1278
|
-
isUnmounting: false,
|
|
1279
|
-
leavingVNodes: new Map()
|
|
1280
|
-
};
|
|
1281
|
-
onMounted(() => {
|
|
1282
|
-
state.isMounted = true;
|
|
1283
|
-
});
|
|
1284
|
-
onBeforeUnmount(() => {
|
|
1285
|
-
state.isUnmounting = true;
|
|
1286
|
-
});
|
|
1287
|
-
return state;
|
|
1288
|
-
}
|
|
1289
|
-
const TransitionHookValidator = [Function, Array];
|
|
1290
|
-
const BaseTransitionImpl = {
|
|
1291
|
-
name: `BaseTransition`,
|
|
1292
|
-
props: {
|
|
1293
|
-
mode: String,
|
|
1294
|
-
appear: Boolean,
|
|
1295
|
-
persisted: Boolean,
|
|
1296
|
-
onBeforeEnter: TransitionHookValidator,
|
|
1297
|
-
onEnter: TransitionHookValidator,
|
|
1298
|
-
onAfterEnter: TransitionHookValidator,
|
|
1299
|
-
onEnterCancelled: TransitionHookValidator,
|
|
1300
|
-
onBeforeLeave: TransitionHookValidator,
|
|
1301
|
-
onLeave: TransitionHookValidator,
|
|
1302
|
-
onAfterLeave: TransitionHookValidator,
|
|
1303
|
-
onLeaveCancelled: TransitionHookValidator,
|
|
1304
|
-
onBeforeAppear: TransitionHookValidator,
|
|
1305
|
-
onAppear: TransitionHookValidator,
|
|
1306
|
-
onAfterAppear: TransitionHookValidator,
|
|
1307
|
-
onAppearCancelled: TransitionHookValidator
|
|
1308
|
-
},
|
|
1309
|
-
setup(props, { slots }) {
|
|
1310
|
-
const instance = getCurrentInstance();
|
|
1311
|
-
const state = useTransitionState();
|
|
1312
|
-
let prevTransitionKey;
|
|
1313
|
-
return () => {
|
|
1314
|
-
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
1315
|
-
if (!children || !children.length) {
|
|
1316
|
-
return;
|
|
1317
|
-
}
|
|
1318
|
-
const rawProps = toRaw(props);
|
|
1319
|
-
const { mode } = rawProps;
|
|
1320
|
-
const child = children[0];
|
|
1321
|
-
if (state.isLeaving) {
|
|
1322
|
-
return emptyPlaceholder(child);
|
|
1323
|
-
}
|
|
1324
|
-
const innerChild = getKeepAliveChild(child);
|
|
1325
|
-
if (!innerChild) {
|
|
1326
|
-
return emptyPlaceholder(child);
|
|
1327
|
-
}
|
|
1328
|
-
const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance);
|
|
1329
|
-
setTransitionHooks(innerChild, enterHooks);
|
|
1330
|
-
const oldChild = instance.subTree;
|
|
1331
|
-
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
1332
|
-
let transitionKeyChanged = false;
|
|
1333
|
-
const { getTransitionKey } = innerChild.type;
|
|
1334
|
-
if (getTransitionKey) {
|
|
1335
|
-
const key = getTransitionKey();
|
|
1336
|
-
if (prevTransitionKey === void 0) {
|
|
1337
|
-
prevTransitionKey = key;
|
|
1338
|
-
} else if (key !== prevTransitionKey) {
|
|
1339
|
-
prevTransitionKey = key;
|
|
1340
|
-
transitionKeyChanged = true;
|
|
1341
|
-
}
|
|
1342
|
-
}
|
|
1343
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
1344
|
-
const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
|
|
1345
|
-
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
1346
|
-
if (mode === "out-in") {
|
|
1347
|
-
state.isLeaving = true;
|
|
1348
|
-
leavingHooks.afterLeave = () => {
|
|
1349
|
-
state.isLeaving = false;
|
|
1350
|
-
instance.update();
|
|
1351
|
-
};
|
|
1352
|
-
return emptyPlaceholder(child);
|
|
1353
|
-
} else if (mode === "in-out" && innerChild.type !== Comment) {
|
|
1354
|
-
leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
1355
|
-
const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
|
|
1356
|
-
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
1357
|
-
el._leaveCb = () => {
|
|
1358
|
-
earlyRemove();
|
|
1359
|
-
el._leaveCb = void 0;
|
|
1360
|
-
delete enterHooks.delayedLeave;
|
|
1361
|
-
};
|
|
1362
|
-
enterHooks.delayedLeave = delayedLeave;
|
|
1363
|
-
};
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
return child;
|
|
1367
|
-
};
|
|
1368
|
-
}
|
|
1369
|
-
};
|
|
1370
|
-
const BaseTransition = BaseTransitionImpl;
|
|
1371
|
-
function getLeavingNodesForType(state, vnode) {
|
|
1372
|
-
const { leavingVNodes } = state;
|
|
1373
|
-
let leavingVNodesCache = leavingVNodes.get(vnode.type);
|
|
1374
|
-
if (!leavingVNodesCache) {
|
|
1375
|
-
leavingVNodesCache = Object.create(null);
|
|
1376
|
-
leavingVNodes.set(vnode.type, leavingVNodesCache);
|
|
1377
|
-
}
|
|
1378
|
-
return leavingVNodesCache;
|
|
1379
|
-
}
|
|
1380
|
-
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
1381
|
-
const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;
|
|
1382
|
-
const key = String(vnode.key);
|
|
1383
|
-
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
1384
|
-
const callHook2 = (hook, args) => {
|
|
1385
|
-
hook && callWithAsyncErrorHandling(hook, instance, 9, args);
|
|
1386
|
-
};
|
|
1387
|
-
const hooks = {
|
|
1388
|
-
mode,
|
|
1389
|
-
persisted,
|
|
1390
|
-
beforeEnter(el) {
|
|
1391
|
-
let hook = onBeforeEnter;
|
|
1392
|
-
if (!state.isMounted) {
|
|
1393
|
-
if (appear) {
|
|
1394
|
-
hook = onBeforeAppear || onBeforeEnter;
|
|
1395
|
-
} else {
|
|
1396
|
-
return;
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
if (el._leaveCb) {
|
|
1400
|
-
el._leaveCb(true);
|
|
1401
|
-
}
|
|
1402
|
-
const leavingVNode = leavingVNodesCache[key];
|
|
1403
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) {
|
|
1404
|
-
leavingVNode.el._leaveCb();
|
|
1405
|
-
}
|
|
1406
|
-
callHook2(hook, [el]);
|
|
1407
|
-
},
|
|
1408
|
-
enter(el) {
|
|
1409
|
-
let hook = onEnter;
|
|
1410
|
-
let afterHook = onAfterEnter;
|
|
1411
|
-
let cancelHook = onEnterCancelled;
|
|
1412
|
-
if (!state.isMounted) {
|
|
1413
|
-
if (appear) {
|
|
1414
|
-
hook = onAppear || onEnter;
|
|
1415
|
-
afterHook = onAfterAppear || onAfterEnter;
|
|
1416
|
-
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
1417
|
-
} else {
|
|
1418
|
-
return;
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
let called = false;
|
|
1422
|
-
const done = el._enterCb = (cancelled) => {
|
|
1423
|
-
if (called)
|
|
1424
|
-
return;
|
|
1425
|
-
called = true;
|
|
1426
|
-
if (cancelled) {
|
|
1427
|
-
callHook2(cancelHook, [el]);
|
|
1428
|
-
} else {
|
|
1429
|
-
callHook2(afterHook, [el]);
|
|
1430
|
-
}
|
|
1431
|
-
if (hooks.delayedLeave) {
|
|
1432
|
-
hooks.delayedLeave();
|
|
1433
|
-
}
|
|
1434
|
-
el._enterCb = void 0;
|
|
1435
|
-
};
|
|
1436
|
-
if (hook) {
|
|
1437
|
-
hook(el, done);
|
|
1438
|
-
if (hook.length <= 1) {
|
|
1439
|
-
done();
|
|
1440
|
-
}
|
|
1441
|
-
} else {
|
|
1442
|
-
done();
|
|
1443
|
-
}
|
|
1444
|
-
},
|
|
1445
|
-
leave(el, remove2) {
|
|
1446
|
-
const key2 = String(vnode.key);
|
|
1447
|
-
if (el._enterCb) {
|
|
1448
|
-
el._enterCb(true);
|
|
1449
|
-
}
|
|
1450
|
-
if (state.isUnmounting) {
|
|
1451
|
-
return remove2();
|
|
1452
|
-
}
|
|
1453
|
-
callHook2(onBeforeLeave, [el]);
|
|
1454
|
-
let called = false;
|
|
1455
|
-
const done = el._leaveCb = (cancelled) => {
|
|
1456
|
-
if (called)
|
|
1457
|
-
return;
|
|
1458
|
-
called = true;
|
|
1459
|
-
remove2();
|
|
1460
|
-
if (cancelled) {
|
|
1461
|
-
callHook2(onLeaveCancelled, [el]);
|
|
1462
|
-
} else {
|
|
1463
|
-
callHook2(onAfterLeave, [el]);
|
|
1464
|
-
}
|
|
1465
|
-
el._leaveCb = void 0;
|
|
1466
|
-
if (leavingVNodesCache[key2] === vnode) {
|
|
1467
|
-
delete leavingVNodesCache[key2];
|
|
1468
|
-
}
|
|
1469
|
-
};
|
|
1470
|
-
leavingVNodesCache[key2] = vnode;
|
|
1471
|
-
if (onLeave) {
|
|
1472
|
-
onLeave(el, done);
|
|
1473
|
-
if (onLeave.length <= 1) {
|
|
1474
|
-
done();
|
|
1475
|
-
}
|
|
1476
|
-
} else {
|
|
1477
|
-
done();
|
|
1478
|
-
}
|
|
1479
|
-
},
|
|
1480
|
-
clone(vnode2) {
|
|
1481
|
-
return resolveTransitionHooks(vnode2, props, state, instance);
|
|
1482
|
-
}
|
|
1483
|
-
};
|
|
1484
|
-
return hooks;
|
|
1485
|
-
}
|
|
1486
|
-
function emptyPlaceholder(vnode) {
|
|
1487
|
-
if (isKeepAlive(vnode)) {
|
|
1488
|
-
vnode = cloneVNode(vnode);
|
|
1489
|
-
vnode.children = null;
|
|
1490
|
-
return vnode;
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
|
-
function getKeepAliveChild(vnode) {
|
|
1494
|
-
return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode;
|
|
1495
|
-
}
|
|
1496
|
-
function setTransitionHooks(vnode, hooks) {
|
|
1497
|
-
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
1498
|
-
setTransitionHooks(vnode.component.subTree, hooks);
|
|
1499
|
-
} else if (vnode.shapeFlag & 128) {
|
|
1500
|
-
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
1501
|
-
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
1502
|
-
} else {
|
|
1503
|
-
vnode.transition = hooks;
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
1507
|
-
let ret = [];
|
|
1508
|
-
let keyedFragmentCount = 0;
|
|
1509
|
-
for (let i = 0; i < children.length; i++) {
|
|
1510
|
-
const child = children[i];
|
|
1511
|
-
if (child.type === Fragment) {
|
|
1512
|
-
if (child.patchFlag & 128)
|
|
1513
|
-
keyedFragmentCount++;
|
|
1514
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
1515
|
-
} else if (keepComment || child.type !== Comment) {
|
|
1516
|
-
ret.push(child);
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
if (keyedFragmentCount > 1) {
|
|
1520
|
-
for (let i = 0; i < ret.length; i++) {
|
|
1521
|
-
ret[i].patchFlag = -2;
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
return ret;
|
|
1525
|
-
}
|
|
1526
|
-
function defineComponent(options) {
|
|
1527
|
-
return isFunction(options) ? { setup: options, name: options.name } : options;
|
|
1528
|
-
}
|
|
1529
|
-
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
1530
|
-
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
1531
|
-
function onActivated(hook, target) {
|
|
1532
|
-
registerKeepAliveHook(hook, "a", target);
|
|
1533
|
-
}
|
|
1534
|
-
function onDeactivated(hook, target) {
|
|
1535
|
-
registerKeepAliveHook(hook, "da", target);
|
|
1536
|
-
}
|
|
1537
|
-
function registerKeepAliveHook(hook, type, target = currentInstance) {
|
|
1538
|
-
const wrappedHook = hook.__wdc || (hook.__wdc = () => {
|
|
1539
|
-
let current = target;
|
|
1540
|
-
while (current) {
|
|
1541
|
-
if (current.isDeactivated) {
|
|
1542
|
-
return;
|
|
1543
|
-
}
|
|
1544
|
-
current = current.parent;
|
|
1545
|
-
}
|
|
1546
|
-
return hook();
|
|
1547
|
-
});
|
|
1548
|
-
injectHook(type, wrappedHook, target);
|
|
1549
|
-
if (target) {
|
|
1550
|
-
let current = target.parent;
|
|
1551
|
-
while (current && current.parent) {
|
|
1552
|
-
if (isKeepAlive(current.parent.vnode)) {
|
|
1553
|
-
injectToKeepAliveRoot(wrappedHook, type, target, current);
|
|
1554
|
-
}
|
|
1555
|
-
current = current.parent;
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
1560
|
-
const injected = injectHook(type, hook, keepAliveRoot, true);
|
|
1561
|
-
onUnmounted(() => {
|
|
1562
|
-
remove(keepAliveRoot[type], injected);
|
|
1563
|
-
}, target);
|
|
1564
|
-
}
|
|
1565
|
-
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
1566
|
-
if (target) {
|
|
1567
|
-
const hooks = target[type] || (target[type] = []);
|
|
1568
|
-
const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
|
|
1569
|
-
if (target.isUnmounted) {
|
|
1570
|
-
return;
|
|
1571
|
-
}
|
|
1572
|
-
pauseTracking();
|
|
1573
|
-
setCurrentInstance(target);
|
|
1574
|
-
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
|
1575
|
-
unsetCurrentInstance();
|
|
1576
|
-
resetTracking();
|
|
1577
|
-
return res;
|
|
1578
|
-
});
|
|
1579
|
-
if (prepend) {
|
|
1580
|
-
hooks.unshift(wrappedHook);
|
|
1581
|
-
} else {
|
|
1582
|
-
hooks.push(wrappedHook);
|
|
1583
|
-
}
|
|
1584
|
-
return wrappedHook;
|
|
1585
|
-
}
|
|
1586
|
-
}
|
|
1587
|
-
const createHook = (lifecycle) => (hook, target = currentInstance) => (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, hook, target);
|
|
1588
|
-
const onBeforeMount = createHook("bm");
|
|
1589
|
-
const onMounted = createHook("m");
|
|
1590
|
-
const onBeforeUpdate = createHook("bu");
|
|
1591
|
-
const onUpdated = createHook("u");
|
|
1592
|
-
const onBeforeUnmount = createHook("bum");
|
|
1593
|
-
const onUnmounted = createHook("um");
|
|
1594
|
-
const onServerPrefetch = createHook("sp");
|
|
1595
|
-
const onRenderTriggered = createHook("rtg");
|
|
1596
|
-
const onRenderTracked = createHook("rtc");
|
|
1597
|
-
function onErrorCaptured(hook, target = currentInstance) {
|
|
1598
|
-
injectHook("ec", hook, target);
|
|
1599
|
-
}
|
|
1600
|
-
let shouldCacheAccess = true;
|
|
1601
|
-
function applyOptions(instance) {
|
|
1602
|
-
const options = resolveMergedOptions(instance);
|
|
1603
|
-
const publicThis = instance.proxy;
|
|
1604
|
-
const ctx = instance.ctx;
|
|
1605
|
-
shouldCacheAccess = false;
|
|
1606
|
-
if (options.beforeCreate) {
|
|
1607
|
-
callHook(options.beforeCreate, instance, "bc");
|
|
1608
|
-
}
|
|
1609
|
-
const {
|
|
1610
|
-
data: dataOptions,
|
|
1611
|
-
computed: computedOptions,
|
|
1612
|
-
methods,
|
|
1613
|
-
watch: watchOptions,
|
|
1614
|
-
provide: provideOptions,
|
|
1615
|
-
inject: injectOptions,
|
|
1616
|
-
created,
|
|
1617
|
-
beforeMount,
|
|
1618
|
-
mounted,
|
|
1619
|
-
beforeUpdate,
|
|
1620
|
-
updated,
|
|
1621
|
-
activated,
|
|
1622
|
-
deactivated,
|
|
1623
|
-
beforeDestroy,
|
|
1624
|
-
beforeUnmount,
|
|
1625
|
-
destroyed,
|
|
1626
|
-
unmounted,
|
|
1627
|
-
render: render2,
|
|
1628
|
-
renderTracked,
|
|
1629
|
-
renderTriggered,
|
|
1630
|
-
errorCaptured,
|
|
1631
|
-
serverPrefetch,
|
|
1632
|
-
expose,
|
|
1633
|
-
inheritAttrs,
|
|
1634
|
-
components: components2,
|
|
1635
|
-
directives,
|
|
1636
|
-
filters
|
|
1637
|
-
} = options;
|
|
1638
|
-
const checkDuplicateProperties = null;
|
|
1639
|
-
if (injectOptions) {
|
|
1640
|
-
resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef);
|
|
1641
|
-
}
|
|
1642
|
-
if (methods) {
|
|
1643
|
-
for (const key in methods) {
|
|
1644
|
-
const methodHandler = methods[key];
|
|
1645
|
-
if (isFunction(methodHandler)) {
|
|
1646
|
-
{
|
|
1647
|
-
ctx[key] = methodHandler.bind(publicThis);
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1652
|
-
if (dataOptions) {
|
|
1653
|
-
const data = dataOptions.call(publicThis, publicThis);
|
|
1654
|
-
if (!isObject(data))
|
|
1655
|
-
;
|
|
1656
|
-
else {
|
|
1657
|
-
instance.data = reactive(data);
|
|
1658
|
-
}
|
|
1659
|
-
}
|
|
1660
|
-
shouldCacheAccess = true;
|
|
1661
|
-
if (computedOptions) {
|
|
1662
|
-
for (const key in computedOptions) {
|
|
1663
|
-
const opt = computedOptions[key];
|
|
1664
|
-
const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
1665
|
-
const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP;
|
|
1666
|
-
const c = computed({
|
|
1667
|
-
get: get2,
|
|
1668
|
-
set: set2
|
|
1669
|
-
});
|
|
1670
|
-
Object.defineProperty(ctx, key, {
|
|
1671
|
-
enumerable: true,
|
|
1672
|
-
configurable: true,
|
|
1673
|
-
get: () => c.value,
|
|
1674
|
-
set: (v) => c.value = v
|
|
1675
|
-
});
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
if (watchOptions) {
|
|
1679
|
-
for (const key in watchOptions) {
|
|
1680
|
-
createWatcher(watchOptions[key], ctx, publicThis, key);
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
if (provideOptions) {
|
|
1684
|
-
const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
|
|
1685
|
-
Reflect.ownKeys(provides).forEach((key) => {
|
|
1686
|
-
provide(key, provides[key]);
|
|
1687
|
-
});
|
|
1688
|
-
}
|
|
1689
|
-
if (created) {
|
|
1690
|
-
callHook(created, instance, "c");
|
|
1691
|
-
}
|
|
1692
|
-
function registerLifecycleHook(register, hook) {
|
|
1693
|
-
if (isArray(hook)) {
|
|
1694
|
-
hook.forEach((_hook) => register(_hook.bind(publicThis)));
|
|
1695
|
-
} else if (hook) {
|
|
1696
|
-
register(hook.bind(publicThis));
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
|
-
registerLifecycleHook(onBeforeMount, beforeMount);
|
|
1700
|
-
registerLifecycleHook(onMounted, mounted);
|
|
1701
|
-
registerLifecycleHook(onBeforeUpdate, beforeUpdate);
|
|
1702
|
-
registerLifecycleHook(onUpdated, updated);
|
|
1703
|
-
registerLifecycleHook(onActivated, activated);
|
|
1704
|
-
registerLifecycleHook(onDeactivated, deactivated);
|
|
1705
|
-
registerLifecycleHook(onErrorCaptured, errorCaptured);
|
|
1706
|
-
registerLifecycleHook(onRenderTracked, renderTracked);
|
|
1707
|
-
registerLifecycleHook(onRenderTriggered, renderTriggered);
|
|
1708
|
-
registerLifecycleHook(onBeforeUnmount, beforeUnmount);
|
|
1709
|
-
registerLifecycleHook(onUnmounted, unmounted);
|
|
1710
|
-
registerLifecycleHook(onServerPrefetch, serverPrefetch);
|
|
1711
|
-
if (isArray(expose)) {
|
|
1712
|
-
if (expose.length) {
|
|
1713
|
-
const exposed = instance.exposed || (instance.exposed = {});
|
|
1714
|
-
expose.forEach((key) => {
|
|
1715
|
-
Object.defineProperty(exposed, key, {
|
|
1716
|
-
get: () => publicThis[key],
|
|
1717
|
-
set: (val) => publicThis[key] = val
|
|
1718
|
-
});
|
|
1719
|
-
});
|
|
1720
|
-
} else if (!instance.exposed) {
|
|
1721
|
-
instance.exposed = {};
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
if (render2 && instance.render === NOOP) {
|
|
1725
|
-
instance.render = render2;
|
|
1726
|
-
}
|
|
1727
|
-
if (inheritAttrs != null) {
|
|
1728
|
-
instance.inheritAttrs = inheritAttrs;
|
|
1729
|
-
}
|
|
1730
|
-
if (components2)
|
|
1731
|
-
instance.components = components2;
|
|
1732
|
-
if (directives)
|
|
1733
|
-
instance.directives = directives;
|
|
1734
|
-
}
|
|
1735
|
-
function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) {
|
|
1736
|
-
if (isArray(injectOptions)) {
|
|
1737
|
-
injectOptions = normalizeInject(injectOptions);
|
|
1738
|
-
}
|
|
1739
|
-
for (const key in injectOptions) {
|
|
1740
|
-
const opt = injectOptions[key];
|
|
1741
|
-
let injected;
|
|
1742
|
-
if (isObject(opt)) {
|
|
1743
|
-
if ("default" in opt) {
|
|
1744
|
-
injected = inject(opt.from || key, opt.default, true);
|
|
1745
|
-
} else {
|
|
1746
|
-
injected = inject(opt.from || key);
|
|
1747
|
-
}
|
|
1748
|
-
} else {
|
|
1749
|
-
injected = inject(opt);
|
|
1750
|
-
}
|
|
1751
|
-
if (isRef(injected)) {
|
|
1752
|
-
if (unwrapRef) {
|
|
1753
|
-
Object.defineProperty(ctx, key, {
|
|
1754
|
-
enumerable: true,
|
|
1755
|
-
configurable: true,
|
|
1756
|
-
get: () => injected.value,
|
|
1757
|
-
set: (v) => injected.value = v
|
|
1758
|
-
});
|
|
1759
|
-
} else {
|
|
1760
|
-
ctx[key] = injected;
|
|
1761
|
-
}
|
|
1762
|
-
} else {
|
|
1763
|
-
ctx[key] = injected;
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
|
-
function callHook(hook, instance, type) {
|
|
1768
|
-
callWithAsyncErrorHandling(isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type);
|
|
1769
|
-
}
|
|
1770
|
-
function createWatcher(raw, ctx, publicThis, key) {
|
|
1771
|
-
const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
|
|
1772
|
-
if (isString(raw)) {
|
|
1773
|
-
const handler = ctx[raw];
|
|
1774
|
-
if (isFunction(handler)) {
|
|
1775
|
-
watch(getter, handler);
|
|
1776
|
-
}
|
|
1777
|
-
} else if (isFunction(raw)) {
|
|
1778
|
-
watch(getter, raw.bind(publicThis));
|
|
1779
|
-
} else if (isObject(raw)) {
|
|
1780
|
-
if (isArray(raw)) {
|
|
1781
|
-
raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
1782
|
-
} else {
|
|
1783
|
-
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
1784
|
-
if (isFunction(handler)) {
|
|
1785
|
-
watch(getter, handler, raw);
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
} else
|
|
1789
|
-
;
|
|
1790
|
-
}
|
|
1791
|
-
function resolveMergedOptions(instance) {
|
|
1792
|
-
const base = instance.type;
|
|
1793
|
-
const { mixins, extends: extendsOptions } = base;
|
|
1794
|
-
const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
|
|
1795
|
-
const cached = cache.get(base);
|
|
1796
|
-
let resolved;
|
|
1797
|
-
if (cached) {
|
|
1798
|
-
resolved = cached;
|
|
1799
|
-
} else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
1800
|
-
{
|
|
1801
|
-
resolved = base;
|
|
1802
|
-
}
|
|
1803
|
-
} else {
|
|
1804
|
-
resolved = {};
|
|
1805
|
-
if (globalMixins.length) {
|
|
1806
|
-
globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
|
|
1807
|
-
}
|
|
1808
|
-
mergeOptions(resolved, base, optionMergeStrategies);
|
|
1809
|
-
}
|
|
1810
|
-
cache.set(base, resolved);
|
|
1811
|
-
return resolved;
|
|
1812
|
-
}
|
|
1813
|
-
function mergeOptions(to, from, strats, asMixin = false) {
|
|
1814
|
-
const { mixins, extends: extendsOptions } = from;
|
|
1815
|
-
if (extendsOptions) {
|
|
1816
|
-
mergeOptions(to, extendsOptions, strats, true);
|
|
1817
|
-
}
|
|
1818
|
-
if (mixins) {
|
|
1819
|
-
mixins.forEach((m) => mergeOptions(to, m, strats, true));
|
|
1820
|
-
}
|
|
1821
|
-
for (const key in from) {
|
|
1822
|
-
if (asMixin && key === "expose")
|
|
1823
|
-
;
|
|
1824
|
-
else {
|
|
1825
|
-
const strat = internalOptionMergeStrats[key] || strats && strats[key];
|
|
1826
|
-
to[key] = strat ? strat(to[key], from[key]) : from[key];
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
return to;
|
|
1830
|
-
}
|
|
1831
|
-
const internalOptionMergeStrats = {
|
|
1832
|
-
data: mergeDataFn,
|
|
1833
|
-
props: mergeObjectOptions,
|
|
1834
|
-
emits: mergeObjectOptions,
|
|
1835
|
-
methods: mergeObjectOptions,
|
|
1836
|
-
computed: mergeObjectOptions,
|
|
1837
|
-
beforeCreate: mergeAsArray,
|
|
1838
|
-
created: mergeAsArray,
|
|
1839
|
-
beforeMount: mergeAsArray,
|
|
1840
|
-
mounted: mergeAsArray,
|
|
1841
|
-
beforeUpdate: mergeAsArray,
|
|
1842
|
-
updated: mergeAsArray,
|
|
1843
|
-
beforeDestroy: mergeAsArray,
|
|
1844
|
-
beforeUnmount: mergeAsArray,
|
|
1845
|
-
destroyed: mergeAsArray,
|
|
1846
|
-
unmounted: mergeAsArray,
|
|
1847
|
-
activated: mergeAsArray,
|
|
1848
|
-
deactivated: mergeAsArray,
|
|
1849
|
-
errorCaptured: mergeAsArray,
|
|
1850
|
-
serverPrefetch: mergeAsArray,
|
|
1851
|
-
components: mergeObjectOptions,
|
|
1852
|
-
directives: mergeObjectOptions,
|
|
1853
|
-
watch: mergeWatchOptions,
|
|
1854
|
-
provide: mergeDataFn,
|
|
1855
|
-
inject: mergeInject
|
|
1856
|
-
};
|
|
1857
|
-
function mergeDataFn(to, from) {
|
|
1858
|
-
if (!from) {
|
|
1859
|
-
return to;
|
|
1860
|
-
}
|
|
1861
|
-
if (!to) {
|
|
1862
|
-
return from;
|
|
1863
|
-
}
|
|
1864
|
-
return function mergedDataFn() {
|
|
1865
|
-
return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
|
|
1866
|
-
};
|
|
1867
|
-
}
|
|
1868
|
-
function mergeInject(to, from) {
|
|
1869
|
-
return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
|
|
1870
|
-
}
|
|
1871
|
-
function normalizeInject(raw) {
|
|
1872
|
-
if (isArray(raw)) {
|
|
1873
|
-
const res = {};
|
|
1874
|
-
for (let i = 0; i < raw.length; i++) {
|
|
1875
|
-
res[raw[i]] = raw[i];
|
|
1876
|
-
}
|
|
1877
|
-
return res;
|
|
1878
|
-
}
|
|
1879
|
-
return raw;
|
|
1880
|
-
}
|
|
1881
|
-
function mergeAsArray(to, from) {
|
|
1882
|
-
return to ? [...new Set([].concat(to, from))] : from;
|
|
1883
|
-
}
|
|
1884
|
-
function mergeObjectOptions(to, from) {
|
|
1885
|
-
return to ? extend(extend(Object.create(null), to), from) : from;
|
|
1886
|
-
}
|
|
1887
|
-
function mergeWatchOptions(to, from) {
|
|
1888
|
-
if (!to)
|
|
1889
|
-
return from;
|
|
1890
|
-
if (!from)
|
|
1891
|
-
return to;
|
|
1892
|
-
const merged = extend(Object.create(null), to);
|
|
1893
|
-
for (const key in from) {
|
|
1894
|
-
merged[key] = mergeAsArray(to[key], from[key]);
|
|
1895
|
-
}
|
|
1896
|
-
return merged;
|
|
1897
|
-
}
|
|
1898
|
-
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
1899
|
-
const props = {};
|
|
1900
|
-
const attrs = {};
|
|
1901
|
-
def(attrs, InternalObjectKey, 1);
|
|
1902
|
-
instance.propsDefaults = Object.create(null);
|
|
1903
|
-
setFullProps(instance, rawProps, props, attrs);
|
|
1904
|
-
for (const key in instance.propsOptions[0]) {
|
|
1905
|
-
if (!(key in props)) {
|
|
1906
|
-
props[key] = void 0;
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
|
-
if (isStateful) {
|
|
1910
|
-
instance.props = isSSR ? props : shallowReactive(props);
|
|
1911
|
-
} else {
|
|
1912
|
-
if (!instance.type.props) {
|
|
1913
|
-
instance.props = attrs;
|
|
1914
|
-
} else {
|
|
1915
|
-
instance.props = props;
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
instance.attrs = attrs;
|
|
1919
|
-
}
|
|
1920
|
-
function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
1921
|
-
const { props, attrs, vnode: { patchFlag } } = instance;
|
|
1922
|
-
const rawCurrentProps = toRaw(props);
|
|
1923
|
-
const [options] = instance.propsOptions;
|
|
1924
|
-
let hasAttrsChanged = false;
|
|
1925
|
-
if ((optimized || patchFlag > 0) && !(patchFlag & 16)) {
|
|
1926
|
-
if (patchFlag & 8) {
|
|
1927
|
-
const propsToUpdate = instance.vnode.dynamicProps;
|
|
1928
|
-
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
1929
|
-
let key = propsToUpdate[i];
|
|
1930
|
-
const value = rawProps[key];
|
|
1931
|
-
if (options) {
|
|
1932
|
-
if (hasOwn(attrs, key)) {
|
|
1933
|
-
if (value !== attrs[key]) {
|
|
1934
|
-
attrs[key] = value;
|
|
1935
|
-
hasAttrsChanged = true;
|
|
1936
|
-
}
|
|
1937
|
-
} else {
|
|
1938
|
-
const camelizedKey = camelize(key);
|
|
1939
|
-
props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false);
|
|
1940
|
-
}
|
|
1941
|
-
} else {
|
|
1942
|
-
if (value !== attrs[key]) {
|
|
1943
|
-
attrs[key] = value;
|
|
1944
|
-
hasAttrsChanged = true;
|
|
1945
|
-
}
|
|
1946
|
-
}
|
|
1947
|
-
}
|
|
1948
|
-
}
|
|
1949
|
-
} else {
|
|
1950
|
-
if (setFullProps(instance, rawProps, props, attrs)) {
|
|
1951
|
-
hasAttrsChanged = true;
|
|
1952
|
-
}
|
|
1953
|
-
let kebabKey;
|
|
1954
|
-
for (const key in rawCurrentProps) {
|
|
1955
|
-
if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
1956
|
-
if (options) {
|
|
1957
|
-
if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) {
|
|
1958
|
-
props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance, true);
|
|
1959
|
-
}
|
|
1960
|
-
} else {
|
|
1961
|
-
delete props[key];
|
|
1962
|
-
}
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
if (attrs !== rawCurrentProps) {
|
|
1966
|
-
for (const key in attrs) {
|
|
1967
|
-
if (!rawProps || !hasOwn(rawProps, key)) {
|
|
1968
|
-
delete attrs[key];
|
|
1969
|
-
hasAttrsChanged = true;
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
}
|
|
1974
|
-
if (hasAttrsChanged) {
|
|
1975
|
-
trigger(instance, "set", "$attrs");
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
function setFullProps(instance, rawProps, props, attrs) {
|
|
1979
|
-
const [options, needCastKeys] = instance.propsOptions;
|
|
1980
|
-
let hasAttrsChanged = false;
|
|
1981
|
-
let rawCastValues;
|
|
1982
|
-
if (rawProps) {
|
|
1983
|
-
for (let key in rawProps) {
|
|
1984
|
-
if (isReservedProp(key)) {
|
|
1985
|
-
continue;
|
|
1986
|
-
}
|
|
1987
|
-
const value = rawProps[key];
|
|
1988
|
-
let camelKey;
|
|
1989
|
-
if (options && hasOwn(options, camelKey = camelize(key))) {
|
|
1990
|
-
if (!needCastKeys || !needCastKeys.includes(camelKey)) {
|
|
1991
|
-
props[camelKey] = value;
|
|
1992
|
-
} else {
|
|
1993
|
-
(rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
1994
|
-
}
|
|
1995
|
-
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
1996
|
-
if (!(key in attrs) || value !== attrs[key]) {
|
|
1997
|
-
attrs[key] = value;
|
|
1998
|
-
hasAttrsChanged = true;
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
2003
|
-
if (needCastKeys) {
|
|
2004
|
-
const rawCurrentProps = toRaw(props);
|
|
2005
|
-
const castValues = rawCastValues || EMPTY_OBJ;
|
|
2006
|
-
for (let i = 0; i < needCastKeys.length; i++) {
|
|
2007
|
-
const key = needCastKeys[i];
|
|
2008
|
-
props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
return hasAttrsChanged;
|
|
2012
|
-
}
|
|
2013
|
-
function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
2014
|
-
const opt = options[key];
|
|
2015
|
-
if (opt != null) {
|
|
2016
|
-
const hasDefault = hasOwn(opt, "default");
|
|
2017
|
-
if (hasDefault && value === void 0) {
|
|
2018
|
-
const defaultValue = opt.default;
|
|
2019
|
-
if (opt.type !== Function && isFunction(defaultValue)) {
|
|
2020
|
-
const { propsDefaults } = instance;
|
|
2021
|
-
if (key in propsDefaults) {
|
|
2022
|
-
value = propsDefaults[key];
|
|
2023
|
-
} else {
|
|
2024
|
-
setCurrentInstance(instance);
|
|
2025
|
-
value = propsDefaults[key] = defaultValue.call(null, props);
|
|
2026
|
-
unsetCurrentInstance();
|
|
2027
|
-
}
|
|
2028
|
-
} else {
|
|
2029
|
-
value = defaultValue;
|
|
2030
|
-
}
|
|
2031
|
-
}
|
|
2032
|
-
if (opt[0]) {
|
|
2033
|
-
if (isAbsent && !hasDefault) {
|
|
2034
|
-
value = false;
|
|
2035
|
-
} else if (opt[1] && (value === "" || value === hyphenate(key))) {
|
|
2036
|
-
value = true;
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
}
|
|
2040
|
-
return value;
|
|
2041
|
-
}
|
|
2042
|
-
function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
2043
|
-
const cache = appContext.propsCache;
|
|
2044
|
-
const cached = cache.get(comp);
|
|
2045
|
-
if (cached) {
|
|
2046
|
-
return cached;
|
|
2047
|
-
}
|
|
2048
|
-
const raw = comp.props;
|
|
2049
|
-
const normalized = {};
|
|
2050
|
-
const needCastKeys = [];
|
|
2051
|
-
let hasExtends = false;
|
|
2052
|
-
if (!isFunction(comp)) {
|
|
2053
|
-
const extendProps = (raw2) => {
|
|
2054
|
-
hasExtends = true;
|
|
2055
|
-
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
2056
|
-
extend(normalized, props);
|
|
2057
|
-
if (keys)
|
|
2058
|
-
needCastKeys.push(...keys);
|
|
2059
|
-
};
|
|
2060
|
-
if (!asMixin && appContext.mixins.length) {
|
|
2061
|
-
appContext.mixins.forEach(extendProps);
|
|
2062
|
-
}
|
|
2063
|
-
if (comp.extends) {
|
|
2064
|
-
extendProps(comp.extends);
|
|
2065
|
-
}
|
|
2066
|
-
if (comp.mixins) {
|
|
2067
|
-
comp.mixins.forEach(extendProps);
|
|
2068
|
-
}
|
|
2069
|
-
}
|
|
2070
|
-
if (!raw && !hasExtends) {
|
|
2071
|
-
cache.set(comp, EMPTY_ARR);
|
|
2072
|
-
return EMPTY_ARR;
|
|
2073
|
-
}
|
|
2074
|
-
if (isArray(raw)) {
|
|
2075
|
-
for (let i = 0; i < raw.length; i++) {
|
|
2076
|
-
const normalizedKey = camelize(raw[i]);
|
|
2077
|
-
if (validatePropName(normalizedKey)) {
|
|
2078
|
-
normalized[normalizedKey] = EMPTY_OBJ;
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
} else if (raw) {
|
|
2082
|
-
for (const key in raw) {
|
|
2083
|
-
const normalizedKey = camelize(key);
|
|
2084
|
-
if (validatePropName(normalizedKey)) {
|
|
2085
|
-
const opt = raw[key];
|
|
2086
|
-
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : opt;
|
|
2087
|
-
if (prop) {
|
|
2088
|
-
const booleanIndex = getTypeIndex(Boolean, prop.type);
|
|
2089
|
-
const stringIndex = getTypeIndex(String, prop.type);
|
|
2090
|
-
prop[0] = booleanIndex > -1;
|
|
2091
|
-
prop[1] = stringIndex < 0 || booleanIndex < stringIndex;
|
|
2092
|
-
if (booleanIndex > -1 || hasOwn(prop, "default")) {
|
|
2093
|
-
needCastKeys.push(normalizedKey);
|
|
2094
|
-
}
|
|
2095
|
-
}
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
}
|
|
2099
|
-
const res = [normalized, needCastKeys];
|
|
2100
|
-
cache.set(comp, res);
|
|
2101
|
-
return res;
|
|
2102
|
-
}
|
|
2103
|
-
function validatePropName(key) {
|
|
2104
|
-
if (key[0] !== "$") {
|
|
2105
|
-
return true;
|
|
2106
|
-
}
|
|
2107
|
-
return false;
|
|
2108
|
-
}
|
|
2109
|
-
function getType(ctor) {
|
|
2110
|
-
const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
|
|
2111
|
-
return match ? match[1] : ctor === null ? "null" : "";
|
|
2112
|
-
}
|
|
2113
|
-
function isSameType(a, b) {
|
|
2114
|
-
return getType(a) === getType(b);
|
|
2115
|
-
}
|
|
2116
|
-
function getTypeIndex(type, expectedTypes) {
|
|
2117
|
-
if (isArray(expectedTypes)) {
|
|
2118
|
-
return expectedTypes.findIndex((t) => isSameType(t, type));
|
|
2119
|
-
} else if (isFunction(expectedTypes)) {
|
|
2120
|
-
return isSameType(expectedTypes, type) ? 0 : -1;
|
|
2121
|
-
}
|
|
2122
|
-
return -1;
|
|
2123
|
-
}
|
|
2124
|
-
const isInternalKey = (key) => key[0] === "_" || key === "$stable";
|
|
2125
|
-
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
2126
|
-
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
2127
|
-
const normalized = withCtx((...args) => {
|
|
2128
|
-
return normalizeSlotValue(rawSlot(...args));
|
|
2129
|
-
}, ctx);
|
|
2130
|
-
normalized._c = false;
|
|
2131
|
-
return normalized;
|
|
2132
|
-
};
|
|
2133
|
-
const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
2134
|
-
const ctx = rawSlots._ctx;
|
|
2135
|
-
for (const key in rawSlots) {
|
|
2136
|
-
if (isInternalKey(key))
|
|
2137
|
-
continue;
|
|
2138
|
-
const value = rawSlots[key];
|
|
2139
|
-
if (isFunction(value)) {
|
|
2140
|
-
slots[key] = normalizeSlot(key, value, ctx);
|
|
2141
|
-
} else if (value != null) {
|
|
2142
|
-
const normalized = normalizeSlotValue(value);
|
|
2143
|
-
slots[key] = () => normalized;
|
|
2144
|
-
}
|
|
2145
|
-
}
|
|
2146
|
-
};
|
|
2147
|
-
const normalizeVNodeSlots = (instance, children) => {
|
|
2148
|
-
const normalized = normalizeSlotValue(children);
|
|
2149
|
-
instance.slots.default = () => normalized;
|
|
2150
|
-
};
|
|
2151
|
-
const initSlots = (instance, children) => {
|
|
2152
|
-
if (instance.vnode.shapeFlag & 32) {
|
|
2153
|
-
const type = children._;
|
|
2154
|
-
if (type) {
|
|
2155
|
-
instance.slots = toRaw(children);
|
|
2156
|
-
def(children, "_", type);
|
|
2157
|
-
} else {
|
|
2158
|
-
normalizeObjectSlots(children, instance.slots = {});
|
|
2159
|
-
}
|
|
2160
|
-
} else {
|
|
2161
|
-
instance.slots = {};
|
|
2162
|
-
if (children) {
|
|
2163
|
-
normalizeVNodeSlots(instance, children);
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
|
-
def(instance.slots, InternalObjectKey, 1);
|
|
2167
|
-
};
|
|
2168
|
-
const updateSlots = (instance, children, optimized) => {
|
|
2169
|
-
const { vnode, slots } = instance;
|
|
2170
|
-
let needDeletionCheck = true;
|
|
2171
|
-
let deletionComparisonTarget = EMPTY_OBJ;
|
|
2172
|
-
if (vnode.shapeFlag & 32) {
|
|
2173
|
-
const type = children._;
|
|
2174
|
-
if (type) {
|
|
2175
|
-
if (optimized && type === 1) {
|
|
2176
|
-
needDeletionCheck = false;
|
|
2177
|
-
} else {
|
|
2178
|
-
extend(slots, children);
|
|
2179
|
-
if (!optimized && type === 1) {
|
|
2180
|
-
delete slots._;
|
|
2181
|
-
}
|
|
2182
|
-
}
|
|
2183
|
-
} else {
|
|
2184
|
-
needDeletionCheck = !children.$stable;
|
|
2185
|
-
normalizeObjectSlots(children, slots);
|
|
2186
|
-
}
|
|
2187
|
-
deletionComparisonTarget = children;
|
|
2188
|
-
} else if (children) {
|
|
2189
|
-
normalizeVNodeSlots(instance, children);
|
|
2190
|
-
deletionComparisonTarget = { default: 1 };
|
|
2191
|
-
}
|
|
2192
|
-
if (needDeletionCheck) {
|
|
2193
|
-
for (const key in slots) {
|
|
2194
|
-
if (!isInternalKey(key) && !(key in deletionComparisonTarget)) {
|
|
2195
|
-
delete slots[key];
|
|
2196
|
-
}
|
|
2197
|
-
}
|
|
2198
|
-
}
|
|
2199
|
-
};
|
|
2200
|
-
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
2201
|
-
const bindings = vnode.dirs;
|
|
2202
|
-
const oldBindings = prevVNode && prevVNode.dirs;
|
|
2203
|
-
for (let i = 0; i < bindings.length; i++) {
|
|
2204
|
-
const binding = bindings[i];
|
|
2205
|
-
if (oldBindings) {
|
|
2206
|
-
binding.oldValue = oldBindings[i].value;
|
|
2207
|
-
}
|
|
2208
|
-
let hook = binding.dir[name];
|
|
2209
|
-
if (hook) {
|
|
2210
|
-
pauseTracking();
|
|
2211
|
-
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
2212
|
-
vnode.el,
|
|
2213
|
-
binding,
|
|
2214
|
-
vnode,
|
|
2215
|
-
prevVNode
|
|
2216
|
-
]);
|
|
2217
|
-
resetTracking();
|
|
2218
|
-
}
|
|
2219
|
-
}
|
|
2220
|
-
}
|
|
2221
|
-
function createAppContext() {
|
|
2222
|
-
return {
|
|
2223
|
-
app: null,
|
|
2224
|
-
config: {
|
|
2225
|
-
isNativeTag: NO,
|
|
2226
|
-
performance: false,
|
|
2227
|
-
globalProperties: {},
|
|
2228
|
-
optionMergeStrategies: {},
|
|
2229
|
-
errorHandler: void 0,
|
|
2230
|
-
warnHandler: void 0,
|
|
2231
|
-
compilerOptions: {}
|
|
2232
|
-
},
|
|
2233
|
-
mixins: [],
|
|
2234
|
-
components: {},
|
|
2235
|
-
directives: {},
|
|
2236
|
-
provides: Object.create(null),
|
|
2237
|
-
optionsCache: new WeakMap(),
|
|
2238
|
-
propsCache: new WeakMap(),
|
|
2239
|
-
emitsCache: new WeakMap()
|
|
2240
|
-
};
|
|
2241
|
-
}
|
|
2242
|
-
let uid = 0;
|
|
2243
|
-
function createAppAPI(render2, hydrate) {
|
|
2244
|
-
return function createApp2(rootComponent, rootProps = null) {
|
|
2245
|
-
if (rootProps != null && !isObject(rootProps)) {
|
|
2246
|
-
rootProps = null;
|
|
2247
|
-
}
|
|
2248
|
-
const context = createAppContext();
|
|
2249
|
-
const installedPlugins = new Set();
|
|
2250
|
-
let isMounted = false;
|
|
2251
|
-
const app = context.app = {
|
|
2252
|
-
_uid: uid++,
|
|
2253
|
-
_component: rootComponent,
|
|
2254
|
-
_props: rootProps,
|
|
2255
|
-
_container: null,
|
|
2256
|
-
_context: context,
|
|
2257
|
-
_instance: null,
|
|
2258
|
-
version,
|
|
2259
|
-
get config() {
|
|
2260
|
-
return context.config;
|
|
2261
|
-
},
|
|
2262
|
-
set config(v) {
|
|
2263
|
-
},
|
|
2264
|
-
use(plugin, ...options) {
|
|
2265
|
-
if (installedPlugins.has(plugin))
|
|
2266
|
-
;
|
|
2267
|
-
else if (plugin && isFunction(plugin.install)) {
|
|
2268
|
-
installedPlugins.add(plugin);
|
|
2269
|
-
plugin.install(app, ...options);
|
|
2270
|
-
} else if (isFunction(plugin)) {
|
|
2271
|
-
installedPlugins.add(plugin);
|
|
2272
|
-
plugin(app, ...options);
|
|
2273
|
-
} else
|
|
2274
|
-
;
|
|
2275
|
-
return app;
|
|
2276
|
-
},
|
|
2277
|
-
mixin(mixin) {
|
|
2278
|
-
{
|
|
2279
|
-
if (!context.mixins.includes(mixin)) {
|
|
2280
|
-
context.mixins.push(mixin);
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
|
-
return app;
|
|
2284
|
-
},
|
|
2285
|
-
component(name, component) {
|
|
2286
|
-
if (!component) {
|
|
2287
|
-
return context.components[name];
|
|
2288
|
-
}
|
|
2289
|
-
context.components[name] = component;
|
|
2290
|
-
return app;
|
|
2291
|
-
},
|
|
2292
|
-
directive(name, directive) {
|
|
2293
|
-
if (!directive) {
|
|
2294
|
-
return context.directives[name];
|
|
2295
|
-
}
|
|
2296
|
-
context.directives[name] = directive;
|
|
2297
|
-
return app;
|
|
2298
|
-
},
|
|
2299
|
-
mount(rootContainer, isHydrate, isSVG) {
|
|
2300
|
-
if (!isMounted) {
|
|
2301
|
-
const vnode = createVNode(rootComponent, rootProps);
|
|
2302
|
-
vnode.appContext = context;
|
|
2303
|
-
if (isHydrate && hydrate) {
|
|
2304
|
-
hydrate(vnode, rootContainer);
|
|
2305
|
-
} else {
|
|
2306
|
-
render2(vnode, rootContainer, isSVG);
|
|
2307
|
-
}
|
|
2308
|
-
isMounted = true;
|
|
2309
|
-
app._container = rootContainer;
|
|
2310
|
-
rootContainer.__vue_app__ = app;
|
|
2311
|
-
return getExposeProxy(vnode.component) || vnode.component.proxy;
|
|
2312
|
-
}
|
|
2313
|
-
},
|
|
2314
|
-
unmount() {
|
|
2315
|
-
if (isMounted) {
|
|
2316
|
-
render2(null, app._container);
|
|
2317
|
-
delete app._container.__vue_app__;
|
|
2318
|
-
}
|
|
2319
|
-
},
|
|
2320
|
-
provide(key, value) {
|
|
2321
|
-
context.provides[key] = value;
|
|
2322
|
-
return app;
|
|
2323
|
-
}
|
|
2324
|
-
};
|
|
2325
|
-
return app;
|
|
2326
|
-
};
|
|
2327
|
-
}
|
|
2328
|
-
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
2329
|
-
if (isArray(rawRef)) {
|
|
2330
|
-
rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
|
|
2331
|
-
return;
|
|
2332
|
-
}
|
|
2333
|
-
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
2334
|
-
return;
|
|
2335
|
-
}
|
|
2336
|
-
const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
|
|
2337
|
-
const value = isUnmount ? null : refValue;
|
|
2338
|
-
const { i: owner, r: ref2 } = rawRef;
|
|
2339
|
-
const oldRef = oldRawRef && oldRawRef.r;
|
|
2340
|
-
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
2341
|
-
const setupState = owner.setupState;
|
|
2342
|
-
if (oldRef != null && oldRef !== ref2) {
|
|
2343
|
-
if (isString(oldRef)) {
|
|
2344
|
-
refs[oldRef] = null;
|
|
2345
|
-
if (hasOwn(setupState, oldRef)) {
|
|
2346
|
-
setupState[oldRef] = null;
|
|
2347
|
-
}
|
|
2348
|
-
} else if (isRef(oldRef)) {
|
|
2349
|
-
oldRef.value = null;
|
|
2350
|
-
}
|
|
2351
|
-
}
|
|
2352
|
-
if (isFunction(ref2)) {
|
|
2353
|
-
callWithErrorHandling(ref2, owner, 12, [value, refs]);
|
|
2354
|
-
} else {
|
|
2355
|
-
const _isString = isString(ref2);
|
|
2356
|
-
const _isRef = isRef(ref2);
|
|
2357
|
-
if (_isString || _isRef) {
|
|
2358
|
-
const doSet = () => {
|
|
2359
|
-
if (rawRef.f) {
|
|
2360
|
-
const existing = _isString ? refs[ref2] : ref2.value;
|
|
2361
|
-
if (isUnmount) {
|
|
2362
|
-
isArray(existing) && remove(existing, refValue);
|
|
2363
|
-
} else {
|
|
2364
|
-
if (!isArray(existing)) {
|
|
2365
|
-
if (_isString) {
|
|
2366
|
-
refs[ref2] = [refValue];
|
|
2367
|
-
} else {
|
|
2368
|
-
ref2.value = [refValue];
|
|
2369
|
-
if (rawRef.k)
|
|
2370
|
-
refs[rawRef.k] = ref2.value;
|
|
2371
|
-
}
|
|
2372
|
-
} else if (!existing.includes(refValue)) {
|
|
2373
|
-
existing.push(refValue);
|
|
2374
|
-
}
|
|
2375
|
-
}
|
|
2376
|
-
} else if (_isString) {
|
|
2377
|
-
refs[ref2] = value;
|
|
2378
|
-
if (hasOwn(setupState, ref2)) {
|
|
2379
|
-
setupState[ref2] = value;
|
|
2380
|
-
}
|
|
2381
|
-
} else if (isRef(ref2)) {
|
|
2382
|
-
ref2.value = value;
|
|
2383
|
-
if (rawRef.k)
|
|
2384
|
-
refs[rawRef.k] = value;
|
|
2385
|
-
} else
|
|
2386
|
-
;
|
|
2387
|
-
};
|
|
2388
|
-
if (value) {
|
|
2389
|
-
doSet.id = -1;
|
|
2390
|
-
queuePostRenderEffect(doSet, parentSuspense);
|
|
2391
|
-
} else {
|
|
2392
|
-
doSet();
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
|
-
const queuePostRenderEffect = queueEffectWithSuspense;
|
|
2398
|
-
function createRenderer(options) {
|
|
2399
|
-
return baseCreateRenderer(options);
|
|
2400
|
-
}
|
|
2401
|
-
function baseCreateRenderer(options, createHydrationFns) {
|
|
2402
|
-
const target = getGlobalThis();
|
|
2403
|
-
target.__VUE__ = true;
|
|
2404
|
-
const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options;
|
|
2405
|
-
const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = !!n2.dynamicChildren) => {
|
|
2406
|
-
if (n1 === n2) {
|
|
2407
|
-
return;
|
|
2408
|
-
}
|
|
2409
|
-
if (n1 && !isSameVNodeType(n1, n2)) {
|
|
2410
|
-
anchor = getNextHostNode(n1);
|
|
2411
|
-
unmount(n1, parentComponent, parentSuspense, true);
|
|
2412
|
-
n1 = null;
|
|
2413
|
-
}
|
|
2414
|
-
if (n2.patchFlag === -2) {
|
|
2415
|
-
optimized = false;
|
|
2416
|
-
n2.dynamicChildren = null;
|
|
2417
|
-
}
|
|
2418
|
-
const { type, ref: ref2, shapeFlag } = n2;
|
|
2419
|
-
switch (type) {
|
|
2420
|
-
case Text:
|
|
2421
|
-
processText(n1, n2, container, anchor);
|
|
2422
|
-
break;
|
|
2423
|
-
case Comment:
|
|
2424
|
-
processCommentNode(n1, n2, container, anchor);
|
|
2425
|
-
break;
|
|
2426
|
-
case Static:
|
|
2427
|
-
if (n1 == null) {
|
|
2428
|
-
mountStaticNode(n2, container, anchor, isSVG);
|
|
2429
|
-
}
|
|
2430
|
-
break;
|
|
2431
|
-
case Fragment:
|
|
2432
|
-
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2433
|
-
break;
|
|
2434
|
-
default:
|
|
2435
|
-
if (shapeFlag & 1) {
|
|
2436
|
-
processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2437
|
-
} else if (shapeFlag & 6) {
|
|
2438
|
-
processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2439
|
-
} else if (shapeFlag & 64) {
|
|
2440
|
-
type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
|
|
2441
|
-
} else if (shapeFlag & 128) {
|
|
2442
|
-
type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
|
|
2443
|
-
} else
|
|
2444
|
-
;
|
|
2445
|
-
}
|
|
2446
|
-
if (ref2 != null && parentComponent) {
|
|
2447
|
-
setRef(ref2, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
|
|
2448
|
-
}
|
|
2449
|
-
};
|
|
2450
|
-
const processText = (n1, n2, container, anchor) => {
|
|
2451
|
-
if (n1 == null) {
|
|
2452
|
-
hostInsert(n2.el = hostCreateText(n2.children), container, anchor);
|
|
2453
|
-
} else {
|
|
2454
|
-
const el = n2.el = n1.el;
|
|
2455
|
-
if (n2.children !== n1.children) {
|
|
2456
|
-
hostSetText(el, n2.children);
|
|
2457
|
-
}
|
|
2458
|
-
}
|
|
2459
|
-
};
|
|
2460
|
-
const processCommentNode = (n1, n2, container, anchor) => {
|
|
2461
|
-
if (n1 == null) {
|
|
2462
|
-
hostInsert(n2.el = hostCreateComment(n2.children || ""), container, anchor);
|
|
2463
|
-
} else {
|
|
2464
|
-
n2.el = n1.el;
|
|
2465
|
-
}
|
|
2466
|
-
};
|
|
2467
|
-
const mountStaticNode = (n2, container, anchor, isSVG) => {
|
|
2468
|
-
[n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG);
|
|
2469
|
-
};
|
|
2470
|
-
const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
|
|
2471
|
-
let next;
|
|
2472
|
-
while (el && el !== anchor) {
|
|
2473
|
-
next = hostNextSibling(el);
|
|
2474
|
-
hostInsert(el, container, nextSibling);
|
|
2475
|
-
el = next;
|
|
2476
|
-
}
|
|
2477
|
-
hostInsert(anchor, container, nextSibling);
|
|
2478
|
-
};
|
|
2479
|
-
const removeStaticNode = ({ el, anchor }) => {
|
|
2480
|
-
let next;
|
|
2481
|
-
while (el && el !== anchor) {
|
|
2482
|
-
next = hostNextSibling(el);
|
|
2483
|
-
hostRemove(el);
|
|
2484
|
-
el = next;
|
|
2485
|
-
}
|
|
2486
|
-
hostRemove(anchor);
|
|
2487
|
-
};
|
|
2488
|
-
const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
2489
|
-
isSVG = isSVG || n2.type === "svg";
|
|
2490
|
-
if (n1 == null) {
|
|
2491
|
-
mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2492
|
-
} else {
|
|
2493
|
-
patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2494
|
-
}
|
|
2495
|
-
};
|
|
2496
|
-
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
2497
|
-
let el;
|
|
2498
|
-
let vnodeHook;
|
|
2499
|
-
const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode;
|
|
2500
|
-
if (vnode.el && hostCloneNode !== void 0 && patchFlag === -1) {
|
|
2501
|
-
el = vnode.el = hostCloneNode(vnode.el);
|
|
2502
|
-
} else {
|
|
2503
|
-
el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props);
|
|
2504
|
-
if (shapeFlag & 8) {
|
|
2505
|
-
hostSetElementText(el, vnode.children);
|
|
2506
|
-
} else if (shapeFlag & 16) {
|
|
2507
|
-
mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== "foreignObject", slotScopeIds, optimized);
|
|
2508
|
-
}
|
|
2509
|
-
if (dirs) {
|
|
2510
|
-
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
2511
|
-
}
|
|
2512
|
-
if (props) {
|
|
2513
|
-
for (const key in props) {
|
|
2514
|
-
if (key !== "value" && !isReservedProp(key)) {
|
|
2515
|
-
hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren);
|
|
2516
|
-
}
|
|
2517
|
-
}
|
|
2518
|
-
if ("value" in props) {
|
|
2519
|
-
hostPatchProp(el, "value", null, props.value);
|
|
2520
|
-
}
|
|
2521
|
-
if (vnodeHook = props.onVnodeBeforeMount) {
|
|
2522
|
-
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
2523
|
-
}
|
|
2524
|
-
}
|
|
2525
|
-
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
2526
|
-
}
|
|
2527
|
-
if (dirs) {
|
|
2528
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
2529
|
-
}
|
|
2530
|
-
const needCallTransitionHooks = (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
2531
|
-
if (needCallTransitionHooks) {
|
|
2532
|
-
transition.beforeEnter(el);
|
|
2533
|
-
}
|
|
2534
|
-
hostInsert(el, container, anchor);
|
|
2535
|
-
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
2536
|
-
queuePostRenderEffect(() => {
|
|
2537
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
2538
|
-
needCallTransitionHooks && transition.enter(el);
|
|
2539
|
-
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
2540
|
-
}, parentSuspense);
|
|
2541
|
-
}
|
|
2542
|
-
};
|
|
2543
|
-
const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
|
|
2544
|
-
if (scopeId) {
|
|
2545
|
-
hostSetScopeId(el, scopeId);
|
|
2546
|
-
}
|
|
2547
|
-
if (slotScopeIds) {
|
|
2548
|
-
for (let i = 0; i < slotScopeIds.length; i++) {
|
|
2549
|
-
hostSetScopeId(el, slotScopeIds[i]);
|
|
2550
|
-
}
|
|
2551
|
-
}
|
|
2552
|
-
if (parentComponent) {
|
|
2553
|
-
let subTree = parentComponent.subTree;
|
|
2554
|
-
if (vnode === subTree) {
|
|
2555
|
-
const parentVNode = parentComponent.vnode;
|
|
2556
|
-
setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent);
|
|
2557
|
-
}
|
|
2558
|
-
}
|
|
2559
|
-
};
|
|
2560
|
-
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => {
|
|
2561
|
-
for (let i = start; i < children.length; i++) {
|
|
2562
|
-
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
2563
|
-
patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2564
|
-
}
|
|
2565
|
-
};
|
|
2566
|
-
const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
2567
|
-
const el = n2.el = n1.el;
|
|
2568
|
-
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
2569
|
-
patchFlag |= n1.patchFlag & 16;
|
|
2570
|
-
const oldProps = n1.props || EMPTY_OBJ;
|
|
2571
|
-
const newProps = n2.props || EMPTY_OBJ;
|
|
2572
|
-
let vnodeHook;
|
|
2573
|
-
parentComponent && toggleRecurse(parentComponent, false);
|
|
2574
|
-
if (vnodeHook = newProps.onVnodeBeforeUpdate) {
|
|
2575
|
-
invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
2576
|
-
}
|
|
2577
|
-
if (dirs) {
|
|
2578
|
-
invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
2579
|
-
}
|
|
2580
|
-
parentComponent && toggleRecurse(parentComponent, true);
|
|
2581
|
-
const areChildrenSVG = isSVG && n2.type !== "foreignObject";
|
|
2582
|
-
if (dynamicChildren) {
|
|
2583
|
-
patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);
|
|
2584
|
-
} else if (!optimized) {
|
|
2585
|
-
patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false);
|
|
2586
|
-
}
|
|
2587
|
-
if (patchFlag > 0) {
|
|
2588
|
-
if (patchFlag & 16) {
|
|
2589
|
-
patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
|
|
2590
|
-
} else {
|
|
2591
|
-
if (patchFlag & 2) {
|
|
2592
|
-
if (oldProps.class !== newProps.class) {
|
|
2593
|
-
hostPatchProp(el, "class", null, newProps.class, isSVG);
|
|
2594
|
-
}
|
|
2595
|
-
}
|
|
2596
|
-
if (patchFlag & 4) {
|
|
2597
|
-
hostPatchProp(el, "style", oldProps.style, newProps.style, isSVG);
|
|
2598
|
-
}
|
|
2599
|
-
if (patchFlag & 8) {
|
|
2600
|
-
const propsToUpdate = n2.dynamicProps;
|
|
2601
|
-
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
2602
|
-
const key = propsToUpdate[i];
|
|
2603
|
-
const prev = oldProps[key];
|
|
2604
|
-
const next = newProps[key];
|
|
2605
|
-
if (next !== prev || key === "value") {
|
|
2606
|
-
hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren);
|
|
2607
|
-
}
|
|
2608
|
-
}
|
|
2609
|
-
}
|
|
2610
|
-
}
|
|
2611
|
-
if (patchFlag & 1) {
|
|
2612
|
-
if (n1.children !== n2.children) {
|
|
2613
|
-
hostSetElementText(el, n2.children);
|
|
2614
|
-
}
|
|
2615
|
-
}
|
|
2616
|
-
} else if (!optimized && dynamicChildren == null) {
|
|
2617
|
-
patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
|
|
2618
|
-
}
|
|
2619
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
|
|
2620
|
-
queuePostRenderEffect(() => {
|
|
2621
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
2622
|
-
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
2623
|
-
}, parentSuspense);
|
|
2624
|
-
}
|
|
2625
|
-
};
|
|
2626
|
-
const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => {
|
|
2627
|
-
for (let i = 0; i < newChildren.length; i++) {
|
|
2628
|
-
const oldVNode = oldChildren[i];
|
|
2629
|
-
const newVNode = newChildren[i];
|
|
2630
|
-
const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : fallbackContainer;
|
|
2631
|
-
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true);
|
|
2632
|
-
}
|
|
2633
|
-
};
|
|
2634
|
-
const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => {
|
|
2635
|
-
if (oldProps !== newProps) {
|
|
2636
|
-
for (const key in newProps) {
|
|
2637
|
-
if (isReservedProp(key))
|
|
2638
|
-
continue;
|
|
2639
|
-
const next = newProps[key];
|
|
2640
|
-
const prev = oldProps[key];
|
|
2641
|
-
if (next !== prev && key !== "value") {
|
|
2642
|
-
hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren);
|
|
2643
|
-
}
|
|
2644
|
-
}
|
|
2645
|
-
if (oldProps !== EMPTY_OBJ) {
|
|
2646
|
-
for (const key in oldProps) {
|
|
2647
|
-
if (!isReservedProp(key) && !(key in newProps)) {
|
|
2648
|
-
hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren);
|
|
2649
|
-
}
|
|
2650
|
-
}
|
|
2651
|
-
}
|
|
2652
|
-
if ("value" in newProps) {
|
|
2653
|
-
hostPatchProp(el, "value", oldProps.value, newProps.value);
|
|
2654
|
-
}
|
|
2655
|
-
}
|
|
2656
|
-
};
|
|
2657
|
-
const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
2658
|
-
const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
|
|
2659
|
-
const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
|
|
2660
|
-
let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
|
|
2661
|
-
if (fragmentSlotScopeIds) {
|
|
2662
|
-
slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
2663
|
-
}
|
|
2664
|
-
if (n1 == null) {
|
|
2665
|
-
hostInsert(fragmentStartAnchor, container, anchor);
|
|
2666
|
-
hostInsert(fragmentEndAnchor, container, anchor);
|
|
2667
|
-
mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2668
|
-
} else {
|
|
2669
|
-
if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && n1.dynamicChildren) {
|
|
2670
|
-
patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds);
|
|
2671
|
-
if (n2.key != null || parentComponent && n2 === parentComponent.subTree) {
|
|
2672
|
-
traverseStaticChildren(n1, n2, true);
|
|
2673
|
-
}
|
|
2674
|
-
} else {
|
|
2675
|
-
patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2676
|
-
}
|
|
2677
|
-
}
|
|
2678
|
-
};
|
|
2679
|
-
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
2680
|
-
n2.slotScopeIds = slotScopeIds;
|
|
2681
|
-
if (n1 == null) {
|
|
2682
|
-
if (n2.shapeFlag & 512) {
|
|
2683
|
-
parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized);
|
|
2684
|
-
} else {
|
|
2685
|
-
mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);
|
|
2686
|
-
}
|
|
2687
|
-
} else {
|
|
2688
|
-
updateComponent(n1, n2, optimized);
|
|
2689
|
-
}
|
|
2690
|
-
};
|
|
2691
|
-
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
|
|
2692
|
-
const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
|
|
2693
|
-
if (isKeepAlive(initialVNode)) {
|
|
2694
|
-
instance.ctx.renderer = internals;
|
|
2695
|
-
}
|
|
2696
|
-
{
|
|
2697
|
-
setupComponent(instance);
|
|
2698
|
-
}
|
|
2699
|
-
if (instance.asyncDep) {
|
|
2700
|
-
parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect);
|
|
2701
|
-
if (!initialVNode.el) {
|
|
2702
|
-
const placeholder = instance.subTree = createVNode(Comment);
|
|
2703
|
-
processCommentNode(null, placeholder, container, anchor);
|
|
2704
|
-
}
|
|
2705
|
-
return;
|
|
2706
|
-
}
|
|
2707
|
-
setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized);
|
|
2708
|
-
};
|
|
2709
|
-
const updateComponent = (n1, n2, optimized) => {
|
|
2710
|
-
const instance = n2.component = n1.component;
|
|
2711
|
-
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
2712
|
-
if (instance.asyncDep && !instance.asyncResolved) {
|
|
2713
|
-
updateComponentPreRender(instance, n2, optimized);
|
|
2714
|
-
return;
|
|
2715
|
-
} else {
|
|
2716
|
-
instance.next = n2;
|
|
2717
|
-
invalidateJob(instance.update);
|
|
2718
|
-
instance.update();
|
|
2719
|
-
}
|
|
2720
|
-
} else {
|
|
2721
|
-
n2.component = n1.component;
|
|
2722
|
-
n2.el = n1.el;
|
|
2723
|
-
instance.vnode = n2;
|
|
2724
|
-
}
|
|
2725
|
-
};
|
|
2726
|
-
const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => {
|
|
2727
|
-
const componentUpdateFn = () => {
|
|
2728
|
-
if (!instance.isMounted) {
|
|
2729
|
-
let vnodeHook;
|
|
2730
|
-
const { el, props } = initialVNode;
|
|
2731
|
-
const { bm, m, parent } = instance;
|
|
2732
|
-
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
2733
|
-
toggleRecurse(instance, false);
|
|
2734
|
-
if (bm) {
|
|
2735
|
-
invokeArrayFns(bm);
|
|
2736
|
-
}
|
|
2737
|
-
if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
2738
|
-
invokeVNodeHook(vnodeHook, parent, initialVNode);
|
|
2739
|
-
}
|
|
2740
|
-
toggleRecurse(instance, true);
|
|
2741
|
-
if (el && hydrateNode) {
|
|
2742
|
-
const hydrateSubTree = () => {
|
|
2743
|
-
instance.subTree = renderComponentRoot(instance);
|
|
2744
|
-
hydrateNode(el, instance.subTree, instance, parentSuspense, null);
|
|
2745
|
-
};
|
|
2746
|
-
if (isAsyncWrapperVNode) {
|
|
2747
|
-
initialVNode.type.__asyncLoader().then(() => !instance.isUnmounted && hydrateSubTree());
|
|
2748
|
-
} else {
|
|
2749
|
-
hydrateSubTree();
|
|
2750
|
-
}
|
|
2751
|
-
} else {
|
|
2752
|
-
const subTree = instance.subTree = renderComponentRoot(instance);
|
|
2753
|
-
patch(null, subTree, container, anchor, instance, parentSuspense, isSVG);
|
|
2754
|
-
initialVNode.el = subTree.el;
|
|
2755
|
-
}
|
|
2756
|
-
if (m) {
|
|
2757
|
-
queuePostRenderEffect(m, parentSuspense);
|
|
2758
|
-
}
|
|
2759
|
-
if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
|
|
2760
|
-
const scopedInitialVNode = initialVNode;
|
|
2761
|
-
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
|
|
2762
|
-
}
|
|
2763
|
-
if (initialVNode.shapeFlag & 256) {
|
|
2764
|
-
instance.a && queuePostRenderEffect(instance.a, parentSuspense);
|
|
2765
|
-
}
|
|
2766
|
-
instance.isMounted = true;
|
|
2767
|
-
initialVNode = container = anchor = null;
|
|
2768
|
-
} else {
|
|
2769
|
-
let { next, bu, u, parent, vnode } = instance;
|
|
2770
|
-
let originNext = next;
|
|
2771
|
-
let vnodeHook;
|
|
2772
|
-
toggleRecurse(instance, false);
|
|
2773
|
-
if (next) {
|
|
2774
|
-
next.el = vnode.el;
|
|
2775
|
-
updateComponentPreRender(instance, next, optimized);
|
|
2776
|
-
} else {
|
|
2777
|
-
next = vnode;
|
|
2778
|
-
}
|
|
2779
|
-
if (bu) {
|
|
2780
|
-
invokeArrayFns(bu);
|
|
2781
|
-
}
|
|
2782
|
-
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {
|
|
2783
|
-
invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
2784
|
-
}
|
|
2785
|
-
toggleRecurse(instance, true);
|
|
2786
|
-
const nextTree = renderComponentRoot(instance);
|
|
2787
|
-
const prevTree = instance.subTree;
|
|
2788
|
-
instance.subTree = nextTree;
|
|
2789
|
-
patch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, isSVG);
|
|
2790
|
-
next.el = nextTree.el;
|
|
2791
|
-
if (originNext === null) {
|
|
2792
|
-
updateHOCHostEl(instance, nextTree.el);
|
|
2793
|
-
}
|
|
2794
|
-
if (u) {
|
|
2795
|
-
queuePostRenderEffect(u, parentSuspense);
|
|
2796
|
-
}
|
|
2797
|
-
if (vnodeHook = next.props && next.props.onVnodeUpdated) {
|
|
2798
|
-
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
|
|
2799
|
-
}
|
|
2800
|
-
}
|
|
2801
|
-
};
|
|
2802
|
-
const effect = instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope);
|
|
2803
|
-
const update = instance.update = effect.run.bind(effect);
|
|
2804
|
-
update.id = instance.uid;
|
|
2805
|
-
toggleRecurse(instance, true);
|
|
2806
|
-
update();
|
|
2807
|
-
};
|
|
2808
|
-
const updateComponentPreRender = (instance, nextVNode, optimized) => {
|
|
2809
|
-
nextVNode.component = instance;
|
|
2810
|
-
const prevProps = instance.vnode.props;
|
|
2811
|
-
instance.vnode = nextVNode;
|
|
2812
|
-
instance.next = null;
|
|
2813
|
-
updateProps(instance, nextVNode.props, prevProps, optimized);
|
|
2814
|
-
updateSlots(instance, nextVNode.children, optimized);
|
|
2815
|
-
pauseTracking();
|
|
2816
|
-
flushPreFlushCbs(void 0, instance.update);
|
|
2817
|
-
resetTracking();
|
|
2818
|
-
};
|
|
2819
|
-
const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
|
|
2820
|
-
const c1 = n1 && n1.children;
|
|
2821
|
-
const prevShapeFlag = n1 ? n1.shapeFlag : 0;
|
|
2822
|
-
const c2 = n2.children;
|
|
2823
|
-
const { patchFlag, shapeFlag } = n2;
|
|
2824
|
-
if (patchFlag > 0) {
|
|
2825
|
-
if (patchFlag & 128) {
|
|
2826
|
-
patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2827
|
-
return;
|
|
2828
|
-
} else if (patchFlag & 256) {
|
|
2829
|
-
patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2830
|
-
return;
|
|
2831
|
-
}
|
|
2832
|
-
}
|
|
2833
|
-
if (shapeFlag & 8) {
|
|
2834
|
-
if (prevShapeFlag & 16) {
|
|
2835
|
-
unmountChildren(c1, parentComponent, parentSuspense);
|
|
2836
|
-
}
|
|
2837
|
-
if (c2 !== c1) {
|
|
2838
|
-
hostSetElementText(container, c2);
|
|
2839
|
-
}
|
|
2840
|
-
} else {
|
|
2841
|
-
if (prevShapeFlag & 16) {
|
|
2842
|
-
if (shapeFlag & 16) {
|
|
2843
|
-
patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2844
|
-
} else {
|
|
2845
|
-
unmountChildren(c1, parentComponent, parentSuspense, true);
|
|
2846
|
-
}
|
|
2847
|
-
} else {
|
|
2848
|
-
if (prevShapeFlag & 8) {
|
|
2849
|
-
hostSetElementText(container, "");
|
|
2850
|
-
}
|
|
2851
|
-
if (shapeFlag & 16) {
|
|
2852
|
-
mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2853
|
-
}
|
|
2854
|
-
}
|
|
2855
|
-
}
|
|
2856
|
-
};
|
|
2857
|
-
const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
2858
|
-
c1 = c1 || EMPTY_ARR;
|
|
2859
|
-
c2 = c2 || EMPTY_ARR;
|
|
2860
|
-
const oldLength = c1.length;
|
|
2861
|
-
const newLength = c2.length;
|
|
2862
|
-
const commonLength = Math.min(oldLength, newLength);
|
|
2863
|
-
let i;
|
|
2864
|
-
for (i = 0; i < commonLength; i++) {
|
|
2865
|
-
const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
2866
|
-
patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2867
|
-
}
|
|
2868
|
-
if (oldLength > newLength) {
|
|
2869
|
-
unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength);
|
|
2870
|
-
} else {
|
|
2871
|
-
mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength);
|
|
2872
|
-
}
|
|
2873
|
-
};
|
|
2874
|
-
const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
2875
|
-
let i = 0;
|
|
2876
|
-
const l2 = c2.length;
|
|
2877
|
-
let e1 = c1.length - 1;
|
|
2878
|
-
let e2 = l2 - 1;
|
|
2879
|
-
while (i <= e1 && i <= e2) {
|
|
2880
|
-
const n1 = c1[i];
|
|
2881
|
-
const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
2882
|
-
if (isSameVNodeType(n1, n2)) {
|
|
2883
|
-
patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2884
|
-
} else {
|
|
2885
|
-
break;
|
|
2886
|
-
}
|
|
2887
|
-
i++;
|
|
2888
|
-
}
|
|
2889
|
-
while (i <= e1 && i <= e2) {
|
|
2890
|
-
const n1 = c1[e1];
|
|
2891
|
-
const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
|
|
2892
|
-
if (isSameVNodeType(n1, n2)) {
|
|
2893
|
-
patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2894
|
-
} else {
|
|
2895
|
-
break;
|
|
2896
|
-
}
|
|
2897
|
-
e1--;
|
|
2898
|
-
e2--;
|
|
2899
|
-
}
|
|
2900
|
-
if (i > e1) {
|
|
2901
|
-
if (i <= e2) {
|
|
2902
|
-
const nextPos = e2 + 1;
|
|
2903
|
-
const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
|
|
2904
|
-
while (i <= e2) {
|
|
2905
|
-
patch(null, c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2906
|
-
i++;
|
|
2907
|
-
}
|
|
2908
|
-
}
|
|
2909
|
-
} else if (i > e2) {
|
|
2910
|
-
while (i <= e1) {
|
|
2911
|
-
unmount(c1[i], parentComponent, parentSuspense, true);
|
|
2912
|
-
i++;
|
|
2913
|
-
}
|
|
2914
|
-
} else {
|
|
2915
|
-
const s1 = i;
|
|
2916
|
-
const s2 = i;
|
|
2917
|
-
const keyToNewIndexMap = new Map();
|
|
2918
|
-
for (i = s2; i <= e2; i++) {
|
|
2919
|
-
const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
2920
|
-
if (nextChild.key != null) {
|
|
2921
|
-
keyToNewIndexMap.set(nextChild.key, i);
|
|
2922
|
-
}
|
|
2923
|
-
}
|
|
2924
|
-
let j;
|
|
2925
|
-
let patched = 0;
|
|
2926
|
-
const toBePatched = e2 - s2 + 1;
|
|
2927
|
-
let moved = false;
|
|
2928
|
-
let maxNewIndexSoFar = 0;
|
|
2929
|
-
const newIndexToOldIndexMap = new Array(toBePatched);
|
|
2930
|
-
for (i = 0; i < toBePatched; i++)
|
|
2931
|
-
newIndexToOldIndexMap[i] = 0;
|
|
2932
|
-
for (i = s1; i <= e1; i++) {
|
|
2933
|
-
const prevChild = c1[i];
|
|
2934
|
-
if (patched >= toBePatched) {
|
|
2935
|
-
unmount(prevChild, parentComponent, parentSuspense, true);
|
|
2936
|
-
continue;
|
|
2937
|
-
}
|
|
2938
|
-
let newIndex;
|
|
2939
|
-
if (prevChild.key != null) {
|
|
2940
|
-
newIndex = keyToNewIndexMap.get(prevChild.key);
|
|
2941
|
-
} else {
|
|
2942
|
-
for (j = s2; j <= e2; j++) {
|
|
2943
|
-
if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
|
|
2944
|
-
newIndex = j;
|
|
2945
|
-
break;
|
|
2946
|
-
}
|
|
2947
|
-
}
|
|
2948
|
-
}
|
|
2949
|
-
if (newIndex === void 0) {
|
|
2950
|
-
unmount(prevChild, parentComponent, parentSuspense, true);
|
|
2951
|
-
} else {
|
|
2952
|
-
newIndexToOldIndexMap[newIndex - s2] = i + 1;
|
|
2953
|
-
if (newIndex >= maxNewIndexSoFar) {
|
|
2954
|
-
maxNewIndexSoFar = newIndex;
|
|
2955
|
-
} else {
|
|
2956
|
-
moved = true;
|
|
2957
|
-
}
|
|
2958
|
-
patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2959
|
-
patched++;
|
|
2960
|
-
}
|
|
2961
|
-
}
|
|
2962
|
-
const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
|
|
2963
|
-
j = increasingNewIndexSequence.length - 1;
|
|
2964
|
-
for (i = toBePatched - 1; i >= 0; i--) {
|
|
2965
|
-
const nextIndex = s2 + i;
|
|
2966
|
-
const nextChild = c2[nextIndex];
|
|
2967
|
-
const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
|
|
2968
|
-
if (newIndexToOldIndexMap[i] === 0) {
|
|
2969
|
-
patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
2970
|
-
} else if (moved) {
|
|
2971
|
-
if (j < 0 || i !== increasingNewIndexSequence[j]) {
|
|
2972
|
-
move(nextChild, container, anchor, 2);
|
|
2973
|
-
} else {
|
|
2974
|
-
j--;
|
|
2975
|
-
}
|
|
2976
|
-
}
|
|
2977
|
-
}
|
|
2978
|
-
}
|
|
2979
|
-
};
|
|
2980
|
-
const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
|
|
2981
|
-
const { el, type, transition, children, shapeFlag } = vnode;
|
|
2982
|
-
if (shapeFlag & 6) {
|
|
2983
|
-
move(vnode.component.subTree, container, anchor, moveType);
|
|
2984
|
-
return;
|
|
2985
|
-
}
|
|
2986
|
-
if (shapeFlag & 128) {
|
|
2987
|
-
vnode.suspense.move(container, anchor, moveType);
|
|
2988
|
-
return;
|
|
2989
|
-
}
|
|
2990
|
-
if (shapeFlag & 64) {
|
|
2991
|
-
type.move(vnode, container, anchor, internals);
|
|
2992
|
-
return;
|
|
2993
|
-
}
|
|
2994
|
-
if (type === Fragment) {
|
|
2995
|
-
hostInsert(el, container, anchor);
|
|
2996
|
-
for (let i = 0; i < children.length; i++) {
|
|
2997
|
-
move(children[i], container, anchor, moveType);
|
|
2998
|
-
}
|
|
2999
|
-
hostInsert(vnode.anchor, container, anchor);
|
|
3000
|
-
return;
|
|
3001
|
-
}
|
|
3002
|
-
if (type === Static) {
|
|
3003
|
-
moveStaticNode(vnode, container, anchor);
|
|
3004
|
-
return;
|
|
3005
|
-
}
|
|
3006
|
-
const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
|
|
3007
|
-
if (needTransition) {
|
|
3008
|
-
if (moveType === 0) {
|
|
3009
|
-
transition.beforeEnter(el);
|
|
3010
|
-
hostInsert(el, container, anchor);
|
|
3011
|
-
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
3012
|
-
} else {
|
|
3013
|
-
const { leave, delayLeave, afterLeave } = transition;
|
|
3014
|
-
const remove3 = () => hostInsert(el, container, anchor);
|
|
3015
|
-
const performLeave = () => {
|
|
3016
|
-
leave(el, () => {
|
|
3017
|
-
remove3();
|
|
3018
|
-
afterLeave && afterLeave();
|
|
3019
|
-
});
|
|
3020
|
-
};
|
|
3021
|
-
if (delayLeave) {
|
|
3022
|
-
delayLeave(el, remove3, performLeave);
|
|
3023
|
-
} else {
|
|
3024
|
-
performLeave();
|
|
3025
|
-
}
|
|
3026
|
-
}
|
|
3027
|
-
} else {
|
|
3028
|
-
hostInsert(el, container, anchor);
|
|
3029
|
-
}
|
|
3030
|
-
};
|
|
3031
|
-
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
3032
|
-
const { type, props, ref: ref2, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode;
|
|
3033
|
-
if (ref2 != null) {
|
|
3034
|
-
setRef(ref2, null, parentSuspense, vnode, true);
|
|
3035
|
-
}
|
|
3036
|
-
if (shapeFlag & 256) {
|
|
3037
|
-
parentComponent.ctx.deactivate(vnode);
|
|
3038
|
-
return;
|
|
3039
|
-
}
|
|
3040
|
-
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
3041
|
-
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
3042
|
-
let vnodeHook;
|
|
3043
|
-
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
3044
|
-
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
3045
|
-
}
|
|
3046
|
-
if (shapeFlag & 6) {
|
|
3047
|
-
unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
3048
|
-
} else {
|
|
3049
|
-
if (shapeFlag & 128) {
|
|
3050
|
-
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
3051
|
-
return;
|
|
3052
|
-
}
|
|
3053
|
-
if (shouldInvokeDirs) {
|
|
3054
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
3055
|
-
}
|
|
3056
|
-
if (shapeFlag & 64) {
|
|
3057
|
-
vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove);
|
|
3058
|
-
} else if (dynamicChildren && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
|
|
3059
|
-
unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
3060
|
-
} else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
|
|
3061
|
-
unmountChildren(children, parentComponent, parentSuspense);
|
|
3062
|
-
}
|
|
3063
|
-
if (doRemove) {
|
|
3064
|
-
remove2(vnode);
|
|
3065
|
-
}
|
|
3066
|
-
}
|
|
3067
|
-
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
|
|
3068
|
-
queuePostRenderEffect(() => {
|
|
3069
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
3070
|
-
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
3071
|
-
}, parentSuspense);
|
|
3072
|
-
}
|
|
3073
|
-
};
|
|
3074
|
-
const remove2 = (vnode) => {
|
|
3075
|
-
const { type, el, anchor, transition } = vnode;
|
|
3076
|
-
if (type === Fragment) {
|
|
3077
|
-
removeFragment(el, anchor);
|
|
3078
|
-
return;
|
|
3079
|
-
}
|
|
3080
|
-
if (type === Static) {
|
|
3081
|
-
removeStaticNode(vnode);
|
|
3082
|
-
return;
|
|
3083
|
-
}
|
|
3084
|
-
const performRemove = () => {
|
|
3085
|
-
hostRemove(el);
|
|
3086
|
-
if (transition && !transition.persisted && transition.afterLeave) {
|
|
3087
|
-
transition.afterLeave();
|
|
3088
|
-
}
|
|
3089
|
-
};
|
|
3090
|
-
if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
3091
|
-
const { leave, delayLeave } = transition;
|
|
3092
|
-
const performLeave = () => leave(el, performRemove);
|
|
3093
|
-
if (delayLeave) {
|
|
3094
|
-
delayLeave(vnode.el, performRemove, performLeave);
|
|
3095
|
-
} else {
|
|
3096
|
-
performLeave();
|
|
3097
|
-
}
|
|
3098
|
-
} else {
|
|
3099
|
-
performRemove();
|
|
3100
|
-
}
|
|
3101
|
-
};
|
|
3102
|
-
const removeFragment = (cur, end) => {
|
|
3103
|
-
let next;
|
|
3104
|
-
while (cur !== end) {
|
|
3105
|
-
next = hostNextSibling(cur);
|
|
3106
|
-
hostRemove(cur);
|
|
3107
|
-
cur = next;
|
|
3108
|
-
}
|
|
3109
|
-
hostRemove(end);
|
|
3110
|
-
};
|
|
3111
|
-
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
3112
|
-
const { bum, scope, update, subTree, um } = instance;
|
|
3113
|
-
if (bum) {
|
|
3114
|
-
invokeArrayFns(bum);
|
|
3115
|
-
}
|
|
3116
|
-
scope.stop();
|
|
3117
|
-
if (update) {
|
|
3118
|
-
update.active = false;
|
|
3119
|
-
unmount(subTree, instance, parentSuspense, doRemove);
|
|
3120
|
-
}
|
|
3121
|
-
if (um) {
|
|
3122
|
-
queuePostRenderEffect(um, parentSuspense);
|
|
3123
|
-
}
|
|
3124
|
-
queuePostRenderEffect(() => {
|
|
3125
|
-
instance.isUnmounted = true;
|
|
3126
|
-
}, parentSuspense);
|
|
3127
|
-
if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
|
|
3128
|
-
parentSuspense.deps--;
|
|
3129
|
-
if (parentSuspense.deps === 0) {
|
|
3130
|
-
parentSuspense.resolve();
|
|
3131
|
-
}
|
|
3132
|
-
}
|
|
3133
|
-
};
|
|
3134
|
-
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
3135
|
-
for (let i = start; i < children.length; i++) {
|
|
3136
|
-
unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
|
|
3137
|
-
}
|
|
3138
|
-
};
|
|
3139
|
-
const getNextHostNode = (vnode) => {
|
|
3140
|
-
if (vnode.shapeFlag & 6) {
|
|
3141
|
-
return getNextHostNode(vnode.component.subTree);
|
|
3142
|
-
}
|
|
3143
|
-
if (vnode.shapeFlag & 128) {
|
|
3144
|
-
return vnode.suspense.next();
|
|
3145
|
-
}
|
|
3146
|
-
return hostNextSibling(vnode.anchor || vnode.el);
|
|
3147
|
-
};
|
|
3148
|
-
const render2 = (vnode, container, isSVG) => {
|
|
3149
|
-
if (vnode == null) {
|
|
3150
|
-
if (container._vnode) {
|
|
3151
|
-
unmount(container._vnode, null, null, true);
|
|
3152
|
-
}
|
|
3153
|
-
} else {
|
|
3154
|
-
patch(container._vnode || null, vnode, container, null, null, null, isSVG);
|
|
3155
|
-
}
|
|
3156
|
-
flushPostFlushCbs();
|
|
3157
|
-
container._vnode = vnode;
|
|
3158
|
-
};
|
|
3159
|
-
const internals = {
|
|
3160
|
-
p: patch,
|
|
3161
|
-
um: unmount,
|
|
3162
|
-
m: move,
|
|
3163
|
-
r: remove2,
|
|
3164
|
-
mt: mountComponent,
|
|
3165
|
-
mc: mountChildren,
|
|
3166
|
-
pc: patchChildren,
|
|
3167
|
-
pbc: patchBlockChildren,
|
|
3168
|
-
n: getNextHostNode,
|
|
3169
|
-
o: options
|
|
3170
|
-
};
|
|
3171
|
-
let hydrate;
|
|
3172
|
-
let hydrateNode;
|
|
3173
|
-
if (createHydrationFns) {
|
|
3174
|
-
[hydrate, hydrateNode] = createHydrationFns(internals);
|
|
3175
|
-
}
|
|
3176
|
-
return {
|
|
3177
|
-
render: render2,
|
|
3178
|
-
hydrate,
|
|
3179
|
-
createApp: createAppAPI(render2, hydrate)
|
|
3180
|
-
};
|
|
3181
|
-
}
|
|
3182
|
-
function toggleRecurse({ effect, update }, allowed) {
|
|
3183
|
-
effect.allowRecurse = update.allowRecurse = allowed;
|
|
3184
|
-
}
|
|
3185
|
-
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
3186
|
-
const ch1 = n1.children;
|
|
3187
|
-
const ch2 = n2.children;
|
|
3188
|
-
if (isArray(ch1) && isArray(ch2)) {
|
|
3189
|
-
for (let i = 0; i < ch1.length; i++) {
|
|
3190
|
-
const c1 = ch1[i];
|
|
3191
|
-
let c2 = ch2[i];
|
|
3192
|
-
if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
|
|
3193
|
-
if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
|
|
3194
|
-
c2 = ch2[i] = cloneIfMounted(ch2[i]);
|
|
3195
|
-
c2.el = c1.el;
|
|
3196
|
-
}
|
|
3197
|
-
if (!shallow)
|
|
3198
|
-
traverseStaticChildren(c1, c2);
|
|
3199
|
-
}
|
|
3200
|
-
}
|
|
3201
|
-
}
|
|
3202
|
-
}
|
|
3203
|
-
function getSequence(arr) {
|
|
3204
|
-
const p2 = arr.slice();
|
|
3205
|
-
const result = [0];
|
|
3206
|
-
let i, j, u, v, c;
|
|
3207
|
-
const len = arr.length;
|
|
3208
|
-
for (i = 0; i < len; i++) {
|
|
3209
|
-
const arrI = arr[i];
|
|
3210
|
-
if (arrI !== 0) {
|
|
3211
|
-
j = result[result.length - 1];
|
|
3212
|
-
if (arr[j] < arrI) {
|
|
3213
|
-
p2[i] = j;
|
|
3214
|
-
result.push(i);
|
|
3215
|
-
continue;
|
|
3216
|
-
}
|
|
3217
|
-
u = 0;
|
|
3218
|
-
v = result.length - 1;
|
|
3219
|
-
while (u < v) {
|
|
3220
|
-
c = u + v >> 1;
|
|
3221
|
-
if (arr[result[c]] < arrI) {
|
|
3222
|
-
u = c + 1;
|
|
3223
|
-
} else {
|
|
3224
|
-
v = c;
|
|
3225
|
-
}
|
|
3226
|
-
}
|
|
3227
|
-
if (arrI < arr[result[u]]) {
|
|
3228
|
-
if (u > 0) {
|
|
3229
|
-
p2[i] = result[u - 1];
|
|
3230
|
-
}
|
|
3231
|
-
result[u] = i;
|
|
3232
|
-
}
|
|
3233
|
-
}
|
|
3234
|
-
}
|
|
3235
|
-
u = result.length;
|
|
3236
|
-
v = result[u - 1];
|
|
3237
|
-
while (u-- > 0) {
|
|
3238
|
-
result[u] = v;
|
|
3239
|
-
v = p2[v];
|
|
3240
|
-
}
|
|
3241
|
-
return result;
|
|
3242
|
-
}
|
|
3243
|
-
const isTeleport = (type) => type.__isTeleport;
|
|
3244
|
-
const NULL_DYNAMIC_COMPONENT = Symbol();
|
|
3245
|
-
const Fragment = Symbol(void 0);
|
|
3246
|
-
const Text = Symbol(void 0);
|
|
3247
|
-
const Comment = Symbol(void 0);
|
|
3248
|
-
const Static = Symbol(void 0);
|
|
3249
|
-
const blockStack = [];
|
|
3250
|
-
let currentBlock = null;
|
|
3251
|
-
function openBlock(disableTracking = false) {
|
|
3252
|
-
blockStack.push(currentBlock = disableTracking ? null : []);
|
|
3253
|
-
}
|
|
3254
|
-
function closeBlock() {
|
|
3255
|
-
blockStack.pop();
|
|
3256
|
-
currentBlock = blockStack[blockStack.length - 1] || null;
|
|
3257
|
-
}
|
|
3258
|
-
let isBlockTreeEnabled = 1;
|
|
3259
|
-
function setBlockTracking(value) {
|
|
3260
|
-
isBlockTreeEnabled += value;
|
|
3261
|
-
}
|
|
3262
|
-
function setupBlock(vnode) {
|
|
3263
|
-
vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
|
|
3264
|
-
closeBlock();
|
|
3265
|
-
if (isBlockTreeEnabled > 0 && currentBlock) {
|
|
3266
|
-
currentBlock.push(vnode);
|
|
3267
|
-
}
|
|
3268
|
-
return vnode;
|
|
3269
|
-
}
|
|
3270
|
-
function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
|
|
3271
|
-
return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true));
|
|
3272
|
-
}
|
|
3273
|
-
function createBlock(type, props, children, patchFlag, dynamicProps) {
|
|
3274
|
-
return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true));
|
|
3275
|
-
}
|
|
3276
|
-
function isVNode(value) {
|
|
3277
|
-
return value ? value.__v_isVNode === true : false;
|
|
3278
|
-
}
|
|
3279
|
-
function isSameVNodeType(n1, n2) {
|
|
3280
|
-
return n1.type === n2.type && n1.key === n2.key;
|
|
3281
|
-
}
|
|
3282
|
-
const InternalObjectKey = `__vInternal`;
|
|
3283
|
-
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
3284
|
-
const normalizeRef = ({ ref: ref2, ref_key, ref_for }) => {
|
|
3285
|
-
return ref2 != null ? isString(ref2) || isRef(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2, k: ref_key, f: !!ref_for } : ref2 : null;
|
|
3286
|
-
};
|
|
3287
|
-
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
3288
|
-
const vnode = {
|
|
3289
|
-
__v_isVNode: true,
|
|
3290
|
-
__v_skip: true,
|
|
3291
|
-
type,
|
|
3292
|
-
props,
|
|
3293
|
-
key: props && normalizeKey(props),
|
|
3294
|
-
ref: props && normalizeRef(props),
|
|
3295
|
-
scopeId: currentScopeId,
|
|
3296
|
-
slotScopeIds: null,
|
|
3297
|
-
children,
|
|
3298
|
-
component: null,
|
|
3299
|
-
suspense: null,
|
|
3300
|
-
ssContent: null,
|
|
3301
|
-
ssFallback: null,
|
|
3302
|
-
dirs: null,
|
|
3303
|
-
transition: null,
|
|
3304
|
-
el: null,
|
|
3305
|
-
anchor: null,
|
|
3306
|
-
target: null,
|
|
3307
|
-
targetAnchor: null,
|
|
3308
|
-
staticCount: 0,
|
|
3309
|
-
shapeFlag,
|
|
3310
|
-
patchFlag,
|
|
3311
|
-
dynamicProps,
|
|
3312
|
-
dynamicChildren: null,
|
|
3313
|
-
appContext: null
|
|
3314
|
-
};
|
|
3315
|
-
if (needFullChildrenNormalization) {
|
|
3316
|
-
normalizeChildren(vnode, children);
|
|
3317
|
-
if (shapeFlag & 128) {
|
|
3318
|
-
type.normalize(vnode);
|
|
3319
|
-
}
|
|
3320
|
-
} else if (children) {
|
|
3321
|
-
vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
3322
|
-
}
|
|
3323
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) {
|
|
3324
|
-
currentBlock.push(vnode);
|
|
3325
|
-
}
|
|
3326
|
-
return vnode;
|
|
3327
|
-
}
|
|
3328
|
-
const createVNode = _createVNode;
|
|
3329
|
-
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
3330
|
-
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
3331
|
-
type = Comment;
|
|
3332
|
-
}
|
|
3333
|
-
if (isVNode(type)) {
|
|
3334
|
-
const cloned = cloneVNode(type, props, true);
|
|
3335
|
-
if (children) {
|
|
3336
|
-
normalizeChildren(cloned, children);
|
|
3337
|
-
}
|
|
3338
|
-
return cloned;
|
|
3339
|
-
}
|
|
3340
|
-
if (isClassComponent(type)) {
|
|
3341
|
-
type = type.__vccOpts;
|
|
3342
|
-
}
|
|
3343
|
-
if (props) {
|
|
3344
|
-
props = guardReactiveProps(props);
|
|
3345
|
-
let { class: klass, style } = props;
|
|
3346
|
-
if (klass && !isString(klass)) {
|
|
3347
|
-
props.class = normalizeClass(klass);
|
|
3348
|
-
}
|
|
3349
|
-
if (isObject(style)) {
|
|
3350
|
-
if (isProxy(style) && !isArray(style)) {
|
|
3351
|
-
style = extend({}, style);
|
|
3352
|
-
}
|
|
3353
|
-
props.style = normalizeStyle(style);
|
|
3354
|
-
}
|
|
3355
|
-
}
|
|
3356
|
-
const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
|
|
3357
|
-
return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true);
|
|
3358
|
-
}
|
|
3359
|
-
function guardReactiveProps(props) {
|
|
3360
|
-
if (!props)
|
|
3361
|
-
return null;
|
|
3362
|
-
return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
|
|
3363
|
-
}
|
|
3364
|
-
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
3365
|
-
const { props, ref: ref2, patchFlag, children } = vnode;
|
|
3366
|
-
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
|
|
3367
|
-
const cloned = {
|
|
3368
|
-
__v_isVNode: true,
|
|
3369
|
-
__v_skip: true,
|
|
3370
|
-
type: vnode.type,
|
|
3371
|
-
props: mergedProps,
|
|
3372
|
-
key: mergedProps && normalizeKey(mergedProps),
|
|
3373
|
-
ref: extraProps && extraProps.ref ? mergeRef && ref2 ? isArray(ref2) ? ref2.concat(normalizeRef(extraProps)) : [ref2, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref2,
|
|
3374
|
-
scopeId: vnode.scopeId,
|
|
3375
|
-
slotScopeIds: vnode.slotScopeIds,
|
|
3376
|
-
children,
|
|
3377
|
-
target: vnode.target,
|
|
3378
|
-
targetAnchor: vnode.targetAnchor,
|
|
3379
|
-
staticCount: vnode.staticCount,
|
|
3380
|
-
shapeFlag: vnode.shapeFlag,
|
|
3381
|
-
patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
|
|
3382
|
-
dynamicProps: vnode.dynamicProps,
|
|
3383
|
-
dynamicChildren: vnode.dynamicChildren,
|
|
3384
|
-
appContext: vnode.appContext,
|
|
3385
|
-
dirs: vnode.dirs,
|
|
3386
|
-
transition: vnode.transition,
|
|
3387
|
-
component: vnode.component,
|
|
3388
|
-
suspense: vnode.suspense,
|
|
3389
|
-
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
3390
|
-
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
3391
|
-
el: vnode.el,
|
|
3392
|
-
anchor: vnode.anchor
|
|
3393
|
-
};
|
|
3394
|
-
return cloned;
|
|
3395
|
-
}
|
|
3396
|
-
function createTextVNode(text = " ", flag = 0) {
|
|
3397
|
-
return createVNode(Text, null, text, flag);
|
|
3398
|
-
}
|
|
3399
|
-
function normalizeVNode(child) {
|
|
3400
|
-
if (child == null || typeof child === "boolean") {
|
|
3401
|
-
return createVNode(Comment);
|
|
3402
|
-
} else if (isArray(child)) {
|
|
3403
|
-
return createVNode(Fragment, null, child.slice());
|
|
3404
|
-
} else if (typeof child === "object") {
|
|
3405
|
-
return cloneIfMounted(child);
|
|
3406
|
-
} else {
|
|
3407
|
-
return createVNode(Text, null, String(child));
|
|
3408
|
-
}
|
|
3409
|
-
}
|
|
3410
|
-
function cloneIfMounted(child) {
|
|
3411
|
-
return child.el === null || child.memo ? child : cloneVNode(child);
|
|
3412
|
-
}
|
|
3413
|
-
function normalizeChildren(vnode, children) {
|
|
3414
|
-
let type = 0;
|
|
3415
|
-
const { shapeFlag } = vnode;
|
|
3416
|
-
if (children == null) {
|
|
3417
|
-
children = null;
|
|
3418
|
-
} else if (isArray(children)) {
|
|
3419
|
-
type = 16;
|
|
3420
|
-
} else if (typeof children === "object") {
|
|
3421
|
-
if (shapeFlag & (1 | 64)) {
|
|
3422
|
-
const slot = children.default;
|
|
3423
|
-
if (slot) {
|
|
3424
|
-
slot._c && (slot._d = false);
|
|
3425
|
-
normalizeChildren(vnode, slot());
|
|
3426
|
-
slot._c && (slot._d = true);
|
|
3427
|
-
}
|
|
3428
|
-
return;
|
|
3429
|
-
} else {
|
|
3430
|
-
type = 32;
|
|
3431
|
-
const slotFlag = children._;
|
|
3432
|
-
if (!slotFlag && !(InternalObjectKey in children)) {
|
|
3433
|
-
children._ctx = currentRenderingInstance;
|
|
3434
|
-
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
3435
|
-
if (currentRenderingInstance.slots._ === 1) {
|
|
3436
|
-
children._ = 1;
|
|
3437
|
-
} else {
|
|
3438
|
-
children._ = 2;
|
|
3439
|
-
vnode.patchFlag |= 1024;
|
|
3440
|
-
}
|
|
3441
|
-
}
|
|
3442
|
-
}
|
|
3443
|
-
} else if (isFunction(children)) {
|
|
3444
|
-
children = { default: children, _ctx: currentRenderingInstance };
|
|
3445
|
-
type = 32;
|
|
3446
|
-
} else {
|
|
3447
|
-
children = String(children);
|
|
3448
|
-
if (shapeFlag & 64) {
|
|
3449
|
-
type = 16;
|
|
3450
|
-
children = [createTextVNode(children)];
|
|
3451
|
-
} else {
|
|
3452
|
-
type = 8;
|
|
3453
|
-
}
|
|
3454
|
-
}
|
|
3455
|
-
vnode.children = children;
|
|
3456
|
-
vnode.shapeFlag |= type;
|
|
3457
|
-
}
|
|
3458
|
-
function mergeProps(...args) {
|
|
3459
|
-
const ret = {};
|
|
3460
|
-
for (let i = 0; i < args.length; i++) {
|
|
3461
|
-
const toMerge = args[i];
|
|
3462
|
-
for (const key in toMerge) {
|
|
3463
|
-
if (key === "class") {
|
|
3464
|
-
if (ret.class !== toMerge.class) {
|
|
3465
|
-
ret.class = normalizeClass([ret.class, toMerge.class]);
|
|
3466
|
-
}
|
|
3467
|
-
} else if (key === "style") {
|
|
3468
|
-
ret.style = normalizeStyle([ret.style, toMerge.style]);
|
|
3469
|
-
} else if (isOn(key)) {
|
|
3470
|
-
const existing = ret[key];
|
|
3471
|
-
const incoming = toMerge[key];
|
|
3472
|
-
if (existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
3473
|
-
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
3474
|
-
}
|
|
3475
|
-
} else if (key !== "") {
|
|
3476
|
-
ret[key] = toMerge[key];
|
|
3477
|
-
}
|
|
3478
|
-
}
|
|
3479
|
-
}
|
|
3480
|
-
return ret;
|
|
3481
|
-
}
|
|
3482
|
-
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
3483
|
-
callWithAsyncErrorHandling(hook, instance, 7, [
|
|
3484
|
-
vnode,
|
|
3485
|
-
prevVNode
|
|
3486
|
-
]);
|
|
3487
|
-
}
|
|
3488
|
-
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
3489
|
-
if (currentRenderingInstance.isCE) {
|
|
3490
|
-
return createVNode("slot", name === "default" ? null : { name }, fallback && fallback());
|
|
3491
|
-
}
|
|
3492
|
-
let slot = slots[name];
|
|
3493
|
-
if (slot && slot._c) {
|
|
3494
|
-
slot._d = false;
|
|
3495
|
-
}
|
|
3496
|
-
openBlock();
|
|
3497
|
-
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
3498
|
-
const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
|
|
3499
|
-
if (!noSlotted && rendered.scopeId) {
|
|
3500
|
-
rendered.slotScopeIds = [rendered.scopeId + "-s"];
|
|
3501
|
-
}
|
|
3502
|
-
if (slot && slot._c) {
|
|
3503
|
-
slot._d = true;
|
|
3504
|
-
}
|
|
3505
|
-
return rendered;
|
|
3506
|
-
}
|
|
3507
|
-
function ensureValidVNode(vnodes) {
|
|
3508
|
-
return vnodes.some((child) => {
|
|
3509
|
-
if (!isVNode(child))
|
|
3510
|
-
return true;
|
|
3511
|
-
if (child.type === Comment)
|
|
3512
|
-
return false;
|
|
3513
|
-
if (child.type === Fragment && !ensureValidVNode(child.children))
|
|
3514
|
-
return false;
|
|
3515
|
-
return true;
|
|
3516
|
-
}) ? vnodes : null;
|
|
3517
|
-
}
|
|
3518
|
-
const getPublicInstance = (i) => {
|
|
3519
|
-
if (!i)
|
|
3520
|
-
return null;
|
|
3521
|
-
if (isStatefulComponent(i))
|
|
3522
|
-
return getExposeProxy(i) || i.proxy;
|
|
3523
|
-
return getPublicInstance(i.parent);
|
|
3524
|
-
};
|
|
3525
|
-
const publicPropertiesMap = extend(Object.create(null), {
|
|
3526
|
-
$: (i) => i,
|
|
3527
|
-
$el: (i) => i.vnode.el,
|
|
3528
|
-
$data: (i) => i.data,
|
|
3529
|
-
$props: (i) => i.props,
|
|
3530
|
-
$attrs: (i) => i.attrs,
|
|
3531
|
-
$slots: (i) => i.slots,
|
|
3532
|
-
$refs: (i) => i.refs,
|
|
3533
|
-
$parent: (i) => getPublicInstance(i.parent),
|
|
3534
|
-
$root: (i) => getPublicInstance(i.root),
|
|
3535
|
-
$emit: (i) => i.emit,
|
|
3536
|
-
$options: (i) => resolveMergedOptions(i),
|
|
3537
|
-
$forceUpdate: (i) => () => queueJob(i.update),
|
|
3538
|
-
$nextTick: (i) => nextTick.bind(i.proxy),
|
|
3539
|
-
$watch: (i) => instanceWatch.bind(i)
|
|
3540
|
-
});
|
|
3541
|
-
const PublicInstanceProxyHandlers = {
|
|
3542
|
-
get({ _: instance }, key) {
|
|
3543
|
-
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
3544
|
-
let normalizedProps;
|
|
3545
|
-
if (key[0] !== "$") {
|
|
3546
|
-
const n = accessCache[key];
|
|
3547
|
-
if (n !== void 0) {
|
|
3548
|
-
switch (n) {
|
|
3549
|
-
case 1:
|
|
3550
|
-
return setupState[key];
|
|
3551
|
-
case 2:
|
|
3552
|
-
return data[key];
|
|
3553
|
-
case 4:
|
|
3554
|
-
return ctx[key];
|
|
3555
|
-
case 3:
|
|
3556
|
-
return props[key];
|
|
3557
|
-
}
|
|
3558
|
-
} else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
3559
|
-
accessCache[key] = 1;
|
|
3560
|
-
return setupState[key];
|
|
3561
|
-
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
3562
|
-
accessCache[key] = 2;
|
|
3563
|
-
return data[key];
|
|
3564
|
-
} else if ((normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)) {
|
|
3565
|
-
accessCache[key] = 3;
|
|
3566
|
-
return props[key];
|
|
3567
|
-
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
3568
|
-
accessCache[key] = 4;
|
|
3569
|
-
return ctx[key];
|
|
3570
|
-
} else if (shouldCacheAccess) {
|
|
3571
|
-
accessCache[key] = 0;
|
|
3572
|
-
}
|
|
3573
|
-
}
|
|
3574
|
-
const publicGetter = publicPropertiesMap[key];
|
|
3575
|
-
let cssModule, globalProperties;
|
|
3576
|
-
if (publicGetter) {
|
|
3577
|
-
if (key === "$attrs") {
|
|
3578
|
-
track(instance, "get", key);
|
|
3579
|
-
}
|
|
3580
|
-
return publicGetter(instance);
|
|
3581
|
-
} else if ((cssModule = type.__cssModules) && (cssModule = cssModule[key])) {
|
|
3582
|
-
return cssModule;
|
|
3583
|
-
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
3584
|
-
accessCache[key] = 4;
|
|
3585
|
-
return ctx[key];
|
|
3586
|
-
} else if (globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)) {
|
|
3587
|
-
{
|
|
3588
|
-
return globalProperties[key];
|
|
3589
|
-
}
|
|
3590
|
-
} else
|
|
3591
|
-
;
|
|
3592
|
-
},
|
|
3593
|
-
set({ _: instance }, key, value) {
|
|
3594
|
-
const { data, setupState, ctx } = instance;
|
|
3595
|
-
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
3596
|
-
setupState[key] = value;
|
|
3597
|
-
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
3598
|
-
data[key] = value;
|
|
3599
|
-
} else if (hasOwn(instance.props, key)) {
|
|
3600
|
-
return false;
|
|
3601
|
-
}
|
|
3602
|
-
if (key[0] === "$" && key.slice(1) in instance) {
|
|
3603
|
-
return false;
|
|
3604
|
-
} else {
|
|
3605
|
-
{
|
|
3606
|
-
ctx[key] = value;
|
|
3607
|
-
}
|
|
3608
|
-
}
|
|
3609
|
-
return true;
|
|
3610
|
-
},
|
|
3611
|
-
has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
|
|
3612
|
-
let normalizedProps;
|
|
3613
|
-
return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || setupState !== EMPTY_OBJ && hasOwn(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
|
|
3614
|
-
}
|
|
3615
|
-
};
|
|
3616
|
-
const emptyAppContext = createAppContext();
|
|
3617
|
-
let uid$1 = 0;
|
|
3618
|
-
function createComponentInstance(vnode, parent, suspense) {
|
|
3619
|
-
const type = vnode.type;
|
|
3620
|
-
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
3621
|
-
const instance = {
|
|
3622
|
-
uid: uid$1++,
|
|
3623
|
-
vnode,
|
|
3624
|
-
type,
|
|
3625
|
-
parent,
|
|
3626
|
-
appContext,
|
|
3627
|
-
root: null,
|
|
3628
|
-
next: null,
|
|
3629
|
-
subTree: null,
|
|
3630
|
-
effect: null,
|
|
3631
|
-
update: null,
|
|
3632
|
-
scope: new EffectScope(true),
|
|
3633
|
-
render: null,
|
|
3634
|
-
proxy: null,
|
|
3635
|
-
exposed: null,
|
|
3636
|
-
exposeProxy: null,
|
|
3637
|
-
withProxy: null,
|
|
3638
|
-
provides: parent ? parent.provides : Object.create(appContext.provides),
|
|
3639
|
-
accessCache: null,
|
|
3640
|
-
renderCache: [],
|
|
3641
|
-
components: null,
|
|
3642
|
-
directives: null,
|
|
3643
|
-
propsOptions: normalizePropsOptions(type, appContext),
|
|
3644
|
-
emitsOptions: normalizeEmitsOptions(type, appContext),
|
|
3645
|
-
emit: null,
|
|
3646
|
-
emitted: null,
|
|
3647
|
-
propsDefaults: EMPTY_OBJ,
|
|
3648
|
-
inheritAttrs: type.inheritAttrs,
|
|
3649
|
-
ctx: EMPTY_OBJ,
|
|
3650
|
-
data: EMPTY_OBJ,
|
|
3651
|
-
props: EMPTY_OBJ,
|
|
3652
|
-
attrs: EMPTY_OBJ,
|
|
3653
|
-
slots: EMPTY_OBJ,
|
|
3654
|
-
refs: EMPTY_OBJ,
|
|
3655
|
-
setupState: EMPTY_OBJ,
|
|
3656
|
-
setupContext: null,
|
|
3657
|
-
suspense,
|
|
3658
|
-
suspenseId: suspense ? suspense.pendingId : 0,
|
|
3659
|
-
asyncDep: null,
|
|
3660
|
-
asyncResolved: false,
|
|
3661
|
-
isMounted: false,
|
|
3662
|
-
isUnmounted: false,
|
|
3663
|
-
isDeactivated: false,
|
|
3664
|
-
bc: null,
|
|
3665
|
-
c: null,
|
|
3666
|
-
bm: null,
|
|
3667
|
-
m: null,
|
|
3668
|
-
bu: null,
|
|
3669
|
-
u: null,
|
|
3670
|
-
um: null,
|
|
3671
|
-
bum: null,
|
|
3672
|
-
da: null,
|
|
3673
|
-
a: null,
|
|
3674
|
-
rtg: null,
|
|
3675
|
-
rtc: null,
|
|
3676
|
-
ec: null,
|
|
3677
|
-
sp: null
|
|
3678
|
-
};
|
|
3679
|
-
{
|
|
3680
|
-
instance.ctx = { _: instance };
|
|
3681
|
-
}
|
|
3682
|
-
instance.root = parent ? parent.root : instance;
|
|
3683
|
-
instance.emit = emit$1.bind(null, instance);
|
|
3684
|
-
if (vnode.ce) {
|
|
3685
|
-
vnode.ce(instance);
|
|
3686
|
-
}
|
|
3687
|
-
return instance;
|
|
3688
|
-
}
|
|
3689
|
-
let currentInstance = null;
|
|
3690
|
-
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
3691
|
-
const setCurrentInstance = (instance) => {
|
|
3692
|
-
currentInstance = instance;
|
|
3693
|
-
instance.scope.on();
|
|
3694
|
-
};
|
|
3695
|
-
const unsetCurrentInstance = () => {
|
|
3696
|
-
currentInstance && currentInstance.scope.off();
|
|
3697
|
-
currentInstance = null;
|
|
3698
|
-
};
|
|
3699
|
-
function isStatefulComponent(instance) {
|
|
3700
|
-
return instance.vnode.shapeFlag & 4;
|
|
3701
|
-
}
|
|
3702
|
-
let isInSSRComponentSetup = false;
|
|
3703
|
-
function setupComponent(instance, isSSR = false) {
|
|
3704
|
-
isInSSRComponentSetup = isSSR;
|
|
3705
|
-
const { props, children } = instance.vnode;
|
|
3706
|
-
const isStateful = isStatefulComponent(instance);
|
|
3707
|
-
initProps(instance, props, isStateful, isSSR);
|
|
3708
|
-
initSlots(instance, children);
|
|
3709
|
-
const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
|
|
3710
|
-
isInSSRComponentSetup = false;
|
|
3711
|
-
return setupResult;
|
|
3712
|
-
}
|
|
3713
|
-
function setupStatefulComponent(instance, isSSR) {
|
|
3714
|
-
const Component = instance.type;
|
|
3715
|
-
instance.accessCache = Object.create(null);
|
|
3716
|
-
instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
|
|
3717
|
-
const { setup } = Component;
|
|
3718
|
-
if (setup) {
|
|
3719
|
-
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
3720
|
-
setCurrentInstance(instance);
|
|
3721
|
-
pauseTracking();
|
|
3722
|
-
const setupResult = callWithErrorHandling(setup, instance, 0, [instance.props, setupContext]);
|
|
3723
|
-
resetTracking();
|
|
3724
|
-
unsetCurrentInstance();
|
|
3725
|
-
if (isPromise(setupResult)) {
|
|
3726
|
-
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
3727
|
-
if (isSSR) {
|
|
3728
|
-
return setupResult.then((resolvedResult) => {
|
|
3729
|
-
handleSetupResult(instance, resolvedResult, isSSR);
|
|
3730
|
-
}).catch((e) => {
|
|
3731
|
-
handleError(e, instance, 0);
|
|
3732
|
-
});
|
|
3733
|
-
} else {
|
|
3734
|
-
instance.asyncDep = setupResult;
|
|
3735
|
-
}
|
|
3736
|
-
} else {
|
|
3737
|
-
handleSetupResult(instance, setupResult, isSSR);
|
|
3738
|
-
}
|
|
3739
|
-
} else {
|
|
3740
|
-
finishComponentSetup(instance, isSSR);
|
|
3741
|
-
}
|
|
3742
|
-
}
|
|
3743
|
-
function handleSetupResult(instance, setupResult, isSSR) {
|
|
3744
|
-
if (isFunction(setupResult)) {
|
|
3745
|
-
if (instance.type.__ssrInlineRender) {
|
|
3746
|
-
instance.ssrRender = setupResult;
|
|
3747
|
-
} else {
|
|
3748
|
-
instance.render = setupResult;
|
|
3749
|
-
}
|
|
3750
|
-
} else if (isObject(setupResult)) {
|
|
3751
|
-
instance.setupState = proxyRefs(setupResult);
|
|
3752
|
-
} else
|
|
3753
|
-
;
|
|
3754
|
-
finishComponentSetup(instance, isSSR);
|
|
3755
|
-
}
|
|
3756
|
-
let compile;
|
|
3757
|
-
function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
3758
|
-
const Component = instance.type;
|
|
3759
|
-
if (!instance.render) {
|
|
3760
|
-
if (!isSSR && compile && !Component.render) {
|
|
3761
|
-
const template = Component.template;
|
|
3762
|
-
if (template) {
|
|
3763
|
-
const { isCustomElement, compilerOptions } = instance.appContext.config;
|
|
3764
|
-
const { delimiters, compilerOptions: componentCompilerOptions } = Component;
|
|
3765
|
-
const finalCompilerOptions = extend(extend({
|
|
3766
|
-
isCustomElement,
|
|
3767
|
-
delimiters
|
|
3768
|
-
}, compilerOptions), componentCompilerOptions);
|
|
3769
|
-
Component.render = compile(template, finalCompilerOptions);
|
|
3770
|
-
}
|
|
3771
|
-
}
|
|
3772
|
-
instance.render = Component.render || NOOP;
|
|
3773
|
-
}
|
|
3774
|
-
{
|
|
3775
|
-
setCurrentInstance(instance);
|
|
3776
|
-
pauseTracking();
|
|
3777
|
-
applyOptions(instance);
|
|
3778
|
-
resetTracking();
|
|
3779
|
-
unsetCurrentInstance();
|
|
3780
|
-
}
|
|
3781
|
-
}
|
|
3782
|
-
function createAttrsProxy(instance) {
|
|
3783
|
-
return new Proxy(instance.attrs, {
|
|
3784
|
-
get(target, key) {
|
|
3785
|
-
track(instance, "get", "$attrs");
|
|
3786
|
-
return target[key];
|
|
3787
|
-
}
|
|
3788
|
-
});
|
|
3789
|
-
}
|
|
3790
|
-
function createSetupContext(instance) {
|
|
3791
|
-
const expose = (exposed) => {
|
|
3792
|
-
instance.exposed = exposed || {};
|
|
3793
|
-
};
|
|
3794
|
-
let attrs;
|
|
3795
|
-
{
|
|
3796
|
-
return {
|
|
3797
|
-
get attrs() {
|
|
3798
|
-
return attrs || (attrs = createAttrsProxy(instance));
|
|
3799
|
-
},
|
|
3800
|
-
slots: instance.slots,
|
|
3801
|
-
emit: instance.emit,
|
|
3802
|
-
expose
|
|
3803
|
-
};
|
|
3804
|
-
}
|
|
3805
|
-
}
|
|
3806
|
-
function getExposeProxy(instance) {
|
|
3807
|
-
if (instance.exposed) {
|
|
3808
|
-
return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
|
|
3809
|
-
get(target, key) {
|
|
3810
|
-
if (key in target) {
|
|
3811
|
-
return target[key];
|
|
3812
|
-
} else if (key in publicPropertiesMap) {
|
|
3813
|
-
return publicPropertiesMap[key](instance);
|
|
3814
|
-
}
|
|
3815
|
-
}
|
|
3816
|
-
}));
|
|
3817
|
-
}
|
|
3818
|
-
}
|
|
3819
|
-
function isClassComponent(value) {
|
|
3820
|
-
return isFunction(value) && "__vccOpts" in value;
|
|
3821
|
-
}
|
|
3822
|
-
function callWithErrorHandling(fn, instance, type, args) {
|
|
3823
|
-
let res;
|
|
3824
|
-
try {
|
|
3825
|
-
res = args ? fn(...args) : fn();
|
|
3826
|
-
} catch (err) {
|
|
3827
|
-
handleError(err, instance, type);
|
|
3828
|
-
}
|
|
3829
|
-
return res;
|
|
3830
|
-
}
|
|
3831
|
-
function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
3832
|
-
if (isFunction(fn)) {
|
|
3833
|
-
const res = callWithErrorHandling(fn, instance, type, args);
|
|
3834
|
-
if (res && isPromise(res)) {
|
|
3835
|
-
res.catch((err) => {
|
|
3836
|
-
handleError(err, instance, type);
|
|
3837
|
-
});
|
|
3838
|
-
}
|
|
3839
|
-
return res;
|
|
3840
|
-
}
|
|
3841
|
-
const values = [];
|
|
3842
|
-
for (let i = 0; i < fn.length; i++) {
|
|
3843
|
-
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
3844
|
-
}
|
|
3845
|
-
return values;
|
|
3846
|
-
}
|
|
3847
|
-
function handleError(err, instance, type, throwInDev = true) {
|
|
3848
|
-
const contextVNode = instance ? instance.vnode : null;
|
|
3849
|
-
if (instance) {
|
|
3850
|
-
let cur = instance.parent;
|
|
3851
|
-
const exposedInstance = instance.proxy;
|
|
3852
|
-
const errorInfo = type;
|
|
3853
|
-
while (cur) {
|
|
3854
|
-
const errorCapturedHooks = cur.ec;
|
|
3855
|
-
if (errorCapturedHooks) {
|
|
3856
|
-
for (let i = 0; i < errorCapturedHooks.length; i++) {
|
|
3857
|
-
if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
|
|
3858
|
-
return;
|
|
3859
|
-
}
|
|
3860
|
-
}
|
|
3861
|
-
}
|
|
3862
|
-
cur = cur.parent;
|
|
3863
|
-
}
|
|
3864
|
-
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
3865
|
-
if (appErrorHandler) {
|
|
3866
|
-
callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]);
|
|
3867
|
-
return;
|
|
3868
|
-
}
|
|
3869
|
-
}
|
|
3870
|
-
logError(err, type, contextVNode, throwInDev);
|
|
3871
|
-
}
|
|
3872
|
-
function logError(err, type, contextVNode, throwInDev = true) {
|
|
3873
|
-
{
|
|
3874
|
-
console.error(err);
|
|
3875
|
-
}
|
|
3876
|
-
}
|
|
3877
|
-
let isFlushing = false;
|
|
3878
|
-
let isFlushPending = false;
|
|
3879
|
-
const queue = [];
|
|
3880
|
-
let flushIndex = 0;
|
|
3881
|
-
const pendingPreFlushCbs = [];
|
|
3882
|
-
let activePreFlushCbs = null;
|
|
3883
|
-
let preFlushIndex = 0;
|
|
3884
|
-
const pendingPostFlushCbs = [];
|
|
3885
|
-
let activePostFlushCbs = null;
|
|
3886
|
-
let postFlushIndex = 0;
|
|
3887
|
-
const resolvedPromise = Promise.resolve();
|
|
3888
|
-
let currentFlushPromise = null;
|
|
3889
|
-
let currentPreFlushParentJob = null;
|
|
3890
|
-
function nextTick(fn) {
|
|
3891
|
-
const p2 = currentFlushPromise || resolvedPromise;
|
|
3892
|
-
return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
|
|
3893
|
-
}
|
|
3894
|
-
function findInsertionIndex(id) {
|
|
3895
|
-
let start = flushIndex + 1;
|
|
3896
|
-
let end = queue.length;
|
|
3897
|
-
while (start < end) {
|
|
3898
|
-
const middle = start + end >>> 1;
|
|
3899
|
-
const middleJobId = getId(queue[middle]);
|
|
3900
|
-
middleJobId < id ? start = middle + 1 : end = middle;
|
|
3901
|
-
}
|
|
3902
|
-
return start;
|
|
3903
|
-
}
|
|
3904
|
-
function queueJob(job) {
|
|
3905
|
-
if ((!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && job !== currentPreFlushParentJob) {
|
|
3906
|
-
if (job.id == null) {
|
|
3907
|
-
queue.push(job);
|
|
3908
|
-
} else {
|
|
3909
|
-
queue.splice(findInsertionIndex(job.id), 0, job);
|
|
3910
|
-
}
|
|
3911
|
-
queueFlush();
|
|
3912
|
-
}
|
|
3913
|
-
}
|
|
3914
|
-
function queueFlush() {
|
|
3915
|
-
if (!isFlushing && !isFlushPending) {
|
|
3916
|
-
isFlushPending = true;
|
|
3917
|
-
currentFlushPromise = resolvedPromise.then(flushJobs);
|
|
3918
|
-
}
|
|
3919
|
-
}
|
|
3920
|
-
function invalidateJob(job) {
|
|
3921
|
-
const i = queue.indexOf(job);
|
|
3922
|
-
if (i > flushIndex) {
|
|
3923
|
-
queue.splice(i, 1);
|
|
3924
|
-
}
|
|
3925
|
-
}
|
|
3926
|
-
function queueCb(cb, activeQueue, pendingQueue, index) {
|
|
3927
|
-
if (!isArray(cb)) {
|
|
3928
|
-
if (!activeQueue || !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) {
|
|
3929
|
-
pendingQueue.push(cb);
|
|
3930
|
-
}
|
|
3931
|
-
} else {
|
|
3932
|
-
pendingQueue.push(...cb);
|
|
3933
|
-
}
|
|
3934
|
-
queueFlush();
|
|
3935
|
-
}
|
|
3936
|
-
function queuePreFlushCb(cb) {
|
|
3937
|
-
queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex);
|
|
3938
|
-
}
|
|
3939
|
-
function queuePostFlushCb(cb) {
|
|
3940
|
-
queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex);
|
|
3941
|
-
}
|
|
3942
|
-
function flushPreFlushCbs(seen, parentJob = null) {
|
|
3943
|
-
if (pendingPreFlushCbs.length) {
|
|
3944
|
-
currentPreFlushParentJob = parentJob;
|
|
3945
|
-
activePreFlushCbs = [...new Set(pendingPreFlushCbs)];
|
|
3946
|
-
pendingPreFlushCbs.length = 0;
|
|
3947
|
-
for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) {
|
|
3948
|
-
activePreFlushCbs[preFlushIndex]();
|
|
3949
|
-
}
|
|
3950
|
-
activePreFlushCbs = null;
|
|
3951
|
-
preFlushIndex = 0;
|
|
3952
|
-
currentPreFlushParentJob = null;
|
|
3953
|
-
flushPreFlushCbs(seen, parentJob);
|
|
3954
|
-
}
|
|
3955
|
-
}
|
|
3956
|
-
function flushPostFlushCbs(seen) {
|
|
3957
|
-
if (pendingPostFlushCbs.length) {
|
|
3958
|
-
const deduped = [...new Set(pendingPostFlushCbs)];
|
|
3959
|
-
pendingPostFlushCbs.length = 0;
|
|
3960
|
-
if (activePostFlushCbs) {
|
|
3961
|
-
activePostFlushCbs.push(...deduped);
|
|
3962
|
-
return;
|
|
3963
|
-
}
|
|
3964
|
-
activePostFlushCbs = deduped;
|
|
3965
|
-
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
|
3966
|
-
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
3967
|
-
activePostFlushCbs[postFlushIndex]();
|
|
3968
|
-
}
|
|
3969
|
-
activePostFlushCbs = null;
|
|
3970
|
-
postFlushIndex = 0;
|
|
3971
|
-
}
|
|
3972
|
-
}
|
|
3973
|
-
const getId = (job) => job.id == null ? Infinity : job.id;
|
|
3974
|
-
function flushJobs(seen) {
|
|
3975
|
-
isFlushPending = false;
|
|
3976
|
-
isFlushing = true;
|
|
3977
|
-
flushPreFlushCbs(seen);
|
|
3978
|
-
queue.sort((a, b) => getId(a) - getId(b));
|
|
3979
|
-
const check = NOOP;
|
|
3980
|
-
try {
|
|
3981
|
-
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
3982
|
-
const job = queue[flushIndex];
|
|
3983
|
-
if (job && job.active !== false) {
|
|
3984
|
-
if (false)
|
|
3985
|
-
;
|
|
3986
|
-
callWithErrorHandling(job, null, 14);
|
|
3987
|
-
}
|
|
3988
|
-
}
|
|
3989
|
-
} finally {
|
|
3990
|
-
flushIndex = 0;
|
|
3991
|
-
queue.length = 0;
|
|
3992
|
-
flushPostFlushCbs();
|
|
3993
|
-
isFlushing = false;
|
|
3994
|
-
currentFlushPromise = null;
|
|
3995
|
-
if (queue.length || pendingPreFlushCbs.length || pendingPostFlushCbs.length) {
|
|
3996
|
-
flushJobs(seen);
|
|
3997
|
-
}
|
|
3998
|
-
}
|
|
3999
|
-
}
|
|
4000
|
-
const INITIAL_WATCHER_VALUE = {};
|
|
4001
|
-
function watch(source, cb, options) {
|
|
4002
|
-
return doWatch(source, cb, options);
|
|
4003
|
-
}
|
|
4004
|
-
function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
|
|
4005
|
-
const instance = currentInstance;
|
|
4006
|
-
let getter;
|
|
4007
|
-
let forceTrigger = false;
|
|
4008
|
-
let isMultiSource = false;
|
|
4009
|
-
if (isRef(source)) {
|
|
4010
|
-
getter = () => source.value;
|
|
4011
|
-
forceTrigger = !!source._shallow;
|
|
4012
|
-
} else if (isReactive(source)) {
|
|
4013
|
-
getter = () => source;
|
|
4014
|
-
deep = true;
|
|
4015
|
-
} else if (isArray(source)) {
|
|
4016
|
-
isMultiSource = true;
|
|
4017
|
-
forceTrigger = source.some(isReactive);
|
|
4018
|
-
getter = () => source.map((s) => {
|
|
4019
|
-
if (isRef(s)) {
|
|
4020
|
-
return s.value;
|
|
4021
|
-
} else if (isReactive(s)) {
|
|
4022
|
-
return traverse(s);
|
|
4023
|
-
} else if (isFunction(s)) {
|
|
4024
|
-
return callWithErrorHandling(s, instance, 2);
|
|
4025
|
-
} else
|
|
4026
|
-
;
|
|
4027
|
-
});
|
|
4028
|
-
} else if (isFunction(source)) {
|
|
4029
|
-
if (cb) {
|
|
4030
|
-
getter = () => callWithErrorHandling(source, instance, 2);
|
|
4031
|
-
} else {
|
|
4032
|
-
getter = () => {
|
|
4033
|
-
if (instance && instance.isUnmounted) {
|
|
4034
|
-
return;
|
|
4035
|
-
}
|
|
4036
|
-
if (cleanup) {
|
|
4037
|
-
cleanup();
|
|
4038
|
-
}
|
|
4039
|
-
return callWithAsyncErrorHandling(source, instance, 3, [onInvalidate]);
|
|
4040
|
-
};
|
|
4041
|
-
}
|
|
4042
|
-
} else {
|
|
4043
|
-
getter = NOOP;
|
|
4044
|
-
}
|
|
4045
|
-
if (cb && deep) {
|
|
4046
|
-
const baseGetter = getter;
|
|
4047
|
-
getter = () => traverse(baseGetter());
|
|
4048
|
-
}
|
|
4049
|
-
let cleanup;
|
|
4050
|
-
let onInvalidate = (fn) => {
|
|
4051
|
-
cleanup = effect.onStop = () => {
|
|
4052
|
-
callWithErrorHandling(fn, instance, 4);
|
|
4053
|
-
};
|
|
4054
|
-
};
|
|
4055
|
-
if (isInSSRComponentSetup) {
|
|
4056
|
-
onInvalidate = NOOP;
|
|
4057
|
-
if (!cb) {
|
|
4058
|
-
getter();
|
|
4059
|
-
} else if (immediate) {
|
|
4060
|
-
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
4061
|
-
getter(),
|
|
4062
|
-
isMultiSource ? [] : void 0,
|
|
4063
|
-
onInvalidate
|
|
4064
|
-
]);
|
|
4065
|
-
}
|
|
4066
|
-
return NOOP;
|
|
4067
|
-
}
|
|
4068
|
-
let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
|
|
4069
|
-
const job = () => {
|
|
4070
|
-
if (!effect.active) {
|
|
4071
|
-
return;
|
|
4072
|
-
}
|
|
4073
|
-
if (cb) {
|
|
4074
|
-
const newValue = effect.run();
|
|
4075
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
|
|
4076
|
-
if (cleanup) {
|
|
4077
|
-
cleanup();
|
|
4078
|
-
}
|
|
4079
|
-
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
4080
|
-
newValue,
|
|
4081
|
-
oldValue === INITIAL_WATCHER_VALUE ? void 0 : oldValue,
|
|
4082
|
-
onInvalidate
|
|
4083
|
-
]);
|
|
4084
|
-
oldValue = newValue;
|
|
4085
|
-
}
|
|
4086
|
-
} else {
|
|
4087
|
-
effect.run();
|
|
4088
|
-
}
|
|
4089
|
-
};
|
|
4090
|
-
job.allowRecurse = !!cb;
|
|
4091
|
-
let scheduler;
|
|
4092
|
-
if (flush === "sync") {
|
|
4093
|
-
scheduler = job;
|
|
4094
|
-
} else if (flush === "post") {
|
|
4095
|
-
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
4096
|
-
} else {
|
|
4097
|
-
scheduler = () => {
|
|
4098
|
-
if (!instance || instance.isMounted) {
|
|
4099
|
-
queuePreFlushCb(job);
|
|
4100
|
-
} else {
|
|
4101
|
-
job();
|
|
4102
|
-
}
|
|
4103
|
-
};
|
|
4104
|
-
}
|
|
4105
|
-
const effect = new ReactiveEffect(getter, scheduler);
|
|
4106
|
-
if (cb) {
|
|
4107
|
-
if (immediate) {
|
|
4108
|
-
job();
|
|
4109
|
-
} else {
|
|
4110
|
-
oldValue = effect.run();
|
|
4111
|
-
}
|
|
4112
|
-
} else if (flush === "post") {
|
|
4113
|
-
queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense);
|
|
4114
|
-
} else {
|
|
4115
|
-
effect.run();
|
|
4116
|
-
}
|
|
4117
|
-
return () => {
|
|
4118
|
-
effect.stop();
|
|
4119
|
-
if (instance && instance.scope) {
|
|
4120
|
-
remove(instance.scope.effects, effect);
|
|
4121
|
-
}
|
|
4122
|
-
};
|
|
4123
|
-
}
|
|
4124
|
-
function instanceWatch(source, value, options) {
|
|
4125
|
-
const publicThis = this.proxy;
|
|
4126
|
-
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
4127
|
-
let cb;
|
|
4128
|
-
if (isFunction(value)) {
|
|
4129
|
-
cb = value;
|
|
4130
|
-
} else {
|
|
4131
|
-
cb = value.handler;
|
|
4132
|
-
options = value;
|
|
4133
|
-
}
|
|
4134
|
-
const cur = currentInstance;
|
|
4135
|
-
setCurrentInstance(this);
|
|
4136
|
-
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
4137
|
-
if (cur) {
|
|
4138
|
-
setCurrentInstance(cur);
|
|
4139
|
-
} else {
|
|
4140
|
-
unsetCurrentInstance();
|
|
4141
|
-
}
|
|
4142
|
-
return res;
|
|
4143
|
-
}
|
|
4144
|
-
function createPathGetter(ctx, path) {
|
|
4145
|
-
const segments = path.split(".");
|
|
4146
|
-
return () => {
|
|
4147
|
-
let cur = ctx;
|
|
4148
|
-
for (let i = 0; i < segments.length && cur; i++) {
|
|
4149
|
-
cur = cur[segments[i]];
|
|
4150
|
-
}
|
|
4151
|
-
return cur;
|
|
4152
|
-
};
|
|
4153
|
-
}
|
|
4154
|
-
function traverse(value, seen) {
|
|
4155
|
-
if (!isObject(value) || value["__v_skip"]) {
|
|
4156
|
-
return value;
|
|
4157
|
-
}
|
|
4158
|
-
seen = seen || new Set();
|
|
4159
|
-
if (seen.has(value)) {
|
|
4160
|
-
return value;
|
|
4161
|
-
}
|
|
4162
|
-
seen.add(value);
|
|
4163
|
-
if (isRef(value)) {
|
|
4164
|
-
traverse(value.value, seen);
|
|
4165
|
-
} else if (isArray(value)) {
|
|
4166
|
-
for (let i = 0; i < value.length; i++) {
|
|
4167
|
-
traverse(value[i], seen);
|
|
4168
|
-
}
|
|
4169
|
-
} else if (isSet(value) || isMap(value)) {
|
|
4170
|
-
value.forEach((v) => {
|
|
4171
|
-
traverse(v, seen);
|
|
4172
|
-
});
|
|
4173
|
-
} else if (isPlainObject(value)) {
|
|
4174
|
-
for (const key in value) {
|
|
4175
|
-
traverse(value[key], seen);
|
|
4176
|
-
}
|
|
4177
|
-
}
|
|
4178
|
-
return value;
|
|
4179
|
-
}
|
|
4180
|
-
const version = "3.2.26";
|
|
4181
|
-
const svgNS = "http://www.w3.org/2000/svg";
|
|
4182
|
-
const doc = typeof document !== "undefined" ? document : null;
|
|
4183
|
-
const staticTemplateCache = new Map();
|
|
4184
|
-
const nodeOps = {
|
|
4185
|
-
insert: (child, parent, anchor) => {
|
|
4186
|
-
parent.insertBefore(child, anchor || null);
|
|
4187
|
-
},
|
|
4188
|
-
remove: (child) => {
|
|
4189
|
-
const parent = child.parentNode;
|
|
4190
|
-
if (parent) {
|
|
4191
|
-
parent.removeChild(child);
|
|
4192
|
-
}
|
|
4193
|
-
},
|
|
4194
|
-
createElement: (tag, isSVG, is, props) => {
|
|
4195
|
-
const el = isSVG ? doc.createElementNS(svgNS, tag) : doc.createElement(tag, is ? { is } : void 0);
|
|
4196
|
-
if (tag === "select" && props && props.multiple != null) {
|
|
4197
|
-
el.setAttribute("multiple", props.multiple);
|
|
4198
|
-
}
|
|
4199
|
-
return el;
|
|
4200
|
-
},
|
|
4201
|
-
createText: (text) => doc.createTextNode(text),
|
|
4202
|
-
createComment: (text) => doc.createComment(text),
|
|
4203
|
-
setText: (node, text) => {
|
|
4204
|
-
node.nodeValue = text;
|
|
4205
|
-
},
|
|
4206
|
-
setElementText: (el, text) => {
|
|
4207
|
-
el.textContent = text;
|
|
4208
|
-
},
|
|
4209
|
-
parentNode: (node) => node.parentNode,
|
|
4210
|
-
nextSibling: (node) => node.nextSibling,
|
|
4211
|
-
querySelector: (selector) => doc.querySelector(selector),
|
|
4212
|
-
setScopeId(el, id) {
|
|
4213
|
-
el.setAttribute(id, "");
|
|
4214
|
-
},
|
|
4215
|
-
cloneNode(el) {
|
|
4216
|
-
const cloned = el.cloneNode(true);
|
|
4217
|
-
if (`_value` in el) {
|
|
4218
|
-
cloned._value = el._value;
|
|
4219
|
-
}
|
|
4220
|
-
return cloned;
|
|
4221
|
-
},
|
|
4222
|
-
insertStaticContent(content, parent, anchor, isSVG) {
|
|
4223
|
-
const before = anchor ? anchor.previousSibling : parent.lastChild;
|
|
4224
|
-
let template = staticTemplateCache.get(content);
|
|
4225
|
-
if (!template) {
|
|
4226
|
-
const t = doc.createElement("template");
|
|
4227
|
-
t.innerHTML = isSVG ? `<svg>${content}</svg>` : content;
|
|
4228
|
-
template = t.content;
|
|
4229
|
-
if (isSVG) {
|
|
4230
|
-
const wrapper = template.firstChild;
|
|
4231
|
-
while (wrapper.firstChild) {
|
|
4232
|
-
template.appendChild(wrapper.firstChild);
|
|
4233
|
-
}
|
|
4234
|
-
template.removeChild(wrapper);
|
|
4235
|
-
}
|
|
4236
|
-
staticTemplateCache.set(content, template);
|
|
4237
|
-
}
|
|
4238
|
-
parent.insertBefore(template.cloneNode(true), anchor);
|
|
4239
|
-
return [
|
|
4240
|
-
before ? before.nextSibling : parent.firstChild,
|
|
4241
|
-
anchor ? anchor.previousSibling : parent.lastChild
|
|
4242
|
-
];
|
|
4243
|
-
}
|
|
4244
|
-
};
|
|
4245
|
-
function patchClass(el, value, isSVG) {
|
|
4246
|
-
const transitionClasses = el._vtc;
|
|
4247
|
-
if (transitionClasses) {
|
|
4248
|
-
value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
|
|
4249
|
-
}
|
|
4250
|
-
if (value == null) {
|
|
4251
|
-
el.removeAttribute("class");
|
|
4252
|
-
} else if (isSVG) {
|
|
4253
|
-
el.setAttribute("class", value);
|
|
4254
|
-
} else {
|
|
4255
|
-
el.className = value;
|
|
4256
|
-
}
|
|
4257
|
-
}
|
|
4258
|
-
function patchStyle(el, prev, next) {
|
|
4259
|
-
const style = el.style;
|
|
4260
|
-
const isCssString = isString(next);
|
|
4261
|
-
if (next && !isCssString) {
|
|
4262
|
-
for (const key in next) {
|
|
4263
|
-
setStyle(style, key, next[key]);
|
|
4264
|
-
}
|
|
4265
|
-
if (prev && !isString(prev)) {
|
|
4266
|
-
for (const key in prev) {
|
|
4267
|
-
if (next[key] == null) {
|
|
4268
|
-
setStyle(style, key, "");
|
|
4269
|
-
}
|
|
4270
|
-
}
|
|
4271
|
-
}
|
|
4272
|
-
} else {
|
|
4273
|
-
const currentDisplay = style.display;
|
|
4274
|
-
if (isCssString) {
|
|
4275
|
-
if (prev !== next) {
|
|
4276
|
-
style.cssText = next;
|
|
4277
|
-
}
|
|
4278
|
-
} else if (prev) {
|
|
4279
|
-
el.removeAttribute("style");
|
|
4280
|
-
}
|
|
4281
|
-
if ("_vod" in el) {
|
|
4282
|
-
style.display = currentDisplay;
|
|
4283
|
-
}
|
|
4284
|
-
}
|
|
4285
|
-
}
|
|
4286
|
-
const importantRE = /\s*!important$/;
|
|
4287
|
-
function setStyle(style, name, val) {
|
|
4288
|
-
if (isArray(val)) {
|
|
4289
|
-
val.forEach((v) => setStyle(style, name, v));
|
|
4290
|
-
} else {
|
|
4291
|
-
if (name.startsWith("--")) {
|
|
4292
|
-
style.setProperty(name, val);
|
|
4293
|
-
} else {
|
|
4294
|
-
const prefixed = autoPrefix(style, name);
|
|
4295
|
-
if (importantRE.test(val)) {
|
|
4296
|
-
style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
|
|
4297
|
-
} else {
|
|
4298
|
-
style[prefixed] = val;
|
|
4299
|
-
}
|
|
4300
|
-
}
|
|
4301
|
-
}
|
|
4302
|
-
}
|
|
4303
|
-
const prefixes = ["Webkit", "Moz", "ms"];
|
|
4304
|
-
const prefixCache = {};
|
|
4305
|
-
function autoPrefix(style, rawName) {
|
|
4306
|
-
const cached = prefixCache[rawName];
|
|
4307
|
-
if (cached) {
|
|
4308
|
-
return cached;
|
|
4309
|
-
}
|
|
4310
|
-
let name = camelize(rawName);
|
|
4311
|
-
if (name !== "filter" && name in style) {
|
|
4312
|
-
return prefixCache[rawName] = name;
|
|
4313
|
-
}
|
|
4314
|
-
name = capitalize(name);
|
|
4315
|
-
for (let i = 0; i < prefixes.length; i++) {
|
|
4316
|
-
const prefixed = prefixes[i] + name;
|
|
4317
|
-
if (prefixed in style) {
|
|
4318
|
-
return prefixCache[rawName] = prefixed;
|
|
4319
|
-
}
|
|
4320
|
-
}
|
|
4321
|
-
return rawName;
|
|
4322
|
-
}
|
|
4323
|
-
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
4324
|
-
function patchAttr(el, key, value, isSVG, instance) {
|
|
4325
|
-
if (isSVG && key.startsWith("xlink:")) {
|
|
4326
|
-
if (value == null) {
|
|
4327
|
-
el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
4328
|
-
} else {
|
|
4329
|
-
el.setAttributeNS(xlinkNS, key, value);
|
|
4330
|
-
}
|
|
4331
|
-
} else {
|
|
4332
|
-
const isBoolean = isSpecialBooleanAttr(key);
|
|
4333
|
-
if (value == null || isBoolean && !includeBooleanAttr(value)) {
|
|
4334
|
-
el.removeAttribute(key);
|
|
4335
|
-
} else {
|
|
4336
|
-
el.setAttribute(key, isBoolean ? "" : value);
|
|
4337
|
-
}
|
|
4338
|
-
}
|
|
4339
|
-
}
|
|
4340
|
-
function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
4341
|
-
if (key === "innerHTML" || key === "textContent") {
|
|
4342
|
-
if (prevChildren) {
|
|
4343
|
-
unmountChildren(prevChildren, parentComponent, parentSuspense);
|
|
4344
|
-
}
|
|
4345
|
-
el[key] = value == null ? "" : value;
|
|
4346
|
-
return;
|
|
4347
|
-
}
|
|
4348
|
-
if (key === "value" && el.tagName !== "PROGRESS" && !el.tagName.includes("-")) {
|
|
4349
|
-
el._value = value;
|
|
4350
|
-
const newValue = value == null ? "" : value;
|
|
4351
|
-
if (el.value !== newValue || el.tagName === "OPTION") {
|
|
4352
|
-
el.value = newValue;
|
|
4353
|
-
}
|
|
4354
|
-
if (value == null) {
|
|
4355
|
-
el.removeAttribute(key);
|
|
4356
|
-
}
|
|
4357
|
-
return;
|
|
4358
|
-
}
|
|
4359
|
-
if (value === "" || value == null) {
|
|
4360
|
-
const type = typeof el[key];
|
|
4361
|
-
if (type === "boolean") {
|
|
4362
|
-
el[key] = includeBooleanAttr(value);
|
|
4363
|
-
return;
|
|
4364
|
-
} else if (value == null && type === "string") {
|
|
4365
|
-
el[key] = "";
|
|
4366
|
-
el.removeAttribute(key);
|
|
4367
|
-
return;
|
|
4368
|
-
} else if (type === "number") {
|
|
4369
|
-
try {
|
|
4370
|
-
el[key] = 0;
|
|
4371
|
-
} catch (_a) {
|
|
4372
|
-
}
|
|
4373
|
-
el.removeAttribute(key);
|
|
4374
|
-
return;
|
|
4375
|
-
}
|
|
4376
|
-
}
|
|
4377
|
-
try {
|
|
4378
|
-
el[key] = value;
|
|
4379
|
-
} catch (e) {
|
|
4380
|
-
}
|
|
4381
|
-
}
|
|
4382
|
-
let _getNow = Date.now;
|
|
4383
|
-
let skipTimestampCheck = false;
|
|
4384
|
-
if (typeof window !== "undefined") {
|
|
4385
|
-
if (_getNow() > document.createEvent("Event").timeStamp) {
|
|
4386
|
-
_getNow = () => performance.now();
|
|
4387
|
-
}
|
|
4388
|
-
const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
|
|
4389
|
-
skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
|
|
4390
|
-
}
|
|
4391
|
-
let cachedNow = 0;
|
|
4392
|
-
const p = Promise.resolve();
|
|
4393
|
-
const reset = () => {
|
|
4394
|
-
cachedNow = 0;
|
|
4395
|
-
};
|
|
4396
|
-
const getNow = () => cachedNow || (p.then(reset), cachedNow = _getNow());
|
|
4397
|
-
function addEventListener(el, event, handler, options) {
|
|
4398
|
-
el.addEventListener(event, handler, options);
|
|
4399
|
-
}
|
|
4400
|
-
function removeEventListener(el, event, handler, options) {
|
|
4401
|
-
el.removeEventListener(event, handler, options);
|
|
4402
|
-
}
|
|
4403
|
-
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
4404
|
-
const invokers = el._vei || (el._vei = {});
|
|
4405
|
-
const existingInvoker = invokers[rawName];
|
|
4406
|
-
if (nextValue && existingInvoker) {
|
|
4407
|
-
existingInvoker.value = nextValue;
|
|
4408
|
-
} else {
|
|
4409
|
-
const [name, options] = parseName(rawName);
|
|
4410
|
-
if (nextValue) {
|
|
4411
|
-
const invoker = invokers[rawName] = createInvoker(nextValue, instance);
|
|
4412
|
-
addEventListener(el, name, invoker, options);
|
|
4413
|
-
} else if (existingInvoker) {
|
|
4414
|
-
removeEventListener(el, name, existingInvoker, options);
|
|
4415
|
-
invokers[rawName] = void 0;
|
|
4416
|
-
}
|
|
4417
|
-
}
|
|
4418
|
-
}
|
|
4419
|
-
const optionsModifierRE = /(?:Once|Passive|Capture)$/;
|
|
4420
|
-
function parseName(name) {
|
|
4421
|
-
let options;
|
|
4422
|
-
if (optionsModifierRE.test(name)) {
|
|
4423
|
-
options = {};
|
|
4424
|
-
let m;
|
|
4425
|
-
while (m = name.match(optionsModifierRE)) {
|
|
4426
|
-
name = name.slice(0, name.length - m[0].length);
|
|
4427
|
-
options[m[0].toLowerCase()] = true;
|
|
4428
|
-
}
|
|
4429
|
-
}
|
|
4430
|
-
return [hyphenate(name.slice(2)), options];
|
|
4431
|
-
}
|
|
4432
|
-
function createInvoker(initialValue, instance) {
|
|
4433
|
-
const invoker = (e) => {
|
|
4434
|
-
const timeStamp = e.timeStamp || _getNow();
|
|
4435
|
-
if (skipTimestampCheck || timeStamp >= invoker.attached - 1) {
|
|
4436
|
-
callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5, [e]);
|
|
4437
|
-
}
|
|
4438
|
-
};
|
|
4439
|
-
invoker.value = initialValue;
|
|
4440
|
-
invoker.attached = getNow();
|
|
4441
|
-
return invoker;
|
|
4442
|
-
}
|
|
4443
|
-
function patchStopImmediatePropagation(e, value) {
|
|
4444
|
-
if (isArray(value)) {
|
|
4445
|
-
const originalStop = e.stopImmediatePropagation;
|
|
4446
|
-
e.stopImmediatePropagation = () => {
|
|
4447
|
-
originalStop.call(e);
|
|
4448
|
-
e._stopped = true;
|
|
4449
|
-
};
|
|
4450
|
-
return value.map((fn) => (e2) => !e2._stopped && fn(e2));
|
|
4451
|
-
} else {
|
|
4452
|
-
return value;
|
|
4453
|
-
}
|
|
4454
|
-
}
|
|
4455
|
-
const nativeOnRE = /^on[a-z]/;
|
|
4456
|
-
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
4457
|
-
if (key === "class") {
|
|
4458
|
-
patchClass(el, nextValue, isSVG);
|
|
4459
|
-
} else if (key === "style") {
|
|
4460
|
-
patchStyle(el, prevValue, nextValue);
|
|
4461
|
-
} else if (isOn(key)) {
|
|
4462
|
-
if (!isModelListener(key)) {
|
|
4463
|
-
patchEvent(el, key, prevValue, nextValue, parentComponent);
|
|
4464
|
-
}
|
|
4465
|
-
} else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
|
|
4466
|
-
patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren);
|
|
4467
|
-
} else {
|
|
4468
|
-
if (key === "true-value") {
|
|
4469
|
-
el._trueValue = nextValue;
|
|
4470
|
-
} else if (key === "false-value") {
|
|
4471
|
-
el._falseValue = nextValue;
|
|
4472
|
-
}
|
|
4473
|
-
patchAttr(el, key, nextValue, isSVG);
|
|
4474
|
-
}
|
|
4475
|
-
};
|
|
4476
|
-
function shouldSetAsProp(el, key, value, isSVG) {
|
|
4477
|
-
if (isSVG) {
|
|
4478
|
-
if (key === "innerHTML" || key === "textContent") {
|
|
4479
|
-
return true;
|
|
4480
|
-
}
|
|
4481
|
-
if (key in el && nativeOnRE.test(key) && isFunction(value)) {
|
|
4482
|
-
return true;
|
|
4483
|
-
}
|
|
4484
|
-
return false;
|
|
4485
|
-
}
|
|
4486
|
-
if (key === "spellcheck" || key === "draggable") {
|
|
4487
|
-
return false;
|
|
4488
|
-
}
|
|
4489
|
-
if (key === "form") {
|
|
4490
|
-
return false;
|
|
4491
|
-
}
|
|
4492
|
-
if (key === "list" && el.tagName === "INPUT") {
|
|
4493
|
-
return false;
|
|
4494
|
-
}
|
|
4495
|
-
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
4496
|
-
return false;
|
|
4497
|
-
}
|
|
4498
|
-
if (nativeOnRE.test(key) && isString(value)) {
|
|
4499
|
-
return false;
|
|
4500
|
-
}
|
|
4501
|
-
return key in el;
|
|
4502
|
-
}
|
|
4503
|
-
const DOMTransitionPropsValidators = {
|
|
4504
|
-
name: String,
|
|
4505
|
-
type: String,
|
|
4506
|
-
css: {
|
|
4507
|
-
type: Boolean,
|
|
4508
|
-
default: true
|
|
4509
|
-
},
|
|
4510
|
-
duration: [String, Number, Object],
|
|
4511
|
-
enterFromClass: String,
|
|
4512
|
-
enterActiveClass: String,
|
|
4513
|
-
enterToClass: String,
|
|
4514
|
-
appearFromClass: String,
|
|
4515
|
-
appearActiveClass: String,
|
|
4516
|
-
appearToClass: String,
|
|
4517
|
-
leaveFromClass: String,
|
|
4518
|
-
leaveActiveClass: String,
|
|
4519
|
-
leaveToClass: String
|
|
4520
|
-
};
|
|
4521
|
-
/* @__PURE__ */ extend({}, BaseTransition.props, DOMTransitionPropsValidators);
|
|
4522
|
-
const rendererOptions = extend({ patchProp }, nodeOps);
|
|
4523
|
-
let renderer;
|
|
4524
|
-
function ensureRenderer() {
|
|
4525
|
-
return renderer || (renderer = createRenderer(rendererOptions));
|
|
4526
|
-
}
|
|
4527
|
-
const createApp = (...args) => {
|
|
4528
|
-
const app = ensureRenderer().createApp(...args);
|
|
4529
|
-
const { mount } = app;
|
|
4530
|
-
app.mount = (containerOrSelector) => {
|
|
4531
|
-
const container = normalizeContainer(containerOrSelector);
|
|
4532
|
-
if (!container)
|
|
4533
|
-
return;
|
|
4534
|
-
const component = app._component;
|
|
4535
|
-
if (!isFunction(component) && !component.render && !component.template) {
|
|
4536
|
-
component.template = container.innerHTML;
|
|
4537
|
-
}
|
|
4538
|
-
container.innerHTML = "";
|
|
4539
|
-
const proxy = mount(container, false, container instanceof SVGElement);
|
|
4540
|
-
if (container instanceof Element) {
|
|
4541
|
-
container.removeAttribute("v-cloak");
|
|
4542
|
-
container.setAttribute("data-v-app", "");
|
|
4543
|
-
}
|
|
4544
|
-
return proxy;
|
|
4545
|
-
};
|
|
4546
|
-
return app;
|
|
4547
|
-
};
|
|
4548
|
-
function normalizeContainer(container) {
|
|
4549
|
-
if (isString(container)) {
|
|
4550
|
-
const res = document.querySelector(container);
|
|
4551
|
-
return res;
|
|
4552
|
-
}
|
|
4553
|
-
return container;
|
|
4554
|
-
}
|
|
4555
|
-
const _hoisted_1$3 = { class: "ck-button" };
|
|
4556
|
-
const _hoisted_2$3 = /* @__PURE__ */ createTextVNode("ck button");
|
|
4557
|
-
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4558
|
-
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
4559
|
-
createBaseVNode("button", {
|
|
4560
|
-
class: normalizeClass($options.computedClass),
|
|
4561
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
|
4562
|
-
}, [
|
|
4563
|
-
_hoisted_2$3,
|
|
4564
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
4565
|
-
], 2)
|
|
4566
|
-
]);
|
|
4567
|
-
}
|
|
4568
|
-
var ckButton_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
|
|
4569
|
-
var _export_sfc = (sfc, props) => {
|
|
4570
|
-
const target = sfc.__vccOpts || sfc;
|
|
4571
|
-
for (const [key, val] of props) {
|
|
4572
|
-
target[key] = val;
|
|
4573
|
-
}
|
|
4574
|
-
return target;
|
|
4575
|
-
};
|
|
4576
|
-
const _sfc_main$3 = {
|
|
4577
|
-
props: {
|
|
4578
|
-
type: { type: String, default: "" },
|
|
4579
|
-
color: { type: String, default: "" },
|
|
4580
|
-
icon: { type: [String, Array], default: "" },
|
|
4581
|
-
"icon-package": { type: String, default: "" },
|
|
4582
|
-
"icon-right": { type: String, default: "" },
|
|
4583
|
-
label: { type: String, default: "" },
|
|
4584
|
-
"label-align": { type: String, default: "" },
|
|
4585
|
-
group: { type: String, default: "" },
|
|
4586
|
-
groupBreak: { type: String, default: "s" },
|
|
4587
|
-
groupVertical: { type: String, default: "" }
|
|
4588
|
-
},
|
|
4589
|
-
computed: {
|
|
4590
|
-
computedClass() {
|
|
4591
|
-
const classList = [];
|
|
4592
|
-
classList.push(functions.getGroupClass(this));
|
|
4593
|
-
if (this.color) {
|
|
4594
|
-
if (this.type === "filled") {
|
|
4595
|
-
classList.push(`ck-component__bg-color--${this.color}`);
|
|
4596
|
-
} else {
|
|
4597
|
-
classList.push(`ck-component__border-color--${this.color}`);
|
|
4598
|
-
}
|
|
4599
|
-
}
|
|
4600
|
-
return classList;
|
|
4601
|
-
}
|
|
4602
|
-
}
|
|
4603
|
-
};
|
|
4604
|
-
var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", render$1], ["__scopeId", "data-v-aac8240a"]]);
|
|
4605
|
-
var components = /* @__PURE__ */ Object.freeze({
|
|
4606
|
-
__proto__: null,
|
|
4607
|
-
[Symbol.toStringTag]: "Module",
|
|
4608
|
-
CkButton: ckButton
|
|
4609
|
-
});
|
|
4610
|
-
var _imports_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTk2QkI4RkE3NjE2MTFFNUE4NEU4RkIxNjQ5MTYyRDgiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTk2QkI4Rjk3NjE2MTFFNUE4NEU4RkIxNjQ5MTYyRDgiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjU2QTEyNzk3NjkyMTFFMzkxODk4RDkwQkY4Q0U0NzYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NjU2QTEyN0E3NjkyMTFFMzkxODk4RDkwQkY4Q0U0NzYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5WHowqAAAXNElEQVR42uxda4xd1XVe53XvvD2eGQ/lXQcKuDwc2eFlCAGnUn7kT6T86J/+aNTgsWPchJJYciEOCQ8hF+G0hFCIHRSEqAuJBCqRaUEIEbmBppAIBGnESwZje8COZ+y587j3PLq+ffadGJix53HvPevcuz60xPjec89ZZ+39nf04+9vLSZKEFArFzHA1BAqFEkShUIIoFEoQhUIJolAoQRQKJYhCoQRRKJQgCoUSRKFQKEEUCiWIQrFo+Gv/8/YH+f/nsMWSHHMChyhxqPTTdyncWyJ3ScD/ztipiB3wXSqu6P17avN+TyFC5ggv4tRnmoxWTP1+5F+Mz17GPvPl49EKBWd3UsfXllPiso8VcYtmPba3fNuKrBVXrGFCbrdPwXndFL49ltI367roOpSUI4pGypv9s7q+ltj6JxqOQ07Bo/DgxGb2/a8cX0CnAWXJ5etz2TqdHiXHKlKj9w6i9XX8Ic41DmI8FVHhmmXk85MmRhCzJoiTWnig9LfJRHihgydxzAxJhBr7Bh/hK3yu+p9568FliTJF2aKMZfVd/kQOcKP6OBmS9+Rjm4zJ6faoeN0gOUn61MncLX4CJ+MRhe+P/dRxhfew2Df4CF/hs4jWg8vQYUKYMuWyRRkLjeHQ8YP0Z9mekVjA8Qj3VVcuoeDiXu63lkUE0ym6FA5PXBaNVr7qtPumGyPR4Bt8hK/wWUR5chn6XJYoU5StUHL8l+XEx2axhkS6yk+chJuP4rXLyOkIKJkS0B67adcqfL/0Y4pixxSysK6V8Yl9Mz7i3272NRFlhzJsu24Z5l9E9Ahmwfrpoj7uw3fZtktsRZKjIXnndlLxin7+W8ZTBwPf6I+Tg9HwxK2Ob8citbCoBoaxBxMCvsFH+CqjHCtUvLzflKWUcpwB91gupG5f9/Rtx39ZZBtmWyJtphKzHTQW0diP36b4aJmcLj/zGaSkHJPb4SWFi/tOJd8bTqd9s48VBRh4RKeUX/vjgXg8cpyCmz05xkJylxSoa8M5RF0eJaVIIkGOsg2yTc3UgpD94psiWxEOqDNYoOIXuHnGwE5AXUTFi46FTnRw4l/dwEm7/pSxcYnCF/gE3zInh52RRJkVP7/MlKFQcgCbjifHTAQBfsb2qsgBO3e1Cpf3UXBej3nRJKKrxU/rcH/pKzz4vNIQuRJTEmZklbg6EL4SPsE3GQPzinmfhbJDGQolB+r8w58abs5y8DqRt4ABeptLRR7koY9NleybEYw/MPisvF/ayT1/SvDewcnIcG32wfiCAbEvoCZyGaGsitdyz6XdTctQJq6fcT5mloNfYvu5yFZkpEz+RT0UrFoqpxVBV+vQxIrkaPnrbqdvXs6hcjbU+Jq4Nvvwd/BFRNeq2npwWfkX95iyE9p6PM72P/MhCPANTBSKu5WITHcC074Y9CUTkYglKBgcV/aVtlM5Kpp/RHFjDdfka7MP/2wG6m72661QNigjlBXKTGBtsjWKNs5atCf44Uds3xc5YD8Wknd2BxWuGjCzIxLWQzlFj+IjU108OL7bafM5sm5DDdfka/8T+9AJXyTMpqFsUEYoK5SZ0NbjVlvX500Q4Ha2A+JuCcEvhVS8qp/8MzspHhMSfO7mVPaP35BMRp9JsCQldbX+hmvxNfnamzJfqVvtWnGZoGxQRigroYs6UbfvOGHn4ORVkTaIbEWwtqg3MNO+Zql0JGCdVuCayhDuG9uJB7vp+oR17FbZc+NauCauLWLmKkqXr6NsUEYoK6GtxwY6CXXnEs0n2faIHLCPhhR8bikFKwRN+xZddHWu5a7Ol9yCZ2ZwHKdOxufGNeKRqS/hmnLWW1VMmQSrl5oyEkqOPbZu02IJAsic9sU7B+5uF9cOmqUfeLOdOaAZYb/CA+M/Ic9NxUoYMNfD/PT84f7xB807EAnrrbgMUBZt1w1SEpCIqfjF1Om5EuQNth0iu1r8tPLP76LCpX2yWpHDk2dGH018p6brtD5hOHf04cR3okOTZ0lqPVAW3gVdlMhdrfsTW6drRhDgRrYJcbeKZQxTkenvegNt6YBQwrQvOxG+P3ZHEia9TuClS9Br1XKge8XnxLlxjelzZ/2w4tijDMxyoHIsVQg1zvYPcy7KeZx4jG2zyFakFJF7Whu1XT2QvhfJeryeVNdplYPo4Pi9hKd7VVxVC8O5cH4+N65hXgoKuGfEHmWAskjGxI49Ntu6XHOCAD9ie1PcLSepjDNY00fB8m6KpSyJx/jgg9LfJEfLK40818w+LXY5e5zKaMfKl+DcIlSCZp0cd3U59igDI4+WOa2LunvfvDoD9RrcNLqAjDy3yzfrtKqbAkggSDIZmSlYxzz9a8BaJ101zF2rh3BuSTJaCKGMDEGujHbedXch0X2ebbdEkkDC6a9cQoWVguS53P0JP5xcHY1W/tppD9KxgrdAw5QxnwPn4nOukrPeqkzBJb0m9oJltLtt3a07QYD1IkMAeS7/hw0BXMhzJwXJc/eV7kuiyIN8OOGuUhLP06JUeoxz4FxiZLRouTsDM9WO2OdBRtsIgrzHtk3kgH00JO+cTipc2S9jqyCaluf2xwcnfuB6LndHuEsSzdP4N/gtzoFzSZHRIsaQQiPmidyXgttsnW0YQYDvsh2ROGBPxkMqXjNA/qlCFsnZ8UdlX+kfk0pymlnMWH2JOBfz0sWI+C3OMS1dzPphhPVWHOPC5wdMzIUOzFFHb1lwB2ARF+ZOPt0gshWBPLe/wCRZlu6CIkSei/cE0fD4g2ZbVWceyxH5WPwGvzXrrSTJaDnG7oBoGS3qaCULggCPsv1W5IAd8tzLllJwvpx1WthMIfyg9OVotHy1WVQ4V37wsfgNfkuSZLQcW8Q4lruU/RVbRykrggDXiwwN3uQWnXTa1xMkz2W/on2lndNajpNtAGePw2/MOicBMlqs+8K7GBNbjrFgGe2iX0nUgiAvs+0S2YpgndaFPVRc3SdmVanZlfGjifOiw5PrT/oGvPpG/vDkEH4jZ70Vt86rl5rYimmdP41/s3Uzc4Isup9XNxwvz+0tyNAlONPrtO6hctR+QnluKqNt52O3pxvtClhvxTH0egtmEwbBMlrUxU21OFGtCHKYbavIATv3j90z26kIea4QZRtahfhIuT0anrjH7O3rpjNVHzPIaLG3Lh8Tj5TbRQihjlNyehxTwTLarbZOiiEIcBfbPnGhMtroChXW9JN/VqeYdyPEY4nwwPj6ZCL8C1T+T61JhDqRv8MxZgwlJG2BxzEsrBmgeEzseqt9ti6SNIIA8t6wm901eFDZ66d7M4UkQ56LVgTTvvtKaRqFqoTWymjxGb6LpUzrImYcuzaOIWKJmAptPWpaB2sd+V+yvSB1wB6s7qXgwiUyBpbJdBqFq6MjU18mKCKhRsTyEbx558/wnRmYJzLiV+DYBat6JQ/MX7B1UCxBAKHy3IQrH6W7MhY9MWkUMNAN948/8Mm35/jMDIKlpC3gmBWQtsAjifkE61b36kGQP7DdL7KrVZXnXiYpjYKZxj09Gh7f4kB4yIa/8ZmU1brIIYiYIXaJ3Nbjflv3xBME+DZbSVwIzfIIK89dJkSea18Ihu+XflD9yPztCJnW5Ri5VRntpNh8giVb5ygvBIHu9yaRrchYRO6fFU0CSTPQlDLte6zshx9O3g3D3yJajySd4EDaAsQMsRPaetxk61zty+YTCXRqjf9jO19cOLnyYV+p8QffpcreMXJ7BeRgh77Ds6SIYhGbMBgB2tld1DW0nGL4VxbZfKBbdUHdhol1dl7mOi0MOjttGgWT11lAwU9r1mMSsX0oxwSxgYyWOvKXtiAvBPkV239I7GqZdVqX9FDw2V5+UoYipn2nt/WRMK3LMQlW9poYCZ7WfcrWsdwSBNggMrRYdcLdhjas0+q28lzJOc8bOU7jWLh2AwzEyLxclYm6Z2ZuBEE+YLtTZEVA9tzPdBh5biJ3q5rGD8yRjXbNAPkcm0RuyjTUqf3NQBDge2yHJFaGeDyi4tUD5J3WIXmzs8Y9NDgG3un80OCYIDZCHxqHbJ2iZiEIGmnB8twgzYIkd7vMxiBON59GLJyBQLKMdiM1qOPXyMn2f2f7X5EDdshzkUbhAtED0oZMXCAGiIXgtAW/YXusURdr9NsoufLcgmP20zKy2ErrNSNGRuunMUAshL7zABq61q/RBPkd2yNSn57+X3ZTQZA8t7H3H5p7RwwEt6KP2DrUtAQBIIUsiwt99Kf+tydFntuocVhVRltNWyBTRlumGslopRNkhO1mkRVlLCT3jHYzqyU48WSN+1ZWRou0BZDRyp3Ju9nWnaYnCHA3216JlQWy0gKy557dJSaNQn0nKNL1VrhnwTLavbbOUKsQBBApzzVpFHqsPFdIGoW6AfeG7cMwrcv3TC0io80LQZ5me07kU3WkYqSlhYvkpFGoz8C8bO7RyGjlpi14ztaVliMIIFOeizQKbpI+WdsDGfLcWvcmsaK53b4gdUW3lENZXjxrgrzNdq/IAftohbzzOql4eV/zjUUcu96K7w33KFhGi7rxVisTBEBSxWPiiqYqz71mGfmDQuS5tSIHstHyPZnd7+XKaI+RgKSxEggySWmKaXkVaSwi5xSbRmGiSdZpxVZGy/eEexMso73R1o2WJwiwk+11kQNZrNO6oo+Cc7vz39Wy07q4l+CKfnNvQu/ndVsnSAkifcCOAXq7R8W1y9JdRvI87QvfnTRtgdPeujLavBLkv9meEPnUHS2Tf1EPFT67lOKRnE77munrsrkH/+IeydPXqAO/VoLMDMhz5T2irTzXpFHoKeRPnluV0XYX0mlduTLamIRJtKUR5CDbbSIrGPfX/eUdVFyTQ3luku6OaNIW/HmH5LQFt9k6oAQ5Ab7PNiyxkmGndUhRvTNyJM9F1wrZaM9IZbQmG63MocewxIejRIKg+DaKbEXGI3KWBtT2hUFKyonUZeEfB3xkX4vsM3wXvIx/IwmMqCu0WH/B9qLIpzG6Wp/rpWBFj/x1WnaCAb4G7LPgad0XbZmTEmTukDnti0yzgZvKcwNPtDzXyGjZR5ONFincVEbbVAR5je0hkU/lkTL5F3TZzQ2EvjysJr1hH/0LuiVPTz9ky1oJsgB8iwQsN5hplISns5Hn9hXl9eurMlr2zUzrVsQuk5m0ZUxKkIXhKNsWkQN2yHNPhzx3WbqQMRZGYCOjXWZ8FDzjtsWWsRJkEfgh2zvyOvhWnovsucu75GTPtdlo4RN8i+W+s3nHli0pQRaPIXEeVeW53V46YJciz2Uf4IvxiX0juW/9h/JQ8fJCkGfZnpE5YK9QsHIJBZcIkOdW141d3Gt8EiyjfcaWqRKk6Z84kOc6duODjmzluUZGyz4g6Q18UhltaxHkXbbtIgfsRyvknQt5bobZc6dltP3Gl0SudmW7LUslSJ1mPUbFeWVUepDnDpB3SgazRtW0BXxt+ABfhE7rypyVbCKCTLF9U2QrgjQKg3b7zskGv3eI0+XsuDZ8EJy2YJMtQyVIHfEztldFDtghz728j4LzGphGoZq2gK9ZMDuwiH3ngTJ7OG+VLY8EAeTKc9ts9lwk42zEOi2st+JrYZIA1xYso12Xx4qWV4K8xPZzka3ISCrPDVY1YJ1WtfVYZWW0ctdbPW7LTAnSQHyDJCoykEYhTNdpuUsK6YDZqQ85cG5cw6y3CsWmLYBXG/NayfJMkI8oVR/KG7AfC8k7u4MKVw2kM1r1eB2RpDNXuAauJVhGe6stKyVIBrid7YA4r6o5N5BG4cxOI3mtaeWtymj53LiG4FwmKJs78lzB8k4QVIsN4ryqynN7AzP1ShXIc2tYg3GuSpJO6/aKltHK3KWmhQgCPMm2R+SAfTSkANlzV9Rw2rc6MDcyWtHZaPfYsiElSPaQOYVYiSnxiIprB8kpeGn+v8U2mZD8FjxzTpybKjqtqwQ5Od5g2yGyq4Xsued3UeHSvsW3IlUZLZ8L5xSctmCHLRMliCBgN/AJcV7F6SpbjBe8gUWkUaimLeBzmOUsU2JltOMkcbd+JQiNkYB8ErNVbPe0Nmq72i4kXMiwNUnfe+AcOJfgfCWbbVkoQQTiR2xvivPKynODNX0ULF9AGoVq2gL+Lc4hWEaL2N/XTBWq2Qgic3BYled2+ekeVfOV51az0WKNF59DsIx2XbNVpmYkyPNsuyWSBBJYf+USKsxHnlvNRsu/8WXLaHfb2CtBcoD1Ir2CPJf/wxSt2xmkupGT9c6QtoCPNdO66FfJldGub8aK1KwEeY9tm8gB+2hI3jmdVLii/+RbBdktfHAsfpPIfSm4zcZcCZIjfJftiMQBO1IQQBrrn3qCRYZ20SOOMTLacbHrrRDjW5q1EjUzQbiTTzeIbEUgz+232XNne59RfX+CbLT9omW0iHFFCZJPPMr2W5EDdshzL1tKwfkzrNOqrrfi73CMYBntKzbGpATJL64X6RXWZRVtxlnP+VgaBZO2wEu/wzGatkAJUk+8zLZLZCuCdVoXciux+rhVuXYVMD7Dd7Hc9Va7bGyVIE0Amf3kaXnuIHm9qTwXhr/xmWAZbUXk+E4JsmAcZtsqcsAOee6Z7VS08lwY/sZngmW0W21MlSBNhLvY9onzCqtIxipUuKqf3L6iMfyNz4RO6+6zsWwJ+NRawNvep8S1IhMxucie+8VT0o+6PIqPiB17rG+lCtNqBPkl2wts14gbsCONwqVLzT8Fr7d6wcawZeBS60Hm1GSSTu+a6d5EY6cEyQ5/YLtf4oCd4iQ1ma3H/TZ2SpAWwLfZSqSYK0o2ZqQEaQ1AN32T1vs54yYbMyVIC+GBVuwyLLBL+kCr3rzb4oV/vdZ/jZESZHb8iqS9F5GFp2yMlCAtjCENgcZGCTI79rPdqWH4FO60sVGCKOh7bIc0DNM4ZGNCShAFEFKOsyDVARttTJQgGoJpPMb2Gw2DicFjGgYlyExYpyHQGChBZsfv2B5p4ft/xMZAoQSZFZso3TKo1VC2965QgpwQI2w3t+B932zvXaEEOSnuZtvbQve7196zQgkyZ6zXe1UoQWbH02zPtcB9PmfvVaEEmTeG9B6VIIrZ8RbbvU18f/fae1QoQRYMJKU81oT3dYwkJj1VguQOk9REaY2Pw4323hRKkEVjJ9vrTXQ/r9t7UihBaobr9V6UIIrZ8Wu2J5rgPp6w96JQgtQcG2jmhGl5QWzvQaEEqQsOst2WY/9vs/egUILUtZIN59Dv4ZyTWwmSEyDnUx7luRtJar4qJUjT4RdsL+bI3xetzwolSMOwTn1Vgihmx2tsD+XAz4esrwolSMPxLZK9XGPS+qhQgmSCo2xbBPu3xfqoUIJkhh+yvSPQr3esbwolSOYYUp+UIIrZ8SzbM4L8ecb6pFCC6BNbWw8lSB7wLtt2AX5st74olCDikPWskfRZNSVIi2OKst2+c5P1QaEEEYuH2V7N4Lqv2msrlCDisa5FrqkEUSwIL7E93sDrPW6vqVCC5AaN0l/kVZ+iBGlxfMR2awOuc6u9lkIJkjvcwXagjuc/YK+hUILkEgnVdxeRDfYaCiVIbvEk2546nHePPbdCCZJ7rMvJORVKkEzwBtuOGp5vhz2nQgnSNMBu6uM1OM84Nedu80qQFscY1SYfx2Z7LoUSpOlwH9ubi/j9m/YcCiWIDth1YK4EaUU8z7Z7Ab/bbX+rUII0PdY36DcKJUgu8R7btnkcv83+RqEEaRncwnZkDscdsccqlCAthQrbDXM47gZ7rEIJ0nJ4lO2VE3z/ij1GoQRpWaxb4HcKJUhL4GW2XTN8vst+p1CCtDw+Oc6Y6/hEoQRpCRxm23rcv7fazxRKEIXFXZRuwBDZvxUC4GsIREHflguDkyQqaVYotIulUChBFAoliEKhBFEolCAKhRJEoVCCKBRKEIVCCaJQKJQgCoUSRKFQgigUShCFIhP8vwADACog5YM65zugAAAAAElFTkSuQmCC";
|
|
4611
|
-
var HelloWorld_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
4612
|
-
const _withScopeId = (n) => (pushScopeId("data-v-5835f392"), n = n(), popScopeId(), n);
|
|
4613
|
-
const _hoisted_1$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", null, [
|
|
4614
|
-
/* @__PURE__ */ createTextVNode(" Recommended IDE setup: "),
|
|
4615
|
-
/* @__PURE__ */ createBaseVNode("a", {
|
|
4616
|
-
href: "https://code.visualstudio.com/",
|
|
4617
|
-
target: "_blank"
|
|
4618
|
-
}, "VSCode"),
|
|
4619
|
-
/* @__PURE__ */ createTextVNode(" + "),
|
|
4620
|
-
/* @__PURE__ */ createBaseVNode("a", {
|
|
4621
|
-
href: "https://github.com/johnsoncodehk/volar",
|
|
4622
|
-
target: "_blank"
|
|
4623
|
-
}, "Volar")
|
|
4624
|
-
], -1));
|
|
4625
|
-
const _hoisted_2$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", null, [
|
|
4626
|
-
/* @__PURE__ */ createTextVNode("See "),
|
|
4627
|
-
/* @__PURE__ */ createBaseVNode("code", null, "README.md"),
|
|
4628
|
-
/* @__PURE__ */ createTextVNode(" for more information.")
|
|
4629
|
-
], -1));
|
|
4630
|
-
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", null, [
|
|
4631
|
-
/* @__PURE__ */ createBaseVNode("a", {
|
|
4632
|
-
href: "https://vitejs.dev/guide/features.html",
|
|
4633
|
-
target: "_blank"
|
|
4634
|
-
}, " Vite Docs "),
|
|
4635
|
-
/* @__PURE__ */ createTextVNode(" | "),
|
|
4636
|
-
/* @__PURE__ */ createBaseVNode("a", {
|
|
4637
|
-
href: "https://v3.vuejs.org/",
|
|
4638
|
-
target: "_blank"
|
|
4639
|
-
}, "Vue 3 Docs")
|
|
4640
|
-
], -1));
|
|
4641
|
-
const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("p", null, [
|
|
4642
|
-
/* @__PURE__ */ createTextVNode(" Edit "),
|
|
4643
|
-
/* @__PURE__ */ createBaseVNode("code", null, "components/HelloWorld.vue"),
|
|
4644
|
-
/* @__PURE__ */ createTextVNode(" to test hot module replacement. ")
|
|
4645
|
-
], -1));
|
|
4646
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
4647
|
-
props: {
|
|
4648
|
-
msg: null
|
|
4649
|
-
},
|
|
4650
|
-
setup(__props) {
|
|
4651
|
-
const count = ref(0);
|
|
4652
|
-
return (_ctx, _cache) => {
|
|
4653
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
4654
|
-
createBaseVNode("h1", null, toDisplayString(__props.msg), 1),
|
|
4655
|
-
_hoisted_1$2,
|
|
4656
|
-
_hoisted_2$2,
|
|
4657
|
-
_hoisted_3,
|
|
4658
|
-
createBaseVNode("button", {
|
|
4659
|
-
type: "button",
|
|
4660
|
-
onClick: _cache[0] || (_cache[0] = ($event) => count.value++)
|
|
4661
|
-
}, "count is: " + toDisplayString(count.value), 1),
|
|
4662
|
-
_hoisted_4
|
|
4663
|
-
], 64);
|
|
4664
|
-
};
|
|
4665
|
-
}
|
|
4666
|
-
});
|
|
4667
|
-
var HelloWorld = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-5835f392"]]);
|
|
4668
|
-
const _hoisted_1$1 = { class: "ck-button" };
|
|
4669
|
-
const _hoisted_2$1 = /* @__PURE__ */ createTextVNode("ck button");
|
|
4670
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4671
|
-
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
4672
|
-
createBaseVNode("button", {
|
|
4673
|
-
class: normalizeClass($options.computedClass),
|
|
4674
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
|
4675
|
-
}, [
|
|
4676
|
-
_hoisted_2$1,
|
|
4677
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
4678
|
-
], 2)
|
|
4679
|
-
]);
|
|
4680
|
-
}
|
|
4681
|
-
var ckButton_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
4682
|
-
const _sfc_main$1 = {
|
|
4683
|
-
props: {
|
|
4684
|
-
type: { type: String, default: "" },
|
|
4685
|
-
color: { type: String, default: "" },
|
|
4686
|
-
icon: { type: [String, Array], default: "" },
|
|
4687
|
-
"icon-package": { type: String, default: "" },
|
|
4688
|
-
"icon-right": { type: String, default: "" },
|
|
4689
|
-
label: { type: String, default: "" },
|
|
4690
|
-
"label-align": { type: String, default: "" },
|
|
4691
|
-
group: { type: String, default: "" },
|
|
4692
|
-
groupBreak: { type: String, default: "s" },
|
|
4693
|
-
groupVertical: { type: String, default: "" }
|
|
4694
|
-
},
|
|
4695
|
-
computed: {
|
|
4696
|
-
computedClass() {
|
|
4697
|
-
const classList = [];
|
|
4698
|
-
classList.push(functions.getGroupClass(this));
|
|
4699
|
-
if (this.color) {
|
|
4700
|
-
if (this.type === "filled") {
|
|
4701
|
-
classList.push(`ck-component__bg-color--${this.color}`);
|
|
4702
|
-
} else {
|
|
4703
|
-
classList.push(`ck-component__border-color--${this.color}`);
|
|
4704
|
-
}
|
|
4705
|
-
}
|
|
4706
|
-
return classList;
|
|
4707
|
-
}
|
|
4708
|
-
}
|
|
4709
|
-
};
|
|
4710
|
-
var CkButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", render], ["__scopeId", "data-v-2fa6bbca"]]);
|
|
4711
|
-
var App_vue_vue_type_style_index_0_lang = "";
|
|
4712
|
-
const _hoisted_1 = /* @__PURE__ */ createBaseVNode("img", {
|
|
4713
|
-
alt: "Vue logo",
|
|
4714
|
-
src: _imports_0
|
|
4715
|
-
}, null, -1);
|
|
4716
|
-
const _hoisted_2 = /* @__PURE__ */ createTextVNode(" Lisandrito ");
|
|
4717
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4718
|
-
setup(__props) {
|
|
4719
|
-
return (_ctx, _cache) => {
|
|
4720
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
4721
|
-
_hoisted_1,
|
|
4722
|
-
createVNode(HelloWorld, { msg: "Hello Vue 3 + TypeScript + Vite" }),
|
|
4723
|
-
createVNode(CkButton, null, {
|
|
4724
|
-
default: withCtx(() => [
|
|
4725
|
-
_hoisted_2
|
|
4726
|
-
]),
|
|
4727
|
-
_: 1
|
|
4728
|
-
})
|
|
4729
|
-
], 64);
|
|
4730
|
-
};
|
|
4731
|
-
}
|
|
4732
|
-
});
|
|
4733
|
-
const install = function installCleek(app, options) {
|
|
4734
|
-
console.log("arranco paquete");
|
|
4735
|
-
console.log("options", options);
|
|
4736
|
-
Object.entries(components).forEach(([componentName, component]) => {
|
|
4737
|
-
app.component(componentName, component);
|
|
4738
|
-
});
|
|
4739
|
-
};
|
|
4740
|
-
createApp(_sfc_main).mount("#app");
|
|
4741
|
-
export { ckButton as CkButton, install as default };
|
|
1
|
+
import{openBlock as e,createBlock as t,createVNode as n,toDisplayString as o,withScopeId as r,pushScopeId as i,popScopeId as a,mergeProps as s,withKeys as l,withModifiers as d,createCommentVNode as u,Teleport as c,Transition as p,renderSlot as f,markRaw as m,resolveComponent as h,withCtx as v,resolveDynamicComponent as b,Fragment as y,renderList as g,withDirectives as w,vModelRadio as x,vModelCheckbox as O}from"vue";const E={name:"Button",props:{label:{type:String,required:!1,default:void 0},title:{type:String,required:!1,default:void 0},type:{type:String,required:!1,default:"default",validator:e=>["default","outlined","text"].includes(e)},disabled:{type:Boolean,required:!1,default:!1}},emits:["click"],computed:{buttonClassObject(){return{"is-default":"default"===this.type,"is-outlined":"outlined"===this.type,"is-text":"text"===this.type}}},methods:{onClick(e){this.$emit("click",e)}}},C=r("data-v-aac8ab02")(((r,i,a,s,l,d)=>(e(),t("button",{class:d.buttonClassObject,type:"button",title:a.title,"aria-label":a.title,disabled:a.disabled,onClick:i[1]||(i[1]=e=>d.onClick(e))},[n("span",null,o(a.label),1)],10,["title","aria-label","disabled"]))));E.render=C,E.__scopeId="data-v-aac8ab02";const k={name:"Checkbox",props:{modelValue:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue"],data(){return{state:this.modelValue}},computed:{checkboxAttributes(){return{"aria-disabled":this.disabled,tabindex:this.disabled?void 0:"0"}}},watch:{modelValue(e){this.state=e},state(e){this.$emit("update:modelValue",e)}},methods:{onTrigger(){this.state=!this.state}}},S=r("data-v-83256a4a");i("data-v-83256a4a");const A=n("div",{class:"c-Checkbox__element"},null,-1),T={key:0,class:"c-Checkbox__label"};a();const _=S(((r,i,a,c,p,f)=>(e(),t("label",s({class:"c-Checkbox"},f.checkboxAttributes,{onKeydown:i[2]||(i[2]=l(d((()=>{}),["prevent"]),["space"])),onKeyup:[i[3]||(i[3]=l((e=>f.onTrigger()),["enter"])),i[4]||(i[4]=l((e=>f.onTrigger()),["space"]))]}),[n("input",{"aria-hidden":"true",class:"c-Checkbox__input",type:"checkbox",disabled:a.disabled,checked:p.state,onChange:i[1]||(i[1]=e=>p.state=e.target.checked)},null,40,["disabled","checked"]),A,a.label?(e(),t("span",T,o(a.label),1)):u("",!0)],16))));k.render=_,k.__scopeId="data-v-83256a4a";const L={name:"Input",props:{modelValue:{type:String,required:!1,default:void 0},label:{type:String,required:!1,default:void 0},placeholder:{type:String,required:!1,default:void 0},name:{type:String,required:!1,default:void 0},required:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue"],data(){return{text:this.modelValue}},computed:{inputClassObject(){const e=""!==this.text&&void 0!==this.text,t=""!==this.placeholder&&void 0!==this.placeholder;return{"has-value":e||t,"has-label":""!==this.label&&void 0!==this.label}}},watch:{modelValue(e){this.text=e},text(e){this.$emit("update:modelValue",e)}},methods:{onLabelClick(){this.$refs.input.focus()}}},D=r("data-v-3dca19c0")(((r,i,a,s,l,u)=>(e(),t("div",{class:["c-Input",u.inputClassObject]},[n("input",{ref:"input",class:"c-Input__input",type:"text",value:l.text,name:a.name,required:a.required,disabled:a.disabled,"aria-label":a.label,placeholder:a.placeholder,onInput:i[1]||(i[1]=e=>l.text=e.target.value)},null,40,["value","name","required","disabled","aria-label","placeholder"]),n("span",{class:"c-Input__label",title:a.label,onMousedown:i[2]||(i[2]=d((e=>u.onLabelClick(e)),["prevent"]))},o(a.label),41,["title"])],2))));L.render=D,L.__scopeId="data-v-3dca19c0";const M={name:"Link",props:{label:{type:String,required:!0},title:{type:String,default:null,required:!1},href:{type:String,default:null,required:!1},openOnNewTab:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1}},emits:["click"],computed:{linkAttributes(){return{title:this.title?this.title:this.label,href:this.disabled?void 0:this.href,rel:this.openOnNewTab?"noopener noreferrer":void 0,target:this.openOnNewTab?"_blank":void 0,"aria-disabled":this.disabled,tabindex:this.disabled?void 0:"0"}}},methods:{onClick(){this.disabled||this.$emit("click")}}},q=r("data-v-e0d33712");i("data-v-e0d33712");const j={class:"c-Link__label"};a();const V=q(((r,i,a,u,c,p)=>(e(),t("a",s({class:"c-Link"},p.linkAttributes,{onClick:i[1]||(i[1]=e=>p.onClick()),onKeydown:i[2]||(i[2]=l(d((()=>{}),["prevent"]),["space"])),onKeyup:[i[3]||(i[3]=l((e=>p.onClick()),["enter"])),i[4]||(i[4]=l((e=>p.onClick()),["space"]))]}),[n("span",j,o(a.label),1)],16))));M.render=V,M.__scopeId="data-v-e0d33712";
|
|
2
|
+
/*!
|
|
3
|
+
* tabbable 5.2.0
|
|
4
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
5
|
+
*/
|
|
6
|
+
var I=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"].join(","),B="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,N=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:"AUDIO"!==e.nodeName&&"VIDEO"!==e.nodeName&&"DETAILS"!==e.nodeName||null!==e.getAttribute("tabindex")?e.tabIndex:0:t},P=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},R=function(e){return"INPUT"===e.tagName},$=function(e){return function(e){return R(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||e.ownerDocument,o=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=o(window.CSS.escape(e.name));else try{t=o(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var r=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!r||r===e}(e)},W=function(e,t){return!(t.disabled||function(e){return R(e)&&"hidden"===e.type}(t)||function(e,t){if("hidden"===getComputedStyle(e).visibility)return!0;var n=B.call(e,"details>summary:first-of-type")?e.parentElement:e;if(B.call(n,"details:not([open]) *"))return!0;if(t&&"full"!==t){if("non-zero-area"===t){var o=e.getBoundingClientRect(),r=o.width,i=o.height;return 0===r&&0===i}}else for(;e;){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(t,e.displayCheck)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t))},H=function(e,t){return!(!W(e,t)||$(t)||N(t)<0)},K=function(e,t){var n=[],o=[];return function(e,t,n){var o=Array.prototype.slice.apply(e.querySelectorAll(I));return t&&B.call(e,I)&&o.unshift(e),o.filter(n)}(e,(t=t||{}).includeContainer,H.bind(null,t)).forEach((function(e,t){var r=N(e);0===r?n.push(e):o.push({documentOrder:t,tabIndex:r,node:e})})),o.sort(P).map((function(e){return e.node})).concat(n)};let U;const z={name:"Modal",props:{isOpen:{type:Boolean,default:!1,required:!1}},emits:["close"],methods:{beforeModalOpen(){U=document.activeElement,xn()},modalOpening(){this.focusModal(),document.addEventListener("keydown",this.handleKeyDown)},beforeModalClose(){document.removeEventListener("keydown",this.handleKeyDown),null==U||U.focus()},afterModalClose(){On()},getFocusableElements(){return K(this.$refs.modal)},focusModal(){const e=this.getFocusableElements();if(!e.length)return void this.$refs.modal.focus();e[0].focus()},handleKeyDown(e){if(27!==e.keyCode){if(9===e.keyCode){const t=this.getFocusableElements();if(!t.length)return e.preventDefault(),void this.$refs.modal.focus();const n=t[0],o=t[t.length-1];e.shiftKey&&document.activeElement===n&&(e.preventDefault(),o.focus()),e.shiftKey||document.activeElement!==o||(e.preventDefault(),n.focus())}}else this.$emit("close")}}},F=r("data-v-2dd42ae5");i("data-v-2dd42ae5");const Y={key:0,ref:"modal",css:!1,class:"c-Modal",role:"dialog",tabindex:"0","aria-modal":"true"};a();const X=F(((o,r,i,a,s,l)=>(e(),t(c,{to:"body"},[n(p,{name:"fade"},{default:F((()=>[i.isOpen?(e(),t("div",{key:0,css:!1,class:"c-Modal__overlay",onClick:r[1]||(r[1]=e=>o.$emit("close"))})):u("",!0)])),_:1}),n(p,{name:"fade",onBeforeEnter:r[2]||(r[2]=e=>l.beforeModalOpen()),onEnter:r[3]||(r[3]=e=>l.modalOpening()),onBeforeLeave:r[4]||(r[4]=e=>l.beforeModalClose()),onAfterLeave:r[5]||(r[5]=e=>l.afterModalClose())},{default:F((()=>[i.isOpen?(e(),t("div",Y,[f(o.$slots,"default",{},void 0,!0)],512)):u("",!0)])),_:3})]))));z.render=X,z.__scopeId="data-v-2dd42ae5";const J={components:{Modal:z},data:()=>({component:null,props:null}),created(){dn.on(sn.OPEN_MODAL,(({component:e,props:t=null})=>{this.component=m(e),this.props=t})),dn.on(sn.CLOSE_MODAL,this.handleClose),document.addEventListener("keyup",this.handleKeyup)},beforeUnmount(){document.removeEventListener("keyup",this.handleKeyup)},methods:{handleClose(){this.component=null},handleKeyup(e){27===e.keyCode&&this.handleClose()}}};J.render=function(n,o,r,i,a,l){const d=h("Modal");return e(),t(d,{"is-open":Boolean(a.component),onClose:l.handleClose},{default:v((()=>[(e(),t(b(a.component),s(a.props,{onClose:l.handleClose}),null,16,["onClose"]))])),_:1},8,["is-open","onClose"])};const G={name:"Progress",props:{value:{type:[Number,String],required:!1,default:0},max:{type:[Number,String],required:!1,default:100}},computed:{progressPercentage(){const e=Number(this.value),t=Number(this.max);return Number.isNaN(e)||Number.isNaN(t)?0:Math.round(e/t*100)}}},Q=r("data-v-2cdb6fda");i("data-v-2cdb6fda");const Z=n("div",{class:"c-Progress__background"},null,-1);a();const ee=Q(((o,r,i,a,s,l)=>(e(),t("div",{class:"c-Progress",role:"progressbar",title:`${l.progressPercentage}%`,"aria-valuemin":"0","aria-valuemax":i.max,"aria-valuenow":i.value},[Z,n("div",{class:"c-Progress__fill",style:`width: ${l.progressPercentage}%`},null,4)],8,["title","aria-valuemax","aria-valuenow"]))));G.render=ee,G.__scopeId="data-v-2cdb6fda";const te={name:"Radio",props:{modelValue:{type:String,required:!1,default:void 0},name:{type:String,required:!0},items:{type:Array,required:!0,validator:e=>{let t=!0;return e.forEach((e=>{t=t&&"label"in e&&"value"in e})),t}},disabled:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue"],data(){return{selectedValue:this.modelValue}},computed:{radioAttributes(){return{"aria-disabled":this.disabled,tabindex:this.disabled?void 0:"0"}}},watch:{modelValue(e){this.selectedValue=e},selectedValue(e){this.$emit("update:modelValue",e)}},methods:{handleChange(e){this.selectedValue=e}}},ne=r("data-v-f5c0a1ba");i("data-v-f5c0a1ba");const oe=n("div",{class:"c-Radio__element"},null,-1),re={key:0,class:"c-Radio__label"};a();const ie=ne(((r,i,a,c,p,f)=>(e(!0),t(y,null,g(a.items,((r,c)=>(e(),t("label",s({key:`radio-${c}`,class:"c-Radio"},f.radioAttributes,{onKeydown:i[2]||(i[2]=l(d((()=>{}),["prevent"]),["space"])),onKeyup:[l((e=>f.handleChange(r.value)),["enter"]),l((e=>f.handleChange(r.value)),["space"])]}),[w(n("input",{"onUpdate:modelValue":i[1]||(i[1]=e=>p.selectedValue=e),"aria-hidden":"true",class:"c-Radio__input",type:"radio",name:a.name,value:r.value,disabled:a.disabled},null,8,["name","value","disabled"]),[[x,p.selectedValue]]),oe,r.label?(e(),t("span",re,o(r.label),1)):u("",!0)],16,["onKeyup"])))),128))));te.render=ie,te.__scopeId="data-v-f5c0a1ba";let ae;const se={name:"Sidebar",props:{isOpen:{type:Boolean,default:!1,required:!1},position:{type:String,required:!1,default:"right",validator:e=>["right","left"].includes(e)}},emits:["close"],computed:{sidebarClassObject(){return{"is-right":"right"===this.position,"is-left":"left"===this.position}},slideAnimation(){return"right"===this.position?"slideFromRight":"slideFromLeft"}},methods:{beforeSidebarOpen(){ae=document.activeElement,xn()},sidebarOpening(){this.focusSidebar(),document.addEventListener("keydown",this.handleKeyDown)},beforeSidebarClose(){document.removeEventListener("keydown",this.handleKeyDown),null==ae||ae.focus()},afterSidebarClose(){On()},getFocusableElements(){return K(this.$refs.sidebar)},focusSidebar(){const e=this.getFocusableElements();if(!e.length)return void this.$refs.sidebar.focus();e[0].focus()},handleKeyDown(e){if(27!==e.keyCode){if(9===e.keyCode){const t=this.getFocusableElements();if(!t.length)return e.preventDefault(),void this.$refs.sidebar.focus();const n=t[0],o=t[t.length-1];e.shiftKey&&document.activeElement===n&&(e.preventDefault(),o.focus()),e.shiftKey||document.activeElement!==o||(e.preventDefault(),n.focus())}}else this.$emit("close")}}},le=r("data-v-9a90bade"),de=le(((o,r,i,a,s,l)=>(e(),t(y,null,[n(p,{name:"fade"},{default:le((()=>[i.isOpen?(e(),t("div",{key:0,css:!1,class:"c-Sidebar__overlay",onClick:r[1]||(r[1]=e=>o.$emit("close"))})):u("",!0)])),_:1}),n(p,{name:l.slideAnimation,onBeforeEnter:r[2]||(r[2]=e=>l.beforeSidebarOpen()),onEnter:r[3]||(r[3]=e=>l.sidebarOpening()),onBeforeLeave:r[4]||(r[4]=e=>l.beforeSidebarClose()),onAfterLeave:r[5]||(r[5]=e=>l.afterSidebarClose())},{default:le((()=>[i.isOpen?(e(),t("div",{key:0,ref:"sidebar",css:!1,class:["c-Sidebar",l.sidebarClassObject],role:"dialog",tabindex:"0"},[f(o.$slots,"default",{},void 0,!0)],2)):u("",!0)])),_:3},8,["name"])],64))));se.render=de,se.__scopeId="data-v-9a90bade";const ue={components:{Sidebar:se},data:()=>({component:null,props:null}),created(){dn.on(sn.OPEN_SIDEBAR,(({component:e,props:t=null})=>{this.component=m(e),this.props=t})),dn.on(sn.CLOSE_SIDEBAR,this.handleClose),document.addEventListener("keyup",this.handleKeyup)},beforeUnmount(){document.removeEventListener("keyup",this.handleKeyup)},methods:{handleClose(){this.component=null},handleKeyup(e){27===e.keyCode&&this.handleClose()}}};ue.render=function(n,o,r,i,a,l){const d=h("Sidebar");return e(),t(d,{"is-open":Boolean(a.component),onClose:l.handleClose},{default:v((()=>[(e(),t(b(a.component),s(a.props,{onClose:l.handleClose}),null,16,["onClose"]))])),_:1},8,["is-open","onClose"])};const ce={name:"Switch",props:{modelValue:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue"],data(){return{state:this.modelValue}},computed:{switchAttributes(){return{"aria-disabled":this.disabled,tabindex:this.disabled?void 0:"0"}}},watch:{modelValue(e){this.state=e},state(e){this.$emit("update:modelValue",e)}},methods:{onTrigger(){this.state=!this.state}}},pe=r("data-v-5fdb3c44");i("data-v-5fdb3c44");const fe=n("div",{class:"c-Switch__slider"},null,-1),me={key:0,class:"c-Switch__label"};a();const he=pe(((r,i,a,c,p,f)=>(e(),t("label",s({class:"c-Switch"},f.switchAttributes,{onKeydown:i[3]||(i[3]=l(d((()=>{}),["prevent"]),["space"])),onKeyup:[i[4]||(i[4]=l((e=>f.onTrigger()),["enter"])),i[5]||(i[5]=l((e=>f.onTrigger()),["space"]))]}),[w(n("input",{"onUpdate:modelValue":i[1]||(i[1]=e=>p.state=e),"aria-hidden":"true",class:"c-Switch__input",type:"checkbox",disabled:a.disabled,onClick:i[2]||(i[2]=e=>f.onTrigger())},null,8,["disabled"]),[[O,p.state]]),fe,a.label?(e(),t("span",me,o(a.label),1)):u("",!0)],16))));ce.render=he,ce.__scopeId="data-v-5fdb3c44";const ve={name:"Textarea",props:{modelValue:{type:String,required:!1,default:void 0},label:{type:String,required:!1,default:void 0},placeholder:{type:String,required:!1,default:void 0},name:{type:String,required:!1,default:void 0},autogrow:{type:Boolean,required:!1,default:!1},required:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},resize:{type:String,required:!1,default:"default",validator:e=>["default","vertical","horizontal","none"].includes(e)}},emits:["update:modelValue"],data(){return{text:this.modelValue}},computed:{textareaClassObject(){const e=""!==this.text&&void 0!==this.text,t=""!==this.placeholder&&void 0!==this.placeholder;return{"has-value":e||t,"has-label":""!==this.label&&void 0!==this.label,"has-vertical-resize":"vertical"===this.resize&&!this.autogrow,"has-horizontal-resize":"horizontal"===this.resize&&!this.autogrow,"has-no-resize":"none"===this.resize,"has-autogrow":this.autogrow}}},watch:{modelValue(e){this.text=e},text(e){this.autogrow&&(this.$el.dataset.replicatedText=e),this.$emit("update:modelValue",e)}},methods:{onLabelClick(){this.$refs.textarea.focus()}}},be=r("data-v-254cb4bb")(((r,i,a,s,l,u)=>(e(),t("div",{class:["c-Textarea",u.textareaClassObject]},[n("textarea",{ref:"textarea",class:"c-Textarea__input",value:l.text,name:a.name,required:a.required,disabled:a.disabled,"aria-label":a.label,placeholder:a.placeholder,onInput:i[1]||(i[1]=e=>l.text=e.target.value)},null,40,["value","name","required","disabled","aria-label","placeholder"]),n("span",{class:"c-Textarea__label",title:a.label,onMousedown:i[2]||(i[2]=d((e=>u.onLabelClick(e)),["prevent"]))},o(a.label),41,["title"])],2))));ve.render=be,ve.__scopeId="data-v-254cb4bb";var ye="top",ge="bottom",we="right",xe="left",Oe=[ye,ge,we,xe],Ee=Oe.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),Ce=[].concat(Oe,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),ke=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Se(e){return e?(e.nodeName||"").toLowerCase():null}function Ae(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Te(e){return e instanceof Ae(e).Element||e instanceof Element}function _e(e){return e instanceof Ae(e).HTMLElement||e instanceof HTMLElement}function Le(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Ae(e).ShadowRoot||e instanceof ShadowRoot)}var De={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];_e(r)&&Se(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});_e(o)&&Se(o)&&(Object.assign(o.style,i),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};function Me(e){return e.split("-")[0]}function qe(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function je(e){var t=qe(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function Ve(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Le(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Ie(e){return Ae(e).getComputedStyle(e)}function Be(e){return["table","td","th"].indexOf(Se(e))>=0}function Ne(e){return((Te(e)?e.ownerDocument:e.document)||window.document).documentElement}function Pe(e){return"html"===Se(e)?e:e.assignedSlot||e.parentNode||(Le(e)?e.host:null)||Ne(e)}function Re(e){return _e(e)&&"fixed"!==Ie(e).position?e.offsetParent:null}function $e(e){for(var t=Ae(e),n=Re(e);n&&Be(n)&&"static"===Ie(n).position;)n=Re(n);return n&&("html"===Se(n)||"body"===Se(n)&&"static"===Ie(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&_e(e)&&"fixed"===Ie(e).position)return null;for(var n=Pe(e);_e(n)&&["html","body"].indexOf(Se(n))<0;){var o=Ie(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function We(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var He=Math.max,Ke=Math.min,Ue=Math.round;function ze(e,t,n){return He(e,Ke(t,n))}function Fe(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Ye(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Xe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Je(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.offsets,a=e.position,s=e.gpuAcceleration,l=e.adaptive,d=e.roundOffsets,u=!0===d?function(e){var t=e.x,n=e.y,o=window.devicePixelRatio||1;return{x:Ue(Ue(t*o)/o)||0,y:Ue(Ue(n*o)/o)||0}}(i):"function"==typeof d?d(i):i,c=u.x,p=void 0===c?0:c,f=u.y,m=void 0===f?0:f,h=i.hasOwnProperty("x"),v=i.hasOwnProperty("y"),b=xe,y=ye,g=window;if(l){var w=$e(n),x="clientHeight",O="clientWidth";w===Ae(n)&&"static"!==Ie(w=Ne(n)).position&&(x="scrollHeight",O="scrollWidth"),w=w,r===ye&&(y=ge,m-=w[x]-o.height,m*=s?1:-1),r===xe&&(b=we,p-=w[O]-o.width,p*=s?1:-1)}var E,C=Object.assign({position:a},l&&Xe);return s?Object.assign({},C,((E={})[y]=v?"0":"",E[b]=h?"0":"",E.transform=(g.devicePixelRatio||1)<2?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",E)):Object.assign({},C,((t={})[y]=v?m+"px":"",t[b]=h?p+"px":"",t.transform="",t))}var Ge={passive:!0};var Qe={left:"right",right:"left",bottom:"top",top:"bottom"};function Ze(e){return e.replace(/left|right|bottom|top/g,(function(e){return Qe[e]}))}var et={start:"end",end:"start"};function tt(e){return e.replace(/start|end/g,(function(e){return et[e]}))}function nt(e){var t=Ae(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ot(e){return qe(Ne(e)).left+nt(e).scrollLeft}function rt(e){var t=Ie(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function it(e){return["html","body","#document"].indexOf(Se(e))>=0?e.ownerDocument.body:_e(e)&&rt(e)?e:it(Pe(e))}function at(e,t){var n;void 0===t&&(t=[]);var o=it(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=Ae(o),a=r?[i].concat(i.visualViewport||[],rt(o)?o:[]):o,s=t.concat(a);return r?s:s.concat(at(Pe(a)))}function st(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function lt(e,t){return"viewport"===t?st(function(e){var t=Ae(e),n=Ne(e),o=t.visualViewport,r=n.clientWidth,i=n.clientHeight,a=0,s=0;return o&&(r=o.width,i=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=o.offsetLeft,s=o.offsetTop)),{width:r,height:i,x:a+ot(e),y:s}}(e)):_e(t)?function(e){var t=qe(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):st(function(e){var t,n=Ne(e),o=nt(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=He(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=He(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-o.scrollLeft+ot(e),l=-o.scrollTop;return"rtl"===Ie(r||n).direction&&(s+=He(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(Ne(e)))}function dt(e,t,n){var o="clippingParents"===t?function(e){var t=at(Pe(e)),n=["absolute","fixed"].indexOf(Ie(e).position)>=0&&_e(e)?$e(e):e;return Te(n)?t.filter((function(e){return Te(e)&&Ve(e,n)&&"body"!==Se(e)})):[]}(e):[].concat(t),r=[].concat(o,[n]),i=r[0],a=r.reduce((function(t,n){var o=lt(e,n);return t.top=He(o.top,t.top),t.right=Ke(o.right,t.right),t.bottom=Ke(o.bottom,t.bottom),t.left=He(o.left,t.left),t}),lt(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ut(e){return e.split("-")[1]}function ct(e){var t,n=e.reference,o=e.element,r=e.placement,i=r?Me(r):null,a=r?ut(r):null,s=n.x+n.width/2-o.width/2,l=n.y+n.height/2-o.height/2;switch(i){case ye:t={x:s,y:n.y-o.height};break;case ge:t={x:s,y:n.y+n.height};break;case we:t={x:n.x+n.width,y:l};break;case xe:t={x:n.x-o.width,y:l};break;default:t={x:n.x,y:n.y}}var d=i?We(i):null;if(null!=d){var u="y"===d?"height":"width";switch(a){case"start":t[d]=t[d]-(n[u]/2-o[u]/2);break;case"end":t[d]=t[d]+(n[u]/2-o[u]/2)}}return t}function pt(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=void 0===o?e.placement:o,i=n.boundary,a=void 0===i?"clippingParents":i,s=n.rootBoundary,l=void 0===s?"viewport":s,d=n.elementContext,u=void 0===d?"popper":d,c=n.altBoundary,p=void 0!==c&&c,f=n.padding,m=void 0===f?0:f,h=Fe("number"!=typeof m?m:Ye(m,Oe)),v="popper"===u?"reference":"popper",b=e.elements.reference,y=e.rects.popper,g=e.elements[p?v:u],w=dt(Te(g)?g:g.contextElement||Ne(e.elements.popper),a,l),x=qe(b),O=ct({reference:x,element:y,strategy:"absolute",placement:r}),E=st(Object.assign({},y,O)),C="popper"===u?E:x,k={top:w.top-C.top+h.top,bottom:C.bottom-w.bottom+h.bottom,left:w.left-C.left+h.left,right:C.right-w.right+h.right},S=e.modifiersData.offset;if("popper"===u&&S){var A=S[r];Object.keys(k).forEach((function(e){var t=[we,ge].indexOf(e)>=0?1:-1,n=[ye,ge].indexOf(e)>=0?"y":"x";k[e]+=A[n]*t}))}return k}function ft(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function mt(e){return[ye,we,ge,xe].some((function(t){return e[t]>=0}))}function ht(e,t,n){void 0===n&&(n=!1);var o,r,i=Ne(t),a=qe(e),s=_e(t),l={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(s||!s&&!n)&&(("body"!==Se(t)||rt(i))&&(l=(o=t)!==Ae(o)&&_e(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:nt(o)),_e(t)?((d=qe(t)).x+=t.clientLeft,d.y+=t.clientTop):i&&(d.x=ot(i))),{x:a.left+l.scrollLeft-d.x,y:a.top+l.scrollTop-d.y,width:a.width,height:a.height}}function vt(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),o}var bt={placement:"bottom",modifiers:[],strategy:"absolute"};function yt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function gt(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,o=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?bt:r;return function(e,t,n){void 0===n&&(n=i);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},bt,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],d=!1,u={state:s,setOptions:function(n){c(),s.options=Object.assign({},i,s.options,n),s.scrollParents={reference:Te(e)?at(e):e.contextElement?at(e.contextElement):[],popper:at(t)};var r,a,d=function(e){var t=vt(e);return ke.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((r=[].concat(o,s.options.modifiers),a=r.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(a).map((function(e){return a[e]}))));return s.orderedModifiers=d.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,o=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var i=r({state:s,name:t,instance:u,options:o}),a=function(){};l.push(i||a)}})),u.update()},forceUpdate:function(){if(!d){var e=s.elements,t=e.reference,n=e.popper;if(yt(t,n)){s.rects={reference:ht(t,$e(n),"fixed"===s.options.strategy),popper:je(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var o=0;o<s.orderedModifiers.length;o++)if(!0!==s.reset){var r=s.orderedModifiers[o],i=r.fn,a=r.options,l=void 0===a?{}:a,c=r.name;"function"==typeof i&&(s=i({state:s,options:l,name:c,instance:u})||s)}else s.reset=!1,o=-1}}},update:(r=function(){return new Promise((function(e){u.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(r())}))}))),a}),destroy:function(){c(),d=!0}};if(!yt(e,t))return u;function c(){l.forEach((function(e){return e()})),l=[]}return u.setOptions(n).then((function(e){!d&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var wt=gt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=void 0===r||r,a=o.resize,s=void 0===a||a,l=Ae(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&d.forEach((function(e){e.addEventListener("scroll",n.update,Ge)})),s&&l.addEventListener("resize",n.update,Ge),function(){i&&d.forEach((function(e){e.removeEventListener("scroll",n.update,Ge)})),s&&l.removeEventListener("resize",n.update,Ge)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ct({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,d={placement:Me(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Je(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Je(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},De,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=void 0===r?[0,0]:r,a=Ce.reduce((function(e,n){return e[n]=function(e,t,n){var o=Me(e),r=[xe,ye].indexOf(o)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*r,[xe,we].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,d=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=d),t.modifiersData[o]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=void 0===r||r,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,d=n.padding,u=n.boundary,c=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,m=void 0===f||f,h=n.allowedAutoPlacements,v=t.options.placement,b=Me(v),y=l||(b===v||!m?[Ze(v)]:function(e){if("auto"===Me(e))return[];var t=Ze(e);return[tt(e),t,tt(t)]}(v)),g=[v].concat(y).reduce((function(e,n){return e.concat("auto"===Me(n)?function(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,d=void 0===l?Ce:l,u=ut(o),c=u?s?Ee:Ee.filter((function(e){return ut(e)===u})):Oe,p=c.filter((function(e){return d.indexOf(e)>=0}));0===p.length&&(p=c);var f=p.reduce((function(t,n){return t[n]=pt(e,{placement:n,boundary:r,rootBoundary:i,padding:a})[Me(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:c,padding:d,flipVariations:m,allowedAutoPlacements:h}):n)}),[]),w=t.rects.reference,x=t.rects.popper,O=new Map,E=!0,C=g[0],k=0;k<g.length;k++){var S=g[k],A=Me(S),T="start"===ut(S),_=[ye,ge].indexOf(A)>=0,L=_?"width":"height",D=pt(t,{placement:S,boundary:u,rootBoundary:c,altBoundary:p,padding:d}),M=_?T?we:xe:T?ge:ye;w[L]>x[L]&&(M=Ze(M));var q=Ze(M),j=[];if(i&&j.push(D[A]<=0),s&&j.push(D[M]<=0,D[q]<=0),j.every((function(e){return e}))){C=S,E=!1;break}O.set(S,j)}if(E)for(var V=function(e){var t=g.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},I=m?3:1;I>0;I--){if("break"===V(I))break}t.placement!==C&&(t.modifiersData[o]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=void 0===r||r,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,d=n.rootBoundary,u=n.altBoundary,c=n.padding,p=n.tether,f=void 0===p||p,m=n.tetherOffset,h=void 0===m?0:m,v=pt(t,{boundary:l,rootBoundary:d,padding:c,altBoundary:u}),b=Me(t.placement),y=ut(t.placement),g=!y,w=We(b),x="x"===w?"y":"x",O=t.modifiersData.popperOffsets,E=t.rects.reference,C=t.rects.popper,k="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,S={x:0,y:0};if(O){if(i||s){var A="y"===w?ye:xe,T="y"===w?ge:we,_="y"===w?"height":"width",L=O[w],D=O[w]+v[A],M=O[w]-v[T],q=f?-C[_]/2:0,j="start"===y?E[_]:C[_],V="start"===y?-C[_]:-E[_],I=t.elements.arrow,B=f&&I?je(I):{width:0,height:0},N=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},P=N[A],R=N[T],$=ze(0,E[_],B[_]),W=g?E[_]/2-q-$-P-k:j-$-P-k,H=g?-E[_]/2+q+$+R+k:V+$+R+k,K=t.elements.arrow&&$e(t.elements.arrow),U=K?"y"===w?K.clientTop||0:K.clientLeft||0:0,z=t.modifiersData.offset?t.modifiersData.offset[t.placement][w]:0,F=O[w]+W-z-U,Y=O[w]+H-z;if(i){var X=ze(f?Ke(D,F):D,L,f?He(M,Y):M);O[w]=X,S[w]=X-L}if(s){var J="x"===w?ye:xe,G="x"===w?ge:we,Q=O[x],Z=Q+v[J],ee=Q-v[G],te=ze(f?Ke(Z,F):Z,Q,f?He(ee,Y):ee);O[x]=te,S[x]=te-Q}}t.modifiersData[o]=S}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Me(n.placement),l=We(s),d=[xe,we].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return Fe("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Ye(e,Oe))}(r.padding,n),c=je(i),p="y"===l?ye:xe,f="y"===l?ge:we,m=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],h=a[l]-n.rects.reference[l],v=$e(i),b=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,y=m/2-h/2,g=u[p],w=b-c[d]-u[f],x=b/2-c[d]/2+y,O=ze(g,x,w),E=l;n.modifiersData[o]=((t={})[E]=O,t.centerOffset=O-x,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&Ve(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=pt(t,{elementContext:"reference"}),s=pt(t,{altBoundary:!0}),l=ft(a,o),d=ft(s,r,i),u=mt(l),c=mt(d);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:c},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":c})}}]}),xt={passive:!0,capture:!0};function Ot(e,t,n){if(Array.isArray(e)){var o=e[t];return null==o?Array.isArray(n)?n[t]:n:o}return e}function Et(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Ct(e,t){return"function"==typeof e?e.apply(void 0,t):e}function kt(e,t){return 0===t?e:function(o){clearTimeout(n),n=setTimeout((function(){e(o)}),t)};var n}function St(e){return[].concat(e)}function At(e,t){-1===e.indexOf(t)&&e.push(t)}function Tt(e){return[].slice.call(e)}function _t(){return document.createElement("div")}function Lt(e){return["Element","Fragment"].some((function(t){return Et(e,t)}))}function Dt(e){return Lt(e)?[e]:function(e){return Et(e,"NodeList")}(e)?Tt(e):Array.isArray(e)?e:Tt(document.querySelectorAll(e))}function Mt(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function qt(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function jt(e,t,n){var o=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[o](t,n)}))}var Vt={isTouch:!1},It=0;function Bt(){Vt.isTouch||(Vt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Nt))}function Nt(){var e=performance.now();e-It<20&&(Vt.isTouch=!1,document.removeEventListener("mousemove",Nt)),It=e}function Pt(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Rt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",$t=/MSIE |Trident\//.test(Rt),Wt=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Ht=Object.keys(Wt);function Kt(e){var t=(e.plugins||[]).reduce((function(t,n){var o=n.name,r=n.defaultValue;return o&&(t[o]=void 0!==e[o]?e[o]:r),t}),{});return Object.assign({},e,{},t)}function Ut(e,t){var n=Object.assign({},t,{content:Ct(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Kt(Object.assign({},Wt,{plugins:t}))):Ht).reduce((function(t,n){var o=(e.getAttribute("data-tippy-"+n)||"").trim();if(!o)return t;if("content"===n)t[n]=o;else try{t[n]=JSON.parse(o)}catch(r){t[n]=o}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Wt.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function zt(e,t){e.innerHTML=t}function Ft(e){var t=_t();return!0===e?t.className="tippy-arrow":(t.className="tippy-svg-arrow",Lt(e)?t.appendChild(e):zt(t,e)),t}function Yt(e,t){Lt(t.content)?(zt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?zt(e,t.content):e.textContent=t.content)}function Xt(e){var t=e.firstElementChild,n=Tt(t.children);return{box:t,content:n.find((function(e){return e.classList.contains("tippy-content")})),arrow:n.find((function(e){return e.classList.contains("tippy-arrow")||e.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function Jt(e){var t=_t(),n=_t();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var o=_t();function r(n,o){var r=Xt(t),i=r.box,a=r.content,s=r.arrow;o.theme?i.setAttribute("data-theme",o.theme):i.removeAttribute("data-theme"),"string"==typeof o.animation?i.setAttribute("data-animation",o.animation):i.removeAttribute("data-animation"),o.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof o.maxWidth?o.maxWidth+"px":o.maxWidth,o.role?i.setAttribute("role",o.role):i.removeAttribute("role"),n.content===o.content&&n.allowHTML===o.allowHTML||Yt(a,e.props),o.arrow?s?n.arrow!==o.arrow&&(i.removeChild(s),i.appendChild(Ft(o.arrow))):i.appendChild(Ft(o.arrow)):s&&i.removeChild(s)}return o.className="tippy-content",o.setAttribute("data-state","hidden"),Yt(o,e.props),t.appendChild(n),n.appendChild(o),r(e.props,e.props),{popper:t,onUpdate:r}}Jt.$$tippy=!0;var Gt=1,Qt=[],Zt=[];function en(e,t){var n,o,r,i,a,s,l,d,u,c=Ut(e,Object.assign({},Wt,{},Kt((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),p=!1,f=!1,m=!1,h=!1,v=[],b=kt(Y,c.interactiveDebounce),y=Gt++,g=(u=c.plugins).filter((function(e,t){return u.indexOf(e)===t})),w={id:y,reference:e,popper:_t(),popperInstance:null,props:c,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(o),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){if(w.state.isDestroyed)return;j("onBeforeUpdate",[w,t]),z();var n=w.props,o=Ut(e,Object.assign({},w.props,{},t,{ignoreAttributes:!0}));w.props=o,U(),n.interactiveDebounce!==o.interactiveDebounce&&(B(),b=kt(Y,o.interactiveDebounce));n.triggerTarget&&!o.triggerTarget?St(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):o.triggerTarget&&e.removeAttribute("aria-expanded");I(),q(),E&&E(n,o);w.popperInstance&&(Q(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));j("onAfterUpdate",[w,t])},setContent:function(e){w.setProps({content:e})},show:function(){var e=w.state.isVisible,t=w.state.isDestroyed,n=!w.state.isEnabled,o=Vt.isTouch&&!w.props.touch,r=Ot(w.props.duration,0,Wt.duration);if(e||t||n||o)return;if(_().hasAttribute("disabled"))return;if(j("onShow",[w],!1),!1===w.props.onShow(w))return;w.state.isVisible=!0,T()&&(O.style.visibility="visible");q(),$(),w.state.isMounted||(O.style.transition="none");if(T()){var i=D(),a=i.box,s=i.content;Mt([a,s],0)}l=function(){var e;if(w.state.isVisible&&!h){if(h=!0,O.offsetHeight,O.style.transition=w.props.moveTransition,T()&&w.props.animation){var t=D(),n=t.box,o=t.content;Mt([n,o],r),qt([n,o],"visible")}V(),I(),At(Zt,w),null==(e=w.popperInstance)||e.forceUpdate(),w.state.isMounted=!0,j("onMount",[w]),w.props.animation&&T()&&function(e,t){H(e,t)}(r,(function(){w.state.isShown=!0,j("onShown",[w])}))}},function(){var e,t=w.props.appendTo,n=_();e=w.props.interactive&&t===Wt.appendTo||"parent"===t?n.parentNode:Ct(t,[n]);e.contains(O)||e.appendChild(O);Q()}()},hide:function(){var e=!w.state.isVisible,t=w.state.isDestroyed,n=!w.state.isEnabled,o=Ot(w.props.duration,1,Wt.duration);if(e||t||n)return;if(j("onHide",[w],!1),!1===w.props.onHide(w))return;w.state.isVisible=!1,w.state.isShown=!1,h=!1,p=!1,T()&&(O.style.visibility="hidden");if(B(),W(),q(),T()){var r=D(),i=r.box,a=r.content;w.props.animation&&(Mt([i,a],o),qt([i,a],"hidden"))}V(),I(),w.props.animation?T()&&function(e,t){H(e,(function(){!w.state.isVisible&&O.parentNode&&O.parentNode.contains(O)&&t()}))}(o,w.unmount):w.unmount()},hideWithInteractivity:function(e){L().addEventListener("mousemove",b),At(Qt,b),b(e)},enable:function(){w.state.isEnabled=!0},disable:function(){w.hide(),w.state.isEnabled=!1},unmount:function(){w.state.isVisible&&w.hide();if(!w.state.isMounted)return;Z(),ee().forEach((function(e){e._tippy.unmount()})),O.parentNode&&O.parentNode.removeChild(O);Zt=Zt.filter((function(e){return e!==w})),w.state.isMounted=!1,j("onHidden",[w])},destroy:function(){if(w.state.isDestroyed)return;w.clearDelayTimeouts(),w.unmount(),z(),delete e._tippy,w.state.isDestroyed=!0,j("onDestroy",[w])}};if(!c.render)return w;var x=c.render(w),O=x.popper,E=x.onUpdate;O.setAttribute("data-tippy-root",""),O.id="tippy-"+w.id,w.popper=O,e._tippy=w,O._tippy=w;var C=g.map((function(e){return e.fn(w)})),k=e.hasAttribute("aria-expanded");return U(),I(),q(),j("onCreate",[w]),c.showOnCreate&&te(),O.addEventListener("mouseenter",(function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()})),O.addEventListener("mouseleave",(function(e){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&(L().addEventListener("mousemove",b),b(e))})),w;function S(){var e=w.props.touch;return Array.isArray(e)?e:[e,0]}function A(){return"hold"===S()[0]}function T(){var e;return!!(null==(e=w.props.render)?void 0:e.$$tippy)}function _(){return d||e}function L(){var e,t,n=_().parentNode;return n?(null==(t=St(n)[0])||null==(e=t.ownerDocument)?void 0:e.body)?t.ownerDocument:document:document}function D(){return Xt(O)}function M(e){return w.state.isMounted&&!w.state.isVisible||Vt.isTouch||a&&"focus"===a.type?0:Ot(w.props.delay,e?0:1,Wt.delay)}function q(){O.style.pointerEvents=w.props.interactive&&w.state.isVisible?"":"none",O.style.zIndex=""+w.props.zIndex}function j(e,t,n){var o;(void 0===n&&(n=!0),C.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(o=w.props)[e].apply(o,t)}function V(){var t=w.props.aria;if(t.content){var n="aria-"+t.content,o=O.id;St(w.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(w.state.isVisible)e.setAttribute(n,t?t+" "+o:o);else{var r=t&&t.replace(o,"").trim();r?e.setAttribute(n,r):e.removeAttribute(n)}}))}}function I(){!k&&w.props.aria.expanded&&St(w.props.triggerTarget||e).forEach((function(e){w.props.interactive?e.setAttribute("aria-expanded",w.state.isVisible&&e===_()?"true":"false"):e.removeAttribute("aria-expanded")}))}function B(){L().removeEventListener("mousemove",b),Qt=Qt.filter((function(e){return e!==b}))}function N(e){if(!(Vt.isTouch&&(m||"mousedown"===e.type)||w.props.interactive&&O.contains(e.target))){if(_().contains(e.target)){if(Vt.isTouch)return;if(w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[w,e]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),f=!0,setTimeout((function(){f=!1})),w.state.isMounted||W())}}function P(){m=!0}function R(){m=!1}function $(){var e=L();e.addEventListener("mousedown",N,!0),e.addEventListener("touchend",N,xt),e.addEventListener("touchstart",R,xt),e.addEventListener("touchmove",P,xt)}function W(){var e=L();e.removeEventListener("mousedown",N,!0),e.removeEventListener("touchend",N,xt),e.removeEventListener("touchstart",R,xt),e.removeEventListener("touchmove",P,xt)}function H(e,t){var n=D().box;function o(e){e.target===n&&(jt(n,"remove",o),t())}if(0===e)return t();jt(n,"remove",s),jt(n,"add",o),s=o}function K(t,n,o){void 0===o&&(o=!1),St(w.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,o),v.push({node:e,eventType:t,handler:n,options:o})}))}function U(){var e;A()&&(K("touchstart",F,{passive:!0}),K("touchend",X,{passive:!0})),(e=w.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(K(e,F),e){case"mouseenter":K("mouseleave",X);break;case"focus":K($t?"focusout":"blur",J);break;case"focusin":K("focusout",J)}}))}function z(){v.forEach((function(e){var t=e.node,n=e.eventType,o=e.handler,r=e.options;t.removeEventListener(n,o,r)})),v=[]}function F(e){var t,n=!1;if(w.state.isEnabled&&!G(e)&&!f){var o="focus"===(null==(t=a)?void 0:t.type);a=e,d=e.currentTarget,I(),!w.state.isVisible&&Et(e,"MouseEvent")&&Qt.forEach((function(t){return t(e)})),"click"===e.type&&(w.props.trigger.indexOf("mouseenter")<0||p)&&!1!==w.props.hideOnClick&&w.state.isVisible?n=!0:te(e),"click"===e.type&&(p=!n),n&&!o&&ne(e)}}function Y(e){var t=e.target,n=_().contains(t)||O.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,o=t.clientY;return e.every((function(e){var t=e.popperRect,r=e.popperState,i=e.props.interactiveBorder,a=r.placement.split("-")[0],s=r.modifiersData.offset;if(!s)return!0;var l="bottom"===a?s.top.y:0,d="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,c="left"===a?s.right.x:0,p=t.top-o+l>i,f=o-t.bottom-d>i,m=t.left-n+u>i,h=n-t.right-c>i;return p||f||m||h}))}(ee().concat(O).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:c}:null})).filter(Boolean),e)&&(B(),ne(e))}function X(e){G(e)||w.props.trigger.indexOf("click")>=0&&p||(w.props.interactive?w.hideWithInteractivity(e):ne(e))}function J(e){w.props.trigger.indexOf("focusin")<0&&e.target!==_()||w.props.interactive&&e.relatedTarget&&O.contains(e.relatedTarget)||ne(e)}function G(e){return!!Vt.isTouch&&A()!==e.type.indexOf("touch")>=0}function Q(){Z();var t=w.props,n=t.popperOptions,o=t.placement,r=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,s=T()?Xt(O).arrow:null,d=i?{getBoundingClientRect:i,contextElement:i.contextElement||_()}:e,u=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(T()){var n=D().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];T()&&s&&u.push({name:"arrow",options:{element:s,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),w.popperInstance=wt(d,O,Object.assign({},n,{placement:o,onFirstUpdate:l,modifiers:u}))}function Z(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function ee(){return Tt(O.querySelectorAll("[data-tippy-root]"))}function te(e){w.clearDelayTimeouts(),e&&j("onTrigger",[w,e]),$();var t=M(!0),n=S(),r=n[0],i=n[1];Vt.isTouch&&"hold"===r&&i&&(t=i),t?o=setTimeout((function(){w.show()}),t):w.show()}function ne(e){if(w.clearDelayTimeouts(),j("onUntrigger",[w,e]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&p)){var t=M(!1);t?r=setTimeout((function(){w.state.isVisible&&w.hide()}),t):i=requestAnimationFrame((function(){w.hide()}))}}else W()}}function tn(e,t){void 0===t&&(t={});var n=Wt.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Bt,xt),window.addEventListener("blur",Pt);var o=Object.assign({},t,{plugins:n}),r=Dt(e).reduce((function(e,t){var n=t&&en(t,o);return n&&e.push(n),e}),[]);return Lt(e)?r[0]:r}tn.defaultProps=Wt,tn.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Wt[t]=e[t]}))},tn.currentInput=Vt,Object.assign({},De,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),tn.setDefaultProps({render:Jt});const nn={name:"Tooltip",props:{content:{type:String,required:!0}},mounted(){tn(this.$el,{content:this.content})}},on=r("data-v-6361f605");i("data-v-6361f605");const rn={class:"c-Tooltip",tabindex:"0"};a();const an=on(((n,o,r,i,a,s)=>(e(),t("div",rn,[f(n.$slots,"default",{},void 0,!0)]))));nn.render=an,nn.__scopeId="data-v-6361f605";var sn={OPEN_MODAL:"OPEN_MODAL",CLOSE_MODAL:"CLOSE_MODAL",OPEN_SIDEBAR:"OPEN_MODAL",CLOSE_SIDEBAR:"CLOSE_MODAL"};var ln,dn={all:ln=ln||new Map,on:function(e,t){var n=ln.get(e);n?n.push(t):ln.set(e,[t])},off:function(e,t){var n=ln.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):ln.set(e,[]))},emit:function(e,t){var n=ln.get(e);n&&n.slice().map((function(e){e(t)})),(n=ln.get("*"))&&n.slice().map((function(n){n(e,t)}))}};let un,cn,pn,fn,mn,hn,vn,bn,yn,gn;const wn=e=>{const t=e||navigator.userAgent,n=/(iPad).*OS\s([\d_]+)/.test(t),o=!n&&/(iPhone\sOS)\s([\d_]+)/.test(t);return/(Android);?[\s/]+([\d.]+)?/.test(t)||o||n},xn=()=>{wn()&&(()=>{const e=document.documentElement,t=document.body;gn=e.scrollTop||t.scrollTop,fn=e.style.height,mn=e.style.overflow,hn=t.style.top,vn=t.style.width,bn=t.style.height,yn=t.style.position,un=t.style.overflow,e.style.height="100%",e.style.overflow="hidden",t.style.top=`-${gn}px`,t.style.width="100%",t.style.height="auto",t.style.position="fixed",t.style.overflow="hidden"})(),(()=>{const e=document.body,t=window.innerWidth-e.clientWidth;un=e.style.overflow,cn=e.style.boxSizing,pn=e.style.paddingRight,e.style.overflow="hidden",e.style.boxSizing="border-box",e.style.paddingRight=`${t+e.style.paddingRight}px`})()},On=()=>{wn()&&(()=>{const e="scrollBehavior"in document.documentElement.style,t=document.documentElement,n=document.body;t.style.height=fn,t.style.overflow=mn,n.style.top=hn,n.style.width=vn,n.style.height=bn,n.style.position=yn,n.style.overflow=un,e?window.scrollTo({top:gn,behavior:"auto"}):window.scrollTo(0,gn),un="",fn="",mn="",hn="",vn="",bn="",yn="",gn=""})(),(()=>{const e=document.body;e.style.overflow=un,e.style.boxSizing=cn,e.style.paddingRight=pn,un="",cn="",pn=""})()};export{E as Button,k as Checkbox,sn as EVENTS,dn as EventBus,L as Input,M as Link,z as Modal,J as ModalManager,G as Progress,te as Radio,se as Sidebar,ue as SidebarManager,ce as Switch,ve as Textarea,nn as Tooltip,xn as lockScroll,On as unlockScroll};
|