@vertexvis/viewer-vue 0.18.1 → 0.18.2-testing.0

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.
@@ -1,2613 +1,45 @@
1
1
  import { __spreadArray, __assign, __awaiter, __generator } from 'tslib';
2
+ import { defineComponent, ref, getCurrentInstance, inject, h } from 'vue';
3
+ import { defineCustomElement } from '@vertexvis/viewer/dist/components/vertex-scene-tree.js';
4
+ import { defineCustomElement as defineCustomElement$1 } from '@vertexvis/viewer/dist/components/vertex-scene-tree-search.js';
5
+ import { defineCustomElement as defineCustomElement$2 } from '@vertexvis/viewer/dist/components/vertex-scene-tree-table-cell.js';
6
+ import { defineCustomElement as defineCustomElement$3 } from '@vertexvis/viewer/dist/components/vertex-scene-tree-table-column.js';
7
+ import { defineCustomElement as defineCustomElement$4 } from '@vertexvis/viewer/dist/components/vertex-scene-tree-table-header.js';
8
+ import { defineCustomElement as defineCustomElement$5 } from '@vertexvis/viewer/dist/components/vertex-scene-tree-table-layout.js';
9
+ import { defineCustomElement as defineCustomElement$6 } from '@vertexvis/viewer/dist/components/vertex-scene-tree-table-resize-divider.js';
10
+ import { defineCustomElement as defineCustomElement$7 } from '@vertexvis/viewer/dist/components/vertex-scene-tree-toolbar.js';
11
+ import { defineCustomElement as defineCustomElement$8 } from '@vertexvis/viewer/dist/components/vertex-scene-tree-toolbar-group.js';
12
+ import { defineCustomElement as defineCustomElement$9 } from '@vertexvis/viewer/dist/components/vertex-viewer.js';
13
+ import { defineCustomElement as defineCustomElement$a } from '@vertexvis/viewer/dist/components/vertex-viewer-box-query-tool.js';
14
+ import { defineCustomElement as defineCustomElement$b } from '@vertexvis/viewer/dist/components/vertex-viewer-button.js';
15
+ import { defineCustomElement as defineCustomElement$c } from '@vertexvis/viewer/dist/components/vertex-viewer-default-toolbar.js';
16
+ import { defineCustomElement as defineCustomElement$d } from '@vertexvis/viewer/dist/components/vertex-viewer-dom-element.js';
17
+ import { defineCustomElement as defineCustomElement$e } from '@vertexvis/viewer/dist/components/vertex-viewer-dom-group.js';
18
+ import { defineCustomElement as defineCustomElement$f } from '@vertexvis/viewer/dist/components/vertex-viewer-dom-renderer.js';
19
+ import { defineCustomElement as defineCustomElement$g } from '@vertexvis/viewer/dist/components/vertex-viewer-hit-result-indicator.js';
20
+ import { defineCustomElement as defineCustomElement$h } from '@vertexvis/viewer/dist/components/vertex-viewer-icon.js';
21
+ import { defineCustomElement as defineCustomElement$i } from '@vertexvis/viewer/dist/components/vertex-viewer-layer.js';
22
+ import { defineCustomElement as defineCustomElement$j } from '@vertexvis/viewer/dist/components/vertex-viewer-markup.js';
23
+ import { defineCustomElement as defineCustomElement$k } from '@vertexvis/viewer/dist/components/vertex-viewer-markup-arrow.js';
24
+ import { defineCustomElement as defineCustomElement$l } from '@vertexvis/viewer/dist/components/vertex-viewer-markup-circle.js';
25
+ import { defineCustomElement as defineCustomElement$m } from '@vertexvis/viewer/dist/components/vertex-viewer-markup-freeform.js';
26
+ import { defineCustomElement as defineCustomElement$n } from '@vertexvis/viewer/dist/components/vertex-viewer-markup-tool.js';
27
+ import { defineCustomElement as defineCustomElement$o } from '@vertexvis/viewer/dist/components/vertex-viewer-measurement-details.js';
28
+ import { defineCustomElement as defineCustomElement$p } from '@vertexvis/viewer/dist/components/vertex-viewer-measurement-distance.js';
29
+ import { defineCustomElement as defineCustomElement$q } from '@vertexvis/viewer/dist/components/vertex-viewer-measurement-line.js';
30
+ import { defineCustomElement as defineCustomElement$r } from '@vertexvis/viewer/dist/components/vertex-viewer-measurement-overlays.js';
31
+ import { defineCustomElement as defineCustomElement$s } from '@vertexvis/viewer/dist/components/vertex-viewer-measurement-precise.js';
32
+ import { defineCustomElement as defineCustomElement$t } from '@vertexvis/viewer/dist/components/vertex-viewer-pin-group.js';
33
+ import { defineCustomElement as defineCustomElement$u } from '@vertexvis/viewer/dist/components/vertex-viewer-pin-label.js';
34
+ import { defineCustomElement as defineCustomElement$v } from '@vertexvis/viewer/dist/components/vertex-viewer-pin-label-line.js';
35
+ import { defineCustomElement as defineCustomElement$w } from '@vertexvis/viewer/dist/components/vertex-viewer-pin-tool.js';
36
+ import { defineCustomElement as defineCustomElement$x } from '@vertexvis/viewer/dist/components/vertex-viewer-spinner.js';
37
+ import { defineCustomElement as defineCustomElement$y } from '@vertexvis/viewer/dist/components/vertex-viewer-toolbar.js';
38
+ import { defineCustomElement as defineCustomElement$z } from '@vertexvis/viewer/dist/components/vertex-viewer-toolbar-group.js';
39
+ import { defineCustomElement as defineCustomElement$A } from '@vertexvis/viewer/dist/components/vertex-viewer-transform-widget.js';
40
+ import { defineCustomElement as defineCustomElement$B } from '@vertexvis/viewer/dist/components/vertex-viewer-view-cube.js';
2
41
  import { applyPolyfills, defineCustomElements } from '@vertexvis/viewer/loader';
3
42
 
4
- function makeMap(str, expectsLowerCase) {
5
- const map = /* @__PURE__ */ Object.create(null);
6
- const list = str.split(",");
7
- for (let i = 0; i < list.length; i++) {
8
- map[list[i]] = true;
9
- }
10
- return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
11
- }
12
-
13
- const EMPTY_OBJ = !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
14
- !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
15
- const NOOP = () => {
16
- };
17
- const NO = () => false;
18
- const onRE = /^on[^a-z]/;
19
- const isOn = (key) => onRE.test(key);
20
- const extend = Object.assign;
21
- const remove = (arr, el) => {
22
- const i = arr.indexOf(el);
23
- if (i > -1) {
24
- arr.splice(i, 1);
25
- }
26
- };
27
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
28
- const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
29
- const isArray = Array.isArray;
30
- const isMap = (val) => toTypeString(val) === "[object Map]";
31
- const isSet = (val) => toTypeString(val) === "[object Set]";
32
- const isFunction = (val) => typeof val === "function";
33
- const isString = (val) => typeof val === "string";
34
- const isSymbol = (val) => typeof val === "symbol";
35
- const isObject = (val) => val !== null && typeof val === "object";
36
- const isPromise = (val) => {
37
- return isObject(val) && isFunction(val.then) && isFunction(val.catch);
38
- };
39
- const objectToString = Object.prototype.toString;
40
- const toTypeString = (value) => objectToString.call(value);
41
- const toRawType = (value) => {
42
- return toTypeString(value).slice(8, -1);
43
- };
44
- const isPlainObject = (val) => toTypeString(val) === "[object Object]";
45
- const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
46
- const cacheStringFunction = (fn) => {
47
- const cache = /* @__PURE__ */ Object.create(null);
48
- return (str) => {
49
- const hit = cache[str];
50
- return hit || (cache[str] = fn(str));
51
- };
52
- };
53
- const capitalize = cacheStringFunction(
54
- (str) => str.charAt(0).toUpperCase() + str.slice(1)
55
- );
56
- const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
57
- const def = (obj, key, value) => {
58
- Object.defineProperty(obj, key, {
59
- configurable: true,
60
- enumerable: false,
61
- value
62
- });
63
- };
64
- let _globalThis;
65
- const getGlobalThis = () => {
66
- return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
67
- };
68
-
69
- function normalizeStyle(value) {
70
- if (isArray(value)) {
71
- const res = {};
72
- for (let i = 0; i < value.length; i++) {
73
- const item = value[i];
74
- const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
75
- if (normalized) {
76
- for (const key in normalized) {
77
- res[key] = normalized[key];
78
- }
79
- }
80
- }
81
- return res;
82
- } else if (isString(value)) {
83
- return value;
84
- } else if (isObject(value)) {
85
- return value;
86
- }
87
- }
88
- const listDelimiterRE = /;(?![^(]*\))/g;
89
- const propertyDelimiterRE = /:([^]+)/;
90
- const styleCommentRE = /\/\*[^]*?\*\//g;
91
- function parseStringStyle(cssText) {
92
- const ret = {};
93
- cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
94
- if (item) {
95
- const tmp = item.split(propertyDelimiterRE);
96
- tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
97
- }
98
- });
99
- return ret;
100
- }
101
- function normalizeClass(value) {
102
- let res = "";
103
- if (isString(value)) {
104
- res = value;
105
- } else if (isArray(value)) {
106
- for (let i = 0; i < value.length; i++) {
107
- const normalized = normalizeClass(value[i]);
108
- if (normalized) {
109
- res += normalized + " ";
110
- }
111
- }
112
- } else if (isObject(value)) {
113
- for (const name in value) {
114
- if (value[name]) {
115
- res += name + " ";
116
- }
117
- }
118
- }
119
- return res.trim();
120
- }
121
-
122
- function warn$1(msg, ...args) {
123
- console.warn(`[Vue warn] ${msg}`, ...args);
124
- }
125
-
126
- let activeEffectScope;
127
- function recordEffectScope(effect, scope = activeEffectScope) {
128
- if (scope && scope.active) {
129
- scope.effects.push(effect);
130
- }
131
- }
132
- function getCurrentScope() {
133
- return activeEffectScope;
134
- }
135
-
136
- const createDep = (effects) => {
137
- const dep = new Set(effects);
138
- dep.w = 0;
139
- dep.n = 0;
140
- return dep;
141
- };
142
- const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
143
- const newTracked = (dep) => (dep.n & trackOpBit) > 0;
144
- const initDepMarkers = ({ deps }) => {
145
- if (deps.length) {
146
- for (let i = 0; i < deps.length; i++) {
147
- deps[i].w |= trackOpBit;
148
- }
149
- }
150
- };
151
- const finalizeDepMarkers = (effect) => {
152
- const { deps } = effect;
153
- if (deps.length) {
154
- let ptr = 0;
155
- for (let i = 0; i < deps.length; i++) {
156
- const dep = deps[i];
157
- if (wasTracked(dep) && !newTracked(dep)) {
158
- dep.delete(effect);
159
- } else {
160
- deps[ptr++] = dep;
161
- }
162
- dep.w &= ~trackOpBit;
163
- dep.n &= ~trackOpBit;
164
- }
165
- deps.length = ptr;
166
- }
167
- };
168
-
169
- const targetMap = /* @__PURE__ */ new WeakMap();
170
- let effectTrackDepth = 0;
171
- let trackOpBit = 1;
172
- const maxMarkerBits = 30;
173
- let activeEffect;
174
- const ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== "production") ? "iterate" : "");
175
- const MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== "production") ? "Map key iterate" : "");
176
- class ReactiveEffect {
177
- constructor(fn, scheduler = null, scope) {
178
- this.fn = fn;
179
- this.scheduler = scheduler;
180
- this.active = true;
181
- this.deps = [];
182
- this.parent = void 0;
183
- recordEffectScope(this, scope);
184
- }
185
- run() {
186
- if (!this.active) {
187
- return this.fn();
188
- }
189
- let parent = activeEffect;
190
- let lastShouldTrack = shouldTrack;
191
- while (parent) {
192
- if (parent === this) {
193
- return;
194
- }
195
- parent = parent.parent;
196
- }
197
- try {
198
- this.parent = activeEffect;
199
- activeEffect = this;
200
- shouldTrack = true;
201
- trackOpBit = 1 << ++effectTrackDepth;
202
- if (effectTrackDepth <= maxMarkerBits) {
203
- initDepMarkers(this);
204
- } else {
205
- cleanupEffect(this);
206
- }
207
- return this.fn();
208
- } finally {
209
- if (effectTrackDepth <= maxMarkerBits) {
210
- finalizeDepMarkers(this);
211
- }
212
- trackOpBit = 1 << --effectTrackDepth;
213
- activeEffect = this.parent;
214
- shouldTrack = lastShouldTrack;
215
- this.parent = void 0;
216
- if (this.deferStop) {
217
- this.stop();
218
- }
219
- }
220
- }
221
- stop() {
222
- if (activeEffect === this) {
223
- this.deferStop = true;
224
- } else if (this.active) {
225
- cleanupEffect(this);
226
- if (this.onStop) {
227
- this.onStop();
228
- }
229
- this.active = false;
230
- }
231
- }
232
- }
233
- function cleanupEffect(effect2) {
234
- const { deps } = effect2;
235
- if (deps.length) {
236
- for (let i = 0; i < deps.length; i++) {
237
- deps[i].delete(effect2);
238
- }
239
- deps.length = 0;
240
- }
241
- }
242
- let shouldTrack = true;
243
- const trackStack = [];
244
- function pauseTracking() {
245
- trackStack.push(shouldTrack);
246
- shouldTrack = false;
247
- }
248
- function resetTracking() {
249
- const last = trackStack.pop();
250
- shouldTrack = last === void 0 ? true : last;
251
- }
252
- function track(target, type, key) {
253
- if (shouldTrack && activeEffect) {
254
- let depsMap = targetMap.get(target);
255
- if (!depsMap) {
256
- targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
257
- }
258
- let dep = depsMap.get(key);
259
- if (!dep) {
260
- depsMap.set(key, dep = createDep());
261
- }
262
- const eventInfo = !!(process.env.NODE_ENV !== "production") ? { effect: activeEffect, target, type, key } : void 0;
263
- trackEffects(dep, eventInfo);
264
- }
265
- }
266
- function trackEffects(dep, debuggerEventExtraInfo) {
267
- let shouldTrack2 = false;
268
- if (effectTrackDepth <= maxMarkerBits) {
269
- if (!newTracked(dep)) {
270
- dep.n |= trackOpBit;
271
- shouldTrack2 = !wasTracked(dep);
272
- }
273
- } else {
274
- shouldTrack2 = !dep.has(activeEffect);
275
- }
276
- if (shouldTrack2) {
277
- dep.add(activeEffect);
278
- activeEffect.deps.push(dep);
279
- if (!!(process.env.NODE_ENV !== "production") && activeEffect.onTrack) {
280
- activeEffect.onTrack(
281
- extend(
282
- {
283
- effect: activeEffect
284
- },
285
- debuggerEventExtraInfo
286
- )
287
- );
288
- }
289
- }
290
- }
291
- function trigger(target, type, key, newValue, oldValue, oldTarget) {
292
- const depsMap = targetMap.get(target);
293
- if (!depsMap) {
294
- return;
295
- }
296
- let deps = [];
297
- if (type === "clear") {
298
- deps = [...depsMap.values()];
299
- } else if (key === "length" && isArray(target)) {
300
- const newLength = Number(newValue);
301
- depsMap.forEach((dep, key2) => {
302
- if (key2 === "length" || key2 >= newLength) {
303
- deps.push(dep);
304
- }
305
- });
306
- } else {
307
- if (key !== void 0) {
308
- deps.push(depsMap.get(key));
309
- }
310
- switch (type) {
311
- case "add":
312
- if (!isArray(target)) {
313
- deps.push(depsMap.get(ITERATE_KEY));
314
- if (isMap(target)) {
315
- deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
316
- }
317
- } else if (isIntegerKey(key)) {
318
- deps.push(depsMap.get("length"));
319
- }
320
- break;
321
- case "delete":
322
- if (!isArray(target)) {
323
- deps.push(depsMap.get(ITERATE_KEY));
324
- if (isMap(target)) {
325
- deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
326
- }
327
- }
328
- break;
329
- case "set":
330
- if (isMap(target)) {
331
- deps.push(depsMap.get(ITERATE_KEY));
332
- }
333
- break;
334
- }
335
- }
336
- const eventInfo = !!(process.env.NODE_ENV !== "production") ? { target, type, key, newValue, oldValue, oldTarget } : void 0;
337
- if (deps.length === 1) {
338
- if (deps[0]) {
339
- if (!!(process.env.NODE_ENV !== "production")) {
340
- triggerEffects(deps[0], eventInfo);
341
- } else {
342
- triggerEffects(deps[0]);
343
- }
344
- }
345
- } else {
346
- const effects = [];
347
- for (const dep of deps) {
348
- if (dep) {
349
- effects.push(...dep);
350
- }
351
- }
352
- if (!!(process.env.NODE_ENV !== "production")) {
353
- triggerEffects(createDep(effects), eventInfo);
354
- } else {
355
- triggerEffects(createDep(effects));
356
- }
357
- }
358
- }
359
- function triggerEffects(dep, debuggerEventExtraInfo) {
360
- const effects = isArray(dep) ? dep : [...dep];
361
- for (const effect2 of effects) {
362
- if (effect2.computed) {
363
- triggerEffect(effect2, debuggerEventExtraInfo);
364
- }
365
- }
366
- for (const effect2 of effects) {
367
- if (!effect2.computed) {
368
- triggerEffect(effect2, debuggerEventExtraInfo);
369
- }
370
- }
371
- }
372
- function triggerEffect(effect2, debuggerEventExtraInfo) {
373
- if (effect2 !== activeEffect || effect2.allowRecurse) {
374
- if (!!(process.env.NODE_ENV !== "production") && effect2.onTrigger) {
375
- effect2.onTrigger(extend({ effect: effect2 }, debuggerEventExtraInfo));
376
- }
377
- if (effect2.scheduler) {
378
- effect2.scheduler();
379
- } else {
380
- effect2.run();
381
- }
382
- }
383
- }
384
-
385
- const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
386
- const builtInSymbols = new Set(
387
- /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
388
- );
389
- const get$1 = /* @__PURE__ */ createGetter();
390
- const readonlyGet = /* @__PURE__ */ createGetter(true);
391
- const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
392
- const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
393
- function createArrayInstrumentations() {
394
- const instrumentations = {};
395
- ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
396
- instrumentations[key] = function(...args) {
397
- const arr = toRaw(this);
398
- for (let i = 0, l = this.length; i < l; i++) {
399
- track(arr, "get", i + "");
400
- }
401
- const res = arr[key](...args);
402
- if (res === -1 || res === false) {
403
- return arr[key](...args.map(toRaw));
404
- } else {
405
- return res;
406
- }
407
- };
408
- });
409
- ["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
410
- instrumentations[key] = function(...args) {
411
- pauseTracking();
412
- const res = toRaw(this)[key].apply(this, args);
413
- resetTracking();
414
- return res;
415
- };
416
- });
417
- return instrumentations;
418
- }
419
- function hasOwnProperty(key) {
420
- const obj = toRaw(this);
421
- track(obj, "has", key);
422
- return obj.hasOwnProperty(key);
423
- }
424
- function createGetter(isReadonly2 = false, shallow = false) {
425
- return function get2(target, key, receiver) {
426
- if (key === "__v_isReactive") {
427
- return !isReadonly2;
428
- } else if (key === "__v_isReadonly") {
429
- return isReadonly2;
430
- } else if (key === "__v_isShallow") {
431
- return shallow;
432
- } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
433
- return target;
434
- }
435
- const targetIsArray = isArray(target);
436
- if (!isReadonly2) {
437
- if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
438
- return Reflect.get(arrayInstrumentations, key, receiver);
439
- }
440
- if (key === "hasOwnProperty") {
441
- return hasOwnProperty;
442
- }
443
- }
444
- const res = Reflect.get(target, key, receiver);
445
- if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
446
- return res;
447
- }
448
- if (!isReadonly2) {
449
- track(target, "get", key);
450
- }
451
- if (shallow) {
452
- return res;
453
- }
454
- if (isRef(res)) {
455
- return targetIsArray && isIntegerKey(key) ? res : res.value;
456
- }
457
- if (isObject(res)) {
458
- return isReadonly2 ? readonly(res) : reactive(res);
459
- }
460
- return res;
461
- };
462
- }
463
- const set$1 = /* @__PURE__ */ createSetter();
464
- function createSetter(shallow = false) {
465
- return function set2(target, key, value, receiver) {
466
- let oldValue = target[key];
467
- if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
468
- return false;
469
- }
470
- if (!shallow) {
471
- if (!isShallow$1(value) && !isReadonly(value)) {
472
- oldValue = toRaw(oldValue);
473
- value = toRaw(value);
474
- }
475
- if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
476
- oldValue.value = value;
477
- return true;
478
- }
479
- }
480
- const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
481
- const result = Reflect.set(target, key, value, receiver);
482
- if (target === toRaw(receiver)) {
483
- if (!hadKey) {
484
- trigger(target, "add", key, value);
485
- } else if (hasChanged(value, oldValue)) {
486
- trigger(target, "set", key, value, oldValue);
487
- }
488
- }
489
- return result;
490
- };
491
- }
492
- function deleteProperty(target, key) {
493
- const hadKey = hasOwn(target, key);
494
- const oldValue = target[key];
495
- const result = Reflect.deleteProperty(target, key);
496
- if (result && hadKey) {
497
- trigger(target, "delete", key, void 0, oldValue);
498
- }
499
- return result;
500
- }
501
- function has$1(target, key) {
502
- const result = Reflect.has(target, key);
503
- if (!isSymbol(key) || !builtInSymbols.has(key)) {
504
- track(target, "has", key);
505
- }
506
- return result;
507
- }
508
- function ownKeys(target) {
509
- track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
510
- return Reflect.ownKeys(target);
511
- }
512
- const mutableHandlers = {
513
- get: get$1,
514
- set: set$1,
515
- deleteProperty,
516
- has: has$1,
517
- ownKeys
518
- };
519
- const readonlyHandlers = {
520
- get: readonlyGet,
521
- set(target, key) {
522
- if (!!(process.env.NODE_ENV !== "production")) {
523
- warn$1(
524
- `Set operation on key "${String(key)}" failed: target is readonly.`,
525
- target
526
- );
527
- }
528
- return true;
529
- },
530
- deleteProperty(target, key) {
531
- if (!!(process.env.NODE_ENV !== "production")) {
532
- warn$1(
533
- `Delete operation on key "${String(key)}" failed: target is readonly.`,
534
- target
535
- );
536
- }
537
- return true;
538
- }
539
- };
540
- const shallowReadonlyHandlers = /* @__PURE__ */ extend(
541
- {},
542
- readonlyHandlers,
543
- {
544
- get: shallowReadonlyGet
545
- }
546
- );
547
-
548
- const toShallow = (value) => value;
549
- const getProto = (v) => Reflect.getPrototypeOf(v);
550
- function get(target, key, isReadonly = false, isShallow = false) {
551
- target = target["__v_raw"];
552
- const rawTarget = toRaw(target);
553
- const rawKey = toRaw(key);
554
- if (!isReadonly) {
555
- if (key !== rawKey) {
556
- track(rawTarget, "get", key);
557
- }
558
- track(rawTarget, "get", rawKey);
559
- }
560
- const { has: has2 } = getProto(rawTarget);
561
- const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
562
- if (has2.call(rawTarget, key)) {
563
- return wrap(target.get(key));
564
- } else if (has2.call(rawTarget, rawKey)) {
565
- return wrap(target.get(rawKey));
566
- } else if (target !== rawTarget) {
567
- target.get(key);
568
- }
569
- }
570
- function has(key, isReadonly = false) {
571
- const target = this["__v_raw"];
572
- const rawTarget = toRaw(target);
573
- const rawKey = toRaw(key);
574
- if (!isReadonly) {
575
- if (key !== rawKey) {
576
- track(rawTarget, "has", key);
577
- }
578
- track(rawTarget, "has", rawKey);
579
- }
580
- return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
581
- }
582
- function size(target, isReadonly = false) {
583
- target = target["__v_raw"];
584
- !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY);
585
- return Reflect.get(target, "size", target);
586
- }
587
- function add(value) {
588
- value = toRaw(value);
589
- const target = toRaw(this);
590
- const proto = getProto(target);
591
- const hadKey = proto.has.call(target, value);
592
- if (!hadKey) {
593
- target.add(value);
594
- trigger(target, "add", value, value);
595
- }
596
- return this;
597
- }
598
- function set(key, value) {
599
- value = toRaw(value);
600
- const target = toRaw(this);
601
- const { has: has2, get: get2 } = getProto(target);
602
- let hadKey = has2.call(target, key);
603
- if (!hadKey) {
604
- key = toRaw(key);
605
- hadKey = has2.call(target, key);
606
- } else if (!!(process.env.NODE_ENV !== "production")) {
607
- checkIdentityKeys(target, has2, key);
608
- }
609
- const oldValue = get2.call(target, key);
610
- target.set(key, value);
611
- if (!hadKey) {
612
- trigger(target, "add", key, value);
613
- } else if (hasChanged(value, oldValue)) {
614
- trigger(target, "set", key, value, oldValue);
615
- }
616
- return this;
617
- }
618
- function deleteEntry(key) {
619
- const target = toRaw(this);
620
- const { has: has2, get: get2 } = getProto(target);
621
- let hadKey = has2.call(target, key);
622
- if (!hadKey) {
623
- key = toRaw(key);
624
- hadKey = has2.call(target, key);
625
- } else if (!!(process.env.NODE_ENV !== "production")) {
626
- checkIdentityKeys(target, has2, key);
627
- }
628
- const oldValue = get2 ? get2.call(target, key) : void 0;
629
- const result = target.delete(key);
630
- if (hadKey) {
631
- trigger(target, "delete", key, void 0, oldValue);
632
- }
633
- return result;
634
- }
635
- function clear() {
636
- const target = toRaw(this);
637
- const hadItems = target.size !== 0;
638
- const oldTarget = !!(process.env.NODE_ENV !== "production") ? isMap(target) ? new Map(target) : new Set(target) : void 0;
639
- const result = target.clear();
640
- if (hadItems) {
641
- trigger(target, "clear", void 0, void 0, oldTarget);
642
- }
643
- return result;
644
- }
645
- function createForEach(isReadonly, isShallow) {
646
- return function forEach(callback, thisArg) {
647
- const observed = this;
648
- const target = observed["__v_raw"];
649
- const rawTarget = toRaw(target);
650
- const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
651
- !isReadonly && track(rawTarget, "iterate", ITERATE_KEY);
652
- return target.forEach((value, key) => {
653
- return callback.call(thisArg, wrap(value), wrap(key), observed);
654
- });
655
- };
656
- }
657
- function createIterableMethod(method, isReadonly, isShallow) {
658
- return function(...args) {
659
- const target = this["__v_raw"];
660
- const rawTarget = toRaw(target);
661
- const targetIsMap = isMap(rawTarget);
662
- const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
663
- const isKeyOnly = method === "keys" && targetIsMap;
664
- const innerIterator = target[method](...args);
665
- const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
666
- !isReadonly && track(
667
- rawTarget,
668
- "iterate",
669
- isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
670
- );
671
- return {
672
- // iterator protocol
673
- next() {
674
- const { value, done } = innerIterator.next();
675
- return done ? { value, done } : {
676
- value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
677
- done
678
- };
679
- },
680
- // iterable protocol
681
- [Symbol.iterator]() {
682
- return this;
683
- }
684
- };
685
- };
686
- }
687
- function createReadonlyMethod(type) {
688
- return function(...args) {
689
- if (!!(process.env.NODE_ENV !== "production")) {
690
- const key = args[0] ? `on key "${args[0]}" ` : ``;
691
- console.warn(
692
- `${capitalize(type)} operation ${key}failed: target is readonly.`,
693
- toRaw(this)
694
- );
695
- }
696
- return type === "delete" ? false : this;
697
- };
698
- }
699
- function createInstrumentations() {
700
- const mutableInstrumentations2 = {
701
- get(key) {
702
- return get(this, key);
703
- },
704
- get size() {
705
- return size(this);
706
- },
707
- has,
708
- add,
709
- set,
710
- delete: deleteEntry,
711
- clear,
712
- forEach: createForEach(false, false)
713
- };
714
- const shallowInstrumentations2 = {
715
- get(key) {
716
- return get(this, key, false, true);
717
- },
718
- get size() {
719
- return size(this);
720
- },
721
- has,
722
- add,
723
- set,
724
- delete: deleteEntry,
725
- clear,
726
- forEach: createForEach(false, true)
727
- };
728
- const readonlyInstrumentations2 = {
729
- get(key) {
730
- return get(this, key, true);
731
- },
732
- get size() {
733
- return size(this, true);
734
- },
735
- has(key) {
736
- return has.call(this, key, true);
737
- },
738
- add: createReadonlyMethod("add"),
739
- set: createReadonlyMethod("set"),
740
- delete: createReadonlyMethod("delete"),
741
- clear: createReadonlyMethod("clear"),
742
- forEach: createForEach(true, false)
743
- };
744
- const shallowReadonlyInstrumentations2 = {
745
- get(key) {
746
- return get(this, key, true, true);
747
- },
748
- get size() {
749
- return size(this, true);
750
- },
751
- has(key) {
752
- return has.call(this, key, true);
753
- },
754
- add: createReadonlyMethod("add"),
755
- set: createReadonlyMethod("set"),
756
- delete: createReadonlyMethod("delete"),
757
- clear: createReadonlyMethod("clear"),
758
- forEach: createForEach(true, true)
759
- };
760
- const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
761
- iteratorMethods.forEach((method) => {
762
- mutableInstrumentations2[method] = createIterableMethod(
763
- method,
764
- false,
765
- false
766
- );
767
- readonlyInstrumentations2[method] = createIterableMethod(
768
- method,
769
- true,
770
- false
771
- );
772
- shallowInstrumentations2[method] = createIterableMethod(
773
- method,
774
- false,
775
- true
776
- );
777
- shallowReadonlyInstrumentations2[method] = createIterableMethod(
778
- method,
779
- true,
780
- true
781
- );
782
- });
783
- return [
784
- mutableInstrumentations2,
785
- readonlyInstrumentations2,
786
- shallowInstrumentations2,
787
- shallowReadonlyInstrumentations2
788
- ];
789
- }
790
- const [
791
- mutableInstrumentations,
792
- readonlyInstrumentations,
793
- shallowInstrumentations,
794
- shallowReadonlyInstrumentations
795
- ] = /* @__PURE__ */ createInstrumentations();
796
- function createInstrumentationGetter(isReadonly, shallow) {
797
- const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;
798
- return (target, key, receiver) => {
799
- if (key === "__v_isReactive") {
800
- return !isReadonly;
801
- } else if (key === "__v_isReadonly") {
802
- return isReadonly;
803
- } else if (key === "__v_raw") {
804
- return target;
805
- }
806
- return Reflect.get(
807
- hasOwn(instrumentations, key) && key in target ? instrumentations : target,
808
- key,
809
- receiver
810
- );
811
- };
812
- }
813
- const mutableCollectionHandlers = {
814
- get: /* @__PURE__ */ createInstrumentationGetter(false, false)
815
- };
816
- const readonlyCollectionHandlers = {
817
- get: /* @__PURE__ */ createInstrumentationGetter(true, false)
818
- };
819
- const shallowReadonlyCollectionHandlers = {
820
- get: /* @__PURE__ */ createInstrumentationGetter(true, true)
821
- };
822
- function checkIdentityKeys(target, has2, key) {
823
- const rawKey = toRaw(key);
824
- if (rawKey !== key && has2.call(target, rawKey)) {
825
- const type = toRawType(target);
826
- console.warn(
827
- `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
828
- );
829
- }
830
- }
831
-
832
- const reactiveMap = /* @__PURE__ */ new WeakMap();
833
- const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
834
- const readonlyMap = /* @__PURE__ */ new WeakMap();
835
- const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
836
- function targetTypeMap(rawType) {
837
- switch (rawType) {
838
- case "Object":
839
- case "Array":
840
- return 1 /* COMMON */;
841
- case "Map":
842
- case "Set":
843
- case "WeakMap":
844
- case "WeakSet":
845
- return 2 /* COLLECTION */;
846
- default:
847
- return 0 /* INVALID */;
848
- }
849
- }
850
- function getTargetType(value) {
851
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
852
- }
853
- function reactive(target) {
854
- if (isReadonly(target)) {
855
- return target;
856
- }
857
- return createReactiveObject(
858
- target,
859
- false,
860
- mutableHandlers,
861
- mutableCollectionHandlers,
862
- reactiveMap
863
- );
864
- }
865
- function readonly(target) {
866
- return createReactiveObject(
867
- target,
868
- true,
869
- readonlyHandlers,
870
- readonlyCollectionHandlers,
871
- readonlyMap
872
- );
873
- }
874
- function shallowReadonly(target) {
875
- return createReactiveObject(
876
- target,
877
- true,
878
- shallowReadonlyHandlers,
879
- shallowReadonlyCollectionHandlers,
880
- shallowReadonlyMap
881
- );
882
- }
883
- function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
884
- if (!isObject(target)) {
885
- if (!!(process.env.NODE_ENV !== "production")) {
886
- console.warn(`value cannot be made reactive: ${String(target)}`);
887
- }
888
- return target;
889
- }
890
- if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
891
- return target;
892
- }
893
- const existingProxy = proxyMap.get(target);
894
- if (existingProxy) {
895
- return existingProxy;
896
- }
897
- const targetType = getTargetType(target);
898
- if (targetType === 0 /* INVALID */) {
899
- return target;
900
- }
901
- const proxy = new Proxy(
902
- target,
903
- targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
904
- );
905
- proxyMap.set(target, proxy);
906
- return proxy;
907
- }
908
- function isReactive(value) {
909
- if (isReadonly(value)) {
910
- return isReactive(value["__v_raw"]);
911
- }
912
- return !!(value && value["__v_isReactive"]);
913
- }
914
- function isReadonly(value) {
915
- return !!(value && value["__v_isReadonly"]);
916
- }
917
- function isShallow$1(value) {
918
- return !!(value && value["__v_isShallow"]);
919
- }
920
- function isProxy(value) {
921
- return isReactive(value) || isReadonly(value);
922
- }
923
- function toRaw(observed) {
924
- const raw = observed && observed["__v_raw"];
925
- return raw ? toRaw(raw) : observed;
926
- }
927
- function markRaw(value) {
928
- def(value, "__v_skip", true);
929
- return value;
930
- }
931
- const toReactive = (value) => isObject(value) ? reactive(value) : value;
932
- const toReadonly = (value) => isObject(value) ? readonly(value) : value;
933
-
934
- function trackRefValue(ref2) {
935
- if (shouldTrack && activeEffect) {
936
- ref2 = toRaw(ref2);
937
- if (!!(process.env.NODE_ENV !== "production")) {
938
- trackEffects(ref2.dep || (ref2.dep = createDep()), {
939
- target: ref2,
940
- type: "get",
941
- key: "value"
942
- });
943
- } else {
944
- trackEffects(ref2.dep || (ref2.dep = createDep()));
945
- }
946
- }
947
- }
948
- function triggerRefValue(ref2, newVal) {
949
- ref2 = toRaw(ref2);
950
- const dep = ref2.dep;
951
- if (dep) {
952
- if (!!(process.env.NODE_ENV !== "production")) {
953
- triggerEffects(dep, {
954
- target: ref2,
955
- type: "set",
956
- key: "value",
957
- newValue: newVal
958
- });
959
- } else {
960
- triggerEffects(dep);
961
- }
962
- }
963
- }
964
- function isRef(r) {
965
- return !!(r && r.__v_isRef === true);
966
- }
967
- function ref(value) {
968
- return createRef(value, false);
969
- }
970
- function createRef(rawValue, shallow) {
971
- if (isRef(rawValue)) {
972
- return rawValue;
973
- }
974
- return new RefImpl(rawValue, shallow);
975
- }
976
- class RefImpl {
977
- constructor(value, __v_isShallow) {
978
- this.__v_isShallow = __v_isShallow;
979
- this.dep = void 0;
980
- this.__v_isRef = true;
981
- this._rawValue = __v_isShallow ? value : toRaw(value);
982
- this._value = __v_isShallow ? value : toReactive(value);
983
- }
984
- get value() {
985
- trackRefValue(this);
986
- return this._value;
987
- }
988
- set value(newVal) {
989
- const useDirectValue = this.__v_isShallow || isShallow$1(newVal) || isReadonly(newVal);
990
- newVal = useDirectValue ? newVal : toRaw(newVal);
991
- if (hasChanged(newVal, this._rawValue)) {
992
- this._rawValue = newVal;
993
- this._value = useDirectValue ? newVal : toReactive(newVal);
994
- triggerRefValue(this, newVal);
995
- }
996
- }
997
- }
998
- function unref(ref2) {
999
- return isRef(ref2) ? ref2.value : ref2;
1000
- }
1001
- const shallowUnwrapHandlers = {
1002
- get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
1003
- set: (target, key, value, receiver) => {
1004
- const oldValue = target[key];
1005
- if (isRef(oldValue) && !isRef(value)) {
1006
- oldValue.value = value;
1007
- return true;
1008
- } else {
1009
- return Reflect.set(target, key, value, receiver);
1010
- }
1011
- }
1012
- };
1013
- function proxyRefs(objectWithRefs) {
1014
- return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
1015
- }
1016
-
1017
- const stack = [];
1018
- function pushWarningContext(vnode) {
1019
- stack.push(vnode);
1020
- }
1021
- function popWarningContext() {
1022
- stack.pop();
1023
- }
1024
- function warn(msg, ...args) {
1025
- if (!!!(process.env.NODE_ENV !== "production"))
1026
- return;
1027
- pauseTracking();
1028
- const instance = stack.length ? stack[stack.length - 1].component : null;
1029
- const appWarnHandler = instance && instance.appContext.config.warnHandler;
1030
- const trace = getComponentTrace();
1031
- if (appWarnHandler) {
1032
- callWithErrorHandling(
1033
- appWarnHandler,
1034
- instance,
1035
- 11,
1036
- [
1037
- msg + args.join(""),
1038
- instance && instance.proxy,
1039
- trace.map(
1040
- ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
1041
- ).join("\n"),
1042
- trace
1043
- ]
1044
- );
1045
- } else {
1046
- const warnArgs = [`[Vue warn]: ${msg}`, ...args];
1047
- if (trace.length && // avoid spamming console during tests
1048
- true) {
1049
- warnArgs.push(`
1050
- `, ...formatTrace(trace));
1051
- }
1052
- console.warn(...warnArgs);
1053
- }
1054
- resetTracking();
1055
- }
1056
- function getComponentTrace() {
1057
- let currentVNode = stack[stack.length - 1];
1058
- if (!currentVNode) {
1059
- return [];
1060
- }
1061
- const normalizedStack = [];
1062
- while (currentVNode) {
1063
- const last = normalizedStack[0];
1064
- if (last && last.vnode === currentVNode) {
1065
- last.recurseCount++;
1066
- } else {
1067
- normalizedStack.push({
1068
- vnode: currentVNode,
1069
- recurseCount: 0
1070
- });
1071
- }
1072
- const parentInstance = currentVNode.component && currentVNode.component.parent;
1073
- currentVNode = parentInstance && parentInstance.vnode;
1074
- }
1075
- return normalizedStack;
1076
- }
1077
- function formatTrace(trace) {
1078
- const logs = [];
1079
- trace.forEach((entry, i) => {
1080
- logs.push(...i === 0 ? [] : [`
1081
- `], ...formatTraceEntry(entry));
1082
- });
1083
- return logs;
1084
- }
1085
- function formatTraceEntry({ vnode, recurseCount }) {
1086
- const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
1087
- const isRoot = vnode.component ? vnode.component.parent == null : false;
1088
- const open = ` at <${formatComponentName(
1089
- vnode.component,
1090
- vnode.type,
1091
- isRoot
1092
- )}`;
1093
- const close = `>` + postfix;
1094
- return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
1095
- }
1096
- function formatProps(props) {
1097
- const res = [];
1098
- const keys = Object.keys(props);
1099
- keys.slice(0, 3).forEach((key) => {
1100
- res.push(...formatProp(key, props[key]));
1101
- });
1102
- if (keys.length > 3) {
1103
- res.push(` ...`);
1104
- }
1105
- return res;
1106
- }
1107
- function formatProp(key, value, raw) {
1108
- if (isString(value)) {
1109
- value = JSON.stringify(value);
1110
- return raw ? value : [`${key}=${value}`];
1111
- } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
1112
- return raw ? value : [`${key}=${value}`];
1113
- } else if (isRef(value)) {
1114
- value = formatProp(key, toRaw(value.value), true);
1115
- return raw ? value : [`${key}=Ref<`, value, `>`];
1116
- } else if (isFunction(value)) {
1117
- return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
1118
- } else {
1119
- value = toRaw(value);
1120
- return raw ? value : [`${key}=`, value];
1121
- }
1122
- }
1123
-
1124
- const ErrorTypeStrings = {
1125
- ["sp"]: "serverPrefetch hook",
1126
- ["bc"]: "beforeCreate hook",
1127
- ["c"]: "created hook",
1128
- ["bm"]: "beforeMount hook",
1129
- ["m"]: "mounted hook",
1130
- ["bu"]: "beforeUpdate hook",
1131
- ["u"]: "updated",
1132
- ["bum"]: "beforeUnmount hook",
1133
- ["um"]: "unmounted hook",
1134
- ["a"]: "activated hook",
1135
- ["da"]: "deactivated hook",
1136
- ["ec"]: "errorCaptured hook",
1137
- ["rtc"]: "renderTracked hook",
1138
- ["rtg"]: "renderTriggered hook",
1139
- [0]: "setup function",
1140
- [1]: "render function",
1141
- [2]: "watcher getter",
1142
- [3]: "watcher callback",
1143
- [4]: "watcher cleanup function",
1144
- [5]: "native event handler",
1145
- [6]: "component event handler",
1146
- [7]: "vnode hook",
1147
- [8]: "directive hook",
1148
- [9]: "transition hook",
1149
- [10]: "app errorHandler",
1150
- [11]: "app warnHandler",
1151
- [12]: "ref function",
1152
- [13]: "async component loader",
1153
- [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
1154
- };
1155
- function callWithErrorHandling(fn, instance, type, args) {
1156
- let res;
1157
- try {
1158
- res = args ? fn(...args) : fn();
1159
- } catch (err) {
1160
- handleError(err, instance, type);
1161
- }
1162
- return res;
1163
- }
1164
- function callWithAsyncErrorHandling(fn, instance, type, args) {
1165
- if (isFunction(fn)) {
1166
- const res = callWithErrorHandling(fn, instance, type, args);
1167
- if (res && isPromise(res)) {
1168
- res.catch((err) => {
1169
- handleError(err, instance, type);
1170
- });
1171
- }
1172
- return res;
1173
- }
1174
- const values = [];
1175
- for (let i = 0; i < fn.length; i++) {
1176
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
1177
- }
1178
- return values;
1179
- }
1180
- function handleError(err, instance, type, throwInDev = true) {
1181
- const contextVNode = instance ? instance.vnode : null;
1182
- if (instance) {
1183
- let cur = instance.parent;
1184
- const exposedInstance = instance.proxy;
1185
- const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings[type] : type;
1186
- while (cur) {
1187
- const errorCapturedHooks = cur.ec;
1188
- if (errorCapturedHooks) {
1189
- for (let i = 0; i < errorCapturedHooks.length; i++) {
1190
- if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
1191
- return;
1192
- }
1193
- }
1194
- }
1195
- cur = cur.parent;
1196
- }
1197
- const appErrorHandler = instance.appContext.config.errorHandler;
1198
- if (appErrorHandler) {
1199
- callWithErrorHandling(
1200
- appErrorHandler,
1201
- null,
1202
- 10,
1203
- [err, exposedInstance, errorInfo]
1204
- );
1205
- return;
1206
- }
1207
- }
1208
- logError(err, type, contextVNode, throwInDev);
1209
- }
1210
- function logError(err, type, contextVNode, throwInDev = true) {
1211
- if (!!(process.env.NODE_ENV !== "production")) {
1212
- const info = ErrorTypeStrings[type];
1213
- if (contextVNode) {
1214
- pushWarningContext(contextVNode);
1215
- }
1216
- warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1217
- if (contextVNode) {
1218
- popWarningContext();
1219
- }
1220
- if (throwInDev) {
1221
- throw err;
1222
- } else {
1223
- console.error(err);
1224
- }
1225
- } else {
1226
- console.error(err);
1227
- }
1228
- }
1229
-
1230
- let isFlushing = false;
1231
- let isFlushPending = false;
1232
- const queue = [];
1233
- let flushIndex = 0;
1234
- const pendingPostFlushCbs = [];
1235
- let activePostFlushCbs = null;
1236
- let postFlushIndex = 0;
1237
- const resolvedPromise = /* @__PURE__ */ Promise.resolve();
1238
- let currentFlushPromise = null;
1239
- const RECURSION_LIMIT = 100;
1240
- function nextTick(fn) {
1241
- const p = currentFlushPromise || resolvedPromise;
1242
- return fn ? p.then(this ? fn.bind(this) : fn) : p;
1243
- }
1244
- function findInsertionIndex(id) {
1245
- let start = flushIndex + 1;
1246
- let end = queue.length;
1247
- while (start < end) {
1248
- const middle = start + end >>> 1;
1249
- const middleJobId = getId(queue[middle]);
1250
- middleJobId < id ? start = middle + 1 : end = middle;
1251
- }
1252
- return start;
1253
- }
1254
- function queueJob(job) {
1255
- if (!queue.length || !queue.includes(
1256
- job,
1257
- isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex
1258
- )) {
1259
- if (job.id == null) {
1260
- queue.push(job);
1261
- } else {
1262
- queue.splice(findInsertionIndex(job.id), 0, job);
1263
- }
1264
- queueFlush();
1265
- }
1266
- }
1267
- function queueFlush() {
1268
- if (!isFlushing && !isFlushPending) {
1269
- isFlushPending = true;
1270
- currentFlushPromise = resolvedPromise.then(flushJobs);
1271
- }
1272
- }
1273
- function queuePostFlushCb(cb) {
1274
- if (!isArray(cb)) {
1275
- if (!activePostFlushCbs || !activePostFlushCbs.includes(
1276
- cb,
1277
- cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex
1278
- )) {
1279
- pendingPostFlushCbs.push(cb);
1280
- }
1281
- } else {
1282
- pendingPostFlushCbs.push(...cb);
1283
- }
1284
- queueFlush();
1285
- }
1286
- function flushPostFlushCbs(seen) {
1287
- if (pendingPostFlushCbs.length) {
1288
- const deduped = [...new Set(pendingPostFlushCbs)];
1289
- pendingPostFlushCbs.length = 0;
1290
- if (activePostFlushCbs) {
1291
- activePostFlushCbs.push(...deduped);
1292
- return;
1293
- }
1294
- activePostFlushCbs = deduped;
1295
- if (!!(process.env.NODE_ENV !== "production")) {
1296
- seen = seen || /* @__PURE__ */ new Map();
1297
- }
1298
- activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
1299
- for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
1300
- if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
1301
- continue;
1302
- }
1303
- activePostFlushCbs[postFlushIndex]();
1304
- }
1305
- activePostFlushCbs = null;
1306
- postFlushIndex = 0;
1307
- }
1308
- }
1309
- const getId = (job) => job.id == null ? Infinity : job.id;
1310
- const comparator = (a, b) => {
1311
- const diff = getId(a) - getId(b);
1312
- if (diff === 0) {
1313
- if (a.pre && !b.pre)
1314
- return -1;
1315
- if (b.pre && !a.pre)
1316
- return 1;
1317
- }
1318
- return diff;
1319
- };
1320
- function flushJobs(seen) {
1321
- isFlushPending = false;
1322
- isFlushing = true;
1323
- if (!!(process.env.NODE_ENV !== "production")) {
1324
- seen = seen || /* @__PURE__ */ new Map();
1325
- }
1326
- queue.sort(comparator);
1327
- const check = !!(process.env.NODE_ENV !== "production") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;
1328
- try {
1329
- for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
1330
- const job = queue[flushIndex];
1331
- if (job && job.active !== false) {
1332
- if (!!(process.env.NODE_ENV !== "production") && check(job)) {
1333
- continue;
1334
- }
1335
- callWithErrorHandling(job, null, 14);
1336
- }
1337
- }
1338
- } finally {
1339
- flushIndex = 0;
1340
- queue.length = 0;
1341
- flushPostFlushCbs(seen);
1342
- isFlushing = false;
1343
- currentFlushPromise = null;
1344
- if (queue.length || pendingPostFlushCbs.length) {
1345
- flushJobs(seen);
1346
- }
1347
- }
1348
- }
1349
- function checkRecursiveUpdates(seen, fn) {
1350
- if (!seen.has(fn)) {
1351
- seen.set(fn, 1);
1352
- } else {
1353
- const count = seen.get(fn);
1354
- if (count > RECURSION_LIMIT) {
1355
- const instance = fn.ownerInstance;
1356
- const componentName = instance && getComponentName(instance.type);
1357
- warn(
1358
- `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`
1359
- );
1360
- return true;
1361
- } else {
1362
- seen.set(fn, count + 1);
1363
- }
1364
- }
1365
- }
1366
- const hmrDirtyComponents = /* @__PURE__ */ new Set();
1367
- if (!!(process.env.NODE_ENV !== "production")) {
1368
- getGlobalThis().__VUE_HMR_RUNTIME__ = {
1369
- createRecord: tryWrap(createRecord),
1370
- rerender: tryWrap(rerender),
1371
- reload: tryWrap(reload)
1372
- };
1373
- }
1374
- const map = /* @__PURE__ */ new Map();
1375
- function createRecord(id, initialDef) {
1376
- if (map.has(id)) {
1377
- return false;
1378
- }
1379
- map.set(id, {
1380
- initialDef: normalizeClassComponent(initialDef),
1381
- instances: /* @__PURE__ */ new Set()
1382
- });
1383
- return true;
1384
- }
1385
- function normalizeClassComponent(component) {
1386
- return isClassComponent(component) ? component.__vccOpts : component;
1387
- }
1388
- function rerender(id, newRender) {
1389
- const record = map.get(id);
1390
- if (!record) {
1391
- return;
1392
- }
1393
- record.initialDef.render = newRender;
1394
- [...record.instances].forEach((instance) => {
1395
- if (newRender) {
1396
- instance.render = newRender;
1397
- normalizeClassComponent(instance.type).render = newRender;
1398
- }
1399
- instance.renderCache = [];
1400
- instance.update();
1401
- });
1402
- }
1403
- function reload(id, newComp) {
1404
- const record = map.get(id);
1405
- if (!record)
1406
- return;
1407
- newComp = normalizeClassComponent(newComp);
1408
- updateComponentDef(record.initialDef, newComp);
1409
- const instances = [...record.instances];
1410
- for (const instance of instances) {
1411
- const oldComp = normalizeClassComponent(instance.type);
1412
- if (!hmrDirtyComponents.has(oldComp)) {
1413
- if (oldComp !== record.initialDef) {
1414
- updateComponentDef(oldComp, newComp);
1415
- }
1416
- hmrDirtyComponents.add(oldComp);
1417
- }
1418
- instance.appContext.propsCache.delete(instance.type);
1419
- instance.appContext.emitsCache.delete(instance.type);
1420
- instance.appContext.optionsCache.delete(instance.type);
1421
- if (instance.ceReload) {
1422
- hmrDirtyComponents.add(oldComp);
1423
- instance.ceReload(newComp.styles);
1424
- hmrDirtyComponents.delete(oldComp);
1425
- } else if (instance.parent) {
1426
- queueJob(instance.parent.update);
1427
- } else if (instance.appContext.reload) {
1428
- instance.appContext.reload();
1429
- } else if (typeof window !== "undefined") {
1430
- window.location.reload();
1431
- } else {
1432
- console.warn(
1433
- "[HMR] Root or manually mounted instance modified. Full reload required."
1434
- );
1435
- }
1436
- }
1437
- queuePostFlushCb(() => {
1438
- for (const instance of instances) {
1439
- hmrDirtyComponents.delete(
1440
- normalizeClassComponent(instance.type)
1441
- );
1442
- }
1443
- });
1444
- }
1445
- function updateComponentDef(oldComp, newComp) {
1446
- extend(oldComp, newComp);
1447
- for (const key in oldComp) {
1448
- if (key !== "__file" && !(key in newComp)) {
1449
- delete oldComp[key];
1450
- }
1451
- }
1452
- }
1453
- function tryWrap(fn) {
1454
- return (id, arg) => {
1455
- try {
1456
- return fn(id, arg);
1457
- } catch (e) {
1458
- console.error(e);
1459
- console.warn(
1460
- `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
1461
- );
1462
- }
1463
- };
1464
- }
1465
-
1466
- let currentRenderingInstance = null;
1467
- let currentScopeId = null;
1468
- function markAttrsAccessed() {
1469
- }
1470
-
1471
- const isSuspense = (type) => type.__isSuspense;
1472
- function queueEffectWithSuspense(fn, suspense) {
1473
- if (suspense && suspense.pendingBranch) {
1474
- if (isArray(fn)) {
1475
- suspense.effects.push(...fn);
1476
- } else {
1477
- suspense.effects.push(fn);
1478
- }
1479
- } else {
1480
- queuePostFlushCb(fn);
1481
- }
1482
- }
1483
- const INITIAL_WATCHER_VALUE = {};
1484
- function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
1485
- var _a;
1486
- if (!!(process.env.NODE_ENV !== "production") && !cb) {
1487
- if (immediate !== void 0) {
1488
- warn(
1489
- `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
1490
- );
1491
- }
1492
- if (deep !== void 0) {
1493
- warn(
1494
- `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
1495
- );
1496
- }
1497
- }
1498
- const warnInvalidSource = (s) => {
1499
- warn(
1500
- `Invalid watch source: `,
1501
- s,
1502
- `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
1503
- );
1504
- };
1505
- const instance = getCurrentScope() === ((_a = currentInstance) == null ? void 0 : _a.scope) ? currentInstance : null;
1506
- let getter;
1507
- let forceTrigger = false;
1508
- let isMultiSource = false;
1509
- if (isRef(source)) {
1510
- getter = () => source.value;
1511
- forceTrigger = isShallow$1(source);
1512
- } else if (isReactive(source)) {
1513
- getter = () => source;
1514
- deep = true;
1515
- } else if (isArray(source)) {
1516
- isMultiSource = true;
1517
- forceTrigger = source.some((s) => isReactive(s) || isShallow$1(s));
1518
- getter = () => source.map((s) => {
1519
- if (isRef(s)) {
1520
- return s.value;
1521
- } else if (isReactive(s)) {
1522
- return traverse(s);
1523
- } else if (isFunction(s)) {
1524
- return callWithErrorHandling(s, instance, 2);
1525
- } else {
1526
- !!(process.env.NODE_ENV !== "production") && warnInvalidSource(s);
1527
- }
1528
- });
1529
- } else if (isFunction(source)) {
1530
- if (cb) {
1531
- getter = () => callWithErrorHandling(source, instance, 2);
1532
- } else {
1533
- getter = () => {
1534
- if (instance && instance.isUnmounted) {
1535
- return;
1536
- }
1537
- if (cleanup) {
1538
- cleanup();
1539
- }
1540
- return callWithAsyncErrorHandling(
1541
- source,
1542
- instance,
1543
- 3,
1544
- [onCleanup]
1545
- );
1546
- };
1547
- }
1548
- } else {
1549
- getter = NOOP;
1550
- !!(process.env.NODE_ENV !== "production") && warnInvalidSource(source);
1551
- }
1552
- if (cb && deep) {
1553
- const baseGetter = getter;
1554
- getter = () => traverse(baseGetter());
1555
- }
1556
- let cleanup;
1557
- let onCleanup = (fn) => {
1558
- cleanup = effect.onStop = () => {
1559
- callWithErrorHandling(fn, instance, 4);
1560
- };
1561
- };
1562
- let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
1563
- const job = () => {
1564
- if (!effect.active) {
1565
- return;
1566
- }
1567
- if (cb) {
1568
- const newValue = effect.run();
1569
- if (deep || forceTrigger || (isMultiSource ? newValue.some(
1570
- (v, i) => hasChanged(v, oldValue[i])
1571
- ) : hasChanged(newValue, oldValue)) || false) {
1572
- if (cleanup) {
1573
- cleanup();
1574
- }
1575
- callWithAsyncErrorHandling(cb, instance, 3, [
1576
- newValue,
1577
- // pass undefined as the old value when it's changed for the first time
1578
- oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
1579
- onCleanup
1580
- ]);
1581
- oldValue = newValue;
1582
- }
1583
- } else {
1584
- effect.run();
1585
- }
1586
- };
1587
- job.allowRecurse = !!cb;
1588
- let scheduler;
1589
- if (flush === "sync") {
1590
- scheduler = job;
1591
- } else if (flush === "post") {
1592
- scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
1593
- } else {
1594
- job.pre = true;
1595
- if (instance)
1596
- job.id = instance.uid;
1597
- scheduler = () => queueJob(job);
1598
- }
1599
- const effect = new ReactiveEffect(getter, scheduler);
1600
- if (!!(process.env.NODE_ENV !== "production")) {
1601
- effect.onTrack = onTrack;
1602
- effect.onTrigger = onTrigger;
1603
- }
1604
- if (cb) {
1605
- if (immediate) {
1606
- job();
1607
- } else {
1608
- oldValue = effect.run();
1609
- }
1610
- } else if (flush === "post") {
1611
- queuePostRenderEffect(
1612
- effect.run.bind(effect),
1613
- instance && instance.suspense
1614
- );
1615
- } else {
1616
- effect.run();
1617
- }
1618
- const unwatch = () => {
1619
- effect.stop();
1620
- if (instance && instance.scope) {
1621
- remove(instance.scope.effects, effect);
1622
- }
1623
- };
1624
- return unwatch;
1625
- }
1626
- function instanceWatch(source, value, options) {
1627
- const publicThis = this.proxy;
1628
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
1629
- let cb;
1630
- if (isFunction(value)) {
1631
- cb = value;
1632
- } else {
1633
- cb = value.handler;
1634
- options = value;
1635
- }
1636
- const cur = currentInstance;
1637
- setCurrentInstance(this);
1638
- const res = doWatch(getter, cb.bind(publicThis), options);
1639
- if (cur) {
1640
- setCurrentInstance(cur);
1641
- } else {
1642
- unsetCurrentInstance();
1643
- }
1644
- return res;
1645
- }
1646
- function createPathGetter(ctx, path) {
1647
- const segments = path.split(".");
1648
- return () => {
1649
- let cur = ctx;
1650
- for (let i = 0; i < segments.length && cur; i++) {
1651
- cur = cur[segments[i]];
1652
- }
1653
- return cur;
1654
- };
1655
- }
1656
- function traverse(value, seen) {
1657
- if (!isObject(value) || value["__v_skip"]) {
1658
- return value;
1659
- }
1660
- seen = seen || /* @__PURE__ */ new Set();
1661
- if (seen.has(value)) {
1662
- return value;
1663
- }
1664
- seen.add(value);
1665
- if (isRef(value)) {
1666
- traverse(value.value, seen);
1667
- } else if (isArray(value)) {
1668
- for (let i = 0; i < value.length; i++) {
1669
- traverse(value[i], seen);
1670
- }
1671
- } else if (isSet(value) || isMap(value)) {
1672
- value.forEach((v) => {
1673
- traverse(v, seen);
1674
- });
1675
- } else if (isPlainObject(value)) {
1676
- for (const key in value) {
1677
- traverse(value[key], seen);
1678
- }
1679
- }
1680
- return value;
1681
- }
1682
-
1683
- function defineComponent(options, extraOptions) {
1684
- return isFunction(options) ? (
1685
- // #8326: extend call and options.name access are considered side-effects
1686
- // by Rollup, so we have to wrap it in a pure-annotated IIFE.
1687
- /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
1688
- ) : options;
1689
- }
1690
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
1691
-
1692
- const getPublicInstance = (i) => {
1693
- if (!i)
1694
- return null;
1695
- if (isStatefulComponent(i))
1696
- return getExposeProxy(i) || i.proxy;
1697
- return getPublicInstance(i.parent);
1698
- };
1699
- const publicPropertiesMap = (
1700
- // Move PURE marker to new line to workaround compiler discarding it
1701
- // due to type annotation
1702
- /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
1703
- $: (i) => i,
1704
- $el: (i) => i.vnode.el,
1705
- $data: (i) => i.data,
1706
- $props: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.props) : i.props,
1707
- $attrs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.attrs) : i.attrs,
1708
- $slots: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.slots) : i.slots,
1709
- $refs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.refs) : i.refs,
1710
- $parent: (i) => getPublicInstance(i.parent),
1711
- $root: (i) => getPublicInstance(i.root),
1712
- $emit: (i) => i.emit,
1713
- $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
1714
- $forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),
1715
- $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
1716
- $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
1717
- })
1718
- );
1719
- const isReservedPrefix = (key) => key === "_" || key === "$";
1720
- const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
1721
- const PublicInstanceProxyHandlers = {
1722
- get({ _: instance }, key) {
1723
- const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
1724
- if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") {
1725
- return true;
1726
- }
1727
- let normalizedProps;
1728
- if (key[0] !== "$") {
1729
- const n = accessCache[key];
1730
- if (n !== void 0) {
1731
- switch (n) {
1732
- case 1 /* SETUP */:
1733
- return setupState[key];
1734
- case 2 /* DATA */:
1735
- return data[key];
1736
- case 4 /* CONTEXT */:
1737
- return ctx[key];
1738
- case 3 /* PROPS */:
1739
- return props[key];
1740
- }
1741
- } else if (hasSetupBinding(setupState, key)) {
1742
- accessCache[key] = 1 /* SETUP */;
1743
- return setupState[key];
1744
- } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
1745
- accessCache[key] = 2 /* DATA */;
1746
- return data[key];
1747
- } else if (
1748
- // only cache other properties when instance has declared (thus stable)
1749
- // props
1750
- (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
1751
- ) {
1752
- accessCache[key] = 3 /* PROPS */;
1753
- return props[key];
1754
- } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
1755
- accessCache[key] = 4 /* CONTEXT */;
1756
- return ctx[key];
1757
- } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
1758
- accessCache[key] = 0 /* OTHER */;
1759
- }
1760
- }
1761
- const publicGetter = publicPropertiesMap[key];
1762
- let cssModule, globalProperties;
1763
- if (publicGetter) {
1764
- if (key === "$attrs") {
1765
- track(instance, "get", key);
1766
- !!(process.env.NODE_ENV !== "production") && markAttrsAccessed();
1767
- } else if (!!(process.env.NODE_ENV !== "production") && key === "$slots") {
1768
- track(instance, "get", key);
1769
- }
1770
- return publicGetter(instance);
1771
- } else if (
1772
- // css module (injected by vue-loader)
1773
- (cssModule = type.__cssModules) && (cssModule = cssModule[key])
1774
- ) {
1775
- return cssModule;
1776
- } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
1777
- accessCache[key] = 4 /* CONTEXT */;
1778
- return ctx[key];
1779
- } else if (
1780
- // global properties
1781
- globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
1782
- ) {
1783
- {
1784
- return globalProperties[key];
1785
- }
1786
- } else if (!!(process.env.NODE_ENV !== "production") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
1787
- // to infinite warning loop
1788
- key.indexOf("__v") !== 0)) {
1789
- if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
1790
- warn(
1791
- `Property ${JSON.stringify(
1792
- key
1793
- )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
1794
- );
1795
- } else if (instance === currentRenderingInstance) {
1796
- warn(
1797
- `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
1798
- );
1799
- }
1800
- }
1801
- },
1802
- set({ _: instance }, key, value) {
1803
- const { data, setupState, ctx } = instance;
1804
- if (hasSetupBinding(setupState, key)) {
1805
- setupState[key] = value;
1806
- return true;
1807
- } else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn(setupState, key)) {
1808
- warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
1809
- return false;
1810
- } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
1811
- data[key] = value;
1812
- return true;
1813
- } else if (hasOwn(instance.props, key)) {
1814
- !!(process.env.NODE_ENV !== "production") && warn(`Attempting to mutate prop "${key}". Props are readonly.`);
1815
- return false;
1816
- }
1817
- if (key[0] === "$" && key.slice(1) in instance) {
1818
- !!(process.env.NODE_ENV !== "production") && warn(
1819
- `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
1820
- );
1821
- return false;
1822
- } else {
1823
- if (!!(process.env.NODE_ENV !== "production") && key in instance.appContext.config.globalProperties) {
1824
- Object.defineProperty(ctx, key, {
1825
- enumerable: true,
1826
- configurable: true,
1827
- value
1828
- });
1829
- } else {
1830
- ctx[key] = value;
1831
- }
1832
- }
1833
- return true;
1834
- },
1835
- has({
1836
- _: { data, setupState, accessCache, ctx, appContext, propsOptions }
1837
- }, key) {
1838
- let normalizedProps;
1839
- return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
1840
- },
1841
- defineProperty(target, key, descriptor) {
1842
- if (descriptor.get != null) {
1843
- target._.accessCache[key] = 0;
1844
- } else if (hasOwn(descriptor, "value")) {
1845
- this.set(target, key, descriptor.value, null);
1846
- }
1847
- return Reflect.defineProperty(target, key, descriptor);
1848
- }
1849
- };
1850
- if (!!(process.env.NODE_ENV !== "production") && true) {
1851
- PublicInstanceProxyHandlers.ownKeys = (target) => {
1852
- warn(
1853
- `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
1854
- );
1855
- return Reflect.ownKeys(target);
1856
- };
1857
- }
1858
- function normalizePropsOrEmits(props) {
1859
- return isArray(props) ? props.reduce(
1860
- (normalized, p) => (normalized[p] = null, normalized),
1861
- {}
1862
- ) : props;
1863
- }
1864
- let shouldCacheAccess = true;
1865
- function resolveMergedOptions(instance) {
1866
- const base = instance.type;
1867
- const { mixins, extends: extendsOptions } = base;
1868
- const {
1869
- mixins: globalMixins,
1870
- optionsCache: cache,
1871
- config: { optionMergeStrategies }
1872
- } = instance.appContext;
1873
- const cached = cache.get(base);
1874
- let resolved;
1875
- if (cached) {
1876
- resolved = cached;
1877
- } else if (!globalMixins.length && !mixins && !extendsOptions) {
1878
- {
1879
- resolved = base;
1880
- }
1881
- } else {
1882
- resolved = {};
1883
- if (globalMixins.length) {
1884
- globalMixins.forEach(
1885
- (m) => mergeOptions(resolved, m, optionMergeStrategies, true)
1886
- );
1887
- }
1888
- mergeOptions(resolved, base, optionMergeStrategies);
1889
- }
1890
- if (isObject(base)) {
1891
- cache.set(base, resolved);
1892
- }
1893
- return resolved;
1894
- }
1895
- function mergeOptions(to, from, strats, asMixin = false) {
1896
- const { mixins, extends: extendsOptions } = from;
1897
- if (extendsOptions) {
1898
- mergeOptions(to, extendsOptions, strats, true);
1899
- }
1900
- if (mixins) {
1901
- mixins.forEach(
1902
- (m) => mergeOptions(to, m, strats, true)
1903
- );
1904
- }
1905
- for (const key in from) {
1906
- if (asMixin && key === "expose") {
1907
- !!(process.env.NODE_ENV !== "production") && warn(
1908
- `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
1909
- );
1910
- } else {
1911
- const strat = internalOptionMergeStrats[key] || strats && strats[key];
1912
- to[key] = strat ? strat(to[key], from[key]) : from[key];
1913
- }
1914
- }
1915
- return to;
1916
- }
1917
- const internalOptionMergeStrats = {
1918
- data: mergeDataFn,
1919
- props: mergeEmitsOrPropsOptions,
1920
- emits: mergeEmitsOrPropsOptions,
1921
- // objects
1922
- methods: mergeObjectOptions,
1923
- computed: mergeObjectOptions,
1924
- // lifecycle
1925
- beforeCreate: mergeAsArray,
1926
- created: mergeAsArray,
1927
- beforeMount: mergeAsArray,
1928
- mounted: mergeAsArray,
1929
- beforeUpdate: mergeAsArray,
1930
- updated: mergeAsArray,
1931
- beforeDestroy: mergeAsArray,
1932
- beforeUnmount: mergeAsArray,
1933
- destroyed: mergeAsArray,
1934
- unmounted: mergeAsArray,
1935
- activated: mergeAsArray,
1936
- deactivated: mergeAsArray,
1937
- errorCaptured: mergeAsArray,
1938
- serverPrefetch: mergeAsArray,
1939
- // assets
1940
- components: mergeObjectOptions,
1941
- directives: mergeObjectOptions,
1942
- // watch
1943
- watch: mergeWatchOptions,
1944
- // provide / inject
1945
- provide: mergeDataFn,
1946
- inject: mergeInject
1947
- };
1948
- function mergeDataFn(to, from) {
1949
- if (!from) {
1950
- return to;
1951
- }
1952
- if (!to) {
1953
- return from;
1954
- }
1955
- return function mergedDataFn() {
1956
- return (extend)(
1957
- isFunction(to) ? to.call(this, this) : to,
1958
- isFunction(from) ? from.call(this, this) : from
1959
- );
1960
- };
1961
- }
1962
- function mergeInject(to, from) {
1963
- return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
1964
- }
1965
- function normalizeInject(raw) {
1966
- if (isArray(raw)) {
1967
- const res = {};
1968
- for (let i = 0; i < raw.length; i++) {
1969
- res[raw[i]] = raw[i];
1970
- }
1971
- return res;
1972
- }
1973
- return raw;
1974
- }
1975
- function mergeAsArray(to, from) {
1976
- return to ? [...new Set([].concat(to, from))] : from;
1977
- }
1978
- function mergeObjectOptions(to, from) {
1979
- return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
1980
- }
1981
- function mergeEmitsOrPropsOptions(to, from) {
1982
- if (to) {
1983
- if (isArray(to) && isArray(from)) {
1984
- return [.../* @__PURE__ */ new Set([...to, ...from])];
1985
- }
1986
- return extend(
1987
- /* @__PURE__ */ Object.create(null),
1988
- normalizePropsOrEmits(to),
1989
- normalizePropsOrEmits(from != null ? from : {})
1990
- );
1991
- } else {
1992
- return from;
1993
- }
1994
- }
1995
- function mergeWatchOptions(to, from) {
1996
- if (!to)
1997
- return from;
1998
- if (!from)
1999
- return to;
2000
- const merged = extend(/* @__PURE__ */ Object.create(null), to);
2001
- for (const key in from) {
2002
- merged[key] = mergeAsArray(to[key], from[key]);
2003
- }
2004
- return merged;
2005
- }
2006
-
2007
- function createAppContext() {
2008
- return {
2009
- app: null,
2010
- config: {
2011
- isNativeTag: NO,
2012
- performance: false,
2013
- globalProperties: {},
2014
- optionMergeStrategies: {},
2015
- errorHandler: void 0,
2016
- warnHandler: void 0,
2017
- compilerOptions: {}
2018
- },
2019
- mixins: [],
2020
- components: {},
2021
- directives: {},
2022
- provides: /* @__PURE__ */ Object.create(null),
2023
- optionsCache: /* @__PURE__ */ new WeakMap(),
2024
- propsCache: /* @__PURE__ */ new WeakMap(),
2025
- emitsCache: /* @__PURE__ */ new WeakMap()
2026
- };
2027
- }
2028
- let currentApp = null;
2029
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
2030
- const instance = currentInstance || currentRenderingInstance;
2031
- if (instance || currentApp) {
2032
- const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;
2033
- if (provides && key in provides) {
2034
- return provides[key];
2035
- } else if (arguments.length > 1) {
2036
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
2037
- } else if (!!(process.env.NODE_ENV !== "production")) {
2038
- warn(`injection "${String(key)}" not found.`);
2039
- }
2040
- } else if (!!(process.env.NODE_ENV !== "production")) {
2041
- warn(`inject() can only be used inside setup() or functional components.`);
2042
- }
2043
- }
2044
-
2045
- const queuePostRenderEffect = queueEffectWithSuspense ;
2046
-
2047
- const isTeleport = (type) => type.__isTeleport;
2048
-
2049
- const Fragment = Symbol.for("v-fgt");
2050
- const Text = Symbol.for("v-txt");
2051
- const Comment = Symbol.for("v-cmt");
2052
- let currentBlock = null;
2053
- function isVNode(value) {
2054
- return value ? value.__v_isVNode === true : false;
2055
- }
2056
- const createVNodeWithArgsTransform = (...args) => {
2057
- return _createVNode(
2058
- ...args
2059
- );
2060
- };
2061
- const InternalObjectKey = `__vInternal`;
2062
- const normalizeKey = ({ key }) => key != null ? key : null;
2063
- const normalizeRef = ({
2064
- ref,
2065
- ref_key,
2066
- ref_for
2067
- }) => {
2068
- if (typeof ref === "number") {
2069
- ref = "" + ref;
2070
- }
2071
- return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null;
2072
- };
2073
- function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
2074
- const vnode = {
2075
- __v_isVNode: true,
2076
- __v_skip: true,
2077
- type,
2078
- props,
2079
- key: props && normalizeKey(props),
2080
- ref: props && normalizeRef(props),
2081
- scopeId: currentScopeId,
2082
- slotScopeIds: null,
2083
- children,
2084
- component: null,
2085
- suspense: null,
2086
- ssContent: null,
2087
- ssFallback: null,
2088
- dirs: null,
2089
- transition: null,
2090
- el: null,
2091
- anchor: null,
2092
- target: null,
2093
- targetAnchor: null,
2094
- staticCount: 0,
2095
- shapeFlag,
2096
- patchFlag,
2097
- dynamicProps,
2098
- dynamicChildren: null,
2099
- appContext: null,
2100
- ctx: currentRenderingInstance
2101
- };
2102
- if (needFullChildrenNormalization) {
2103
- normalizeChildren(vnode, children);
2104
- if (shapeFlag & 128) {
2105
- type.normalize(vnode);
2106
- }
2107
- } else if (children) {
2108
- vnode.shapeFlag |= isString(children) ? 8 : 16;
2109
- }
2110
- if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) {
2111
- warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
2112
- }
2113
- if (// avoid a block node from tracking itself
2114
- !isBlockNode && // has current parent block
2115
- currentBlock && // presence of a patch flag indicates this node needs patching on updates.
2116
- // component nodes also should always be patched, because even if the
2117
- // component doesn't need to update, it needs to persist the instance on to
2118
- // the next vnode so that it can be properly unmounted later.
2119
- (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
2120
- // vnode should not be considered dynamic due to handler caching.
2121
- vnode.patchFlag !== 32) {
2122
- currentBlock.push(vnode);
2123
- }
2124
- return vnode;
2125
- }
2126
- const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithArgsTransform : _createVNode;
2127
- function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
2128
- if (!type || type === NULL_DYNAMIC_COMPONENT) {
2129
- if (!!(process.env.NODE_ENV !== "production") && !type) {
2130
- warn(`Invalid vnode type when creating vnode: ${type}.`);
2131
- }
2132
- type = Comment;
2133
- }
2134
- if (isVNode(type)) {
2135
- const cloned = cloneVNode(
2136
- type,
2137
- props,
2138
- true
2139
- /* mergeRef: true */
2140
- );
2141
- if (children) {
2142
- normalizeChildren(cloned, children);
2143
- }
2144
- if (!isBlockNode && currentBlock) {
2145
- if (cloned.shapeFlag & 6) {
2146
- currentBlock[currentBlock.indexOf(type)] = cloned;
2147
- } else {
2148
- currentBlock.push(cloned);
2149
- }
2150
- }
2151
- cloned.patchFlag |= -2;
2152
- return cloned;
2153
- }
2154
- if (isClassComponent(type)) {
2155
- type = type.__vccOpts;
2156
- }
2157
- if (props) {
2158
- props = guardReactiveProps(props);
2159
- let { class: klass, style } = props;
2160
- if (klass && !isString(klass)) {
2161
- props.class = normalizeClass(klass);
2162
- }
2163
- if (isObject(style)) {
2164
- if (isProxy(style) && !isArray(style)) {
2165
- style = extend({}, style);
2166
- }
2167
- props.style = normalizeStyle(style);
2168
- }
2169
- }
2170
- const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
2171
- if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) {
2172
- type = toRaw(type);
2173
- warn(
2174
- `Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
2175
- `
2176
- Component that was made reactive: `,
2177
- type
2178
- );
2179
- }
2180
- return createBaseVNode(
2181
- type,
2182
- props,
2183
- children,
2184
- patchFlag,
2185
- dynamicProps,
2186
- shapeFlag,
2187
- isBlockNode,
2188
- true
2189
- );
2190
- }
2191
- function guardReactiveProps(props) {
2192
- if (!props)
2193
- return null;
2194
- return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
2195
- }
2196
- function cloneVNode(vnode, extraProps, mergeRef = false) {
2197
- const { props, ref, patchFlag, children } = vnode;
2198
- const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
2199
- const cloned = {
2200
- __v_isVNode: true,
2201
- __v_skip: true,
2202
- type: vnode.type,
2203
- props: mergedProps,
2204
- key: mergedProps && normalizeKey(mergedProps),
2205
- ref: extraProps && extraProps.ref ? (
2206
- // #2078 in the case of <component :is="vnode" ref="extra"/>
2207
- // if the vnode itself already has a ref, cloneVNode will need to merge
2208
- // the refs so the single vnode can be set on multiple refs
2209
- mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps)
2210
- ) : ref,
2211
- scopeId: vnode.scopeId,
2212
- slotScopeIds: vnode.slotScopeIds,
2213
- children: !!(process.env.NODE_ENV !== "production") && patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
2214
- target: vnode.target,
2215
- targetAnchor: vnode.targetAnchor,
2216
- staticCount: vnode.staticCount,
2217
- shapeFlag: vnode.shapeFlag,
2218
- // if the vnode is cloned with extra props, we can no longer assume its
2219
- // existing patch flag to be reliable and need to add the FULL_PROPS flag.
2220
- // note: preserve flag for fragments since they use the flag for children
2221
- // fast paths only.
2222
- patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
2223
- dynamicProps: vnode.dynamicProps,
2224
- dynamicChildren: vnode.dynamicChildren,
2225
- appContext: vnode.appContext,
2226
- dirs: vnode.dirs,
2227
- transition: vnode.transition,
2228
- // These should technically only be non-null on mounted VNodes. However,
2229
- // they *should* be copied for kept-alive vnodes. So we just always copy
2230
- // them since them being non-null during a mount doesn't affect the logic as
2231
- // they will simply be overwritten.
2232
- component: vnode.component,
2233
- suspense: vnode.suspense,
2234
- ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
2235
- ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
2236
- el: vnode.el,
2237
- anchor: vnode.anchor,
2238
- ctx: vnode.ctx,
2239
- ce: vnode.ce
2240
- };
2241
- return cloned;
2242
- }
2243
- function deepCloneVNode(vnode) {
2244
- const cloned = cloneVNode(vnode);
2245
- if (isArray(vnode.children)) {
2246
- cloned.children = vnode.children.map(deepCloneVNode);
2247
- }
2248
- return cloned;
2249
- }
2250
- function createTextVNode(text = " ", flag = 0) {
2251
- return createVNode(Text, null, text, flag);
2252
- }
2253
- function normalizeChildren(vnode, children) {
2254
- let type = 0;
2255
- const { shapeFlag } = vnode;
2256
- if (children == null) {
2257
- children = null;
2258
- } else if (isArray(children)) {
2259
- type = 16;
2260
- } else if (typeof children === "object") {
2261
- if (shapeFlag & (1 | 64)) {
2262
- const slot = children.default;
2263
- if (slot) {
2264
- slot._c && (slot._d = false);
2265
- normalizeChildren(vnode, slot());
2266
- slot._c && (slot._d = true);
2267
- }
2268
- return;
2269
- } else {
2270
- type = 32;
2271
- const slotFlag = children._;
2272
- if (!slotFlag && !(InternalObjectKey in children)) {
2273
- children._ctx = currentRenderingInstance;
2274
- } else if (slotFlag === 3 && currentRenderingInstance) {
2275
- if (currentRenderingInstance.slots._ === 1) {
2276
- children._ = 1;
2277
- } else {
2278
- children._ = 2;
2279
- vnode.patchFlag |= 1024;
2280
- }
2281
- }
2282
- }
2283
- } else if (isFunction(children)) {
2284
- children = { default: children, _ctx: currentRenderingInstance };
2285
- type = 32;
2286
- } else {
2287
- children = String(children);
2288
- if (shapeFlag & 64) {
2289
- type = 16;
2290
- children = [createTextVNode(children)];
2291
- } else {
2292
- type = 8;
2293
- }
2294
- }
2295
- vnode.children = children;
2296
- vnode.shapeFlag |= type;
2297
- }
2298
- function mergeProps(...args) {
2299
- const ret = {};
2300
- for (let i = 0; i < args.length; i++) {
2301
- const toMerge = args[i];
2302
- for (const key in toMerge) {
2303
- if (key === "class") {
2304
- if (ret.class !== toMerge.class) {
2305
- ret.class = normalizeClass([ret.class, toMerge.class]);
2306
- }
2307
- } else if (key === "style") {
2308
- ret.style = normalizeStyle([ret.style, toMerge.style]);
2309
- } else if (isOn(key)) {
2310
- const existing = ret[key];
2311
- const incoming = toMerge[key];
2312
- if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
2313
- ret[key] = existing ? [].concat(existing, incoming) : incoming;
2314
- }
2315
- } else if (key !== "") {
2316
- ret[key] = toMerge[key];
2317
- }
2318
- }
2319
- }
2320
- return ret;
2321
- }
2322
-
2323
- createAppContext();
2324
- let currentInstance = null;
2325
- const getCurrentInstance = () => currentInstance || currentRenderingInstance;
2326
- let internalSetCurrentInstance;
2327
- let globalCurrentInstanceSetters;
2328
- let settersKey = "__VUE_INSTANCE_SETTERS__";
2329
- {
2330
- if (!(globalCurrentInstanceSetters = getGlobalThis()[settersKey])) {
2331
- globalCurrentInstanceSetters = getGlobalThis()[settersKey] = [];
2332
- }
2333
- globalCurrentInstanceSetters.push((i) => currentInstance = i);
2334
- internalSetCurrentInstance = (instance) => {
2335
- if (globalCurrentInstanceSetters.length > 1) {
2336
- globalCurrentInstanceSetters.forEach((s) => s(instance));
2337
- } else {
2338
- globalCurrentInstanceSetters[0](instance);
2339
- }
2340
- };
2341
- }
2342
- const setCurrentInstance = (instance) => {
2343
- internalSetCurrentInstance(instance);
2344
- instance.scope.on();
2345
- };
2346
- const unsetCurrentInstance = () => {
2347
- currentInstance && currentInstance.scope.off();
2348
- internalSetCurrentInstance(null);
2349
- };
2350
- function isStatefulComponent(instance) {
2351
- return instance.vnode.shapeFlag & 4;
2352
- }
2353
- function getExposeProxy(instance) {
2354
- if (instance.exposed) {
2355
- return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
2356
- get(target, key) {
2357
- if (key in target) {
2358
- return target[key];
2359
- } else if (key in publicPropertiesMap) {
2360
- return publicPropertiesMap[key](instance);
2361
- }
2362
- },
2363
- has(target, key) {
2364
- return key in target || key in publicPropertiesMap;
2365
- }
2366
- }));
2367
- }
2368
- }
2369
- const classifyRE = /(?:^|[-_])(\w)/g;
2370
- const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
2371
- function getComponentName(Component, includeInferred = true) {
2372
- return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
2373
- }
2374
- function formatComponentName(instance, Component, isRoot = false) {
2375
- let name = getComponentName(Component);
2376
- if (!name && Component.__file) {
2377
- const match = Component.__file.match(/([^/\\]+)\.\w+$/);
2378
- if (match) {
2379
- name = match[1];
2380
- }
2381
- }
2382
- if (!name && instance && instance.parent) {
2383
- const inferFromRegistry = (registry) => {
2384
- for (const key in registry) {
2385
- if (registry[key] === Component) {
2386
- return key;
2387
- }
2388
- }
2389
- };
2390
- name = inferFromRegistry(
2391
- instance.components || instance.parent.type.components
2392
- ) || inferFromRegistry(instance.appContext.components);
2393
- }
2394
- return name ? classify(name) : isRoot ? `App` : `Anonymous`;
2395
- }
2396
- function isClassComponent(value) {
2397
- return isFunction(value) && "__vccOpts" in value;
2398
- }
2399
-
2400
- function h(type, propsOrChildren, children) {
2401
- const l = arguments.length;
2402
- if (l === 2) {
2403
- if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
2404
- if (isVNode(propsOrChildren)) {
2405
- return createVNode(type, null, [propsOrChildren]);
2406
- }
2407
- return createVNode(type, propsOrChildren);
2408
- } else {
2409
- return createVNode(type, null, propsOrChildren);
2410
- }
2411
- } else {
2412
- if (l > 3) {
2413
- children = Array.prototype.slice.call(arguments, 2);
2414
- } else if (l === 3 && isVNode(children)) {
2415
- children = [children];
2416
- }
2417
- return createVNode(type, propsOrChildren, children);
2418
- }
2419
- }
2420
-
2421
- function isShallow(value) {
2422
- return !!(value && value["__v_isShallow"]);
2423
- }
2424
-
2425
- function initCustomFormatter() {
2426
- if (!!!(process.env.NODE_ENV !== "production") || typeof window === "undefined") {
2427
- return;
2428
- }
2429
- const vueStyle = { style: "color:#3ba776" };
2430
- const numberStyle = { style: "color:#0b1bc9" };
2431
- const stringStyle = { style: "color:#b62e24" };
2432
- const keywordStyle = { style: "color:#9d288c" };
2433
- const formatter = {
2434
- header(obj) {
2435
- if (!isObject(obj)) {
2436
- return null;
2437
- }
2438
- if (obj.__isVue) {
2439
- return ["div", vueStyle, `VueInstance`];
2440
- } else if (isRef(obj)) {
2441
- return [
2442
- "div",
2443
- {},
2444
- ["span", vueStyle, genRefFlag(obj)],
2445
- "<",
2446
- formatValue(obj.value),
2447
- `>`
2448
- ];
2449
- } else if (isReactive(obj)) {
2450
- return [
2451
- "div",
2452
- {},
2453
- ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"],
2454
- "<",
2455
- formatValue(obj),
2456
- `>${isReadonly(obj) ? ` (readonly)` : ``}`
2457
- ];
2458
- } else if (isReadonly(obj)) {
2459
- return [
2460
- "div",
2461
- {},
2462
- ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"],
2463
- "<",
2464
- formatValue(obj),
2465
- ">"
2466
- ];
2467
- }
2468
- return null;
2469
- },
2470
- hasBody(obj) {
2471
- return obj && obj.__isVue;
2472
- },
2473
- body(obj) {
2474
- if (obj && obj.__isVue) {
2475
- return [
2476
- "div",
2477
- {},
2478
- ...formatInstance(obj.$)
2479
- ];
2480
- }
2481
- }
2482
- };
2483
- function formatInstance(instance) {
2484
- const blocks = [];
2485
- if (instance.type.props && instance.props) {
2486
- blocks.push(createInstanceBlock("props", toRaw(instance.props)));
2487
- }
2488
- if (instance.setupState !== EMPTY_OBJ) {
2489
- blocks.push(createInstanceBlock("setup", instance.setupState));
2490
- }
2491
- if (instance.data !== EMPTY_OBJ) {
2492
- blocks.push(createInstanceBlock("data", toRaw(instance.data)));
2493
- }
2494
- const computed = extractKeys(instance, "computed");
2495
- if (computed) {
2496
- blocks.push(createInstanceBlock("computed", computed));
2497
- }
2498
- const injected = extractKeys(instance, "inject");
2499
- if (injected) {
2500
- blocks.push(createInstanceBlock("injected", injected));
2501
- }
2502
- blocks.push([
2503
- "div",
2504
- {},
2505
- [
2506
- "span",
2507
- {
2508
- style: keywordStyle.style + ";opacity:0.66"
2509
- },
2510
- "$ (internal): "
2511
- ],
2512
- ["object", { object: instance }]
2513
- ]);
2514
- return blocks;
2515
- }
2516
- function createInstanceBlock(type, target) {
2517
- target = extend({}, target);
2518
- if (!Object.keys(target).length) {
2519
- return ["span", {}];
2520
- }
2521
- return [
2522
- "div",
2523
- { style: "line-height:1.25em;margin-bottom:0.6em" },
2524
- [
2525
- "div",
2526
- {
2527
- style: "color:#476582"
2528
- },
2529
- type
2530
- ],
2531
- [
2532
- "div",
2533
- {
2534
- style: "padding-left:1.25em"
2535
- },
2536
- ...Object.keys(target).map((key) => {
2537
- return [
2538
- "div",
2539
- {},
2540
- ["span", keywordStyle, key + ": "],
2541
- formatValue(target[key], false)
2542
- ];
2543
- })
2544
- ]
2545
- ];
2546
- }
2547
- function formatValue(v, asRaw = true) {
2548
- if (typeof v === "number") {
2549
- return ["span", numberStyle, v];
2550
- } else if (typeof v === "string") {
2551
- return ["span", stringStyle, JSON.stringify(v)];
2552
- } else if (typeof v === "boolean") {
2553
- return ["span", keywordStyle, v];
2554
- } else if (isObject(v)) {
2555
- return ["object", { object: asRaw ? toRaw(v) : v }];
2556
- } else {
2557
- return ["span", stringStyle, String(v)];
2558
- }
2559
- }
2560
- function extractKeys(instance, type) {
2561
- const Comp = instance.type;
2562
- if (isFunction(Comp)) {
2563
- return;
2564
- }
2565
- const extracted = {};
2566
- for (const key in instance.ctx) {
2567
- if (isKeyOfType(Comp, key, type)) {
2568
- extracted[key] = instance.ctx[key];
2569
- }
2570
- }
2571
- return extracted;
2572
- }
2573
- function isKeyOfType(Comp, key, type) {
2574
- const opts = Comp[type];
2575
- if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
2576
- return true;
2577
- }
2578
- if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
2579
- return true;
2580
- }
2581
- if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
2582
- return true;
2583
- }
2584
- }
2585
- function genRefFlag(v) {
2586
- if (isShallow(v)) {
2587
- return `ShallowRef`;
2588
- }
2589
- if (v.effect) {
2590
- return `ComputedRef`;
2591
- }
2592
- return `Ref`;
2593
- }
2594
- if (window.devtoolsFormatters) {
2595
- window.devtoolsFormatters.push(formatter);
2596
- } else {
2597
- window.devtoolsFormatters = [formatter];
2598
- }
2599
- }
2600
-
2601
- function initDev() {
2602
- {
2603
- initCustomFormatter();
2604
- }
2605
- }
2606
-
2607
- if (!!(process.env.NODE_ENV !== "production")) {
2608
- initDev();
2609
- }
2610
-
2611
43
  var UPDATE_VALUE_EVENT = 'update:modelValue';
2612
44
  var MODEL_VALUE = 'modelValue';
2613
45
  var ROUTER_LINK_VALUE = 'routerLink';
@@ -2776,7 +208,7 @@ var defineContainer = function (name, defineCustomElement, componentProps, model
2776
208
  };
2777
209
 
2778
210
  /* eslint-disable */
2779
- var VertexSceneTree = /*@__PURE__*/ defineContainer('vertex-scene-tree', undefined, [
211
+ var VertexSceneTree = /*@__PURE__*/ defineContainer('vertex-scene-tree', defineCustomElement, [
2780
212
  'overScanCount',
2781
213
  'viewerSelector',
2782
214
  'viewer',
@@ -2790,7 +222,7 @@ var VertexSceneTree = /*@__PURE__*/ defineContainer('vertex-scene-tree', undefin
2790
222
  'connectionError',
2791
223
  'firstRowRendered'
2792
224
  ]);
2793
- var VertexSceneTreeSearch = /*@__PURE__*/ defineContainer('vertex-scene-tree-search', undefined, [
225
+ var VertexSceneTreeSearch = /*@__PURE__*/ defineContainer('vertex-scene-tree-search', defineCustomElement$1, [
2794
226
  'debounce',
2795
227
  'disabled',
2796
228
  'placeholder',
@@ -2798,7 +230,7 @@ var VertexSceneTreeSearch = /*@__PURE__*/ defineContainer('vertex-scene-tree-sea
2798
230
  'value',
2799
231
  'search'
2800
232
  ]);
2801
- var VertexSceneTreeTableCell = /*@__PURE__*/ defineContainer('vertex-scene-tree-table-cell', undefined, [
233
+ var VertexSceneTreeTableCell = /*@__PURE__*/ defineContainer('vertex-scene-tree-table-cell', defineCustomElement$2, [
2802
234
  'node',
2803
235
  'tree',
2804
236
  'value',
@@ -2816,13 +248,13 @@ var VertexSceneTreeTableCell = /*@__PURE__*/ defineContainer('vertex-scene-tree-
2816
248
  'selectionToggled',
2817
249
  'cellLoaded'
2818
250
  ]);
2819
- var VertexSceneTreeTableColumn = /*@__PURE__*/ defineContainer('vertex-scene-tree-table-column', undefined, [
251
+ var VertexSceneTreeTableColumn = /*@__PURE__*/ defineContainer('vertex-scene-tree-table-column', defineCustomElement$3, [
2820
252
  'initialWidth',
2821
253
  'minWidth',
2822
254
  'maxWidth'
2823
255
  ]);
2824
- var VertexSceneTreeTableHeader = /*@__PURE__*/ defineContainer('vertex-scene-tree-table-header', undefined);
2825
- var VertexSceneTreeTableLayout = /*@__PURE__*/ defineContainer('vertex-scene-tree-table-layout', undefined, [
256
+ var VertexSceneTreeTableHeader = /*@__PURE__*/ defineContainer('vertex-scene-tree-table-header', defineCustomElement$4);
257
+ var VertexSceneTreeTableLayout = /*@__PURE__*/ defineContainer('vertex-scene-tree-table-layout', defineCustomElement$5, [
2826
258
  'tree',
2827
259
  'controller',
2828
260
  'rows',
@@ -2838,10 +270,10 @@ var VertexSceneTreeTableLayout = /*@__PURE__*/ defineContainer('vertex-scene-tre
2838
270
  'viewportEndIndex',
2839
271
  'layoutRendered'
2840
272
  ]);
2841
- var VertexSceneTreeTableResizeDivider = /*@__PURE__*/ defineContainer('vertex-scene-tree-table-resize-divider', undefined);
2842
- var VertexSceneTreeToolbar = /*@__PURE__*/ defineContainer('vertex-scene-tree-toolbar', undefined);
2843
- var VertexSceneTreeToolbarGroup = /*@__PURE__*/ defineContainer('vertex-scene-tree-toolbar-group', undefined);
2844
- var VertexViewer = /*@__PURE__*/ defineContainer('vertex-viewer', undefined, [
273
+ var VertexSceneTreeTableResizeDivider = /*@__PURE__*/ defineContainer('vertex-scene-tree-table-resize-divider', defineCustomElement$6);
274
+ var VertexSceneTreeToolbar = /*@__PURE__*/ defineContainer('vertex-scene-tree-toolbar', defineCustomElement$7);
275
+ var VertexSceneTreeToolbarGroup = /*@__PURE__*/ defineContainer('vertex-scene-tree-toolbar-group', defineCustomElement$8);
276
+ var VertexViewer = /*@__PURE__*/ defineContainer('vertex-viewer', defineCustomElement$9, [
2845
277
  'src',
2846
278
  'clientId',
2847
279
  'deviceId',
@@ -2881,22 +313,22 @@ var VertexViewer = /*@__PURE__*/ defineContainer('vertex-viewer', undefined, [
2881
313
  'deviceIdChange',
2882
314
  'dimensionschange'
2883
315
  ]);
2884
- var VertexViewerBoxQueryTool = /*@__PURE__*/ defineContainer('vertex-viewer-box-query-tool', undefined, [
316
+ var VertexViewerBoxQueryTool = /*@__PURE__*/ defineContainer('vertex-viewer-box-query-tool', defineCustomElement$a, [
2885
317
  'viewer',
2886
318
  'controller',
2887
319
  'model',
2888
320
  'operationType',
2889
321
  'mode'
2890
322
  ]);
2891
- var VertexViewerButton = /*@__PURE__*/ defineContainer('vertex-viewer-button', undefined);
2892
- var VertexViewerDefaultToolbar = /*@__PURE__*/ defineContainer('vertex-viewer-default-toolbar', undefined, [
323
+ var VertexViewerButton = /*@__PURE__*/ defineContainer('vertex-viewer-button', defineCustomElement$b);
324
+ var VertexViewerDefaultToolbar = /*@__PURE__*/ defineContainer('vertex-viewer-default-toolbar', defineCustomElement$c, [
2893
325
  'viewer',
2894
326
  'placement',
2895
327
  'direction',
2896
328
  'animationsDisabled',
2897
329
  'animationMs'
2898
330
  ]);
2899
- var VertexViewerDomElement = /*@__PURE__*/ defineContainer('vertex-viewer-dom-element', undefined, [
331
+ var VertexViewerDomElement = /*@__PURE__*/ defineContainer('vertex-viewer-dom-element', defineCustomElement$d, [
2900
332
  'position',
2901
333
  'positionJson',
2902
334
  'rotation',
@@ -2912,7 +344,7 @@ var VertexViewerDomElement = /*@__PURE__*/ defineContainer('vertex-viewer-dom-el
2912
344
  'interactionsOff',
2913
345
  'propertyChange'
2914
346
  ]);
2915
- var VertexViewerDomGroup = /*@__PURE__*/ defineContainer('vertex-viewer-dom-group', undefined, [
347
+ var VertexViewerDomGroup = /*@__PURE__*/ defineContainer('vertex-viewer-dom-group', defineCustomElement$e, [
2916
348
  'position',
2917
349
  'positionJson',
2918
350
  'rotation',
@@ -2924,25 +356,25 @@ var VertexViewerDomGroup = /*@__PURE__*/ defineContainer('vertex-viewer-dom-grou
2924
356
  'matrix',
2925
357
  'propertyChange'
2926
358
  ]);
2927
- var VertexViewerDomRenderer = /*@__PURE__*/ defineContainer('vertex-viewer-dom-renderer', undefined, [
359
+ var VertexViewerDomRenderer = /*@__PURE__*/ defineContainer('vertex-viewer-dom-renderer', defineCustomElement$f, [
2928
360
  'drawMode',
2929
361
  'viewer',
2930
362
  'camera',
2931
363
  'depthBuffer'
2932
364
  ]);
2933
- var VertexViewerHitResultIndicator = /*@__PURE__*/ defineContainer('vertex-viewer-hit-result-indicator', undefined, [
365
+ var VertexViewerHitResultIndicator = /*@__PURE__*/ defineContainer('vertex-viewer-hit-result-indicator', defineCustomElement$g, [
2934
366
  'viewer',
2935
367
  'position',
2936
368
  'normal'
2937
369
  ]);
2938
- var VertexViewerIcon = /*@__PURE__*/ defineContainer('vertex-viewer-icon', undefined, [
370
+ var VertexViewerIcon = /*@__PURE__*/ defineContainer('vertex-viewer-icon', defineCustomElement$h, [
2939
371
  'name',
2940
372
  'size'
2941
373
  ]);
2942
- var VertexViewerLayer = /*@__PURE__*/ defineContainer('vertex-viewer-layer', undefined, [
374
+ var VertexViewerLayer = /*@__PURE__*/ defineContainer('vertex-viewer-layer', defineCustomElement$i, [
2943
375
  'stretchOff'
2944
376
  ]);
2945
- var VertexViewerMarkup = /*@__PURE__*/ defineContainer('vertex-viewer-markup', undefined, [
377
+ var VertexViewerMarkup = /*@__PURE__*/ defineContainer('vertex-viewer-markup', defineCustomElement$j, [
2946
378
  'arrowTemplateId',
2947
379
  'circleTemplateId',
2948
380
  'freeformTemplateId',
@@ -2955,7 +387,7 @@ var VertexViewerMarkup = /*@__PURE__*/ defineContainer('vertex-viewer-markup', u
2955
387
  'markupRemoved',
2956
388
  'markupSelectionChanged'
2957
389
  ]);
2958
- var VertexViewerMarkupArrow = /*@__PURE__*/ defineContainer('vertex-viewer-markup-arrow', undefined, [
390
+ var VertexViewerMarkupArrow = /*@__PURE__*/ defineContainer('vertex-viewer-markup-arrow', defineCustomElement$k, [
2959
391
  'start',
2960
392
  'startJson',
2961
393
  'end',
@@ -2966,7 +398,7 @@ var VertexViewerMarkupArrow = /*@__PURE__*/ defineContainer('vertex-viewer-marku
2966
398
  'editEnd',
2967
399
  'viewRendered'
2968
400
  ]);
2969
- var VertexViewerMarkupCircle = /*@__PURE__*/ defineContainer('vertex-viewer-markup-circle', undefined, [
401
+ var VertexViewerMarkupCircle = /*@__PURE__*/ defineContainer('vertex-viewer-markup-circle', defineCustomElement$l, [
2970
402
  'bounds',
2971
403
  'boundsJson',
2972
404
  'mode',
@@ -2975,7 +407,7 @@ var VertexViewerMarkupCircle = /*@__PURE__*/ defineContainer('vertex-viewer-mark
2975
407
  'editEnd',
2976
408
  'viewRendered'
2977
409
  ]);
2978
- var VertexViewerMarkupFreeform = /*@__PURE__*/ defineContainer('vertex-viewer-markup-freeform', undefined, [
410
+ var VertexViewerMarkupFreeform = /*@__PURE__*/ defineContainer('vertex-viewer-markup-freeform', defineCustomElement$m, [
2979
411
  'points',
2980
412
  'pointsJson',
2981
413
  'bounds',
@@ -2986,7 +418,7 @@ var VertexViewerMarkupFreeform = /*@__PURE__*/ defineContainer('vertex-viewer-ma
2986
418
  'editEnd',
2987
419
  'viewRendered'
2988
420
  ]);
2989
- var VertexViewerMarkupTool = /*@__PURE__*/ defineContainer('vertex-viewer-markup-tool', undefined, [
421
+ var VertexViewerMarkupTool = /*@__PURE__*/ defineContainer('vertex-viewer-markup-tool', defineCustomElement$n, [
2990
422
  'arrowTemplateId',
2991
423
  'circleTemplateId',
2992
424
  'freeformTemplateId',
@@ -2996,7 +428,7 @@ var VertexViewerMarkupTool = /*@__PURE__*/ defineContainer('vertex-viewer-markup
2996
428
  'markupBegin',
2997
429
  'markupEnd'
2998
430
  ]);
2999
- var VertexViewerMeasurementDetails = /*@__PURE__*/ defineContainer('vertex-viewer-measurement-details', undefined, [
431
+ var VertexViewerMeasurementDetails = /*@__PURE__*/ defineContainer('vertex-viewer-measurement-details', defineCustomElement$o, [
3000
432
  'measurementModel',
3001
433
  'measurementOverlays',
3002
434
  'measurementOutcome',
@@ -3008,7 +440,7 @@ var VertexViewerMeasurementDetails = /*@__PURE__*/ defineContainer('vertex-viewe
3008
440
  'areaFormatter',
3009
441
  'resultTypes'
3010
442
  ]);
3011
- var VertexViewerMeasurementDistance = /*@__PURE__*/ defineContainer('vertex-viewer-measurement-distance', undefined, [
443
+ var VertexViewerMeasurementDistance = /*@__PURE__*/ defineContainer('vertex-viewer-measurement-distance', defineCustomElement$p, [
3012
444
  'start',
3013
445
  'startJson',
3014
446
  'end',
@@ -3032,18 +464,18 @@ var VertexViewerMeasurementDistance = /*@__PURE__*/ defineContainer('vertex-view
3032
464
  'editBegin',
3033
465
  'editEnd'
3034
466
  ]);
3035
- var VertexViewerMeasurementLine = /*@__PURE__*/ defineContainer('vertex-viewer-measurement-line', undefined, [
467
+ var VertexViewerMeasurementLine = /*@__PURE__*/ defineContainer('vertex-viewer-measurement-line', defineCustomElement$q, [
3036
468
  'start',
3037
469
  'end',
3038
470
  'capLength',
3039
471
  'pointerEvents'
3040
472
  ]);
3041
- var VertexViewerMeasurementOverlays = /*@__PURE__*/ defineContainer('vertex-viewer-measurement-overlays', undefined, [
473
+ var VertexViewerMeasurementOverlays = /*@__PURE__*/ defineContainer('vertex-viewer-measurement-overlays', defineCustomElement$r, [
3042
474
  'measurementOverlays',
3043
475
  'camera',
3044
476
  'viewer'
3045
477
  ]);
3046
- var VertexViewerMeasurementPrecise = /*@__PURE__*/ defineContainer('vertex-viewer-measurement-precise', undefined, [
478
+ var VertexViewerMeasurementPrecise = /*@__PURE__*/ defineContainer('vertex-viewer-measurement-precise', defineCustomElement$s, [
3047
479
  'measurementModel',
3048
480
  'measurementOverlays',
3049
481
  'measurementController',
@@ -3052,7 +484,7 @@ var VertexViewerMeasurementPrecise = /*@__PURE__*/ defineContainer('vertex-viewe
3052
484
  'configEnv',
3053
485
  'config'
3054
486
  ]);
3055
- var VertexViewerPinGroup = /*@__PURE__*/ defineContainer('vertex-viewer-pin-group', undefined, [
487
+ var VertexViewerPinGroup = /*@__PURE__*/ defineContainer('vertex-viewer-pin-group', defineCustomElement$t, [
3056
488
  'pin',
3057
489
  'matrix',
3058
490
  'projectionViewMatrix',
@@ -3061,7 +493,7 @@ var VertexViewerPinGroup = /*@__PURE__*/ defineContainer('vertex-viewer-pin-grou
3061
493
  'pinController',
3062
494
  'selected'
3063
495
  ]);
3064
- var VertexViewerPinLabel = /*@__PURE__*/ defineContainer('vertex-viewer-pin-label', undefined, [
496
+ var VertexViewerPinLabel = /*@__PURE__*/ defineContainer('vertex-viewer-pin-label', defineCustomElement$u, [
3065
497
  'pin',
3066
498
  'elementBounds',
3067
499
  'value',
@@ -3070,12 +502,12 @@ var VertexViewerPinLabel = /*@__PURE__*/ defineContainer('vertex-viewer-pin-labe
3070
502
  'labelFocused',
3071
503
  'labelBlurred'
3072
504
  ]);
3073
- var VertexViewerPinLabelLine = /*@__PURE__*/ defineContainer('vertex-viewer-pin-label-line', undefined, [
505
+ var VertexViewerPinLabelLine = /*@__PURE__*/ defineContainer('vertex-viewer-pin-label-line', defineCustomElement$v, [
3074
506
  'pinPoint',
3075
507
  'labelPoint',
3076
508
  'pin'
3077
509
  ]);
3078
- var VertexViewerPinTool = /*@__PURE__*/ defineContainer('vertex-viewer-pin-tool', undefined, [
510
+ var VertexViewerPinTool = /*@__PURE__*/ defineContainer('vertex-viewer-pin-tool', defineCustomElement$w, [
3079
511
  'pinController',
3080
512
  'pinModel',
3081
513
  'viewer',
@@ -3084,17 +516,17 @@ var VertexViewerPinTool = /*@__PURE__*/ defineContainer('vertex-viewer-pin-tool'
3084
516
  'primaryColor',
3085
517
  'accentColor'
3086
518
  ]);
3087
- var VertexViewerSpinner = /*@__PURE__*/ defineContainer('vertex-viewer-spinner', undefined, [
519
+ var VertexViewerSpinner = /*@__PURE__*/ defineContainer('vertex-viewer-spinner', defineCustomElement$x, [
3088
520
  'size'
3089
521
  ]);
3090
- var VertexViewerToolbar = /*@__PURE__*/ defineContainer('vertex-viewer-toolbar', undefined, [
522
+ var VertexViewerToolbar = /*@__PURE__*/ defineContainer('vertex-viewer-toolbar', defineCustomElement$y, [
3091
523
  'placement',
3092
524
  'direction'
3093
525
  ]);
3094
- var VertexViewerToolbarGroup = /*@__PURE__*/ defineContainer('vertex-viewer-toolbar-group', undefined, [
526
+ var VertexViewerToolbarGroup = /*@__PURE__*/ defineContainer('vertex-viewer-toolbar-group', defineCustomElement$z, [
3095
527
  'direction'
3096
528
  ]);
3097
- var VertexViewerTransformWidget = /*@__PURE__*/ defineContainer('vertex-viewer-transform-widget', undefined, [
529
+ var VertexViewerTransformWidget = /*@__PURE__*/ defineContainer('vertex-viewer-transform-widget', defineCustomElement$A, [
3098
530
  'viewer',
3099
531
  'position',
3100
532
  'rotation',
@@ -3111,7 +543,7 @@ var VertexViewerTransformWidget = /*@__PURE__*/ defineContainer('vertex-viewer-t
3111
543
  'interactionEnded',
3112
544
  'interactionStarted'
3113
545
  ]);
3114
- var VertexViewerViewCube = /*@__PURE__*/ defineContainer('vertex-viewer-view-cube', undefined, [
546
+ var VertexViewerViewCube = /*@__PURE__*/ defineContainer('vertex-viewer-view-cube', defineCustomElement$B, [
3115
547
  'xPositiveLabel',
3116
548
  'xNegativeLabel',
3117
549
  'yPositiveLabel',