@vue/devtools-api 8.0.4 → 8.0.6

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