@vingy/vuebugger 0.1.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.
package/dist/index.mjs ADDED
@@ -0,0 +1,3925 @@
1
+ import { getCurrentInstance, toValue, watch } from "vue";
2
+
3
+ //#region node_modules/.pnpm/@vue+devtools-shared@8.0.5/node_modules/@vue/devtools-shared/dist/index.js
4
+ var __create$1 = Object.create;
5
+ var __defProp$1 = Object.defineProperty;
6
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames$1 = Object.getOwnPropertyNames;
8
+ var __getProtoOf$1 = Object.getPrototypeOf;
9
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
10
+ var __commonJS$1 = (cb, mod) => function() {
11
+ return mod || (0, cb[__getOwnPropNames$1(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
+ };
13
+ var __copyProps$1 = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames$1(from), i = 0, n = keys.length, key; i < n; i++) {
15
+ key = keys[i];
16
+ if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, {
17
+ get: ((k) => from[k]).bind(null, key),
18
+ enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM$1 = (mod, isNodeMode, target$1) => (target$1 = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target$1, "default", {
24
+ value: mod,
25
+ enumerable: true
26
+ }) : target$1, mod));
27
+ const isBrowser = typeof navigator !== "undefined";
28
+ const target = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : {};
29
+ const isInChromePanel = typeof target.chrome !== "undefined" && !!target.chrome.devtools;
30
+ const isInIframe = isBrowser && target.self !== target.top;
31
+ const isInElectron = typeof navigator !== "undefined" && navigator.userAgent?.toLowerCase().includes("electron");
32
+ const isNuxtApp = typeof window !== "undefined" && !!window.__NUXT__;
33
+ var import_rfdc = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js": ((exports, module) => {
34
+ module.exports = rfdc$1;
35
+ function copyBuffer(cur) {
36
+ if (cur instanceof Buffer) return Buffer.from(cur);
37
+ return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);
38
+ }
39
+ function rfdc$1(opts) {
40
+ opts = opts || {};
41
+ if (opts.circles) return rfdcCircles(opts);
42
+ const constructorHandlers = /* @__PURE__ */ new Map();
43
+ constructorHandlers.set(Date, (o) => new Date(o));
44
+ constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
45
+ constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
46
+ if (opts.constructorHandlers) for (const handler$1 of opts.constructorHandlers) constructorHandlers.set(handler$1[0], handler$1[1]);
47
+ let handler = null;
48
+ return opts.proto ? cloneProto : clone;
49
+ function cloneArray(a, fn) {
50
+ const keys = Object.keys(a);
51
+ const a2 = new Array(keys.length);
52
+ for (let i = 0; i < keys.length; i++) {
53
+ const k = keys[i];
54
+ const cur = a[k];
55
+ if (typeof cur !== "object" || cur === null) a2[k] = cur;
56
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) a2[k] = handler(cur, fn);
57
+ else if (ArrayBuffer.isView(cur)) a2[k] = copyBuffer(cur);
58
+ else a2[k] = fn(cur);
59
+ }
60
+ return a2;
61
+ }
62
+ function clone(o) {
63
+ if (typeof o !== "object" || o === null) return o;
64
+ if (Array.isArray(o)) return cloneArray(o, clone);
65
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, clone);
66
+ const o2 = {};
67
+ for (const k in o) {
68
+ if (Object.hasOwnProperty.call(o, k) === false) continue;
69
+ const cur = o[k];
70
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
71
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, clone);
72
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
73
+ else o2[k] = clone(cur);
74
+ }
75
+ return o2;
76
+ }
77
+ function cloneProto(o) {
78
+ if (typeof o !== "object" || o === null) return o;
79
+ if (Array.isArray(o)) return cloneArray(o, cloneProto);
80
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, cloneProto);
81
+ const o2 = {};
82
+ for (const k in o) {
83
+ const cur = o[k];
84
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
85
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, cloneProto);
86
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
87
+ else o2[k] = cloneProto(cur);
88
+ }
89
+ return o2;
90
+ }
91
+ }
92
+ function rfdcCircles(opts) {
93
+ const refs = [];
94
+ const refsNew = [];
95
+ const constructorHandlers = /* @__PURE__ */ new Map();
96
+ constructorHandlers.set(Date, (o) => new Date(o));
97
+ constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
98
+ constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
99
+ if (opts.constructorHandlers) for (const handler$1 of opts.constructorHandlers) constructorHandlers.set(handler$1[0], handler$1[1]);
100
+ let handler = null;
101
+ return opts.proto ? cloneProto : clone;
102
+ function cloneArray(a, fn) {
103
+ const keys = Object.keys(a);
104
+ const a2 = new Array(keys.length);
105
+ for (let i = 0; i < keys.length; i++) {
106
+ const k = keys[i];
107
+ const cur = a[k];
108
+ if (typeof cur !== "object" || cur === null) a2[k] = cur;
109
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) a2[k] = handler(cur, fn);
110
+ else if (ArrayBuffer.isView(cur)) a2[k] = copyBuffer(cur);
111
+ else {
112
+ const index = refs.indexOf(cur);
113
+ if (index !== -1) a2[k] = refsNew[index];
114
+ else a2[k] = fn(cur);
115
+ }
116
+ }
117
+ return a2;
118
+ }
119
+ function clone(o) {
120
+ if (typeof o !== "object" || o === null) return o;
121
+ if (Array.isArray(o)) return cloneArray(o, clone);
122
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, clone);
123
+ const o2 = {};
124
+ refs.push(o);
125
+ refsNew.push(o2);
126
+ for (const k in o) {
127
+ if (Object.hasOwnProperty.call(o, k) === false) continue;
128
+ const cur = o[k];
129
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
130
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, clone);
131
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
132
+ else {
133
+ const i = refs.indexOf(cur);
134
+ if (i !== -1) o2[k] = refsNew[i];
135
+ else o2[k] = clone(cur);
136
+ }
137
+ }
138
+ refs.pop();
139
+ refsNew.pop();
140
+ return o2;
141
+ }
142
+ function cloneProto(o) {
143
+ if (typeof o !== "object" || o === null) return o;
144
+ if (Array.isArray(o)) return cloneArray(o, cloneProto);
145
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, cloneProto);
146
+ const o2 = {};
147
+ refs.push(o);
148
+ refsNew.push(o2);
149
+ for (const k in o) {
150
+ const cur = o[k];
151
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
152
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, cloneProto);
153
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
154
+ else {
155
+ const i = refs.indexOf(cur);
156
+ if (i !== -1) o2[k] = refsNew[i];
157
+ else o2[k] = cloneProto(cur);
158
+ }
159
+ }
160
+ refs.pop();
161
+ refsNew.pop();
162
+ return o2;
163
+ }
164
+ }
165
+ }) }))(), 1);
166
+ const classifyRE = /(?:^|[-_/])(\w)/g;
167
+ function toUpper(_, c) {
168
+ return c ? c.toUpperCase() : "";
169
+ }
170
+ function classify(str) {
171
+ return str && `${str}`.replace(classifyRE, toUpper);
172
+ }
173
+ function basename(filename, ext) {
174
+ let normalizedFilename = filename.replace(/^[a-z]:/i, "").replace(/\\/g, "/");
175
+ if (normalizedFilename.endsWith(`index${ext}`)) normalizedFilename = normalizedFilename.replace(`/index${ext}`, ext);
176
+ const lastSlashIndex = normalizedFilename.lastIndexOf("/");
177
+ const baseNameWithExt = normalizedFilename.substring(lastSlashIndex + 1);
178
+ if (ext) {
179
+ const extIndex = baseNameWithExt.lastIndexOf(ext);
180
+ return baseNameWithExt.substring(0, extIndex);
181
+ }
182
+ return "";
183
+ }
184
+ /**
185
+ * @copyright [rfdc](https://github.com/davidmarkclements/rfdc)
186
+ * @description A really fast deep clone alternative
187
+ */
188
+ const deepClone = (0, import_rfdc.default)({ circles: true });
189
+
190
+ //#endregion
191
+ //#region node_modules/.pnpm/perfect-debounce@2.1.0/node_modules/perfect-debounce/dist/index.mjs
192
+ const DEBOUNCE_DEFAULTS = { trailing: true };
193
+ /**
194
+ Debounce functions
195
+ @param fn - Promise-returning/async function to debounce.
196
+ @param wait - Milliseconds to wait before calling `fn`. Default value is 25ms
197
+ @returns A function that delays calling `fn` until after `wait` milliseconds have elapsed since the last time it was called.
198
+ @example
199
+ ```
200
+ import { debounce } from 'perfect-debounce';
201
+ const expensiveCall = async input => input;
202
+ const debouncedFn = debounce(expensiveCall, 200);
203
+ for (const number of [1, 2, 3]) {
204
+ console.log(await debouncedFn(number));
205
+ }
206
+ //=> 1
207
+ //=> 2
208
+ //=> 3
209
+ ```
210
+ */
211
+ function debounce(fn, wait = 25, options = {}) {
212
+ options = {
213
+ ...DEBOUNCE_DEFAULTS,
214
+ ...options
215
+ };
216
+ if (!Number.isFinite(wait)) throw new TypeError("Expected `wait` to be a finite number");
217
+ let leadingValue;
218
+ let timeout;
219
+ let resolveList = [];
220
+ let currentPromise;
221
+ let trailingArgs;
222
+ const applyFn = (_this, args) => {
223
+ currentPromise = _applyPromised(fn, _this, args);
224
+ currentPromise.finally(() => {
225
+ currentPromise = null;
226
+ if (options.trailing && trailingArgs && !timeout) {
227
+ const promise = applyFn(_this, trailingArgs);
228
+ trailingArgs = null;
229
+ return promise;
230
+ }
231
+ });
232
+ return currentPromise;
233
+ };
234
+ const debounced = function(...args) {
235
+ if (options.trailing) trailingArgs = args;
236
+ if (currentPromise) return currentPromise;
237
+ return new Promise((resolve) => {
238
+ const shouldCallNow = !timeout && options.leading;
239
+ clearTimeout(timeout);
240
+ timeout = setTimeout(() => {
241
+ timeout = null;
242
+ const promise = options.leading ? leadingValue : applyFn(this, args);
243
+ trailingArgs = null;
244
+ for (const _resolve of resolveList) _resolve(promise);
245
+ resolveList = [];
246
+ }, wait);
247
+ if (shouldCallNow) {
248
+ leadingValue = applyFn(this, args);
249
+ resolve(leadingValue);
250
+ } else resolveList.push(resolve);
251
+ });
252
+ };
253
+ const _clearTimeout = (timer) => {
254
+ if (timer) {
255
+ clearTimeout(timer);
256
+ timeout = null;
257
+ }
258
+ };
259
+ debounced.isPending = () => !!timeout;
260
+ debounced.cancel = () => {
261
+ _clearTimeout(timeout);
262
+ resolveList = [];
263
+ trailingArgs = null;
264
+ };
265
+ debounced.flush = () => {
266
+ _clearTimeout(timeout);
267
+ if (!trailingArgs || currentPromise) return;
268
+ const args = trailingArgs;
269
+ trailingArgs = null;
270
+ return applyFn(this, args);
271
+ };
272
+ return debounced;
273
+ }
274
+ async function _applyPromised(fn, _this, args) {
275
+ return await fn.apply(_this, args);
276
+ }
277
+
278
+ //#endregion
279
+ //#region node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs
280
+ function flatHooks(configHooks, hooks = {}, parentName) {
281
+ for (const key in configHooks) {
282
+ const subHook = configHooks[key];
283
+ const name = parentName ? `${parentName}:${key}` : key;
284
+ if (typeof subHook === "object" && subHook !== null) flatHooks(subHook, hooks, name);
285
+ else if (typeof subHook === "function") hooks[name] = subHook;
286
+ }
287
+ return hooks;
288
+ }
289
+ const defaultTask = { run: (function_) => function_() };
290
+ const _createTask = () => defaultTask;
291
+ const createTask = typeof console.createTask !== "undefined" ? console.createTask : _createTask;
292
+ function serialTaskCaller(hooks, args) {
293
+ const task = createTask(args.shift());
294
+ return hooks.reduce((promise, hookFunction) => promise.then(() => task.run(() => hookFunction(...args))), Promise.resolve());
295
+ }
296
+ function parallelTaskCaller(hooks, args) {
297
+ const task = createTask(args.shift());
298
+ return Promise.all(hooks.map((hook) => task.run(() => hook(...args))));
299
+ }
300
+ function callEachWith(callbacks, arg0) {
301
+ for (const callback of [...callbacks]) callback(arg0);
302
+ }
303
+ var Hookable = class {
304
+ constructor() {
305
+ this._hooks = {};
306
+ this._before = void 0;
307
+ this._after = void 0;
308
+ this._deprecatedMessages = void 0;
309
+ this._deprecatedHooks = {};
310
+ this.hook = this.hook.bind(this);
311
+ this.callHook = this.callHook.bind(this);
312
+ this.callHookWith = this.callHookWith.bind(this);
313
+ }
314
+ hook(name, function_, options = {}) {
315
+ if (!name || typeof function_ !== "function") return () => {};
316
+ const originalName = name;
317
+ let dep;
318
+ while (this._deprecatedHooks[name]) {
319
+ dep = this._deprecatedHooks[name];
320
+ name = dep.to;
321
+ }
322
+ if (dep && !options.allowDeprecated) {
323
+ let message = dep.message;
324
+ if (!message) message = `${originalName} hook has been deprecated` + (dep.to ? `, please use ${dep.to}` : "");
325
+ if (!this._deprecatedMessages) this._deprecatedMessages = /* @__PURE__ */ new Set();
326
+ if (!this._deprecatedMessages.has(message)) {
327
+ console.warn(message);
328
+ this._deprecatedMessages.add(message);
329
+ }
330
+ }
331
+ if (!function_.name) try {
332
+ Object.defineProperty(function_, "name", {
333
+ get: () => "_" + name.replace(/\W+/g, "_") + "_hook_cb",
334
+ configurable: true
335
+ });
336
+ } catch {}
337
+ this._hooks[name] = this._hooks[name] || [];
338
+ this._hooks[name].push(function_);
339
+ return () => {
340
+ if (function_) {
341
+ this.removeHook(name, function_);
342
+ function_ = void 0;
343
+ }
344
+ };
345
+ }
346
+ hookOnce(name, function_) {
347
+ let _unreg;
348
+ let _function = (...arguments_) => {
349
+ if (typeof _unreg === "function") _unreg();
350
+ _unreg = void 0;
351
+ _function = void 0;
352
+ return function_(...arguments_);
353
+ };
354
+ _unreg = this.hook(name, _function);
355
+ return _unreg;
356
+ }
357
+ removeHook(name, function_) {
358
+ if (this._hooks[name]) {
359
+ const index = this._hooks[name].indexOf(function_);
360
+ if (index !== -1) this._hooks[name].splice(index, 1);
361
+ if (this._hooks[name].length === 0) delete this._hooks[name];
362
+ }
363
+ }
364
+ deprecateHook(name, deprecated) {
365
+ this._deprecatedHooks[name] = typeof deprecated === "string" ? { to: deprecated } : deprecated;
366
+ const _hooks = this._hooks[name] || [];
367
+ delete this._hooks[name];
368
+ for (const hook of _hooks) this.hook(name, hook);
369
+ }
370
+ deprecateHooks(deprecatedHooks) {
371
+ Object.assign(this._deprecatedHooks, deprecatedHooks);
372
+ for (const name in deprecatedHooks) this.deprecateHook(name, deprecatedHooks[name]);
373
+ }
374
+ addHooks(configHooks) {
375
+ const hooks = flatHooks(configHooks);
376
+ const removeFns = Object.keys(hooks).map((key) => this.hook(key, hooks[key]));
377
+ return () => {
378
+ for (const unreg of removeFns.splice(0, removeFns.length)) unreg();
379
+ };
380
+ }
381
+ removeHooks(configHooks) {
382
+ const hooks = flatHooks(configHooks);
383
+ for (const key in hooks) this.removeHook(key, hooks[key]);
384
+ }
385
+ removeAllHooks() {
386
+ for (const key in this._hooks) delete this._hooks[key];
387
+ }
388
+ callHook(name, ...arguments_) {
389
+ arguments_.unshift(name);
390
+ return this.callHookWith(serialTaskCaller, name, ...arguments_);
391
+ }
392
+ callHookParallel(name, ...arguments_) {
393
+ arguments_.unshift(name);
394
+ return this.callHookWith(parallelTaskCaller, name, ...arguments_);
395
+ }
396
+ callHookWith(caller, name, ...arguments_) {
397
+ const event = this._before || this._after ? {
398
+ name,
399
+ args: arguments_,
400
+ context: {}
401
+ } : void 0;
402
+ if (this._before) callEachWith(this._before, event);
403
+ const result = caller(name in this._hooks ? [...this._hooks[name]] : [], arguments_);
404
+ if (result instanceof Promise) return result.finally(() => {
405
+ if (this._after && event) callEachWith(this._after, event);
406
+ });
407
+ if (this._after && event) callEachWith(this._after, event);
408
+ return result;
409
+ }
410
+ beforeEach(function_) {
411
+ this._before = this._before || [];
412
+ this._before.push(function_);
413
+ return () => {
414
+ if (this._before !== void 0) {
415
+ const index = this._before.indexOf(function_);
416
+ if (index !== -1) this._before.splice(index, 1);
417
+ }
418
+ };
419
+ }
420
+ afterEach(function_) {
421
+ this._after = this._after || [];
422
+ this._after.push(function_);
423
+ return () => {
424
+ if (this._after !== void 0) {
425
+ const index = this._after.indexOf(function_);
426
+ if (index !== -1) this._after.splice(index, 1);
427
+ }
428
+ };
429
+ }
430
+ };
431
+ function createHooks() {
432
+ return new Hookable();
433
+ }
434
+
435
+ //#endregion
436
+ //#region node_modules/.pnpm/@vue+devtools-kit@8.0.5/node_modules/@vue/devtools-kit/dist/index.js
437
+ var __create = Object.create;
438
+ var __defProp = Object.defineProperty;
439
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
440
+ var __getOwnPropNames = Object.getOwnPropertyNames;
441
+ var __getProtoOf = Object.getPrototypeOf;
442
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
443
+ var __commonJS = (cb, mod) => function() {
444
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
445
+ };
446
+ var __copyProps = (to, from, except, desc) => {
447
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
448
+ key = keys[i];
449
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
450
+ get: ((k) => from[k]).bind(null, key),
451
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
452
+ });
453
+ }
454
+ return to;
455
+ };
456
+ var __toESM = (mod, isNodeMode, target$1) => (target$1 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target$1, "default", {
457
+ value: mod,
458
+ enumerable: true
459
+ }) : target$1, mod));
460
+ function getComponentTypeName(options) {
461
+ const name = options.name || options._componentTag || options.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || options.__name;
462
+ if (name === "index" && options.__file?.endsWith("index.vue")) return "";
463
+ return name;
464
+ }
465
+ function getComponentFileName(options) {
466
+ const file = options.__file;
467
+ if (file) return classify(basename(file, ".vue"));
468
+ }
469
+ function saveComponentGussedName(instance, name) {
470
+ instance.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ = name;
471
+ return name;
472
+ }
473
+ function getAppRecord(instance) {
474
+ if (instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__) return instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
475
+ else if (instance.root) return instance.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
476
+ }
477
+ function isFragment(instance) {
478
+ const subTreeType = instance.subTree?.type;
479
+ const appRecord = getAppRecord(instance);
480
+ if (appRecord) return appRecord?.types?.Fragment === subTreeType;
481
+ return false;
482
+ }
483
+ /**
484
+ * Get the appropriate display name for an instance.
485
+ *
486
+ * @param {Vue} instance
487
+ * @return {string}
488
+ */
489
+ function getInstanceName(instance) {
490
+ const name = getComponentTypeName(instance?.type || {});
491
+ if (name) return name;
492
+ if (instance?.root === instance) return "Root";
493
+ for (const key in instance.parent?.type?.components) if (instance.parent.type.components[key] === instance?.type) return saveComponentGussedName(instance, key);
494
+ for (const key in instance.appContext?.components) if (instance.appContext.components[key] === instance?.type) return saveComponentGussedName(instance, key);
495
+ const fileName = getComponentFileName(instance?.type || {});
496
+ if (fileName) return fileName;
497
+ return "Anonymous Component";
498
+ }
499
+ /**
500
+ * Returns a devtools unique id for instance.
501
+ * @param {Vue} instance
502
+ */
503
+ function getUniqueComponentId(instance) {
504
+ return `${instance?.appContext?.app?.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__ ?? 0}:${instance === instance?.root ? "root" : instance.uid}`;
505
+ }
506
+ function getComponentInstance(appRecord, instanceId) {
507
+ instanceId = instanceId || `${appRecord.id}:root`;
508
+ return appRecord.instanceMap.get(instanceId) || appRecord.instanceMap.get(":root");
509
+ }
510
+ function createRect() {
511
+ const rect = {
512
+ top: 0,
513
+ bottom: 0,
514
+ left: 0,
515
+ right: 0,
516
+ get width() {
517
+ return rect.right - rect.left;
518
+ },
519
+ get height() {
520
+ return rect.bottom - rect.top;
521
+ }
522
+ };
523
+ return rect;
524
+ }
525
+ let range;
526
+ function getTextRect(node) {
527
+ if (!range) range = document.createRange();
528
+ range.selectNode(node);
529
+ return range.getBoundingClientRect();
530
+ }
531
+ function getFragmentRect(vnode) {
532
+ const rect = createRect();
533
+ if (!vnode.children) return rect;
534
+ for (let i = 0, l = vnode.children.length; i < l; i++) {
535
+ const childVnode = vnode.children[i];
536
+ let childRect;
537
+ if (childVnode.component) childRect = getComponentBoundingRect(childVnode.component);
538
+ else if (childVnode.el) {
539
+ const el = childVnode.el;
540
+ if (el.nodeType === 1 || el.getBoundingClientRect) childRect = el.getBoundingClientRect();
541
+ else if (el.nodeType === 3 && el.data.trim()) childRect = getTextRect(el);
542
+ }
543
+ if (childRect) mergeRects(rect, childRect);
544
+ }
545
+ return rect;
546
+ }
547
+ function mergeRects(a, b) {
548
+ if (!a.top || b.top < a.top) a.top = b.top;
549
+ if (!a.bottom || b.bottom > a.bottom) a.bottom = b.bottom;
550
+ if (!a.left || b.left < a.left) a.left = b.left;
551
+ if (!a.right || b.right > a.right) a.right = b.right;
552
+ return a;
553
+ }
554
+ const DEFAULT_RECT = {
555
+ top: 0,
556
+ left: 0,
557
+ right: 0,
558
+ bottom: 0,
559
+ width: 0,
560
+ height: 0
561
+ };
562
+ function getComponentBoundingRect(instance) {
563
+ const el = instance.subTree.el;
564
+ if (typeof window === "undefined") return DEFAULT_RECT;
565
+ if (isFragment(instance)) return getFragmentRect(instance.subTree);
566
+ else if (el?.nodeType === 1) return el?.getBoundingClientRect();
567
+ else if (instance.subTree.component) return getComponentBoundingRect(instance.subTree.component);
568
+ else return DEFAULT_RECT;
569
+ }
570
+ function getRootElementsFromComponentInstance(instance) {
571
+ if (isFragment(instance)) return getFragmentRootElements(instance.subTree);
572
+ if (!instance.subTree) return [];
573
+ return [instance.subTree.el];
574
+ }
575
+ function getFragmentRootElements(vnode) {
576
+ if (!vnode.children) return [];
577
+ const list = [];
578
+ vnode.children.forEach((childVnode) => {
579
+ if (childVnode.component) list.push(...getRootElementsFromComponentInstance(childVnode.component));
580
+ else if (childVnode?.el) list.push(childVnode.el);
581
+ });
582
+ return list;
583
+ }
584
+ const CONTAINER_ELEMENT_ID = "__vue-devtools-component-inspector__";
585
+ const CARD_ELEMENT_ID = "__vue-devtools-component-inspector__card__";
586
+ const COMPONENT_NAME_ELEMENT_ID = "__vue-devtools-component-inspector__name__";
587
+ const INDICATOR_ELEMENT_ID = "__vue-devtools-component-inspector__indicator__";
588
+ const containerStyles = {
589
+ display: "block",
590
+ zIndex: 2147483640,
591
+ position: "fixed",
592
+ backgroundColor: "#42b88325",
593
+ border: "1px solid #42b88350",
594
+ borderRadius: "5px",
595
+ transition: "all 0.1s ease-in",
596
+ pointerEvents: "none"
597
+ };
598
+ const cardStyles = {
599
+ fontFamily: "Arial, Helvetica, sans-serif",
600
+ padding: "5px 8px",
601
+ borderRadius: "4px",
602
+ textAlign: "left",
603
+ position: "absolute",
604
+ left: 0,
605
+ color: "#e9e9e9",
606
+ fontSize: "14px",
607
+ fontWeight: 600,
608
+ lineHeight: "24px",
609
+ backgroundColor: "#42b883",
610
+ boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"
611
+ };
612
+ const indicatorStyles = {
613
+ display: "inline-block",
614
+ fontWeight: 400,
615
+ fontStyle: "normal",
616
+ fontSize: "12px",
617
+ opacity: .7
618
+ };
619
+ function getContainerElement() {
620
+ return document.getElementById(CONTAINER_ELEMENT_ID);
621
+ }
622
+ function getCardElement() {
623
+ return document.getElementById(CARD_ELEMENT_ID);
624
+ }
625
+ function getIndicatorElement() {
626
+ return document.getElementById(INDICATOR_ELEMENT_ID);
627
+ }
628
+ function getNameElement() {
629
+ return document.getElementById(COMPONENT_NAME_ELEMENT_ID);
630
+ }
631
+ function getStyles(bounds) {
632
+ return {
633
+ left: `${Math.round(bounds.left * 100) / 100}px`,
634
+ top: `${Math.round(bounds.top * 100) / 100}px`,
635
+ width: `${Math.round(bounds.width * 100) / 100}px`,
636
+ height: `${Math.round(bounds.height * 100) / 100}px`
637
+ };
638
+ }
639
+ function create(options) {
640
+ const containerEl = document.createElement("div");
641
+ containerEl.id = options.elementId ?? CONTAINER_ELEMENT_ID;
642
+ Object.assign(containerEl.style, {
643
+ ...containerStyles,
644
+ ...getStyles(options.bounds),
645
+ ...options.style
646
+ });
647
+ const cardEl = document.createElement("span");
648
+ cardEl.id = CARD_ELEMENT_ID;
649
+ Object.assign(cardEl.style, {
650
+ ...cardStyles,
651
+ top: options.bounds.top < 35 ? 0 : "-35px"
652
+ });
653
+ const nameEl = document.createElement("span");
654
+ nameEl.id = COMPONENT_NAME_ELEMENT_ID;
655
+ nameEl.innerHTML = `&lt;${options.name}&gt;&nbsp;&nbsp;`;
656
+ const indicatorEl = document.createElement("i");
657
+ indicatorEl.id = INDICATOR_ELEMENT_ID;
658
+ indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
659
+ Object.assign(indicatorEl.style, indicatorStyles);
660
+ cardEl.appendChild(nameEl);
661
+ cardEl.appendChild(indicatorEl);
662
+ containerEl.appendChild(cardEl);
663
+ document.body.appendChild(containerEl);
664
+ return containerEl;
665
+ }
666
+ function update(options) {
667
+ const containerEl = getContainerElement();
668
+ const cardEl = getCardElement();
669
+ const nameEl = getNameElement();
670
+ const indicatorEl = getIndicatorElement();
671
+ if (containerEl) {
672
+ Object.assign(containerEl.style, {
673
+ ...containerStyles,
674
+ ...getStyles(options.bounds)
675
+ });
676
+ Object.assign(cardEl.style, { top: options.bounds.top < 35 ? 0 : "-35px" });
677
+ nameEl.innerHTML = `&lt;${options.name}&gt;&nbsp;&nbsp;`;
678
+ indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
679
+ }
680
+ }
681
+ function highlight(instance) {
682
+ const bounds = getComponentBoundingRect(instance);
683
+ if (!bounds.width && !bounds.height) return;
684
+ const name = getInstanceName(instance);
685
+ getContainerElement() ? update({
686
+ bounds,
687
+ name
688
+ }) : create({
689
+ bounds,
690
+ name
691
+ });
692
+ }
693
+ function unhighlight() {
694
+ const el = getContainerElement();
695
+ if (el) el.style.display = "none";
696
+ }
697
+ let inspectInstance = null;
698
+ function inspectFn(e) {
699
+ const target$1 = e.target;
700
+ if (target$1) {
701
+ const instance = target$1.__vueParentComponent;
702
+ if (instance) {
703
+ inspectInstance = instance;
704
+ if (instance.vnode.el) {
705
+ const bounds = getComponentBoundingRect(instance);
706
+ const name = getInstanceName(instance);
707
+ getContainerElement() ? update({
708
+ bounds,
709
+ name
710
+ }) : create({
711
+ bounds,
712
+ name
713
+ });
714
+ }
715
+ }
716
+ }
717
+ }
718
+ function selectComponentFn(e, cb) {
719
+ e.preventDefault();
720
+ e.stopPropagation();
721
+ if (inspectInstance) cb(getUniqueComponentId(inspectInstance));
722
+ }
723
+ let inspectComponentHighLighterSelectFn = null;
724
+ function cancelInspectComponentHighLighter() {
725
+ unhighlight();
726
+ window.removeEventListener("mouseover", inspectFn);
727
+ window.removeEventListener("click", inspectComponentHighLighterSelectFn, true);
728
+ inspectComponentHighLighterSelectFn = null;
729
+ }
730
+ function inspectComponentHighLighter() {
731
+ window.addEventListener("mouseover", inspectFn);
732
+ return new Promise((resolve) => {
733
+ function onSelect(e) {
734
+ e.preventDefault();
735
+ e.stopPropagation();
736
+ selectComponentFn(e, (id) => {
737
+ window.removeEventListener("click", onSelect, true);
738
+ inspectComponentHighLighterSelectFn = null;
739
+ window.removeEventListener("mouseover", inspectFn);
740
+ const el = getContainerElement();
741
+ if (el) el.style.display = "none";
742
+ resolve(JSON.stringify({ id }));
743
+ });
744
+ }
745
+ inspectComponentHighLighterSelectFn = onSelect;
746
+ window.addEventListener("click", onSelect, true);
747
+ });
748
+ }
749
+ function scrollToComponent(options) {
750
+ const instance = getComponentInstance(activeAppRecord.value, options.id);
751
+ if (instance) {
752
+ const [el] = getRootElementsFromComponentInstance(instance);
753
+ if (typeof el.scrollIntoView === "function") el.scrollIntoView({ behavior: "smooth" });
754
+ else {
755
+ const bounds = getComponentBoundingRect(instance);
756
+ const scrollTarget = document.createElement("div");
757
+ const styles = {
758
+ ...getStyles(bounds),
759
+ position: "absolute"
760
+ };
761
+ Object.assign(scrollTarget.style, styles);
762
+ document.body.appendChild(scrollTarget);
763
+ scrollTarget.scrollIntoView({ behavior: "smooth" });
764
+ setTimeout(() => {
765
+ document.body.removeChild(scrollTarget);
766
+ }, 2e3);
767
+ }
768
+ setTimeout(() => {
769
+ const bounds = getComponentBoundingRect(instance);
770
+ if (bounds.width || bounds.height) {
771
+ const name = getInstanceName(instance);
772
+ const el$1 = getContainerElement();
773
+ el$1 ? update({
774
+ ...options,
775
+ name,
776
+ bounds
777
+ }) : create({
778
+ ...options,
779
+ name,
780
+ bounds
781
+ });
782
+ setTimeout(() => {
783
+ if (el$1) el$1.style.display = "none";
784
+ }, 1500);
785
+ }
786
+ }, 1200);
787
+ }
788
+ }
789
+ target.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ ??= true;
790
+ function waitForInspectorInit(cb) {
791
+ let total = 0;
792
+ const timer = setInterval(() => {
793
+ if (target.__VUE_INSPECTOR__) {
794
+ clearInterval(timer);
795
+ total += 30;
796
+ cb();
797
+ }
798
+ if (total >= 5e3) clearInterval(timer);
799
+ }, 30);
800
+ }
801
+ function setupInspector() {
802
+ const inspector = target.__VUE_INSPECTOR__;
803
+ const _openInEditor = inspector.openInEditor;
804
+ inspector.openInEditor = async (...params) => {
805
+ inspector.disable();
806
+ _openInEditor(...params);
807
+ };
808
+ }
809
+ function getComponentInspector() {
810
+ return new Promise((resolve) => {
811
+ function setup() {
812
+ setupInspector();
813
+ resolve(target.__VUE_INSPECTOR__);
814
+ }
815
+ if (!target.__VUE_INSPECTOR__) waitForInspectorInit(() => {
816
+ setup();
817
+ });
818
+ else setup();
819
+ });
820
+ }
821
+ /**
822
+ * To prevent include a **HUGE** vue package in the final bundle of chrome ext / electron
823
+ * we stub the necessary vue module.
824
+ * This implementation is based on the 1c3327a0fa5983aa9078e3f7bb2330f572435425 commit
825
+ */
826
+ /**
827
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/constants.ts#L17-L23)
828
+ */
829
+ let ReactiveFlags = /* @__PURE__ */ function(ReactiveFlags$1) {
830
+ ReactiveFlags$1["SKIP"] = "__v_skip";
831
+ ReactiveFlags$1["IS_REACTIVE"] = "__v_isReactive";
832
+ ReactiveFlags$1["IS_READONLY"] = "__v_isReadonly";
833
+ ReactiveFlags$1["IS_SHALLOW"] = "__v_isShallow";
834
+ ReactiveFlags$1["RAW"] = "__v_raw";
835
+ return ReactiveFlags$1;
836
+ }({});
837
+ /**
838
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/reactive.ts#L330-L332)
839
+ */
840
+ function isReadonly(value) {
841
+ return !!(value && value[ReactiveFlags.IS_READONLY]);
842
+ }
843
+ /**
844
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/reactive.ts#L312-L317)
845
+ */
846
+ function isReactive$1(value) {
847
+ if (isReadonly(value)) return isReactive$1(value[ReactiveFlags.RAW]);
848
+ return !!(value && value[ReactiveFlags.IS_REACTIVE]);
849
+ }
850
+ function isRef$1(r) {
851
+ return !!(r && r.__v_isRef === true);
852
+ }
853
+ /**
854
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/reactive.ts#L372-L375)
855
+ */
856
+ function toRaw$1(observed) {
857
+ const raw = observed && observed[ReactiveFlags.RAW];
858
+ return raw ? toRaw$1(raw) : observed;
859
+ }
860
+ var StateEditor = class {
861
+ constructor() {
862
+ this.refEditor = new RefStateEditor();
863
+ }
864
+ set(object, path, value, cb) {
865
+ const sections = Array.isArray(path) ? path : path.split(".");
866
+ while (sections.length > 1) {
867
+ const section = sections.shift();
868
+ if (object instanceof Map) object = object.get(section);
869
+ else if (object instanceof Set) object = Array.from(object.values())[section];
870
+ else object = object[section];
871
+ if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
872
+ }
873
+ const field = sections[0];
874
+ const item = this.refEditor.get(object)[field];
875
+ if (cb) cb(object, field, value);
876
+ else if (this.refEditor.isRef(item)) this.refEditor.set(item, value);
877
+ else object[field] = value;
878
+ }
879
+ get(object, path) {
880
+ const sections = Array.isArray(path) ? path : path.split(".");
881
+ for (let i = 0; i < sections.length; i++) {
882
+ if (object instanceof Map) object = object.get(sections[i]);
883
+ else object = object[sections[i]];
884
+ if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
885
+ if (!object) return void 0;
886
+ }
887
+ return object;
888
+ }
889
+ has(object, path, parent = false) {
890
+ if (typeof object === "undefined") return false;
891
+ const sections = Array.isArray(path) ? path.slice() : path.split(".");
892
+ const size = !parent ? 1 : 2;
893
+ while (object && sections.length > size) {
894
+ const section = sections.shift();
895
+ object = object[section];
896
+ if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
897
+ }
898
+ return object != null && Object.prototype.hasOwnProperty.call(object, sections[0]);
899
+ }
900
+ createDefaultSetCallback(state) {
901
+ return (object, field, value) => {
902
+ if (state.remove || state.newKey) if (Array.isArray(object)) object.splice(field, 1);
903
+ else if (toRaw$1(object) instanceof Map) object.delete(field);
904
+ else if (toRaw$1(object) instanceof Set) object.delete(Array.from(object.values())[field]);
905
+ else Reflect.deleteProperty(object, field);
906
+ if (!state.remove) {
907
+ const target$1 = object[state.newKey || field];
908
+ if (this.refEditor.isRef(target$1)) this.refEditor.set(target$1, value);
909
+ else if (toRaw$1(object) instanceof Map) object.set(state.newKey || field, value);
910
+ else if (toRaw$1(object) instanceof Set) object.add(value);
911
+ else object[state.newKey || field] = value;
912
+ }
913
+ };
914
+ }
915
+ };
916
+ var RefStateEditor = class {
917
+ set(ref, value) {
918
+ if (isRef$1(ref)) ref.value = value;
919
+ else {
920
+ if (ref instanceof Set && Array.isArray(value)) {
921
+ ref.clear();
922
+ value.forEach((v) => ref.add(v));
923
+ return;
924
+ }
925
+ const currentKeys = Object.keys(value);
926
+ if (ref instanceof Map) {
927
+ const previousKeysSet$1 = new Set(ref.keys());
928
+ currentKeys.forEach((key) => {
929
+ ref.set(key, Reflect.get(value, key));
930
+ previousKeysSet$1.delete(key);
931
+ });
932
+ previousKeysSet$1.forEach((key) => ref.delete(key));
933
+ return;
934
+ }
935
+ const previousKeysSet = new Set(Object.keys(ref));
936
+ currentKeys.forEach((key) => {
937
+ Reflect.set(ref, key, Reflect.get(value, key));
938
+ previousKeysSet.delete(key);
939
+ });
940
+ previousKeysSet.forEach((key) => Reflect.deleteProperty(ref, key));
941
+ }
942
+ }
943
+ get(ref) {
944
+ return isRef$1(ref) ? ref.value : ref;
945
+ }
946
+ isRef(ref) {
947
+ return isRef$1(ref) || isReactive$1(ref);
948
+ }
949
+ };
950
+ const stateEditor = new StateEditor();
951
+ const TIMELINE_LAYERS_STATE_STORAGE_ID = "__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";
952
+ function getTimelineLayersStateFromStorage() {
953
+ if (typeof window === "undefined" || !isBrowser || typeof localStorage === "undefined" || localStorage === null) return {
954
+ recordingState: false,
955
+ mouseEventEnabled: false,
956
+ keyboardEventEnabled: false,
957
+ componentEventEnabled: false,
958
+ performanceEventEnabled: false,
959
+ selected: ""
960
+ };
961
+ const state = typeof localStorage.getItem !== "undefined" ? localStorage.getItem(TIMELINE_LAYERS_STATE_STORAGE_ID) : null;
962
+ return state ? JSON.parse(state) : {
963
+ recordingState: false,
964
+ mouseEventEnabled: false,
965
+ keyboardEventEnabled: false,
966
+ componentEventEnabled: false,
967
+ performanceEventEnabled: false,
968
+ selected: ""
969
+ };
970
+ }
971
+ target.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS ??= [];
972
+ const devtoolsTimelineLayers = new Proxy(target.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, { get(target$1, prop, receiver) {
973
+ return Reflect.get(target$1, prop, receiver);
974
+ } });
975
+ function addTimelineLayer(options, descriptor) {
976
+ devtoolsState.timelineLayersState[descriptor.id] = false;
977
+ devtoolsTimelineLayers.push({
978
+ ...options,
979
+ descriptorId: descriptor.id,
980
+ appRecord: getAppRecord(descriptor.app)
981
+ });
982
+ }
983
+ target.__VUE_DEVTOOLS_KIT_INSPECTOR__ ??= [];
984
+ const devtoolsInspector = new Proxy(target.__VUE_DEVTOOLS_KIT_INSPECTOR__, { get(target$1, prop, receiver) {
985
+ return Reflect.get(target$1, prop, receiver);
986
+ } });
987
+ const callInspectorUpdatedHook = debounce(() => {
988
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.SEND_INSPECTOR_TO_CLIENT, getActiveInspectors());
989
+ });
990
+ function addInspector(inspector, descriptor) {
991
+ devtoolsInspector.push({
992
+ options: inspector,
993
+ descriptor,
994
+ treeFilterPlaceholder: inspector.treeFilterPlaceholder ?? "Search tree...",
995
+ stateFilterPlaceholder: inspector.stateFilterPlaceholder ?? "Search state...",
996
+ treeFilter: "",
997
+ selectedNodeId: "",
998
+ appRecord: getAppRecord(descriptor.app)
999
+ });
1000
+ callInspectorUpdatedHook();
1001
+ }
1002
+ function getActiveInspectors() {
1003
+ return devtoolsInspector.filter((inspector) => inspector.descriptor.app === activeAppRecord.value.app).filter((inspector) => inspector.descriptor.id !== "components").map((inspector) => {
1004
+ const descriptor = inspector.descriptor;
1005
+ const options = inspector.options;
1006
+ return {
1007
+ id: options.id,
1008
+ label: options.label,
1009
+ logo: descriptor.logo,
1010
+ icon: `custom-ic-baseline-${options?.icon?.replace(/_/g, "-")}`,
1011
+ packageName: descriptor.packageName,
1012
+ homepage: descriptor.homepage,
1013
+ pluginId: descriptor.id
1014
+ };
1015
+ });
1016
+ }
1017
+ function getInspector(id, app) {
1018
+ return devtoolsInspector.find((inspector) => inspector.options.id === id && (app ? inspector.descriptor.app === app : true));
1019
+ }
1020
+ let DevToolsV6PluginAPIHookKeys = /* @__PURE__ */ function(DevToolsV6PluginAPIHookKeys$1) {
1021
+ DevToolsV6PluginAPIHookKeys$1["VISIT_COMPONENT_TREE"] = "visitComponentTree";
1022
+ DevToolsV6PluginAPIHookKeys$1["INSPECT_COMPONENT"] = "inspectComponent";
1023
+ DevToolsV6PluginAPIHookKeys$1["EDIT_COMPONENT_STATE"] = "editComponentState";
1024
+ DevToolsV6PluginAPIHookKeys$1["GET_INSPECTOR_TREE"] = "getInspectorTree";
1025
+ DevToolsV6PluginAPIHookKeys$1["GET_INSPECTOR_STATE"] = "getInspectorState";
1026
+ DevToolsV6PluginAPIHookKeys$1["EDIT_INSPECTOR_STATE"] = "editInspectorState";
1027
+ DevToolsV6PluginAPIHookKeys$1["INSPECT_TIMELINE_EVENT"] = "inspectTimelineEvent";
1028
+ DevToolsV6PluginAPIHookKeys$1["TIMELINE_CLEARED"] = "timelineCleared";
1029
+ DevToolsV6PluginAPIHookKeys$1["SET_PLUGIN_SETTINGS"] = "setPluginSettings";
1030
+ return DevToolsV6PluginAPIHookKeys$1;
1031
+ }({});
1032
+ let DevToolsContextHookKeys = /* @__PURE__ */ function(DevToolsContextHookKeys$1) {
1033
+ DevToolsContextHookKeys$1["ADD_INSPECTOR"] = "addInspector";
1034
+ DevToolsContextHookKeys$1["SEND_INSPECTOR_TREE"] = "sendInspectorTree";
1035
+ DevToolsContextHookKeys$1["SEND_INSPECTOR_STATE"] = "sendInspectorState";
1036
+ DevToolsContextHookKeys$1["CUSTOM_INSPECTOR_SELECT_NODE"] = "customInspectorSelectNode";
1037
+ DevToolsContextHookKeys$1["TIMELINE_LAYER_ADDED"] = "timelineLayerAdded";
1038
+ DevToolsContextHookKeys$1["TIMELINE_EVENT_ADDED"] = "timelineEventAdded";
1039
+ DevToolsContextHookKeys$1["GET_COMPONENT_INSTANCES"] = "getComponentInstances";
1040
+ DevToolsContextHookKeys$1["GET_COMPONENT_BOUNDS"] = "getComponentBounds";
1041
+ DevToolsContextHookKeys$1["GET_COMPONENT_NAME"] = "getComponentName";
1042
+ DevToolsContextHookKeys$1["COMPONENT_HIGHLIGHT"] = "componentHighlight";
1043
+ DevToolsContextHookKeys$1["COMPONENT_UNHIGHLIGHT"] = "componentUnhighlight";
1044
+ return DevToolsContextHookKeys$1;
1045
+ }({});
1046
+ let DevToolsMessagingHookKeys = /* @__PURE__ */ function(DevToolsMessagingHookKeys$1) {
1047
+ DevToolsMessagingHookKeys$1["SEND_INSPECTOR_TREE_TO_CLIENT"] = "sendInspectorTreeToClient";
1048
+ DevToolsMessagingHookKeys$1["SEND_INSPECTOR_STATE_TO_CLIENT"] = "sendInspectorStateToClient";
1049
+ DevToolsMessagingHookKeys$1["SEND_TIMELINE_EVENT_TO_CLIENT"] = "sendTimelineEventToClient";
1050
+ DevToolsMessagingHookKeys$1["SEND_INSPECTOR_TO_CLIENT"] = "sendInspectorToClient";
1051
+ DevToolsMessagingHookKeys$1["SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT"] = "sendActiveAppUpdatedToClient";
1052
+ DevToolsMessagingHookKeys$1["DEVTOOLS_STATE_UPDATED"] = "devtoolsStateUpdated";
1053
+ DevToolsMessagingHookKeys$1["DEVTOOLS_CONNECTED_UPDATED"] = "devtoolsConnectedUpdated";
1054
+ DevToolsMessagingHookKeys$1["ROUTER_INFO_UPDATED"] = "routerInfoUpdated";
1055
+ return DevToolsMessagingHookKeys$1;
1056
+ }({});
1057
+ function createDevToolsCtxHooks() {
1058
+ const hooks$1 = createHooks();
1059
+ hooks$1.hook(DevToolsContextHookKeys.ADD_INSPECTOR, ({ inspector, plugin }) => {
1060
+ addInspector(inspector, plugin.descriptor);
1061
+ });
1062
+ const debounceSendInspectorTree = debounce(async ({ inspectorId, plugin }) => {
1063
+ if (!inspectorId || !plugin?.descriptor?.app || devtoolsState.highPerfModeEnabled) return;
1064
+ const inspector = getInspector(inspectorId, plugin.descriptor.app);
1065
+ const _payload = {
1066
+ app: plugin.descriptor.app,
1067
+ inspectorId,
1068
+ filter: inspector?.treeFilter || "",
1069
+ rootNodes: []
1070
+ };
1071
+ await new Promise((resolve) => {
1072
+ hooks$1.callHookWith(async (callbacks) => {
1073
+ await Promise.all(callbacks.map((cb) => cb(_payload)));
1074
+ resolve();
1075
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE);
1076
+ });
1077
+ hooks$1.callHookWith(async (callbacks) => {
1078
+ await Promise.all(callbacks.map((cb) => cb({
1079
+ inspectorId,
1080
+ rootNodes: _payload.rootNodes
1081
+ })));
1082
+ }, DevToolsMessagingHookKeys.SEND_INSPECTOR_TREE_TO_CLIENT);
1083
+ }, 120);
1084
+ hooks$1.hook(DevToolsContextHookKeys.SEND_INSPECTOR_TREE, debounceSendInspectorTree);
1085
+ const debounceSendInspectorState = debounce(async ({ inspectorId, plugin }) => {
1086
+ if (!inspectorId || !plugin?.descriptor?.app || devtoolsState.highPerfModeEnabled) return;
1087
+ const inspector = getInspector(inspectorId, plugin.descriptor.app);
1088
+ const _payload = {
1089
+ app: plugin.descriptor.app,
1090
+ inspectorId,
1091
+ nodeId: inspector?.selectedNodeId || "",
1092
+ state: null
1093
+ };
1094
+ const ctx = { currentTab: `custom-inspector:${inspectorId}` };
1095
+ if (_payload.nodeId) await new Promise((resolve) => {
1096
+ hooks$1.callHookWith(async (callbacks) => {
1097
+ await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
1098
+ resolve();
1099
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE);
1100
+ });
1101
+ hooks$1.callHookWith(async (callbacks) => {
1102
+ await Promise.all(callbacks.map((cb) => cb({
1103
+ inspectorId,
1104
+ nodeId: _payload.nodeId,
1105
+ state: _payload.state
1106
+ })));
1107
+ }, DevToolsMessagingHookKeys.SEND_INSPECTOR_STATE_TO_CLIENT);
1108
+ }, 120);
1109
+ hooks$1.hook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, debounceSendInspectorState);
1110
+ hooks$1.hook(DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE, ({ inspectorId, nodeId, plugin }) => {
1111
+ const inspector = getInspector(inspectorId, plugin.descriptor.app);
1112
+ if (!inspector) return;
1113
+ inspector.selectedNodeId = nodeId;
1114
+ });
1115
+ hooks$1.hook(DevToolsContextHookKeys.TIMELINE_LAYER_ADDED, ({ options, plugin }) => {
1116
+ addTimelineLayer(options, plugin.descriptor);
1117
+ });
1118
+ hooks$1.hook(DevToolsContextHookKeys.TIMELINE_EVENT_ADDED, ({ options, plugin }) => {
1119
+ if (devtoolsState.highPerfModeEnabled || !devtoolsState.timelineLayersState?.[plugin.descriptor.id] && ![
1120
+ "performance",
1121
+ "component-event",
1122
+ "keyboard",
1123
+ "mouse"
1124
+ ].includes(options.layerId)) return;
1125
+ hooks$1.callHookWith(async (callbacks) => {
1126
+ await Promise.all(callbacks.map((cb) => cb(options)));
1127
+ }, DevToolsMessagingHookKeys.SEND_TIMELINE_EVENT_TO_CLIENT);
1128
+ });
1129
+ hooks$1.hook(DevToolsContextHookKeys.GET_COMPONENT_INSTANCES, async ({ app }) => {
1130
+ const appRecord = app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
1131
+ if (!appRecord) return null;
1132
+ const appId = appRecord.id.toString();
1133
+ return [...appRecord.instanceMap].filter(([key]) => key.split(":")[0] === appId).map(([, instance]) => instance);
1134
+ });
1135
+ hooks$1.hook(DevToolsContextHookKeys.GET_COMPONENT_BOUNDS, async ({ instance }) => {
1136
+ return getComponentBoundingRect(instance);
1137
+ });
1138
+ hooks$1.hook(DevToolsContextHookKeys.GET_COMPONENT_NAME, ({ instance }) => {
1139
+ return getInstanceName(instance);
1140
+ });
1141
+ hooks$1.hook(DevToolsContextHookKeys.COMPONENT_HIGHLIGHT, ({ uid }) => {
1142
+ const instance = activeAppRecord.value.instanceMap.get(uid);
1143
+ if (instance) highlight(instance);
1144
+ });
1145
+ hooks$1.hook(DevToolsContextHookKeys.COMPONENT_UNHIGHLIGHT, () => {
1146
+ unhighlight();
1147
+ });
1148
+ return hooks$1;
1149
+ }
1150
+ target.__VUE_DEVTOOLS_KIT_APP_RECORDS__ ??= [];
1151
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ ??= {};
1152
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ ??= "";
1153
+ target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ ??= [];
1154
+ target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ ??= [];
1155
+ const STATE_KEY = "__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";
1156
+ function initStateFactory() {
1157
+ return {
1158
+ connected: false,
1159
+ clientConnected: false,
1160
+ vitePluginDetected: true,
1161
+ appRecords: [],
1162
+ activeAppRecordId: "",
1163
+ tabs: [],
1164
+ commands: [],
1165
+ highPerfModeEnabled: true,
1166
+ devtoolsClientDetected: {},
1167
+ perfUniqueGroupId: 0,
1168
+ timelineLayersState: getTimelineLayersStateFromStorage()
1169
+ };
1170
+ }
1171
+ target[STATE_KEY] ??= initStateFactory();
1172
+ const callStateUpdatedHook = debounce((state) => {
1173
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.DEVTOOLS_STATE_UPDATED, { state });
1174
+ });
1175
+ const callConnectedUpdatedHook = debounce((state, oldState) => {
1176
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED, {
1177
+ state,
1178
+ oldState
1179
+ });
1180
+ });
1181
+ const devtoolsAppRecords = new Proxy(target.__VUE_DEVTOOLS_KIT_APP_RECORDS__, { get(_target, prop, receiver) {
1182
+ if (prop === "value") return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__;
1183
+ return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__[prop];
1184
+ } });
1185
+ const activeAppRecord = new Proxy(target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__, { get(_target, prop, receiver) {
1186
+ if (prop === "value") return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__;
1187
+ else if (prop === "id") return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__;
1188
+ return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[prop];
1189
+ } });
1190
+ function updateAllStates() {
1191
+ callStateUpdatedHook({
1192
+ ...target[STATE_KEY],
1193
+ appRecords: devtoolsAppRecords.value,
1194
+ activeAppRecordId: activeAppRecord.id,
1195
+ tabs: target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,
1196
+ commands: target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__
1197
+ });
1198
+ }
1199
+ function setActiveAppRecord(app) {
1200
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = app;
1201
+ updateAllStates();
1202
+ }
1203
+ function setActiveAppRecordId(id) {
1204
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = id;
1205
+ updateAllStates();
1206
+ }
1207
+ const devtoolsState = new Proxy(target[STATE_KEY], {
1208
+ get(target$1, property) {
1209
+ if (property === "appRecords") return devtoolsAppRecords;
1210
+ else if (property === "activeAppRecordId") return activeAppRecord.id;
1211
+ else if (property === "tabs") return target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
1212
+ else if (property === "commands") return target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
1213
+ return target[STATE_KEY][property];
1214
+ },
1215
+ deleteProperty(target$1, property) {
1216
+ delete target$1[property];
1217
+ return true;
1218
+ },
1219
+ set(target$1, property, value) {
1220
+ ({ ...target[STATE_KEY] });
1221
+ target$1[property] = value;
1222
+ target[STATE_KEY][property] = value;
1223
+ return true;
1224
+ }
1225
+ });
1226
+ function openInEditor(options = {}) {
1227
+ const { file, host, baseUrl = window.location.origin, line = 0, column = 0 } = options;
1228
+ if (file) {
1229
+ if (host === "chrome-extension") {
1230
+ const fileName = file.replace(/\\/g, "\\\\");
1231
+ const _baseUrl = window.VUE_DEVTOOLS_CONFIG?.openInEditorHost ?? "/";
1232
+ fetch(`${_baseUrl}__open-in-editor?file=${encodeURI(file)}`).then((response) => {
1233
+ if (!response.ok) {
1234
+ const msg = `Opening component ${fileName} failed`;
1235
+ console.log(`%c${msg}`, "color:red");
1236
+ }
1237
+ });
1238
+ } else if (devtoolsState.vitePluginDetected) {
1239
+ const _baseUrl = target.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__ ?? baseUrl;
1240
+ target.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);
1241
+ }
1242
+ }
1243
+ }
1244
+ target.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ ??= [];
1245
+ const devtoolsPluginBuffer = new Proxy(target.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, { get(target$1, prop, receiver) {
1246
+ return Reflect.get(target$1, prop, receiver);
1247
+ } });
1248
+ function _getSettings(settings) {
1249
+ const _settings = {};
1250
+ Object.keys(settings).forEach((key) => {
1251
+ _settings[key] = settings[key].defaultValue;
1252
+ });
1253
+ return _settings;
1254
+ }
1255
+ function getPluginLocalKey(pluginId) {
1256
+ return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${pluginId}__`;
1257
+ }
1258
+ function getPluginSettingsOptions(pluginId) {
1259
+ return (devtoolsPluginBuffer.find((item) => item[0].id === pluginId && !!item[0]?.settings)?.[0] ?? null)?.settings ?? null;
1260
+ }
1261
+ function getPluginSettings(pluginId, fallbackValue) {
1262
+ const localKey = getPluginLocalKey(pluginId);
1263
+ if (localKey) {
1264
+ const localSettings = localStorage.getItem(localKey);
1265
+ if (localSettings) return JSON.parse(localSettings);
1266
+ }
1267
+ if (pluginId) return _getSettings((devtoolsPluginBuffer.find((item) => item[0].id === pluginId)?.[0] ?? null)?.settings ?? {});
1268
+ return _getSettings(fallbackValue);
1269
+ }
1270
+ function initPluginSettings(pluginId, settings) {
1271
+ const localKey = getPluginLocalKey(pluginId);
1272
+ if (!localStorage.getItem(localKey)) localStorage.setItem(localKey, JSON.stringify(_getSettings(settings)));
1273
+ }
1274
+ function setPluginSettings(pluginId, key, value) {
1275
+ const localKey = getPluginLocalKey(pluginId);
1276
+ const localSettings = localStorage.getItem(localKey);
1277
+ const parsedLocalSettings = JSON.parse(localSettings || "{}");
1278
+ const updated = {
1279
+ ...parsedLocalSettings,
1280
+ [key]: value
1281
+ };
1282
+ localStorage.setItem(localKey, JSON.stringify(updated));
1283
+ devtoolsContext.hooks.callHookWith((callbacks) => {
1284
+ callbacks.forEach((cb) => cb({
1285
+ pluginId,
1286
+ key,
1287
+ oldValue: parsedLocalSettings[key],
1288
+ newValue: value,
1289
+ settings: updated
1290
+ }));
1291
+ }, DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS);
1292
+ }
1293
+ let DevToolsHooks = /* @__PURE__ */ function(DevToolsHooks$1) {
1294
+ DevToolsHooks$1["APP_INIT"] = "app:init";
1295
+ DevToolsHooks$1["APP_UNMOUNT"] = "app:unmount";
1296
+ DevToolsHooks$1["COMPONENT_UPDATED"] = "component:updated";
1297
+ DevToolsHooks$1["COMPONENT_ADDED"] = "component:added";
1298
+ DevToolsHooks$1["COMPONENT_REMOVED"] = "component:removed";
1299
+ DevToolsHooks$1["COMPONENT_EMIT"] = "component:emit";
1300
+ DevToolsHooks$1["PERFORMANCE_START"] = "perf:start";
1301
+ DevToolsHooks$1["PERFORMANCE_END"] = "perf:end";
1302
+ DevToolsHooks$1["ADD_ROUTE"] = "router:add-route";
1303
+ DevToolsHooks$1["REMOVE_ROUTE"] = "router:remove-route";
1304
+ DevToolsHooks$1["RENDER_TRACKED"] = "render:tracked";
1305
+ DevToolsHooks$1["RENDER_TRIGGERED"] = "render:triggered";
1306
+ DevToolsHooks$1["APP_CONNECTED"] = "app:connected";
1307
+ DevToolsHooks$1["SETUP_DEVTOOLS_PLUGIN"] = "devtools-plugin:setup";
1308
+ return DevToolsHooks$1;
1309
+ }({});
1310
+ const devtoolsHooks = target.__VUE_DEVTOOLS_HOOK ??= createHooks();
1311
+ const on = {
1312
+ vueAppInit(fn) {
1313
+ devtoolsHooks.hook(DevToolsHooks.APP_INIT, fn);
1314
+ },
1315
+ vueAppUnmount(fn) {
1316
+ devtoolsHooks.hook(DevToolsHooks.APP_UNMOUNT, fn);
1317
+ },
1318
+ vueAppConnected(fn) {
1319
+ devtoolsHooks.hook(DevToolsHooks.APP_CONNECTED, fn);
1320
+ },
1321
+ componentAdded(fn) {
1322
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_ADDED, fn);
1323
+ },
1324
+ componentEmit(fn) {
1325
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_EMIT, fn);
1326
+ },
1327
+ componentUpdated(fn) {
1328
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_UPDATED, fn);
1329
+ },
1330
+ componentRemoved(fn) {
1331
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_REMOVED, fn);
1332
+ },
1333
+ setupDevtoolsPlugin(fn) {
1334
+ devtoolsHooks.hook(DevToolsHooks.SETUP_DEVTOOLS_PLUGIN, fn);
1335
+ },
1336
+ perfStart(fn) {
1337
+ return devtoolsHooks.hook(DevToolsHooks.PERFORMANCE_START, fn);
1338
+ },
1339
+ perfEnd(fn) {
1340
+ return devtoolsHooks.hook(DevToolsHooks.PERFORMANCE_END, fn);
1341
+ }
1342
+ };
1343
+ const hook = {
1344
+ on,
1345
+ setupDevToolsPlugin(pluginDescriptor, setupFn) {
1346
+ return devtoolsHooks.callHook(DevToolsHooks.SETUP_DEVTOOLS_PLUGIN, pluginDescriptor, setupFn);
1347
+ }
1348
+ };
1349
+ var DevToolsV6PluginAPI = class {
1350
+ constructor({ plugin, ctx }) {
1351
+ this.hooks = ctx.hooks;
1352
+ this.plugin = plugin;
1353
+ }
1354
+ get on() {
1355
+ return {
1356
+ visitComponentTree: (handler) => {
1357
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE, handler);
1358
+ },
1359
+ inspectComponent: (handler) => {
1360
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.INSPECT_COMPONENT, handler);
1361
+ },
1362
+ editComponentState: (handler) => {
1363
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.EDIT_COMPONENT_STATE, handler);
1364
+ },
1365
+ getInspectorTree: (handler) => {
1366
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE, handler);
1367
+ },
1368
+ getInspectorState: (handler) => {
1369
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE, handler);
1370
+ },
1371
+ editInspectorState: (handler) => {
1372
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE, handler);
1373
+ },
1374
+ inspectTimelineEvent: (handler) => {
1375
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.INSPECT_TIMELINE_EVENT, handler);
1376
+ },
1377
+ timelineCleared: (handler) => {
1378
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.TIMELINE_CLEARED, handler);
1379
+ },
1380
+ setPluginSettings: (handler) => {
1381
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS, handler);
1382
+ }
1383
+ };
1384
+ }
1385
+ notifyComponentUpdate(instance) {
1386
+ if (devtoolsState.highPerfModeEnabled) return;
1387
+ const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
1388
+ if (inspector?.id) {
1389
+ if (instance) {
1390
+ const args = [
1391
+ instance.appContext.app,
1392
+ instance.uid,
1393
+ instance.parent?.uid,
1394
+ instance
1395
+ ];
1396
+ devtoolsHooks.callHook(DevToolsHooks.COMPONENT_UPDATED, ...args);
1397
+ } else devtoolsHooks.callHook(DevToolsHooks.COMPONENT_UPDATED);
1398
+ this.hooks.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, {
1399
+ inspectorId: inspector.id,
1400
+ plugin: this.plugin
1401
+ });
1402
+ }
1403
+ }
1404
+ addInspector(options) {
1405
+ this.hooks.callHook(DevToolsContextHookKeys.ADD_INSPECTOR, {
1406
+ inspector: options,
1407
+ plugin: this.plugin
1408
+ });
1409
+ if (this.plugin.descriptor.settings) initPluginSettings(options.id, this.plugin.descriptor.settings);
1410
+ }
1411
+ sendInspectorTree(inspectorId) {
1412
+ if (devtoolsState.highPerfModeEnabled) return;
1413
+ this.hooks.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_TREE, {
1414
+ inspectorId,
1415
+ plugin: this.plugin
1416
+ });
1417
+ }
1418
+ sendInspectorState(inspectorId) {
1419
+ if (devtoolsState.highPerfModeEnabled) return;
1420
+ this.hooks.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, {
1421
+ inspectorId,
1422
+ plugin: this.plugin
1423
+ });
1424
+ }
1425
+ selectInspectorNode(inspectorId, nodeId) {
1426
+ this.hooks.callHook(DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE, {
1427
+ inspectorId,
1428
+ nodeId,
1429
+ plugin: this.plugin
1430
+ });
1431
+ }
1432
+ visitComponentTree(payload) {
1433
+ return this.hooks.callHook(DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE, payload);
1434
+ }
1435
+ now() {
1436
+ if (devtoolsState.highPerfModeEnabled) return 0;
1437
+ return Date.now();
1438
+ }
1439
+ addTimelineLayer(options) {
1440
+ this.hooks.callHook(DevToolsContextHookKeys.TIMELINE_LAYER_ADDED, {
1441
+ options,
1442
+ plugin: this.plugin
1443
+ });
1444
+ }
1445
+ addTimelineEvent(options) {
1446
+ if (devtoolsState.highPerfModeEnabled) return;
1447
+ this.hooks.callHook(DevToolsContextHookKeys.TIMELINE_EVENT_ADDED, {
1448
+ options,
1449
+ plugin: this.plugin
1450
+ });
1451
+ }
1452
+ getSettings(pluginId) {
1453
+ return getPluginSettings(pluginId ?? this.plugin.descriptor.id, this.plugin.descriptor.settings);
1454
+ }
1455
+ getComponentInstances(app) {
1456
+ return this.hooks.callHook(DevToolsContextHookKeys.GET_COMPONENT_INSTANCES, { app });
1457
+ }
1458
+ getComponentBounds(instance) {
1459
+ return this.hooks.callHook(DevToolsContextHookKeys.GET_COMPONENT_BOUNDS, { instance });
1460
+ }
1461
+ getComponentName(instance) {
1462
+ return this.hooks.callHook(DevToolsContextHookKeys.GET_COMPONENT_NAME, { instance });
1463
+ }
1464
+ highlightElement(instance) {
1465
+ const uid = instance.__VUE_DEVTOOLS_NEXT_UID__;
1466
+ return this.hooks.callHook(DevToolsContextHookKeys.COMPONENT_HIGHLIGHT, { uid });
1467
+ }
1468
+ unhighlightElement() {
1469
+ return this.hooks.callHook(DevToolsContextHookKeys.COMPONENT_UNHIGHLIGHT);
1470
+ }
1471
+ };
1472
+ const DevToolsPluginAPI = DevToolsV6PluginAPI;
1473
+ const UNDEFINED = "__vue_devtool_undefined__";
1474
+ const INFINITY = "__vue_devtool_infinity__";
1475
+ const NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
1476
+ const NAN = "__vue_devtool_nan__";
1477
+ const tokenMap = {
1478
+ [UNDEFINED]: "undefined",
1479
+ [NAN]: "NaN",
1480
+ [INFINITY]: "Infinity",
1481
+ [NEGATIVE_INFINITY]: "-Infinity"
1482
+ };
1483
+ const reversedTokenMap = Object.entries(tokenMap).reduce((acc, [key, value]) => {
1484
+ acc[value] = key;
1485
+ return acc;
1486
+ }, {});
1487
+ target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ ??= /* @__PURE__ */ new Set();
1488
+ function setupDevToolsPlugin(pluginDescriptor, setupFn) {
1489
+ return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
1490
+ }
1491
+ function callDevToolsPluginSetupFn(plugin, app) {
1492
+ const [pluginDescriptor, setupFn] = plugin;
1493
+ if (pluginDescriptor.app !== app) return;
1494
+ const api = new DevToolsPluginAPI({
1495
+ plugin: {
1496
+ setupFn,
1497
+ descriptor: pluginDescriptor
1498
+ },
1499
+ ctx: devtoolsContext
1500
+ });
1501
+ if (pluginDescriptor.packageName === "vuex") api.on.editInspectorState((payload) => {
1502
+ api.sendInspectorState(payload.inspectorId);
1503
+ });
1504
+ setupFn(api);
1505
+ }
1506
+ function registerDevToolsPlugin(app, options) {
1507
+ if (target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app)) return;
1508
+ if (devtoolsState.highPerfModeEnabled && !options?.inspectingComponent) return;
1509
+ target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);
1510
+ devtoolsPluginBuffer.forEach((plugin) => {
1511
+ callDevToolsPluginSetupFn(plugin, app);
1512
+ });
1513
+ }
1514
+ const ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
1515
+ const ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
1516
+ target[ROUTER_INFO_KEY] ??= {
1517
+ currentRoute: null,
1518
+ routes: []
1519
+ };
1520
+ target[ROUTER_KEY] ??= {};
1521
+ const devtoolsRouterInfo = new Proxy(target[ROUTER_INFO_KEY], { get(target$1, property) {
1522
+ return target[ROUTER_INFO_KEY][property];
1523
+ } });
1524
+ const devtoolsRouter = new Proxy(target[ROUTER_KEY], { get(target$1, property) {
1525
+ if (property === "value") return target[ROUTER_KEY];
1526
+ } });
1527
+ function getRoutes(router) {
1528
+ const routesMap = /* @__PURE__ */ new Map();
1529
+ return (router?.getRoutes() || []).filter((i) => !routesMap.has(i.path) && routesMap.set(i.path, 1));
1530
+ }
1531
+ function filterRoutes(routes) {
1532
+ return routes.map((item) => {
1533
+ let { path, name, children, meta } = item;
1534
+ if (children?.length) children = filterRoutes(children);
1535
+ return {
1536
+ path,
1537
+ name,
1538
+ children,
1539
+ meta
1540
+ };
1541
+ });
1542
+ }
1543
+ function filterCurrentRoute(route) {
1544
+ if (route) {
1545
+ const { fullPath, hash, href, path, name, matched, params, query } = route;
1546
+ return {
1547
+ fullPath,
1548
+ hash,
1549
+ href,
1550
+ path,
1551
+ name,
1552
+ params,
1553
+ query,
1554
+ matched: filterRoutes(matched)
1555
+ };
1556
+ }
1557
+ return route;
1558
+ }
1559
+ function normalizeRouterInfo(appRecord, activeAppRecord$1) {
1560
+ function init() {
1561
+ const router = appRecord.app?.config.globalProperties.$router;
1562
+ const currentRoute = filterCurrentRoute(router?.currentRoute.value);
1563
+ const routes = filterRoutes(getRoutes(router));
1564
+ const c = console.warn;
1565
+ console.warn = () => {};
1566
+ target[ROUTER_INFO_KEY] = {
1567
+ currentRoute: currentRoute ? deepClone(currentRoute) : {},
1568
+ routes: deepClone(routes)
1569
+ };
1570
+ target[ROUTER_KEY] = router;
1571
+ console.warn = c;
1572
+ }
1573
+ init();
1574
+ hook.on.componentUpdated(debounce(() => {
1575
+ if (activeAppRecord$1.value?.app !== appRecord.app) return;
1576
+ init();
1577
+ if (devtoolsState.highPerfModeEnabled) return;
1578
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.ROUTER_INFO_UPDATED, { state: target[ROUTER_INFO_KEY] });
1579
+ }, 200));
1580
+ }
1581
+ function createDevToolsApi(hooks$1) {
1582
+ return {
1583
+ async getInspectorTree(payload) {
1584
+ const _payload = {
1585
+ ...payload,
1586
+ app: activeAppRecord.value.app,
1587
+ rootNodes: []
1588
+ };
1589
+ await new Promise((resolve) => {
1590
+ hooks$1.callHookWith(async (callbacks) => {
1591
+ await Promise.all(callbacks.map((cb) => cb(_payload)));
1592
+ resolve();
1593
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE);
1594
+ });
1595
+ return _payload.rootNodes;
1596
+ },
1597
+ async getInspectorState(payload) {
1598
+ const _payload = {
1599
+ ...payload,
1600
+ app: activeAppRecord.value.app,
1601
+ state: null
1602
+ };
1603
+ const ctx = { currentTab: `custom-inspector:${payload.inspectorId}` };
1604
+ await new Promise((resolve) => {
1605
+ hooks$1.callHookWith(async (callbacks) => {
1606
+ await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
1607
+ resolve();
1608
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE);
1609
+ });
1610
+ return _payload.state;
1611
+ },
1612
+ editInspectorState(payload) {
1613
+ const stateEditor$1 = new StateEditor();
1614
+ const _payload = {
1615
+ ...payload,
1616
+ app: activeAppRecord.value.app,
1617
+ set: (obj, path = payload.path, value = payload.state.value, cb) => {
1618
+ stateEditor$1.set(obj, path, value, cb || stateEditor$1.createDefaultSetCallback(payload.state));
1619
+ }
1620
+ };
1621
+ hooks$1.callHookWith((callbacks) => {
1622
+ callbacks.forEach((cb) => cb(_payload));
1623
+ }, DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE);
1624
+ },
1625
+ sendInspectorState(inspectorId) {
1626
+ const inspector = getInspector(inspectorId);
1627
+ hooks$1.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, {
1628
+ inspectorId,
1629
+ plugin: {
1630
+ descriptor: inspector.descriptor,
1631
+ setupFn: () => ({})
1632
+ }
1633
+ });
1634
+ },
1635
+ inspectComponentInspector() {
1636
+ return inspectComponentHighLighter();
1637
+ },
1638
+ cancelInspectComponentInspector() {
1639
+ return cancelInspectComponentHighLighter();
1640
+ },
1641
+ getComponentRenderCode(id) {
1642
+ const instance = getComponentInstance(activeAppRecord.value, id);
1643
+ if (instance) return !(typeof instance?.type === "function") ? instance.render.toString() : instance.type.toString();
1644
+ },
1645
+ scrollToComponent(id) {
1646
+ return scrollToComponent({ id });
1647
+ },
1648
+ openInEditor,
1649
+ getVueInspector: getComponentInspector,
1650
+ toggleApp(id, options) {
1651
+ const appRecord = devtoolsAppRecords.value.find((record) => record.id === id);
1652
+ if (appRecord) {
1653
+ setActiveAppRecordId(id);
1654
+ setActiveAppRecord(appRecord);
1655
+ normalizeRouterInfo(appRecord, activeAppRecord);
1656
+ callInspectorUpdatedHook();
1657
+ registerDevToolsPlugin(appRecord.app, options);
1658
+ }
1659
+ },
1660
+ inspectDOM(instanceId) {
1661
+ const instance = getComponentInstance(activeAppRecord.value, instanceId);
1662
+ if (instance) {
1663
+ const [el] = getRootElementsFromComponentInstance(instance);
1664
+ if (el) target.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = el;
1665
+ }
1666
+ },
1667
+ updatePluginSettings(pluginId, key, value) {
1668
+ setPluginSettings(pluginId, key, value);
1669
+ },
1670
+ getPluginSettings(pluginId) {
1671
+ return {
1672
+ options: getPluginSettingsOptions(pluginId),
1673
+ values: getPluginSettings(pluginId)
1674
+ };
1675
+ }
1676
+ };
1677
+ }
1678
+ target.__VUE_DEVTOOLS_ENV__ ??= { vitePluginDetected: false };
1679
+ const hooks = createDevToolsCtxHooks();
1680
+ target.__VUE_DEVTOOLS_KIT_CONTEXT__ ??= {
1681
+ hooks,
1682
+ get state() {
1683
+ return {
1684
+ ...devtoolsState,
1685
+ activeAppRecordId: activeAppRecord.id,
1686
+ activeAppRecord: activeAppRecord.value,
1687
+ appRecords: devtoolsAppRecords.value
1688
+ };
1689
+ },
1690
+ api: createDevToolsApi(hooks)
1691
+ };
1692
+ const devtoolsContext = target.__VUE_DEVTOOLS_KIT_CONTEXT__;
1693
+ var require_speakingurl$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js": ((exports, module) => {
1694
+ (function(root) {
1695
+ /**
1696
+ * charMap
1697
+ * @type {Object}
1698
+ */
1699
+ var charMap = {
1700
+ "À": "A",
1701
+ "Á": "A",
1702
+ "Â": "A",
1703
+ "Ã": "A",
1704
+ "Ä": "Ae",
1705
+ "Å": "A",
1706
+ "Æ": "AE",
1707
+ "Ç": "C",
1708
+ "È": "E",
1709
+ "É": "E",
1710
+ "Ê": "E",
1711
+ "Ë": "E",
1712
+ "Ì": "I",
1713
+ "Í": "I",
1714
+ "Î": "I",
1715
+ "Ï": "I",
1716
+ "Ð": "D",
1717
+ "Ñ": "N",
1718
+ "Ò": "O",
1719
+ "Ó": "O",
1720
+ "Ô": "O",
1721
+ "Õ": "O",
1722
+ "Ö": "Oe",
1723
+ "Ő": "O",
1724
+ "Ø": "O",
1725
+ "Ù": "U",
1726
+ "Ú": "U",
1727
+ "Û": "U",
1728
+ "Ü": "Ue",
1729
+ "Ű": "U",
1730
+ "Ý": "Y",
1731
+ "Þ": "TH",
1732
+ "ß": "ss",
1733
+ "à": "a",
1734
+ "á": "a",
1735
+ "â": "a",
1736
+ "ã": "a",
1737
+ "ä": "ae",
1738
+ "å": "a",
1739
+ "æ": "ae",
1740
+ "ç": "c",
1741
+ "è": "e",
1742
+ "é": "e",
1743
+ "ê": "e",
1744
+ "ë": "e",
1745
+ "ì": "i",
1746
+ "í": "i",
1747
+ "î": "i",
1748
+ "ï": "i",
1749
+ "ð": "d",
1750
+ "ñ": "n",
1751
+ "ò": "o",
1752
+ "ó": "o",
1753
+ "ô": "o",
1754
+ "õ": "o",
1755
+ "ö": "oe",
1756
+ "ő": "o",
1757
+ "ø": "o",
1758
+ "ù": "u",
1759
+ "ú": "u",
1760
+ "û": "u",
1761
+ "ü": "ue",
1762
+ "ű": "u",
1763
+ "ý": "y",
1764
+ "þ": "th",
1765
+ "ÿ": "y",
1766
+ "ẞ": "SS",
1767
+ "ا": "a",
1768
+ "أ": "a",
1769
+ "إ": "i",
1770
+ "آ": "aa",
1771
+ "ؤ": "u",
1772
+ "ئ": "e",
1773
+ "ء": "a",
1774
+ "ب": "b",
1775
+ "ت": "t",
1776
+ "ث": "th",
1777
+ "ج": "j",
1778
+ "ح": "h",
1779
+ "خ": "kh",
1780
+ "د": "d",
1781
+ "ذ": "th",
1782
+ "ر": "r",
1783
+ "ز": "z",
1784
+ "س": "s",
1785
+ "ش": "sh",
1786
+ "ص": "s",
1787
+ "ض": "dh",
1788
+ "ط": "t",
1789
+ "ظ": "z",
1790
+ "ع": "a",
1791
+ "غ": "gh",
1792
+ "ف": "f",
1793
+ "ق": "q",
1794
+ "ك": "k",
1795
+ "ل": "l",
1796
+ "م": "m",
1797
+ "ن": "n",
1798
+ "ه": "h",
1799
+ "و": "w",
1800
+ "ي": "y",
1801
+ "ى": "a",
1802
+ "ة": "h",
1803
+ "ﻻ": "la",
1804
+ "ﻷ": "laa",
1805
+ "ﻹ": "lai",
1806
+ "ﻵ": "laa",
1807
+ "گ": "g",
1808
+ "چ": "ch",
1809
+ "پ": "p",
1810
+ "ژ": "zh",
1811
+ "ک": "k",
1812
+ "ی": "y",
1813
+ "َ": "a",
1814
+ "ً": "an",
1815
+ "ِ": "e",
1816
+ "ٍ": "en",
1817
+ "ُ": "u",
1818
+ "ٌ": "on",
1819
+ "ْ": "",
1820
+ "٠": "0",
1821
+ "١": "1",
1822
+ "٢": "2",
1823
+ "٣": "3",
1824
+ "٤": "4",
1825
+ "٥": "5",
1826
+ "٦": "6",
1827
+ "٧": "7",
1828
+ "٨": "8",
1829
+ "٩": "9",
1830
+ "۰": "0",
1831
+ "۱": "1",
1832
+ "۲": "2",
1833
+ "۳": "3",
1834
+ "۴": "4",
1835
+ "۵": "5",
1836
+ "۶": "6",
1837
+ "۷": "7",
1838
+ "۸": "8",
1839
+ "۹": "9",
1840
+ "က": "k",
1841
+ "ခ": "kh",
1842
+ "ဂ": "g",
1843
+ "ဃ": "ga",
1844
+ "င": "ng",
1845
+ "စ": "s",
1846
+ "ဆ": "sa",
1847
+ "ဇ": "z",
1848
+ "စျ": "za",
1849
+ "ည": "ny",
1850
+ "ဋ": "t",
1851
+ "ဌ": "ta",
1852
+ "ဍ": "d",
1853
+ "ဎ": "da",
1854
+ "ဏ": "na",
1855
+ "တ": "t",
1856
+ "ထ": "ta",
1857
+ "ဒ": "d",
1858
+ "ဓ": "da",
1859
+ "န": "n",
1860
+ "ပ": "p",
1861
+ "ဖ": "pa",
1862
+ "ဗ": "b",
1863
+ "ဘ": "ba",
1864
+ "မ": "m",
1865
+ "ယ": "y",
1866
+ "ရ": "ya",
1867
+ "လ": "l",
1868
+ "ဝ": "w",
1869
+ "သ": "th",
1870
+ "ဟ": "h",
1871
+ "ဠ": "la",
1872
+ "အ": "a",
1873
+ "ြ": "y",
1874
+ "ျ": "ya",
1875
+ "ွ": "w",
1876
+ "ြွ": "yw",
1877
+ "ျွ": "ywa",
1878
+ "ှ": "h",
1879
+ "ဧ": "e",
1880
+ "၏": "-e",
1881
+ "ဣ": "i",
1882
+ "ဤ": "-i",
1883
+ "ဉ": "u",
1884
+ "ဦ": "-u",
1885
+ "ဩ": "aw",
1886
+ "သြော": "aw",
1887
+ "ဪ": "aw",
1888
+ "၀": "0",
1889
+ "၁": "1",
1890
+ "၂": "2",
1891
+ "၃": "3",
1892
+ "၄": "4",
1893
+ "၅": "5",
1894
+ "၆": "6",
1895
+ "၇": "7",
1896
+ "၈": "8",
1897
+ "၉": "9",
1898
+ "္": "",
1899
+ "့": "",
1900
+ "း": "",
1901
+ "č": "c",
1902
+ "ď": "d",
1903
+ "ě": "e",
1904
+ "ň": "n",
1905
+ "ř": "r",
1906
+ "š": "s",
1907
+ "ť": "t",
1908
+ "ů": "u",
1909
+ "ž": "z",
1910
+ "Č": "C",
1911
+ "Ď": "D",
1912
+ "Ě": "E",
1913
+ "Ň": "N",
1914
+ "Ř": "R",
1915
+ "Š": "S",
1916
+ "Ť": "T",
1917
+ "Ů": "U",
1918
+ "Ž": "Z",
1919
+ "ހ": "h",
1920
+ "ށ": "sh",
1921
+ "ނ": "n",
1922
+ "ރ": "r",
1923
+ "ބ": "b",
1924
+ "ޅ": "lh",
1925
+ "ކ": "k",
1926
+ "އ": "a",
1927
+ "ވ": "v",
1928
+ "މ": "m",
1929
+ "ފ": "f",
1930
+ "ދ": "dh",
1931
+ "ތ": "th",
1932
+ "ލ": "l",
1933
+ "ގ": "g",
1934
+ "ޏ": "gn",
1935
+ "ސ": "s",
1936
+ "ޑ": "d",
1937
+ "ޒ": "z",
1938
+ "ޓ": "t",
1939
+ "ޔ": "y",
1940
+ "ޕ": "p",
1941
+ "ޖ": "j",
1942
+ "ޗ": "ch",
1943
+ "ޘ": "tt",
1944
+ "ޙ": "hh",
1945
+ "ޚ": "kh",
1946
+ "ޛ": "th",
1947
+ "ޜ": "z",
1948
+ "ޝ": "sh",
1949
+ "ޞ": "s",
1950
+ "ޟ": "d",
1951
+ "ޠ": "t",
1952
+ "ޡ": "z",
1953
+ "ޢ": "a",
1954
+ "ޣ": "gh",
1955
+ "ޤ": "q",
1956
+ "ޥ": "w",
1957
+ "ަ": "a",
1958
+ "ާ": "aa",
1959
+ "ި": "i",
1960
+ "ީ": "ee",
1961
+ "ު": "u",
1962
+ "ޫ": "oo",
1963
+ "ެ": "e",
1964
+ "ޭ": "ey",
1965
+ "ޮ": "o",
1966
+ "ޯ": "oa",
1967
+ "ް": "",
1968
+ "ა": "a",
1969
+ "ბ": "b",
1970
+ "გ": "g",
1971
+ "დ": "d",
1972
+ "ე": "e",
1973
+ "ვ": "v",
1974
+ "ზ": "z",
1975
+ "თ": "t",
1976
+ "ი": "i",
1977
+ "კ": "k",
1978
+ "ლ": "l",
1979
+ "მ": "m",
1980
+ "ნ": "n",
1981
+ "ო": "o",
1982
+ "პ": "p",
1983
+ "ჟ": "zh",
1984
+ "რ": "r",
1985
+ "ს": "s",
1986
+ "ტ": "t",
1987
+ "უ": "u",
1988
+ "ფ": "p",
1989
+ "ქ": "k",
1990
+ "ღ": "gh",
1991
+ "ყ": "q",
1992
+ "შ": "sh",
1993
+ "ჩ": "ch",
1994
+ "ც": "ts",
1995
+ "ძ": "dz",
1996
+ "წ": "ts",
1997
+ "ჭ": "ch",
1998
+ "ხ": "kh",
1999
+ "ჯ": "j",
2000
+ "ჰ": "h",
2001
+ "α": "a",
2002
+ "β": "v",
2003
+ "γ": "g",
2004
+ "δ": "d",
2005
+ "ε": "e",
2006
+ "ζ": "z",
2007
+ "η": "i",
2008
+ "θ": "th",
2009
+ "ι": "i",
2010
+ "κ": "k",
2011
+ "λ": "l",
2012
+ "μ": "m",
2013
+ "ν": "n",
2014
+ "ξ": "ks",
2015
+ "ο": "o",
2016
+ "π": "p",
2017
+ "ρ": "r",
2018
+ "σ": "s",
2019
+ "τ": "t",
2020
+ "υ": "y",
2021
+ "φ": "f",
2022
+ "χ": "x",
2023
+ "ψ": "ps",
2024
+ "ω": "o",
2025
+ "ά": "a",
2026
+ "έ": "e",
2027
+ "ί": "i",
2028
+ "ό": "o",
2029
+ "ύ": "y",
2030
+ "ή": "i",
2031
+ "ώ": "o",
2032
+ "ς": "s",
2033
+ "ϊ": "i",
2034
+ "ΰ": "y",
2035
+ "ϋ": "y",
2036
+ "ΐ": "i",
2037
+ "Α": "A",
2038
+ "Β": "B",
2039
+ "Γ": "G",
2040
+ "Δ": "D",
2041
+ "Ε": "E",
2042
+ "Ζ": "Z",
2043
+ "Η": "I",
2044
+ "Θ": "TH",
2045
+ "Ι": "I",
2046
+ "Κ": "K",
2047
+ "Λ": "L",
2048
+ "Μ": "M",
2049
+ "Ν": "N",
2050
+ "Ξ": "KS",
2051
+ "Ο": "O",
2052
+ "Π": "P",
2053
+ "Ρ": "R",
2054
+ "Σ": "S",
2055
+ "Τ": "T",
2056
+ "Υ": "Y",
2057
+ "Φ": "F",
2058
+ "Χ": "X",
2059
+ "Ψ": "PS",
2060
+ "Ω": "O",
2061
+ "Ά": "A",
2062
+ "Έ": "E",
2063
+ "Ί": "I",
2064
+ "Ό": "O",
2065
+ "Ύ": "Y",
2066
+ "Ή": "I",
2067
+ "Ώ": "O",
2068
+ "Ϊ": "I",
2069
+ "Ϋ": "Y",
2070
+ "ā": "a",
2071
+ "ē": "e",
2072
+ "ģ": "g",
2073
+ "ī": "i",
2074
+ "ķ": "k",
2075
+ "ļ": "l",
2076
+ "ņ": "n",
2077
+ "ū": "u",
2078
+ "Ā": "A",
2079
+ "Ē": "E",
2080
+ "Ģ": "G",
2081
+ "Ī": "I",
2082
+ "Ķ": "k",
2083
+ "Ļ": "L",
2084
+ "Ņ": "N",
2085
+ "Ū": "U",
2086
+ "Ќ": "Kj",
2087
+ "ќ": "kj",
2088
+ "Љ": "Lj",
2089
+ "љ": "lj",
2090
+ "Њ": "Nj",
2091
+ "њ": "nj",
2092
+ "Тс": "Ts",
2093
+ "тс": "ts",
2094
+ "ą": "a",
2095
+ "ć": "c",
2096
+ "ę": "e",
2097
+ "ł": "l",
2098
+ "ń": "n",
2099
+ "ś": "s",
2100
+ "ź": "z",
2101
+ "ż": "z",
2102
+ "Ą": "A",
2103
+ "Ć": "C",
2104
+ "Ę": "E",
2105
+ "Ł": "L",
2106
+ "Ń": "N",
2107
+ "Ś": "S",
2108
+ "Ź": "Z",
2109
+ "Ż": "Z",
2110
+ "Є": "Ye",
2111
+ "І": "I",
2112
+ "Ї": "Yi",
2113
+ "Ґ": "G",
2114
+ "є": "ye",
2115
+ "і": "i",
2116
+ "ї": "yi",
2117
+ "ґ": "g",
2118
+ "ă": "a",
2119
+ "Ă": "A",
2120
+ "ș": "s",
2121
+ "Ș": "S",
2122
+ "ț": "t",
2123
+ "Ț": "T",
2124
+ "ţ": "t",
2125
+ "Ţ": "T",
2126
+ "а": "a",
2127
+ "б": "b",
2128
+ "в": "v",
2129
+ "г": "g",
2130
+ "д": "d",
2131
+ "е": "e",
2132
+ "ё": "yo",
2133
+ "ж": "zh",
2134
+ "з": "z",
2135
+ "и": "i",
2136
+ "й": "i",
2137
+ "к": "k",
2138
+ "л": "l",
2139
+ "м": "m",
2140
+ "н": "n",
2141
+ "о": "o",
2142
+ "п": "p",
2143
+ "р": "r",
2144
+ "с": "s",
2145
+ "т": "t",
2146
+ "у": "u",
2147
+ "ф": "f",
2148
+ "х": "kh",
2149
+ "ц": "c",
2150
+ "ч": "ch",
2151
+ "ш": "sh",
2152
+ "щ": "sh",
2153
+ "ъ": "",
2154
+ "ы": "y",
2155
+ "ь": "",
2156
+ "э": "e",
2157
+ "ю": "yu",
2158
+ "я": "ya",
2159
+ "А": "A",
2160
+ "Б": "B",
2161
+ "В": "V",
2162
+ "Г": "G",
2163
+ "Д": "D",
2164
+ "Е": "E",
2165
+ "Ё": "Yo",
2166
+ "Ж": "Zh",
2167
+ "З": "Z",
2168
+ "И": "I",
2169
+ "Й": "I",
2170
+ "К": "K",
2171
+ "Л": "L",
2172
+ "М": "M",
2173
+ "Н": "N",
2174
+ "О": "O",
2175
+ "П": "P",
2176
+ "Р": "R",
2177
+ "С": "S",
2178
+ "Т": "T",
2179
+ "У": "U",
2180
+ "Ф": "F",
2181
+ "Х": "Kh",
2182
+ "Ц": "C",
2183
+ "Ч": "Ch",
2184
+ "Ш": "Sh",
2185
+ "Щ": "Sh",
2186
+ "Ъ": "",
2187
+ "Ы": "Y",
2188
+ "Ь": "",
2189
+ "Э": "E",
2190
+ "Ю": "Yu",
2191
+ "Я": "Ya",
2192
+ "ђ": "dj",
2193
+ "ј": "j",
2194
+ "ћ": "c",
2195
+ "џ": "dz",
2196
+ "Ђ": "Dj",
2197
+ "Ј": "j",
2198
+ "Ћ": "C",
2199
+ "Џ": "Dz",
2200
+ "ľ": "l",
2201
+ "ĺ": "l",
2202
+ "ŕ": "r",
2203
+ "Ľ": "L",
2204
+ "Ĺ": "L",
2205
+ "Ŕ": "R",
2206
+ "ş": "s",
2207
+ "Ş": "S",
2208
+ "ı": "i",
2209
+ "İ": "I",
2210
+ "ğ": "g",
2211
+ "Ğ": "G",
2212
+ "ả": "a",
2213
+ "Ả": "A",
2214
+ "ẳ": "a",
2215
+ "Ẳ": "A",
2216
+ "ẩ": "a",
2217
+ "Ẩ": "A",
2218
+ "đ": "d",
2219
+ "Đ": "D",
2220
+ "ẹ": "e",
2221
+ "Ẹ": "E",
2222
+ "ẽ": "e",
2223
+ "Ẽ": "E",
2224
+ "ẻ": "e",
2225
+ "Ẻ": "E",
2226
+ "ế": "e",
2227
+ "Ế": "E",
2228
+ "ề": "e",
2229
+ "Ề": "E",
2230
+ "ệ": "e",
2231
+ "Ệ": "E",
2232
+ "ễ": "e",
2233
+ "Ễ": "E",
2234
+ "ể": "e",
2235
+ "Ể": "E",
2236
+ "ỏ": "o",
2237
+ "ọ": "o",
2238
+ "Ọ": "o",
2239
+ "ố": "o",
2240
+ "Ố": "O",
2241
+ "ồ": "o",
2242
+ "Ồ": "O",
2243
+ "ổ": "o",
2244
+ "Ổ": "O",
2245
+ "ộ": "o",
2246
+ "Ộ": "O",
2247
+ "ỗ": "o",
2248
+ "Ỗ": "O",
2249
+ "ơ": "o",
2250
+ "Ơ": "O",
2251
+ "ớ": "o",
2252
+ "Ớ": "O",
2253
+ "ờ": "o",
2254
+ "Ờ": "O",
2255
+ "ợ": "o",
2256
+ "Ợ": "O",
2257
+ "ỡ": "o",
2258
+ "Ỡ": "O",
2259
+ "Ở": "o",
2260
+ "ở": "o",
2261
+ "ị": "i",
2262
+ "Ị": "I",
2263
+ "ĩ": "i",
2264
+ "Ĩ": "I",
2265
+ "ỉ": "i",
2266
+ "Ỉ": "i",
2267
+ "ủ": "u",
2268
+ "Ủ": "U",
2269
+ "ụ": "u",
2270
+ "Ụ": "U",
2271
+ "ũ": "u",
2272
+ "Ũ": "U",
2273
+ "ư": "u",
2274
+ "Ư": "U",
2275
+ "ứ": "u",
2276
+ "Ứ": "U",
2277
+ "ừ": "u",
2278
+ "Ừ": "U",
2279
+ "ự": "u",
2280
+ "Ự": "U",
2281
+ "ữ": "u",
2282
+ "Ữ": "U",
2283
+ "ử": "u",
2284
+ "Ử": "ư",
2285
+ "ỷ": "y",
2286
+ "Ỷ": "y",
2287
+ "ỳ": "y",
2288
+ "Ỳ": "Y",
2289
+ "ỵ": "y",
2290
+ "Ỵ": "Y",
2291
+ "ỹ": "y",
2292
+ "Ỹ": "Y",
2293
+ "ạ": "a",
2294
+ "Ạ": "A",
2295
+ "ấ": "a",
2296
+ "Ấ": "A",
2297
+ "ầ": "a",
2298
+ "Ầ": "A",
2299
+ "ậ": "a",
2300
+ "Ậ": "A",
2301
+ "ẫ": "a",
2302
+ "Ẫ": "A",
2303
+ "ắ": "a",
2304
+ "Ắ": "A",
2305
+ "ằ": "a",
2306
+ "Ằ": "A",
2307
+ "ặ": "a",
2308
+ "Ặ": "A",
2309
+ "ẵ": "a",
2310
+ "Ẵ": "A",
2311
+ "⓪": "0",
2312
+ "①": "1",
2313
+ "②": "2",
2314
+ "③": "3",
2315
+ "④": "4",
2316
+ "⑤": "5",
2317
+ "⑥": "6",
2318
+ "⑦": "7",
2319
+ "⑧": "8",
2320
+ "⑨": "9",
2321
+ "⑩": "10",
2322
+ "⑪": "11",
2323
+ "⑫": "12",
2324
+ "⑬": "13",
2325
+ "⑭": "14",
2326
+ "⑮": "15",
2327
+ "⑯": "16",
2328
+ "⑰": "17",
2329
+ "⑱": "18",
2330
+ "⑲": "18",
2331
+ "⑳": "18",
2332
+ "⓵": "1",
2333
+ "⓶": "2",
2334
+ "⓷": "3",
2335
+ "⓸": "4",
2336
+ "⓹": "5",
2337
+ "⓺": "6",
2338
+ "⓻": "7",
2339
+ "⓼": "8",
2340
+ "⓽": "9",
2341
+ "⓾": "10",
2342
+ "⓿": "0",
2343
+ "⓫": "11",
2344
+ "⓬": "12",
2345
+ "⓭": "13",
2346
+ "⓮": "14",
2347
+ "⓯": "15",
2348
+ "⓰": "16",
2349
+ "⓱": "17",
2350
+ "⓲": "18",
2351
+ "⓳": "19",
2352
+ "⓴": "20",
2353
+ "Ⓐ": "A",
2354
+ "Ⓑ": "B",
2355
+ "Ⓒ": "C",
2356
+ "Ⓓ": "D",
2357
+ "Ⓔ": "E",
2358
+ "Ⓕ": "F",
2359
+ "Ⓖ": "G",
2360
+ "Ⓗ": "H",
2361
+ "Ⓘ": "I",
2362
+ "Ⓙ": "J",
2363
+ "Ⓚ": "K",
2364
+ "Ⓛ": "L",
2365
+ "Ⓜ": "M",
2366
+ "Ⓝ": "N",
2367
+ "Ⓞ": "O",
2368
+ "Ⓟ": "P",
2369
+ "Ⓠ": "Q",
2370
+ "Ⓡ": "R",
2371
+ "Ⓢ": "S",
2372
+ "Ⓣ": "T",
2373
+ "Ⓤ": "U",
2374
+ "Ⓥ": "V",
2375
+ "Ⓦ": "W",
2376
+ "Ⓧ": "X",
2377
+ "Ⓨ": "Y",
2378
+ "Ⓩ": "Z",
2379
+ "ⓐ": "a",
2380
+ "ⓑ": "b",
2381
+ "ⓒ": "c",
2382
+ "ⓓ": "d",
2383
+ "ⓔ": "e",
2384
+ "ⓕ": "f",
2385
+ "ⓖ": "g",
2386
+ "ⓗ": "h",
2387
+ "ⓘ": "i",
2388
+ "ⓙ": "j",
2389
+ "ⓚ": "k",
2390
+ "ⓛ": "l",
2391
+ "ⓜ": "m",
2392
+ "ⓝ": "n",
2393
+ "ⓞ": "o",
2394
+ "ⓟ": "p",
2395
+ "ⓠ": "q",
2396
+ "ⓡ": "r",
2397
+ "ⓢ": "s",
2398
+ "ⓣ": "t",
2399
+ "ⓤ": "u",
2400
+ "ⓦ": "v",
2401
+ "ⓥ": "w",
2402
+ "ⓧ": "x",
2403
+ "ⓨ": "y",
2404
+ "ⓩ": "z",
2405
+ "“": "\"",
2406
+ "”": "\"",
2407
+ "‘": "'",
2408
+ "’": "'",
2409
+ "∂": "d",
2410
+ "ƒ": "f",
2411
+ "™": "(TM)",
2412
+ "©": "(C)",
2413
+ "œ": "oe",
2414
+ "Œ": "OE",
2415
+ "®": "(R)",
2416
+ "†": "+",
2417
+ "℠": "(SM)",
2418
+ "…": "...",
2419
+ "˚": "o",
2420
+ "º": "o",
2421
+ "ª": "a",
2422
+ "•": "*",
2423
+ "၊": ",",
2424
+ "။": ".",
2425
+ "$": "USD",
2426
+ "€": "EUR",
2427
+ "₢": "BRN",
2428
+ "₣": "FRF",
2429
+ "£": "GBP",
2430
+ "₤": "ITL",
2431
+ "₦": "NGN",
2432
+ "₧": "ESP",
2433
+ "₩": "KRW",
2434
+ "₪": "ILS",
2435
+ "₫": "VND",
2436
+ "₭": "LAK",
2437
+ "₮": "MNT",
2438
+ "₯": "GRD",
2439
+ "₱": "ARS",
2440
+ "₲": "PYG",
2441
+ "₳": "ARA",
2442
+ "₴": "UAH",
2443
+ "₵": "GHS",
2444
+ "¢": "cent",
2445
+ "¥": "CNY",
2446
+ "元": "CNY",
2447
+ "円": "YEN",
2448
+ "﷼": "IRR",
2449
+ "₠": "EWE",
2450
+ "฿": "THB",
2451
+ "₨": "INR",
2452
+ "₹": "INR",
2453
+ "₰": "PF",
2454
+ "₺": "TRY",
2455
+ "؋": "AFN",
2456
+ "₼": "AZN",
2457
+ "лв": "BGN",
2458
+ "៛": "KHR",
2459
+ "₡": "CRC",
2460
+ "₸": "KZT",
2461
+ "ден": "MKD",
2462
+ "zł": "PLN",
2463
+ "₽": "RUB",
2464
+ "₾": "GEL"
2465
+ };
2466
+ /**
2467
+ * special look ahead character array
2468
+ * These characters form with consonants to become 'single'/consonant combo
2469
+ * @type [Array]
2470
+ */
2471
+ var lookAheadCharArray = ["်", "ް"];
2472
+ /**
2473
+ * diatricMap for languages where transliteration changes entirely as more diatrics are added
2474
+ * @type {Object}
2475
+ */
2476
+ var diatricMap = {
2477
+ "ာ": "a",
2478
+ "ါ": "a",
2479
+ "ေ": "e",
2480
+ "ဲ": "e",
2481
+ "ိ": "i",
2482
+ "ီ": "i",
2483
+ "ို": "o",
2484
+ "ု": "u",
2485
+ "ူ": "u",
2486
+ "ေါင်": "aung",
2487
+ "ော": "aw",
2488
+ "ော်": "aw",
2489
+ "ေါ": "aw",
2490
+ "ေါ်": "aw",
2491
+ "်": "်",
2492
+ "က်": "et",
2493
+ "ိုက်": "aik",
2494
+ "ောက်": "auk",
2495
+ "င်": "in",
2496
+ "ိုင်": "aing",
2497
+ "ောင်": "aung",
2498
+ "စ်": "it",
2499
+ "ည်": "i",
2500
+ "တ်": "at",
2501
+ "ိတ်": "eik",
2502
+ "ုတ်": "ok",
2503
+ "ွတ်": "ut",
2504
+ "ေတ်": "it",
2505
+ "ဒ်": "d",
2506
+ "ိုဒ်": "ok",
2507
+ "ုဒ်": "ait",
2508
+ "န်": "an",
2509
+ "ာန်": "an",
2510
+ "ိန်": "ein",
2511
+ "ုန်": "on",
2512
+ "ွန်": "un",
2513
+ "ပ်": "at",
2514
+ "ိပ်": "eik",
2515
+ "ုပ်": "ok",
2516
+ "ွပ်": "ut",
2517
+ "န်ုပ်": "nub",
2518
+ "မ်": "an",
2519
+ "ိမ်": "ein",
2520
+ "ုမ်": "on",
2521
+ "ွမ်": "un",
2522
+ "ယ်": "e",
2523
+ "ိုလ်": "ol",
2524
+ "ဉ်": "in",
2525
+ "ံ": "an",
2526
+ "ိံ": "ein",
2527
+ "ုံ": "on",
2528
+ "ައް": "ah",
2529
+ "ަށް": "ah"
2530
+ };
2531
+ /**
2532
+ * langCharMap language specific characters translations
2533
+ * @type {Object}
2534
+ */
2535
+ var langCharMap = {
2536
+ "en": {},
2537
+ "az": {
2538
+ "ç": "c",
2539
+ "ə": "e",
2540
+ "ğ": "g",
2541
+ "ı": "i",
2542
+ "ö": "o",
2543
+ "ş": "s",
2544
+ "ü": "u",
2545
+ "Ç": "C",
2546
+ "Ə": "E",
2547
+ "Ğ": "G",
2548
+ "İ": "I",
2549
+ "Ö": "O",
2550
+ "Ş": "S",
2551
+ "Ü": "U"
2552
+ },
2553
+ "cs": {
2554
+ "č": "c",
2555
+ "ď": "d",
2556
+ "ě": "e",
2557
+ "ň": "n",
2558
+ "ř": "r",
2559
+ "š": "s",
2560
+ "ť": "t",
2561
+ "ů": "u",
2562
+ "ž": "z",
2563
+ "Č": "C",
2564
+ "Ď": "D",
2565
+ "Ě": "E",
2566
+ "Ň": "N",
2567
+ "Ř": "R",
2568
+ "Š": "S",
2569
+ "Ť": "T",
2570
+ "Ů": "U",
2571
+ "Ž": "Z"
2572
+ },
2573
+ "fi": {
2574
+ "ä": "a",
2575
+ "Ä": "A",
2576
+ "ö": "o",
2577
+ "Ö": "O"
2578
+ },
2579
+ "hu": {
2580
+ "ä": "a",
2581
+ "Ä": "A",
2582
+ "ö": "o",
2583
+ "Ö": "O",
2584
+ "ü": "u",
2585
+ "Ü": "U",
2586
+ "ű": "u",
2587
+ "Ű": "U"
2588
+ },
2589
+ "lt": {
2590
+ "ą": "a",
2591
+ "č": "c",
2592
+ "ę": "e",
2593
+ "ė": "e",
2594
+ "į": "i",
2595
+ "š": "s",
2596
+ "ų": "u",
2597
+ "ū": "u",
2598
+ "ž": "z",
2599
+ "Ą": "A",
2600
+ "Č": "C",
2601
+ "Ę": "E",
2602
+ "Ė": "E",
2603
+ "Į": "I",
2604
+ "Š": "S",
2605
+ "Ų": "U",
2606
+ "Ū": "U"
2607
+ },
2608
+ "lv": {
2609
+ "ā": "a",
2610
+ "č": "c",
2611
+ "ē": "e",
2612
+ "ģ": "g",
2613
+ "ī": "i",
2614
+ "ķ": "k",
2615
+ "ļ": "l",
2616
+ "ņ": "n",
2617
+ "š": "s",
2618
+ "ū": "u",
2619
+ "ž": "z",
2620
+ "Ā": "A",
2621
+ "Č": "C",
2622
+ "Ē": "E",
2623
+ "Ģ": "G",
2624
+ "Ī": "i",
2625
+ "Ķ": "k",
2626
+ "Ļ": "L",
2627
+ "Ņ": "N",
2628
+ "Š": "S",
2629
+ "Ū": "u",
2630
+ "Ž": "Z"
2631
+ },
2632
+ "pl": {
2633
+ "ą": "a",
2634
+ "ć": "c",
2635
+ "ę": "e",
2636
+ "ł": "l",
2637
+ "ń": "n",
2638
+ "ó": "o",
2639
+ "ś": "s",
2640
+ "ź": "z",
2641
+ "ż": "z",
2642
+ "Ą": "A",
2643
+ "Ć": "C",
2644
+ "Ę": "e",
2645
+ "Ł": "L",
2646
+ "Ń": "N",
2647
+ "Ó": "O",
2648
+ "Ś": "S",
2649
+ "Ź": "Z",
2650
+ "Ż": "Z"
2651
+ },
2652
+ "sv": {
2653
+ "ä": "a",
2654
+ "Ä": "A",
2655
+ "ö": "o",
2656
+ "Ö": "O"
2657
+ },
2658
+ "sk": {
2659
+ "ä": "a",
2660
+ "Ä": "A"
2661
+ },
2662
+ "sr": {
2663
+ "љ": "lj",
2664
+ "њ": "nj",
2665
+ "Љ": "Lj",
2666
+ "Њ": "Nj",
2667
+ "đ": "dj",
2668
+ "Đ": "Dj"
2669
+ },
2670
+ "tr": {
2671
+ "Ü": "U",
2672
+ "Ö": "O",
2673
+ "ü": "u",
2674
+ "ö": "o"
2675
+ }
2676
+ };
2677
+ /**
2678
+ * symbolMap language specific symbol translations
2679
+ * translations must be transliterated already
2680
+ * @type {Object}
2681
+ */
2682
+ var symbolMap = {
2683
+ "ar": {
2684
+ "∆": "delta",
2685
+ "∞": "la-nihaya",
2686
+ "♥": "hob",
2687
+ "&": "wa",
2688
+ "|": "aw",
2689
+ "<": "aqal-men",
2690
+ ">": "akbar-men",
2691
+ "∑": "majmou",
2692
+ "¤": "omla"
2693
+ },
2694
+ "az": {},
2695
+ "ca": {
2696
+ "∆": "delta",
2697
+ "∞": "infinit",
2698
+ "♥": "amor",
2699
+ "&": "i",
2700
+ "|": "o",
2701
+ "<": "menys que",
2702
+ ">": "mes que",
2703
+ "∑": "suma dels",
2704
+ "¤": "moneda"
2705
+ },
2706
+ "cs": {
2707
+ "∆": "delta",
2708
+ "∞": "nekonecno",
2709
+ "♥": "laska",
2710
+ "&": "a",
2711
+ "|": "nebo",
2712
+ "<": "mensi nez",
2713
+ ">": "vetsi nez",
2714
+ "∑": "soucet",
2715
+ "¤": "mena"
2716
+ },
2717
+ "de": {
2718
+ "∆": "delta",
2719
+ "∞": "unendlich",
2720
+ "♥": "Liebe",
2721
+ "&": "und",
2722
+ "|": "oder",
2723
+ "<": "kleiner als",
2724
+ ">": "groesser als",
2725
+ "∑": "Summe von",
2726
+ "¤": "Waehrung"
2727
+ },
2728
+ "dv": {
2729
+ "∆": "delta",
2730
+ "∞": "kolunulaa",
2731
+ "♥": "loabi",
2732
+ "&": "aai",
2733
+ "|": "noonee",
2734
+ "<": "ah vure kuda",
2735
+ ">": "ah vure bodu",
2736
+ "∑": "jumula",
2737
+ "¤": "faisaa"
2738
+ },
2739
+ "en": {
2740
+ "∆": "delta",
2741
+ "∞": "infinity",
2742
+ "♥": "love",
2743
+ "&": "and",
2744
+ "|": "or",
2745
+ "<": "less than",
2746
+ ">": "greater than",
2747
+ "∑": "sum",
2748
+ "¤": "currency"
2749
+ },
2750
+ "es": {
2751
+ "∆": "delta",
2752
+ "∞": "infinito",
2753
+ "♥": "amor",
2754
+ "&": "y",
2755
+ "|": "u",
2756
+ "<": "menos que",
2757
+ ">": "mas que",
2758
+ "∑": "suma de los",
2759
+ "¤": "moneda"
2760
+ },
2761
+ "fa": {
2762
+ "∆": "delta",
2763
+ "∞": "bi-nahayat",
2764
+ "♥": "eshgh",
2765
+ "&": "va",
2766
+ "|": "ya",
2767
+ "<": "kamtar-az",
2768
+ ">": "bishtar-az",
2769
+ "∑": "majmooe",
2770
+ "¤": "vahed"
2771
+ },
2772
+ "fi": {
2773
+ "∆": "delta",
2774
+ "∞": "aarettomyys",
2775
+ "♥": "rakkaus",
2776
+ "&": "ja",
2777
+ "|": "tai",
2778
+ "<": "pienempi kuin",
2779
+ ">": "suurempi kuin",
2780
+ "∑": "summa",
2781
+ "¤": "valuutta"
2782
+ },
2783
+ "fr": {
2784
+ "∆": "delta",
2785
+ "∞": "infiniment",
2786
+ "♥": "Amour",
2787
+ "&": "et",
2788
+ "|": "ou",
2789
+ "<": "moins que",
2790
+ ">": "superieure a",
2791
+ "∑": "somme des",
2792
+ "¤": "monnaie"
2793
+ },
2794
+ "ge": {
2795
+ "∆": "delta",
2796
+ "∞": "usasruloba",
2797
+ "♥": "siqvaruli",
2798
+ "&": "da",
2799
+ "|": "an",
2800
+ "<": "naklebi",
2801
+ ">": "meti",
2802
+ "∑": "jami",
2803
+ "¤": "valuta"
2804
+ },
2805
+ "gr": {},
2806
+ "hu": {
2807
+ "∆": "delta",
2808
+ "∞": "vegtelen",
2809
+ "♥": "szerelem",
2810
+ "&": "es",
2811
+ "|": "vagy",
2812
+ "<": "kisebb mint",
2813
+ ">": "nagyobb mint",
2814
+ "∑": "szumma",
2815
+ "¤": "penznem"
2816
+ },
2817
+ "it": {
2818
+ "∆": "delta",
2819
+ "∞": "infinito",
2820
+ "♥": "amore",
2821
+ "&": "e",
2822
+ "|": "o",
2823
+ "<": "minore di",
2824
+ ">": "maggiore di",
2825
+ "∑": "somma",
2826
+ "¤": "moneta"
2827
+ },
2828
+ "lt": {
2829
+ "∆": "delta",
2830
+ "∞": "begalybe",
2831
+ "♥": "meile",
2832
+ "&": "ir",
2833
+ "|": "ar",
2834
+ "<": "maziau nei",
2835
+ ">": "daugiau nei",
2836
+ "∑": "suma",
2837
+ "¤": "valiuta"
2838
+ },
2839
+ "lv": {
2840
+ "∆": "delta",
2841
+ "∞": "bezgaliba",
2842
+ "♥": "milestiba",
2843
+ "&": "un",
2844
+ "|": "vai",
2845
+ "<": "mazak neka",
2846
+ ">": "lielaks neka",
2847
+ "∑": "summa",
2848
+ "¤": "valuta"
2849
+ },
2850
+ "my": {
2851
+ "∆": "kwahkhyaet",
2852
+ "∞": "asaonasme",
2853
+ "♥": "akhyait",
2854
+ "&": "nhin",
2855
+ "|": "tho",
2856
+ "<": "ngethaw",
2857
+ ">": "kyithaw",
2858
+ "∑": "paungld",
2859
+ "¤": "ngwekye"
2860
+ },
2861
+ "mk": {},
2862
+ "nl": {
2863
+ "∆": "delta",
2864
+ "∞": "oneindig",
2865
+ "♥": "liefde",
2866
+ "&": "en",
2867
+ "|": "of",
2868
+ "<": "kleiner dan",
2869
+ ">": "groter dan",
2870
+ "∑": "som",
2871
+ "¤": "valuta"
2872
+ },
2873
+ "pl": {
2874
+ "∆": "delta",
2875
+ "∞": "nieskonczonosc",
2876
+ "♥": "milosc",
2877
+ "&": "i",
2878
+ "|": "lub",
2879
+ "<": "mniejsze niz",
2880
+ ">": "wieksze niz",
2881
+ "∑": "suma",
2882
+ "¤": "waluta"
2883
+ },
2884
+ "pt": {
2885
+ "∆": "delta",
2886
+ "∞": "infinito",
2887
+ "♥": "amor",
2888
+ "&": "e",
2889
+ "|": "ou",
2890
+ "<": "menor que",
2891
+ ">": "maior que",
2892
+ "∑": "soma",
2893
+ "¤": "moeda"
2894
+ },
2895
+ "ro": {
2896
+ "∆": "delta",
2897
+ "∞": "infinit",
2898
+ "♥": "dragoste",
2899
+ "&": "si",
2900
+ "|": "sau",
2901
+ "<": "mai mic ca",
2902
+ ">": "mai mare ca",
2903
+ "∑": "suma",
2904
+ "¤": "valuta"
2905
+ },
2906
+ "ru": {
2907
+ "∆": "delta",
2908
+ "∞": "beskonechno",
2909
+ "♥": "lubov",
2910
+ "&": "i",
2911
+ "|": "ili",
2912
+ "<": "menshe",
2913
+ ">": "bolshe",
2914
+ "∑": "summa",
2915
+ "¤": "valjuta"
2916
+ },
2917
+ "sk": {
2918
+ "∆": "delta",
2919
+ "∞": "nekonecno",
2920
+ "♥": "laska",
2921
+ "&": "a",
2922
+ "|": "alebo",
2923
+ "<": "menej ako",
2924
+ ">": "viac ako",
2925
+ "∑": "sucet",
2926
+ "¤": "mena"
2927
+ },
2928
+ "sr": {},
2929
+ "tr": {
2930
+ "∆": "delta",
2931
+ "∞": "sonsuzluk",
2932
+ "♥": "ask",
2933
+ "&": "ve",
2934
+ "|": "veya",
2935
+ "<": "kucuktur",
2936
+ ">": "buyuktur",
2937
+ "∑": "toplam",
2938
+ "¤": "para birimi"
2939
+ },
2940
+ "uk": {
2941
+ "∆": "delta",
2942
+ "∞": "bezkinechnist",
2943
+ "♥": "lubov",
2944
+ "&": "i",
2945
+ "|": "abo",
2946
+ "<": "menshe",
2947
+ ">": "bilshe",
2948
+ "∑": "suma",
2949
+ "¤": "valjuta"
2950
+ },
2951
+ "vn": {
2952
+ "∆": "delta",
2953
+ "∞": "vo cuc",
2954
+ "♥": "yeu",
2955
+ "&": "va",
2956
+ "|": "hoac",
2957
+ "<": "nho hon",
2958
+ ">": "lon hon",
2959
+ "∑": "tong",
2960
+ "¤": "tien te"
2961
+ }
2962
+ };
2963
+ var uricChars = [
2964
+ ";",
2965
+ "?",
2966
+ ":",
2967
+ "@",
2968
+ "&",
2969
+ "=",
2970
+ "+",
2971
+ "$",
2972
+ ",",
2973
+ "/"
2974
+ ].join("");
2975
+ var uricNoSlashChars = [
2976
+ ";",
2977
+ "?",
2978
+ ":",
2979
+ "@",
2980
+ "&",
2981
+ "=",
2982
+ "+",
2983
+ "$",
2984
+ ","
2985
+ ].join("");
2986
+ var markChars = [
2987
+ ".",
2988
+ "!",
2989
+ "~",
2990
+ "*",
2991
+ "'",
2992
+ "(",
2993
+ ")"
2994
+ ].join("");
2995
+ /**
2996
+ * getSlug
2997
+ * @param {string} input input string
2998
+ * @param {object|string} opts config object or separator string/char
2999
+ * @api public
3000
+ * @return {string} sluggified string
3001
+ */
3002
+ var getSlug = function getSlug$1(input, opts) {
3003
+ var separator = "-";
3004
+ var result = "";
3005
+ var diatricString = "";
3006
+ var convertSymbols = true;
3007
+ var customReplacements = {};
3008
+ var maintainCase;
3009
+ var titleCase;
3010
+ var truncate;
3011
+ var uricFlag;
3012
+ var uricNoSlashFlag;
3013
+ var markFlag;
3014
+ var symbol;
3015
+ var langChar;
3016
+ var lucky;
3017
+ var i;
3018
+ var ch;
3019
+ var l;
3020
+ var lastCharWasSymbol;
3021
+ var lastCharWasDiatric;
3022
+ var allowedChars = "";
3023
+ if (typeof input !== "string") return "";
3024
+ if (typeof opts === "string") separator = opts;
3025
+ symbol = symbolMap.en;
3026
+ langChar = langCharMap.en;
3027
+ if (typeof opts === "object") {
3028
+ maintainCase = opts.maintainCase || false;
3029
+ customReplacements = opts.custom && typeof opts.custom === "object" ? opts.custom : customReplacements;
3030
+ truncate = +opts.truncate > 1 && opts.truncate || false;
3031
+ uricFlag = opts.uric || false;
3032
+ uricNoSlashFlag = opts.uricNoSlash || false;
3033
+ markFlag = opts.mark || false;
3034
+ convertSymbols = opts.symbols === false || opts.lang === false ? false : true;
3035
+ separator = opts.separator || separator;
3036
+ if (uricFlag) allowedChars += uricChars;
3037
+ if (uricNoSlashFlag) allowedChars += uricNoSlashChars;
3038
+ if (markFlag) allowedChars += markChars;
3039
+ symbol = opts.lang && symbolMap[opts.lang] && convertSymbols ? symbolMap[opts.lang] : convertSymbols ? symbolMap.en : {};
3040
+ langChar = opts.lang && langCharMap[opts.lang] ? langCharMap[opts.lang] : opts.lang === false || opts.lang === true ? {} : langCharMap.en;
3041
+ if (opts.titleCase && typeof opts.titleCase.length === "number" && Array.prototype.toString.call(opts.titleCase)) {
3042
+ opts.titleCase.forEach(function(v) {
3043
+ customReplacements[v + ""] = v + "";
3044
+ });
3045
+ titleCase = true;
3046
+ } else titleCase = !!opts.titleCase;
3047
+ if (opts.custom && typeof opts.custom.length === "number" && Array.prototype.toString.call(opts.custom)) opts.custom.forEach(function(v) {
3048
+ customReplacements[v + ""] = v + "";
3049
+ });
3050
+ Object.keys(customReplacements).forEach(function(v) {
3051
+ var r;
3052
+ if (v.length > 1) r = new RegExp("\\b" + escapeChars(v) + "\\b", "gi");
3053
+ else r = new RegExp(escapeChars(v), "gi");
3054
+ input = input.replace(r, customReplacements[v]);
3055
+ });
3056
+ for (ch in customReplacements) allowedChars += ch;
3057
+ }
3058
+ allowedChars += separator;
3059
+ allowedChars = escapeChars(allowedChars);
3060
+ input = input.replace(/(^\s+|\s+$)/g, "");
3061
+ lastCharWasSymbol = false;
3062
+ lastCharWasDiatric = false;
3063
+ for (i = 0, l = input.length; i < l; i++) {
3064
+ ch = input[i];
3065
+ if (isReplacedCustomChar(ch, customReplacements)) lastCharWasSymbol = false;
3066
+ else if (langChar[ch]) {
3067
+ ch = lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/) ? " " + langChar[ch] : langChar[ch];
3068
+ lastCharWasSymbol = false;
3069
+ } else if (ch in charMap) {
3070
+ if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) {
3071
+ diatricString += ch;
3072
+ ch = "";
3073
+ } else if (lastCharWasDiatric === true) {
3074
+ ch = diatricMap[diatricString] + charMap[ch];
3075
+ diatricString = "";
3076
+ } else ch = lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/) ? " " + charMap[ch] : charMap[ch];
3077
+ lastCharWasSymbol = false;
3078
+ lastCharWasDiatric = false;
3079
+ } else if (ch in diatricMap) {
3080
+ diatricString += ch;
3081
+ ch = "";
3082
+ if (i === l - 1) ch = diatricMap[diatricString];
3083
+ lastCharWasDiatric = true;
3084
+ } else if (symbol[ch] && !(uricFlag && uricChars.indexOf(ch) !== -1) && !(uricNoSlashFlag && uricNoSlashChars.indexOf(ch) !== -1)) {
3085
+ ch = lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/) ? separator + symbol[ch] : symbol[ch];
3086
+ ch += input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/) ? separator : "";
3087
+ lastCharWasSymbol = true;
3088
+ } else {
3089
+ if (lastCharWasDiatric === true) {
3090
+ ch = diatricMap[diatricString] + ch;
3091
+ diatricString = "";
3092
+ lastCharWasDiatric = false;
3093
+ } else if (lastCharWasSymbol && (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))) ch = " " + ch;
3094
+ lastCharWasSymbol = false;
3095
+ }
3096
+ result += ch.replace(new RegExp("[^\\w\\s" + allowedChars + "_-]", "g"), separator);
3097
+ }
3098
+ if (titleCase) result = result.replace(/(\w)(\S*)/g, function(_, i$1, r) {
3099
+ var j = i$1.toUpperCase() + (r !== null ? r : "");
3100
+ return Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0 ? j : j.toLowerCase();
3101
+ });
3102
+ result = result.replace(/\s+/g, separator).replace(new RegExp("\\" + separator + "+", "g"), separator).replace(new RegExp("(^\\" + separator + "+|\\" + separator + "+$)", "g"), "");
3103
+ if (truncate && result.length > truncate) {
3104
+ lucky = result.charAt(truncate) === separator;
3105
+ result = result.slice(0, truncate);
3106
+ if (!lucky) result = result.slice(0, result.lastIndexOf(separator));
3107
+ }
3108
+ if (!maintainCase && !titleCase) result = result.toLowerCase();
3109
+ return result;
3110
+ };
3111
+ /**
3112
+ * createSlug curried(opts)(input)
3113
+ * @param {object|string} opts config object or input string
3114
+ * @return {Function} function getSlugWithConfig()
3115
+ **/
3116
+ var createSlug = function createSlug$1(opts) {
3117
+ /**
3118
+ * getSlugWithConfig
3119
+ * @param {string} input string
3120
+ * @return {string} slug string
3121
+ */
3122
+ return function getSlugWithConfig(input) {
3123
+ return getSlug(input, opts);
3124
+ };
3125
+ };
3126
+ /**
3127
+ * escape Chars
3128
+ * @param {string} input string
3129
+ */
3130
+ var escapeChars = function escapeChars$1(input) {
3131
+ return input.replace(/[-\\^$*+?.()|[\]{}\/]/g, "\\$&");
3132
+ };
3133
+ /**
3134
+ * check if the char is an already converted char from custom list
3135
+ * @param {char} ch character to check
3136
+ * @param {object} customReplacements custom translation map
3137
+ */
3138
+ var isReplacedCustomChar = function(ch, customReplacements) {
3139
+ for (var c in customReplacements) if (customReplacements[c] === ch) return true;
3140
+ };
3141
+ if (typeof module !== "undefined" && module.exports) {
3142
+ module.exports = getSlug;
3143
+ module.exports.createSlug = createSlug;
3144
+ } else if (typeof define !== "undefined" && define.amd) define([], function() {
3145
+ return getSlug;
3146
+ });
3147
+ else try {
3148
+ if (root.getSlug || root.createSlug) throw "speakingurl: globals exists /(getSlug|createSlug)/";
3149
+ else {
3150
+ root.getSlug = getSlug;
3151
+ root.createSlug = createSlug;
3152
+ }
3153
+ } catch (e) {}
3154
+ })(exports);
3155
+ }) });
3156
+ var import_speakingurl = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js": ((exports, module) => {
3157
+ module.exports = require_speakingurl$1();
3158
+ }) }))(), 1);
3159
+ const appRecordInfo = target.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ ??= {
3160
+ id: 0,
3161
+ appIds: /* @__PURE__ */ new Set()
3162
+ };
3163
+ function toggleHighPerfMode(state) {
3164
+ devtoolsState.highPerfModeEnabled = state ?? !devtoolsState.highPerfModeEnabled;
3165
+ if (!state && activeAppRecord.value) registerDevToolsPlugin(activeAppRecord.value.app);
3166
+ }
3167
+ function updateDevToolsClientDetected(params) {
3168
+ devtoolsState.devtoolsClientDetected = {
3169
+ ...devtoolsState.devtoolsClientDetected,
3170
+ ...params
3171
+ };
3172
+ toggleHighPerfMode(!Object.values(devtoolsState.devtoolsClientDetected).some(Boolean));
3173
+ }
3174
+ target.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ ??= updateDevToolsClientDetected;
3175
+ var DoubleIndexedKV = class {
3176
+ constructor() {
3177
+ this.keyToValue = /* @__PURE__ */ new Map();
3178
+ this.valueToKey = /* @__PURE__ */ new Map();
3179
+ }
3180
+ set(key, value) {
3181
+ this.keyToValue.set(key, value);
3182
+ this.valueToKey.set(value, key);
3183
+ }
3184
+ getByKey(key) {
3185
+ return this.keyToValue.get(key);
3186
+ }
3187
+ getByValue(value) {
3188
+ return this.valueToKey.get(value);
3189
+ }
3190
+ clear() {
3191
+ this.keyToValue.clear();
3192
+ this.valueToKey.clear();
3193
+ }
3194
+ };
3195
+ var Registry = class {
3196
+ constructor(generateIdentifier) {
3197
+ this.generateIdentifier = generateIdentifier;
3198
+ this.kv = new DoubleIndexedKV();
3199
+ }
3200
+ register(value, identifier) {
3201
+ if (this.kv.getByValue(value)) return;
3202
+ if (!identifier) identifier = this.generateIdentifier(value);
3203
+ this.kv.set(identifier, value);
3204
+ }
3205
+ clear() {
3206
+ this.kv.clear();
3207
+ }
3208
+ getIdentifier(value) {
3209
+ return this.kv.getByValue(value);
3210
+ }
3211
+ getValue(identifier) {
3212
+ return this.kv.getByKey(identifier);
3213
+ }
3214
+ };
3215
+ var ClassRegistry = class extends Registry {
3216
+ constructor() {
3217
+ super((c) => c.name);
3218
+ this.classToAllowedProps = /* @__PURE__ */ new Map();
3219
+ }
3220
+ register(value, options) {
3221
+ if (typeof options === "object") {
3222
+ if (options.allowProps) this.classToAllowedProps.set(value, options.allowProps);
3223
+ super.register(value, options.identifier);
3224
+ } else super.register(value, options);
3225
+ }
3226
+ getAllowedProps(value) {
3227
+ return this.classToAllowedProps.get(value);
3228
+ }
3229
+ };
3230
+ function valuesOfObj(record) {
3231
+ if ("values" in Object) return Object.values(record);
3232
+ const values = [];
3233
+ for (const key in record) if (record.hasOwnProperty(key)) values.push(record[key]);
3234
+ return values;
3235
+ }
3236
+ function find(record, predicate) {
3237
+ const values = valuesOfObj(record);
3238
+ if ("find" in values) return values.find(predicate);
3239
+ const valuesNotNever = values;
3240
+ for (let i = 0; i < valuesNotNever.length; i++) {
3241
+ const value = valuesNotNever[i];
3242
+ if (predicate(value)) return value;
3243
+ }
3244
+ }
3245
+ function forEach(record, run) {
3246
+ Object.entries(record).forEach(([key, value]) => run(value, key));
3247
+ }
3248
+ function includes(arr, value) {
3249
+ return arr.indexOf(value) !== -1;
3250
+ }
3251
+ function findArr(record, predicate) {
3252
+ for (let i = 0; i < record.length; i++) {
3253
+ const value = record[i];
3254
+ if (predicate(value)) return value;
3255
+ }
3256
+ }
3257
+ var CustomTransformerRegistry = class {
3258
+ constructor() {
3259
+ this.transfomers = {};
3260
+ }
3261
+ register(transformer) {
3262
+ this.transfomers[transformer.name] = transformer;
3263
+ }
3264
+ findApplicable(v) {
3265
+ return find(this.transfomers, (transformer) => transformer.isApplicable(v));
3266
+ }
3267
+ findByName(name) {
3268
+ return this.transfomers[name];
3269
+ }
3270
+ };
3271
+ const getType$1 = (payload) => Object.prototype.toString.call(payload).slice(8, -1);
3272
+ const isUndefined$1 = (payload) => typeof payload === "undefined";
3273
+ const isNull$1 = (payload) => payload === null;
3274
+ const isPlainObject$2 = (payload) => {
3275
+ if (typeof payload !== "object" || payload === null) return false;
3276
+ if (payload === Object.prototype) return false;
3277
+ if (Object.getPrototypeOf(payload) === null) return true;
3278
+ return Object.getPrototypeOf(payload) === Object.prototype;
3279
+ };
3280
+ const isEmptyObject = (payload) => isPlainObject$2(payload) && Object.keys(payload).length === 0;
3281
+ const isArray$2 = (payload) => Array.isArray(payload);
3282
+ const isString = (payload) => typeof payload === "string";
3283
+ const isNumber = (payload) => typeof payload === "number" && !isNaN(payload);
3284
+ const isBoolean = (payload) => typeof payload === "boolean";
3285
+ const isRegExp = (payload) => payload instanceof RegExp;
3286
+ const isMap = (payload) => payload instanceof Map;
3287
+ const isSet = (payload) => payload instanceof Set;
3288
+ const isSymbol = (payload) => getType$1(payload) === "Symbol";
3289
+ const isDate = (payload) => payload instanceof Date && !isNaN(payload.valueOf());
3290
+ const isError = (payload) => payload instanceof Error;
3291
+ const isNaNValue = (payload) => typeof payload === "number" && isNaN(payload);
3292
+ const isPrimitive = (payload) => isBoolean(payload) || isNull$1(payload) || isUndefined$1(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
3293
+ const isBigint = (payload) => typeof payload === "bigint";
3294
+ const isInfinite = (payload) => payload === Infinity || payload === -Infinity;
3295
+ const isTypedArray = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);
3296
+ const isURL = (payload) => payload instanceof URL;
3297
+ const escapeKey = (key) => key.replace(/\./g, "\\.");
3298
+ const stringifyPath = (path) => path.map(String).map(escapeKey).join(".");
3299
+ const parsePath = (string) => {
3300
+ const result = [];
3301
+ let segment = "";
3302
+ for (let i = 0; i < string.length; i++) {
3303
+ let char = string.charAt(i);
3304
+ if (char === "\\" && string.charAt(i + 1) === ".") {
3305
+ segment += ".";
3306
+ i++;
3307
+ continue;
3308
+ }
3309
+ if (char === ".") {
3310
+ result.push(segment);
3311
+ segment = "";
3312
+ continue;
3313
+ }
3314
+ segment += char;
3315
+ }
3316
+ const lastSegment = segment;
3317
+ result.push(lastSegment);
3318
+ return result;
3319
+ };
3320
+ function simpleTransformation(isApplicable, annotation, transform, untransform) {
3321
+ return {
3322
+ isApplicable,
3323
+ annotation,
3324
+ transform,
3325
+ untransform
3326
+ };
3327
+ }
3328
+ const simpleRules = [
3329
+ simpleTransformation(isUndefined$1, "undefined", () => null, () => void 0),
3330
+ simpleTransformation(isBigint, "bigint", (v) => v.toString(), (v) => {
3331
+ if (typeof BigInt !== "undefined") return BigInt(v);
3332
+ console.error("Please add a BigInt polyfill.");
3333
+ return v;
3334
+ }),
3335
+ simpleTransformation(isDate, "Date", (v) => v.toISOString(), (v) => new Date(v)),
3336
+ simpleTransformation(isError, "Error", (v, superJson) => {
3337
+ const baseError = {
3338
+ name: v.name,
3339
+ message: v.message
3340
+ };
3341
+ superJson.allowedErrorProps.forEach((prop) => {
3342
+ baseError[prop] = v[prop];
3343
+ });
3344
+ return baseError;
3345
+ }, (v, superJson) => {
3346
+ const e = new Error(v.message);
3347
+ e.name = v.name;
3348
+ e.stack = v.stack;
3349
+ superJson.allowedErrorProps.forEach((prop) => {
3350
+ e[prop] = v[prop];
3351
+ });
3352
+ return e;
3353
+ }),
3354
+ simpleTransformation(isRegExp, "regexp", (v) => "" + v, (regex) => {
3355
+ const body = regex.slice(1, regex.lastIndexOf("/"));
3356
+ const flags = regex.slice(regex.lastIndexOf("/") + 1);
3357
+ return new RegExp(body, flags);
3358
+ }),
3359
+ simpleTransformation(isSet, "set", (v) => [...v.values()], (v) => new Set(v)),
3360
+ simpleTransformation(isMap, "map", (v) => [...v.entries()], (v) => new Map(v)),
3361
+ simpleTransformation((v) => isNaNValue(v) || isInfinite(v), "number", (v) => {
3362
+ if (isNaNValue(v)) return "NaN";
3363
+ if (v > 0) return "Infinity";
3364
+ else return "-Infinity";
3365
+ }, Number),
3366
+ simpleTransformation((v) => v === 0 && 1 / v === -Infinity, "number", () => {
3367
+ return "-0";
3368
+ }, Number),
3369
+ simpleTransformation(isURL, "URL", (v) => v.toString(), (v) => new URL(v))
3370
+ ];
3371
+ function compositeTransformation(isApplicable, annotation, transform, untransform) {
3372
+ return {
3373
+ isApplicable,
3374
+ annotation,
3375
+ transform,
3376
+ untransform
3377
+ };
3378
+ }
3379
+ const symbolRule = compositeTransformation((s, superJson) => {
3380
+ if (isSymbol(s)) return !!superJson.symbolRegistry.getIdentifier(s);
3381
+ return false;
3382
+ }, (s, superJson) => {
3383
+ return ["symbol", superJson.symbolRegistry.getIdentifier(s)];
3384
+ }, (v) => v.description, (_, a, superJson) => {
3385
+ const value = superJson.symbolRegistry.getValue(a[1]);
3386
+ if (!value) throw new Error("Trying to deserialize unknown symbol");
3387
+ return value;
3388
+ });
3389
+ const constructorToName = [
3390
+ Int8Array,
3391
+ Uint8Array,
3392
+ Int16Array,
3393
+ Uint16Array,
3394
+ Int32Array,
3395
+ Uint32Array,
3396
+ Float32Array,
3397
+ Float64Array,
3398
+ Uint8ClampedArray
3399
+ ].reduce((obj, ctor) => {
3400
+ obj[ctor.name] = ctor;
3401
+ return obj;
3402
+ }, {});
3403
+ const typedArrayRule = compositeTransformation(isTypedArray, (v) => ["typed-array", v.constructor.name], (v) => [...v], (v, a) => {
3404
+ const ctor = constructorToName[a[1]];
3405
+ if (!ctor) throw new Error("Trying to deserialize unknown typed array");
3406
+ return new ctor(v);
3407
+ });
3408
+ function isInstanceOfRegisteredClass(potentialClass, superJson) {
3409
+ if (potentialClass?.constructor) return !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
3410
+ return false;
3411
+ }
3412
+ const classRule = compositeTransformation(isInstanceOfRegisteredClass, (clazz, superJson) => {
3413
+ return ["class", superJson.classRegistry.getIdentifier(clazz.constructor)];
3414
+ }, (clazz, superJson) => {
3415
+ const allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
3416
+ if (!allowedProps) return { ...clazz };
3417
+ const result = {};
3418
+ allowedProps.forEach((prop) => {
3419
+ result[prop] = clazz[prop];
3420
+ });
3421
+ return result;
3422
+ }, (v, a, superJson) => {
3423
+ const clazz = superJson.classRegistry.getValue(a[1]);
3424
+ if (!clazz) throw new Error(`Trying to deserialize unknown class '${a[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
3425
+ return Object.assign(Object.create(clazz.prototype), v);
3426
+ });
3427
+ const customRule = compositeTransformation((value, superJson) => {
3428
+ return !!superJson.customTransformerRegistry.findApplicable(value);
3429
+ }, (value, superJson) => {
3430
+ return ["custom", superJson.customTransformerRegistry.findApplicable(value).name];
3431
+ }, (value, superJson) => {
3432
+ return superJson.customTransformerRegistry.findApplicable(value).serialize(value);
3433
+ }, (v, a, superJson) => {
3434
+ const transformer = superJson.customTransformerRegistry.findByName(a[1]);
3435
+ if (!transformer) throw new Error("Trying to deserialize unknown custom value");
3436
+ return transformer.deserialize(v);
3437
+ });
3438
+ const compositeRules = [
3439
+ classRule,
3440
+ symbolRule,
3441
+ customRule,
3442
+ typedArrayRule
3443
+ ];
3444
+ const transformValue = (value, superJson) => {
3445
+ const applicableCompositeRule = findArr(compositeRules, (rule) => rule.isApplicable(value, superJson));
3446
+ if (applicableCompositeRule) return {
3447
+ value: applicableCompositeRule.transform(value, superJson),
3448
+ type: applicableCompositeRule.annotation(value, superJson)
3449
+ };
3450
+ const applicableSimpleRule = findArr(simpleRules, (rule) => rule.isApplicable(value, superJson));
3451
+ if (applicableSimpleRule) return {
3452
+ value: applicableSimpleRule.transform(value, superJson),
3453
+ type: applicableSimpleRule.annotation
3454
+ };
3455
+ };
3456
+ const simpleRulesByAnnotation = {};
3457
+ simpleRules.forEach((rule) => {
3458
+ simpleRulesByAnnotation[rule.annotation] = rule;
3459
+ });
3460
+ const untransformValue = (json, type, superJson) => {
3461
+ if (isArray$2(type)) switch (type[0]) {
3462
+ case "symbol": return symbolRule.untransform(json, type, superJson);
3463
+ case "class": return classRule.untransform(json, type, superJson);
3464
+ case "custom": return customRule.untransform(json, type, superJson);
3465
+ case "typed-array": return typedArrayRule.untransform(json, type, superJson);
3466
+ default: throw new Error("Unknown transformation: " + type);
3467
+ }
3468
+ else {
3469
+ const transformation = simpleRulesByAnnotation[type];
3470
+ if (!transformation) throw new Error("Unknown transformation: " + type);
3471
+ return transformation.untransform(json, superJson);
3472
+ }
3473
+ };
3474
+ const getNthKey = (value, n) => {
3475
+ if (n > value.size) throw new Error("index out of bounds");
3476
+ const keys = value.keys();
3477
+ while (n > 0) {
3478
+ keys.next();
3479
+ n--;
3480
+ }
3481
+ return keys.next().value;
3482
+ };
3483
+ function validatePath(path) {
3484
+ if (includes(path, "__proto__")) throw new Error("__proto__ is not allowed as a property");
3485
+ if (includes(path, "prototype")) throw new Error("prototype is not allowed as a property");
3486
+ if (includes(path, "constructor")) throw new Error("constructor is not allowed as a property");
3487
+ }
3488
+ const getDeep = (object, path) => {
3489
+ validatePath(path);
3490
+ for (let i = 0; i < path.length; i++) {
3491
+ const key = path[i];
3492
+ if (isSet(object)) object = getNthKey(object, +key);
3493
+ else if (isMap(object)) {
3494
+ const row = +key;
3495
+ const type = +path[++i] === 0 ? "key" : "value";
3496
+ const keyOfRow = getNthKey(object, row);
3497
+ switch (type) {
3498
+ case "key":
3499
+ object = keyOfRow;
3500
+ break;
3501
+ case "value":
3502
+ object = object.get(keyOfRow);
3503
+ break;
3504
+ }
3505
+ } else object = object[key];
3506
+ }
3507
+ return object;
3508
+ };
3509
+ const setDeep = (object, path, mapper) => {
3510
+ validatePath(path);
3511
+ if (path.length === 0) return mapper(object);
3512
+ let parent = object;
3513
+ for (let i = 0; i < path.length - 1; i++) {
3514
+ const key = path[i];
3515
+ if (isArray$2(parent)) {
3516
+ const index = +key;
3517
+ parent = parent[index];
3518
+ } else if (isPlainObject$2(parent)) parent = parent[key];
3519
+ else if (isSet(parent)) {
3520
+ const row = +key;
3521
+ parent = getNthKey(parent, row);
3522
+ } else if (isMap(parent)) {
3523
+ if (i === path.length - 2) break;
3524
+ const row = +key;
3525
+ const type = +path[++i] === 0 ? "key" : "value";
3526
+ const keyOfRow = getNthKey(parent, row);
3527
+ switch (type) {
3528
+ case "key":
3529
+ parent = keyOfRow;
3530
+ break;
3531
+ case "value":
3532
+ parent = parent.get(keyOfRow);
3533
+ break;
3534
+ }
3535
+ }
3536
+ }
3537
+ const lastKey = path[path.length - 1];
3538
+ if (isArray$2(parent)) parent[+lastKey] = mapper(parent[+lastKey]);
3539
+ else if (isPlainObject$2(parent)) parent[lastKey] = mapper(parent[lastKey]);
3540
+ if (isSet(parent)) {
3541
+ const oldValue = getNthKey(parent, +lastKey);
3542
+ const newValue = mapper(oldValue);
3543
+ if (oldValue !== newValue) {
3544
+ parent.delete(oldValue);
3545
+ parent.add(newValue);
3546
+ }
3547
+ }
3548
+ if (isMap(parent)) {
3549
+ const row = +path[path.length - 2];
3550
+ const keyToRow = getNthKey(parent, row);
3551
+ switch (+lastKey === 0 ? "key" : "value") {
3552
+ case "key": {
3553
+ const newKey = mapper(keyToRow);
3554
+ parent.set(newKey, parent.get(keyToRow));
3555
+ if (newKey !== keyToRow) parent.delete(keyToRow);
3556
+ break;
3557
+ }
3558
+ case "value":
3559
+ parent.set(keyToRow, mapper(parent.get(keyToRow)));
3560
+ break;
3561
+ }
3562
+ }
3563
+ return object;
3564
+ };
3565
+ function traverse(tree, walker$1, origin = []) {
3566
+ if (!tree) return;
3567
+ if (!isArray$2(tree)) {
3568
+ forEach(tree, (subtree, key) => traverse(subtree, walker$1, [...origin, ...parsePath(key)]));
3569
+ return;
3570
+ }
3571
+ const [nodeValue, children] = tree;
3572
+ if (children) forEach(children, (child, key) => {
3573
+ traverse(child, walker$1, [...origin, ...parsePath(key)]);
3574
+ });
3575
+ walker$1(nodeValue, origin);
3576
+ }
3577
+ function applyValueAnnotations(plain, annotations, superJson) {
3578
+ traverse(annotations, (type, path) => {
3579
+ plain = setDeep(plain, path, (v) => untransformValue(v, type, superJson));
3580
+ });
3581
+ return plain;
3582
+ }
3583
+ function applyReferentialEqualityAnnotations(plain, annotations) {
3584
+ function apply(identicalPaths, path) {
3585
+ const object = getDeep(plain, parsePath(path));
3586
+ identicalPaths.map(parsePath).forEach((identicalObjectPath) => {
3587
+ plain = setDeep(plain, identicalObjectPath, () => object);
3588
+ });
3589
+ }
3590
+ if (isArray$2(annotations)) {
3591
+ const [root, other] = annotations;
3592
+ root.forEach((identicalPath) => {
3593
+ plain = setDeep(plain, parsePath(identicalPath), () => plain);
3594
+ });
3595
+ if (other) forEach(other, apply);
3596
+ } else forEach(annotations, apply);
3597
+ return plain;
3598
+ }
3599
+ const isDeep = (object, superJson) => isPlainObject$2(object) || isArray$2(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
3600
+ function addIdentity(object, path, identities) {
3601
+ const existingSet = identities.get(object);
3602
+ if (existingSet) existingSet.push(path);
3603
+ else identities.set(object, [path]);
3604
+ }
3605
+ function generateReferentialEqualityAnnotations(identitites, dedupe) {
3606
+ const result = {};
3607
+ let rootEqualityPaths = void 0;
3608
+ identitites.forEach((paths) => {
3609
+ if (paths.length <= 1) return;
3610
+ if (!dedupe) paths = paths.map((path) => path.map(String)).sort((a, b) => a.length - b.length);
3611
+ const [representativePath, ...identicalPaths] = paths;
3612
+ if (representativePath.length === 0) rootEqualityPaths = identicalPaths.map(stringifyPath);
3613
+ else result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);
3614
+ });
3615
+ if (rootEqualityPaths) if (isEmptyObject(result)) return [rootEqualityPaths];
3616
+ else return [rootEqualityPaths, result];
3617
+ else return isEmptyObject(result) ? void 0 : result;
3618
+ }
3619
+ const walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {
3620
+ const primitive = isPrimitive(object);
3621
+ if (!primitive) {
3622
+ addIdentity(object, path, identities);
3623
+ const seen = seenObjects.get(object);
3624
+ if (seen) return dedupe ? { transformedValue: null } : seen;
3625
+ }
3626
+ if (!isDeep(object, superJson)) {
3627
+ const transformed$1 = transformValue(object, superJson);
3628
+ const result$1 = transformed$1 ? {
3629
+ transformedValue: transformed$1.value,
3630
+ annotations: [transformed$1.type]
3631
+ } : { transformedValue: object };
3632
+ if (!primitive) seenObjects.set(object, result$1);
3633
+ return result$1;
3634
+ }
3635
+ if (includes(objectsInThisPath, object)) return { transformedValue: null };
3636
+ const transformationResult = transformValue(object, superJson);
3637
+ const transformed = transformationResult?.value ?? object;
3638
+ const transformedValue = isArray$2(transformed) ? [] : {};
3639
+ const innerAnnotations = {};
3640
+ forEach(transformed, (value, index) => {
3641
+ if (index === "__proto__" || index === "constructor" || index === "prototype") throw new Error(`Detected property ${index}. This is a prototype pollution risk, please remove it from your object.`);
3642
+ const recursiveResult = walker(value, identities, superJson, dedupe, [...path, index], [...objectsInThisPath, object], seenObjects);
3643
+ transformedValue[index] = recursiveResult.transformedValue;
3644
+ if (isArray$2(recursiveResult.annotations)) innerAnnotations[index] = recursiveResult.annotations;
3645
+ else if (isPlainObject$2(recursiveResult.annotations)) forEach(recursiveResult.annotations, (tree, key) => {
3646
+ innerAnnotations[escapeKey(index) + "." + key] = tree;
3647
+ });
3648
+ });
3649
+ const result = isEmptyObject(innerAnnotations) ? {
3650
+ transformedValue,
3651
+ annotations: !!transformationResult ? [transformationResult.type] : void 0
3652
+ } : {
3653
+ transformedValue,
3654
+ annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
3655
+ };
3656
+ if (!primitive) seenObjects.set(object, result);
3657
+ return result;
3658
+ };
3659
+ function getType(payload) {
3660
+ return Object.prototype.toString.call(payload).slice(8, -1);
3661
+ }
3662
+ function isArray$1(payload) {
3663
+ return getType(payload) === "Array";
3664
+ }
3665
+ function isPlainObject$1(payload) {
3666
+ if (getType(payload) !== "Object") return false;
3667
+ const prototype = Object.getPrototypeOf(payload);
3668
+ return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
3669
+ }
3670
+ function isNull(payload) {
3671
+ return getType(payload) === "Null";
3672
+ }
3673
+ function isOneOf(a, b, c, d, e) {
3674
+ return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);
3675
+ }
3676
+ function isUndefined(payload) {
3677
+ return getType(payload) === "Undefined";
3678
+ }
3679
+ isOneOf(isNull, isUndefined);
3680
+ function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
3681
+ const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
3682
+ if (propType === "enumerable") carry[key] = newVal;
3683
+ if (includeNonenumerable && propType === "nonenumerable") Object.defineProperty(carry, key, {
3684
+ value: newVal,
3685
+ enumerable: false,
3686
+ writable: true,
3687
+ configurable: true
3688
+ });
3689
+ }
3690
+ function copy(target$1, options = {}) {
3691
+ if (isArray$1(target$1)) return target$1.map((item) => copy(item, options));
3692
+ if (!isPlainObject$1(target$1)) return target$1;
3693
+ const props = Object.getOwnPropertyNames(target$1);
3694
+ const symbols = Object.getOwnPropertySymbols(target$1);
3695
+ return [...props, ...symbols].reduce((carry, key) => {
3696
+ if (isArray$1(options.props) && !options.props.includes(key)) return carry;
3697
+ const val = target$1[key];
3698
+ assignProp(carry, key, copy(val, options), target$1, options.nonenumerable);
3699
+ return carry;
3700
+ }, {});
3701
+ }
3702
+ var SuperJSON = class {
3703
+ /**
3704
+ * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
3705
+ */
3706
+ constructor({ dedupe = false } = {}) {
3707
+ this.classRegistry = new ClassRegistry();
3708
+ this.symbolRegistry = new Registry((s) => s.description ?? "");
3709
+ this.customTransformerRegistry = new CustomTransformerRegistry();
3710
+ this.allowedErrorProps = [];
3711
+ this.dedupe = dedupe;
3712
+ }
3713
+ serialize(object) {
3714
+ const identities = /* @__PURE__ */ new Map();
3715
+ const output = walker(object, identities, this, this.dedupe);
3716
+ const res = { json: output.transformedValue };
3717
+ if (output.annotations) res.meta = {
3718
+ ...res.meta,
3719
+ values: output.annotations
3720
+ };
3721
+ const equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
3722
+ if (equalityAnnotations) res.meta = {
3723
+ ...res.meta,
3724
+ referentialEqualities: equalityAnnotations
3725
+ };
3726
+ return res;
3727
+ }
3728
+ deserialize(payload) {
3729
+ const { json, meta } = payload;
3730
+ let result = copy(json);
3731
+ if (meta?.values) result = applyValueAnnotations(result, meta.values, this);
3732
+ if (meta?.referentialEqualities) result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);
3733
+ return result;
3734
+ }
3735
+ stringify(object) {
3736
+ return JSON.stringify(this.serialize(object));
3737
+ }
3738
+ parse(string) {
3739
+ return this.deserialize(JSON.parse(string));
3740
+ }
3741
+ registerClass(v, options) {
3742
+ this.classRegistry.register(v, options);
3743
+ }
3744
+ registerSymbol(v, identifier) {
3745
+ this.symbolRegistry.register(v, identifier);
3746
+ }
3747
+ registerCustom(transformer, name) {
3748
+ this.customTransformerRegistry.register({
3749
+ name,
3750
+ ...transformer
3751
+ });
3752
+ }
3753
+ allowErrorProps(...props) {
3754
+ this.allowedErrorProps.push(...props);
3755
+ }
3756
+ };
3757
+ SuperJSON.defaultInstance = new SuperJSON();
3758
+ SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);
3759
+ SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);
3760
+ SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);
3761
+ SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);
3762
+ SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);
3763
+ SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);
3764
+ SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);
3765
+ SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
3766
+ SuperJSON.serialize;
3767
+ SuperJSON.deserialize;
3768
+ SuperJSON.stringify;
3769
+ SuperJSON.parse;
3770
+ SuperJSON.registerClass;
3771
+ SuperJSON.registerCustom;
3772
+ SuperJSON.registerSymbol;
3773
+ SuperJSON.allowErrorProps;
3774
+ target.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__ ??= [];
3775
+ target.__VUE_DEVTOOLS_KIT_RPC_CLIENT__ ??= null;
3776
+ target.__VUE_DEVTOOLS_KIT_RPC_SERVER__ ??= null;
3777
+ target.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ ??= null;
3778
+ target.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ ??= null;
3779
+ target.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ ??= null;
3780
+ const MAX_SERIALIZED_SIZE = 2 * 1024 * 1024;
3781
+
3782
+ //#endregion
3783
+ //#region src/registry.ts
3784
+ const byUid = /* @__PURE__ */ new Map();
3785
+ const byGroupId = /* @__PURE__ */ new Map();
3786
+ const callbacks = [];
3787
+ const runCallbacks = (componentInstance) => callbacks.forEach((cb) => cb(componentInstance));
3788
+ const withCallbacks = (fn) => (entry) => {
3789
+ fn(entry);
3790
+ runCallbacks(entry.componentInstance);
3791
+ };
3792
+ const upsert = withCallbacks((entry) => {
3793
+ const { uid, groupId } = entry;
3794
+ byUid.set(uid, entry);
3795
+ const group = byGroupId.get(groupId);
3796
+ if (!group) byGroupId.set(groupId, new Set([uid]));
3797
+ else group.add(uid);
3798
+ });
3799
+ const remove = withCallbacks((entry) => {
3800
+ const { uid, groupId } = entry;
3801
+ byUid.delete(uid);
3802
+ const group = byGroupId.get(groupId);
3803
+ group?.delete(uid);
3804
+ if (group?.size === 0) byGroupId.delete(groupId);
3805
+ });
3806
+ const onUpdate = (fn) => {
3807
+ callbacks.push(fn);
3808
+ };
3809
+
3810
+ //#endregion
3811
+ //#region src/devtools.ts
3812
+ const INSPECTOR_ID = "composables";
3813
+ const handleGetInspectorTree = (payload) => {
3814
+ if (payload.inspectorId === INSPECTOR_ID) {
3815
+ const term = payload.filter;
3816
+ payload.rootNodes = byGroupId.entries().filter(([groupId, uids]) => groupId.includes(term) || uids.values().some((uid) => uid.includes(term))).map(([groupId, uids]) => ({
3817
+ id: groupId,
3818
+ label: groupId,
3819
+ children: uids.values().filter((uid) => uid.includes(term)).map((uid) => ({
3820
+ id: uid,
3821
+ label: uid
3822
+ })).toArray()
3823
+ })).toArray();
3824
+ }
3825
+ };
3826
+ const handleGetInspectorState = (api) => (payload) => {
3827
+ if (payload.inspectorId === INSPECTOR_ID) {
3828
+ const entry = byUid.get(payload.nodeId);
3829
+ const group = byGroupId.get(payload.nodeId);
3830
+ if (group) {
3831
+ api.unhighlightElement();
3832
+ payload.state = group.values().reduce((res, uid) => {
3833
+ const { debugState } = byUid.get(uid);
3834
+ res[uid] = Object.entries(debugState).map(([key, value]) => ({
3835
+ key,
3836
+ value: toValue(value)
3837
+ }));
3838
+ return res;
3839
+ }, {});
3840
+ return;
3841
+ }
3842
+ if (entry) {
3843
+ payload.state = { [payload.nodeId]: Object.entries(entry.debugState).map(([key, value]) => ({
3844
+ key,
3845
+ value: toValue(value),
3846
+ editable: true
3847
+ })) };
3848
+ if (entry.componentInstance) api.highlightElement(entry.componentInstance);
3849
+ }
3850
+ }
3851
+ };
3852
+ const handleInspectComponent = (payload) => {
3853
+ const entries = byUid.values().filter((entry) => entry.componentInstance === payload.componentInstance).flatMap((entry) => {
3854
+ return Object.entries(entry.debugState).map(([key, value]) => ({
3855
+ type: entry.uid,
3856
+ key,
3857
+ value: toValue(value),
3858
+ editable: true
3859
+ }));
3860
+ }).toArray();
3861
+ payload.instanceData.state.push(...entries);
3862
+ };
3863
+ function setupComposableDevtools(app) {
3864
+ console.log("🐞 Vuebugger ready to use");
3865
+ setupDevToolsPlugin({
3866
+ id: "composables-debugger",
3867
+ label: "Composables",
3868
+ logo: "https://raw.githubusercontent.com/vinpogo/vuebugger/main/logo.png",
3869
+ app
3870
+ }, (api) => {
3871
+ api.addInspector({
3872
+ id: INSPECTOR_ID,
3873
+ label: "Vuebugger",
3874
+ icon: "https://raw.githubusercontent.com/vinpogo/vuebugger/main/logo.png",
3875
+ treeFilterPlaceholder: "Search by composable or component name..."
3876
+ });
3877
+ onUpdate((componentInstance) => {
3878
+ api.sendInspectorTree(INSPECTOR_ID);
3879
+ api.sendInspectorState(INSPECTOR_ID);
3880
+ api.notifyComponentUpdate(componentInstance);
3881
+ });
3882
+ api.on.getInspectorTree(handleGetInspectorTree);
3883
+ api.on.getInspectorState(handleGetInspectorState(api));
3884
+ api.on.inspectComponent(handleInspectComponent);
3885
+ });
3886
+ }
3887
+
3888
+ //#endregion
3889
+ //#region src/debug.ts
3890
+ function debug(groupId, state) {
3891
+ if (!import.meta.env.DEV) return state;
3892
+ const instance = getCurrentInstance();
3893
+ const componentName = instance?.type.name || instance?.type.__name || "No component";
3894
+ const uid = `${componentName}/${groupId}-${Math.random().toString(36).slice(2, 9)}`;
3895
+ watch(() => state, (value, _, onCleanup) => {
3896
+ upsert({
3897
+ groupId,
3898
+ uid,
3899
+ componentName,
3900
+ componentInstance: instance,
3901
+ debugState: value
3902
+ });
3903
+ onCleanup(() => {
3904
+ remove({
3905
+ groupId,
3906
+ uid,
3907
+ componentName,
3908
+ componentInstance: instance,
3909
+ debugState: value
3910
+ });
3911
+ });
3912
+ }, { deep: true });
3913
+ return state;
3914
+ }
3915
+
3916
+ //#endregion
3917
+ //#region src/index.ts
3918
+ const plugin = { install: (app) => {
3919
+ if (!import.meta.env.DEV) return;
3920
+ setupComposableDevtools(app);
3921
+ } };
3922
+ var src_default = plugin;
3923
+
3924
+ //#endregion
3925
+ export { plugin as DebugPlugin, debug, src_default as default };